tschoppi / starsystem-gen

Automated Generation of a GURPS 4e Star System as described in GURPS: Space
Other
40 stars 16 forks source link

Deal with <> in names in a centralized fashion #34

Closed MyrionPhoenixmoon closed 8 years ago

MyrionPhoenixmoon commented 8 years ago

Currently, the names of objects follow the "" convention, and the < and > characters have to be stripped out in many different places.

This should be changed, either by introducing a helper function to encapsulate the calls to strip the characters or by removing them from the name by default and only adding them when necessary.

tschoppi commented 8 years ago

I think adding them when necessary is the better solution, although it gives more work to incorporate this change.

MyrionPhoenixmoon commented 8 years ago

I strongly agree. I think that we'll soon have to do some bigger refactoring, in order to be ready for any new feature yet to come, anyway, and this should be part of it.

tschoppi commented 8 years ago

Maybe provide two methods for returning the name, one with the angular brackets and one without. That might make the refactoring easier.

MyrionPhoenixmoon commented 8 years ago

So we rename the current version to sth like "get_name_for_latex"? hmm, that could work!

tschoppi commented 8 years ago

I'd say get_name_angled which is a wrapper for get_name and just sticks the angles left and right.

I could do this, if you want me to.

MyrionPhoenixmoon commented 8 years ago

Yeah, sounds good, go right ahead.