Units have name & nick name #444
-
Why do the Units have a getName & getNickName, it is confusing. Particularly for Building where the name attribute is the type of Building and the nick name is actually the locally unique name. Name should be the unique name in all cases so the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Before and in v3.06, a building has no unique name. e.g. If there are two Inflatable Greenhouses, they both have the same name Starting v3.07, we added buildingType and getBuildingType() to denote the type of building. So if there are two Inflatable Greenhouses, they both have the same building type At the same time, we added nickName and getNickName() to distinguish between So name and getName() should be deprecated and may be we should get rid of it. |
Beta Was this translation helpful? Give feedback.
-
Yeap I get that, getBuildingType is the correct way to go. Therfore the getName in Building should return the unique name? I think yes. Then getNickName becomes a duplicate of getName and can go to tidy the code. |
Beta Was this translation helpful? Give feedback.
Before and in v3.06, a building has no unique name.
e.g. If there are two Inflatable Greenhouses, they both have the same name
Inflatable Greenhouse
. getName() is not useful at all.Starting v3.07, we added buildingType and getBuildingType() to denote the type of building.
So if there are two Inflatable Greenhouses, they both have the same building type
Inflatable Greenhouse
. getBuildingType() becomes useful for this distinction.At the same time, we added nickName and getNickName() to distinguish between
Inflatable Greenhouse 1
andInflatable Greenhouse 2
.So name and getName() should be deprecated and may be we should get rid of it.