refactor tags

This commit is contained in:
kevinz000
2020-01-16 20:58:00 -07:00
parent 2ba226b912
commit 9ef4cbfa76
42 changed files with 114 additions and 114 deletions

View File

@@ -14,7 +14,7 @@
if(check_click_intercept(params,A)) if(check_click_intercept(params,A))
return return
if(stat || locked_down || IsParalyzed() || _REFACTORING_IsStun() || _REFACTORING_IsUnconscious()) if(stat || locked_down || IsParalyzed() || IsStun() || IsUnconscious())
return return
var/list/modifiers = params2list(params) var/list/modifiers = params2list(params)

View File

@@ -406,7 +406,7 @@
var/mob/living/user = hud?.mymob var/mob/living/user = hud?.mymob
if(!istype(user)) if(!istype(user))
return return
if(!user._REFACTORING_resting) if(!user.resting)
icon_state = "act_rest" icon_state = "act_rest"
else else
icon_state = "act_rest0" icon_state = "act_rest0"

View File

@@ -132,7 +132,7 @@
/datum/brain_trauma/severe/narcolepsy/on_life() /datum/brain_trauma/severe/narcolepsy/on_life()
..() ..()
if(owner._REFACTORING_IsSleeping()) if(owner.IsSleeping())
return return
var/sleep_chance = 1 var/sleep_chance = 1
if(owner.m_intent == MOVE_INTENT_RUN) if(owner.m_intent == MOVE_INTENT_RUN)

View File

@@ -32,7 +32,7 @@
if(ishuman(M) && source.force && source.get_sharpness()) if(ishuman(M) && source.force && source.get_sharpness())
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
if((H.health <= H.crit_threshold || (user.pulling == H && user.grab_state >= GRAB_NECK) || H._REFACTORING_IsSleeping()) && user.zone_selected == BODY_ZONE_PRECISE_MOUTH) // Only sleeping, neck grabbed, or crit, can be sliced. if((H.health <= H.crit_threshold || (user.pulling == H && user.grab_state >= GRAB_NECK) || H.IsSleeping()) && user.zone_selected == BODY_ZONE_PRECISE_MOUTH) // Only sleeping, neck grabbed, or crit, can be sliced.
if(H.has_status_effect(/datum/status_effect/neck_slice)) if(H.has_status_effect(/datum/status_effect/neck_slice))
user.show_message("<span class='warning'>[H]'s neck has already been already cut, you can't make the bleeding any worse!</span>", 1, \ user.show_message("<span class='warning'>[H]'s neck has already been already cut, you can't make the bleeding any worse!</span>", 1, \
"<span class='warning'>Their neck has already been already cut, you can't make the bleeding any worse!</span>") "<span class='warning'>Their neck has already been already cut, you can't make the bleeding any worse!</span>")

View File

@@ -253,11 +253,11 @@
var/mob/living/M = A.affected_mob var/mob/living/M = A.affected_mob
if(HAS_TRAIT(M, TRAIT_DEATHCOMA)) if(HAS_TRAIT(M, TRAIT_DEATHCOMA))
return power return power
else if(M._REFACTORING_IsUnconscious() || M.stat == UNCONSCIOUS) else if(M.IsUnconscious() || M.stat == UNCONSCIOUS)
return power * 0.9 return power * 0.9
else if(M.stat == SOFT_CRIT) else if(M.stat == SOFT_CRIT)
return power * 0.5 return power * 0.5
else if(M._REFACTORING_IsSleeping()) else if(M.IsSleeping())
return power * 0.25 return power * 0.25
else if(M.getBruteLoss() + M.getFireLoss() >= 70 && !active_coma) else if(M.getBruteLoss() + M.getFireLoss() >= 70 && !active_coma)
to_chat(M, "<span class='warning'>You feel yourself slip into a regenerative coma...</span>") to_chat(M, "<span class='warning'>You feel yourself slip into a regenerative coma...</span>")

View File

@@ -227,7 +227,7 @@
H.visible_message("<span class='warning'>[H] collapses!</span>", \ H.visible_message("<span class='warning'>[H] collapses!</span>", \
"<span class='userdanger'>Your legs give out!</span>") "<span class='userdanger'>Your legs give out!</span>")
H.DefaultCombatKnockdown(80) H.DefaultCombatKnockdown(80)
if(H.staminaloss && !H._REFACTORING_IsSleeping()) if(H.staminaloss && !H.IsSleeping())
var/total_health = (H.health - H.staminaloss) var/total_health = (H.health - H.staminaloss)
if(total_health <= HEALTH_THRESHOLD_CRIT && !H.stat) if(total_health <= HEALTH_THRESHOLD_CRIT && !H.stat)
H.visible_message("<span class='warning'>[user] delivers a heavy hit to [H]'s head, knocking [H.p_them()] out cold!</span>", \ H.visible_message("<span class='warning'>[user] delivers a heavy hit to [H]'s head, knocking [H.p_them()] out cold!</span>", \

View File

@@ -99,7 +99,7 @@
text_gain_indication = "<span class='danger'>You twitch.</span>" text_gain_indication = "<span class='danger'>You twitch.</span>"
/datum/mutation/human/tourettes/on_life(mob/living/carbon/human/owner) /datum/mutation/human/tourettes/on_life(mob/living/carbon/human/owner)
if(prob(10) && owner.stat == CONSCIOUS && !owner._REFACTORING_IsStun()) if(prob(10) && owner.stat == CONSCIOUS && !owner.IsStun())
owner.Stun(200) owner.Stun(200)
switch(rand(1, 3)) switch(rand(1, 3))
if(1) if(1)

View File

@@ -545,7 +545,7 @@
var/obj/item/projectile/A var/obj/item/projectile/A
//any emagged turrets drains 2x power and uses a different projectile? //any emagged turrets drains 2x power and uses a different projectile?
if(mode == TURRET_STUN) if(mode == TURRET_STUN)
if(nonlethal_projectile && C && C._REFACTORING_resting) if(nonlethal_projectile && C && C.resting)
use_power(reqpower*0.5) use_power(reqpower*0.5)
A = new nonlethal_projectile(T) A = new nonlethal_projectile(T)
playsound(loc, nonlethal_projectile_sound, 75, 1) playsound(loc, nonlethal_projectile_sound, 75, 1)

View File

@@ -80,7 +80,7 @@
else else
user.visible_message("<span class='notice'>[user] hugs [M] to make [M.p_them()] feel better!</span>", \ user.visible_message("<span class='notice'>[user] hugs [M] to make [M.p_them()] feel better!</span>", \
"<span class='notice'>You hug [M] to make [M.p_them()] feel better!</span>") "<span class='notice'>You hug [M] to make [M.p_them()] feel better!</span>")
if(M._REFACTORING_resting && !M.recoveringstam) if(M.resting && !M.recoveringstam)
M.set_resting(FALSE, TRUE) M.set_resting(FALSE, TRUE)
else else
user.visible_message("<span class='notice'>[user] pets [M]!</span>", \ user.visible_message("<span class='notice'>[user] pets [M]!</span>", \

View File

@@ -14,7 +14,7 @@
return FALSE return FALSE
/mob/living/proc/StakeCanKillMe() /mob/living/proc/StakeCanKillMe()
return _REFACTORING_IsSleeping() || stat >= UNCONSCIOUS || blood_volume <= 0 || HAS_TRAIT(src, TRAIT_DEATHCOMA) // NOTE: You can't go to sleep in a coffin with a stake in you. return IsSleeping() || stat >= UNCONSCIOUS || blood_volume <= 0 || HAS_TRAIT(src, TRAIT_DEATHCOMA) // NOTE: You can't go to sleep in a coffin with a stake in you.
/obj/item/stake /obj/item/stake
name = "wooden stake" name = "wooden stake"

View File

@@ -71,7 +71,7 @@
if (rand(0, 5) < level_current) if (rand(0, 5) < level_current)
playsound(get_turf(newtarget), "sound/weapons/punch[rand(1,4)].ogg", 15, 1, -1) playsound(get_turf(newtarget), "sound/weapons/punch[rand(1,4)].ogg", 15, 1, -1)
newtarget.DefaultCombatKnockdown(10 + level_current * 5) newtarget.DefaultCombatKnockdown(10 + level_current * 5)
if(newtarget._REFACTORING_IsStun()) if(newtarget.IsStun())
newtarget.spin(10,1) newtarget.spin(10,1)
if (rand(0,4)) if (rand(0,4))
newtarget.drop_all_held_items() newtarget.drop_all_held_items()

View File

@@ -282,7 +282,7 @@
if(target.get_item_by_slot(SLOT_HEAD) != src) if(target.get_item_by_slot(SLOT_HEAD) != src)
return return
QDEL_NULL(paranoia) QDEL_NULL(paranoia)
if(!target._REFACTORING_IsUnconscious()) if(!target.IsUnconscious())
to_chat(target, "<span class='warning'>Your zealous conspirationism rapidly dissipates as the donned hat warps up into a ruined mess. All those theories starting to sound like nothing but a ridicolous fanfare.</span>") to_chat(target, "<span class='warning'>Your zealous conspirationism rapidly dissipates as the donned hat warps up into a ruined mess. All those theories starting to sound like nothing but a ridicolous fanfare.</span>")
/obj/item/clothing/head/foilhat/attack_hand(mob/user) /obj/item/clothing/head/foilhat/attack_hand(mob/user)

View File

@@ -87,7 +87,7 @@
if(istype(user)) if(istype(user))
if(to_turf) if(to_turf)
user.forceMove(to_turf) user.forceMove(to_turf)
user._REFACTORING_SetStun(0) user.SetStun(0)
user.next_move = 1 user.next_move = 1
user.alpha = 255 user.alpha = 255
user.update_atom_colour() user.update_atom_colour()

View File

@@ -146,7 +146,7 @@
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_mob(mob/living/L) /datum/proximity_monitor/advanced/timestop/proc/unfreeze_mob(mob/living/L)
escape_the_negative_zone(L) escape_the_negative_zone(L)
L._REFACTORING_AdjustStun(-20, TRUE, TRUE) L.AdjustStun(-20, TRUE, TRUE)
L.anchored = frozen_mobs[L] L.anchored = frozen_mobs[L]
frozen_mobs -= L frozen_mobs -= L
global_frozen_atoms -= L global_frozen_atoms -= L

View File

@@ -1136,7 +1136,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
set waitfor = FALSE set waitfor = FALSE
..() ..()
target.set_screwyhud(SCREWYHUD_DEAD) target.set_screwyhud(SCREWYHUD_DEAD)
target._REFACTORING_Knockdown(300) target.Knockdown(300)
target.silent += 10 target.silent += 10
to_chat(target, "<span class='deadsay'><b>[target.real_name]</b> has died at <b>[get_area_name(target)]</b>.</span>") to_chat(target, "<span class='deadsay'><b>[target.real_name]</b> has died at <b>[get_area_name(target)]</b>.</span>")
if(prob(50)) if(prob(50))
@@ -1154,7 +1154,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
"i[prob(50)?" fucking":""] hate [pick("blood cult", "clock cult", "revenants", "this round","this","myself","admins","you")]")]\"</span>") "i[prob(50)?" fucking":""] hate [pick("blood cult", "clock cult", "revenants", "this round","this","myself","admins","you")]")]\"</span>")
sleep(rand(70,90)) sleep(rand(70,90))
target.set_screwyhud(SCREWYHUD_NONE) target.set_screwyhud(SCREWYHUD_NONE)
target._REFACTORING_SetKnockdown(0) target.SetKnockdown(0)
target.silent = FALSE target.silent = FALSE
qdel(src) qdel(src)

View File

@@ -4,7 +4,7 @@
for(var/I in overlays_standing) for(var/I in overlays_standing)
add_overlay(I) add_overlay(I)
var/asleep = _REFACTORING_IsSleeping() var/asleep = IsSleeping()
if(stat == DEAD) if(stat == DEAD)
//If we mostly took damage from fire //If we mostly took damage from fire
if(fireloss > 125) if(fireloss > 125)

View File

@@ -18,7 +18,7 @@
if(health<= -maxHealth || !getorgan(/obj/item/organ/brain)) if(health<= -maxHealth || !getorgan(/obj/item/organ/brain))
death() death()
return return
if(_REFACTORING_IsUnconscious() || _REFACTORING_IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || health <= crit_threshold) if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || health <= crit_threshold)
if(stat == CONSCIOUS) if(stat == CONSCIOUS)
stat = UNCONSCIOUS stat = UNCONSCIOUS
blind_eyes(1) blind_eyes(1)

View File

@@ -14,9 +14,9 @@
icon_state = "larva[state]_dead" icon_state = "larva[state]_dead"
else if(handcuffed || legcuffed) //This should be an overlay. Who made this an icon_state? else if(handcuffed || legcuffed) //This should be an overlay. Who made this an icon_state?
icon_state = "larva[state]_cuff" icon_state = "larva[state]_cuff"
else if(stat == UNCONSCIOUS || lying || _REFACTORING_resting) else if(stat == UNCONSCIOUS || lying || resting)
icon_state = "larva[state]_sleep" icon_state = "larva[state]_sleep"
else if(_REFACTORING_IsStun() || IsParalyzed()) else if(IsStun() || IsParalyzed())
icon_state = "larva[state]_stun" icon_state = "larva[state]_stun"
else else
icon_state = "larva[state]" icon_state = "larva[state]"

View File

@@ -803,7 +803,7 @@
if(health <= HEALTH_THRESHOLD_DEAD && !HAS_TRAIT(src, TRAIT_NODEATH)) if(health <= HEALTH_THRESHOLD_DEAD && !HAS_TRAIT(src, TRAIT_NODEATH))
death() death()
return return
if(_REFACTORING_IsUnconscious() || _REFACTORING_IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || (health <= HEALTH_THRESHOLD_FULLCRIT && !HAS_TRAIT(src, TRAIT_NOHARDCRIT))) if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || (health <= HEALTH_THRESHOLD_FULLCRIT && !HAS_TRAIT(src, TRAIT_NOHARDCRIT)))
stat = UNCONSCIOUS stat = UNCONSCIOUS
blind_eyes(1) blind_eyes(1)
if(combatmode) if(combatmode)
@@ -965,7 +965,7 @@
return FALSE return FALSE
if(hallucinating()) if(hallucinating())
return TRUE return TRUE
if(_REFACTORING_IsSleeping()) if(IsSleeping())
return TRUE return TRUE
if(HAS_TRAIT(src, TRAIT_DUMB)) if(HAS_TRAIT(src, TRAIT_DUMB))
return TRUE return TRUE

View File

@@ -79,7 +79,7 @@
visible_message("<span class='danger'>[M] has attempted to punch [name]!</span>", \ visible_message("<span class='danger'>[M] has attempted to punch [name]!</span>", \
"<span class='userdanger'>[M] has attempted to punch [name]!</span>", null, COMBAT_MESSAGE_RANGE) "<span class='userdanger'>[M] has attempted to punch [name]!</span>", null, COMBAT_MESSAGE_RANGE)
if(INTENT_DISARM) if(INTENT_DISARM)
if(!_REFACTORING_IsUnconscious()) if(!IsUnconscious())
M.do_attack_animation(src, ATTACK_EFFECT_DISARM) M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
if (prob(25)) if (prob(25))
DefaultCombatKnockdown(40) DefaultCombatKnockdown(40)

View File

@@ -416,7 +416,7 @@
set name = "Sleep" set name = "Sleep"
set category = "IC" set category = "IC"
if(_REFACTORING_IsSleeping()) if(IsSleeping())
to_chat(src, "<span class='notice'>You are already sleeping.</span>") to_chat(src, "<span class='notice'>You are already sleeping.</span>")
return return
else else
@@ -674,7 +674,7 @@
if(on_fire) if(on_fire)
resist_fire() //stop, drop, and roll resist_fire() //stop, drop, and roll
return return
if(_REFACTORING_resting) //cit change - allows resisting out of resting if(resting) //cit change - allows resisting out of resting
resist_a_rest() // ditto resist_a_rest() // ditto
return return
if(resist_embedded()) //Citadel Change for embedded removal memes if(resist_embedded()) //Citadel Change for embedded removal memes

View File

@@ -2,9 +2,9 @@
//Force-set resting variable, without needing to resist/etc. //Force-set resting variable, without needing to resist/etc.
/mob/living/proc/set_resting(new_resting, silent = FALSE, updating = TRUE) /mob/living/proc/set_resting(new_resting, silent = FALSE, updating = TRUE)
_REFACTORING_resting = new_resting resting = new_resting
if(!silent) if(!silent)
to_chat(src, "<span class='notice'>You are now [_REFACTORING_resting? "resting" : "getting up"].</span>") to_chat(src, "<span class='notice'>You are now [resting? "resting" : "getting up"].</span>")
update_resting(updating) update_resting(updating)
/mob/living/proc/update_resting(update_mobility = TRUE) /mob/living/proc/update_resting(update_mobility = TRUE)
@@ -25,20 +25,20 @@
set category = "IC" set category = "IC"
if(client?.prefs?.autostand) if(client?.prefs?.autostand)
intentionalresting = !intentionalresting intentionalresting = !intentionalresting
to_chat(src, "<span class='notice'>You are now attempting to [intentionalresting ? "[!_REFACTORING_resting ? "lay down and ": ""]stay down" : "[_REFACTORING_resting ? "get up and ": ""]stay up"].</span>") to_chat(src, "<span class='notice'>You are now attempting to [intentionalresting ? "[!resting ? "lay down and ": ""]stay down" : "[resting ? "get up and ": ""]stay up"].</span>")
if(intentionalresting && !_REFACTORING_resting) if(intentionalresting && !resting)
set_resting(TRUE, FALSE) set_resting(TRUE, FALSE)
else else
resist_a_rest() resist_a_rest()
else else
if(!_REFACTORING_resting) if(!resting)
set_resting(TRUE, FALSE) set_resting(TRUE, FALSE)
to_chat(src, "<span class='notice'>You are now laying down.</span>") to_chat(src, "<span class='notice'>You are now laying down.</span>")
else else
resist_a_rest() resist_a_rest()
/mob/living/proc/resist_a_rest(automatic = FALSE, ignoretimer = FALSE) //Lets mobs resist out of resting. Major QOL change with combat reworks. /mob/living/proc/resist_a_rest(automatic = FALSE, ignoretimer = FALSE) //Lets mobs resist out of resting. Major QOL change with combat reworks.
if(!_REFACTORING_resting || stat || attemptingstandup) if(!resting || stat || attemptingstandup)
return FALSE return FALSE
if(ignoretimer) if(ignoretimer)
set_resting(FALSE, FALSE) set_resting(FALSE, FALSE)
@@ -84,20 +84,20 @@
var/stat_softcrit = stat == SOFT_CRIT var/stat_softcrit = stat == SOFT_CRIT
var/stat_conscious = (stat == CONSCIOUS) || stat_softcrit var/stat_conscious = (stat == CONSCIOUS) || stat_softcrit
var/conscious = !_REFACTORING_IsUnconscious() && stat_conscious && !HAS_TRAIT(src, TRAIT_DEATHCOMA) var/conscious = !IsUnconscious() && stat_conscious && !HAS_TRAIT(src, TRAIT_DEATHCOMA)
var/has_arms = get_num_arms() var/has_arms = get_num_arms()
var/has_legs = get_num_legs() var/has_legs = get_num_legs()
var/ignore_legs = get_leg_ignore() var/ignore_legs = get_leg_ignore()
var/stun = _REFACTORING_IsStun() var/stun = IsStun()
var/paralyze = IsParalyzed() var/paralyze = IsParalyzed()
var/knockdown = _REFACTORING_IsKnockdown() var/knockdown = IsKnockdown()
var/daze = IsDazed() var/daze = IsDazed()
var/immobilize = IsImmobilized() var/immobilize = IsImmobilized()
var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK
var/restrained = restrained() var/restrained = restrained()
var/pinned = _REFACTORING_resting && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE // Cit change - adds pinning for aggressive-grabbing people on the ground var/pinned = resting && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE // Cit change - adds pinning for aggressive-grabbing people on the ground
var/canmove = !immobilize && !stun && conscious && !paralyze && !buckled && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && (has_arms || ignore_legs || has_legs) && !pinned && !recoveringstam var/canmove = !immobilize && !stun && conscious && !paralyze && !buckled && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && (has_arms || ignore_legs || has_legs) && !pinned && !recoveringstam
if(canmove) if(canmove)
@@ -105,7 +105,7 @@
else else
mobility_flags &= ~MOBILITY_MOVE mobility_flags &= ~MOBILITY_MOVE
var/canstand_involuntary = conscious && !stat_softcrit && !knockdown && !chokehold && !paralyze && (ignore_legs || has_legs) && !(buckled && buckled.buckle_lying) || !recoveringstam var/canstand_involuntary = conscious && !stat_softcrit && !knockdown && !chokehold && !paralyze && (ignore_legs || has_legs) && !(buckled && buckled.buckle_lying) || !recoveringstam
var/canstand = canstand_involuntary && !_REFACTORING_resting var/canstand = canstand_involuntary && !resting
var/should_be_lying = !canstand var/should_be_lying = !canstand
if(buckled) if(buckled)

View File

@@ -100,7 +100,7 @@
/mob/living/silicon/pai/lay_down() /mob/living/silicon/pai/lay_down()
. = ..() . = ..()
if(loc != card) if(loc != card)
visible_message("<span class='notice'>[src] [_REFACTORING_resting? "lays down for a moment..." : "perks up from the ground"]</span>") visible_message("<span class='notice'>[src] [resting? "lays down for a moment..." : "perks up from the ground"]</span>")
update_icon() update_icon()
/mob/living/silicon/pai/start_pulling(atom/movable/AM, gs) /mob/living/silicon/pai/start_pulling(atom/movable/AM, gs)

View File

@@ -7,7 +7,7 @@
icon = dynamic_chassis_icons[dynamic_chassis] icon = dynamic_chassis_icons[dynamic_chassis]
var/list/states = icon_states(icon) var/list/states = icon_states(icon)
icon_state = "" icon_state = ""
if(_REFACTORING_resting) //The next line is some bullshit but I can make it worse if you want and make it a single line instead of four.. :) if(resting) //The next line is some bullshit but I can make it worse if you want and make it a single line instead of four.. :)
if(dynamic_chassis_sit && ("sit") in states) if(dynamic_chassis_sit && ("sit") in states)
icon_state = "sit" icon_state = "sit"
else if(dynamic_chassis_bellyup && ("bellyup") in states) else if(dynamic_chassis_bellyup && ("bellyup") in states)
@@ -21,7 +21,7 @@
rotate_on_lying = TRUE rotate_on_lying = TRUE
else else
icon = initial(icon) icon = initial(icon)
icon_state = "[chassis][_REFACTORING_resting? "_rest" : (stat == DEAD? "_dead" : "")]" icon_state = "[chassis][resting? "_rest" : (stat == DEAD? "_dead" : "")]"
rotate_on_lying = FALSE rotate_on_lying = FALSE
pixel_x = ((chassis == "dynamic") && chassis_pixel_offsets_x[dynamic_chassis]) || 0 pixel_x = ((chassis == "dynamic") && chassis_pixel_offsets_x[dynamic_chassis]) || 0
update_transform() update_transform()

View File

@@ -675,7 +675,7 @@
if(module.cyborg_base_icon == "robot") if(module.cyborg_base_icon == "robot")
icon = 'icons/mob/robots.dmi' icon = 'icons/mob/robots.dmi'
pixel_x = initial(pixel_x) pixel_x = initial(pixel_x)
if(stat != DEAD && !(_REFACTORING_IsUnconscious() ||_REFACTORING_IsStun() || _REFACTORING_IsKnockdown() || IsParalyzed() || low_power_mode)) //Not dead, not stunned. if(stat != DEAD && !(IsUnconscious() ||IsStun() || IsKnockdown() || IsParalyzed() || low_power_mode)) //Not dead, not stunned.
if(!eye_lights) if(!eye_lights)
eye_lights = new() eye_lights = new()
if(lamp_intensity > 2) if(lamp_intensity > 2)
@@ -699,7 +699,7 @@
update_fire() update_fire()
if(client && stat != DEAD && module.dogborg == TRUE) if(client && stat != DEAD && module.dogborg == TRUE)
if(_REFACTORING_resting) if(resting)
if(sitting) if(sitting)
icon_state = "[module.cyborg_base_icon]-sit" icon_state = "[module.cyborg_base_icon]-sit"
if(bellyup) if(bellyup)
@@ -1020,7 +1020,7 @@
if(health <= -maxHealth) //die only once if(health <= -maxHealth) //die only once
death() death()
return return
if(_REFACTORING_IsUnconscious() || _REFACTORING_IsStun() || IsParalyzed() || getOxyLoss() > maxHealth*0.5) if(IsUnconscious() || IsStun() || IsParalyzed() || getOxyLoss() > maxHealth*0.5)
if(stat == CONSCIOUS) if(stat == CONSCIOUS)
stat = UNCONSCIOUS stat = UNCONSCIOUS
blind_eyes(1) blind_eyes(1)
@@ -1271,7 +1271,7 @@
/mob/living/silicon/robot/update_mobility() /mob/living/silicon/robot/update_mobility()
. = ..() . = ..()
if(client && stat != DEAD && dogborg == FALSE) if(client && stat != DEAD && dogborg == FALSE)
if(_REFACTORING_resting) if(resting)
cut_overlays() cut_overlays()
icon_state = "[module.cyborg_base_icon]-rest" icon_state = "[module.cyborg_base_icon]-rest"
else else

View File

@@ -136,7 +136,7 @@
/mob/living/silicon/robot/proc/beep_boop_rogue_bot(mob/user) /mob/living/silicon/robot/proc/beep_boop_rogue_bot(mob/user)
SetEmagged(1) SetEmagged(1)
_REFACTORING_SetStun(60) //Borgs were getting into trouble because they would attack the emagger before the new laws were shown SetStun(60) //Borgs were getting into trouble because they would attack the emagger before the new laws were shown
lawupdate = 0 lawupdate = 0
connected_ai = null connected_ai = null
message_admins("[ADMIN_LOOKUPFLW(user)] emagged cyborg [ADMIN_LOOKUPFLW(src)]. Laws overridden.") message_admins("[ADMIN_LOOKUPFLW(user)] emagged cyborg [ADMIN_LOOKUPFLW(src)]. Laws overridden.")

View File

@@ -1,7 +1,7 @@
/mob/living/silicon/robot/update_mobility() /mob/living/silicon/robot/update_mobility()
var/newflags = NONE var/newflags = NONE
if(!stat) if(!stat)
if(!_REFACTORING_resting) if(!resting)
newflags |= MOBILITY_STAND newflags |= MOBILITY_STAND
if(!locked_down) if(!locked_down)
newflags |= MOBILITY_MOVE newflags |= MOBILITY_MOVE

View File

@@ -170,7 +170,7 @@
if(!..()) if(!..())
return return
if(_REFACTORING_IsStun() || IsParalyzed()) if(IsStun() || IsParalyzed())
old_target_fire = target_fire old_target_fire = target_fire
target_fire = null target_fire = null
mode = BOT_IDLE mode = BOT_IDLE
@@ -287,7 +287,7 @@
if(!on) if(!on)
icon_state = "firebot0" icon_state = "firebot0"
return return
if(_REFACTORING_IsStun() || IsParalyzed()) if(IsStun() || IsParalyzed())
icon_state = "firebots1" icon_state = "firebots1"
else if(stationary_mode) //Bot has yellow light to indicate stationary mode. else if(stationary_mode) //Bot has yellow light to indicate stationary mode.
icon_state = "firebots1" icon_state = "firebots1"

View File

@@ -149,7 +149,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
if (emagged <= 1) if (emagged <= 1)
honk_attack(A) honk_attack(A)
else else
if(!C._REFACTORING_IsStun() || arrest_type) if(!C.IsStun() || arrest_type)
stun_attack(A) stun_attack(A)
..() ..()
else if (!spam_flag) //honking at the ground else if (!spam_flag) //honking at the ground

View File

@@ -86,7 +86,7 @@
if(!on) if(!on)
icon_state = "medibot0" icon_state = "medibot0"
return return
if(_REFACTORING_IsStun()) if(IsStun())
icon_state = "medibota" icon_state = "medibota"
return return
if(mode == BOT_HEALING) if(mode == BOT_HEALING)
@@ -278,7 +278,7 @@
if(mode == BOT_HEALING) if(mode == BOT_HEALING)
return return
if(_REFACTORING_IsStun()) if(IsStun())
oldpatient = patient oldpatient = patient
patient = null patient = null
mode = BOT_IDLE mode = BOT_IDLE

View File

@@ -180,7 +180,7 @@
collar_type = "[initial(collar_type)]_sit" collar_type = "[initial(collar_type)]_sit"
set_resting(TRUE) set_resting(TRUE)
else if (prob(1)) else if (prob(1))
if (_REFACTORING_resting) if (resting)
emote("me", EMOTE_VISIBLE, pick("gets up and meows.", "walks around.", "stops resting.")) emote("me", EMOTE_VISIBLE, pick("gets up and meows.", "walks around.", "stops resting."))
icon_state = "[icon_living]" icon_state = "[icon_living]"
collar_type = "[initial(collar_type)]" collar_type = "[initial(collar_type)]"

View File

@@ -26,7 +26,7 @@
..() ..()
//CRAB movement //CRAB movement
if(!ckey && !stat) if(!ckey && !stat)
if(isturf(loc) && !_REFACTORING_resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc. if(isturf(loc) && !resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc.
turns_since_move++ turns_since_move++
if(turns_since_move >= turns_per_move) if(turns_since_move >= turns_per_move)
var/east_vs_west = pick(4,8) var/east_vs_west = pick(4,8)

View File

@@ -418,7 +418,7 @@
..() ..()
/mob/living/simple_animal/update_mobility(value_otherwise = MOBILITY_FLAGS_DEFAULT) /mob/living/simple_animal/update_mobility(value_otherwise = MOBILITY_FLAGS_DEFAULT)
if(_REFACTORING_IsUnconscious() || _REFACTORING_IsStun() || IsParalyzed() || stat || _REFACTORING_resting) if(IsUnconscious() || IsStun() || IsParalyzed() || stat || resting)
drop_all_held_items() drop_all_held_items()
mobility_flags = NONE mobility_flags = NONE
else if(buckled) else if(buckled)

View File

@@ -22,11 +22,11 @@
////////////////////////////// STUN //////////////////////////////////// ////////////////////////////// STUN ////////////////////////////////////
/mob/living/proc/_REFACTORING_IsStun() //If we're stunned /mob/living/proc/IsStun() //If we're stunned
return has_status_effect(STATUS_EFFECT_STUN) return has_status_effect(STATUS_EFFECT_STUN)
/mob/living/proc/_REFACTORING_AmountStun() //How many deciseconds remain in our stun /mob/living/proc/AmountStun() //How many deciseconds remain in our stun
var/datum/status_effect/incapacitating/stun/S = _REFACTORING_IsStun() var/datum/status_effect/incapacitating/stun/S = IsStun()
if(S) if(S)
return S.duration - world.time return S.duration - world.time
return 0 return 0
@@ -37,18 +37,18 @@
if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun)) if(absorb_stun(amount, ignore_canstun))
return return
var/datum/status_effect/incapacitating/stun/S = _REFACTORING_IsStun() var/datum/status_effect/incapacitating/stun/S = IsStun()
if(S) if(S)
S.duration = max(world.time + amount, S.duration) S.duration = max(world.time + amount, S.duration)
else if(amount > 0) else if(amount > 0)
S = apply_status_effect(STATUS_EFFECT_STUN, amount, updating) S = apply_status_effect(STATUS_EFFECT_STUN, amount, updating)
return S return S
/mob/living/proc/_REFACTORING_SetStun(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration /mob/living/proc/SetStun(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STUN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STUN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return return
if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/stun/S = _REFACTORING_IsStun() var/datum/status_effect/incapacitating/stun/S = IsStun()
if(amount <= 0) if(amount <= 0)
if(S) if(S)
qdel(S) qdel(S)
@@ -61,13 +61,13 @@
S = apply_status_effect(STATUS_EFFECT_STUN, amount, updating) S = apply_status_effect(STATUS_EFFECT_STUN, amount, updating)
return S return S
/mob/living/proc/_REFACTORING_AdjustStun(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration /mob/living/proc/AdjustStun(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STUN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STUN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return return
if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun)) if(absorb_stun(amount, ignore_canstun))
return return
var/datum/status_effect/incapacitating/stun/S = _REFACTORING_IsStun() var/datum/status_effect/incapacitating/stun/S = IsStun()
if(S) if(S)
S.duration += amount S.duration += amount
else if(amount > 0) else if(amount > 0)
@@ -76,33 +76,33 @@
///////////////////////////////// KNOCKDOWN ///////////////////////////////////// ///////////////////////////////// KNOCKDOWN /////////////////////////////////////
/mob/living/proc/_REFACTORING_IsKnockdown() //If we're knocked down /mob/living/proc/IsKnockdown() //If we're knocked down
return has_status_effect(STATUS_EFFECT_KNOCKDOWN) return has_status_effect(STATUS_EFFECT_KNOCKDOWN)
/mob/living/proc/_REFACTORING_AmountKnockdown() //How many deciseconds remain in our knockdown /mob/living/proc/AmountKnockdown() //How many deciseconds remain in our knockdown
var/datum/status_effect/incapacitating/knockdown/K = _REFACTORING_IsKnockdown() var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(K) if(K)
return K.duration - world.time return K.duration - world.time
return 0 return 0
/mob/living/proc/_REFACTORING_Knockdown(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration /mob/living/proc/Knockdown(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun)) if(absorb_stun(amount, ignore_canstun))
return return
var/datum/status_effect/incapacitating/knockdown/K = _REFACTORING_IsKnockdown() var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(K) if(K)
K.duration = max(world.time + amount, K.duration) K.duration = max(world.time + amount, K.duration)
else if(amount > 0) else if(amount > 0)
K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating) K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating)
return K return K
/mob/living/proc/_REFACTORING_SetKnockdown(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration /mob/living/proc/SetKnockdown(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/knockdown/K = _REFACTORING_IsKnockdown() var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(amount <= 0) if(amount <= 0)
if(K) if(K)
qdel(K) qdel(K)
@@ -115,13 +115,13 @@
K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating) K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating)
return K return K
/mob/living/proc/_REFACTORING_AdjustKnockdown(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration /mob/living/proc/AdjustKnockdown(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun)) if(absorb_stun(amount, ignore_canstun))
return return
var/datum/status_effect/incapacitating/knockdown/K = _REFACTORING_IsKnockdown() var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(K) if(K)
K.duration += amount K.duration += amount
else if(amount > 0) else if(amount > 0)
@@ -290,7 +290,7 @@
//Blanket //Blanket
/mob/living/proc/AllImmobility(amount, updating, ignore_canstun = FALSE) /mob/living/proc/AllImmobility(amount, updating, ignore_canstun = FALSE)
Paralyze(amount, FALSE, ignore_canstun) Paralyze(amount, FALSE, ignore_canstun)
_REFACTORING_Knockdown(amount, FALSE, ignore_canstun) Knockdown(amount, FALSE, ignore_canstun)
Stun(amount, FALSE, ignore_canstun) Stun(amount, FALSE, ignore_canstun)
Immobilize(amount, FALSE, ignore_canstun) Immobilize(amount, FALSE, ignore_canstun)
Daze(amount, FALSE, ignore_canstun) Daze(amount, FALSE, ignore_canstun)
@@ -299,8 +299,8 @@
/mob/living/proc/SetAllImmobility(amount, updating, ignore_canstun = FALSE) /mob/living/proc/SetAllImmobility(amount, updating, ignore_canstun = FALSE)
SetParalyzed(amount, FALSE, ignore_canstun) SetParalyzed(amount, FALSE, ignore_canstun)
_REFACTORING_SetKnockdown(amount, FALSE, ignore_canstun) SetKnockdown(amount, FALSE, ignore_canstun)
_REFACTORING_SetStun(amount, FALSE, ignore_canstun) SetStun(amount, FALSE, ignore_canstun)
SetImmobilized(amount, FALSE, ignore_canstun) SetImmobilized(amount, FALSE, ignore_canstun)
SetDazed(amount, FALSE, ignore_canstun) SetDazed(amount, FALSE, ignore_canstun)
if(updating) if(updating)
@@ -308,8 +308,8 @@
/mob/living/proc/AdjustAllImmobility(amount, updating, ignore_canstun = FALSE) /mob/living/proc/AdjustAllImmobility(amount, updating, ignore_canstun = FALSE)
AdjustParalyzed(amount, FALSE, ignore_canstun) AdjustParalyzed(amount, FALSE, ignore_canstun)
_REFACTORING_AdjustKnockdown(amount, FALSE, ignore_canstun) AdjustKnockdown(amount, FALSE, ignore_canstun)
_REFACTORING_AdjustStun(amount, FALSE, ignore_canstun) AdjustStun(amount, FALSE, ignore_canstun)
AdjustImmobilized(amount, FALSE, ignore_canstun) AdjustImmobilized(amount, FALSE, ignore_canstun)
AdjustDazed(amount, FALSE, ignore_canstun) AdjustDazed(amount, FALSE, ignore_canstun)
if(updating) if(updating)
@@ -317,10 +317,10 @@
/// Makes sure all 5 of the non-knockout immobilizing status effects are lower or equal to amount. /// Makes sure all 5 of the non-knockout immobilizing status effects are lower or equal to amount.
/mob/living/proc/HealAllImmobilityUpTo(amount, updating, ignore_canstun = FALSE) /mob/living/proc/HealAllImmobilityUpTo(amount, updating, ignore_canstun = FALSE)
if(_REFACTORING_AmountStun() > amount) if(AmountStun() > amount)
_REFACTORING_SetStun(amount, FALSE, ignore_canstun) SetStun(amount, FALSE, ignore_canstun)
if(_REFACTORING_AmountKnockdown() > amount) if(AmountKnockdown() > amount)
_REFACTORING_SetKnockdown(amount, FALSE, ignore_canstun) SetKnockdown(amount, FALSE, ignore_canstun)
if(AmountParalyzed() > amount) if(AmountParalyzed() > amount)
SetParalyzed(amount, FALSE, ignore_canstun) SetParalyzed(amount, FALSE, ignore_canstun)
if(AmountImmobilized() > amount) if(AmountImmobilized() > amount)
@@ -331,14 +331,14 @@
update_mobility() update_mobility()
/mob/living/proc/HighestImmobilityAmount() /mob/living/proc/HighestImmobilityAmount()
return max(max(max(max(_REFACTORING_AmountStun(), _REFACTORING_AmountKnockdown()), AmountParalyzed()), AmountImmobilized()), AmountDazed()) return max(max(max(max(AmountStun(), AmountKnockdown()), AmountParalyzed()), AmountImmobilized()), AmountDazed())
//////////////////UNCONSCIOUS //////////////////UNCONSCIOUS
/mob/living/proc/_REFACTORING_IsUnconscious() //If we're unconscious /mob/living/proc/IsUnconscious() //If we're unconscious
return has_status_effect(STATUS_EFFECT_UNCONSCIOUS) return has_status_effect(STATUS_EFFECT_UNCONSCIOUS)
/mob/living/proc/AmountUnconscious() //How many deciseconds remain in our unconsciousness /mob/living/proc/AmountUnconscious() //How many deciseconds remain in our unconsciousness
var/datum/status_effect/incapacitating/unconscious/U = _REFACTORING_IsUnconscious() var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
if(U) if(U)
return U.duration - world.time return U.duration - world.time
return 0 return 0
@@ -347,7 +347,7 @@
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return return
if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/unconscious/U = _REFACTORING_IsUnconscious() var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
if(U) if(U)
U.duration = max(world.time + amount, U.duration) U.duration = max(world.time + amount, U.duration)
else if(amount > 0) else if(amount > 0)
@@ -358,7 +358,7 @@
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return return
if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/unconscious/U = _REFACTORING_IsUnconscious() var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
if(amount <= 0) if(amount <= 0)
if(U) if(U)
qdel(U) qdel(U)
@@ -372,7 +372,7 @@
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return return
if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/unconscious/U = _REFACTORING_IsUnconscious() var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
if(U) if(U)
U.duration += amount U.duration += amount
else if(amount > 0) else if(amount > 0)
@@ -381,11 +381,11 @@
/////////////////////////////////// SLEEPING //////////////////////////////////// /////////////////////////////////// SLEEPING ////////////////////////////////////
/mob/living/proc/_REFACTORING_IsSleeping() //If we're asleep /mob/living/proc/IsSleeping() //If we're asleep
return has_status_effect(STATUS_EFFECT_SLEEPING) return has_status_effect(STATUS_EFFECT_SLEEPING)
/mob/living/proc/AmountSleeping() //How many deciseconds remain in our sleep /mob/living/proc/AmountSleeping() //How many deciseconds remain in our sleep
var/datum/status_effect/incapacitating/sleeping/S = _REFACTORING_IsSleeping() var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(S) if(S)
return S.duration - world.time return S.duration - world.time
return 0 return 0
@@ -394,7 +394,7 @@
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return return
if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_canstun) if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/sleeping/S = _REFACTORING_IsSleeping() var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(S) if(S)
S.duration = max(world.time + amount, S.duration) S.duration = max(world.time + amount, S.duration)
else if(amount > 0) else if(amount > 0)
@@ -405,7 +405,7 @@
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return return
if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_canstun) if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/sleeping/S = _REFACTORING_IsSleeping() var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(amount <= 0) if(amount <= 0)
if(S) if(S)
qdel(S) qdel(S)
@@ -419,7 +419,7 @@
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return return
if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_canstun) if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/sleeping/S = _REFACTORING_IsSleeping() var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(S) if(S)
S.duration += amount S.duration += amount
else if(amount > 0) else if(amount > 0)

View File

@@ -34,7 +34,7 @@
var/eye_blurry = 0 //Carbon var/eye_blurry = 0 //Carbon
var/real_name = null var/real_name = null
var/spacewalk = FALSE var/spacewalk = FALSE
var/_REFACTORING_resting = 0 //Carbon var/resting = 0 //Carbon
var/lying = 0 var/lying = 0
var/lying_prev = 0 var/lying_prev = 0

View File

@@ -1898,7 +1898,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/between_the_sheets/on_mob_life(mob/living/L) /datum/reagent/consumable/ethanol/between_the_sheets/on_mob_life(mob/living/L)
..() ..()
if(L._REFACTORING_IsSleeping()) if(L.IsSleeping())
if(L.bruteloss && L.fireloss) //If you are damaged by both types, slightly increased healing but it only heals one. The more the merrier wink wink. if(L.bruteloss && L.fireloss) //If you are damaged by both types, slightly increased healing but it only heals one. The more the merrier wink wink.
if(prob(50)) if(prob(50))
L.adjustBruteLoss(-0.25) L.adjustBruteLoss(-0.25)

View File

@@ -465,7 +465,7 @@
M.drowsyness = max(M.drowsyness-5, 0) M.drowsyness = max(M.drowsyness-5, 0)
M.AdjustUnconscious(-60, FALSE) M.AdjustUnconscious(-60, FALSE)
M.AdjustAllImmobility(-30, FALSE) M.AdjustAllImmobility(-30, FALSE)
M._REFACTORING_AdjustKnockdown(-40, FALSE) M.AdjustKnockdown(-40, FALSE)
M.adjustStaminaLoss(-15, FALSE) M.adjustStaminaLoss(-15, FALSE)
M.adjustToxLoss(-5, FALSE, TRUE) M.adjustToxLoss(-5, FALSE, TRUE)
M.adjustOxyLoss(-3, FALSE) M.adjustOxyLoss(-3, FALSE)
@@ -474,7 +474,7 @@
if(iscultist(M)) if(iscultist(M))
M.AdjustUnconscious(1, FALSE) M.AdjustUnconscious(1, FALSE)
M.AdjustAllImmobility(10, FALSE) M.AdjustAllImmobility(10, FALSE)
M._REFACTORING_AdjustKnockdown(10, FALSE) M.AdjustKnockdown(10, FALSE)
M.adjustStaminaLoss(15, FALSE) M.adjustStaminaLoss(15, FALSE)
else else
M.adjustToxLoss(3, FALSE) M.adjustToxLoss(3, FALSE)

View File

@@ -377,9 +377,9 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
if("oxyloss") if("oxyloss")
target.adjustOxyLoss(amount) target.adjustOxyLoss(amount)
if("stun") if("stun")
target._REFACTORING_AdjustStun(amount) target.AdjustStun(amount)
if("knockdown") if("knockdown")
target._REFACTORING_AdjustKnockdown(amount) target.AdjustKnockdown(amount)
if("unconscious") if("unconscious")
target.AdjustUnconscious(amount) target.AdjustUnconscious(amount)
else else

View File

@@ -491,7 +491,7 @@
cooldown = COOLDOWN_DAMAGE //because stun removal cooldown = COOLDOWN_DAMAGE //because stun removal
for(var/V in listeners) for(var/V in listeners)
var/mob/living/L = V var/mob/living/L = V
if(L._REFACTORING_resting) if(L.resting)
L.set_resting(FALSE, FALSE, FALSE) L.set_resting(FALSE, FALSE, FALSE)
L.SetAllImmobility(0, FALSE) L.SetAllImmobility(0, FALSE)
L.SetUnconscious(0, FALSE) //i said get up i don't care if you're being tased L.SetUnconscious(0, FALSE) //i said get up i don't care if you're being tased
@@ -1114,7 +1114,7 @@
if(HAS_TRAIT(H, TRAIT_NYMPHO) && H.canbearoused && E.lewd) // probably a redundant check but for good measure if(HAS_TRAIT(H, TRAIT_NYMPHO) && H.canbearoused && E.lewd) // probably a redundant check but for good measure
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, H, "<span class='love'>Your [E.enthrallGender] pushes you over the limit, overwhelming your body with pleasure.</b></span>"), 5) addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, H, "<span class='love'>Your [E.enthrallGender] pushes you over the limit, overwhelming your body with pleasure.</b></span>"), 5)
H.mob_climax(forced_climax=TRUE) H.mob_climax(forced_climax=TRUE)
H._REFACTORING_SetStun(20) H.SetStun(20)
H.setArousalLoss(H.min_arousal) H.setArousalLoss(H.min_arousal)
E.resistanceTally = 0 //makes resistance 0, but resets arousal, resistance buildup is faster unaroused (massively so). E.resistanceTally = 0 //makes resistance 0, but resets arousal, resistance buildup is faster unaroused (massively so).
E.enthrallTally += power_multiplier E.enthrallTally += power_multiplier
@@ -1253,8 +1253,8 @@
continue continue
else else
user.emote("me", EMOTE_VISIBLE, "puts their hands upon [H.name]'s head and looks deep into their eyes, whispering something to them.") user.emote("me", EMOTE_VISIBLE, "puts their hands upon [H.name]'s head and looks deep into their eyes, whispering something to them.")
user._REFACTORING_SetStun(1000)//Hands are handy, so you have to stay still user.SetStun(1000)//Hands are handy, so you have to stay still
H._REFACTORING_SetStun(1000) H.SetStun(1000)
if (E.mental_capacity >= 5) if (E.mental_capacity >= 5)
var/trigger = html_decode(stripped_input(user, "Enter the trigger phrase", MAX_MESSAGE_LEN)) var/trigger = html_decode(stripped_input(user, "Enter the trigger phrase", MAX_MESSAGE_LEN))
var/custom_words_words_list = list("Speak", "Echo", "Shock", "Cum", "Kneel", "Strip", "Trance", "Cancel") var/custom_words_words_list = list("Speak", "Echo", "Shock", "Cum", "Kneel", "Strip", "Trance", "Cancel")
@@ -1277,8 +1277,8 @@
to_chat(user, "<span class='warning'>Your pet looks at you confused, it seems they don't understand that effect!</b></span>") to_chat(user, "<span class='warning'>Your pet looks at you confused, it seems they don't understand that effect!</b></span>")
else else
to_chat(user, "<span class='warning'>Your pet looks at you with a vacant blase expression, you don't think you can program anything else into them</b></span>") to_chat(user, "<span class='warning'>Your pet looks at you with a vacant blase expression, you don't think you can program anything else into them</b></span>")
user._REFACTORING_SetStun(0) user.SetStun(0)
H._REFACTORING_SetStun(0) H.SetStun(0)
//CUSTOM ECHO //CUSTOM ECHO
else if((findtext(message, custom_echo))) else if((findtext(message, custom_echo)))
@@ -1294,16 +1294,16 @@
continue continue
else else
user.emote("me", EMOTE_VISIBLE, "puts their hands upon [H.name]'s head and looks deep into their eyes, whispering something to them.") user.emote("me", EMOTE_VISIBLE, "puts their hands upon [H.name]'s head and looks deep into their eyes, whispering something to them.")
user._REFACTORING_SetStun(1000)//Hands are handy, so you have to stay still user.SetStun(1000)//Hands are handy, so you have to stay still
H._REFACTORING_SetStun(1000) H.SetStun(1000)
var/trigger = stripped_input(user, "Enter the loop phrase", MAX_MESSAGE_LEN) var/trigger = stripped_input(user, "Enter the loop phrase", MAX_MESSAGE_LEN)
var/customSpan = list("Notice", "Warning", "Hypnophrase", "Love", "Velvet") var/customSpan = list("Notice", "Warning", "Hypnophrase", "Love", "Velvet")
var/trigger2 = input(user, "Pick the style", "Style") in customSpan var/trigger2 = input(user, "Pick the style", "Style") in customSpan
trigger2 = lowertext(trigger2) trigger2 = lowertext(trigger2)
E.customEcho = trigger E.customEcho = trigger
E.customSpan = trigger2 E.customSpan = trigger2
user._REFACTORING_SetStun(0) user.SetStun(0)
H._REFACTORING_SetStun(0) H.SetStun(0)
to_chat(user, "<span class='notice'><i>You sucessfully set an echoing phrase in [H]</i></span>") to_chat(user, "<span class='notice'><i>You sucessfully set an echoing phrase in [H]</i></span>")
//CUSTOM OBJECTIVE //CUSTOM OBJECTIVE
@@ -1317,8 +1317,8 @@
continue continue
else else
user.emote("me", EMOTE_VISIBLE, "puts their hands upon [H.name]'s head and looks deep into their eyes, whispering something to them.'") user.emote("me", EMOTE_VISIBLE, "puts their hands upon [H.name]'s head and looks deep into their eyes, whispering something to them.'")
user._REFACTORING_SetStun(1000)//So you can't run away! user.SetStun(1000)//So you can't run away!
H._REFACTORING_SetStun(1000) H.SetStun(1000)
if (E.mental_capacity >= 200) if (E.mental_capacity >= 200)
var/datum/objective/brainwashing/objective = stripped_input(user, "Add an objective to give your pet.", MAX_MESSAGE_LEN) var/datum/objective/brainwashing/objective = stripped_input(user, "Add an objective to give your pet.", MAX_MESSAGE_LEN)
if(!LAZYLEN(objective)) if(!LAZYLEN(objective))
@@ -1339,8 +1339,8 @@
to_chat(user, "<span class='notice'><i>You sucessfully give an objective to [H]</i></span>") to_chat(user, "<span class='notice'><i>You sucessfully give an objective to [H]</i></span>")
else else
to_chat(user, "<span class='warning'>Your pet looks at you with a vacant blasé expression, you don't think you can program anything else into them</b></span>") to_chat(user, "<span class='warning'>Your pet looks at you with a vacant blasé expression, you don't think you can program anything else into them</b></span>")
user._REFACTORING_SetStun(0) user.SetStun(0)
H._REFACTORING_SetStun(0) H.SetStun(0)
//INSTILL //INSTILL
else if((findtext(message, instill_words))) else if((findtext(message, instill_words)))

View File

@@ -652,7 +652,7 @@
if (HAS_TRAIT(C, TRAIT_NYMPHO) && lewd) if (HAS_TRAIT(C, TRAIT_NYMPHO) && lewd)
if (C.getArousalLoss() > 80) if (C.getArousalLoss() > 80)
C.mob_climax(forced_climax=TRUE) C.mob_climax(forced_climax=TRUE)
C._REFACTORING_SetStun(10)//We got your stun effects in somewhere, Kev. C.SetStun(10)//We got your stun effects in somewhere, Kev.
else else
C.adjustArousalLoss(10) C.adjustArousalLoss(10)
to_chat(C, "<span class='love'><i>You feel a surge of arousal!</i></span>") to_chat(C, "<span class='love'><i>You feel a surge of arousal!</i></span>")

View File

@@ -33,7 +33,7 @@
if(combatmode) if(combatmode)
if(world.time >= combatmessagecooldown) if(world.time >= combatmessagecooldown)
if(a_intent != INTENT_HELP) if(a_intent != INTENT_HELP)
visible_message("<span class='warning'>[src] [_REFACTORING_resting ? "tenses up" : (prob(95)? "drops into a combative stance" : (prob(95)? "poses aggressively" : "asserts dominance with their pose"))].</span>") visible_message("<span class='warning'>[src] [resting ? "tenses up" : (prob(95)? "drops into a combative stance" : (prob(95)? "poses aggressively" : "asserts dominance with their pose"))].</span>")
else else
visible_message("<span class='notice'>[src] [pick("looks","seems","goes")] [pick("alert","attentive","vigilant")].</span>") visible_message("<span class='notice'>[src] [pick("looks","seems","goes")] [pick("alert","attentive","vigilant")].</span>")
playsound_local(src, 'sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay! playsound_local(src, 'sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay!

View File

@@ -6,7 +6,7 @@
/mob/living/silicon/robot/movement_delay() /mob/living/silicon/robot/movement_delay()
. = ..() . = ..()
if(!_REFACTORING_resting && !sprinting) if(!resting && !sprinting)
. += 1 . += 1
. += speed . += speed