Skip to content

Commit

Permalink
Replaces General Mob Spawns in Rooms with Spawners
Browse files Browse the repository at this point in the history
Mod Spawners are less haredcoded and can be edited in the code more easily. Mobs that have map edited names will remain untouched.

fix: scatter/steel_noon_fly being the same path as scatter/steel_noon
tweak: gcorp.dmm
tweak: sweeper_ca.dmm
tweak: apartment_lna.dmm
tweak: apartment_lsa.dmm
tweak: scorp.dmm replaced mobs with spawners.
tweak: scorp_warehouse.dmm replaced mobs with spawners
tweak: gcorp_armory replaced mobs with spawners
tweak: supermarket.dmm replaced mobs with spawners.
tweak: gmanager_house.dmm added a wallvent and plate for livelyness.
tweak: love_train.dmm i opened the map and a bunch of charge weapons were removed due to not existing anymore.
tweak: robot_city.dmm i noticed 2 turrets were shooting constantly at some robots outside of their sight lines so i changed their stat to off. Did not touch turrets at vault door.
tweak: shrimp_vault.dmm replaced most with spawners but certain deliberately placed shrimp were left to their own devices.
tweak: lcorp_office.dmm rearranged some things for better perspective such as doors and posters.
tweak: moved office_kcorp .dmm from medium east to west
tweak: dry_cleaners.dmm
tweak: freezer_sw contained a varient of amber_bug/morsel that no longer exists.
tweak: pet_store puts all the pets in pet boxes because that might make them not process their AI as much.
tweak: gcorp_swa.dmm
tweak: rat_ssa.dmm replaced the two rats with a elite spawner so its two random elite rats every intialization.

Update scorp_vault.dmm

replace scatter with mobspawners
  • Loading branch information
InsightfulParasite committed Aug 6, 2024
1 parent e5b0512 commit 0566f5c
Show file tree
Hide file tree
Showing 28 changed files with 1,204 additions and 574 deletions.
116 changes: 88 additions & 28 deletions ModularTegustation/lc13_spawners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,87 +106,147 @@
/obj/item/tresmetal/indigo = 1
)

///This spawner scatters the spawned stuff around where it is placed.
/obj/effect/spawner/mobspawner
icon = 'icons/effects/landmarks_static.dmi'
icon_state = "xeno_spawn"
///determines how many things to scatter
var/max_spawns = 3
///determines how big of a range we should scatter things in.
var/radius = 1
///This weighted list acts as the loot table for the spawner
var/list/mobspawn_table


/obj/effect/spawner/mobspawner/Initialize()
..()
if(!length(mobspawn_table))
return INITIALIZE_HINT_QDEL

var/list/candidate_locations = ReturnPlacementTurfs()

if(!candidate_locations.len)
return INITIALIZE_HINT_QDEL

PlaceMobs(candidate_locations)

return INITIALIZE_HINT_QDEL

/obj/effect/spawner/mobspawner/proc/ReturnPlacementTurfs()
. = list()
for(var/turf/turf_in_view in view(radius, get_turf(src)))
if(turf_in_view.density)
continue
if(locate(/obj/machinery/door) in turf_in_view)
continue
var/bad_turf = FALSE
for(var/obj/O in turf_in_view)
if(O.density)
bad_turf = TRUE
break
if(!bad_turf)
. += turf_in_view

/obj/effect/spawner/mobspawner/proc/PlaceMobs(list/places_to_place)
for(var/i = 1 to max_spawns)
if(!places_to_place.len)
break
var/turf/place_to_spawn = pick_n_take(places_to_place)
var/spawned_thing = pickweight(mobspawn_table)
SpawnMob(spawned_thing, place_to_spawn)

/obj/effect/spawner/mobspawner/proc/SpawnMob(type, turf/spawn_turf)
var/mob/living/L = new type(spawn_turf)
if(ishostile(L))
var/mob/living/simple_animal/hostile/H = L
H.wander = FALSE

//Pseudo Group Spawners
//Amber Worms
/obj/effect/spawner/scatter/amber_dawn
/obj/effect/spawner/mobspawner/amber_dawn
name = "amber swarm spawn"
max_spawns = 5
loot_table = list(/mob/living/simple_animal/hostile/ordeal/amber_bug = 1)
mobspawn_table = list(/mob/living/simple_animal/hostile/ordeal/amber_bug = 1)

//Green Bots
/obj/effect/spawner/scatter/green_dawn
/obj/effect/spawner/mobspawner/green_dawn
name = "bot package spawn"
max_spawns = 5
loot_table = list(/mob/living/simple_animal/hostile/ordeal/green_bot = 1)
mobspawn_table = list(/mob/living/simple_animal/hostile/ordeal/green_bot = 1)

/obj/effect/spawner/scatter/green_noon
/obj/effect/spawner/mobspawner/green_noon
name = "big bot package spawn"
max_spawns = 5
loot_table = list(/mob/living/simple_animal/hostile/ordeal/green_bot_big = 1)
mobspawn_table = list(/mob/living/simple_animal/hostile/ordeal/green_bot_big = 1)

//Indigo Sweepers
/obj/effect/spawner/scatter/indigo_dawn
/obj/effect/spawner/mobspawner/indigo_dawn
name = "sweeper scout pack spawn"
max_spawns = 5
loot_table = list(/mob/living/simple_animal/hostile/ordeal/indigo_dawn = 1)
mobspawn_table = list(/mob/living/simple_animal/hostile/ordeal/indigo_dawn = 1)

/obj/effect/spawner/scatter/indigo_noon
/obj/effect/spawner/mobspawner/indigo_noon
name = "sweeper pack spawn"
max_spawns = 5
loot_table = list(/mob/living/simple_animal/hostile/ordeal/indigo_noon = 1)
mobspawn_table = list(/mob/living/simple_animal/hostile/ordeal/indigo_noon = 1)

//Steel Roaches
/obj/effect/spawner/scatter/steel_dawn
/obj/effect/spawner/mobspawner/steel_dawn
name = "g corp squad spawn"
max_spawns = 5
loot_table = list(/mob/living/simple_animal/hostile/ordeal/steel_dawn = 1)
mobspawn_table = list(/mob/living/simple_animal/hostile/ordeal/steel_dawn = 1)

/obj/effect/spawner/scatter/steel_noon
/obj/effect/spawner/mobspawner/steel_noon
name = "g corp assault squad spawn"
max_spawns = 5
loot_table = list(/mob/living/simple_animal/hostile/ordeal/steel_dawn/steel_noon = 1)
mobspawn_table = list(/mob/living/simple_animal/hostile/ordeal/steel_dawn/steel_noon = 1)

/obj/effect/spawner/mobspawner/steel_noon_fly
name = "g corp air assault squad spawn"
max_spawns = 5
mobspawn_table = list(/mob/living/simple_animal/hostile/ordeal/steel_dawn/steel_noon/flying = 1)

/obj/effect/spawner/scatter/steel_noon
/obj/effect/spawner/mobspawner/steel_dusk_squad
name = "g corp air assault squad spawn"
max_spawns = 5
loot_table = list(/mob/living/simple_animal/hostile/ordeal/steel_dawn/steel_noon/flying = 1)
mobspawn_table = list(/mob/living/simple_animal/hostile/ordeal/steel_dawn/steel_noon/flying = 1)

//Shrimp
/obj/effect/spawner/scatter/shrimp
/obj/effect/spawner/mobspawner/shrimp
name = "shrimp squad spawn"
max_spawns = 5
loot_table = list(/mob/living/simple_animal/hostile/shrimp = 4,
mobspawn_table = list(/mob/living/simple_animal/hostile/shrimp = 4,
/mob/living/simple_animal/hostile/shrimp_soldier = 1)

/obj/effect/spawner/scatter/shrimp_melee
/obj/effect/spawner/mobspawner/shrimp_melee
name = "fishin shrimp squad spawn"
max_spawns = 5
loot_table = list(/mob/living/simple_animal/hostile/shrimp = 1)
mobspawn_table = list(/mob/living/simple_animal/hostile/shrimp = 1)

/obj/effect/spawner/scatter/shrimp_ranged
/obj/effect/spawner/mobspawner/shrimp_ranged
name = "shrimp soldier squad spawn"
max_spawns = 5
loot_table = list(/mob/living/simple_animal/hostile/shrimp_soldier = 1)
mobspawn_table = list(/mob/living/simple_animal/hostile/shrimp_soldier = 1)

//Backstreet Humanoids
/obj/effect/spawner/scatter/rat
/obj/effect/spawner/mobspawner/rat
name = "rat syndicate spawn"
max_spawns = 5
loot_table = list(/mob/living/simple_animal/hostile/humanoid/rat = 1)
mobspawn_table = list(/mob/living/simple_animal/hostile/humanoid/rat = 1)

/obj/effect/spawner/scatter/rat_elite
/obj/effect/spawner/mobspawner/rat_elite
name = "rat elite spawn"
max_spawns = 1
loot_table = list(
mobspawn_table = list(
/mob/living/simple_animal/hostile/humanoid/rat/knife = 3,
/mob/living/simple_animal/hostile/humanoid/rat/pipe = 3,
/mob/living/simple_animal/hostile/humanoid/rat/hammer = 3,
/mob/living/simple_animal/hostile/humanoid/rat/zippy = 1)

/obj/effect/spawner/scatter/rat_random
/obj/effect/spawner/mobspawner/rat_random
name = "rat gang spawn"
max_spawns = 5
loot_table = list(/mob/living/simple_animal/hostile/humanoid/rat = 6,
mobspawn_table = list(/mob/living/simple_animal/hostile/humanoid/rat = 6,
/mob/living/simple_animal/hostile/humanoid/rat/knife = 1,
/mob/living/simple_animal/hostile/humanoid/rat/pipe = 2,
/mob/living/simple_animal/hostile/humanoid/rat/hammer = 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,16 @@
room_id = "arcade_me"
mappath = "_maps/RandomRooms/backstreets/medium_east/arcade_me.dmm"

/datum/map_template/random_room/backstreets/medium_east/office_kcorp
name = "KCorp Office - Medium East"
room_id = "office_kcorp_me"
mappath = "_maps/RandomRooms/backstreets/medium_east/office_kcorp.dmm"

/datum/map_template/random_room/backstreets/medium_east/kcorp_storage
name = "KCorp Storage - Medium East"
room_id = "kcorp_storage_me"
mappath = "_maps/RandomRooms/backstreets/medium_east/kcorp_storage.dmm"


/datum/map_template/random_room/backstreets/medium_east/zwei_office_mea
name = "Zwei Office - Medium East"
room_id = "zwei_office_mea"
mappath = "_maps/RandomRooms/backstreets/medium_east/zwei_office_mea.dmm"

/datum/map_template/random_room/backstreets/medium_east/church
name = "Church - Medium East"
room_id = "church"
Expand All @@ -50,4 +44,4 @@
name = "Robot - Medium East A"
room_id = "robot_mea"
mappath = "_maps/RandomRooms/backstreets/medium_east/robot_mea.dmm"

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
mappath = "_maps/RandomRooms/backstreets/medium_west/butcher_medium.dmm"
stock = 1

/datum/map_template/random_room/backstreets/medium_east/office_kcorp
name = "KCorp Office - Medium West"
room_id = "office_kcorp_me"
mappath = "_maps/RandomRooms/backstreets/medium_west/office_kcorp.dmm"

/datum/map_template/random_room/backstreets/medium_west/officemwa
name = "Office - Medium West A"
room_id = "office_mwa"
Expand Down
Loading

0 comments on commit 0566f5c

Please sign in to comment.