User:Flozi: Difference between revisions

From Spring
Jump to navigationJump to search
Flozi (talk | contribs)
m well.. can use | >_>
Flozi (talk | contribs)
testing
Line 25: Line 25:
Imposes a one-off usage of resources on the given team. The return value indicates whether or not the team had sufficient resources to meet the usage demand.
Imposes a one-off usage of resources on the given team. The return value indicates whether or not the team had sufficient resources to meet the usage demand.


<hr/>


{{LuaCallin
|addon = {widget, gadget}
|name = Initialize
|params =
|return = none
|description = Called when the addon is (re)loaded.
}}
{{LuaCallin
|addon = {widget, gadget}
|name = Shutdown
|params =
|return = none
|description = Called when the addon or the game is shutdown.
}}
{{LuaCallin
|addon = {widget, gadget}
|name = PlayerChanged
|params = number playerID
|return = none
|description = Called whenever a player's status changes e.g. becoming a spectator.
}}
<hr/>
'''TODO:'''
'''TODO:'''



Revision as of 02:05, 1 January 2013

Lua Callin example:

{{luacallin|wudget|name|param_list|return_list|description}}

gadget:AllowUnitCreation

( number unitDefID, number builderID, number builderTeam,
number x, number y, number z,
number facing )

return: bool allow

Called just before unit is created, the boolean return value determines whether or not the creation is permitted.


Lua Callout example:

{{luacallout|parent_table|name|param_list|return_list|description}}

Spring.UseTeamResource

( number teamID,
string "metal" | "energy", number amount |
{ metal = number amount, energy = number amount} )

-> nil | bool hadEnough

Imposes a one-off usage of resources on the given team. The return value indicates whether or not the team had sufficient resources to meet the usage demand.


addon.Initialize()
return: none

{{{info}}}


addon.Shutdown()
return: none

{{{info}}}


addon.PlayerChanged()
return: none

{{{info}}}

TODO:

Revamp LuaCallinReturn

Complete Spring:SiteMapThoughts

OTAism

Page on spring wiki etiquette / style guide / template usage /namespace conventions ( Spring:PageNamingConventions )

Move all pages in Units- to Units: