User:Flozi

From Spring
Revision as of 20:21, 1 November 2012 by Flozi (talk | contribs) (example without shadow on function name)
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.


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: