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.
Replacement for wiki 'LuaCallinReturn' page
Moderator: Moderators
- Funkencool
- Posts: 542
- Joined: 02 Dec 2011, 22:31
Re: Replacement for wiki 'LuaCallinReturn' page
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.
Although I think I could get used to this color scheme given time.
Re: Replacement for wiki 'LuaCallinReturn' page
The old page is more compact, which I like.
Re: Replacement for wiki 'LuaCallinReturn' page
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.
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.
Think so too, atm the return values stand out most. Maybe have those in default and instead callin-name in color.My only critic is the old callin names seemed to stick out more (being green), which I think I prefer.
Re: Replacement for wiki 'LuaCallinReturn' page
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)
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
Good Job!! These explanations ARE GREAT!!!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.
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)