← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/bug-1380287 into lp:widelands

 

Do something like this (I don't remember the exact enum variable names):

if (direction == Ship::Direction::kCounterClockwise) {
    lua_pushstring(L, "ccw")
} elseif ...

then everything will always be referenced by a name.

I have done something similar in lua_map.cc for the BuildingDescription types, in case you want to steal some code.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1380287/+merge/252507
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1380287 into lp:widelands.


References