Page 1 of 1
Replacement for wiki 'LuaCallinReturn' page
Posted: 15 Feb 2014, 21:54
by FLOZi
http://springrts.com/wiki/Lua:Callins
vs. the old
http://springrts.com/wiki/LuaCallinReturn
Please help me fill in the blanks if you have experience with any of the partially documented callins.
Re: Replacement for wiki 'LuaCallinReturn' page
Posted: 16 Feb 2014, 00:42
by Funkencool
Nice, I spend a lot of time on that page. My only critic is the old callin names seemed to stick out more (being green), which I think I prefer.
Although I think I could get used to this color scheme given time.
Re: Replacement for wiki 'LuaCallinReturn' page
Posted: 16 Feb 2014, 16:32
by zwzsg
The old page is more compact, which I like.
Re: Replacement for wiki 'LuaCallinReturn' page
Posted: 16 Feb 2014, 17:01
by knorke
Good job.
New page is less compact but if we want to have some explainations that seems unavoidable.
Personally I would only have explainations that are not written by captain obvious himself:

"Called before damage is applied to the unit, allows fine control over how much damage and impulse is applied." is good but something feel like
UnitDestroyed:
Called when a unit is destroyed.
could be left out..
Not sure if it needs the
addon.,it does not really add any information I think but makes quickreading bit harder.
I like that it is in format where one can c&p the line without having to reorder stuff.
My only critic is the old callin names seemed to stick out more (being green), which I think I prefer.
Think so too, atm the return values stand out most. Maybe have those in default and instead callin-name in color.
Re: Replacement for wiki 'LuaCallinReturn' page
Posted: 16 Feb 2014, 18:27
by FLOZi
Changing the visuals is easy as it is a single template.
Colours are currently set up to ape the Template:Tag used on e.g.
http://springrts.com/wiki/Gamedev:UnitDefs
The
addon. is exactly for the purpose of copy pasting, once the new handler is rolled out for gadgets (already works for widgets!)
If we could get the extension i asked for 1 million times for the wiki, it'd be easy to have blank sections if they are missing e.g. no need to have 'return: none' or Cpt. Obvious (though I don't mind him)
Re: Replacement for wiki 'LuaCallinReturn' page
Posted: 16 Feb 2014, 18:30
by jamerlan
addon.CommandNotify(cmdID, cmdParams, cmdOptions)
return: bool removeCmd
Called when a command is issued. Returning true deletes the command and does not send it through the network.
Good Job!! These explanations ARE GREAT!!!
I spent lot's of time with these WTF "return ???". I had no idea why sometimes something was working and every time I was guessing what to return: true or false :-D
Also this way of describing parameters looks strange for me (java man): CommandNotify() --> "id, params, options", where id = the CommandID
that's much better: CommandNotify(cmdID, cmdParams, cmdOptions)