diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 7125eeec282..b93333c7372 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -68,6 +68,7 @@ var/assistantratio = 2 //how many assistants to security members var/traitor_objectives_amount = 2 + var/shadowling_max_age = 1800 var/max_maint_drones = 5 //This many drones can spawn, var/allow_drone_spawn = 1 //assuming the admin allow them to. @@ -260,6 +261,9 @@ if("jobs_have_minimal_access") config.jobs_have_minimal_access = 1 + if("shadowling_max_age") + config.shadowling_max_age = text2num(value) + if("log_ooc") config.log_ooc = 1 diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index f5fc513744a..2e0b8a19343 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -205,6 +205,13 @@ Made by Xhuis continue if(shadow.current.stat == DEAD) continue + if(world.time - round_start_time > (config.shadowling_max_age * 10)) + if(ishuman(shadow.current)) + var/mob/living/carbon/human/H = shadow.current + if(!istype(H.species, /datum/species/shadow)) + H.take_overall_damage(1, 0) + to_chat(H, "You cannot contain your shadowling essense any longer! You must hatch, or die!") + H << 'sound/weapons/sear.ogg' shadows_alive++ if(shadows_alive) return ..() diff --git a/config/example/config.txt b/config/example/config.txt index d575635baeb..d2f227d6e6d 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -95,6 +95,9 @@ PROBABILITY EXTENDED 2 PROBABILITY NUCLEAR 3 PROBABILITY ABDUCTION 0 +# MAXIMUM SECONDS SHADOWLINGS CAN REMAIN UNHATCHED BEFORE THEY TAKE DAMAGE +SHADOWLING_MAX_AGE 1800 + ## Hash out to disable random events during the round. ALLOW_RANDOM_EVENTS