Files
Aurora.3/code/modules/events/spider_infestation.dm
Batrachophreno 4ecb0bc21c Repath obj/machinery to obj/structure/machinery [MDB Ignore] (#22500)
Repaths obj/machinery to obj/structure/machinery. **Note for
reviewers:** the only meaningful changed code exists within
**code/game/objects/structures.dm** and
**code/game/objects/structures/_machinery.dm**, largely concerning
damage procs. With the exception of moving airlock defines to their own
file, ALL OTHER CHANGES ARE STRICTLY PATH CHANGES.

Objects, _categorically_, are largely divided between those you can hold
in your hand/inventory and those you can't. Machinery objects are
already subtypes of Structures behaviorally, this PR just makes their
pathing reflect that, and allows for future work (tool actions, more
health/destruction functionality) to be developed without unnecessary
code duplication.

I have tested this PR by loading up the Horizon and dismantling various
machines and structures with tools, shooting guns of various types
throughout the ship, and detonating a bunch of explosions throughout the
ship.
2026-05-26 19:35:48 +00:00

36 lines
1.6 KiB
Plaintext

/datum/event/spider_infestation
announceWhen = 90
var/spawncount = 1
ic_name = "unidentified lifesigns"
var/list/possible_spiders
/datum/event/spider_infestation/setup()
announceWhen = rand(announceWhen, announceWhen + 60)
spawncount = rand(4 * severity, 6 * severity) //spiderlings only have a 50% chance to grow big and strong
possible_spiders = list(/mob/living/simple_animal/hostile/giant_spider, /mob/living/simple_animal/hostile/giant_spider/nurse, /mob/living/simple_animal/hostile/giant_spider/emp, /mob/living/simple_animal/hostile/giant_spider/hunter, /mob/living/simple_animal/hostile/giant_spider/bombardier)
/datum/event/spider_infestation/announce()
command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg', zlevels = affecting_z)
/datum/event/spider_infestation/start()
..()
var/list/vents = list()
for(var/obj/structure/machinery/atmospherics/unary/vent_pump/temp_vent in SSmachinery.processing)
if(!temp_vent.welded && temp_vent.network && is_station_level(temp_vent.loc.z))
if(temp_vent.network.normal_members.len > 50)
vents += temp_vent
while(spawncount && vents.len)
var/obj/vent = pick(vents)
new /obj/effect/spider/spiderling(vent.loc, null, 1, possible_spiders)
vents -= vent
spawncount--
// Moderate event cannot spawn nurses, ergo, they only terrorize but do not replicate.
/datum/event/spider_infestation/moderate/setup()
..()
possible_spiders -= /mob/living/simple_animal/hostile/giant_spider/nurse