diff --git a/code/datums/ammo/xeno.dm b/code/datums/ammo/xeno.dm index 9ecc9ebf9321..a2dbe16b1fa4 100644 --- a/code/datums/ammo/xeno.dm +++ b/code/datums/ammo/xeno.dm @@ -49,7 +49,7 @@ if(!isxeno(M)) if(insta_neuro) - if(M.GetKnockDownValueNotADurationDoNotUse() < 3) // If they have less than somewhere random between 4 and 6 seconds KD left and assuming it doesnt get refreshed itnernally + if(M.GetKnockDownDuration() < 3) // Why are you not using KnockDown(3) ? Do you even know 3 is SIX seconds ? So many questions left unanswered. M.adjust_effect(1 * power, WEAKEN) return @@ -65,7 +65,7 @@ no_clothes_neuro = TRUE if(no_clothes_neuro) - if(M.GetKnockDownValueNotADurationDoNotUse() < 5) // If they have less than somewhere random between 8 and 10 seconds KD left and assuming it doesnt get refreshed itnernally + if(M.GetKnockDownDuration() < 5) // Nobody actually knows what this means. Supposedly it means less than 10 seconds. Frankly if you get locked into 10s of knockdown to begin with there are bigger issues. M.adjust_effect(1 * power, WEAKEN) // KD them a bit more M.visible_message(SPAN_DANGER("[M] falls prone.")) @@ -79,7 +79,7 @@ H.visible_message(SPAN_DANGER("[M] shrugs off the neurotoxin!")) return - if(M.GetKnockDownValueNotADurationDoNotUse() < 0.7) // basically (knocked_down && prob(90)) + if(M.GetKnockDownDuration() < 0.7) // Worth noting that the value has 0.25~0.5 resolution so this is completely stupid. Stop microdosing balance and get real M.apply_effect(0.7, WEAKEN) M.visible_message(SPAN_DANGER("[M] falls prone.")) diff --git a/code/datums/status_effects/debuffs/debuffs.dm b/code/datums/status_effects/debuffs/debuffs.dm index f74c6d0ebd29..afc556c1d788 100644 --- a/code/datums/status_effects/debuffs/debuffs.dm +++ b/code/datums/status_effects/debuffs/debuffs.dm @@ -51,10 +51,10 @@ . = ..() if(!.) return - ADD_TRAIT(owner, TRAIT_FLOORED, TRAIT_STATUS_EFFECT(id)) + owner.add_traits(list(TRAIT_FLOORED, TRAIT_IMMOBILIZED), TRAIT_STATUS_EFFECT(id)) /datum/status_effect/incapacitating/knockdown/on_remove() - REMOVE_TRAIT(owner, TRAIT_FLOORED, TRAIT_STATUS_EFFECT(id)) + owner.remove_traits(list(TRAIT_FLOORED, TRAIT_IMMOBILIZED), TRAIT_STATUS_EFFECT(id)) return ..() /atom/movable/screen/alert/status_effect/knockdown diff --git a/code/game/machinery/medical_pod/bodyscanner.dm b/code/game/machinery/medical_pod/bodyscanner.dm index bbc3be7d5aae..732ff1ba97b9 100644 --- a/code/game/machinery/medical_pod/bodyscanner.dm +++ b/code/game/machinery/medical_pod/bodyscanner.dm @@ -204,7 +204,7 @@ "toxloss" = H.getToxLoss(), "cloneloss" = H.getCloneLoss(), "brainloss" = H.getBrainLoss(), - "knocked_out" = H.GetKnockOutValueNotADurationDoNotUse(), + "knocked_out" = H.GetKnockOutDuration(), "bodytemp" = H.bodytemperature, "inaprovaline_amount" = H.reagents.get_reagent_amount("inaprovaline"), "dexalin_amount" = H.reagents.get_reagent_amount("dexalin"), @@ -263,7 +263,7 @@ s_class = occ["brainloss"] < 1 ? INTERFACE_GOOD : INTERFACE_BAD dat += "[SET_CLASS("  Approx. Brain Damage:", INTERFACE_PINK)] [SET_CLASS("[occ["brainloss"]]%", s_class)]

" - dat += "[SET_CLASS("Knocked Out Summary:", "#40628a")] [occ["knocked_out"]]% (approximately [round(occ["knocked_out"] / 5)] seconds left!)
" + dat += "[SET_CLASS("Knocked Out Summary:", "#40628a")] [occ["knocked_out"]]% (approximately [round(occ["knocked_out"] * GLOBAL_STATUS_MULTIPLIER / (1 SECONDS))] seconds left!)
" dat += "[SET_CLASS("Body Temperature:", "#40628a")] [occ["bodytemp"]-T0C]°C ([occ["bodytemp"]*1.8-459.67]°F)

" s_class = occ["blood_amount"] > 448 ? INTERFACE_OKAY : INTERFACE_BAD diff --git a/code/game/machinery/medical_pod/sleeper.dm b/code/game/machinery/medical_pod/sleeper.dm index 0694783e2081..6e7064855166 100644 --- a/code/game/machinery/medical_pod/sleeper.dm +++ b/code/game/machinery/medical_pod/sleeper.dm @@ -391,7 +391,7 @@ to_chat(user, "[]\t -Toxin Content %: []", (occupant.getToxLoss() < 60 ? SPAN_NOTICE("") : SPAN_DANGER("")), occupant.getToxLoss()) to_chat(user, "[]\t -Burn Severity %: []", (occupant.getFireLoss() < 60 ? SPAN_NOTICE("") : SPAN_DANGER("")), occupant.getFireLoss()) to_chat(user, SPAN_NOTICE(" Expected time till occupant can safely awake: (note: These times are always inaccurate)")) - to_chat(user, SPAN_NOTICE(" \t [occupant.GetKnockOutValueNotADurationDoNotUse() / 5] second\s (if around 1 or 2 the sleeper is keeping them asleep.)")) + to_chat(user, SPAN_NOTICE(" \t [occupant.GetKnockOutDuration() * GLOBAL_STATUS_MULTIPLIER / (1 SECONDS)] second\s (if around 1 or 2 the sleeper is keeping them asleep.)")) else to_chat(user, SPAN_NOTICE(" There is no one inside!")) return diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 6da5f042529a..44ffc1153fb4 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1098,9 +1098,9 @@ for(var/datum/effects/bleeding/internal/internal_bleed in effects_list) msg += "They have bloating and discoloration on their [internal_bleed.limb.display_name]\n" - if(knocked_out && stat != DEAD) + if(stat == UNCONSCIOUS) msg += "They seem to be unconscious\n" - if(stat == DEAD) + else if(stat == DEAD) if(src.check_tod() && is_revivable()) msg += "They're not breathing" else diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 2bb113d67739..94dd4264f11f 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -206,14 +206,14 @@ w_uniform.add_fingerprint(M) - if(body_position == LYING_DOWN || sleeping) + if(HAS_TRAIT(src, TRAIT_FLOORED) || HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || body_position == LYING_DOWN || sleeping) if(client) sleeping = max(0,src.sleeping-5) if(!sleeping) set_resting(FALSE) M.visible_message(SPAN_NOTICE("[M] shakes [src] trying to wake [t_him] up!"), \ SPAN_NOTICE("You shake [src] trying to wake [t_him] up!"), null, 4) - else if(stunned) + else if(HAS_TRAIT(src, TRAIT_INCAPACITATED)) M.visible_message(SPAN_NOTICE("[M] shakes [src], trying to shake [t_him] out of his stupor!"), \ SPAN_NOTICE("You shake [src], trying to shake [t_him] out of his stupor!"), null, 4) else diff --git a/code/modules/mob/living/carbon/human/life/handle_stasis_bag.dm b/code/modules/mob/living/carbon/human/life/handle_stasis_bag.dm index 16d9955395b0..43c757fabb3e 100644 --- a/code/modules/mob/living/carbon/human/life/handle_stasis_bag.dm +++ b/code/modules/mob/living/carbon/human/life/handle_stasis_bag.dm @@ -4,9 +4,9 @@ //Handle side effects from stasis switch(in_stasis) if(STASIS_IN_BAG) - // I hate whoever wrote this and statuses with a passion - knocked_down = knocked_down? --knocked_down : knocked_down + 10 //knocked_down set. - if(knocked_down <= 0) - knocked_down_callback() + // At least 6 seconds, but reduce by 2s every time - IN ADDITION to normal recovery + // Don't ask me why and feel free to change it + KnockDown(3) + AdjustKnockDown(-1) if(STASIS_IN_CRYO_CELL) if(sleeping < 10) sleeping += 10 //Puts the mob to sleep indefinitely. diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 5518680d7492..fb2bd2af0cf9 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -14,10 +14,7 @@ var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot. var/halloss = 0 //Hallucination damage. 'Fake' damage obtained through hallucinating or the holodeck. Sleeping should cause it to wear off. - // please don't use these - VAR_PROTECTED/knocked_out = 0 - VAR_PROTECTED/knocked_down = 0 - VAR_PROTECTED/stunned = 0 + // please don't use these directly, use the procs var/dazed = 0 var/slowed = 0 // X_SLOW_AMOUNT var/superslowed = 0 // X_SUPERSLOW_AMOUNT diff --git a/code/modules/mob/living/living_health_procs.dm b/code/modules/mob/living/living_health_procs.dm index 8f10aa1f7f2a..c4a16edd630d 100644 --- a/code/modules/mob/living/living_health_procs.dm +++ b/code/modules/mob/living/living_health_procs.dm @@ -493,11 +493,3 @@ return face_dir(direction) return ..() - -// Transition handlers. do NOT use this. I mean seriously don't. It's broken. Players love their broken behaviors. -/mob/living/proc/GetStunValueNotADurationDoNotUse() - return stunned -/mob/living/proc/GetKnockDownValueNotADurationDoNotUse() - return knocked_down -/mob/living/proc/GetKnockOutValueNotADurationDoNotUse() - return knocked_out diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 5b190143f5bc..7b0ee6869e80 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -34,9 +34,6 @@ // Gain Power apply_damage(-1, OXY) - // Handle EMP-stun - handle_stunned() - //stage = 1 //if (isRemoteControlling(src)) // Are we not sure what we are? var/blind = 0 diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index b4a6e59e52e2..ac031e74e11f 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -22,7 +22,7 @@ /mob/living/silicon/robot/proc/clamp_values() // set_effect(min(stunned, 30), STUN) - set_effect(min(knocked_out, 30), PARALYZE) +// set_effect(min(knocked_out, 30), PARALYZE) // set_effect(min(knocked_down, 20), WEAKEN) sleeping = 0 apply_damage(0, BRUTE) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index b59adc94b5de..cd98fa3da34f 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -853,11 +853,6 @@ note dizziness decrements automatically in the mob's Life() proc. handle_slowed() handle_superslowed() -/mob/living/proc/handle_stunned() - if(stunned) - adjust_effect(-1, STUN) - return stunned - /mob/living/proc/handle_dazed() if(dazed) adjust_effect(-1, DAZE)