Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SSblackbox and SSticker for terror spiders #1686

Merged
merged 3 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modular_ss220/_defines220/code/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@

#define VOX_RAID_FREQ 1220

#define BIOHAZARD_TERROR_SPIDERS "Terrors"
GLOBAL_LIST_EMPTY(raider_spawn)
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"
24 changes: 24 additions & 0 deletions modular_ss220/events/code/SSticker.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/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 ..()

/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
m-dzianishchyts marked this conversation as resolved.
Show resolved Hide resolved
return ..()
3 changes: 1 addition & 2 deletions modular_ss220/events/code/spider_terror.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#define TS_POINTS_PRINCE 30
#define TS_POINTS_QUEEN 42


/datum/event/spider_terror
announceWhen = 240
var/population_factor = 0.7 // higher - more spawnpoints
Expand Down Expand Up @@ -48,7 +47,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
Loading