This wiki is archived from 2021-09-05
Planetary Annihilation mods API
Jump to navigation
Jump to search
File:Titans-icon.png Planetary Annihilation mods API
Also see Planetary Annihilation Mod Structure.
deprecated: api.mods.getMountedMods( context, callback )
use api.mods.getMounted( context, false ).
returns a list of mounted mod in context:
- context: client or server string
- callback: function(data)
data contains an array of modinfo objects with:
- author (string)
- context (string)
- dependencies (array)
- description (string)
- display_name (string)
- identifier (string)
- signature (string)
- version (string)
Example: api.mods.getMountedMods('client',function(data){console.log(data);});
api.mods.getMounted( context, raw )
returns a promise for a list of mounted mods in context:
- context: client or server string
- raw: boolean (use true to return full modinfo)
promise data contains an object with a single property mounted_mods which contains an array of modinfo objects.
Example: api.mods.getMounted('client',true).always(function(data){console.log(data);});