This wiki is archived from 2021-09-05

Planetary Annihilation mods API

From Planetary Annihilation: TITANS and Classic PA Wiki
Jump to navigation Jump to search

Planetary Annihilation mods API

Also see Planetary Annihilation Mod Structure.

deprecated: api.mods.getMountedMods( context, callback )

Returns a list of mounted mod in context.

context mandatory string client or server
callback mandatory function(data) data contains an array of modinfo objects
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 mandatory string client or server
raw optional boolean true to return full modinfo objects
returns promise object with a single property mounted_mods which contains an array of modinfo objects
api.mods.getMounted('client',true).always(function(data){console.log(data);});