Replacement for wiki 'LuaCallinReturn' page

Replacement for wiki 'LuaCallinReturn' page

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Replacement for wiki 'LuaCallinReturn' page

Post 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.
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: Replacement for wiki 'LuaCallinReturn' page

Post 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.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Replacement for wiki 'LuaCallinReturn' page

Post by zwzsg »

The old page is more compact, which I like.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Replacement for wiki 'LuaCallinReturn' page

Post 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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Replacement for wiki 'LuaCallinReturn' page

Post 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)
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: Replacement for wiki 'LuaCallinReturn' page

Post 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)
Post Reply

Return to “Lua Scripts”