Code review comment for lp:~widelands-dev/widelands/bug-1380287

Revision history for this message
GunChleoc (gunchleoc) wrote :

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.

« Back to merge proposal