Open vache opened 9 years ago
Terrains are always placeable. If one is placed in a square with other incompatible features, the terrain should trump the other features and they should be reset to their null value. Order of preference should go terrain > furniture > trap > monster & monster groups > item & item groups > everything else. If something with higher preference is placed somewhere it is incompatible with something of lower preference, the higher one will get placed and overwrite the rest, otherwise the placement is not allowed.
Gas Pumps (the specials) are terrain.
Signs, toilets, and vending machines are all furniture.
Placing one of the above should change the terrain/furniture to match, if placement is valid.
https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/JSON_FLAGS.md
Terrain, Furniture, & Traps
move_cost == 0
should prevent placement of furniture or traps. The flagFLAT
may be enough for most things, but this is not exhaustive.Items:
NOITEM
DESTROY_ITEM
prevent item placement. Note: this means things like vending machines and gas pumps will be forced to use the specials for placement.Monsters & NPCs:
move_cost == 0
should prevent placementmove_cost_mod == -1
should prevent placementbenign == true
traps onlyVehicles:
FLAT
orROAD
terrain with no furniture? OrTINY
orNOCOLLIDE
furniture/terrain?Fields:
Other flags we need to know:
AUTO_WALL_SYMBOL
for drawing walls correctlyGOES_DOWN
andGOES_UP
for specials.