diff --git a/code/area.dm b/code/area.dm
index 03facdc8d4944..b321ed325ef72 100644
--- a/code/area.dm
+++ b/code/area.dm
@@ -38,7 +38,6 @@
/// for escape checks
var/is_centcom = 0
- var/gencolor
level = null
#ifdef UNDERWATER_MAP
name = "Ocean"
diff --git a/code/mob/transform_procs.dm b/code/mob/transform_procs.dm
index 8d31a1a0cacaf..38c57a16613d8 100644
--- a/code/mob/transform_procs.dm
+++ b/code/mob/transform_procs.dm
@@ -838,7 +838,7 @@ var/list/antag_respawn_critter_types = list(/mob/living/critter/small_animal/fl
newbody.wear_id:access = get_access("Captain")
if (!newbody.bioHolder)
- newbody.bioHolder = new bioHolder()
+ newbody.bioHolder = new bioHolder(newbody)
newbody.bioHolder.AddEffect("radio_brain")
// newbody.abilityHolder = src.abilityHolder
// if (newbody.abilityHolder)
diff --git a/code/modules/admin/diagnostics.dm b/code/modules/admin/diagnostics.dm
index 8ac1ed1454c79..0c02b2cc01883 100644
--- a/code/modules/admin/diagnostics.dm
+++ b/code/modules/admin/diagnostics.dm
@@ -185,7 +185,8 @@ proc/debug_color_of(var/thing)
winset( usr, null, "command=.command" )
/datum/infooverlay
- var/help = "Huh."
+ var/name = null
+ var/help = "No help provided. Please complain to a coder."
var/restricted = 0//if only coders+ can use it
proc/GetInfo(var/turf/theTurf, var/image/debugoverlay/img)
proc/OnEnabled(var/client/C)
@@ -193,22 +194,29 @@ proc/debug_color_of(var/thing)
proc/OnStartRendering(var/client/C)
proc/OnFinishRendering(var/client/C)
- proc/makeText(text, additional_flags=0)
+ proc/makeText(text, additional_flags=0, align_left=FALSE)
var/mutable_appearance/mt = new
mt.plane = FLOAT_PLANE
mt.icon = 'icons/effects/effects.dmi'
mt.icon_state = "nothing"
- mt.maptext = "[text]"
- mt.maptext_x = -3
+ mt.maptext = "[text]"
+
+ if(align_left)
+ mt.maptext_width = 32 * 3
+ mt.maptext_x = 2
+ else
+ mt.maptext_x = -3
mt.appearance_flags = RESET_COLOR | additional_flags
return mt
teleblocked
+ name = "teleblocked areas"
help = "Red tiles are ones that are teleblocked, green ones can be teleported to."
GetInfo(var/turf/theTurf, var/image/debugoverlay/img)
img.app.color = is_teleportation_allowed(theTurf) ? "#0f0" : "#f00"
blowout
+ name = "radstorm safezones"
help = "Green tiles are safe from irradiation, red tiles are ones that are not."
GetInfo(var/turf/theTurf, var/image/debugoverlay/img)
if(theTurf.loc:do_not_irradiate)
@@ -216,28 +224,78 @@ proc/debug_color_of(var/thing)
else
img.app.color = "#f00"
-
areas
+ name = "areas"
+ help = "Differentiates between different areas. Also gives you area names because thats cool and stuff."
+ var/list/area/processed_areas
+ GetInfo(var/turf/theTurf, var/image/debugoverlay/img)
+ var/area/area = theTurf.loc
+ img.app.desc = "Area: [area.name]
Type: [area.type]"
+ img.app.color = debug_color_of(area)
+ if(!(area in processed_areas))
+ img.app.overlays = list(src.makeText(area.name, align_left=TRUE))
+ processed_areas += area
+
+ OnStartRendering(client/C)
+ processed_areas = list()
+
+ areas2
+ name = "areas 2"
help = "Differentiates between different areas. Also gives you area names because thats cool and stuff."
GetInfo(var/turf/theTurf, var/image/debugoverlay/img)
- if(!theTurf.loc:gencolor)
- theTurf.loc:gencolor = rgb( rand(1,255),rand(1,255),rand(1,255) )
- img.app.desc = "Area: [theTurf.loc:name]
Type: [theTurf.loc:type]"
- img.app.color = theTurf.loc:gencolor
- img.mouse_opacity = 1
+ var/area/area = theTurf.loc
+ img.app.desc = "Area: [area.name]
Type: [area.type]"
+ img.app.icon = initial(theTurf.loc.icon)
+ img.app.icon_state = initial(theTurf.loc.icon_state)
+
+ area_power
+ name = "area power"
+ help = "Shows how charged the APC powercell is in an area. Also shows when the APC is off etc. Colour is based on charge level."
+ var/list/area/processed_areas
+ GetInfo(var/turf/theTurf, var/image/debugoverlay/img)
+ var/area/area = theTurf.loc
+ var/obj/machinery/power/apc/apc = area.area_apc
+ var/obj/item/cell/cell = apc?.cell
+ var/num_charge = 0
+ if(cell)
+ num_charge = cell.charge / cell.maxcharge
+ var/list/lcolor = hex_to_rgb_list(debug_color_of(area))
+ for(var/c in lcolor)
+ lcolor[c] = lcolor[c] / 8 + 220 * num_charge
+ img.app.color = rgb(lcolor["r"], lcolor["g"], lcolor["b"])
+ if(!(area in processed_areas))
+ var/text_charge
+ if(!apc || apc.disposed)
+ text_charge = "N/A"
+ else if(apc.status & BROKEN)
+ text_charge = "broken"
+ else if(!cell)
+ text_charge = "no cell"
+ else if(!apc.operating)
+ text_charge = "[round(num_charge * 100)]% OFF"
+ else
+ text_charge = "[round(num_charge * 100)]%"
+ var/list/off = list()
+ if(apc.equipment <= 2) off += "equip"
+ if(apc.lighting <= 2) off += "light"
+ if(apc.environ <= 2) off += "env"
+ if(length(off))
+ text_charge += "
OFF: [off.Join(" ")]"
+ img.app.overlays = list(src.makeText(text_charge, align_left=TRUE))
+ processed_areas += area
+ OnStartRendering(client/C)
+ processed_areas = list()
atmos_air
+ name = "atmos air groups"
help = "Tile colors are based on what air group turf belongs to. Hover over a turf to get its atmos readout"
GetInfo(var/turf/theTurf, var/image/debugoverlay/img)
var/turf/simulated/sim = theTurf
- img.mouse_opacity = 1
if(istype(sim, /turf/simulated))//byondood
var/datum/air_group/group = sim.parent
if(group)
- if(!group.gencolor)
- group.gencolor = rgb( rand(1,255),rand(1,255),rand(1,255) )
- img.app.color = group.gencolor
+ img.app.color = debug_color_of(group)
img.app.desc = "Group \ref[group]
[MOLES_REPORT(group.air)]Temperature=[group.air.temperature]
Spaced=[group.spaced]"
if (group.spaced) img.app.overlays += image('icons/misc/air_debug.dmi', icon_state = "spaced")
/*
@@ -282,9 +340,7 @@ proc/debug_color_of(var/thing)
var/image/airrowe = image('icons/misc/air_debug.dmi', icon_state = "space", dir = dir)
airrowe.appearance_flags = RESET_COLOR
if(T.parent)
- if(!T.parent.gencolor)
- T.parent.gencolor = rgb( rand(1,255),rand(1,255),rand(1,255) )
- airrowe.color = T.parent.gencolor
+ airrowe.color = debug_color_of(T.parent)
img.app.overlays += airrowe
if(borders_group.len)
img.app.desc += "
(borders groups to the [borders_group.Join(" ")])"
@@ -314,10 +370,10 @@ proc/debug_color_of(var/thing)
atmos_status
+ name = "atmos status"
help = "turf color: black (no air), gray (less than normal), white (normal pressure), red (over normal)
top number: o2 pp%. white = breathable, orange = breathable w/ cyberlung, otherwise no good
middle number: atmos pressure (kPa)
bottom number: air temp (°C)
colored square in bottom left:
color indicates group membership
solid: group mode on
outline: group mode off
no square: not in a group"
GetInfo(var/turf/theTurf, var/image/debugoverlay/img)
var/turf/simulated/sim = theTurf
- img.mouse_opacity = 1
img.app.desc = ""
img.app.color = null
img.app.maptext = null
@@ -328,16 +384,14 @@ proc/debug_color_of(var/thing)
var/datum/gas_mixture/air = null
var/is_group = 0
var/is_group_active = 0
- if (sim && sim.parent)
- if (!sim.parent.gencolor)
- group.gencolor = rgb( rand(1,255),rand(1,255),rand(1,255) )
- is_group = group.gencolor
+ if (group)
+ is_group = debug_color_of(group)
if (sim.parent.group_processing)
is_group_active = 1
air = sim.parent.air
else
air = sim.air
- else if (sim && sim.air)
+ else if (sim?.air)
air = sim.air
if (!air)
@@ -411,6 +465,7 @@ proc/debug_color_of(var/thing)
artists
+ name = "artists"
help = "Shows you the artists of the wonderful writing that's been written on the station."
GetInfo(var/turf/theTurf, var/image/debugoverlay/img)
var/list/artists = list()
@@ -425,9 +480,9 @@ proc/debug_color_of(var/thing)
img.app.desc = built.Join("
")
powernet
+ name = "power networks"
help = {"red - contains 0 (no powernet), that's probably bad
white - contains multiple powernets
other - coloured based on the single powernet
numbers - ids of all powernets on the tile"}
GetInfo(var/turf/theTurf, var/image/debugoverlay/img)
- img.mouse_opacity = 0
var/list/netnums = list()
for(var/obj/machinery/power/M in theTurf)
if(M.netnum >= 0)
@@ -447,6 +502,7 @@ proc/debug_color_of(var/thing)
img.app.color = debug_color_of(netnums[1])
disposals
+ name = "disposal pipes"
help = {"shows all disposal pipes as an overlay
if there's stuff in a pipe it's highlighted in blue if moving and in red if stuck
number - how many objects are in the pipe"}
GetInfo(var/turf/theTurf, var/image/debugoverlay/img)
img.app.color = "#ffffff"
@@ -470,6 +526,7 @@ proc/debug_color_of(var/thing)
img.app.overlays += pipe_image
camera_coverage
+ name = "camera coverage"
help = {"blue - tile visible by a camera
without overlay - tile not visible by a camera
number - number of cameras seeing the tile"}
GetInfo(var/turf/theTurf, var/image/debugoverlay/img)
if(theTurf.cameras && theTurf.cameras.len)
@@ -479,6 +536,7 @@ proc/debug_color_of(var/thing)
img.app.alpha = 0
atmos_pipes
+ name = "atmos pipes"
help = {"highlights all atmos machinery
pipe color - the pipeline to which it belongs
numbers:
temperature
moles
pressure"}
var/show_numbers = 1
var/show_pipe_networks = 0
@@ -510,13 +568,16 @@ proc/debug_color_of(var/thing)
img.app.overlays += pipe_image
atmos_pipes/without_numbers
+ name = "atmos pipes - no numbers"
show_numbers = 0
atmos_pipes/pipe_networks_instead_of_pipelines
+ name = "atmos pipes - pipenetworks"
show_numbers = 0
show_pipe_networks = 1
interesting_stuff
+ name = "interesting stuff"
help = {"highlights turfs with stuff that has the var "interesting" set to something
red - only the turf is interesting
blue - interesting stuff is on the turf
number - number of interesting things
hover over the overlay to see what's interesting"}
GetInfo(var/turf/theTurf, var/image/debugoverlay/img)
img.app.alpha = 0
@@ -537,6 +598,7 @@ proc/debug_color_of(var/thing)
img.app.desc = ""
fluids
+ name = "fluid groups"
help = {"highlights fluids
color - which fluid group does the fluid tile belong to
red - more than 1 fluid obj
text (one per group) - amount per tile"}
var/type_to_process = /obj/fluid
var/list/processed_groups
@@ -549,13 +611,13 @@ proc/debug_color_of(var/thing)
continue
img.app.alpha = initial(img.app.alpha)
if(num_fluids) // more than one
- img.app.overlays = list(src.makeText(">1 fluids"))
+ img.app.overlays = list(src.makeText(">1 fluids", align_left=TRUE))
img.app.color = "#ff0000"
return
var/datum/fluid_group/G = F.group
img.app.color = debug_color_of(G)
if(!(G in processed_groups))
- img.app.overlays = list(src.makeText(round(G.amt_per_tile, 0.1)))
+ img.app.overlays = list(src.makeText(round(G.amt_per_tile, 0.1), align_left=TRUE))
processed_groups += G
num_fluids++
@@ -563,14 +625,17 @@ proc/debug_color_of(var/thing)
processed_groups = list()
fluids/smoke
+ name = "smoke groups"
help = {"highlights smoke
color - which fluid group does the fluid tile belong to
red - more than 1 fluid obj
text (one per group) - amount per tile"}
type_to_process = /obj/fluid/airborne
lighting_needs_additive
+ name = "lighting additive overlay active"
GetInfo(turf/theTurf, image/debugoverlay/img)
img.app.color = theTurf.RL_NeedsAdditive ? "#00ff00" : "#ff0000"
count_atoms_plus_overlays
+ name = "number of atoms + overlays"
GetInfo(turf/theTurf, image/debugoverlay/img)
// I should probably also count overlays on overlays but I'm lazy
img.app.alpha = 0
@@ -581,6 +646,7 @@ proc/debug_color_of(var/thing)
img.app.overlays = list(src.makeText(num, RESET_ALPHA))
count_atoms_plus_overlays_rec
+ name = "number of atoms + overlays \[recursive\]"
GetInfo(turf/theTurf, image/debugoverlay/img)
img.app.alpha = 0
var/num = 0
@@ -593,11 +659,14 @@ proc/debug_color_of(var/thing)
img.app.overlays = list(src.makeText(num, RESET_ALPHA))
count_atoms
+ name = "number of atoms"
GetInfo(turf/theTurf, image/debugoverlay/img)
img.app.alpha = 0
img.app.overlays = list(src.makeText(theTurf.contents.len, RESET_ALPHA))
oshan_hotspots
+ name = "Oshan hotspots"
+ help = {"Colour and numbers correspond to the temperature."}
GetInfo(turf/theTurf, image/debugoverlay/img)
. = ..()
var/val = hotspot_controller.probe_turf(theTurf)
@@ -607,6 +676,7 @@ proc/debug_color_of(var/thing)
img.app.overlays = list(src.makeText(round(val), RESET_ALPHA))
trace_gases // also known as Fart-o-Vision
+ name = "trace gases active"
GetInfo(turf/theTurf, image/debugoverlay/img)
. = ..()
var/air_group_trace = 0
@@ -631,6 +701,8 @@ proc/debug_color_of(var/thing)
img.app.alpha = 50
wet_floors
+ name = "wet floors"
+ help = {"Shows wetness of the floors
1 - green = wet
2 - blue = lube
3 - red = superlube
slippery fluids, banana peels etc. not counted"}
GetInfo(turf/theTurf, image/debugoverlay/img)
if(!theTurf.wet)
img.app.alpha = 0
@@ -645,6 +717,8 @@ proc/debug_color_of(var/thing)
img.app.color = "#aa5555"
last_touched
+ name = "last touched"
+ help = {"Shows the ckey of the last person to touch stuff on a turf. If multiple peeople the tile is red and you need to hover over it to see a list.
Uses the View Fingerprints last_touched thing and a bunch of interactions don't do fingerprints so don't rely on this."}
GetInfo(turf/theTurf, image/debugoverlay/img)
var/list/lines = list()
var/toucher = null
@@ -668,6 +742,53 @@ proc/debug_color_of(var/thing)
return TRUE
last_touched/no_items
+ name = "last touched - no items"
+ is_ok(atom/A)
+ return !istype(A, /obj/item)
+
+ blood_owner
+ name = "blood owner"
+ help = {"Shows the real name of the last person to bleed on a thing on a turf. If multiple peeople the tile is red and you need to hover over it to see a list."}
+ GetInfo(turf/theTurf, image/debugoverlay/img)
+ var/list/lines = list()
+ var/toucher = null
+ for(var/atom/A in list(theTurf) + theTurf.contents)
+ if(is_ok(A) && A.blood_DNA)
+ var/who = (A.blood_DNA in bioUids) ? bioUids[A.blood_DNA] : A.blood_DNA
+ if(isnull(toucher))
+ toucher = who
+ else if(toucher != who)
+ toucher = -1
+ lines += "[A.name] - [who]"
+ var/datum/reagents/reagents = A.reagents
+ if(istype(A, /obj/fluid))
+ var/obj/fluid/F = A
+ reagents = F.group.reagents
+ if(reagents)
+ for(var/reag_id in list("blood", "bloodc"))
+ var/datum/reagent/blood/blood = reagents.reagent_list[reag_id]
+ var/datum/bioHolder/bioholder = blood?.data
+ if(istype(bioholder))
+ var/who = bioholder.ownerName
+ lines += "[A.name] - [who] (reagent [reag_id])"
+ if(isnull(toucher))
+ toucher = who
+ else if(toucher != who)
+ toucher = -1
+ if(isnull(toucher))
+ img.app.alpha = 0
+ return
+ img.app.desc = lines.Join("
\n")
+ if(toucher == -1)
+ img.app.color = "#FF0000"
+ else
+ img.app.color = debug_color_of(toucher)
+ img.app.overlays = list(src.makeText(toucher, RESET_ALPHA | RESET_COLOR))
+ proc/is_ok(atom/A)
+ return TRUE
+
+ blood_owner/no_items
+ name = "blood owner - no items"
is_ok(atom/A)
return !istype(A, /obj/item)
@@ -770,10 +891,17 @@ proc/debug_color_of(var/thing)
set name = "Debug Overlay"
SET_ADMIN_CAT(ADMIN_CAT_DEBUG)
admin_only
- var/name = input("Choose an overlay") in (childrentypesof( /datum/infooverlay ) + "Remove")
+ var/list/available_overlays = list()
+ for(var/iov_type in childrentypesof(/datum/infooverlay))
+ var/datum/infooverlay/dummy = iov_type
+ var/name = initial(dummy.name)
+ if(isnull(name))
+ name = replacetext("[iov_type]", "/datum/infooverlay/", "")
+ available_overlays[name] = iov_type
+ var/name = input("Choose an overlay") in (available_overlays + "REMOVE")
if(activeOverlay)
activeOverlay.OnDisabled(src)
- if(!name || name == "Remove")
+ if(!name || name == "REMOVE")
if(infoOverlayImages)
for(var/img in infoOverlayImages)
img = infoOverlayImages[img]//shhh
@@ -785,7 +913,8 @@ proc/debug_color_of(var/thing)
activeOverlay = null
qdel(activeOverlay)
else
- activeOverlay = new name()
+ var/type = available_overlays[name]
+ activeOverlay = new type()
boutput( src, "[activeOverlay.help]" )
GenerateOverlay()
activeOverlay.OnEnabled(src)
diff --git a/code/modules/atmospherics/FEA_airgroup.dm b/code/modules/atmospherics/FEA_airgroup.dm
index 92f6c7fd86f51..c78607aac05d0 100644
--- a/code/modules/atmospherics/FEA_airgroup.dm
+++ b/code/modules/atmospherics/FEA_airgroup.dm
@@ -35,7 +35,6 @@
var/spaced = 0
var/spaced_via_group = 0
- var/gencolor = null
// overrides
/datum/air_group/disposing()
diff --git a/code/modules/medical/genetics/bioHolder.dm b/code/modules/medical/genetics/bioHolder.dm
index b90ec9674d2cf..5731ef543d029 100644
--- a/code/modules/medical/genetics/bioHolder.dm
+++ b/code/modules/medical/genetics/bioHolder.dm
@@ -217,14 +217,16 @@ var/list/datum/bioEffect/mutini_effects = list()
owner = owneri
Uid = CreateUid()
uid_hash = md5(Uid)
- bioUids[Uid] = 1
+ bioUids[Uid] = null
mobAppearance = new/datum/appearanceHolder()
mobAppearance.owner = owner
mobAppearance.parentHolder = src
- if(owner)
- ownerName = owner:real_name
+ SPAWN_DBG(2 SECONDS) // fuck this shit
+ if(owner)
+ ownerName = owner.real_name
+ bioUids[Uid] = owner?.real_name ? owner.real_name : owner?.name
BuildEffectPool()
return ..()
diff --git a/strings/admin_changelog.txt b/strings/admin_changelog.txt
index 0dbb1f1e81f72..13cc8c454f7b6 100644
--- a/strings/admin_changelog.txt
+++ b/strings/admin_changelog.txt
@@ -1,7 +1,10 @@
-(t)tue sep 08 20
+(t)wed sep 09 20
(u)pali
-(+)Debug Overlays now has an alias Info Overlays available in the Server tab
+(*)Debug Overlays now has an alias Info Overlays available in the Server tab
+(*)Made the overlays more user friendly.
+(*)Added Area Power overlay and Blood Owner overlay
+(t)tue sep 08 20
(u)pali
(*)Added debug overlays: Wet Floors and Last Touched (shows the ckey of last person to touch things at a tile), includes a version that ignores items
(t)sun aug 23 20