Skip to content

Commit

Permalink
SSticker for spiders
Browse files Browse the repository at this point in the history
  • Loading branch information
Fullonibus committed Dec 4, 2024
1 parent 37aca75 commit 41b869e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions modular_ss220/events/_events.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
#include "code/infestation_extended.dm"
#include "code/christmas.dm"
#include "code/spider_terror.dm"
#include "code/SSticker.dm"
25 changes: 25 additions & 0 deletions modular_ss220/events/code/SSticker.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/datum/controller/subsystem/ticker/any_admin_spawned_mobs(biohazard)
. = ..()
switch(biohazard)
if(BIOHAZARD_TERROR_SPIDERS)
for(var/mob/living/simple_animal/hostile/poison/terror_spider/S in GLOB.ts_spiderlist)
if(S.admin_spawned)
return TRUE
return FALSE

/datum/controller/subsystem/ticker/biohazard_count(biohazard)
switch(biohazard)
if(BIOHAZARD_TERROR_SPIDERS)
var/spiders = 0
for(var/mob/living/simple_animal/hostile/poison/terror_spider/S in GLOB.ts_spiderlist)
if(S.ckey)
spiders++
return spiders
return..()

/datum/controller/subsystem/ticker/biohazard_active_threat(biohazard)
var/modular_count = biohazard_count(biohazard)
switch(biohazard)
if(BIOHAZARD_TERROR_SPIDERS)
return modular_count >= 5
return..()
3 changes: 2 additions & 1 deletion modular_ss220/events/code/spider_terror.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#define TS_POINTS_PRINCE 30
#define TS_POINTS_QUEEN 42

#define BIOHAZARD_TERROR_SPIDERS "Terrors"

/datum/event/spider_terror
announceWhen = 240
Expand Down Expand Up @@ -48,7 +49,7 @@
spawnpoints += round(population_factor * length(GLOB.clients)) // server population sensitivity
log_debug("where is [spawnpoints] available spawnpoints")
spawn_terror_spiders(count_spawn_spiders(max_spiders), candidates)
SSevents.biohazards_this_round += 1
SSevents.biohazards_this_round += BIOHAZARD_TERROR_SPIDERS

/datum/event/spider_terror/proc/count_spawn_spiders(max_spiders)
while(spawnpoints >= TS_POINTS_GREEN && spawncount < max_spiders)
Expand Down

0 comments on commit 41b869e

Please sign in to comment.