1 #pragma once
2 #ifndef CATA_SRC_MAPDATA_H
3 #define CATA_SRC_MAPDATA_H
4 
5 #include <array>
6 #include <bitset>
7 #include <cstddef>
8 #include <iosfwd>
9 #include <set>
10 #include <string>
11 #include <vector>
12 
13 #include "calendar.h"
14 #include "color.h"
15 #include "translations.h"
16 #include "type_id.h"
17 #include "units.h"
18 #include "value_ptr.h"
19 
20 struct ter_t;
21 
22 using ter_str_id = string_id<ter_t>;
23 
24 class JsonObject;
25 class player;
26 struct furn_t;
27 struct itype;
28 struct tripoint;
29 
30 using iexamine_function = void ( * )( player &, const tripoint & );
31 using iexamine_function_ref = void( & )( player &, const tripoint & );
32 
33 struct map_bash_info {
34     int str_min;            // min str(*) required to bash
35     int str_max;            // max str required: bash succeeds if str >= random # between str_min & str_max
36     int str_min_blocked;    // same as above; alternate values for has_adjacent_furniture(...) == true
37     int str_max_blocked;
38     int str_min_supported;  // Alternative values for floor supported by something from below
39     int str_max_supported;
40     int explosive;          // Explosion on destruction
41     int sound_vol;          // sound volume of breaking terrain/furniture
42     int sound_fail_vol;     // sound volume on fail
43     int collapse_radius;    // Radius of the tent supported by this tile
44     int fd_bash_move_cost = 100; // cost to bash a field
45     bool destroy_only;      // Only used for destroying, not normally bashable
46     bool bash_below;        // This terrain is the roof of the tile below it, try to destroy that too
47     item_group_id drop_group; // item group of items that are dropped when the object is bashed
48     translation sound;      // sound made on success ('You hear a "smash!"')
49     translation sound_fail; // sound  made on fail
50     translation field_bash_msg_success; // message upon successfully bashing a field
51     ter_str_id ter_set;    // terrain to set (REQUIRED for terrain))
52     ter_str_id ter_set_bashed_from_above; // terrain to set if bashed from above (defaults to ter_set)
53     furn_str_id furn_set;   // furniture to set (only used by furniture, not terrain)
54     // ids used for the special handling of tents
55     std::vector<furn_str_id> tent_centers;
56     map_bash_info();
57     enum map_object_type {
58         furniture = 0,
59         terrain,
60         field
61     };
62     bool load( const JsonObject &jsobj, const std::string &member, map_object_type obj_type,
63                const std::string &context );
64 };
65 struct map_deconstruct_info {
66     // Only if true, the terrain/furniture can be deconstructed
67     bool can_do;
68     // This terrain provided a roof, we need to tear it down now
69     bool deconstruct_above;
70     // items you get when deconstructing.
71     item_group_id drop_group;
72     ter_str_id ter_set;    // terrain to set (REQUIRED for terrain))
73     furn_str_id furn_set;    // furniture to set (only used by furniture, not terrain)
74     map_deconstruct_info();
75     bool load( const JsonObject &jsobj, const std::string &member, bool is_furniture,
76                const std::string &context );
77 };
78 struct furn_workbench_info {
79     // Base multiplier applied for crafting here
80     float multiplier;
81     // Mass/volume allowed before a crafting speed penalty is applied
82     units::mass allowed_mass;
83     units::volume allowed_volume;
84     furn_workbench_info();
85     bool load( const JsonObject &jsobj, const std::string &member );
86 };
87 struct plant_data {
88     // What the furniture turns into when it grows or you plant seeds in it
89     furn_str_id transform;
90     // What the 'base' furniture of the plant is, before you plant in it, and what it turns into when eaten
91     furn_str_id base;
92     // At what percent speed of a normal plant this plant furniture grows at
93     float growth_multiplier;
94     // What percent of the normal harvest this crop gives
95     float harvest_multiplier;
96     plant_data();
97     bool load( const JsonObject &jsobj, const std::string &member );
98 };
99 
100 /*
101  * List of known flags, used in both terrain.json and furniture.json.
102  * TRANSPARENT - Players and monsters can see through/past it. Also sets ter_t.transparent
103  * FLAT - Player can build and move furniture on
104  * CONTAINER - Items on this square are hidden until looted by the player
105  * PLACE_ITEM - Valid terrain for place_item() to put items on
106  * DOOR - Can be opened (used for NPC pathfinding)
107  * FLAMMABLE - Can be lit on fire
108  * FLAMMABLE_HARD - Harder to light on fire, but still possible
109  * DIGGABLE - Digging monsters, seeding monsters, digging with shovel, etc
110  * LIQUID - Blocks movement, but isn't a wall (lava, water, etc)
111  * SWIMMABLE - Player and monsters can swim through it
112  * SHARP - May do minor damage to players/monsters passing through it
113  * ROUGH - May hurt the player's feet
114  * SEALED - Can't use 'e' to retrieve items, must smash open first
115  * NOITEM - Items 'fall off' this space
116  * NO_SIGHT - When on this tile sight is reduced to 1
117  * NO_SCENT - Scent on this tile (and thus scent diffusing through it) is reduced to 0. This acts like a wall for scent
118  * MOUNTABLE - Player can fire mounted weapons from here (e.g. M2 Browning)
119  * DESTROY_ITEM - Items that land here are destroyed
120  * GOES_DOWN - Can use '>' to go down a level
121  * GOES_UP - Can use '<' to go up a level
122  * CONSOLE - Used as a computer
123  * ALARMED - Sets off an alarm if smashed
124  * SUPPORTS_ROOF - Used as a boundary for roof construction
125  * MINEABLE - Able to broken with the jackhammer/pickaxe, but does not necessarily support a roof
126  * INDOORS - Has roof over it; blocks rain, sunlight, etc.
127  * COLLAPSES - Has a roof that can collapse
128  * FLAMMABLE_ASH - Burns to ash rather than rubble.
129  * REDUCE_SCENT - Reduces scent even more, only works if also bashable
130  * FIRE_CONTAINER - Stops fire from spreading (brazier, wood stove, etc)
131  * SUPPRESS_SMOKE - Prevents smoke from fires, used by ventilated wood stoves etc
132  * PLANT - A "furniture" that grows and fruits
133  * LIQUIDCONT - Furniture that contains liquid, allows for contents to be accessed in some checks even if SEALED
134  * OPENCLOSE_INSIDE - If it's a door (with an 'open' or 'close' field), it can only be opened or closed if you're inside.
135  * PERMEABLE - Allows gases to flow through unimpeded.
136  * RAMP - Higher z-levels can be accessed from this tile
137  * EASY_DECONSTRUCT - Player can deconstruct this without tools
138  * HIDE_PLACE - Creature on this tile can't be seen by other creature not standing on adjacent tiles
139  * BLOCK_WIND - This tile will partially block wind
140  * FLAT_SURF - Furniture or terrain or vehicle part with flat hard surface (ex. table, but not chair; tree stump, etc.).
141  *
142  * Currently only used for Fungal conversions
143  * WALL - This terrain is an upright obstacle
144  * THIN_OBSTACLE - This terrain is a thin obstacle, i.e. fence
145  * ORGANIC - This furniture is partly organic
146  * FLOWER - This furniture is a flower
147  * SHRUB - This terrain is a shrub
148  * TREE - This terrain is a tree
149  * HARVESTED - This terrain has been harvested so it won't bear any fruit
150  * YOUNG - This terrain is a young tree
151  * FUNGUS - Fungal covered
152  *
153  * Furniture only:
154  * BLOCKSDOOR - This will boost map terrain's resistance to bashing if str_*_blocked is set (see map_bash_info)
155  * WORKBENCH1/WORKBENCH2/WORKBENCH3 - This is an adequate/good/great workbench for crafting.  Must be paired with a workbench iexamine.
156  */
157 
158 /*
159  * Note; All flags are defined as strings dynamically in data/json/terrain.json and furniture.json. The list above
160  * represent the common builtins. The enum below is an alternative means of fast-access, for those flags that are checked
161  * so much that strings produce a significant performance penalty. The following are equivalent:
162  *  m->has_flag("FLAMMABLE");     //
163  *  m->has_flag(TFLAG_FLAMMABLE); // ~ 20 x faster than the above, ( 2.5 x faster if the above uses static const std::string str_flammable("FLAMMABLE");
164  * To add a new ter_bitflag, add below and add to ter_bitflags_map in mapdata.cpp
165  * Order does not matter.
166  */
167 enum ter_bitflags : int {
168     TFLAG_TRANSPARENT,
169     TFLAG_FLAMMABLE,
170     TFLAG_REDUCE_SCENT,
171     TFLAG_SWIMMABLE,
172     TFLAG_SUPPORTS_ROOF,
173     TFLAG_MINEABLE,
174     TFLAG_NOITEM,
175     TFLAG_NO_SIGHT,
176     TFLAG_NO_SCENT,
177     TFLAG_SEALED,
178     TFLAG_ALLOW_FIELD_EFFECT,
179     TFLAG_LIQUID,
180     TFLAG_COLLAPSES,
181     TFLAG_FLAMMABLE_ASH,
182     TFLAG_DESTROY_ITEM,
183     TFLAG_INDOORS,
184     TFLAG_LIQUIDCONT,
185     TFLAG_FIRE_CONTAINER,
186     TFLAG_FLAMMABLE_HARD,
187     TFLAG_SUPPRESS_SMOKE,
188     TFLAG_SHARP,
189     TFLAG_DIGGABLE,
190     TFLAG_ROUGH,
191     TFLAG_UNSTABLE,
192     TFLAG_WALL,
193     TFLAG_DEEP_WATER,
194     TFLAG_SHALLOW_WATER,
195     TFLAG_NO_SHOOT,
196     TFLAG_CURRENT,
197     TFLAG_HARVESTED,
198     TFLAG_PERMEABLE,
199     TFLAG_AUTO_WALL_SYMBOL,
200     TFLAG_CONNECT_TO_WALL,
201     TFLAG_CLIMBABLE,
202     TFLAG_GOES_DOWN,
203     TFLAG_GOES_UP,
204     TFLAG_NO_FLOOR,
205     TFLAG_SEEN_FROM_ABOVE,
206     TFLAG_RAMP_DOWN,
207     TFLAG_RAMP_UP,
208     TFLAG_RAMP,
209     TFLAG_HIDE_PLACE,
210     TFLAG_BLOCK_WIND,
211     TFLAG_FLAT,
212     TFLAG_RAIL,
213     TFLAG_THIN_OBSTACLE,
214     TFLAG_SMALL_PASSAGE,
215     TFLAG_Z_TRANSPARENT,
216     TFLAG_SUN_ROOF_ABOVE,
217     TFLAG_FUNGUS,
218 
219     NUM_TERFLAGS
220 };
221 
222 /*
223  * Terrain groups which affect whether the terrain connects visually.
224  * Groups are also defined in ter_connects_map() in mapdata.cpp which matches group to JSON string.
225  */
226 enum ter_connects : int {
227     TERCONN_NONE,
228     TERCONN_WALL,
229     TERCONN_CHAINFENCE,
230     TERCONN_WOODFENCE,
231     TERCONN_RAILING,
232     TERCONN_POOLWATER,
233     TERCONN_WATER,
234     TERCONN_PAVEMENT,
235     TERCONN_RAIL,
236     TERCONN_COUNTER,
237     TERCONN_CANVAS_WALL,
238 };
239 
240 struct map_data_common_t {
241         map_bash_info        bash;
242         map_deconstruct_info deconstruct;
243 
244     public:
245         virtual ~map_data_common_t() = default;
246 
247     protected:
248         friend furn_t null_furniture_t();
249         friend ter_t null_terrain_t();
250         // The (untranslated) plaintext name of the terrain type the user would see (i.e. dirt)
251         translation name_;
252 
253         // Hardcoded examination function
254         iexamine_function examine_func; // What happens when the terrain/furniture is examined
255 
256     private:
257         std::set<std::string> flags;    // string flags which possibly refer to what's documented above.
258         std::bitset<NUM_TERFLAGS> bitflags; // bitfield of -certain- string flags which are heavily checked
259 
260     public:
261         ter_str_id curtain_transform;
262 
has_curtainsmap_data_common_t263         bool has_curtains() const {
264             return !( curtain_transform.is_empty() || curtain_transform.is_null() );
265         }
266 
267     public:
268         std::string name() const;
269 
270         /*
271         * The symbol drawn on the screen for the terrain. Please note that
272         * there are extensive rules as to which possible object/field/entity in
273         * a single square gets drawn and that some symbols are "reserved" such
274         * as * and % to do programmatic behavior.
275         */
276         std::array<int, NUM_SEASONS> symbol_;
277 
278         bool can_examine() const;
279         bool has_examine( iexamine_function_ref func ) const;
280         void set_examine( iexamine_function_ref func );
281         void examine( player &, const tripoint & ) const;
282 
283         int light_emitted = 0;
284         // The amount of movement points required to pass this terrain by default.
285         int movecost = 0;
286         int heat_radiation = 0;
287         // The coverage percentage of a furniture piece of terrain. <30 won't cover from sight.
288         int coverage = 0;
289         // Maximal volume of items that can be stored in/on this furniture
290         units::volume max_volume = 1000_liter;
291 
292         translation description;
293 
294         // The color the sym will draw in on the GUI.
295         std::array<nc_color, NUM_SEASONS> color_;
296         void load_symbol( const JsonObject &jo );
297 
298         std::string looks_like;
299 
300         /**
301          * When will this terrain/furniture get harvested and what will drop?
302          * Note: This excludes items that take extra tools to harvest.
303          */
304         std::array<harvest_id, NUM_SEASONS> harvest_by_season = {{
305                 harvest_id::NULL_ID(), harvest_id::NULL_ID(), harvest_id::NULL_ID(), harvest_id::NULL_ID()
306             }
307         };
308 
309         bool transparent = false;
310 
get_flagsmap_data_common_t311         const std::set<std::string> &get_flags() const {
312             return flags;
313         }
314 
has_flagmap_data_common_t315         bool has_flag( const std::string &flag ) const {
316             return flags.count( flag ) > 0;
317         }
318 
has_flagmap_data_common_t319         bool has_flag( const ter_bitflags flag ) const {
320             return bitflags.test( flag );
321         }
322 
323         void set_flag( const std::string &flag );
324 
325         int connect_group = 0;
326 
327         void set_connects( const std::string &connect_group_string );
328 
329         bool connects( int &ret ) const;
330 
connects_tomap_data_common_t331         bool connects_to( int test_connect_group ) const {
332             return connect_group != TERCONN_NONE && connect_group == test_connect_group;
333         }
334 
335         int symbol() const;
336         nc_color color() const;
337 
338         const harvest_id &get_harvest() const;
339         /**
340          * Returns a set of names of the items that would be dropped.
341          * Used for NPC whitelist checking.
342          */
343         const std::set<std::string> &get_harvest_names() const;
344 
345         std::string extended_description() const;
346 
347         bool was_loaded = false;
348 
is_flammablemap_data_common_t349         bool is_flammable() const {
350             return has_flag( TFLAG_FLAMMABLE ) || has_flag( TFLAG_FLAMMABLE_ASH ) ||
351                    has_flag( TFLAG_FLAMMABLE_HARD );
352         }
353 
354         virtual void load( const JsonObject &jo, const std::string & );
355         virtual void check() const;
356 };
357 
358 /*
359 * Struct ter_t:
360 * Short for terrain type. This struct defines all of the metadata for a given terrain id (an enum below).
361 */
362 struct ter_t : map_data_common_t {
363     ter_str_id id;    // The terrain's ID. Must be set, must be unique.
364     ter_str_id open;  // Open action: transform into terrain with matching id
365     ter_str_id close; // Close action: transform into terrain with matching id
366 
367     std::string trap_id_str;     // String storing the id string of the trap.
368     ter_str_id transforms_into; // Transform into what terrain?
369     ter_str_id roof;            // What will be the floor above this terrain
370 
371     trap_id trap; // The id of the trap located at this terrain. Limit one trap per tile currently.
372 
373     std::set<emit_id> emissions;
374     std::set<itype_id> allowed_template_id;
375 
376     ter_t();
377 
378     static size_t count();
379 
380     void load( const JsonObject &jo, const std::string &src ) override;
381     void check() const override;
382 };
383 
384 void set_ter_ids();
385 void set_furn_ids();
386 void reset_furn_ter();
387 
388 /*
389  * The terrain list contains the master list of  information and metadata for a given type of terrain.
390  */
391 
392 struct furn_t : map_data_common_t {
393     furn_str_id id;
394     furn_str_id open;  // Open action: transform into furniture with matching id
395     furn_str_id close; // Close action: transform into furniture with matching id
396     itype_id crafting_pseudo_item;
397     units::volume keg_capacity = 0_ml;
398     int comfort = 0;
399     int floor_bedding_warmth = 0;
400     /** Emissions of furniture */
401     std::set<emit_id> emissions;
402 
403     int bonus_fire_warmth_feet = 300;
404     itype_id deployed_item; // item id string used to create furniture
405 
406     int move_str_req = 0; //The amount of strength required to move through this furniture easily.
407 
408     cata::value_ptr<furn_workbench_info> workbench;
409 
410     cata::value_ptr<plant_data> plant;
411 
412     cata::value_ptr<float> surgery_skill_multiplier;
413 
414     // May return NULL
415     const itype *crafting_pseudo_item_type() const;
416     // May return NULL
417     const itype *crafting_ammo_item_type() const;
418 
419     furn_t();
420 
421     static size_t count();
422 
423     bool is_movable() const;
424 
425     void load( const JsonObject &jo, const std::string &src ) override;
426     void check() const override;
427 };
428 
429 void load_furniture( const JsonObject &jo, const std::string &src );
430 void load_terrain( const JsonObject &jo, const std::string &src );
431 
432 void verify_furniture();
433 void verify_terrain();
434 
435 /*
436 runtime index: ter_id
437 ter_id refers to a position in the terlist[] where the ter_t struct is stored. These global
438 ints are a drop-in replacement to the old enum, however they are -not- required (save for areas in
439 the code that can use the performance boost and refer to core terrain types), and they are -not-
440 provided for terrains added by mods. A string equivalent is always present, i.e.;
441 t_basalt
442 "t_basalt"
443 */
444 extern ter_id t_null,
445        t_hole, // Real nothingness; makes you fall a z-level
446        // Ground
447        t_dirt, t_sand, t_clay, t_dirtmound, t_pit_shallow, t_pit, t_grave, t_grave_new,
448        t_pit_corpsed, t_pit_covered, t_pit_spiked, t_pit_spiked_covered, t_pit_glass, t_pit_glass_covered,
449        t_rock_floor,
450        t_grass, t_grass_long, t_grass_tall, t_grass_golf, t_grass_dead, t_grass_white, t_moss,
451        t_metal_floor,
452        t_pavement, t_pavement_y, t_sidewalk, t_concrete, t_zebra,
453        t_thconc_floor, t_thconc_floor_olight, t_strconc_floor,
454        t_floor, t_floor_waxed,
455        t_dirtfloor,//Dirt floor(Has roof)
456        t_carpet_red, t_carpet_yellow, t_carpet_purple, t_carpet_green,
457        t_grate,
458        t_slime,
459        t_bridge,
460        t_covered_well,
461        // Lighting related
462        t_utility_light,
463        // Walls
464        t_wall_log_half, t_wall_log, t_wall_log_chipped, t_wall_log_broken, t_palisade, t_palisade_gate,
465        t_palisade_gate_o,
466        t_wall_half, t_wall_wood, t_wall_wood_chipped, t_wall_wood_broken,
467        t_wall, t_concrete_wall, t_brick_wall,
468        t_wall_metal,
469        t_wall_glass,
470        t_wall_glass_alarm,
471        t_reinforced_glass, t_reinforced_glass_shutter, t_reinforced_glass_shutter_open,
472        t_laminated_glass, t_ballistic_glass,
473        t_reinforced_door_glass_o, t_reinforced_door_glass_c,
474        t_bars,
475        t_reb_cage,
476        t_door_c, t_door_c_peep, t_door_b, t_door_b_peep, t_door_o, t_door_o_peep,
477        t_door_locked_interior, t_door_locked, t_door_locked_peep, t_door_locked_alarm, t_door_frame,
478        t_chaingate_l, t_fencegate_c, t_fencegate_o, t_chaingate_c, t_chaingate_o,
479        t_door_boarded, t_door_boarded_damaged, t_door_boarded_peep, t_rdoor_boarded,
480        t_rdoor_boarded_damaged, t_door_boarded_damaged_peep,
481        t_door_metal_c, t_door_metal_o, t_door_metal_locked, t_door_metal_pickable,
482        t_door_bar_c, t_door_bar_o, t_door_bar_locked,
483        t_door_glass_c, t_door_glass_o, t_door_glass_frosted_c, t_door_glass_frosted_o,
484        t_portcullis,
485        t_recycler, t_window, t_window_taped, t_window_domestic, t_window_domestic_taped, t_window_open,
486        t_curtains, t_window_bars_curtains, t_window_bars_domestic,
487        t_window_alarm, t_window_alarm_taped, t_window_empty, t_window_frame, t_window_boarded,
488        t_window_boarded_noglass, t_window_bars_alarm, t_window_bars,
489        t_metal_grate_window, t_metal_grate_window_with_curtain, t_metal_grate_window_with_curtain_open,
490        t_metal_grate_window_noglass, t_metal_grate_window_with_curtain_noglass,
491        t_metal_grate_window_with_curtain_open_noglass,
492        t_window_stained_green, t_window_stained_red, t_window_stained_blue,
493        t_window_no_curtains, t_window_no_curtains_open, t_window_no_curtains_taped,
494        t_rock, t_fault,
495        t_paper,
496        t_rock_wall, t_rock_wall_half,
497        // Tree
498        t_tree, t_tree_young, t_tree_apple, t_tree_apple_harvested, t_tree_coffee, t_tree_coffee_harvested,
499        t_tree_pear, t_tree_pear_harvested,
500        t_tree_cherry, t_tree_cherry_harvested, t_tree_peach, t_tree_peach_harvested, t_tree_apricot,
501        t_tree_apricot_harvested,
502        t_tree_plum, t_tree_plum_harvested, t_tree_pine, t_tree_blackjack, t_tree_birch,
503        t_tree_birch_harvested, t_tree_willow, t_tree_willow_harvested, t_tree_maple, t_tree_maple_tapped,
504        t_tree_deadpine, t_tree_hickory, t_tree_hickory_dead, t_tree_hickory_harvested, t_underbrush,
505        t_shrub, t_shrub_blueberry, t_shrub_strawberry, t_trunk, t_stump,
506        t_root_wall,
507        t_wax, t_floor_wax,
508        t_fence, t_chainfence, t_chainfence_posts,
509        t_fence_post, t_fence_wire, t_fence_barbed, t_fence_rope,
510        t_railing,
511        // Nether
512        t_marloss, t_fungus_floor_in, t_fungus_floor_sup, t_fungus_floor_out, t_fungus_wall,
513        t_fungus_mound, t_fungus, t_shrub_fungal, t_tree_fungal, t_tree_fungal_young, t_marloss_tree,
514        // Water, lava, etc.
515        t_water_moving_dp, t_water_moving_sh, t_water_sh, t_swater_sh, t_water_dp, t_swater_dp,
516        t_water_pool, t_sewage,
517        t_lava,
518        // More embellishments than you can shake a stick at.
519        t_sandbox, t_slide, t_monkey_bars, t_backboard,
520        t_gas_pump, t_gas_pump_smashed,
521        t_diesel_pump, t_diesel_pump_smashed,
522        t_atm,
523        t_generator_broken,
524        t_missile, t_missile_exploded,
525        t_radio_tower, t_radio_controls,
526        t_console_broken, t_console, t_gates_mech_control, t_gates_control_concrete, t_gates_control_brick,
527        t_barndoor, t_palisade_pulley,
528        t_gates_control_metal,
529        t_sewage_pipe, t_sewage_pump,
530        t_centrifuge,
531        t_column,
532        t_vat,
533        t_rootcellar,
534        t_cvdbody, t_cvdmachine,
535        t_water_pump,
536        t_conveyor, t_machinery_light, t_machinery_heavy, t_machinery_old, t_machinery_electronic,
537        t_improvised_shelter,
538        // Staircases etc.
539        t_stairs_down, t_stairs_up, t_manhole, t_ladder_up, t_ladder_down, t_slope_down,
540        t_slope_up, t_rope_up,
541        t_manhole_cover,
542        // Special
543        t_card_science, t_card_military, t_card_industrial, t_card_reader_broken, t_slot_machine,
544        t_elevator_control, t_elevator_control_off, t_elevator, t_pedestal_wyrm,
545        t_pedestal_temple,
546        // Temple tiles
547        t_rock_red, t_rock_green, t_rock_blue, t_floor_red, t_floor_green, t_floor_blue,
548        t_switch_rg, t_switch_gb, t_switch_rb, t_switch_even,
549        t_rdoor_c, t_rdoor_b, t_rdoor_o, t_mdoor_frame, t_window_reinforced, t_window_reinforced_noglass,
550        t_window_enhanced, t_window_enhanced_noglass, t_open_air, t_plut_generator,
551        t_pavement_bg_dp, t_pavement_y_bg_dp, t_sidewalk_bg_dp, t_guardrail_bg_dp,
552        t_linoleum_white, t_linoleum_gray, t_rad_platform,
553        // Railroad and subway
554        t_railroad_rubble,
555        t_buffer_stop, t_railroad_crossing_signal, t_crossbuck_wood, t_crossbuck_metal,
556        t_railroad_tie, t_railroad_tie_h, t_railroad_tie_v, t_railroad_tie_d,
557        t_railroad_track, t_railroad_track_h, t_railroad_track_v, t_railroad_track_d, t_railroad_track_d1,
558        t_railroad_track_d2,
559        t_railroad_track_on_tie, t_railroad_track_h_on_tie, t_railroad_track_v_on_tie,
560        t_railroad_track_d_on_tie;
561 
562 /*
563 runtime index: furn_id
564 furn_id refers to a position in the furnlist[] where the furn_t struct is stored. See note
565 about ter_id above.
566 */
567 extern furn_id f_null,
568        f_hay, f_cattails, f_lotus, f_lilypad,
569        f_rubble, f_rubble_rock, f_wreckage, f_ash,
570        f_barricade_road, f_sandbag_half, f_sandbag_wall,
571        f_bulletin,
572        f_indoor_plant,
573        f_bed, f_toilet, f_makeshift_bed, f_straw_bed,
574        f_sink, f_oven, f_woodstove, f_fireplace, f_bathtub,
575        f_chair, f_armchair, f_sofa, f_cupboard, f_trashcan, f_desk, f_exercise,
576        f_bench, f_table, f_pool_table,
577        f_counter,
578        f_fridge, f_glass_fridge, f_dresser, f_locker,
579        f_rack, f_bookcase,
580        f_washer, f_dryer,
581        f_vending_c, f_vending_o, f_dumpster, f_dive_block,
582        f_crate_c, f_crate_o, f_coffin_c, f_coffin_o,
583        f_large_canvas_wall, f_canvas_wall, f_canvas_door, f_canvas_door_o, f_groundsheet,
584        f_fema_groundsheet, f_large_groundsheet,
585        f_large_canvas_door, f_large_canvas_door_o, f_center_groundsheet, f_skin_wall, f_skin_door,
586        f_skin_door_o,  f_skin_groundsheet,
587        f_mutpoppy, f_flower_fungal, f_fungal_mass, f_fungal_clump,
588        f_safe_c, f_safe_l, f_safe_o,
589        f_plant_seed, f_plant_seedling, f_plant_mature, f_plant_harvest,
590        f_fvat_empty, f_fvat_full,
591        f_wood_keg,
592        f_standing_tank,
593        f_egg_sackbw, f_egg_sackcs, f_egg_sackws, f_egg_sacke,
594        f_flower_marloss,
595        f_tatami,
596        f_kiln_empty, f_kiln_full, f_kiln_metal_empty, f_kiln_metal_full,
597        f_arcfurnace_empty, f_arcfurnace_full,
598        f_smoking_rack, f_smoking_rack_active, f_metal_smoking_rack, f_metal_smoking_rack_active,
599        f_water_mill, f_water_mill_active,
600        f_wind_mill, f_wind_mill_active,
601        f_robotic_arm, f_vending_reinforced,
602        f_brazier,
603        f_firering,
604        f_tourist_table,
605        f_camp_chair,
606        f_sign,
607        f_gunsafe_ml, f_gunsafe_mj, f_gun_safe_el,
608        f_street_light, f_traffic_light,
609        f_console, f_console_broken;
610 
611 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
612 //// These are on their way OUT and only used in certain switch statements until they are rewritten.
613 
614 // consistency checking of terlist & furnlist.
615 void check_furniture_and_terrain();
616 
617 void finalize_furniture_and_terrain();
618 
619 #endif // CATA_SRC_MAPDATA_H
620