User:Flozi: Difference between revisions

From Spring
Jump to navigationJump to search
m showing use case of indented multiple line formatting etc.
Flozi (talk | contribs)
hillbilly rock, hillbilly roll
Line 1: Line 1:
'''Lua Callin example:''' <pre>{{luacallin|wudget|name|param_list|return_list|description}}</pre>
'''Template:LuaCallout & Template:LuaCallin Examples'''


<span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">gadget:'''AllowUnitCreation'''</span>
: <span style="color:#00ff88">( number unitDefID, number builderID, number builderTeam, <br/> number x, number y, <br/> number z, number facing ) </span>
: <span style="color:#ffff88">return: bool allow</span>


Called just before unit is created, the boolean return value determines whether or not the creation is permitted.
{{LuaCallout
|parent = Spring
|name = UseTeamResource
|params = number teamID, <br/> string "metal" {{pipe}} "energy", number amount {{pipe}} <br/> { metal = number amount, energy = number amount }
|return = nil {{pipe}} bool hadEnough
|description = 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 = gadget
'''Lua Callout example:'''<pre>{{luacallout|parent_table|name|param_list|return_list|description}}</pre>
|name = AllowUnitCreation
 
|params = number unitDefID, number builderID, number builderTeam, <br/> number x, number y, <br/> number z, number facing
<span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">Spring.'''UseTeamResource'''</span>
|return = bool allow
 
|description = Called just before unit is created, the boolean return value determines whether or not the creation is permitted.
<span style="color:#00ff88">( number teamID,  
}}
<br/>   string "metal" &#124; "energy", number amount &#124;
<br/>   { metal = number amount, energy = number amount} )
 
<span style="color:#ffff88">-> nil &#124; bool hadEnough</span>
 
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
{{LuaCallin
Line 51: Line 46:
'''TODO:'''
'''TODO:'''


Revamp [[LuaCallinReturn]]
Complete [[Flozi:Gamedev:Main]]


Complete [[Spring:SiteMapThoughts]]
Complete [[Spring:SiteMapThoughts]]
Line 57: Line 52:
[[OTAism]]
[[OTAism]]


Page on spring wiki etiquette / style guide / template usage /namespace conventions ( [[Spring:PageNamingConventions]] )
[[ASSIMP]]
 
Revamp [[LuaCallinReturn]]
 
Page on spring wiki etiquette / style guide / template usage /namespace conventions ( [[Spring:PageNamingConventions]] , [[Mapdev:WikiGuide]])


Move all pages in [http://springrts.com/mediawiki/index.php?title=Special%3APrefixIndex&prefix=Units-&namespace=0 Units-] to [http://springrts.com/mediawiki/index.php?title=Special%3APrefixIndex&prefix=Units%3A&namespace=0 Units:]
Move all pages in [http://springrts.com/mediawiki/index.php?title=Special%3APrefixIndex&prefix=Units-&namespace=0 Units-] to [http://springrts.com/mediawiki/index.php?title=Special%3APrefixIndex&prefix=Units%3A&namespace=0 Units:]

Revision as of 04:21, 22 February 2013

Template:LuaCallout & Template:LuaCallin Examples


{{{prefix}}}UseTeamResource ( {{{arg1}}}, {{{arg2}}}, {{{arg3}}}, {{{arg4}}}, {{{arg5}}}, {{{arg6}}}, {{{arg7}}}, {{{arg8}}}, {{{arg9}}} )
return: nil | bool hadEnough


addon.AllowUnitCreation()
return: bool allow

{{{info}}}


addon.Initialize()
return: none

{{{info}}}


addon.Shutdown()
return: none

{{{info}}}


addon.PlayerChanged()
return: none

{{{info}}}

TODO:

Complete Flozi:Gamedev:Main

Complete Spring:SiteMapThoughts

OTAism

ASSIMP

Revamp LuaCallinReturn

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

Move all pages in Units- to Units: