From 4aaba046197ef0662494314032cbe150447e3b31 Mon Sep 17 00:00:00 2001 From: anothersimulacrum <42699974+anothersimulacrum@users.noreply.github.com> Date: Sat, 2 May 2020 11:55:02 -0700 Subject: [PATCH] Replace random lab turrets with lab security There's not really any rationale for placing turrets in random locations that aren't of high value in labs. It makes much more sense to have lab security there, as opposed to turrets. --- data/json/mapgen/lab/lab_floorplan_cross.json | 24 +++++++------------ data/json/mapgen/lab/lab_floorplans.json | 2 +- data/json/mapgen/lab/lab_rooms.json | 4 ++-- data/json/mapgen/lab/lab_rooms_wall.json | 10 ++++---- data/json/monstergroups/lab.json | 1 - src/mapgen.cpp | 5 ++-- 6 files changed, 18 insertions(+), 28 deletions(-) diff --git a/data/json/mapgen/lab/lab_floorplan_cross.json b/data/json/mapgen/lab/lab_floorplan_cross.json index f8e035fd76e33..82c5d3af0d7d8 100644 --- a/data/json/mapgen/lab/lab_floorplan_cross.json +++ b/data/json/mapgen/lab/lab_floorplan_cross.json @@ -659,8 +659,7 @@ " ", " " ], - "palettes": [ "lab_palette", "lab_loot_bionic_vault" ], - "place_monster": [ { "monster": "mon_turret_rifle", "x": [ 11, 12 ], "y": [ 2, 5 ], "chance": 25 } ] + "palettes": [ "lab_palette", "lab_loot_bionic_vault" ] } }, { @@ -695,8 +694,7 @@ " ", " " ], - "palettes": [ "lab_palette", "lab_loot_serum_vault" ], - "place_monster": [ { "monster": "mon_turret_rifle", "x": [ 11, 12 ], "y": [ 2, 5 ], "chance": 10 } ] + "palettes": [ "lab_palette", "lab_loot_serum_vault" ] } }, { @@ -731,8 +729,7 @@ " ", " " ], - "palettes": [ "lab_palette", "lab_loot_bionic_vault" ], - "place_monster": [ { "monster": "mon_turret_rifle", "x": [ 2, 5 ], "y": [ 11, 12 ], "chance": 25 } ] + "palettes": [ "lab_palette", "lab_loot_bionic_vault" ] } }, { @@ -767,8 +764,7 @@ " ", " " ], - "palettes": [ "lab_palette", "lab_loot_serum_vault" ], - "place_monster": [ { "monster": "mon_turret_rifle", "x": [ 2, 5 ], "y": [ 11, 12 ], "chance": 10 } ] + "palettes": [ "lab_palette", "lab_loot_serum_vault" ] } }, { @@ -803,8 +799,7 @@ " ------ ", "####################### " ], - "palettes": [ "lab_palette", "lab_loot_bionic_vault" ], - "place_monster": [ { "monster": "mon_turret_rifle", "x": [ 11, 12 ], "y": [ 18, 21 ], "chance": 25 } ] + "palettes": [ "lab_palette", "lab_loot_bionic_vault" ] } }, { @@ -839,8 +834,7 @@ " ------ ", "####################### " ], - "palettes": [ "lab_palette", "lab_loot_serum_vault" ], - "place_monster": [ { "monster": "mon_turret_rifle", "x": [ 11, 12 ], "y": [ 18, 21 ], "chance": 10 } ] + "palettes": [ "lab_palette", "lab_loot_serum_vault" ] } }, { @@ -875,8 +869,7 @@ " #", " " ], - "palettes": [ "lab_palette", "lab_loot_bionic_vault" ], - "place_monster": [ { "monster": "mon_turret_rifle", "x": [ 18, 21 ], "y": [ 11, 12 ], "chance": 25 } ] + "palettes": [ "lab_palette", "lab_loot_bionic_vault" ] } }, { @@ -911,8 +904,7 @@ " #", " " ], - "palettes": [ "lab_palette", "lab_loot_serum_vault" ], - "place_monster": [ { "monster": "mon_turret_rifle", "x": [ 18, 21 ], "y": [ 11, 12 ], "chance": 10 } ] + "palettes": [ "lab_palette", "lab_loot_serum_vault" ] } } ] diff --git a/data/json/mapgen/lab/lab_floorplans.json b/data/json/mapgen/lab/lab_floorplans.json index 63daffe762179..d839a92416446 100644 --- a/data/json/mapgen/lab/lab_floorplans.json +++ b/data/json/mapgen/lab/lab_floorplans.json @@ -488,7 +488,7 @@ "r": { "items": [ { "item": "mine_equipment", "chance": 30 } ] }, "c": { "items": [ { "item": "chem_lab", "chance": 30 }, { "item": "tools_science", "chance": 30 } ] } }, - "place_monster": [ { "monster": "mon_turret_rifle", "x": 11, "y": 9, "chance": 20 } ], + "place_monsters": [ { "monster": "GROUP_LAB_SECURITY", "x": [ 0, 11 ], "y": [ 8, 9 ], "chance": 20, "repeat": 7 } ], "place_nested": [ { "chunks": [ "lab_spawn_9x9_crossdoors" ], "x": 6, "y": 11 }, { "chunks": [ "lab_spawn_7x7_wall_nw" ], "x": 12, "y": 2 }, diff --git a/data/json/mapgen/lab/lab_rooms.json b/data/json/mapgen/lab/lab_rooms.json index 796bcad8509fb..99b271c604cec 100644 --- a/data/json/mapgen/lab/lab_rooms.json +++ b/data/json/mapgen/lab/lab_rooms.json @@ -131,7 +131,7 @@ ], "palettes": [ "lab_palette", "lab_palette_map_computer" ], "terrain": { "c": [ "t_thconc_floor" ] }, - "place_monster": [ { "monster": "mon_turret_rifle", "x": [ 2, 3 ], "y": [ 3, 3 ] } ] + "place_monsters": [ { "monster": "GROUP_LAB_SECURITY", "x": [ 0, 6 ], "y": [ 0, 6 ], "repeat": [ 1, 6 ], "chance": 3 } ] } }, { @@ -154,7 +154,7 @@ ], "palettes": [ "lab_palette", "lab_palette_map_computer" ], "terrain": { "c": [ "t_thconc_floor" ] }, - "place_monster": [ { "monster": "mon_turret_rifle", "x": [ 4, 4 ], "y": [ 1, 4 ] } ] + "place_monsters": [ { "monster": "GROUP_LAB_SECURITY", "x": [ 0, 6 ], "y": [ 0, 6 ], "repeat": [ 1, 6 ], "chance": 3 } ] } }, { diff --git a/data/json/mapgen/lab/lab_rooms_wall.json b/data/json/mapgen/lab/lab_rooms_wall.json index 8d0c59f93a048..b68fb2f6fdd90 100644 --- a/data/json/mapgen/lab/lab_rooms_wall.json +++ b/data/json/mapgen/lab/lab_rooms_wall.json @@ -189,8 +189,7 @@ "|-------" ], "palettes": [ "lab_palette", "lab_loot_bionic_vault" ], - "terrain": { "M": "t_wall_metal" }, - "place_monster": [ { "monster": "mon_turret_rifle", "x": 5, "y": 3, "chance": 25 } ] + "terrain": { "M": "t_wall_metal" } } }, { @@ -211,8 +210,7 @@ "|#######" ], "palettes": [ "lab_palette", "lab_loot_serum_vault" ], - "terrain": { "M": "t_wall_metal" }, - "place_monster": [ { "monster": "mon_turret_rifle", "x": 5, "y": 3, "chance": 10 } ] + "terrain": { "M": "t_wall_metal" } } }, { @@ -435,14 +433,14 @@ "g,,,,,,,,,", "|,,,,,,,,,", "g,,,,,,,,,", - "|x,,,7,,,x", + "|x,,,,,,,x", "g,,,,,,,,,", "|,,,,,,,,,", "g,,,,,,,,,", "|x,,,x,,,x" ], "palettes": [ "lab_palette" ], - "monster": { "7": { "monster": "mon_turret_rifle" } }, + "place_monsters": [ { "monster": "GROUP_LAB_SECURITY", "x": [ 1, 9 ], "y": [ 1, 9 ] } ], "terrain": { "g": "t_wall_glass", "G": "t_door_glass_lab_c", "7": "t_thconc_floor" } } }, diff --git a/data/json/monstergroups/lab.json b/data/json/monstergroups/lab.json index 99724ebfa3145..69c3293bd6acd 100644 --- a/data/json/monstergroups/lab.json +++ b/data/json/monstergroups/lab.json @@ -99,7 +99,6 @@ { "monster": "mon_skitterbot", "freq": 85, "cost_multiplier": 0 }, { "monster": "mon_skitterbot", "freq": 85, "cost_multiplier": 0, "pack_size": [ 2, 3 ] }, { "monster": "mon_skitterbot", "freq": 1, "cost_multiplier": 0, "pack_size": [ 8, 12 ] }, - { "monster": "mon_turret_rifle", "freq": 85, "cost_multiplier": 0 }, { "monster": "mon_secubot", "freq": 1, "cost_multiplier": 10 }, { "monster": "mon_talon_m202a1", "freq": 1, "cost_multiplier": 15 }, { "monster": "mon_zombie_bio_op", "freq": 50, "cost_multiplier": 5 }, diff --git a/src/mapgen.cpp b/src/mapgen.cpp index d24a6f64ba067..d3b70621fe1e7 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -80,6 +80,7 @@ static const mongroup_id GROUP_FUNGI_FUNGALOID( "GROUP_FUNGI_FUNGALOID" ); static const mongroup_id GROUP_HAZMATBOT( "GROUP_HAZMATBOT" ); static const mongroup_id GROUP_LAB( "GROUP_LAB" ); static const mongroup_id GROUP_LAB_CYBORG( "GROUP_LAB_CYBORG" ); +static const mongroup_id GROUP_LAB_SECURITY( "GROUP_LAB_SECURITY" ); static const mongroup_id GROUP_NETHER( "GROUP_NETHER" ); static const mongroup_id GROUP_PLAIN( "GROUP_PLAIN" ); static const mongroup_id GROUP_ROBOT_SECUBOT( "GROUP_ROBOT_SECUBOT" ); @@ -6207,7 +6208,7 @@ void science_room( map *m, const point &p1, const point &p2, int z, int rotate ) tmpcomp->add_failure( COMPFAIL_SHUTDOWN ); tmpcomp->add_failure( COMPFAIL_ALARM ); tmpcomp->add_failure( COMPFAIL_DAMAGE ); - m->place_spawns( GROUP_TURRET, 1, + m->place_spawns( GROUP_LAB_SECURITY, 1, point( static_cast( ( p1.x + p2.x ) / 2 ), desk ), point( static_cast( ( p1.x + p2.x ) / 2 ), desk ), 1, true ); } else { @@ -6223,7 +6224,7 @@ void science_room( map *m, const point &p1, const point &p2, int z, int rotate ) tmpcomp->add_failure( COMPFAIL_SHUTDOWN ); tmpcomp->add_failure( COMPFAIL_ALARM ); tmpcomp->add_failure( COMPFAIL_DAMAGE ); - m->place_spawns( GROUP_TURRET, 1, + m->place_spawns( GROUP_LAB_SECURITY, 1, point( desk, static_cast( ( p1.y + p2.y ) / 2 ) ), point( desk, static_cast( ( p1.y + p2.y ) / 2 ) ), 1, true ); }