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 t
@GunChleoc - of course I was thinking about this - using text instead of
integers for directions. But I failed to find good conventor string<->integer
like nw=6 and so. I mean a pair of functions that would change them forth and
back.
I could implement the conversion in this code, but it would b
2 matches
Mail list logo