User:Flozi

From Spring
Revision as of 23:52, 1 January 2013 by Enetheru (talk | contribs) (showing use case of indented multiple line formatting etc.)
Jump to navigationJump to search

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: