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

2015-03-11 Thread TiborB
@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

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

2015-03-11 Thread GunChleoc
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