Template:LuaCallin: Difference between revisions

From Spring
Jump to navigationJump to search
Flozi (talk | contribs)
m burp
Flozi (talk | contribs)
m doh, forgot why this approach wouldn't work, failcakes.
Line 1: Line 1:
<includeonly>{{API|{{{addon}}}|:|{{{name}}}|{{{params}}}|return: |{{{return}}}|{{{description}}}}}</includeonly><noinclude>'''Lua Callin example:''' <pre>{{luacallin|wudget|name|param_list|return_list|description}}</pre>
<includeonly>{{API
|{{{addon}}}
|:
|{{{name}}}
|{{{params}}}
|return:  
|{{{return}}}
|{{{description}}}
}}</includeonly><noinclude>'''Lua Callin example:''' <pre>{{luacallin|wudget|name|param_list|return_list|description}}</pre>


<span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">gadget:'''AllowUnitCreation'''</span>  
<span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">gadget:'''AllowUnitCreation'''</span>  
Line 15: Line 23:
|addon = gadget
|addon = gadget
|name = AllowUnitCreation
|name = AllowUnitCreation
|params = number unitDefID, number builderID, number builderTeam,  
|params = <pre>number unitDefID, number builderID, number builderTeam,  
number x, number y, number z,  
number x, number y, number z,  
number facing
number facing</pre>
|return = bool allow
|return = bool allow
|description = Called just before unit is created, the boolean return value determines whether or not the creation is permitted.}}
|description = Called just before unit is created, the boolean return value determines whether or not the creation is permitted.}}
</noinclude>
</noinclude>

Revision as of 00:19, 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.


{{{prefix}}}[[#{{{name}}}|{{{name}}}]]({{{args}}})

{{{info}}}