From f6a99359a98dc95a5311be08e376ecddf9307171 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Sun, 27 Apr 2025 16:47:53 +0200 Subject: [PATCH] move invisibility to defines (#17612) * move Invisibility to defines * . * . --- code/ATMOSPHERICS/pipes/pipe_base.dm | 2 +- code/__defines/misc.dm | 2 ++ code/_helpers/unsorted.dm | 2 +- code/_onclick/hud/ability_screen_objects.dm | 4 ++-- code/_onclick/hud/human.dm | 6 +++--- .../emergency_shuttle_controller.dm | 4 ++-- code/game/dna/genes/monkey.dm | 4 ++-- .../changeling/powers/lesser_form.dm | 2 +- code/game/gamemodes/cult/construct_spells.dm | 2 +- code/game/gamemodes/cult/cultify/mob.dm | 4 ++-- code/game/gamemodes/cult/soulstone.dm | 2 +- code/game/gamemodes/technomancer/core_obj.dm | 4 ++-- .../gamemodes/technomancer/spells/chroma.dm | 2 +- .../technomancer/spells/energy_siphon.dm | 2 +- .../technomancer/spells/spawner/darkness.dm | 2 +- code/game/jobs/job_controller.dm | 2 +- code/game/json.dm | 2 +- code/game/machinery/Beacon.dm | 2 +- .../machinery/computer/specops_shuttle.dm | 2 +- code/game/machinery/magnet.dm | 2 +- code/game/machinery/navbeacon.dm | 2 +- code/game/mecha/mecha.dm | 2 +- code/game/objects/effects/bump_teleporter.dm | 2 +- .../effects/decals/Cleanable/humans.dm | 4 ++-- code/game/objects/effects/gibs.dm | 2 +- code/game/objects/effects/landmarks.dm | 4 ++-- code/game/objects/effects/manifest.dm | 2 +- .../effects/map_effects/map_effects.dm | 2 +- .../objects/effects/map_effects/portal.dm | 2 +- code/game/objects/effects/misc.dm | 2 +- code/game/objects/effects/prop/snake.dm | 2 +- code/game/objects/effects/step_triggers.dm | 4 ++-- code/game/objects/effects/wire_deleter.dm | 2 +- code/game/objects/effects/zone_divider.dm | 2 +- code/game/objects/items/falling_object_vr.dm | 2 +- code/game/objects/items/robot/robot_parts.dm | 2 +- code/game/objects/micro_structures.dm | 2 +- code/game/objects/mob_spawner_vr.dm | 2 +- .../objects/structures/ghost_pods/human.dm | 2 +- code/game/objects/structures/safe.dm | 2 +- code/modules/admin/admin_verbs.dm | 14 +++++++++---- code/modules/detectivework/tools/uvlight.dm | 2 +- code/modules/economy/trader.dm | 2 +- code/modules/entopics_vr/entopics.dm | 4 ++-- code/modules/maint_recycler/code/util.dm | 4 ++-- code/modules/mob/dead/observer/observer.dm | 13 ++++++------ code/modules/mob/death.dm | 6 +++--- code/modules/mob/freelook/eye.dm | 1 + code/modules/mob/living/carbon/alien/life.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 6 +++--- .../carbon/human/species/lleill/hanner.dm | 2 +- .../carbon/human/species/lleill/lleill.dm | 4 ++-- .../carbon/human/species/lleill/lleill_hud.dm | 2 +- .../carbon/human/species/shadekin/shadekin.dm | 2 +- .../human/species/shadekin/shadekin_hud.dm | 5 +---- .../carbon/human/species/station/station.dm | 4 ++-- code/modules/mob/living/life.dm | 2 +- code/modules/mob/living/living.dm | 2 +- code/modules/mob/living/silicon/ai/ai.dm | 2 +- .../silicon/robot/drone/swarm_abilities.dm | 2 +- code/modules/mob/living/silicon/robot/life.dm | 2 +- .../subtypes/animal/alien animals/stardog.dm | 6 +++--- code/modules/mob/mob_planes.dm | 6 +++--- code/modules/mob/new_player/new_player.dm | 2 +- code/modules/mob/transform_procs.dm | 16 +++++++-------- .../modular_computers/file_system/data.dm | 2 +- code/modules/multiz/_stubs.dm | 2 +- code/modules/multiz/misc.dm | 2 +- code/modules/multiz/pipes.dm | 2 +- code/modules/organs/blood.dm | 2 +- code/modules/overmap/spacetravel.dm | 2 +- code/modules/power/cable.dm | 2 +- .../power/fusion/fusion_particle_catcher.dm | 2 +- .../power/supermatter/setup_supermatter.dm | 2 +- code/modules/power/terminal.dm | 2 +- code/modules/projectiles/projectile/beams.dm | 2 +- code/modules/projectiles/projectile/change.dm | 2 +- code/modules/projectiles/projectile/trace.dm | 2 +- .../recycling/disposal-construction.dm | 2 +- code/modules/recycling/disposal.dm | 6 +++--- code/modules/rogueminer_vr/landmarks.dm | 4 ++-- code/modules/shieldgen/energy_shield.dm | 2 +- code/modules/shieldgen/shield_diffuser.dm | 2 +- code/modules/shuttles/landmarks.dm | 2 +- code/modules/shuttles/shuttle_specops.dm | 2 +- .../spells/aoe_turf/conjure/forcewall.dm | 2 +- .../tgui/modules/appearance_changer.dm | 2 +- .../xenoarcheaology/effects/forcefield.dm | 4 ++-- maps/common/common_things.dm | 20 +++++++++---------- maps/expedition_vr/alienship/_alienship.dm | 2 +- maps/offmap_vr/common_offmaps.dm | 2 +- maps/redgate/falls/atoll_objs.dm | 2 +- 92 files changed, 150 insertions(+), 143 deletions(-) diff --git a/code/ATMOSPHERICS/pipes/pipe_base.dm b/code/ATMOSPHERICS/pipes/pipe_base.dm index 2d2ec01aa7..a394b5db0f 100644 --- a/code/ATMOSPHERICS/pipes/pipe_base.dm +++ b/code/ATMOSPHERICS/pipes/pipe_base.dm @@ -187,7 +187,7 @@ /obj/machinery/atmospherics/pipe/hide(var/i) if(istype(loc, /turf/simulated)) - invisibility = i ? 101 : 0 + invisibility = i ? INVISIBILITY_ABSTRACT : INVISIBILITY_NONE update_icon() /obj/machinery/atmospherics/pipe/process() diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index e0411079ee..12b7c9acd9 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -5,6 +5,7 @@ #define TRANSITIONEDGE 1 // Distance from edge to move to another z-level. // Invisibility constants. These should only be used for TRUE invisibility, AKA nothing living players touch +#define INVISIBILITY_NONE 0 #define INVISIBILITY_LIGHTING 20 #define INVISIBILITY_LEVEL_ONE 35 #define INVISIBILITY_LEVEL_TWO 45 @@ -21,6 +22,7 @@ #define SEE_INVISIBLE_OBSERVER 61 #define SEE_INVISIBLE_MINIMUM 5 +#define INVISIBILITY_BADMIN 99 // Used for objects that badmins should see #define INVISIBILITY_MAXIMUM 100 #define INVISIBILITY_ABSTRACT 101 //only used for abstract objects, things that are not really there. diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 5af6b22c7d..72979f217c 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -1234,7 +1234,7 @@ var/mob/dview/dview_mob dview_mob.loc = null /mob/dview - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT density = FALSE anchored = TRUE diff --git a/code/_onclick/hud/ability_screen_objects.dm b/code/_onclick/hud/ability_screen_objects.dm index 5f4bbec8a2..c13e5cf979 100644 --- a/code/_onclick/hud/ability_screen_objects.dm +++ b/code/_onclick/hud/ability_screen_objects.dm @@ -100,9 +100,9 @@ /obj/screen/movable/ability_master/update_icon() if(ability_objects.len) - invisibility = 0 + invisibility = INVISIBILITY_NONE else - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT /obj/screen/movable/ability_master/proc/add_ability(var/name_given) if(!name) return diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 5536de74d4..6f2a0f8367 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -416,19 +416,19 @@ regenerate_icons() /obj/screen/ling - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT /obj/screen/ling/chems name = "chemical storage" icon_state = "power_display" /obj/screen/wizard - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT /obj/screen/wizard/instability name = "instability" icon_state = "instability-1" - invisibility = 0 + invisibility = INVISIBILITY_NONE /obj/screen/wizard/energy name = "energy" diff --git a/code/controllers/emergency_shuttle_controller.dm b/code/controllers/emergency_shuttle_controller.dm index 9bdf04629d..c3676d5ea4 100644 --- a/code/controllers/emergency_shuttle_controller.dm +++ b/code/controllers/emergency_shuttle_controller.dm @@ -271,10 +271,10 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle = new return /obj/effect/starender - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT /obj/effect/starspawner - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT var/spawndir = SOUTH var/spawning = 0 diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm index 08bc48383f..a868e3c721 100644 --- a/code/game/dna/genes/monkey.dm +++ b/code/game/dna/genes/monkey.dm @@ -26,7 +26,7 @@ M.transforming = 1 M.canmove = 0 M.icon = null - M.invisibility = 101 + M.invisibility = INVISIBILITY_ABSTRACT var/atom/movable/overlay/animation = new( M.loc ) animation.icon_state = "blank" animation.icon = 'icons/mob/mob.dmi' @@ -94,7 +94,7 @@ M.transforming = 1 M.canmove = 0 M.icon = null - M.invisibility = 101 + M.invisibility = INVISIBILITY_ABSTRACT var/atom/movable/overlay/animation = new( M.loc ) animation.icon_state = "blank" animation.icon = 'icons/mob/mob.dmi' diff --git a/code/game/gamemodes/changeling/powers/lesser_form.dm b/code/game/gamemodes/changeling/powers/lesser_form.dm index ff8b553985..be438634aa 100644 --- a/code/game/gamemodes/changeling/powers/lesser_form.dm +++ b/code/game/gamemodes/changeling/powers/lesser_form.dm @@ -68,7 +68,7 @@ C.canmove = 0 C.icon = null C.cut_overlays() - C.invisibility = 101 + C.invisibility = INVISIBILITY_ABSTRACT var/atom/movable/overlay/animation = new /atom/movable/overlay( C.loc ) animation.icon_state = "blank" animation.icon = 'icons/mob/mob.dmi' diff --git a/code/game/gamemodes/cult/construct_spells.dm b/code/game/gamemodes/cult/construct_spells.dm index ba63cff181..eaea934d6c 100644 --- a/code/game/gamemodes/cult/construct_spells.dm +++ b/code/game/gamemodes/cult/construct_spells.dm @@ -167,7 +167,7 @@ icon_state = "m_shield_cult" light_color = "#B40000" light_range = 2 - invisibility = 0 + invisibility = INVISIBILITY_NONE /obj/effect/forcefield/cult/cultify() return diff --git a/code/game/gamemodes/cult/cultify/mob.dm b/code/game/gamemodes/cult/cultify/mob.dm index ad9394fe35..dd2f1ba6d1 100644 --- a/code/game/gamemodes/cult/cultify/mob.dm +++ b/code/game/gamemodes/cult/cultify/mob.dm @@ -11,7 +11,7 @@ icon = 'icons/mob/mob.dmi' icon_state = "ghost-narsie" overlays = 0 - invisibility = 0 + invisibility = INVISIBILITY_NONE to_chat(src, span_sinister("Even as a non-corporal being, you can feel Nar-Sie's presence altering you. You are now visible to everyone.")) /mob/living/cultify() @@ -25,7 +25,7 @@ G.icon = 'icons/mob/mob.dmi' G.icon_state = "ghost-narsie" G.overlays = 0 - G.invisibility = 0 + G.invisibility = INVISIBILITY_NONE to_chat(G, span_sinister("You feel relieved as what's left of your soul finally escapes its prison of flesh.")) cult.harvested += G.mind diff --git a/code/game/gamemodes/cult/soulstone.dm b/code/game/gamemodes/cult/soulstone.dm index 8593779b12..ee8ab147d8 100644 --- a/code/game/gamemodes/cult/soulstone.dm +++ b/code/game/gamemodes/cult/soulstone.dm @@ -123,7 +123,7 @@ T.drop_from_inventory(W) new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton - T.invisibility = 101 + T.invisibility = INVISIBILITY_ABSTRACT var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc ) animation.icon_state = "blank" diff --git a/code/game/gamemodes/technomancer/core_obj.dm b/code/game/gamemodes/technomancer/core_obj.dm index ec7e9df6aa..02baf4a953 100644 --- a/code/game/gamemodes/technomancer/core_obj.dm +++ b/code/game/gamemodes/technomancer/core_obj.dm @@ -213,12 +213,12 @@ if(client && hud_used) if(istype(back, /obj/item/technomancer_core)) //I reckon there's a better way of doing this. var/obj/item/technomancer_core/core = back - wiz_energy_display.invisibility = 0 + wiz_energy_display.invisibility = INVISIBILITY_NONE var/ratio = core.energy / core.max_energy ratio = max(round(ratio, 0.05) * 100, 5) wiz_energy_display.icon_state = "wiz_energy[ratio]" else - wiz_energy_display.invisibility = 101 + wiz_energy_display.invisibility = INVISIBILITY_ABSTRACT //Resonance Aperture diff --git a/code/game/gamemodes/technomancer/spells/chroma.dm b/code/game/gamemodes/technomancer/spells/chroma.dm index 908ea0acc0..d91b39b95e 100644 --- a/code/game/gamemodes/technomancer/spells/chroma.dm +++ b/code/game/gamemodes/technomancer/spells/chroma.dm @@ -21,7 +21,7 @@ /obj/effect/temporary_effect/chroma name = "chroma" desc = "How are you examining what which cannot be seen?" - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT time_to_die = 2 MINUTES //Despawn after this time, if set. /obj/effect/temporary_effect/chroma/Initialize(mapload, var/new_color = "#FFFFFF") diff --git a/code/game/gamemodes/technomancer/spells/energy_siphon.dm b/code/game/gamemodes/technomancer/spells/energy_siphon.dm index 4ed12029be..bc89d629ed 100644 --- a/code/game/gamemodes/technomancer/spells/energy_siphon.dm +++ b/code/game/gamemodes/technomancer/spells/energy_siphon.dm @@ -182,7 +182,7 @@ on_impact(A) density = FALSE - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT qdel(src) return 1 diff --git a/code/game/gamemodes/technomancer/spells/spawner/darkness.dm b/code/game/gamemodes/technomancer/spells/spawner/darkness.dm index b424e49bc0..e586fe1501 100644 --- a/code/game/gamemodes/technomancer/spells/spawner/darkness.dm +++ b/code/game/gamemodes/technomancer/spells/spawner/darkness.dm @@ -25,7 +25,7 @@ /obj/effect/temporary_effect/darkness name = "darkness" time_to_die = 2 MINUTES - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT light_range = 6 light_power = -20 light_on = TRUE diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index b11cf840f3..4167a74cb4 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -422,7 +422,7 @@ var/global/datum/controller/occupations/job_master // Implants get special treatment if(G.slot == "implant") var/obj/item/implant/I = G.spawn_item(H, H.client.prefs.gear[G.display_name]) - I.invisibility = 100 + I.invisibility = INVISIBILITY_MAXIMUM I.implant_loadout(H) continue diff --git a/code/game/json.dm b/code/game/json.dm index 6c57e8dd5d..5a0e62b0aa 100644 --- a/code/game/json.dm +++ b/code/game/json.dm @@ -83,7 +83,7 @@ var/makejson = 1 //temp world.Reboot("Switching to [newmap]") /obj/mapinfo - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT var/mapname = "thismap" var/decks = 4 /proc/GetMapInfo() diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm index 7f18d06231..cbdbfffd56 100644 --- a/code/game/machinery/Beacon.dm +++ b/code/game/machinery/Beacon.dm @@ -26,7 +26,7 @@ // update the invisibility and icon /obj/machinery/bluespace_beacon/hide(var/intact) - invisibility = intact ? 101 : 0 + invisibility = intact ? INVISIBILITY_ABSTRACT : INVISIBILITY_NONE update_icon() // update the icon_state diff --git a/code/game/machinery/computer/specops_shuttle.dm b/code/game/machinery/computer/specops_shuttle.dm index 8840b5db1a..e87c5e1232 100644 --- a/code/game/machinery/computer/specops_shuttle.dm +++ b/code/game/machinery/computer/specops_shuttle.dm @@ -165,7 +165,7 @@ var/specops_shuttle_timeleft = 0 for(var/obj/effect/landmark/L in landmarks_list) if(L.name == "Marauder Exit") var/obj/effect/portal/P = new(L.loc) - P.invisibility = 101//So it is not seen by anyone. + P.invisibility = INVISIBILITY_ABSTRACT//So it is not seen by anyone. P.failchance = 0//So it has no fail chance when teleporting. P.target = pick(spawn_marauder)//Where the marauder will arrive. spawn_marauder.Remove(P.target) diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 75e7f88a2b..5f27c946d5 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -40,7 +40,7 @@ // update the invisibility and icon /obj/machinery/magnetic_module/hide(var/intact) - invisibility = intact ? 101 : 0 + invisibility = intact ? INVISIBILITY_ABSTRACT : INVISIBILITY_NONE update_icon() // update the icon_state diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 7a7a540dab..09bf6c021d 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -54,7 +54,7 @@ GLOBAL_LIST_EMPTY(navbeacons) // no I don't like putting this in, but it will do // called when turf state changes // hide the object if turf is intact /obj/machinery/navbeacon/hide(var/intact) - invisibility = intact ? 101 : 0 + invisibility = intact ? INVISIBILITY_ABSTRACT : INVISIBILITY_NONE update_icon() // update the icon_state diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 35390ee7de..2b3e60dca5 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -2667,7 +2667,7 @@ var/duration = text2num(href_list["duration"]) var/mob/living/silicon/ai/O = new /mob/living/silicon/ai(src) var/cur_occupant = src.occupant - O.invisibility = 0 + O.invisibility = INVISIBILITY_NONE O.canmove = 1 O.name = AI.name O.real_name = AI.real_name diff --git a/code/game/objects/effects/bump_teleporter.dm b/code/game/objects/effects/bump_teleporter.dm index b374c1a5ac..f12f5acc34 100644 --- a/code/game/objects/effects/bump_teleporter.dm +++ b/code/game/objects/effects/bump_teleporter.dm @@ -6,7 +6,7 @@ GLOBAL_LIST_EMPTY(bump_teleporters) icon_state = "x2" var/id = null //id of this bump_teleporter. var/id_target = null //id of bump_teleporter which this moves you to. - invisibility = 101 //nope, can't see this + invisibility = INVISIBILITY_ABSTRACT //nope, can't see this anchored = TRUE density = TRUE opacity = 0 diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 22bce1ad34..94c8d2d0b9 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -33,8 +33,8 @@ var/global/list/image/splatter_cache=list() /obj/effect/decal/cleanable/blood/clean_blood() fluorescent = 0 - if(invisibility != 100) - invisibility = 100 + if(invisibility != INVISIBILITY_MAXIMUM) + invisibility = INVISIBILITY_MAXIMUM amount = 0 ..(ignore=1) diff --git a/code/game/objects/effects/gibs.dm b/code/game/objects/effects/gibs.dm index 96859c4aed..b48fe45d46 100644 --- a/code/game/objects/effects/gibs.dm +++ b/code/game/objects/effects/gibs.dm @@ -8,7 +8,7 @@ var/list/gibdirections = list() //of lists var/fleshcolor //Used for gibbed humans. var/bloodcolor //Used for gibbed humans. - invisibility = 99 // So a badmin can go view these by changing their see_invisible. + invisibility = INVISIBILITY_BADMIN // So a badmin can go view these by changing their see_invisible. icon = 'icons/effects/map_effects.dmi' icon_state = "gibspawn" diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 3fd078827d..30b3f475b0 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -5,13 +5,13 @@ anchored = TRUE unacidable = TRUE simulated = FALSE - invisibility = 100 + invisibility = INVISIBILITY_MAXIMUM var/delete_me = FALSE /obj/effect/landmark/Initialize(mapload) . = ..() tag = text("landmark*[]", name) - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT switch(name) //some of these are probably obsolete if("monkey") diff --git a/code/game/objects/effects/manifest.dm b/code/game/objects/effects/manifest.dm index 6aae6168a6..99a1a0c937 100644 --- a/code/game/objects/effects/manifest.dm +++ b/code/game/objects/effects/manifest.dm @@ -7,7 +7,7 @@ /obj/effect/manifest/Initialize(mapload) . = ..() - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT /obj/effect/manifest/proc/manifest() var/dat = span_bold("Crew Manifest") + ":
" diff --git a/code/game/objects/effects/map_effects/map_effects.dm b/code/game/objects/effects/map_effects/map_effects.dm index babf67054e..d4f1d01332 100644 --- a/code/game/objects/effects/map_effects/map_effects.dm +++ b/code/game/objects/effects/map_effects/map_effects.dm @@ -2,7 +2,7 @@ // Players cannot see or interact with these. /obj/effect/map_effect anchored = TRUE - invisibility = 99 // So a badmin can go view these by changing their see_invisible. + invisibility = INVISIBILITY_BADMIN // So a badmin can go view these by changing their see_invisible. icon = 'icons/effects/map_effects.dmi' // Below vars concern check_for_player_proximity() and is used to not waste effort if nobody is around to appreciate the effects. diff --git a/code/game/objects/effects/map_effects/portal.dm b/code/game/objects/effects/map_effects/portal.dm index 7dd6219fd7..e8bf110d74 100644 --- a/code/game/objects/effects/map_effects/portal.dm +++ b/code/game/objects/effects/map_effects/portal.dm @@ -46,7 +46,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec /obj/effect/map_effect/portal name = "portal subtype" - invisibility = 0 + invisibility = INVISIBILITY_NONE opacity = TRUE plane = TURF_PLANE layer = ABOVE_TURF_LAYER diff --git a/code/game/objects/effects/misc.dm b/code/game/objects/effects/misc.dm index b8adc6f1f0..65186e7525 100644 --- a/code/game/objects/effects/misc.dm +++ b/code/game/objects/effects/misc.dm @@ -11,7 +11,7 @@ name = "self deleting effect" desc = "How are you examining what which cannot be seen?" icon = 'icons/effects/effects.dmi' - invisibility = 0 + invisibility = INVISIBILITY_NONE var/time_to_die = 10 SECONDS // Afer which, it will delete itself. /obj/effect/temporary_effect/Initialize(mapload) diff --git a/code/game/objects/effects/prop/snake.dm b/code/game/objects/effects/prop/snake.dm index 91503042bf..463c5dc4ca 100644 --- a/code/game/objects/effects/prop/snake.dm +++ b/code/game/objects/effects/prop/snake.dm @@ -6,7 +6,7 @@ icon_state = "arrow_omni" - invisibility = 100 + invisibility = INVISIBILITY_MAXIMUM // The atom which created this. var/atom/movable/creator diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm index 65fd34b9a8..3e1fb40a33 100644 --- a/code/game/objects/effects/step_triggers.dm +++ b/code/game/objects/effects/step_triggers.dm @@ -5,7 +5,7 @@ GLOBAL_LIST_EMPTY(mapped_autostrips_mob) /obj/effect/step_trigger var/affect_ghosts = 0 var/stopper = 1 // stops throwers - invisibility = 99 // nope cant see this shit + invisibility = INVISIBILITY_BADMIN // nope cant see this shit plane = ABOVE_PLANE anchored = TRUE icon = 'icons/mob/screen1.dmi' //VS Edit @@ -333,7 +333,7 @@ But for now, for what it's been used for, it works. unacidable = 1 layer = 99 anchored = 1 - invisibility = 99 + invisibility = INVISIBILITY_BADMIN /obj/effect/autostriptarget/Initialize(mapload) diff --git a/code/game/objects/effects/wire_deleter.dm b/code/game/objects/effects/wire_deleter.dm index 1924ab7b2a..4cdf6647a1 100644 --- a/code/game/objects/effects/wire_deleter.dm +++ b/code/game/objects/effects/wire_deleter.dm @@ -5,7 +5,7 @@ anchored = TRUE unacidable = TRUE simulated = FALSE - invisibility = 100 + invisibility = INVISIBILITY_MAXIMUM /obj/effect/wire_deleter/Initialize(mapload) . = ..() diff --git a/code/game/objects/effects/zone_divider.dm b/code/game/objects/effects/zone_divider.dm index fef0743f83..c05edbfcf1 100644 --- a/code/game/objects/effects/zone_divider.dm +++ b/code/game/objects/effects/zone_divider.dm @@ -3,7 +3,7 @@ name = "zone divider" icon = 'icons/mob/screen1.dmi' icon_state = "x3" - invisibility = 101 //nope, can't see this + invisibility = INVISIBILITY_ABSTRACT //nope, can't see this anchored = TRUE density = FALSE opacity = 0 diff --git a/code/game/objects/items/falling_object_vr.dm b/code/game/objects/items/falling_object_vr.dm index 19d175f1ef..1ee71e9918 100644 --- a/code/game/objects/items/falling_object_vr.dm +++ b/code/game/objects/items/falling_object_vr.dm @@ -1,7 +1,7 @@ /obj/effect/falling_effect name = DEVELOPER_WARNING_NAME desc = "no data" - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT anchored = TRUE density = FALSE unacidable = TRUE diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 7c5d4bc617..be65f5abce 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -199,7 +199,7 @@ O.mmi = W O.post_mmi_setup() - O.invisibility = 0 + O.invisibility = INVISIBILITY_NONE O.custom_name = created_name O.updatename("Default") diff --git a/code/game/objects/micro_structures.dm b/code/game/objects/micro_structures.dm index cbd13f68db..6e769f1c30 100644 --- a/code/game/objects/micro_structures.dm +++ b/code/game/objects/micro_structures.dm @@ -448,7 +448,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels) name = "mouse hole spawner" icon = 'icons/obj/landmark_vr.dmi' icon_state = "blue-x" - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT var/chance_to_spawn = 25 diff --git a/code/game/objects/mob_spawner_vr.dm b/code/game/objects/mob_spawner_vr.dm index e0593cbe0f..cb35117f8e 100644 --- a/code/game/objects/mob_spawner_vr.dm +++ b/code/game/objects/mob_spawner_vr.dm @@ -154,7 +154,7 @@ It also makes it so a ghost wont know where all the goodies/mobs are. total_spawns = -1 destructible = 0 anchored = TRUE - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT spawn_types = list( /mob/living/simple_mob/animal/passive/gaslamp = 20, // /mob/living/simple_mob/vore/otie/feral = 10, diff --git a/code/game/objects/structures/ghost_pods/human.dm b/code/game/objects/structures/ghost_pods/human.dm index 8841ac998b..ae1a10ef2a 100644 --- a/code/game/objects/structures/ghost_pods/human.dm +++ b/code/game/objects/structures/ghost_pods/human.dm @@ -11,7 +11,7 @@ density = FALSE ghost_query_type = /datum/ghost_query/stowaway anchored = TRUE - invisibility = 60 + invisibility = INVISIBILITY_OBSERVER var/occupant_type = "stowaway" diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 3bd50f5f00..03d050e010 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -185,7 +185,7 @@ FLOOR SAFES update_icon() /obj/structure/safe/floor/hide(var/intact) - invisibility = intact ? 101 : 0 + invisibility = intact ? INVISIBILITY_ABSTRACT : INVISIBILITY_NONE /obj/structure/safe/floor/hides_under_flooring() return 1 diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index aeeda5712e..61279418a0 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -83,15 +83,21 @@ set name = "Invisimin" set category = "Admin.Game" set desc = "Toggles ghost-like invisibility (Don't abuse this)" + if(holder && mob) + if(mob.invisibility > INVISIBILITY_OBSERVER) + to_chat(mob, span_warning("You can't use this, your current invisibility level ([mob.invisibility]) is above the observer level ([INVISIBILITY_OBSERVER]).")) + return + if(mob.invisibility == INVISIBILITY_OBSERVER) mob.invisibility = initial(mob.invisibility) to_chat(mob, span_filter_system(span_danger("Invisimin off. Invisibility reset."))) mob.alpha = max(mob.alpha + 100, 255) - else - mob.invisibility = INVISIBILITY_OBSERVER - to_chat(mob, span_filter_system(span_boldnotice("Invisimin on. You are now as invisible as a ghost."))) - mob.alpha = max(mob.alpha - 100, 0) + return + + mob.invisibility = INVISIBILITY_OBSERVER + to_chat(mob, span_filter_system(span_boldnotice("Invisimin on. You are now as invisible as a ghost."))) + mob.alpha = max(mob.alpha - 100, 0) /client/proc/player_panel() diff --git a/code/modules/detectivework/tools/uvlight.dm b/code/modules/detectivework/tools/uvlight.dm index 29aca9fe31..fec338a5d1 100644 --- a/code/modules/detectivework/tools/uvlight.dm +++ b/code/modules/detectivework/tools/uvlight.dm @@ -63,7 +63,7 @@ A.fluorescent = 2 //To prevent light crosstalk. if(A.invisibility) scanned[A] = A.invisibility - A.invisibility = 0 + A.invisibility = INVISIBILITY_NONE stored_alpha[A] = A.alpha A.alpha = use_alpha if(istype(A, /obj/item)) diff --git a/code/modules/economy/trader.dm b/code/modules/economy/trader.dm index cbfe3dac1b..485ba91b3b 100644 --- a/code/modules/economy/trader.dm +++ b/code/modules/economy/trader.dm @@ -265,7 +265,7 @@ desc = "A trader can be moved to here!" icon = 'icons/obj/landmark_vr.dmi' icon_state = "blue-x" - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT mouse_opacity = 0 density = 0 anchored = 1 diff --git a/code/modules/entopics_vr/entopics.dm b/code/modules/entopics_vr/entopics.dm index d31bfb78f8..18941311a1 100644 --- a/code/modules/entopics_vr/entopics.dm +++ b/code/modules/entopics_vr/entopics.dm @@ -96,7 +96,7 @@ var/global/list/alt_farmanimals = list() return my_image.mouse_opacity = 1 - my_image.invisibility = 0 + my_image.invisibility = INVISIBILITY_NONE my_image.alpha = alpha my_image.override = override @@ -105,7 +105,7 @@ var/global/list/alt_farmanimals = list() return my_image.mouse_opacity = 0 - my_image.invisibility = 101 + my_image.invisibility = INVISIBILITY_ABSTRACT my_image.alpha = 0 my_image.override = FALSE diff --git a/code/modules/maint_recycler/code/util.dm b/code/modules/maint_recycler/code/util.dm index 0e1efcf2eb..be078dc48b 100644 --- a/code/modules/maint_recycler/code/util.dm +++ b/code/modules/maint_recycler/code/util.dm @@ -26,7 +26,7 @@ GLOBAL_LIST_EMPTY(recycler_locations) /obj/effect/recycler_beacon icon = 'code/modules/maint_recycler/icons/maint_recycler.dmi' icon_state = "marker" - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT mouse_opacity = 0 density = 0 anchored = 1 @@ -39,7 +39,7 @@ GLOBAL_LIST_EMPTY(recycler_locations) /obj/effect/recycler_vendor_beacon icon = 'code/modules/maint_recycler/icons/maint_vendor.dmi' icon_state = "marker" - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT pixel_x = -8 mouse_opacity = 0 density = 0 diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index cb437ff049..d666a38d99 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -93,17 +93,18 @@ var/last_revive_notification = null // world.time of last notification, used to avoid spamming players from defibs or cloners. var/cleanup_timer // Refernece to a timer that will delete this mob if no client returns -/mob/observer/dead/Initialize(mapload, aghost = FALSE) - - appearance = loc invisibility = INVISIBILITY_OBSERVER layer = BELOW_MOB_LAYER plane = PLANE_GHOSTS alpha = 127 + sight = SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF + see_invisible = SEE_INVISIBLE_OBSERVER + +/mob/observer/dead/Initialize(mapload, aghost = FALSE) + + appearance = loc admin_ghosted = aghost - sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF - see_invisible = SEE_INVISIBLE_OBSERVER see_in_dark = world.view //I mean. I don't even know if byond has occlusion culling... but... var/turf/T @@ -900,7 +901,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp to_chat(src, span_info("You are now visible!")) plane = (plane == PLANE_GHOSTS) ? PLANE_WORLD : PLANE_GHOSTS - invisibility = (plane == PLANE_WORLD) ? 0 : INVISIBILITY_OBSERVER + invisibility = (plane == PLANE_WORLD) ? INVISIBILITY_NONE : INVISIBILITY_OBSERVER // Give the ghost a cult icon which should be visible only to itself toggle_icon("cult") diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 0c843de3fc..1096deb288 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -6,7 +6,7 @@ transforming = 1 canmove = 0 icon = null - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT update_canmove() dead_mob_list -= src @@ -32,7 +32,7 @@ transforming = 1 canmove = 0 icon = null - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT animation = new(loc) animation.icon_state = "blank" @@ -53,7 +53,7 @@ transforming = 1 canmove = 0 icon = null - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT animation = new(loc) animation.icon_state = "blank" diff --git a/code/modules/mob/freelook/eye.dm b/code/modules/mob/freelook/eye.dm index 262ffe5521..1cf279ddba 100644 --- a/code/modules/mob/freelook/eye.dm +++ b/code/modules/mob/freelook/eye.dm @@ -17,6 +17,7 @@ see_in_dark = 7 status_flags = GODMODE plane = PLANE_AI_EYE + invisibility = INVISIBILITY_EYE var/mob/owner = null var/list/visibleChunks = list() diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index e84ad2e8b1..b8fb2c550f 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -1,7 +1,7 @@ // Alien larva are quite simple. /mob/living/carbon/alien/Life() - set invisibility = 0 + set invisibility = INVISIBILITY_NONE if (transforming) return if(!loc) return diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 9397e45448..725902f322 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -20,7 +20,7 @@ var/chemical_darksight = 0 /mob/living/carbon/human/Life() - set invisibility = 0 + set invisibility = INVISIBILITY_NONE set background = BACKGROUND_ENABLED if (transforming) @@ -1868,7 +1868,7 @@ if(mind && mind.changeling) mind.changeling.regenerate() if(hud_used) - ling_chem_display.invisibility = 0 + ling_chem_display.invisibility = INVISIBILITY_NONE // ling_chem_display.maptext = "
[round(mind.changeling.chem_charges)]
" switch(mind.changeling.chem_storage) if(1 to 50) @@ -1907,7 +1907,7 @@ ling_chem_display.icon_state = "ling_chems80e" else if(mind && hud_used) - ling_chem_display.invisibility = 101 + ling_chem_display.invisibility = INVISIBILITY_ABSTRACT /mob/living/carbon/human/handle_shock() ..() diff --git a/code/modules/mob/living/carbon/human/species/lleill/hanner.dm b/code/modules/mob/living/carbon/human/species/lleill/hanner.dm index c8eb09b829..3582a00639 100644 --- a/code/modules/mob/living/carbon/human/species/lleill/hanner.dm +++ b/code/modules/mob/living/carbon/human/species/lleill/hanner.dm @@ -129,7 +129,7 @@ ) spawn (50) if(H.lleill_display) - H.lleill_display.invisibility = 0 + H.lleill_display.invisibility = INVISIBILITY_NONE H.lleill_display.icon_state = "lleill-4" /datum/species/shapeshifter/hanner/add_inherent_verbs(var/mob/living/carbon/human/H) diff --git a/code/modules/mob/living/carbon/human/species/lleill/lleill.dm b/code/modules/mob/living/carbon/human/species/lleill/lleill.dm index d285941ac8..a2ea00c1ab 100644 --- a/code/modules/mob/living/carbon/human/species/lleill/lleill.dm +++ b/code/modules/mob/living/carbon/human/species/lleill/lleill.dm @@ -219,13 +219,13 @@ ) spawn (50) if(H.lleill_display) - H.lleill_display.invisibility = 0 + H.lleill_display.invisibility = INVISIBILITY_NONE H.lleill_display.icon_state = "lleill-4" /datum/species/proc/update_lleill_hud(var/mob/living/carbon/human/H) var/relative_energy = ((lleill_energy/lleill_energy_max)*100) if(H.lleill_display) - H.lleill_display.invisibility = 0 + H.lleill_display.invisibility = INVISIBILITY_NONE switch(relative_energy) if(0 to 24) H.lleill_display.icon_state = "lleill-0" diff --git a/code/modules/mob/living/carbon/human/species/lleill/lleill_hud.dm b/code/modules/mob/living/carbon/human/species/lleill/lleill_hud.dm index cbf1aafbcc..4d685d06e4 100644 --- a/code/modules/mob/living/carbon/human/species/lleill/lleill_hud.dm +++ b/code/modules/mob/living/carbon/human/species/lleill/lleill_hud.dm @@ -1,7 +1,7 @@ /obj/screen/lleill name = "glamour" icon = 'icons/mob/lleill_hud.dmi' - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT /obj/screen/movable/ability_master/lleill diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm index 1cb2502a0d..15e818fa54 100644 --- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm +++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm @@ -222,7 +222,7 @@ var/l_icon = 0 var/e_icon = 0 - H.shadekin_display.invisibility = 0 + H.shadekin_display.invisibility = INVISIBILITY_NONE if(T) var/brightness = T.get_lumcount() //Brightness in 0.0 to 1.0 var/darkness = 1-brightness //Invert diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_hud.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_hud.dm index ae4b08941d..820fbb0c6b 100644 --- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_hud.dm +++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_hud.dm @@ -1,10 +1,7 @@ /obj/screen/shadekin name = "shadekin status" icon = 'icons/mob/shadekin_hud.dmi' - invisibility = 101 - - - + invisibility = INVISIBILITY_ABSTRACT /obj/screen/movable/ability_master/shadekin name = "Shadekin Abilities" diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index 18d143caab..205b09b8df 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -1980,7 +1980,7 @@ /datum/species/xenochimera/proc/update_xenochimera_hud(var/mob/living/carbon/human/H, var/danger, var/feral) if(H.xenochimera_danger_display) - H.xenochimera_danger_display.invisibility = 0 + H.xenochimera_danger_display.invisibility = INVISIBILITY_NONE if(danger && feral) H.xenochimera_danger_display.icon_state = "danger11" else if(danger && !feral) @@ -1994,7 +1994,7 @@ /obj/screen/xenochimera icon = 'icons/mob/chimerahud.dmi' - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT /obj/screen/xenochimera/danger_level name = "danger level" diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 26958e1001..6e80f1ea50 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -1,5 +1,5 @@ /mob/living/Life() - set invisibility = 0 + set invisibility = INVISIBILITY_NONE set background = BACKGROUND_ENABLED ..() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 1895a3fbb7..a5b73e42ef 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1474,7 +1474,7 @@ drop.dryname = "dried something" drop.drydesc = "It's dry and crusty. The janitor isn't doing their job." drop.fluorescent = 0 - drop.invisibility = 0 + drop.invisibility = INVISIBILITY_NONE //else // come up with drips for other mobs someday diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 178d5eeff3..f58df1380d 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -320,7 +320,7 @@ var/list/ai_verbs_default = list( use_power = USE_POWER_ACTIVE power_channel = EQUIP var/mob/living/silicon/ai/powered_ai = null - invisibility = 100 + invisibility = INVISIBILITY_MAXIMUM /obj/machinery/ai_powersupply/Initialize(mapload) . = ..() diff --git a/code/modules/mob/living/silicon/robot/drone/swarm_abilities.dm b/code/modules/mob/living/silicon/robot/drone/swarm_abilities.dm index 983a05a34a..64db106252 100644 --- a/code/modules/mob/living/silicon/robot/drone/swarm_abilities.dm +++ b/code/modules/mob/living/silicon/robot/drone/swarm_abilities.dm @@ -39,7 +39,7 @@ name = "Null-Field" icon = 'icons/effects/effects.dmi' icon_state = "shield-old" - invisibility = 0 + invisibility = INVISIBILITY_NONE /spell/aoe_turf/conjure/zeropointwell name = "Zero-Point Well" diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 9db9a2c7ec..e56bda5cdb 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -1,5 +1,5 @@ /mob/living/silicon/robot/Life() - set invisibility = 0 + set invisibility = INVISIBILITY_NONE if (transforming) return diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm index 77fed6bf14..25b0aa0ce0 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm @@ -127,7 +127,7 @@ if(istype(loc, /turf/unsimulated/map)) if(!invisibility) invisibility = INVISIBILITY_ABSTRACT - child_om_marker.invisibility = 0 + child_om_marker.invisibility = INVISIBILITY_NONE ai_holder.base_wander_delay = 50 ai_holder.wander_delay = 1 melee_damage_lower = 50 @@ -137,7 +137,7 @@ movement_cooldown = 5 else if(invisibility) - invisibility = 0 + invisibility = INVISIBILITY_NONE child_om_marker.invisibility = INVISIBILITY_ABSTRACT ai_holder.base_wander_delay = 5 ai_holder.wander_delay = 1 @@ -1257,7 +1257,7 @@ desc = "It's waiting to accept treats!" icon = 'icons/obj/flesh_machines.dmi' icon_state = "mouth" - invisibility = 0 + invisibility = INVISIBILITY_NONE anchored = TRUE pixel_x = -16 var/id = "mouth_a" //same id will be linked diff --git a/code/modules/mob/mob_planes.dm b/code/modules/mob/mob_planes.dm index ae629be708..af01b0f348 100644 --- a/code/modules/mob/mob_planes.dm +++ b/code/modules/mob/mob_planes.dm @@ -143,9 +143,9 @@ //Invisibility-managed if(invis_toggle) if(want && invisibility) - invisibility = 0 //Does not need a mouse_opacity toggle because these are for effects + invisibility = INVISIBILITY_NONE //Does not need a mouse_opacity toggle because these are for effects else if(!want && !invisibility) - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT //Alpha-managed else if(want && !alpha) @@ -179,7 +179,7 @@ layer = LAYER_HUD_BASE+1 // This MUST be above the lighting plane_master color = null //To break lighting when visible (this is sorta backwards) alpha = 0 //Starts full opaque - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT invis_toggle = TRUE /obj/screen/plane_master/lighting diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index b35e83a00d..11699ffca9 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -11,7 +11,7 @@ var/datum/tgui_module/late_choices/late_choices_dialog = null universal_speak = 1 - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT density = FALSE stat = 2 diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index ff618e919e..2c1c0b6da9 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -10,7 +10,7 @@ canmove = 0 stunned = 1 icon = null - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT for(var/t in organs) qdel(t) var/atom/movable/overlay/animation = new /atom/movable/overlay( loc ) @@ -64,7 +64,7 @@ transforming = 1 canmove = 0 icon = null - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT return ..() /mob/proc/AIize(var/move = TRUE) @@ -95,7 +95,7 @@ newloc = loc_landmark.loc var/mob/living/silicon/ai/O = new (newloc, FALSE, using_map.default_law_type, null, 1)//No MMI but safety is in effect. - O.invisibility = 0 + O.invisibility = INVISIBILITY_NONE O.aiRestorePowerRoutine = 0 if(mind) @@ -147,14 +147,14 @@ transforming = 1 canmove = 0 icon = null - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT for(var/t in organs) qdel(t) var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(loc) O.gender = gender - O.invisibility = 0 + O.invisibility = INVISIBILITY_NONE if(mind) //TODO mind.transfer_to(O) @@ -201,7 +201,7 @@ transforming = 1 canmove = 0 icon = null - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT for(var/t in organs) qdel(t) @@ -225,7 +225,7 @@ transforming = 1 canmove = 0 icon = null - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT for(var/t in organs) //this really should not be necessary qdel(t) @@ -255,7 +255,7 @@ transforming = 1 canmove = 0 icon = null - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT for(var/t in organs) qdel(t) diff --git a/code/modules/modular_computers/file_system/data.dm b/code/modules/modular_computers/file_system/data.dm index 9736ef979c..c00509ef2c 100644 --- a/code/modules/modular_computers/file_system/data.dm +++ b/code/modules/modular_computers/file_system/data.dm @@ -37,7 +37,7 @@ // anchored = TRUE // unacidable = TRUE // simulated = FALSE -// invisibility = 101 +// invisibility = INVISIBILITY_ABSTRACT // /// The name that the file will have once it's created. // var/file_name = "helloworld" // /// The contents of this file. Uses paper formatting. diff --git a/code/modules/multiz/_stubs.dm b/code/modules/multiz/_stubs.dm index 2b8fe09e0d..30b90f9989 100644 --- a/code/modules/multiz/_stubs.dm +++ b/code/modules/multiz/_stubs.dm @@ -1,7 +1,7 @@ /obj/effect/landmark/map_data name = "Unknown" desc = "An unknown location." - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT var/height = 1 ///< The number of Z-Levels in the map. var/turf/edge_type ///< What the map edge should be formed with. (null = world.turf) diff --git a/code/modules/multiz/misc.dm b/code/modules/multiz/misc.dm index 5984138dab..d0a29600e1 100644 --- a/code/modules/multiz/misc.dm +++ b/code/modules/multiz/misc.dm @@ -1,6 +1,6 @@ // Invisible object that blocks z transfer to/from its turf and the turf above. /obj/effect/ceiling - invisibility = 101 // nope cant see this + invisibility = INVISIBILITY_ABSTRACT // nope cant see this anchored = 1 can_atmos_pass = ATMOS_PASS_PROC diff --git a/code/modules/multiz/pipes.dm b/code/modules/multiz/pipes.dm index 0b4ccd80dc..1a1cde573d 100644 --- a/code/modules/multiz/pipes.dm +++ b/code/modules/multiz/pipes.dm @@ -53,7 +53,7 @@ /obj/machinery/atmospherics/pipe/zpipe/hide(var/i) if(istype(loc, /turf/simulated)) - invisibility = i ? 101 : 0 + invisibility = i ? INVISIBILITY_ABSTRACT : INVISIBILITY_NONE update_icon() /obj/machinery/atmospherics/pipe/zpipe/process() diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index 3c366912c0..b82acebd54 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -467,7 +467,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5 B.viruses = source.data["viruses"] B.fluorescent = 0 - B.invisibility = 0 + B.invisibility = INVISIBILITY_NONE return B #undef BLOOD_MINIMUM_STOP_PROCESS diff --git a/code/modules/overmap/spacetravel.dm b/code/modules/overmap/spacetravel.dm index f02e383e99..faa8cc7e80 100644 --- a/code/modules/overmap/spacetravel.dm +++ b/code/modules/overmap/spacetravel.dm @@ -1,7 +1,7 @@ //Space stragglers go here /obj/effect/overmap/visitable/sector/temporary name = "Deep Space" - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT known = FALSE in_space = TRUE diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index fcb3b15082..ac0681c02b 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -151,7 +151,7 @@ GLOBAL_LIST_INIT(possible_cable_coil_colours, list( //If underfloor, hide the cable /obj/structure/cable/hide(var/i) if(istype(loc, /turf)) - invisibility = i ? 101 : 0 + invisibility = i ? INVISIBILITY_ABSTRACT : INVISIBILITY_NONE update_icon() /obj/structure/cable/hides_under_flooring() diff --git a/code/modules/power/fusion/fusion_particle_catcher.dm b/code/modules/power/fusion/fusion_particle_catcher.dm index d70f10a255..5289622941 100644 --- a/code/modules/power/fusion/fusion_particle_catcher.dm +++ b/code/modules/power/fusion/fusion_particle_catcher.dm @@ -2,7 +2,7 @@ icon = 'icons/effects/effects.dmi' density = TRUE anchored = TRUE - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT var/obj/effect/fusion_em_field/parent var/mysize = 0 diff --git a/code/modules/power/supermatter/setup_supermatter.dm b/code/modules/power/supermatter/setup_supermatter.dm index 7464bebafc..0af345a7d3 100644 --- a/code/modules/power/supermatter/setup_supermatter.dm +++ b/code/modules/power/supermatter/setup_supermatter.dm @@ -102,7 +102,7 @@ /obj/effect/engine_setup/ name = "Engine Setup Marker" desc = "You shouldn't see this." - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT anchored = TRUE density = FALSE icon = 'icons/mob/screen1.dmi' diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm index 5c8a4b882a..1fae13ef38 100644 --- a/code/modules/power/terminal.dm +++ b/code/modules/power/terminal.dm @@ -26,7 +26,7 @@ return ..() /obj/machinery/power/terminal/hide(var/i) - invisibility = i ? 101 : 0 + invisibility = i ? INVISIBILITY_ABSTRACT : INVISIBILITY_NONE icon_state = i ? "term-f" : "term" /obj/machinery/power/terminal/hides_under_flooring() diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index 5d8ea9f07b..125a9eb28a 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -10,7 +10,7 @@ var/frequency = 1 hitscan = 1 embed_chance = 0 - invisibility = 99 //beam projectiles are invisible as they are rendered by the effect engine + invisibility = INVISIBILITY_BADMIN //beam projectiles are invisible as they are rendered by the effect engine light_range = 2 light_power = 0.5 light_color = "#FF0D00" diff --git a/code/modules/projectiles/projectile/change.dm b/code/modules/projectiles/projectile/change.dm index b5ac55d4c8..880854585f 100644 --- a/code/modules/projectiles/projectile/change.dm +++ b/code/modules/projectiles/projectile/change.dm @@ -48,7 +48,7 @@ if("robot") new_mob = new /mob/living/silicon/robot(M.loc) new_mob.gender = M.gender - new_mob.invisibility = 0 + new_mob.invisibility = INVISIBILITY_NONE new_mob.job = JOB_CYBORG var/mob/living/silicon/robot/Robot = new_mob Robot.mmi = new /obj/item/mmi(new_mob) diff --git a/code/modules/projectiles/projectile/trace.dm b/code/modules/projectiles/projectile/trace.dm index ccb13ad7be..9d94f6ca9d 100644 --- a/code/modules/projectiles/projectile/trace.dm +++ b/code/modules/projectiles/projectile/trace.dm @@ -20,7 +20,7 @@ //"Tracing" projectile /obj/item/projectile/test //Used to see if you can hit them. - invisibility = 101 //Nope! Can't see me! + invisibility = INVISIBILITY_ABSTRACT //Nope! Can't see me! hitscan = TRUE nodamage = TRUE damage = 0 diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 94a1fae83d..0cabe6b44f 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -116,7 +116,7 @@ // hide called by levelupdate if turf intact status changes // change visibility status and force update of icon /obj/structure/disposalconstruct/hide(var/intact) - invisibility = (intact && level==1) ? 101: 0 // hide if floor is intact + invisibility = (intact && level==1) ? INVISIBILITY_ABSTRACT: INVISIBILITY_NONE // hide if floor is intact update() diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 75cf8b37b3..6158bd8710 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -601,7 +601,7 @@ // this allows the gas flushed to be tracked /obj/structure/disposalholder - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT var/datum/gas_mixture/gas = null // gas used to flush, will appear at exit point var/active = 0 // true if the holder is moving, otherwise inactive dir = 0 @@ -857,7 +857,7 @@ // hide called by levelupdate if turf intact status changes // change visibility status and force update of icon /obj/structure/disposalpipe/hide(var/intact) - invisibility = intact ? 101: 0 // hide if floor is intact + invisibility = intact ? INVISIBILITY_ABSTRACT : INVISIBILITY_NONE // hide if floor is intact update_icon() // update actual icon_state depending on visibility @@ -941,7 +941,7 @@ var/obj/structure/disposalpipe/broken/P = new(src.loc) P.set_dir(D) - src.invisibility = 101 // make invisible (since we won't delete the pipe immediately) + src.invisibility = INVISIBILITY_ABSTRACT // make invisible (since we won't delete the pipe immediately) var/obj/structure/disposalholder/H = locate() in src if(H) // holder was present diff --git a/code/modules/rogueminer_vr/landmarks.dm b/code/modules/rogueminer_vr/landmarks.dm index 87d2a6df9f..ada6f10db8 100644 --- a/code/modules/rogueminer_vr/landmarks.dm +++ b/code/modules/rogueminer_vr/landmarks.dm @@ -7,7 +7,7 @@ name = "asteroid spawn" icon = 'icons/mob/screen1.dmi' icon_state = "x2" - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT anchored = TRUE var/datum/rogue/asteroid/myasteroid @@ -21,7 +21,7 @@ name = "mob spawn" icon = 'icons/mob/screen1.dmi' icon_state = "x" - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT anchored = TRUE var/mob/mymob diff --git a/code/modules/shieldgen/energy_shield.dm b/code/modules/shieldgen/energy_shield.dm index 6f9a31fe28..6fcec11fa8 100644 --- a/code/modules/shieldgen/energy_shield.dm +++ b/code/modules/shieldgen/energy_shield.dm @@ -10,7 +10,7 @@ plane = MOB_PLANE layer = ABOVE_MOB_LAYER density = TRUE - invisibility = 0 + invisibility = INVISIBILITY_NONE var/obj/machinery/power/shield_generator/gen = null // Owning generator var/disabled_for = 0 var/diffused_for = 0 diff --git a/code/modules/shieldgen/shield_diffuser.dm b/code/modules/shieldgen/shield_diffuser.dm index ce0d5f85ce..76a6f483bc 100644 --- a/code/modules/shieldgen/shield_diffuser.dm +++ b/code/modules/shieldgen/shield_diffuser.dm @@ -24,7 +24,7 @@ //If underfloor, hide the cable^H^H diffuser /obj/machinery/shield_diffuser/hide(var/i) if(istype(loc, /turf)) - invisibility = i ? 101 : 0 + invisibility = i ? INVISIBILITY_ABSTRACT : INVISIBILITY_NONE update_icon() /obj/machinery/shield_diffuser/hides_under_flooring() diff --git a/code/modules/shuttles/landmarks.dm b/code/modules/shuttles/landmarks.dm index 2024f3fed0..7bf753481d 100644 --- a/code/modules/shuttles/landmarks.dm +++ b/code/modules/shuttles/landmarks.dm @@ -6,7 +6,7 @@ anchored = TRUE unacidable = TRUE simulated = FALSE - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT flags = SLANDMARK_FLAG_AUTOSET // We generally want to use current area/turf as base. //ID of the landmark diff --git a/code/modules/shuttles/shuttle_specops.dm b/code/modules/shuttles/shuttle_specops.dm index f394781957..6966ddabd0 100644 --- a/code/modules/shuttles/shuttle_specops.dm +++ b/code/modules/shuttles/shuttle_specops.dm @@ -159,7 +159,7 @@ for(var/obj/effect/landmark/L in landmarks_list) if(L.name == "Marauder Exit") var/obj/effect/portal/P = new(L.loc) - P.invisibility = 101//So it is not seen by anyone. + P.invisibility = INVISIBILITY_ABSTRACT //So it is not seen by anyone. P.failchance = 0//So it has no fail chance when teleporting. P.target = pick(spawn_marauder)//Where the marauder will arrive. spawn_marauder.Remove(P.target) diff --git a/code/modules/spells/aoe_turf/conjure/forcewall.dm b/code/modules/spells/aoe_turf/conjure/forcewall.dm index 92643b6e6d..5472a00f24 100644 --- a/code/modules/spells/aoe_turf/conjure/forcewall.dm +++ b/code/modules/spells/aoe_turf/conjure/forcewall.dm @@ -33,7 +33,7 @@ opacity = 0 density = TRUE unacidable = TRUE - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT /obj/effect/forcefield/bullet_act(var/obj/item/projectile/Proj, var/def_zone) var/turf/T = get_turf(src.loc) diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm index f1386d446c..5bef679607 100644 --- a/code/modules/tgui/modules/appearance_changer.dm +++ b/code/modules/tgui/modules/appearance_changer.dm @@ -1089,7 +1089,7 @@ owner = new(src) owner.set_species(SPECIES_LLEILL) owner.species.produceCopy(owner.species.traits.Copy(),owner,null,FALSE) - owner.invisibility = 101 + owner.invisibility = INVISIBILITY_ABSTRACT // Add listeners back owner.AddComponent(/datum/component/recursive_move) RegisterSignal(owner, COMSIG_OBSERVER_MOVED, PROC_REF(update_active_camera_screen), TRUE) diff --git a/code/modules/xenoarcheaology/effects/forcefield.dm b/code/modules/xenoarcheaology/effects/forcefield.dm index 7a27c34da9..69d8682a2c 100644 --- a/code/modules/xenoarcheaology/effects/forcefield.dm +++ b/code/modules/xenoarcheaology/effects/forcefield.dm @@ -26,7 +26,7 @@ E.strength = 1 E.density = TRUE E.anchored = TRUE - E.invisibility = 0 + E.invisibility = INVISIBILITY_NONE spawn(10) UpdateMove() return 1 @@ -49,7 +49,7 @@ created_field.Add(E) E.anchored = TRUE E.density = TRUE - E.invisibility = 0 + E.invisibility = INVISIBILITY_NONE var/obj/effect/energy_field/E = created_field[1] E.loc = locate(T.x + 2,T.y + 2,T.z) diff --git a/maps/common/common_things.dm b/maps/common/common_things.dm index bec22e1e18..66469e308b 100644 --- a/maps/common/common_things.dm +++ b/maps/common/common_things.dm @@ -1,58 +1,58 @@ /obj/effect/step_trigger/teleporter/to_mining icon = 'icons/obj/structures/stairs_64x64.dmi' icon_state = "" - invisibility = 0 + invisibility = INVISIBILITY_NONE plane = TURF_PLANE layer = ABOVE_TURF_LAYER /obj/effect/step_trigger/teleporter/from_mining icon = 'icons/obj/structures/stairs_64x64.dmi' icon_state = "" - invisibility = 0 + invisibility = INVISIBILITY_NONE plane = TURF_PLANE layer = ABOVE_TURF_LAYER /obj/effect/step_trigger/teleporter/to_solars icon = 'icons/obj/structures/stairs_64x64.dmi' icon_state = "" - invisibility = 0 + invisibility = INVISIBILITY_NONE /obj/effect/step_trigger/teleporter/from_solars icon = 'icons/obj/structures/stairs_64x64.dmi' icon_state = "" - invisibility = 0 + invisibility = INVISIBILITY_NONE /obj/effect/step_trigger/teleporter/wild icon = 'icons/obj/structures/stairs_64x64.dmi' icon_state = "" - invisibility = 0 + invisibility = INVISIBILITY_NONE /obj/effect/step_trigger/teleporter/to_underdark icon = 'icons/obj/structures/stairs_64x64.dmi' icon_state = "" - invisibility = 0 + invisibility = INVISIBILITY_NONE /obj/effect/step_trigger/teleporter/from_underdark icon = 'icons/obj/structures/stairs_64x64.dmi' icon_state = "" - invisibility = 0 + invisibility = INVISIBILITY_NONE /obj/effect/step_trigger/teleporter/to_plains icon = 'icons/obj/structures/stairs_64x64.dmi' icon_state = "" - invisibility = 0 + invisibility = INVISIBILITY_NONE /obj/effect/step_trigger/teleporter/from_plains icon = 'icons/obj/structures/stairs_64x64.dmi' icon_state = "" - invisibility = 0 + invisibility = INVISIBILITY_NONE /obj/effect/step_trigger/teleporter/planetary_fall/virgo3b /obj/effect/step_trigger/lost_in_space icon = 'icons/obj/structures/stairs_64x64.dmi' icon_state = "" - invisibility = 0 + invisibility = INVISIBILITY_NONE var/deathmessage = "You drift off into space, floating alone in the void until your life support runs out." /obj/effect/step_trigger/lost_in_space/Trigger(var/atom/movable/A) //replacement for shuttle dump zones because there's no empty space levels to dump to diff --git a/maps/expedition_vr/alienship/_alienship.dm b/maps/expedition_vr/alienship/_alienship.dm index b405ea5e08..f9843d6c16 100644 --- a/maps/expedition_vr/alienship/_alienship.dm +++ b/maps/expedition_vr/alienship/_alienship.dm @@ -17,7 +17,7 @@ icon = 'alienship.dmi' icon_state = null mouse_opacity = 0 - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT //Shared! var/static/mission_mode diff --git a/maps/offmap_vr/common_offmaps.dm b/maps/offmap_vr/common_offmaps.dm index d06ab37f42..7e67ad1ab1 100644 --- a/maps/offmap_vr/common_offmaps.dm +++ b/maps/offmap_vr/common_offmaps.dm @@ -471,7 +471,7 @@ desc = "Spawns the mobs!" icon = 'icons/mob/screen1.dmi' icon_state = "x" - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT mouse_opacity = 0 density = 0 anchored = 1 diff --git a/maps/redgate/falls/atoll_objs.dm b/maps/redgate/falls/atoll_objs.dm index 6525512215..60c24d0822 100644 --- a/maps/redgate/falls/atoll_objs.dm +++ b/maps/redgate/falls/atoll_objs.dm @@ -261,7 +261,7 @@ desc = "A prismatic field of... energy, probably. You should definitely rub your face in it." icon = 'maps/redgate/falls/icons/decals/marble_decals.dmi' icon_state = "teleporter" - invisibility = 0 + invisibility = INVISIBILITY_NONE //teleport_z must be populated but this is a gateway map //switching between tether or another map will change the z