From 9c4bfea50ed7401e96e3b8edba2f33223cca9801 Mon Sep 17 00:00:00 2001
From: Antoonij <42318445+Antoonij@users.noreply.github.com>
Date: Sun, 22 Sep 2024 21:26:17 +0200
Subject: [PATCH] refactor: godmode (#5920)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* push-up
* smol fix
* bugfix nr2
* скобочка roflcat
* forgor
* опять скобка
* kotvshlyapi i forgor unique trait source
* fix
* alphabet
* фиксы мое
* trailing
* trait source revert for spell roflcat
* meowfixes
---
code/__DEFINES/combat.dm | 1 -
code/__DEFINES/traits/declarations.dm | 1 +
code/__DEFINES/traits/sources.dm | 1 -
code/_globalvars/traits.dm | 1 +
code/datums/spells/rod_form.dm | 6 +--
code/datums/spells/shapeshift.dm | 10 ++---
code/datums/status_effects/neutral.dm | 8 ++--
code/game/gamemodes/clockwork/cogscarab.dm | 4 +-
code/game/gamemodes/devil/devilinfo.dm | 26 ++++++------
.../special_shadowling_abilities.dm | 6 +--
code/game/mecha/mecha.dm | 2 +-
code/game/objects/items/theft_items.dm | 8 ++--
.../objects/items/weapons/anomaly_extract.dm | 12 ++----
code/modules/admin/verbs/randomverbs.dm | 12 ++++--
.../vampire/vampire_powers/bestia_powers.dm | 16 +++----
.../mining/lavaland/loot/colossus_loot.dm | 6 +--
.../mining/lavaland/loot/tendril_loot.dm | 6 +--
code/modules/mob/camera/camera.dm | 6 ++-
.../mob/living/carbon/alien/larva/life.dm | 2 +-
code/modules/mob/living/carbon/alien/life.dm | 2 +-
code/modules/mob/living/carbon/brain/life.dm | 2 +-
.../mob/living/carbon/brain/update_status.dm | 2 +-
code/modules/mob/living/carbon/human/human.dm | 8 +++-
.../mob/living/carbon/human/human_damage.dm | 22 +++++-----
code/modules/mob/living/carbon/human/life.dm | 10 ++---
.../mob/living/carbon/human/update_stat.dm | 2 +-
code/modules/mob/living/carbon/life.dm | 2 +-
.../mob/living/carbon/update_status.dm | 2 +-
code/modules/mob/living/damage_procs.dm | 26 ++++++------
code/modules/mob/living/death.dm | 2 +-
code/modules/mob/living/living.dm | 8 ++--
code/modules/mob/living/living_defense.dm | 2 +-
code/modules/mob/living/silicon/ai/life.dm | 2 +-
.../mob/living/silicon/ai/update_status.dm | 2 +-
code/modules/mob/living/silicon/decoy/life.dm | 4 +-
code/modules/mob/living/silicon/pai/life.dm | 2 +-
.../mob/living/silicon/pai/update_status.dm | 2 +-
.../mob/living/silicon/robot/drone/drone.dm | 2 +-
.../silicon/robot/drone/drone_damage.dm | 2 +-
.../silicon/robot/drone/update_status.dm | 2 +-
.../mob/living/silicon/robot/robot_damage.dm | 8 ++--
.../mob/living/silicon/robot/update_status.dm | 2 +-
.../mob/living/simple_animal/damage_procs.dm | 4 +-
.../living/simple_animal/hostile/hostile.dm | 4 +-
.../living/simple_animal/hostile/statue.dm | 5 ++-
.../hostile/terror_spiders/terror_ai.dm | 2 +-
code/modules/mob/living/simple_animal/hulk.dm | 12 +++---
.../mob/living/simple_animal/hulk_power.dm | 2 +-
.../modules/mob/living/simple_animal/shade.dm | 4 +-
.../mob/living/simple_animal/simple_animal.dm | 6 +--
code/modules/mob/living/status_procs.dm | 42 +++++++++----------
code/modules/power/tesla/energy_ball.dm | 21 +++++-----
code/modules/shuttle/shuttle_smash.dm | 2 +-
code/modules/surgery/organs/blood.dm | 2 +-
code/modules/surgery/organs/lungs.dm | 2 +-
code/modules/surgery/organs/organ_external.dm | 14 +++----
56 files changed, 187 insertions(+), 187 deletions(-)
diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm
index 46c52eb7c52..95e8b12aede 100644
--- a/code/__DEFINES/combat.dm
+++ b/code/__DEFINES/combat.dm
@@ -55,7 +55,6 @@
#define PASSEMOTES (1<<6) //Mob has a cortical borer or holders inside of it that need to see emotes.
#define IGNORESLOWDOWN (1<<7)
#define IGNORE_SPEED_CHANGES (1<<8)
-#define GODMODE (1<<9)
//Health Defines
#define HEALTH_THRESHOLD_CRIT 0
diff --git a/code/__DEFINES/traits/declarations.dm b/code/__DEFINES/traits/declarations.dm
index 9d1aed47d67..2a6312fc5d1 100644
--- a/code/__DEFINES/traits/declarations.dm
+++ b/code/__DEFINES/traits/declarations.dm
@@ -41,6 +41,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_LAVA_STOPPED "lava_stopped"
//mob traits
+#define TRAIT_GODMODE "godmode"
#define TRAIT_PACIFISM "pacifism"
#define TRAIT_WATERBREATH "waterbreathing"
#define TRAIT_BLOODCRAWL "bloodcrawl"
diff --git a/code/__DEFINES/traits/sources.dm b/code/__DEFINES/traits/sources.dm
index 6d40c768ada..d04f7d59088 100644
--- a/code/__DEFINES/traits/sources.dm
+++ b/code/__DEFINES/traits/sources.dm
@@ -149,4 +149,3 @@
#define SCRYING_ORB_TRAIT "scrying_orb"
#define EVIL_FAX_TRAIT "evil_fax"
#define CORGI_HARDSUIT_TRAIT "corgi_hardsuit"
-
diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm
index 3cc5282d226..caee2c062e7 100644
--- a/code/_globalvars/traits.dm
+++ b/code/_globalvars/traits.dm
@@ -57,6 +57,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_FORCED_STANDING" = TRAIT_FORCED_STANDING,
"TRAIT_GENE_STRONG" = TRAIT_GENE_STRONG,
"TRAIT_GENE_WEAK" = TRAIT_GENE_WEAK,
+ "TRAIT_GODMODE" = TRAIT_GODMODE,
"TRAIT_HANDS_BLOCKED" = TRAIT_HANDS_BLOCKED,
"TRAIT_HAS_LIPS" = TRAIT_HAS_LIPS,
"TRAIT_HAS_REGENERATION" = TRAIT_HAS_REGENERATION,
diff --git a/code/datums/spells/rod_form.dm b/code/datums/spells/rod_form.dm
index 18360c285cf..cd347d563a8 100644
--- a/code/datums/spells/rod_form.dm
+++ b/code/datums/spells/rod_form.dm
@@ -85,8 +85,7 @@
setDir(wizard.dir)
src.wizard = wizard
wizard.forceMove(src)
- wizard.status_flags |= GODMODE
- ADD_TRAIT(wizard, TRAIT_NO_TRANSFORM, UNIQUE_TRAIT_SOURCE(src))
+ wizard.add_traits(list(TRAIT_GODMODE, TRAIT_NO_TRANSFORM), UNIQUE_TRAIT_SOURCE(src))
/**
@@ -97,8 +96,7 @@
if(QDELETED(wizard))
wizard = null
return
- REMOVE_TRAIT(wizard, TRAIT_NO_TRANSFORM, UNIQUE_TRAIT_SOURCE(src))
- wizard.status_flags &= ~GODMODE
+ wizard.remove_traits(list(TRAIT_GODMODE, TRAIT_NO_TRANSFORM), UNIQUE_TRAIT_SOURCE(src))
wizard.forceMove(get_turf(src))
wizard = null
diff --git a/code/datums/spells/shapeshift.dm b/code/datums/spells/shapeshift.dm
index f2d2ff3853f..788423a9f8c 100644
--- a/code/datums/spells/shapeshift.dm
+++ b/code/datums/spells/shapeshift.dm
@@ -49,14 +49,14 @@
/obj/effect/proc_holder/spell/shapeshift/proc/Shapeshift(mob/living/caster)
- for(var/mob/living/M in caster)
- if(M.status_flags & GODMODE)
- to_chat(caster, "You're already shapeshifted!")
+ for(var/mob/living/mob in caster)
+ if(HAS_TRAIT_FROM(mob, TRAIT_GODMODE, UNIQUE_TRAIT_SOURCE(src)))
+ to_chat(caster, span_warning("You're already shapeshifted!"))
return
var/mob/living/shape = new shapeshift_type(get_turf(caster))
caster.forceMove(shape)
- caster.status_flags |= GODMODE
+ ADD_TRAIT(caster, TRAIT_GODMODE, UNIQUE_TRAIT_SOURCE(src))
current_shapes |= shape
current_casters |= caster
@@ -75,7 +75,7 @@
if(!caster)
return
caster.forceMove(get_turf(shape))
- caster.status_flags &= ~GODMODE
+ REMOVE_TRAIT(caster, TRAIT_GODMODE, UNIQUE_TRAIT_SOURCE(src))
clothes_req = initial(clothes_req)
human_req = initial(human_req)
diff --git a/code/datums/status_effects/neutral.dm b/code/datums/status_effects/neutral.dm
index b8ea059ea36..6270c944008 100644
--- a/code/datums/status_effects/neutral.dm
+++ b/code/datums/status_effects/neutral.dm
@@ -93,8 +93,8 @@
/// So we don't leave folks with god-mode
/datum/status_effect/high_five/proc/wiz_cleanup(mob/living/carbon/user, mob/living/carbon/highfived)
- user.status_flags &= ~GODMODE
- highfived.status_flags &= ~GODMODE
+ REMOVE_TRAIT(user, TRAIT_GODMODE, UNIQUE_TRAIT_SOURCE(src))
+ REMOVE_TRAIT(highfived, TRAIT_GODMODE, UNIQUE_TRAIT_SOURCE(src))
user.remove_status_effect(type)
highfived.remove_status_effect(type)
@@ -112,8 +112,8 @@
continue
if(is_wiz && iswizard(check))
user.visible_message(span_dangerbigger("[user.name] and [check.name] [critical_success]"))
- user.status_flags |= GODMODE
- check.status_flags |= GODMODE
+ ADD_TRAIT(user, TRAIT_GODMODE, UNIQUE_TRAIT_SOURCE(src))
+ ADD_TRAIT(check, TRAIT_GODMODE, UNIQUE_TRAIT_SOURCE(src))
explosion(get_turf(user), 5, 2, 1, 3, cause = id)
// explosions have a spawn so this makes sure that we don't get gibbed
addtimer(CALLBACK(src, PROC_REF(wiz_cleanup), user, check), 0.3 SECONDS) //I want to be sure this lasts long enough, with lag.
diff --git a/code/game/gamemodes/clockwork/cogscarab.dm b/code/game/gamemodes/clockwork/cogscarab.dm
index b0334ca6a8b..c0c6c238dbb 100644
--- a/code/game/gamemodes/clockwork/cogscarab.dm
+++ b/code/game/gamemodes/clockwork/cogscarab.dm
@@ -199,14 +199,14 @@
/mob/living/silicon/robot/cogscarab/updatehealth(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
set_health(maxHealth - (getBruteLoss() + getFireLoss() + (suiciding ? getOxyLoss() : 0)))
update_stat("updatehealth([reason])", should_log)
/mob/living/silicon/robot/cogscarab/update_stat(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
if(health <= 0 && stat != DEAD)
ghostize(TRUE)
diff --git a/code/game/gamemodes/devil/devilinfo.dm b/code/game/gamemodes/devil/devilinfo.dm
index eee29480f06..5c00d4b57a9 100644
--- a/code/game/gamemodes/devil/devilinfo.dm
+++ b/code/game/gamemodes/devil/devilinfo.dm
@@ -220,13 +220,13 @@ GLOBAL_LIST_INIT(lawlorify, list (
form = BASIC_DEVIL
/datum/devilinfo/proc/regress_blood_lizard()
- var/mob/living/carbon/true_devil/D = owner.current
- to_chat(D, "Your powers weaken, have more contracts be signed to regain power.")
- D.oldform.loc = D.loc
- owner.transfer_to(D.oldform)
- D.oldform.status_flags &= ~GODMODE
+ var/mob/living/carbon/true_devil/devil = owner.current
+ to_chat(devil, span_warning("Your powers weaken, have more contracts be signed to regain power."))
+ devil.oldform.loc = devil.loc
+ owner.transfer_to(devil.oldform)
+ REMOVE_TRAIT(devil.oldform, TRAIT_GODMODE, UNIQUE_TRAIT_SOURCE(src))
give_lizard_spells()
- qdel(D)
+ qdel(devil)
form = BLOOD_LIZARD
update_hud()
@@ -251,14 +251,14 @@ GLOBAL_LIST_INIT(lawlorify, list (
/datum/devilinfo/proc/increase_true_devil()
- var/mob/living/carbon/true_devil/A = new /mob/living/carbon/true_devil(owner.current.loc, owner.current)
- A.faction |= "hell"
+ var/mob/living/carbon/true_devil/ascended = new /mob/living/carbon/true_devil(owner.current.loc, owner.current)
+ ascended.faction |= "hell"
// Put the old body in stasis
- owner.current.status_flags |= GODMODE
- owner.current.loc = A
- A.oldform = owner.current
- owner.transfer_to(A)
- A.set_name()
+ ADD_TRAIT(owner.current, TRAIT_GODMODE, UNIQUE_TRAIT_SOURCE(src))
+ owner.current.loc = ascended
+ ascended.oldform = owner.current
+ owner.transfer_to(ascended)
+ ascended.set_name()
give_true_spells()
form = TRUE_DEVIL
update_hud()
diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm
index c8df6a6946b..7ce0c4a0325 100644
--- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm
@@ -50,7 +50,7 @@ GLOBAL_LIST_INIT(possibleShadowlingNames, list("U'ruan", "Y`shej", "Nex", "Hel-u
new /obj/structure/alien/weeds/node(shadowturf) //Dim lighting in the chrysalis -- removes itself afterwards
//Can't die while hatching
- user.status_flags |= GODMODE
+ ADD_TRAIT(user, TRAIT_GODMODE, UNIQUE_TRAIT_SOURCE(src))
user.visible_message(span_warning("A chrysalis forms around [user], sealing [user.p_them()] inside."), \
span_shadowling("You create your chrysalis and begin to contort within."))
@@ -101,9 +101,7 @@ GLOBAL_LIST_INIT(possibleShadowlingNames, list("U'ruan", "Y`shej", "Nex", "Hel-u
user.real_name = newNameId
user.name = user.real_name
to_chat(user, span_mind_control("YOU LIVE!!!"))
-
- user.status_flags &= ~GODMODE
- REMOVE_TRAIT(user, TRAIT_NO_TRANSFORM, UNIQUE_TRAIT_SOURCE(src))
+ user.remove_traits(list(TRAIT_NO_TRANSFORM, TRAIT_GODMODE), UNIQUE_TRAIT_SOURCE(src))
for(var/obj/structure/alien/resin/wall/shadowling/resin in orange(user, 1))
qdel(resin)
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index ee91aef34b2..8bd09d723d3 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -559,7 +559,7 @@
else if(isliving(bumped_atom))
var/mob/living/bumped_living = bumped_atom
- if(bumped_living.flags & GODMODE)
+ if(HAS_TRAIT(bumped_living, TRAIT_GODMODE))
return
var/static/list/mecha_hit_sound = list('sound/weapons/genhit1.ogg','sound/weapons/genhit2.ogg','sound/weapons/genhit3.ogg')
bumped_living.take_overall_damage(5)
diff --git a/code/game/objects/items/theft_items.dm b/code/game/objects/items/theft_items.dm
index 1a370d9ca9e..310a74a8210 100644
--- a/code/game/objects/items/theft_items.dm
+++ b/code/game/objects/items/theft_items.dm
@@ -223,7 +223,7 @@
if(!isliving(hit_atom))
return ..()
var/mob/living/victim = hit_atom
- if(victim.incorporeal_move || victim.status_flags & GODMODE) //try to keep this in sync with supermatter's consume fail conditions
+ if(victim.incorporeal_move || HAS_TRAIT(victim, TRAIT_GODMODE)) //try to keep this in sync with supermatter's consume fail conditions
return ..()
if(throwingdatum?.thrower)
var/mob/user = throwingdatum.thrower
@@ -244,7 +244,7 @@
/obj/item/nuke_core/supermatter_sliver/pickup(mob/living/user)
- if(!isliving(user) || user.status_flags & GODMODE) //try to keep this in sync with supermatter's consume fail conditions
+ if(!isliving(user) || HAS_TRAIT(user, TRAIT_GODMODE)) //try to keep this in sync with supermatter's consume fail conditions
return ..()
user.visible_message(
span_danger("[user] reaches out and tries to pick up [src]. [user.p_their()] body starts to glow and bursts into flames before bursting into flames!"),
@@ -331,7 +331,7 @@
/obj/item/nuke_core_container/supermatter/attack_hand(mob/user)
if(cracked && sliver) //What did we say about touching the shard...
- if(!isliving(user) || user.status_flags & GODMODE)
+ if(!isliving(user) || HAS_TRAIT(user, TRAIT_GODMODE))
return FALSE
user.visible_message("[user] reaches out and tries to pick up [sliver]. [user.p_their()] body starts to glow and bursts into flames!",
"You reach for [sliver] with your hands. That was dumb.",
@@ -413,7 +413,7 @@
if(!isliving(AM))
return
var/mob/living/victim = AM
- if(victim.incorporeal_move || victim.status_flags & GODMODE) //try to keep this in sync with supermatter's consume fail conditions
+ if(victim.incorporeal_move || HAS_TRAIT(victim, TRAIT_GODMODE)) //try to keep this in sync with supermatter's consume fail conditions
return
victim.gib()
message_admins("[src] has consumed [key_name_admin(victim)] [ADMIN_JMP(src)].")
diff --git a/code/game/objects/items/weapons/anomaly_extract.dm b/code/game/objects/items/weapons/anomaly_extract.dm
index ad697e05a2d..39023a5f565 100644
--- a/code/game/objects/items/weapons/anomaly_extract.dm
+++ b/code/game/objects/items/weapons/anomaly_extract.dm
@@ -122,10 +122,8 @@
span_notice("You hear something squishing..."))
original_body = user
- ADD_TRAIT(original_body, TRAIT_NO_TRANSFORM, UNIQUE_TRAIT_SOURCE(src))
- ADD_TRAIT(slimeme, TRAIT_NO_TRANSFORM, UNIQUE_TRAIT_SOURCE(src))
- slimeme.status_flags |= GODMODE
- user.status_flags |= GODMODE
+ original_body.add_traits(list(TRAIT_NO_TRANSFORM, TRAIT_GODMODE), UNIQUE_TRAIT_SOURCE(src))
+ slimeme.add_traits(list(TRAIT_NO_TRANSFORM, TRAIT_GODMODE), UNIQUE_TRAIT_SOURCE(src))
user.mind.transfer_to(slimeme)
slimeme.update_sight()
user.move_to_null_space()
@@ -141,8 +139,7 @@
if(QDELETED(src) || QDELETED(slimeme))
return
- REMOVE_TRAIT(slimeme, TRAIT_NO_TRANSFORM, UNIQUE_TRAIT_SOURCE(src))
- slimeme.status_flags &= ~GODMODE
+ slimeme.remove_traits(list(TRAIT_NO_TRANSFORM, TRAIT_GODMODE), UNIQUE_TRAIT_SOURCE(src))
is_transformed = TRUE
@@ -174,8 +171,7 @@
stack_trace("Spell or original_body was qdeled during the [src] work.")
return
- REMOVE_TRAIT(original_body, TRAIT_NO_TRANSFORM, UNIQUE_TRAIT_SOURCE(src))
- original_body.status_flags &= ~GODMODE
+ original_body.remove_traits(list(TRAIT_NO_TRANSFORM, TRAIT_GODMODE), UNIQUE_TRAIT_SOURCE(src))
is_transformed = FALSE
original_body = null
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index d614a9e623e..c575a7714bc 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -192,17 +192,21 @@
-/client/proc/cmd_admin_godmode(mob/M as mob in GLOB.mob_list)
+/client/proc/cmd_admin_godmode(mob/mob as mob in GLOB.mob_list)
set category = "Admin"
set name = "Godmode"
if(!check_rights(R_ADMIN))
return
- M.status_flags ^= GODMODE
- to_chat(usr, "Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]", confidential=TRUE)
+ var/had_trait = HAS_TRAIT_FROM(mob, TRAIT_GODMODE, ADMIN_TRAIT)
+ if(had_trait)
+ REMOVE_TRAIT(mob, TRAIT_GODMODE, ADMIN_TRAIT)
+ else
+ ADD_TRAIT(mob, TRAIT_GODMODE, ADMIN_TRAIT)
- log_and_message_admins("has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]")
+ to_chat(usr, span_notice("Toggled [had_trait ? "OFF" : "ON"]"), confidential=TRUE)
+ log_and_message_admins("has toggled [key_name_admin(mob)]'s nodamage to [had_trait ? "Off" : "On"]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Godmode") //If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
diff --git a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
index 9fb1cb4af01..bfa05bb94b6 100644
--- a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm
@@ -1010,10 +1010,8 @@
vampire.stop_sucking()
original_body = user
- user.status_flags |= GODMODE
- vampire_animal.status_flags |= GODMODE
- ADD_TRAIT(user, TRAIT_NO_TRANSFORM, UNIQUE_TRAIT_SOURCE(src))
- ADD_TRAIT(vampire_animal, TRAIT_NO_TRANSFORM, UNIQUE_TRAIT_SOURCE(src))
+ original_body.add_traits(list(TRAIT_NO_TRANSFORM, TRAIT_GODMODE), UNIQUE_TRAIT_SOURCE(src))
+ vampire_animal.add_traits(list(TRAIT_NO_TRANSFORM, TRAIT_GODMODE), UNIQUE_TRAIT_SOURCE(src))
user.forceMove(vampire_animal)
user.mind.transfer_to(vampire_animal)
vampire.draw_HUD()
@@ -1027,8 +1025,7 @@
if(QDELETED(src) || QDELETED(vampire_animal))
return
- vampire_animal.status_flags &= ~GODMODE
- REMOVE_TRAIT(vampire_animal, TRAIT_NO_TRANSFORM, UNIQUE_TRAIT_SOURCE(src))
+ vampire_animal.remove_traits(list(TRAIT_NO_TRANSFORM, TRAIT_GODMODE), UNIQUE_TRAIT_SOURCE(src))
is_transformed = TRUE
var/list/all_spells = vampire_animal.mind.spell_list + vampire_animal.mob_spell_list
for(var/obj/effect/proc_holder/spell/vampire/spell in all_spells)
@@ -1072,8 +1069,7 @@
stack_trace("Spell or original_body was qdeled during the [src] work.")
return
- REMOVE_TRAIT(original_body, TRAIT_NO_TRANSFORM, UNIQUE_TRAIT_SOURCE(src))
- original_body.status_flags &= ~GODMODE
+ original_body.remove_traits(list(TRAIT_NO_TRANSFORM, TRAIT_GODMODE), UNIQUE_TRAIT_SOURCE(src))
is_transformed = FALSE
var/list/all_spells = original_body.mind.spell_list + original_body.mob_spell_list
for(var/obj/effect/proc_holder/spell/vampire/spell in all_spells)
@@ -1334,7 +1330,7 @@
user_image.add_overlay(user)
user_image.set_light(2, 10, "#700000")
user.forceMove(user_image)
- user.status_flags |= GODMODE
+ ADD_TRAIT(user, TRAIT_GODMODE, UNIQUE_TRAIT_SOURCE(src))
animate(user_image, pixel_y = 40, time = 3.7 SECONDS, easing = BOUNCE_EASING|EASE_IN)
animate(pixel_y = 0, time = 0.3 SECONDS, easing = BOUNCE_EASING|EASE_OUT)
@@ -1378,7 +1374,7 @@
return
coffin.close()
- user.status_flags &= ~GODMODE
+ REMOVE_TRAIT(user, TRAIT_GODMODE, UNIQUE_TRAIT_SOURCE(src))
// we need no companions inside the coffin
for(var/mob/living/victim in (coffin.contents - user))
diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm
index 943f976ea54..abed62005fb 100644
--- a/code/modules/mining/lavaland/loot/colossus_loot.dm
+++ b/code/modules/mining/lavaland/loot/colossus_loot.dm
@@ -383,8 +383,7 @@
. = ..()
if(isliving(arrived) && holder_animal)
var/mob/living/mob = arrived
- mob.add_traits(list(TRAIT_MUTE, TRAIT_NO_TRANSFORM), UNIQUE_TRAIT_SOURCE(src))
- mob.status_flags |= GODMODE
+ mob.add_traits(list(TRAIT_MUTE, TRAIT_GODMODE, TRAIT_NO_TRANSFORM), UNIQUE_TRAIT_SOURCE(src))
mob.mind.transfer_to(holder_animal)
holder_animal.mind.AddSpell(new /obj/effect/proc_holder/spell/exit_possession)
@@ -392,8 +391,7 @@
/obj/structure/closet/stasis/dump_contents(kill = TRUE)
STOP_PROCESSING(SSobj, src)
for(var/mob/living/L in src)
- L.status_flags &= ~GODMODE
- L.remove_traits(list(TRAIT_MUTE, TRAIT_NO_TRANSFORM), UNIQUE_TRAIT_SOURCE(src))
+ L.remove_traits(list(TRAIT_MUTE, TRAIT_GODMODE, TRAIT_NO_TRANSFORM), UNIQUE_TRAIT_SOURCE(src))
if(holder_animal)
holder_animal.mind.transfer_to(L)
L.mind.RemoveSpell(/obj/effect/proc_holder/spell/exit_possession)
diff --git a/code/modules/mining/lavaland/loot/tendril_loot.dm b/code/modules/mining/lavaland/loot/tendril_loot.dm
index 825635dc8c5..cab82e0aba4 100644
--- a/code/modules/mining/lavaland/loot/tendril_loot.dm
+++ b/code/modules/mining/lavaland/loot/tendril_loot.dm
@@ -490,8 +490,7 @@
effect.desc = "It's shaped an awful lot like [user.name]."
effect.setDir(user.dir)
user.forceMove(effect)
- ADD_TRAIT(user, TRAIT_NO_TRANSFORM, UNIQUE_TRAIT_SOURCE(src))
- user.status_flags |= GODMODE
+ user.add_traits(list(TRAIT_NO_TRANSFORM, TRAIT_GODMODE), UNIQUE_TRAIT_SOURCE(src))
addtimer(CALLBACK(src, PROC_REF(reappear), user, effect), 10 SECONDS)
@@ -505,8 +504,7 @@
stack_trace("[effect] is outside of the turf contents")
return
- user.status_flags &= ~GODMODE
- REMOVE_TRAIT(user, TRAIT_NO_TRANSFORM, UNIQUE_TRAIT_SOURCE(src))
+ user.remove_traits(list(TRAIT_NO_TRANSFORM, TRAIT_GODMODE), UNIQUE_TRAIT_SOURCE(src))
user.forceMove(effect_turf)
user.visible_message(span_danger("[user] pops back into reality!"))
effect.can_destroy = TRUE
diff --git a/code/modules/mob/camera/camera.dm b/code/modules/mob/camera/camera.dm
index 5345e8cc816..9efbe2629f9 100644
--- a/code/modules/mob/camera/camera.dm
+++ b/code/modules/mob/camera/camera.dm
@@ -5,12 +5,16 @@
density = FALSE
move_force = INFINITY
move_resist = INFINITY
- status_flags = GODMODE // You can't damage it.
+ status_flags = NONE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
invisibility = INVISIBILITY_ABSTRACT // No one can see us
sight = SEE_SELF
move_on_shuttle = 0
+/mob/camera/Initialize(mapload)
+ . = ..()
+ ADD_TRAIT(src, TRAIT_GODMODE, INNATE_TRAIT)
+
/mob/camera/experience_pressure_difference()
return
diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm
index bdd603e0b6b..ae8b3d817ea 100644
--- a/code/modules/mob/living/carbon/alien/larva/life.dm
+++ b/code/modules/mob/living/carbon/alien/larva/life.dm
@@ -6,7 +6,7 @@
/mob/living/carbon/alien/larva/update_stat(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
if(stat != DEAD)
if(health <= -maxHealth || !get_int_organ(/obj/item/organ/internal/brain))
diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm
index 3d305fdec58..5d7c1535c96 100644
--- a/code/modules/mob/living/carbon/alien/life.dm
+++ b/code/modules/mob/living/carbon/alien/life.dm
@@ -10,7 +10,7 @@
/mob/living/carbon/alien/check_breath(datum/gas_mixture/breath)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
if(!breath || (breath.total_moles() == 0))
diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm
index e8598236bb2..3204b45c2fb 100644
--- a/code/modules/mob/living/carbon/brain/life.dm
+++ b/code/modules/mob/living/carbon/brain/life.dm
@@ -17,7 +17,7 @@
..()
/mob/living/carbon/brain/proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
if(exposed_temperature > bodytemperature)
diff --git a/code/modules/mob/living/carbon/brain/update_status.dm b/code/modules/mob/living/carbon/brain/update_status.dm
index c91b36473ac..ad6d15fbc02 100644
--- a/code/modules/mob/living/carbon/brain/update_status.dm
+++ b/code/modules/mob/living/carbon/brain/update_status.dm
@@ -1,5 +1,5 @@
/mob/living/carbon/brain/update_stat(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
// if(health <= min_health)
if(stat == DEAD)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 288c140836e..19db977c6a3 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -49,7 +49,11 @@
/mob/living/carbon/human/dummy
real_name = "Test Dummy"
- status_flags = GODMODE|CANPUSH
+ status_flags = CANPUSH
+
+/mob/living/carbon/human/dummy/Initialize(mapload)
+ . = ..()
+ ADD_TRAIT(src, TRAIT_GODMODE, INNATE_TRAIT)
/mob/living/carbon/human/skrell/Initialize(mapload)
. = ..(mapload, /datum/species/skrell)
@@ -264,7 +268,7 @@
var/bruteloss = 0
var/burnloss = 0
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return FALSE
var/armor = getarmor(attack_flag = BOMB) //Average bomb protection
diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm
index 033b240fe72..f61222f2833 100644
--- a/code/modules/mob/living/carbon/human/human_damage.dm
+++ b/code/modules/mob/living/carbon/human/human_damage.dm
@@ -1,6 +1,6 @@
//Updates the mob's health from organs and mob damage variables
/mob/living/carbon/human/updatehealth(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
var/total_burn = 0
@@ -45,7 +45,7 @@
forced = FALSE,
used_weapon = null,
)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return STATUS_UPDATE_NONE
if(!forced && amount > 0)
@@ -67,7 +67,7 @@
/mob/living/carbon/human/setBrainLoss(amount, updating_health = TRUE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return STATUS_UPDATE_NONE
if(dna.species.has_organ[INTERNAL_ORGAN_BRAIN])
@@ -84,7 +84,7 @@
/mob/living/carbon/human/getBrainLoss()
. = 0
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return .
if(!dna.species.has_organ[INTERNAL_ORGAN_BRAIN])
@@ -102,7 +102,7 @@
/mob/living/carbon/human/adjustHeartLoss(amount, updating_health = TRUE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return STATUS_UPDATE_NONE
if(dna.species.has_organ[INTERNAL_ORGAN_HEART])
@@ -115,7 +115,7 @@
/mob/living/carbon/human/setHeartLoss(amount, updating_health = TRUE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return STATUS_UPDATE_NONE //godmode
if(dna.species.has_organ[INTERNAL_ORGAN_HEART])
@@ -133,7 +133,7 @@
/mob/living/carbon/human/getHeartLoss()
. = 0
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return .
if(!dna.species.has_organ[INTERNAL_ORGAN_HEART])
@@ -160,7 +160,7 @@
//These procs fetch a cumulative total damage from all organs
/mob/living/carbon/human/getBruteLoss()
. = 0
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return .
for(var/obj/item/organ/external/bodypart as anything in bodyparts)
. += bodypart.brute_dam
@@ -168,7 +168,7 @@
/mob/living/carbon/human/getFireLoss()
. = 0
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return .
for(var/obj/item/organ/external/bodypart as anything in bodyparts)
. += bodypart.burn_dam
@@ -355,7 +355,7 @@
silent = FALSE,
affect_robotic = TRUE,
)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
. = STATUS_UPDATE_NONE
var/obj/item/organ/external/picked = safepick(get_damageable_organs(affect_robotic))
@@ -426,7 +426,7 @@
silent = FALSE,
affect_robotic = TRUE,
)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..() //godmode
. = STATUS_UPDATE_NONE
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 8eeaa55dfc0..6c05f5a2ffc 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -322,7 +322,7 @@
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
if(bodytemperature > dna.species.heat_level_1)
//Body temperature is too hot.
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return TRUE //godmode
var/mult = dna.species.heatmod * physiology.heat_mod
if(mult>0)
@@ -348,7 +348,7 @@
heal_overall_damage(burn=mult*HEAT_DAMAGE_LEVEL_3)
else if(bodytemperature < dna.species.cold_level_1)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return TRUE
if(stat == DEAD)
return TRUE
@@ -390,7 +390,7 @@
var/pressure = environment.return_pressure()
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return TRUE //godmode
if(adjusted_pressure >= dna.species.hazard_high_pressure)
@@ -624,7 +624,7 @@
/mob/living/carbon/human/handle_chemicals_in_body()
..()
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return 0 //godmode
var/is_vamp = isvampire(src)
@@ -695,7 +695,7 @@
return 0
/mob/living/carbon/human/handle_critical_condition()
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return 0
var/guaranteed_death_threshold = health + (getOxyLoss() * 0.5) - (getFireLoss() * 0.67) - (getBruteLoss() * 0.67)
diff --git a/code/modules/mob/living/carbon/human/update_stat.dm b/code/modules/mob/living/carbon/human/update_stat.dm
index 1f7e1a2fd4a..9dd69c8a0a2 100644
--- a/code/modules/mob/living/carbon/human/update_stat.dm
+++ b/code/modules/mob/living/carbon/human/update_stat.dm
@@ -1,5 +1,5 @@
/mob/living/carbon/human/update_stat(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
..()
if(stat == DEAD)
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index 7442e307c98..2f73bc9d8c9 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -104,7 +104,7 @@
//Third link in a breath chain, calls handle_breath_temperature()
/mob/living/carbon/proc/check_breath(datum/gas_mixture/breath)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return FALSE
var/lungs = get_organ_slot(INTERNAL_ORGAN_LUNGS)
diff --git a/code/modules/mob/living/carbon/update_status.dm b/code/modules/mob/living/carbon/update_status.dm
index fd9d9dcee04..b7227d9e335 100644
--- a/code/modules/mob/living/carbon/update_status.dm
+++ b/code/modules/mob/living/carbon/update_status.dm
@@ -1,5 +1,5 @@
/mob/living/carbon/update_stat(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
if(stat != DEAD)
if(health <= HEALTH_THRESHOLD_DEAD && check_death_method())
diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm
index 5ac11352c0c..8db896599a9 100644
--- a/code/modules/mob/living/damage_procs.dm
+++ b/code/modules/mob/living/damage_procs.dm
@@ -257,7 +257,7 @@
/// Applies passed status effect
/mob/living/proc/apply_effect(effect = 0, effecttype = STUN, blocked = 0, negate_armor = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return FALSE
blocked = (100-blocked)/100
if(!effect || (blocked <= 0))
@@ -353,7 +353,7 @@
silent = FALSE,
affect_robotic = TRUE,
)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
var/old_bruteloss = getBruteLoss()
bruteloss = 0
if(old_bruteloss != 0)
@@ -407,7 +407,7 @@
silent = FALSE,
affect_robotic = TRUE,
)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
var/old_fireloss = getFireLoss()
fireloss = 0
if(old_fireloss != 0)
@@ -453,7 +453,7 @@
forced = FALSE,
used_weapon = null,
)
- if((status_flags & GODMODE) || HAS_TRAIT(src, TRAIT_NO_BREATH))
+ if(HAS_TRAIT(src, TRAIT_GODMODE) || HAS_TRAIT(src, TRAIT_NO_BREATH))
var/old_oxyloss = getOxyLoss()
oxyloss = 0
if(old_oxyloss != 0)
@@ -485,7 +485,7 @@
* Returns STATUS_UPDATE_HEALTH if any changes were made, STATUS_UPDATE_NONE otherwise
*/
/mob/living/proc/setOxyLoss(amount = 0, updating_health = TRUE)
- if((status_flags & GODMODE) || HAS_TRAIT(src, TRAIT_NO_BREATH))
+ if(HAS_TRAIT(src, TRAIT_GODMODE) || HAS_TRAIT(src, TRAIT_NO_BREATH))
var/old_oxyloss = getOxyLoss()
oxyloss = 0
if(old_oxyloss != 0)
@@ -526,7 +526,7 @@
forced = FALSE,
used_weapon = null,
)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
var/old_toxloss = getToxLoss()
toxloss = 0
if(old_toxloss != 0)
@@ -558,7 +558,7 @@
* Returns STATUS_UPDATE_HEALTH if any changes were made, STATUS_UPDATE_NONE otherwise
*/
/mob/living/proc/setToxLoss(amount, updating_health = TRUE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
var/old_toxloss = getToxLoss()
toxloss = 0
if(old_toxloss != 0)
@@ -599,7 +599,7 @@
forced = FALSE,
used_weapon = null,
)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
var/old_cloneloss = getCloneLoss()
cloneloss = 0
if(old_cloneloss != 0)
@@ -631,7 +631,7 @@
* Returns STATUS_UPDATE_HEALTH if any changes were made, STATUS_UPDATE_NONE otherwise
*/
/mob/living/proc/setCloneLoss(amount, updating_health = TRUE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
var/old_cloneloss = getCloneLoss()
cloneloss = 0
if(old_cloneloss != 0)
@@ -743,7 +743,7 @@
forced = FALSE,
used_weapon = null,
)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
var/old_stamloss = getStaminaLoss()
staminaloss = 0
if(old_stamloss != 0)
@@ -777,7 +777,7 @@
* Returns STATUS_UPDATE_HEALTH if any changes were made, STATUS_UPDATE_NONE otherwise
*/
/mob/living/proc/setStaminaLoss(amount, updating_health = TRUE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
var/old_stamloss = getStaminaLoss()
staminaloss = 0
if(old_stamloss != 0)
@@ -862,7 +862,7 @@
silent = FALSE,
affect_robotic = TRUE,
)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
var/old_bruteloss = getBruteLoss()
var/old_fireloss = getFireLoss()
bruteloss = 0
@@ -942,7 +942,7 @@
silent = FALSE,
affect_robotic = TRUE,
)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
var/old_bruteloss = getBruteLoss()
var/old_fireloss = getFireLoss()
bruteloss = 0
diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm
index 43a8a8d71d2..dc279a53871 100644
--- a/code/modules/mob/living/death.dm
+++ b/code/modules/mob/living/death.dm
@@ -40,7 +40,7 @@
return TRUE
/mob/living/proc/can_die()
- return !(stat == DEAD || (status_flags & GODMODE))
+ return !(stat == DEAD || HAS_TRAIT(src, TRAIT_GODMODE))
// Returns true if mob transitioned from live to dead
// Do a check with `can_die` beforehand if you need to do any
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index d5df5ca5ab0..9eb0863002e 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -566,7 +566,7 @@
add_attack_logs(user, src, "set on fire with [I]")
/mob/living/update_stat(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
set_stat(CONSCIOUS)
med_hud_set_health()
med_hud_set_status()
@@ -574,7 +574,7 @@
update_stamina_hud()
update_damage_hud()
if(should_log)
- log_debug("[src] update_stat([reason][status_flags & GODMODE ? ", GODMODE" : ""])")
+ log_debug("[src] update_stat([reason][HAS_TRAIT(src, TRAIT_GODMODE) ? ", GODMODE" : ""])")
///Sets the current mob's health value. Do not call directly if you don't know what you are doing, use the damage procs, instead.
@@ -584,7 +584,7 @@
/mob/living/proc/updatehealth(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
set_health(maxHealth)
update_stat("updatehealth([reason])", should_log)
return
@@ -1248,7 +1248,7 @@
//called when the mob receives a bright flash
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check, affect_silicon, visual, type = /atom/movable/screen/fullscreen/flash)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return FALSE
if(check_eye_prot() < intensity && (override_blindness_check || !HAS_TRAIT(src, TRAIT_BLIND)))
overlay_fullscreen("flash", type)
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index 1e09415f7fa..26a49da0a8e 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -60,7 +60,7 @@
/mob/living/proc/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE, jitter_time = 10 SECONDS, stutter_time = 6 SECONDS, stun_duration = 4 SECONDS)
if(SEND_SIGNAL(src, COMSIG_LIVING_ELECTROCUTE_ACT, shock_damage, source, siemens_coeff, flags) & COMPONENT_LIVING_BLOCK_SHOCK)
return FALSE
- if(status_flags & GODMODE) //godmode
+ if(HAS_TRAIT(src, TRAIT_GODMODE)) //godmode
return FALSE
shock_damage *= siemens_coeff
if(!(flags & SHOCK_IGNORE_IMMUNITY))
diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm
index 3d1c13d7406..27583b0b1ac 100644
--- a/code/modules/mob/living/silicon/ai/life.dm
+++ b/code/modules/mob/living/silicon/ai/life.dm
@@ -129,7 +129,7 @@
theAPC = null
/mob/living/silicon/ai/updatehealth(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
set_health(maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss())
update_stat("updatehealth([reason])", should_log)
diff --git a/code/modules/mob/living/silicon/ai/update_status.dm b/code/modules/mob/living/silicon/ai/update_status.dm
index cf1a9bee932..989330dedfc 100644
--- a/code/modules/mob/living/silicon/ai/update_status.dm
+++ b/code/modules/mob/living/silicon/ai/update_status.dm
@@ -1,5 +1,5 @@
/mob/living/silicon/ai/update_stat(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
if(stat != DEAD)
if(health <= HEALTH_THRESHOLD_DEAD && check_death_method())
diff --git a/code/modules/mob/living/silicon/decoy/life.dm b/code/modules/mob/living/silicon/decoy/life.dm
index da1b96516cc..5bb007efcab 100644
--- a/code/modules/mob/living/silicon/decoy/life.dm
+++ b/code/modules/mob/living/silicon/decoy/life.dm
@@ -2,14 +2,14 @@
return
/mob/living/silicon/decoy/updatehealth(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
set_health(maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss())
update_stat("updatehealth([reason])", should_log)
/mob/living/silicon/decoy/update_stat(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
if(stat == DEAD)
return
diff --git a/code/modules/mob/living/silicon/pai/life.dm b/code/modules/mob/living/silicon/pai/life.dm
index 3fed8c68982..d79775fad3d 100644
--- a/code/modules/mob/living/silicon/pai/life.dm
+++ b/code/modules/mob/living/silicon/pai/life.dm
@@ -23,7 +23,7 @@
last_change_chemicals = world.time
/mob/living/silicon/pai/updatehealth(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
set_health(maxHealth - getBruteLoss() - getFireLoss())
update_stat("updatehealth([reason])", should_log)
diff --git a/code/modules/mob/living/silicon/pai/update_status.dm b/code/modules/mob/living/silicon/pai/update_status.dm
index 21de0fedb03..1babf175fc0 100644
--- a/code/modules/mob/living/silicon/pai/update_status.dm
+++ b/code/modules/mob/living/silicon/pai/update_status.dm
@@ -1,5 +1,5 @@
/mob/living/silicon/pai/update_stat(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
if(stat != DEAD)
if(health <= 0)
diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm
index 6a00fafb18b..9260be0343e 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone.dm
@@ -300,7 +300,7 @@
//For some goddamn reason robots have this hardcoded. Redefining it for our fragile friends here.
/mob/living/silicon/robot/drone/updatehealth(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
set_health(maxHealth - (getBruteLoss() + getFireLoss() + (suiciding ? getOxyLoss() : 0)))
update_stat("updatehealth([reason])", should_log)
diff --git a/code/modules/mob/living/silicon/robot/drone/drone_damage.dm b/code/modules/mob/living/silicon/robot/drone/drone_damage.dm
index e688d8a29a0..12e18ae6afd 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone_damage.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone_damage.dm
@@ -10,7 +10,7 @@
silent = FALSE,
affect_robotic = TRUE,
)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
. = STATUS_UPDATE_NONE
diff --git a/code/modules/mob/living/silicon/robot/drone/update_status.dm b/code/modules/mob/living/silicon/robot/drone/update_status.dm
index b02061c52a5..27433a25f16 100644
--- a/code/modules/mob/living/silicon/robot/drone/update_status.dm
+++ b/code/modules/mob/living/silicon/robot/drone/update_status.dm
@@ -2,7 +2,7 @@
//Standard robots use config for crit, which is somewhat excessive for these guys.
//Drones killed by damage will gib.
/mob/living/silicon/robot/drone/update_stat(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
if(health <= -maxHealth && stat != DEAD)
gib()
diff --git a/code/modules/mob/living/silicon/robot/robot_damage.dm b/code/modules/mob/living/silicon/robot/robot_damage.dm
index e15030bc38f..86c55c3945c 100644
--- a/code/modules/mob/living/silicon/robot/robot_damage.dm
+++ b/code/modules/mob/living/silicon/robot/robot_damage.dm
@@ -3,7 +3,7 @@
check_module_damage()
/mob/living/silicon/robot/getBruteLoss(repairable_only = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return 0
var/amount = 0
for(var/V in components)
@@ -13,7 +13,7 @@
return amount
/mob/living/silicon/robot/getFireLoss(repairable_only = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return 0
var/amount = 0
for(var/V in components)
@@ -118,7 +118,7 @@
silent = FALSE,
affect_robotic = TRUE,
)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
var/list/components = get_damageable_components()
@@ -178,7 +178,7 @@
silent = FALSE,
affect_robotic = TRUE,
)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
. = STATUS_UPDATE_NONE
diff --git a/code/modules/mob/living/silicon/robot/update_status.dm b/code/modules/mob/living/silicon/robot/update_status.dm
index f6a08209c75..2d67160c119 100644
--- a/code/modules/mob/living/silicon/robot/update_status.dm
+++ b/code/modules/mob/living/silicon/robot/update_status.dm
@@ -8,7 +8,7 @@
/mob/living/silicon/robot/update_stat(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
..()
update_headlamp()
return
diff --git a/code/modules/mob/living/simple_animal/damage_procs.dm b/code/modules/mob/living/simple_animal/damage_procs.dm
index 8776b541f44..bd09f332d62 100644
--- a/code/modules/mob/living/simple_animal/damage_procs.dm
+++ b/code/modules/mob/living/simple_animal/damage_procs.dm
@@ -18,7 +18,7 @@
damage_type = BRUTE,
forced = FALSE,
)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
var/oldbruteloss = bruteloss
bruteloss = 0
if(oldbruteloss != 0)
@@ -53,7 +53,7 @@
* Returns STATUS_UPDATE_HEALTH if any changes were made, STATUS_UPDATE_NONE otherwise
*/
/mob/living/simple_animal/proc/setHealth(amount, updating_health = TRUE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
var/oldbruteloss = bruteloss
bruteloss = 0
if(oldbruteloss != 0)
diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm
index 3b07a01d51d..ebf48eaaa54 100644
--- a/code/modules/mob/living/simple_animal/hostile/hostile.dm
+++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm
@@ -288,8 +288,8 @@
return FALSE
if(ismob(the_target)) //Target is in godmode, ignore it.
- var/mob/M = the_target
- if(M.status_flags & GODMODE)
+ var/mob/mob = the_target
+ if(HAS_TRAIT(mob, TRAIT_GODMODE))
return FALSE
if(see_invisible < the_target.invisibility) //Target's invisible to us, forget it
diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm
index 0085621a0ed..b22f8a4fcd4 100644
--- a/code/modules/mob/living/simple_animal/hostile/statue.dm
+++ b/code/modules/mob/living/simple_animal/hostile/statue.dm
@@ -45,12 +45,15 @@
move_force = MOVE_FORCE_EXTREMELY_STRONG
move_resist = MOVE_FORCE_EXTREMELY_STRONG
pull_force = MOVE_FORCE_EXTREMELY_STRONG
- status_flags = GODMODE // Cannot push also
+ status_flags = NONE
AI_delay_max = 0 SECONDS
var/cannot_be_seen = 1
var/mob/living/creator = null
+/mob/living/simple_animal/hostile/statue/Initialize(mapload)
+ . = ..()
+ ADD_TRAIT(src, TRAIT_GODMODE, INNATE_TRAIT)
// No movement while seen code.
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm
index bb78510afbf..f30d13bc118 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm
@@ -9,7 +9,7 @@
for(var/mob/living/H in view(src, vision_range))
if(H.stat == DEAD)
continue
- if(H.flags & GODMODE)
+ if(HAS_TRAIT(H, TRAIT_GODMODE))
continue
if(H.stat == UNCONSCIOUS && !stat_attack)
continue
diff --git a/code/modules/mob/living/simple_animal/hulk.dm b/code/modules/mob/living/simple_animal/hulk.dm
index d34b832487f..25fdc28c900 100644
--- a/code/modules/mob/living/simple_animal/hulk.dm
+++ b/code/modules/mob/living/simple_animal/hulk.dm
@@ -151,12 +151,12 @@
Mx.Scale(1.5)
RH.transform = Mx
- for(var/mob/M in contents)
- M.forceMove(loc)
- M.status_flags &= ~GODMODE
- if(isliving(M))
- var/mob/living/L = M
- L.Paralyse(30 SECONDS)
+ for(var/mob/mob in contents)
+ mob.forceMove(loc)
+ REMOVE_TRAIT(mob, TRAIT_GODMODE, UNIQUE_TRAIT_SOURCE(src))
+ if(isliving(mob))
+ var/mob/living/living = mob
+ living.Paralyse(30 SECONDS)
if(mind && original_body)
mind.transfer_to(original_body)
diff --git a/code/modules/mob/living/simple_animal/hulk_power.dm b/code/modules/mob/living/simple_animal/hulk_power.dm
index 4d0e2e71876..871c63769d6 100644
--- a/code/modules/mob/living/simple_animal/hulk_power.dm
+++ b/code/modules/mob/living/simple_animal/hulk_power.dm
@@ -40,7 +40,7 @@
playsound(user, 'sound/effects/bamf.ogg', CHANNEL_BUZZ)
Monster.original_body = user
user.forceMove(Monster)
- user.status_flags |= GODMODE
+ ADD_TRAIT(user, TRAIT_GODMODE, UNIQUE_TRAIT_SOURCE(Monster))
user.mind.transfer_to(Monster)
Monster.say(pick("RAAAAAAAARGH!", "HNNNNNNNNNGGGGGGH!", "GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", "AAAAAAARRRGH!" ))
diff --git a/code/modules/mob/living/simple_animal/shade.dm b/code/modules/mob/living/simple_animal/shade.dm
index d88e82e5152..722b147a76c 100644
--- a/code/modules/mob/living/simple_animal/shade.dm
+++ b/code/modules/mob/living/simple_animal/shade.dm
@@ -73,7 +73,7 @@
/mob/living/simple_animal/shade/sword/Initialize(mapload)
.=..()
- status_flags |= GODMODE
+ ADD_TRAIT(src, TRAIT_GODMODE, INNATE_TRAIT)
/mob/living/simple_animal/shade/talisman
faction = list("neutral")
@@ -83,7 +83,7 @@
/mob/living/simple_animal/shade/talisman/Initialize(mapload)
.=..()
- status_flags |= GODMODE
+ ADD_TRAIT(src, TRAIT_GODMODE, INNATE_TRAIT)
/mob/living/simple_animal/shade/talisman/New()
..()
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index d85b44b568f..7a73b31c7e7 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -231,7 +231,7 @@
/mob/living/simple_animal/update_stat(reason = "none given", should_log = FALSE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return ..()
if(stat != DEAD)
if(health <= 0)
@@ -446,8 +446,8 @@
if(see_invisible < the_target.invisibility)
return FALSE
if(ismob(the_target))
- var/mob/M = the_target
- if(M.status_flags & GODMODE)
+ var/mob/mob = the_target
+ if(HAS_TRAIT(mob, TRAIT_GODMODE))
return FALSE
if(isliving(the_target))
var/mob/living/L = the_target
diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm
index 9f4dada5506..b9b2db9bafa 100644
--- a/code/modules/mob/living/status_procs.dm
+++ b/code/modules/mob/living/status_procs.dm
@@ -101,7 +101,7 @@
SHOULD_CALL_PARENT(TRUE)
SHOULD_BE_PURE(TRUE)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return TRUE
if(force_apply) // Does not take priority over god mode? I guess
@@ -136,7 +136,7 @@
* Sets [confusion][/datum/status_effect/decaying/confusion] if it's higher than current.
*/
/mob/living/proc/Confused(amount)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SetConfused(max(get_confusion(), amount))
@@ -167,7 +167,7 @@
* Sets [disoriented][/datum/status_effect/decaying/disoriented] if it's higher than current.
*/
/mob/living/proc/Disoriented(amount)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SetDisoriented(max(get_disoriented(), amount))
@@ -183,7 +183,7 @@
* Sets [dizziness][/datum/status_effect/decaying/dizziness] if it's higher than zero.
*/
/mob/living/proc/SetDizzy(amount)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_DIZZINESS, amount)
@@ -216,7 +216,7 @@
* Sets [drowsiness][/datum/status_effect/decaying/drowsiness] if it's higher than zero.
*/
/mob/living/proc/SetDrowsy(amount)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_DROWSINESS, amount)
@@ -249,7 +249,7 @@
* Sets [drunkenness][/datum/status_effect/decaying/drunkenness] if it's higher than zero.
*/
/mob/living/proc/SetDrunk(amount)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_DRUNKENNESS, amount)
@@ -276,7 +276,7 @@
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_DRUGGED)
/mob/living/proc/Druggy(amount)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SetDruggy(max(AmountDruggy(), amount))
@@ -294,7 +294,7 @@
SetEyeBlind(max(AmountBlinded(), amount))
/mob/living/proc/SetEyeBlind(amount)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_BLINDED, amount)
@@ -309,7 +309,7 @@
SetEyeBlurry(max(AmountEyeBlurry(), amount))
/mob/living/proc/SetEyeBlurry(amount)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_BLURRY_EYES, amount)
@@ -324,7 +324,7 @@
SetHallucinate(max(AmountHallucinate(), amount))
/mob/living/proc/SetHallucinate(amount)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
amount = 0
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_HALLUCINATION, amount)
@@ -340,7 +340,7 @@
/mob/living/proc/SetJitter(amount)
// Jitter is also associated with stun
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_JITTER, amount)
@@ -358,7 +358,7 @@
/mob/living/proc/SetLoseBreath(amount)
if(HAS_TRAIT(src, TRAIT_NO_BREATH))
return
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_LOSE_BREATH, amount)
@@ -423,7 +423,7 @@
SetSilence(max(amount, AmountSilenced()))
/mob/living/proc/SetSilence(amount)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_SILENCED, amount)
@@ -434,7 +434,7 @@
SetAbsoluteSilence(max(amount, AmountAbsoluteSilenced()))
/mob/living/proc/SetAbsoluteSilence(amount)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_ABSSILENCED, amount)
@@ -457,7 +457,7 @@
/mob/living/proc/Sleeping(amount)
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount) & COMPONENT_NO_EFFECT)
return
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(S)
@@ -470,7 +470,7 @@
/mob/living/proc/SetSleeping(amount)
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount) & COMPONENT_NO_EFFECT)
return
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
if(frozen) // If the mob has been admin frozen, sleeping should not be changeable
return
@@ -489,7 +489,7 @@
/mob/living/proc/PermaSleeping() /// used for admin freezing.
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, -1) & COMPONENT_NO_EFFECT)
return
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(S)
@@ -517,7 +517,7 @@
return S
/mob/living/proc/SetSlowed(amount, slowdown_value)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
var/datum/status_effect/incapacitating/slowed/S = IsSlowed()
if(amount <= 0 || slowdown_value <= 0)
@@ -550,7 +550,7 @@
SetSlur(max(AmountSluring(), amount))
/mob/living/proc/SetSlur(amount)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_SLURRING, amount)
@@ -565,7 +565,7 @@
SetCultSlur(max(AmountCultSlurring(), amount))
/mob/living/proc/SetCultSlur(amount)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_CULT_SLUR, amount)
@@ -580,7 +580,7 @@
SetClockSlur(max(AmountClockSlurring(), amount))
/mob/living/proc/SetClockSlur(amount)
- if(status_flags & GODMODE)
+ if(HAS_TRAIT(src, TRAIT_GODMODE))
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_CLOCK_CULT_SLUR, amount)
diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm
index a3d9acc8a30..26485fcef30 100644
--- a/code/modules/power/tesla/energy_ball.dm
+++ b/code/modules/power/tesla/energy_ball.dm
@@ -147,18 +147,19 @@
if(!loc)
qdel(src)
-/obj/singularity/energy_ball/proc/dust_mobs(atom/A)
- if(isliving(A))
- var/mob/living/L = A
- if(L.incorporeal_move || L.status_flags & GODMODE)
- return
- if(!iscarbon(A))
+/obj/singularity/energy_ball/proc/dust_mobs(atom/atom)
+ if(!isliving(atom))
+ return
+ var/mob/living/living = atom
+ if(living.incorporeal_move || HAS_TRAIT(living, TRAIT_GODMODE))
+ return
+ if(!iscarbon(atom))
return
- for(var/obj/machinery/power/grounding_rod/GR in orange(src, 2))
- if(GR.anchored)
+ for(var/obj/machinery/power/grounding_rod/rod in orange(src, 2))
+ if(rod.anchored)
return
- var/mob/living/carbon/C = A
- C.dust()
+ var/mob/living/carbon/carbon = atom
+ carbon.dust()
/proc/tesla_zap(atom/source, zap_range = 3, power, explosive = FALSE, stun_mobs = TRUE)
. = source.dir
diff --git a/code/modules/shuttle/shuttle_smash.dm b/code/modules/shuttle/shuttle_smash.dm
index 0de18a15b4d..b70f4731e18 100644
--- a/code/modules/shuttle/shuttle_smash.dm
+++ b/code/modules/shuttle/shuttle_smash.dm
@@ -51,7 +51,7 @@
/mob/living/shuttle_crush_react(turf/stationary_turf, mobile_dir, skip_ungibable_search = FALSE)
- if(incorporeal_move || (status_flags & GODMODE))
+ if(incorporeal_move || HAS_TRAIT(src, TRAIT_GODMODE))
return FALSE
if(!isturf(loc))
forceMove(stationary_turf)
diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm
index a931b9cf6c0..359e70e225c 100644
--- a/code/modules/surgery/organs/blood.dm
+++ b/code/modules/surgery/organs/blood.dm
@@ -18,7 +18,7 @@
// Takes care blood loss and regeneration
/mob/living/carbon/human/handle_blood()
- if((status_flags & GODMODE) || HAS_TRAIT(src, TRAIT_NO_BLOOD))
+ if(HAS_TRAIT(src, TRAIT_GODMODE) || HAS_TRAIT(src, TRAIT_NO_BLOOD))
bleed_rate = 0
return
diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm
index 38f2604ade7..f348dd3cd8a 100644
--- a/code/modules/surgery/organs/lungs.dm
+++ b/code/modules/surgery/organs/lungs.dm
@@ -84,7 +84,7 @@
/obj/item/organ/internal/lungs/proc/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
- if((H.status_flags & GODMODE) || HAS_TRAIT(H, TRAIT_NO_BREATH))
+ if(HAS_TRAIT(H, TRAIT_GODMODE) || HAS_TRAIT(H, TRAIT_NO_BREATH))
return
if(!breath || (breath.total_moles() == 0))
diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm
index d044799cad6..4eacc7768a4 100644
--- a/code/modules/surgery/organs/organ_external.dm
+++ b/code/modules/surgery/organs/organ_external.dm
@@ -279,7 +279,7 @@
updating_health = TRUE,
silent = FALSE,
)
- if(owner?.status_flags & GODMODE)
+ if(owner && HAS_TRAIT(owner, TRAIT_GODMODE))
return FALSE
var/brute_was = brute_dam
@@ -667,7 +667,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if(!owner || cannot_amputate)
return
- if(owner.status_flags & GODMODE)
+ if(HAS_TRAIT(owner, TRAIT_GODMODE))
return
if(!silent)
@@ -893,7 +893,7 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/internal_bleeding(silent = FALSE)
if(owner)
- if(owner.status_flags & GODMODE)
+ if(HAS_TRAIT(owner, TRAIT_GODMODE))
return FALSE
if(HAS_TRAIT(owner, TRAIT_NO_BLOOD))
return FALSE
@@ -930,7 +930,7 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/fracture(silent = FALSE)
if(!CONFIG_GET(flag/bones_can_break))
return FALSE
- if(owner?.status_flags & GODMODE)
+ if(owner && HAS_TRAIT(owner, TRAIT_GODMODE))
return FALSE
if(is_robotic())
return FALSE
@@ -1087,7 +1087,7 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/mutate(silent = FALSE)
- if(owner?.status_flags & GODMODE)
+ if(owner && HAS_TRAIT(owner, TRAIT_GODMODE))
return
if(is_robotic())
return
@@ -1143,7 +1143,7 @@ Note that amputating the affected organ does in fact remove the infection from t
return FALSE
if(owner)
- if(owner.status_flags & GODMODE)
+ if(HAS_TRAIT(owner, TRAIT_GODMODE))
return FALSE
if(!silent)
@@ -1174,7 +1174,7 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/infection_check()
- if(owner?.status_flags & GODMODE)
+ if(owner && HAS_TRAIT(owner, TRAIT_GODMODE))
return FALSE
var/total_damage = brute_dam + burn_dam
if(total_damage)