mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
[MIRROR] GODMODE prevents nearly all types of stuns (#3844)
* GODMODE prevents nearly all types of stuns (#56863) Co-authored-by: ATH1909 <42606352+ATH1909@ users.noreply.github.com> * GODMODE prevents nearly all types of stuns Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com> Co-authored-by: ATH1909 <42606352+ATH1909@ users.noreply.github.com>
This commit is contained in:
co-authored by
ATH1909
tralezab
parent
fd4c012498
commit
08c85cdbf2
@@ -17,6 +17,8 @@
|
||||
/mob/living/proc/Stun(amount, ignore_canstun = FALSE) //Can't go below remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STUN, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
if(absorb_stun(amount, ignore_canstun))
|
||||
return
|
||||
@@ -30,6 +32,8 @@
|
||||
/mob/living/proc/SetStun(amount, ignore_canstun = FALSE) //Sets remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STUN, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
var/datum/status_effect/incapacitating/stun/S = IsStun()
|
||||
if(amount <= 0)
|
||||
@@ -47,6 +51,8 @@
|
||||
/mob/living/proc/AdjustStun(amount, ignore_canstun = FALSE) //Adds to remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STUN, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
if(absorb_stun(amount, ignore_canstun))
|
||||
return
|
||||
@@ -71,6 +77,8 @@
|
||||
/mob/living/proc/Knockdown(amount, ignore_canstun = FALSE) //Can't go below remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
if(absorb_stun(amount, ignore_canstun))
|
||||
return
|
||||
@@ -84,6 +92,8 @@
|
||||
/mob/living/proc/SetKnockdown(amount, ignore_canstun = FALSE) //Sets remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
|
||||
if(amount <= 0)
|
||||
@@ -101,6 +111,8 @@
|
||||
/mob/living/proc/AdjustKnockdown(amount, ignore_canstun = FALSE) //Adds to remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
if(absorb_stun(amount, ignore_canstun))
|
||||
return
|
||||
@@ -124,6 +136,8 @@
|
||||
/mob/living/proc/Immobilize(amount, ignore_canstun = FALSE) //Can't go below remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_IMMOBILIZE, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
if(absorb_stun(amount, ignore_canstun))
|
||||
return
|
||||
@@ -137,6 +151,8 @@
|
||||
/mob/living/proc/SetImmobilized(amount, ignore_canstun = FALSE) //Sets remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_IMMOBILIZE, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized()
|
||||
if(amount <= 0)
|
||||
@@ -154,6 +170,8 @@
|
||||
/mob/living/proc/AdjustImmobilized(amount, ignore_canstun = FALSE) //Adds to remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_IMMOBILIZE, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
if(absorb_stun(amount, ignore_canstun))
|
||||
return
|
||||
@@ -177,6 +195,8 @@
|
||||
/mob/living/proc/Paralyze(amount, ignore_canstun = FALSE) //Can't go below remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_PARALYZE, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
if(absorb_stun(amount, ignore_canstun))
|
||||
return
|
||||
@@ -190,6 +210,8 @@
|
||||
/mob/living/proc/SetParalyzed(amount, ignore_canstun = FALSE) //Sets remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_PARALYZE, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed(FALSE)
|
||||
if(amount <= 0)
|
||||
@@ -207,6 +229,8 @@
|
||||
/mob/living/proc/AdjustParalyzed(amount, ignore_canstun = FALSE) //Adds to remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_PARALYZE, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
if(absorb_stun(amount, ignore_canstun))
|
||||
return
|
||||
@@ -252,6 +276,8 @@
|
||||
/mob/living/proc/Unconscious(amount, ignore_canstun = FALSE) //Can't go below remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
|
||||
if(U)
|
||||
@@ -263,6 +289,8 @@
|
||||
/mob/living/proc/SetUnconscious(amount, ignore_canstun = FALSE) //Sets remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
|
||||
if(amount <= 0)
|
||||
@@ -277,6 +305,8 @@
|
||||
/mob/living/proc/AdjustUnconscious(amount, ignore_canstun = FALSE) //Adds to remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
|
||||
var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
|
||||
if(U)
|
||||
@@ -300,6 +330,8 @@
|
||||
/mob/living/proc/Sleeping(amount) //Can't go below remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
|
||||
if(S)
|
||||
S.duration = max(world.time + amount, S.duration)
|
||||
@@ -310,6 +342,8 @@
|
||||
/mob/living/proc/SetSleeping(amount) //Sets remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
|
||||
if(amount <= 0)
|
||||
if(S)
|
||||
@@ -323,6 +357,8 @@
|
||||
/mob/living/proc/AdjustSleeping(amount) //Adds to remaining duration
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
|
||||
if(S)
|
||||
S.duration += amount
|
||||
@@ -334,6 +370,8 @@
|
||||
/mob/living/proc/PermaSleeping()
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, -1) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
|
||||
if(S)
|
||||
S.duration = -1
|
||||
|
||||
Reference in New Issue
Block a user