diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index a143baa294f..aebb1aae1e0 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -450,3 +450,28 @@ /datum/status_effect/limited_buff/health_buff/maxed_out() . = ..() to_chat(owner, span_warning("You don't feel any healthier.")) + +/datum/status_effect/nest_sustenance + id = "nest_sustenance" + duration = -1 + tick_interval = 0.4 SECONDS + alert_type = /atom/movable/screen/alert/status_effect/nest_sustenance + +/datum/status_effect/nest_sustenance/tick(delta_time, times_fired) + . = ..() + + if(owner.stat == DEAD) //If the victim has died due to complications in the nest + qdel(src) + return + + owner.adjustBruteLoss(-2 * delta_time, updating_health = FALSE) + owner.adjustFireLoss(-2 * delta_time, updating_health = FALSE) + owner.adjustOxyLoss(-4 * delta_time, updating_health = FALSE) + owner.adjustStaminaLoss(-4 * delta_time, updating_health = FALSE) + owner.adjust_bodytemperature(BODYTEMP_NORMAL, 0, BODYTEMP_NORMAL) //Won't save you from the void of space, but it will stop you from freezing or suffocating in low pressure + + +/atom/movable/screen/alert/status_effect/nest_sustenance + name = "Nest Vitalization" + desc = "The resin seems to pulsate around you. It seems to be sustaining your vital functions. You feel ill..." + icon_state = "nest_life" diff --git a/code/game/objects/structures/beds_chairs/alien_nest.dm b/code/game/objects/structures/beds_chairs/alien_nest.dm index ca45862b46d..9276b0daaee 100644 --- a/code/game/objects/structures/beds_chairs/alien_nest.dm +++ b/code/game/objects/structures/beds_chairs/alien_nest.dm @@ -32,9 +32,9 @@ span_hear("You hear squelching...")) else M.visible_message(span_warning("[M.name] struggles to break free from the gelatinous resin!"),\ - span_notice("You struggle to break free from the gelatinous resin... (Stay still for two minutes.)"),\ + span_notice("You struggle to break free from the gelatinous resin... (Stay still for about a minute and a half.)"),\ span_hear("You hear squelching...")) - if(!do_after(M, 1200, target = src)) + if(!do_after(M, 100 SECONDS, target = src)) if(M?.buckled) to_chat(M, span_warning("You fail to unbuckle yourself!")) return @@ -44,6 +44,7 @@ span_notice("You break free from the gelatinous resin!"),\ span_hear("You hear squelching...")) + unbuckle_mob(M) add_fingerprint(user) @@ -71,12 +72,18 @@ M.layer = BELOW_MOB_LAYER add_overlay(nest_overlay) + if(ishuman(M)) + var/mob/living/carbon/human/victim = M + if(((victim.wear_mask && istype(victim.wear_mask, /obj/item/clothing/mask/facehugger)) || HAS_TRAIT(victim, TRAIT_XENO_HOST)) && victim.stat != DEAD) //If they're a host or have a facehugger currently infecting them. Must be alive. + victim.apply_status_effect(/datum/status_effect/nest_sustenance) + /obj/structure/bed/nest/post_unbuckle_mob(mob/living/M) REMOVE_TRAIT(M, TRAIT_HANDS_BLOCKED, type) M.pixel_x = M.base_pixel_x + M.body_position_pixel_x_offset M.pixel_y = M.base_pixel_y + M.body_position_pixel_y_offset M.layer = initial(M.layer) cut_overlay(nest_overlay) + M.remove_status_effect(/datum/status_effect/nest_sustenance) /obj/structure/bed/nest/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm index b1a5e8fca25..6e3d01ed39d 100644 --- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm +++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm @@ -67,6 +67,9 @@ if(ishuman(owner)) var/mob/living/carbon/human/baby_momma = owner slowdown = baby_momma.reagents.has_reagent(/datum/reagent/medicine/spaceacillin) ? 2 : 1 // spaceacillin doubles the time it takes to grow + if(owner.has_status_effect(/datum/status_effect/nest_sustenance)) + slowdown *= 0.80 //egg gestates 20% faster if you're trapped in a nest + addtimer(CALLBACK(src, PROC_REF(advance_embryo_stage)), growth_time*slowdown) /obj/item/organ/internal/body_egg/alien_embryo/egg_process() diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index bfaeb2b32be..fcb8b59c15c 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -214,6 +214,8 @@ new /obj/item/organ/internal/body_egg/alien_embryo(target) target.log_message("was impregnated by a facehugger", LOG_GAME) target.log_message("was impregnated by a facehugger", LOG_VICTIM, log_globally = FALSE) + if(target.stat != DEAD && istype(target.buckled, /obj/structure/bed/nest)) //Handles toggling the nest sustenance status effect if the user was already buckled to a nest. + target.apply_status_effect(/datum/status_effect/nest_sustenance) else target.visible_message(span_danger("[src] violates [target]'s face!"), \ diff --git a/icons/hud/screen_alert.dmi b/icons/hud/screen_alert.dmi index 1dd7b6e252e..bf2b5c2db58 100755 Binary files a/icons/hud/screen_alert.dmi and b/icons/hud/screen_alert.dmi differ