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
Do something like this (I don't remember the exact enum variable names):
if (direction == Ship::Direction ::kCounterClock wise) { pushstring( L, "ccw")
lua_
} 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.