MegaGlest / megaglest-source

MegaGlest real-time strategy game engine (cross-platform, 3-d)
http://megaglest.org/
346 stars 89 forks source link

map_editor: condense the code a little #178

Closed andy5995 closed 6 years ago

andy5995 commented 6 years ago

@titiger this doesn't do a lot, but it does get rid of the second duplication of the object descriptions.

titiger commented 6 years ago

Text is different with intention. One is the name one is the internal meaning. This can be different. For example "gold" is "resource1". If we would decide its really the same, we could reduce the number of parameters instead...

andy5995 commented 6 years ago

I'm referring to the text that doesn't have internal meaning.

These appear in the status bar, one for the object that's selected, and one for the object that the mouse is hovering over.

"Tree (unwalkable/harvestable)"

https://github.com/MegaGlest/megaglest-source/blob/12998eb10f6447ac89a45d1e6d76f17946647b7a/source/glest_map_editor/main.cpp#L338

and "Tree"

https://github.com/MegaGlest/megaglest-source/blob/12998eb10f6447ac89a45d1e6d76f17946647b7a/source/glest_map_editor/main.h#L62