User:Flozi: Difference between revisions
From Spring
Jump to navigationJump to search
mNo edit summary |
→Template:API -> CallIn: proposed structure for callout template |
||
| Line 26: | Line 26: | ||
:Called just before unit is created, the boolean return value determines whether or not the creation is permitted. | :Called just before unit is created, the boolean return value determines whether or not the creation is permitted. | ||
== Template:Callout proposal == | |||
Note that the number of 'arg1' etc is fixed (i.e. 10) but can be omitted without issue. the 'type' template is just a way to make inserting different styles within the param list easier, [[Template:Pipe]] already exists and is required as it is a special char within mediawiki syntax, could use <nowiki>{{!}}</nowiki> as a shorter alternative to pipe. | |||
<pre> | |||
{{Callout | |||
|prefix = Spring | |||
|name = UseTeamResource | |||
|arg1 = {{type|number}} teamID | |||
|arg2 = {{type|string}} "metal" {{pipe}} "energy" | |||
|arg3 = {{type|number}} amount {{pipe}} { metal = {{type|number}} amount, energy = {{type|number}} amount } | |||
|output = {{type|nil}} {{pipe}} {{type|bool}} hadEnough | |||
|info = 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. | |||
}}</pre> | |||
= TODO: = | = TODO: = | ||
Revision as of 21:14, 13 June 2016
My User Subpages
Scratchpad
Template:Tag
bool burnblow default: false lua: selfExplode
- Does the weapon explode when it reaches its maximum range or continue on its path? The name is an OTAism.
float range default: 10.0
- The maximum range in elmos that the weapon can fire at.
float weaponVelocity default: 0.0
- The velocity in elmos per second of the weapon projectile. Since 99.0 maxVelocity is a synonym.
Template:API -> CallIn
addon.AllowUnitCreation(int unitDefID, int builderID, int builderTeam, int x, int y, int z, int facing)
return: bool allow
- Called just before unit is created, the boolean return value determines whether or not the creation is permitted.
Template:Callout proposal
Note that the number of 'arg1' etc is fixed (i.e. 10) but can be omitted without issue. the 'type' template is just a way to make inserting different styles within the param list easier, Template:Pipe already exists and is required as it is a special char within mediawiki syntax, could use {{!}} as a shorter alternative to pipe.
{{Callout
|prefix = Spring
|name = UseTeamResource
|arg1 = {{type|number}} teamID
|arg2 = {{type|string}} "metal" {{pipe}} "energy"
|arg3 = {{type|number}} amount {{pipe}} { metal = {{type|number}} amount, energy = {{type|number}} amount }
|output = {{type|nil}} {{pipe}} {{type|bool}} hadEnough
|info = 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:
Major
- Category:ShowCase template, main page, S44 & MCL as examples
- Category:Tutorial
- Continue to improve Lua:Callins - Fill in blank explanations
- Clickable / right-click copy paste-able anchors in {{tag}} et al
- Assimp build upon, metadata doc, split tutorial again >_>
- Cleanup old Category:Map_making into new Category:Map Dev
Minor
- Page on spring wiki etiquette (SpringWiki) / style guide & template usage (Mapdev:WikiGuide) /namespace conventions (Spring:PageNamingConventions) - pages are good already; put these in revamped community portal?
- Move all pages in Animation- to Animation:
- Continue to improve Gamedev:Main up to the high standard of Mapdev:Main
Undocumented Features
- cmdcolors.txt (c.f. GUI modifications in SVN)
- ctrlpanel.txt (c.f. as above)
- isolated mode (isolated.txt 99+ c.f. portable/isolation mode, Spring manpages)
Template:LuaCallout Examples
{{{prefix}}}UseTeamResource
( {{{arg1}}},
{{{arg2}}},
{{{arg3}}},
{{{arg4}}},
{{{arg5}}},
{{{arg6}}},
{{{arg7}}},
{{{arg8}}},
{{{arg9}}} )
return: nil | bool hadEnough