diff --git a/.gitignore b/.gitignore
index e76c9f6db1d..648359d0a36 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,9 @@
/config/*
!config/**/*/
+# ignore cfg, an internal BYOND folder
+/cfg/*
+
#ignore other, specific files and folers
*.before
data/
diff --git a/_maps/map_files/RandomRuins/SpaceRuins/oldstation.dmm b/_maps/map_files/RandomRuins/SpaceRuins/oldstation.dmm
index 58eae91a94f..6562103334e 100644
--- a/_maps/map_files/RandomRuins/SpaceRuins/oldstation.dmm
+++ b/_maps/map_files/RandomRuins/SpaceRuins/oldstation.dmm
@@ -510,10 +510,10 @@
/area/template_noop)
"bu" = (
/turf/simulated/wall/rust,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"bv" = (
/turf/simulated/wall,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"bw" = (
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plating,
@@ -615,7 +615,7 @@
"bM" = (
/obj/effect/spawner/window/reinforced,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"bN" = (
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/blood/old,
@@ -623,16 +623,16 @@
/obj/effect/decal/cleanable/cobweb,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"bO" = (
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"bP" = (
/obj/structure/sign/poster/official/science,
/turf/simulated/wall/rust,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"bQ" = (
/turf/simulated/wall/rust,
/area/ruin/space/ancientstation/hivebot)
@@ -647,7 +647,7 @@
"bS" = (
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"bT" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/closet/crate,
@@ -662,7 +662,7 @@
/obj/item/bonesetter,
/obj/item/stack/medical/bruise_pack/advanced,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"bU" = (
/obj/machinery/door/airlock/command,
/turf/simulated/floor/plasteel/airless,
@@ -764,7 +764,7 @@
},
/obj/effect/decal/cleanable/dirt,
/obj/machinery/door/airlock/command{
- name = "Delta Station Access"
+ name = "Theta Station Access"
},
/turf/simulated/floor/plasteel,
/area/ruin/space/ancientstation/powered)
@@ -779,7 +779,7 @@
/obj/effect/spawner/window/reinforced,
/obj/structure/transit_tube,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"ck" = (
/obj/structure/lattice/catwalk,
/turf/simulated/floor/plating/airless,
@@ -789,19 +789,19 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"cm" = (
/obj/effect/decal/cleanable/dirt,
/obj/item/stack/medical/bruise_pack,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"cn" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/door/airlock/command,
/obj/structure/barricade/wooden,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"co" = (
/obj/effect/decal/cleanable/blood/oil,
/mob/living/simple_animal/hostile/hivebot,
@@ -818,7 +818,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"cq" = (
/obj/structure/cable{
d1 = 4;
@@ -830,7 +830,7 @@
/obj/machinery/door/airlock/science,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"cr" = (
/obj/structure/cable{
d1 = 1;
@@ -840,14 +840,14 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"cs" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/door/firedoor,
/obj/machinery/door/airlock/science,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"ct" = (
/obj/item/twohanded/required/kirbyplants{
icon_state = "plant-dead"
@@ -855,12 +855,12 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"cu" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/door/airlock/maintenance_hatch,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"cv" = (
/obj/effect/decal/cleanable/blood/oil,
/obj/effect/decal/remains/robot{
@@ -964,7 +964,7 @@
/obj/item/pickaxe,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"cJ" = (
/obj/machinery/light{
icon_state = "tube1";
@@ -973,7 +973,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"cK" = (
/obj/effect/decal/remains/robot{
icon_state = "gib5"
@@ -998,7 +998,7 @@
/obj/machinery/door/airlock/science,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"cN" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -1006,7 +1006,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"cO" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -1015,7 +1015,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"cP" = (
/obj/effect/decal/cleanable/blood/oil,
/mob/living/simple_animal/hostile/hivebot/strong,
@@ -1033,7 +1033,7 @@
/obj/item/tank/plasma/full,
/obj/item/tank/plasma/full,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"cR" = (
/obj/structure/table,
/obj/item/storage/firstaid/ancient,
@@ -1065,7 +1065,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/machinery/power/apc{
dir = 1;
- name = "Delta Prototype Lab APC";
+ name = "Thete Prototype Lab APC";
pixel_y = 24;
report_power_alarm = 0;
start_charge = 0
@@ -1165,7 +1165,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"di" = (
/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
dir = 4
@@ -1173,7 +1173,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"dj" = (
/turf/simulated/wall/rust,
/area/ruin/space/ancientstation/rnd)
@@ -1206,7 +1206,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"dp" = (
/obj/machinery/power/solar,
/obj/structure/cable/yellow{
@@ -1227,7 +1227,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"dr" = (
/obj/item/roller,
/obj/effect/decal/cleanable/dirt,
@@ -1314,7 +1314,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"dD" = (
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
@@ -1344,7 +1344,7 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"dI" = (
/obj/machinery/door/airlock/medical/glass{
name = "Medical Bay"
@@ -1368,7 +1368,7 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot/strong,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"dL" = (
/obj/structure/table,
/obj/effect/decal/cleanable/dirt,
@@ -1514,7 +1514,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"eb" = (
/obj/machinery/light{
dir = 8
@@ -1575,7 +1575,7 @@
pixel_x = 28
},
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"ei" = (
/obj/item/circuitboard/sleeper,
/obj/effect/decal/cleanable/dirt,
@@ -1695,13 +1695,13 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"ew" = (
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"ex" = (
/obj/machinery/firealarm{
dir = 4;
@@ -1719,12 +1719,12 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"ez" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/power/emitter,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"eA" = (
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel/airless{
@@ -1888,7 +1888,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"eT" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/r_n_d/protolathe,
@@ -1926,7 +1926,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/machinery/field/generator,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"eY" = (
/obj/structure/cable/yellow{
d1 = 1;
@@ -2009,7 +2009,7 @@
/obj/item/apc_electronics,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"fj" = (
/obj/structure/cable{
d1 = 1;
@@ -2035,12 +2035,12 @@
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"fl" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"fm" = (
/obj/machinery/light{
dir = 8
@@ -2079,7 +2079,7 @@
"fq" = (
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"fr" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 6
@@ -2134,7 +2134,7 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"fx" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 6
@@ -2143,7 +2143,7 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"fy" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -2152,7 +2152,7 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"fz" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -2162,7 +2162,7 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"fA" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -2519,7 +2519,7 @@
icon_state = "4-8"
},
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"ga" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -2531,7 +2531,7 @@
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"gb" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -2548,7 +2548,7 @@
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"gc" = (
/mob/living/simple_animal/hostile/carp,
/turf/template_noop,
@@ -2574,7 +2574,7 @@
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"ge" = (
/obj/structure/table,
/obj/structure/cable{
@@ -2724,14 +2724,14 @@
/obj/item/trash/plate,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"gx" = (
/obj/structure/chair{
dir = 8
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"gy" = (
/obj/effect/spawner/window/reinforced,
/turf/simulated/floor/plating,
@@ -2746,7 +2746,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/machinery/power/rad_collector,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"gB" = (
/obj/item/solar_assembly,
/turf/simulated/floor/plating/airless,
@@ -2816,7 +2816,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"gK" = (
/obj/machinery/processor,
/obj/effect/decal/cleanable/dirt,
@@ -2860,13 +2860,13 @@
/obj/machinery/door/firedoor,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"gP" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/door/firedoor,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"gQ" = (
/obj/structure/cable{
d1 = 1;
@@ -2906,7 +2906,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/machinery/door/firedoor,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"gU" = (
/obj/machinery/light{
icon_state = "tube1";
@@ -2915,7 +2915,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/machinery/door/firedoor,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"gV" = (
/obj/structure/cable{
d1 = 1;
@@ -2932,7 +2932,7 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot/strong,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"gX" = (
/obj/machinery/computer{
desc = "A computer long since rendered non-functional due to lack of maintenance. Spitting out error messages.";
@@ -3035,7 +3035,7 @@
},
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"hk" = (
/obj/structure/table,
/obj/effect/decal/cleanable/dirt,
@@ -3072,7 +3072,7 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot/strong,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"ho" = (
/obj/machinery/light/small{
dir = 8
@@ -3145,7 +3145,7 @@
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"hu" = (
/obj/structure/table,
/obj/effect/decal/cleanable/dirt,
@@ -3265,7 +3265,7 @@
req_one_access_txt = "271"
},
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"hF" = (
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
@@ -3414,14 +3414,14 @@
icon = 'icons/obj/machines/particle_accelerator3.dmi'
},
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"hV" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/particle_accelerator/particle_emitter/right{
icon = 'icons/obj/machines/particle_accelerator3.dmi'
},
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"hW" = (
/obj/machinery/light/small{
dir = 8
@@ -3508,13 +3508,13 @@
/obj/effect/decal/cleanable/dirt,
/obj/machinery/power/apc{
dir = 1;
- name = "Delta Main Corridor APC";
+ name = "Theta Main Corridor APC";
pixel_y = 24;
report_power_alarm = 0;
start_charge = 0
},
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"ie" = (
/obj/machinery/atmospherics/unary/vent_pump/on{
dir = 4
@@ -3529,14 +3529,14 @@
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"if" = (
/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
dir = 4
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"ig" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/chair{
@@ -3602,7 +3602,7 @@
pixel_x = 28
},
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"in" = (
/turf/simulated/floor/plating/airless,
/area/ruin/space/ancientstation/atmo)
@@ -3676,7 +3676,7 @@
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"ix" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/effect/decal/cleanable/dirt,
@@ -3690,19 +3690,19 @@
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"iz" = (
/obj/machinery/atmospherics/unary/vent_pump{
dir = 8
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"iA" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/recharge_station,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"iB" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -3821,7 +3821,7 @@
id_tag = "ancient"
},
/obj/machinery/door/airlock/command{
- name = "Delta Station Access"
+ name = "Theta Station Access"
},
/turf/simulated/floor/plasteel,
/area/ruin/space/ancientstation/powered)
@@ -3856,7 +3856,7 @@
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"iS" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -3865,14 +3865,14 @@
/obj/machinery/door/firedoor,
/obj/machinery/door/airlock/science,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"iT" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"iU" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -3880,7 +3880,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/machinery/door/firedoor,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"iV" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -3891,7 +3891,7 @@
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"iW" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -3921,7 +3921,7 @@
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"iY" = (
/obj/machinery/light/small{
dir = 4
@@ -3931,7 +3931,7 @@
/obj/item/flash,
/obj/item/flash,
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"iZ" = (
/obj/structure/closet/crate/radiation,
/obj/item/stack/sheet/mineral/uranium{
@@ -4005,7 +4005,7 @@
icon_state = "plant-dead"
},
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"ji" = (
/obj/structure/cable{
d1 = 4;
@@ -4014,7 +4014,7 @@
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"jj" = (
/obj/structure/cable{
d1 = 4;
@@ -4025,7 +4025,7 @@
/obj/machinery/door/firedoor,
/obj/machinery/door/airlock/science,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"jk" = (
/obj/structure/cable{
d1 = 4;
@@ -4035,7 +4035,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/machinery/door/firedoor,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"jl" = (
/obj/structure/cable{
d1 = 2;
@@ -4044,27 +4044,27 @@
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"jm" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/particle_accelerator/particle_emitter/center{
icon = 'icons/obj/machines/particle_accelerator3.dmi'
},
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"jn" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/door/firedoor,
/obj/machinery/door/airlock/science,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"jo" = (
/obj/effect/decal/cleanable/dirt,
/obj/item/twohanded/required/kirbyplants{
icon_state = "plant-dead"
},
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"jp" = (
/obj/structure/cable{
d1 = 1;
@@ -4241,7 +4241,7 @@
},
/obj/machinery/power/apc{
dir = 4;
- name = "Delta RnD APC";
+ name = "Theta RnD APC";
pixel_x = 24;
report_power_alarm = 0;
start_charge = 0
@@ -4726,7 +4726,7 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"kN" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/door/firedoor,
@@ -4734,14 +4734,14 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"kO" = (
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/obj/machinery/door/firedoor,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"kP" = (
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
@@ -4757,39 +4757,39 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"kR" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"kS" = (
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"kT" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/particle_accelerator/particle_emitter/left{
icon = 'icons/obj/machines/particle_accelerator3.dmi'
},
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"kU" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/particle_accelerator/fuel_chamber{
icon = 'icons/obj/machines/particle_accelerator3.dmi'
},
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"kV" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/particle_accelerator/end_cap{
icon = 'icons/obj/machines/particle_accelerator3.dmi'
},
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"kW" = (
/obj/structure/table,
/obj/effect/decal/cleanable/dirt,
@@ -4813,7 +4813,7 @@
icon = 'icons/obj/machines/particle_accelerator3.dmi'
},
/turf/simulated/floor/plating,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"kZ" = (
/obj/structure/lattice/catwalk,
/turf/simulated/floor/plating,
@@ -4860,13 +4860,13 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"le" = (
/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply,
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"lf" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -4878,7 +4878,7 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"lg" = (
/obj/structure/cable{
d1 = 4;
@@ -4888,7 +4888,7 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"lh" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/firealarm{
@@ -4897,7 +4897,7 @@
},
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"li" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/effect/decal/cleanable/dirt,
@@ -5151,7 +5151,7 @@
/obj/effect/decal/cleanable/dirt,
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"lE" = (
/obj/machinery/light/small{
dir = 4
@@ -5207,7 +5207,7 @@
},
/mob/living/simple_animal/hostile/hivebot,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
"lL" = (
/obj/structure/rack,
/obj/item/clothing/suit/armor/vest/old,
@@ -5240,7 +5240,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/warning_stripes/arrow,
/turf/simulated/floor/plasteel,
-/area/ruin/space/ancientstation/deltacorridor)
+/area/ruin/space/ancientstation/thetacorridor)
(1,1,1) = {"
aa
diff --git a/_maps/map_files/generic/tcommsat-blown.dmm b/_maps/map_files/generic/tcommsat-blown.dmm
index ee06423a8be..e31ba89348a 100644
--- a/_maps/map_files/generic/tcommsat-blown.dmm
+++ b/_maps/map_files/generic/tcommsat-blown.dmm
@@ -119,10 +119,6 @@
/obj/structure/lattice,
/turf/space,
/area/space/nearstation)
-"be" = (
-/obj/item/trash/cheesie,
-/turf/space,
-/area/space/nearstation)
"bj" = (
/turf/simulated/floor/plating/airless,
/area/space/nearstation)
@@ -957,6 +953,17 @@
},
/turf/simulated/floor/plating/airless,
/area/AIsattele)
+"ji" = (
+/obj/docking_port/stationary{
+ dir = 8;
+ dwidth = 10;
+ height = 35;
+ id = "whiteship_away";
+ name = "Deep Space";
+ width = 21
+ },
+/turf/space,
+/area/space)
"yn" = (
/turf/space,
/area/space/nearstation)
@@ -8721,7 +8728,7 @@ aa
aa
aa
aa
-be
+aa
aa
aa
aa
@@ -17223,7 +17230,7 @@ aa
aa
aa
aa
-aa
+ji
aa
aa
aa
diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm
index 507142c0892..002b3ecc691 100644
--- a/code/ATMOSPHERICS/atmospherics.dm
+++ b/code/ATMOSPHERICS/atmospherics.dm
@@ -343,3 +343,7 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new())
/obj/machinery/atmospherics/update_remote_sight(mob/user)
user.sight |= (SEE_TURFS|BLIND)
. = ..()
+
+//Used for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it.
+/obj/machinery/atmospherics/proc/can_see_pipes()
+ return TRUE
diff --git a/code/__DEFINES/genetics.dm b/code/__DEFINES/genetics.dm
index 4ac05376e9d..58571e8b1ca 100644
--- a/code/__DEFINES/genetics.dm
+++ b/code/__DEFINES/genetics.dm
@@ -24,78 +24,61 @@
///////////////////////////////////////
// MUTATIONS
///////////////////////////////////////
+
// Generic mutations:
-#define TK 1
-#define COLDRES 2
-#define XRAY 3
-#define HULK 4
-#define CLUMSY 5
-#define FAT 6
-#define HUSK 7
-#define NOCLONE 8
-
-// Extra powers:
-#define LASER 9 // harm intent - click anywhere to shoot lasers from eyes
-
-//species mutation
-#define WINGDINGS 10 // Ayy lmao
-
-//2spooky
-#define SKELETON 29
-#define PLANT 30
-
-// Other Mutations:
-#define BREATHLESS 100 // no breathing
-#define REMOTE_VIEW 101 // remote viewing
-#define REGEN 102 // health regen
-#define RUN 103 // no slowdown
-#define REMOTE_TALK 104 // remote talking
-#define MORPH 105 // changing appearance
-#define HEATRES 106 // heat resistance
-#define HALLUCINATE 107 // hallucinations
-#define FINGERPRINTS 108 // no fingerprints
-#define NO_SHOCK 109 // insulated hands
-#define DWARF 110 // table climbing
-
-// Goon muts
-#define OBESITY 200 // Decreased metabolism
-// 201 undefined
-#define STRONG 202 // (Nothing)
-#define SOBER 203 // Increased alcohol metabolism
-#define PSY_RESIST 204 // Block remoteview
-// 205 undefined
-#define EMPATH 206 //Read minds
-#define COMIC 207 //Comic Sans
-
-// /vg/ muts
-#define LOUD 208 // CAUSES INTENSE YELLING
-#define DIZZY 210 // Trippy.
-
-#define LISP 300
-#define RADIOACTIVE 301
-#define CHAV 302
-#define SWEDISH 303
-#define SCRAMBLED 304
-#define HORNS 305
-#define IMMOLATE 306
-#define CLOAK 307
-#define CHAMELEON 308
-#define CRYO 309
-#define EATER 310
-
-#define JUMPY 400
-#define POLYMORPH 401
-
+#define TK "telekenesis"
+#define COLDRES "cold_resistance"
+#define XRAY "xray"
+#define HULK "hulk"
+#define CLUMSY "clumsy"
+#define FAT "fat"
+#define HUSK "husk"
+#define NOCLONE "noclone"
+#define LASER "eyelaser" // harm intent - click anywhere to shoot lasers from eyes
+#define WINGDINGS "wingdings" // Ayy lmao
+#define SKELETON "skeleton"
+#define BREATHLESS "breathless" // no breathing
+#define REMOTE_VIEW "remove_view" // remote viewing
+#define REGEN "regeneration" // health regen
+#define RUN "increased_run" // no slowdown
+#define REMOTE_TALK "remote_talk" // remote talking
+#define MORPH "morph" // changing appearance
+#define HEATRES "heat_resistance" // heat resistance
+#define HALLUCINATE "hallucinate" // hallucinations
+#define FINGERPRINTS "no_prints" // no fingerprints
+#define NO_SHOCK "no_shock" // insulated hands
+#define DWARF "dwarf" // table climbing
+#define OBESITY "obesity" // Decreased metabolism
+#define STRONG "strong" // (Nothing)
+#define SOBER "sober" // Increased alcohol metabolism
+#define PSY_RESIST "psy_resist" // Block remoteview
+#define EMPATH "empathy" //Read minds
+#define COMIC "comic_sans" //Comic Sans
+#define LOUD "loudness" // CAUSES INTENSE YELLING
+#define DIZZY "dizzy" // Trippy.
+#define LISP "lisp"
+#define RADIOACTIVE "radioactive"
+#define CHAV "chav"
+#define SWEDISH "swedish"
+#define SCRAMBLED "scrambled"
+#define HORNS "horns"
+#define IMMOLATE "immolate"
+#define CLOAK "cloak"
+#define CHAMELEON "chameleon"
+#define CRYO "cryokinesis"
+#define EATER "matter_eater"
+#define JUMPY "jumpy"
+#define POLYMORPH "polymorph"
//disabilities
-#define NEARSIGHTED 1
-#define EPILEPSY 2
-#define COUGHING 4
-#define TOURETTES 8
-#define NERVOUS 16
-#define BLIND 32
-#define COLOURBLIND 64
-#define MUTE 128
-#define DEAF 256
+#define NEARSIGHTED "nearsighted"
+#define EPILEPSY "epilepsy"
+#define COUGHING "coughing"
+#define TOURETTES "tourettes"
+#define NERVOUS "nervous"
+#define BLINDNESS "blind"
+#define COLOURBLIND "colorblind"
+#define MUTE "mute"
+#define DEAF "deaf"
//Nutrition levels for humans. No idea where else to put it
#define NUTRITION_LEVEL_FAT 600
diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index 2217271a2e7..366b8b3bcd9 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -408,7 +408,7 @@
/proc/alone_in_area(var/area/the_area, var/mob/must_be_alone, var/check_type = /mob/living/carbon)
var/area/our_area = get_area(the_area)
- for(var/C in GLOB.living_mob_list)
+ for(var/C in GLOB.alive_mob_list)
if(!istype(C, check_type))
continue
if(C == must_be_alone)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index a8066f62a37..aa130bb3ca9 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -320,7 +320,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
//When a borg is activated, it can choose which AI it wants to be slaved to
/proc/active_ais()
. = list()
- for(var/mob/living/silicon/ai/A in GLOB.living_mob_list)
+ for(var/mob/living/silicon/ai/A in GLOB.alive_mob_list)
if(A.stat == DEAD)
continue
if(A.control_disabled == 1)
diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm
index b6fcae25061..2caa158757c 100644
--- a/code/_globalvars/lists/mobs.dm
+++ b/code/_globalvars/lists/mobs.dm
@@ -3,30 +3,31 @@ GLOBAL_LIST_EMPTY(all_species)
GLOBAL_LIST_EMPTY(all_languages)
GLOBAL_LIST_EMPTY(language_keys) // Table of say codes for all languages
GLOBAL_LIST_EMPTY(all_superheroes)
-GLOBAL_LIST_INIT(whitelisted_species, list())
+GLOBAL_LIST_EMPTY(whitelisted_species)
-GLOBAL_LIST_INIT(clients, list()) //list of all clients
-GLOBAL_LIST_INIT(admins, list()) //list of all clients whom are admins
-GLOBAL_LIST_INIT(deadmins, list()) //list of all clients who have used the de-admin verb.
-GLOBAL_LIST_INIT(directory, list()) //list of all ckeys with associated client
-GLOBAL_LIST_INIT(stealthminID, list()) //reference list with IDs that store ckeys, for stealthmins
+GLOBAL_LIST_EMPTY(clients) //list of all clients
+GLOBAL_LIST_EMPTY(admins) //list of all clients whom are admins
+GLOBAL_LIST_EMPTY(deadmins) //list of all clients who have used the de-admin verb.
+GLOBAL_LIST_EMPTY(directory) //list of all ckeys with associated client
+GLOBAL_LIST_EMPTY(stealthminID) //reference list with IDs that store ckeys, for stealthmins
//Since it didn't really belong in any other category, I'm putting this here
//This is for procs to replace all the goddamn 'in world's that are chilling around the code
-GLOBAL_LIST_INIT(player_list, list()) //List of all mobs **with clients attached**. Excludes /mob/new_player
-GLOBAL_LIST_INIT(mob_list, list()) //List of all mobs, including clientless
-GLOBAL_LIST_INIT(silicon_mob_list, list()) //List of all silicon mobs, including clientless
-GLOBAL_LIST_INIT(spirits, list()) //List of all the spirits, including Masks
-GLOBAL_LIST_INIT(living_mob_list, list()) //List of all alive mobs, including clientless. Excludes /mob/new_player
-GLOBAL_LIST_INIT(dead_mob_list, list()) //List of all dead mobs, including clientless. Excludes /mob/new_player
-GLOBAL_LIST_INIT(respawnable_list, list()) //List of all mobs, dead or in mindless creatures that still be respawned.
-GLOBAL_LIST_INIT(non_respawnable_keys, list()) //List of ckeys that are excluded from respawning for remainder of round.
+GLOBAL_LIST_EMPTY(player_list) //List of all mobs **with clients attached**. Excludes /mob/new_player
+GLOBAL_LIST_EMPTY(mob_list) //List of all mobs, including clientless
+GLOBAL_LIST_EMPTY(silicon_mob_list) //List of all silicon mobs, including clientless
+GLOBAL_LIST_EMPTY(mob_living_list) //all instances of /mob/living and subtypes
+GLOBAL_LIST_EMPTY(spirits) //List of all the spirits, including Masks
+GLOBAL_LIST_EMPTY(alive_mob_list) //List of all alive mobs, including clientless. Excludes /mob/new_player
+GLOBAL_LIST_EMPTY(dead_mob_list) //List of all dead mobs, including clientless. Excludes /mob/new_player
+GLOBAL_LIST_EMPTY(respawnable_list) //List of all mobs, dead or in mindless creatures that still be respawned.
+GLOBAL_LIST_EMPTY(non_respawnable_keys) //List of ckeys that are excluded from respawning for remainder of round.
GLOBAL_LIST_INIT(simple_animals, list(list(), list(), list(), list())) //One for each AI_* status define, List of all simple animals, including clientless
-GLOBAL_LIST_INIT(bots_list, list()) //List of all bots(beepsky, medibots,etc)
+GLOBAL_LIST_EMPTY(bots_list) //List of all bots(beepsky, medibots,etc)
-GLOBAL_LIST_INIT(med_hud_users, list())
-GLOBAL_LIST_INIT(sec_hud_users, list())
-GLOBAL_LIST_INIT(antag_hud_users, list())
-GLOBAL_LIST_INIT(surgeries_list, list())
-GLOBAL_LIST_INIT(hear_radio_list, list()) //Mobs that hear the radio even if there's no client
+GLOBAL_LIST_EMPTY(med_hud_users)
+GLOBAL_LIST_EMPTY(sec_hud_users)
+GLOBAL_LIST_EMPTY(antag_hud_users)
+GLOBAL_LIST_EMPTY(surgeries_list)
+GLOBAL_LIST_EMPTY(hear_radio_list) //Mobs that hear the radio even if there's no client
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 20e50bb3054..d840f64bb4a 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -134,9 +134,9 @@
if(W == A)
W.attack_self(src)
if(hand)
- update_inv_l_hand(0)
+ update_inv_l_hand()
else
- update_inv_r_hand(0)
+ update_inv_r_hand()
return
// operate three levels deep here (item in backpack in src; item in box in backpack in src, not any deeper)
@@ -258,6 +258,9 @@
Makes the mob face the direction of the clicked thing
*/
/mob/proc/MiddleShiftClickOn(atom/A)
+ return
+
+/mob/living/MiddleShiftClickOn(atom/A)
if(incapacitated())
return
var/face_dir = get_cardinal_dir(src, A)
@@ -273,6 +276,9 @@
Makes the mob constantly face the object (until it's out of sight)
*/
/mob/proc/MiddleShiftControlClickOn(atom/A)
+ return
+
+/mob/living/MiddleShiftControlClickOn(atom/A)
var/face_uid = A.UID()
if(forced_look == face_uid || A == src)
forced_look = null
diff --git a/code/_onclick/hud/other_mobs.dm b/code/_onclick/hud/other_mobs.dm
index f03d436bcaf..8f243dfcdc1 100644
--- a/code/_onclick/hud/other_mobs.dm
+++ b/code/_onclick/hud/other_mobs.dm
@@ -3,6 +3,10 @@
/datum/hud/simple_animal/New(mob/user)
..()
+
+ mymob.healths = new /obj/screen/healths()
+ infodisplay += mymob.healths
+
var/obj/screen/using
using = new /obj/screen/act_intent/simple_animal()
using.icon_state = mymob.a_intent
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index c0f5cfd5f3b..1423720f8f6 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -371,15 +371,15 @@
return 1
if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
return 1
-
+
if(hud?.mymob && slot_id)
var/obj/item/inv_item = hud.mymob.get_item_by_slot(slot_id)
if(inv_item)
return inv_item.Click(location, control, params)
if(usr.attack_ui(slot_id))
- usr.update_inv_l_hand(0)
- usr.update_inv_r_hand(0)
+ usr.update_inv_l_hand()
+ usr.update_inv_r_hand()
return 1
/obj/screen/inventory/hand
diff --git a/code/controllers/subsystem/afk.dm b/code/controllers/subsystem/afk.dm
index 81a4e4cb3d9..037b9a2bd0a 100644
--- a/code/controllers/subsystem/afk.dm
+++ b/code/controllers/subsystem/afk.dm
@@ -21,7 +21,7 @@ SUBSYSTEM_DEF(afk)
/datum/controller/subsystem/afk/fire()
var/list/toRemove = list()
- for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
+ for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(!H?.ckey) // Useless non ckey creatures
continue
diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm
index 1d6fd410f9b..ef89317d0f5 100644
--- a/code/controllers/subsystem/jobs.dm
+++ b/code/controllers/subsystem/jobs.dm
@@ -497,13 +497,14 @@ SUBSYSTEM_DEF(jobs)
job.after_spawn(H)
//Gives glasses to the vision impaired
- if(H.disabilities & DISABILITY_FLAG_NEARSIGHTED)
+ if(NEARSIGHTED in H.mutations)
var/equipped = H.equip_to_slot_or_del(new /obj/item/clothing/glasses/regular(H), slot_glasses)
if(equipped != 1)
var/obj/item/clothing/glasses/G = H.glasses
if(istype(G) && !G.prescription)
- G.prescription = 1
+ G.prescription = TRUE
G.name = "prescription [G.name]"
+ H.update_nearsighted_effects()
return H
diff --git a/code/controllers/subsystem/mobs.dm b/code/controllers/subsystem/mobs.dm
index 8345822ca80..9445dd2717a 100644
--- a/code/controllers/subsystem/mobs.dm
+++ b/code/controllers/subsystem/mobs.dm
@@ -11,7 +11,7 @@ SUBSYSTEM_DEF(mobs)
var/static/list/cubemonkeys = list()
/datum/controller/subsystem/mobs/stat_entry()
- ..("P:[GLOB.mob_list.len]")
+ ..("P:[GLOB.mob_living_list.len]")
/datum/controller/subsystem/mobs/Initialize(start_timeofday)
clients_by_zlevel = new /list(world.maxz,0)
@@ -21,17 +21,17 @@ SUBSYSTEM_DEF(mobs)
/datum/controller/subsystem/mobs/fire(resumed = 0)
var/seconds = wait * 0.1
if(!resumed)
- src.currentrun = GLOB.mob_list.Copy()
+ src.currentrun = GLOB.mob_living_list.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
var/times_fired = src.times_fired
while(currentrun.len)
- var/mob/M = currentrun[currentrun.len]
+ var/mob/living/L = currentrun[currentrun.len]
currentrun.len--
- if(M)
- M.Life(seconds, times_fired)
+ if(L)
+ L.Life(seconds, times_fired)
else
- GLOB.mob_list.Remove(M)
+ GLOB.mob_living_list.Remove(L)
if(MC_TICK_CHECK)
return
diff --git a/code/controllers/subsystem/statistics.dm b/code/controllers/subsystem/statistics.dm
new file mode 100644
index 00000000000..3a0bf7e51e2
--- /dev/null
+++ b/code/controllers/subsystem/statistics.dm
@@ -0,0 +1,28 @@
+SUBSYSTEM_DEF(statistics)
+ name = "Statistics"
+ wait = 6000 // 10 minute delay between fires
+ runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME // Only count time actually ingame to avoid logging pre-round dips
+ offline_implications = "Player count and admin count statistics will no longer be logged to the database. No immediate action is needed."
+
+
+/datum/controller/subsystem/statistics/Initialize(start_timeofday)
+ if(!config.sql_enabled)
+ flags |= SS_NO_FIRE // Disable firing if SQL is disabled
+ return ..()
+
+/datum/controller/subsystem/statistics/fire(resumed = 0)
+ sql_poll_players()
+
+/datum/controller/subsystem/statistics/proc/sql_poll_players()
+ if(!config.sql_enabled)
+ return
+ var/playercount = GLOB.clients.len
+ var/admincount = GLOB.admins.len
+ if(!GLOB.dbcon.IsConnected())
+ log_game("SQL ERROR during player polling. Failed to connect.")
+ else
+ var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
+ var/DBQuery/query = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("legacy_population")] (playercount, admincount, time) VALUES ([playercount], [admincount], '[sqltime]')")
+ if(!query.Execute())
+ var/err = query.ErrorMsg()
+ log_game("SQL ERROR during playercount polling. Error: \[[err]\]\n")
diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm
index c05d96bb441..228f1a7c528 100644
--- a/code/controllers/subsystem/ticker.dm
+++ b/code/controllers/subsystem/ticker.dm
@@ -29,7 +29,7 @@ SUBSYSTEM_DEF(ticker)
var/pregame_timeleft // This is used for calculations
var/delay_end = 0 //if set to nonzero, the round will not restart on it's own
var/triai = 0//Global holder for Triumvirate
- var/initialtpass = 0 //holder for inital autotransfer vote timer
+ var/next_autotransfer = 0 //holder for inital autotransfer vote timer
var/obj/screen/cinematic = null //used for station explosion cinematic
var/round_end_announced = 0 // Spam Prevention. Announce round end only once.
var/ticker_going = TRUE // This used to be in the unused globals, but it turns out its actually used in a load of places. Its now a ticker var because its related to round stuff, -aa
@@ -90,6 +90,11 @@ SUBSYSTEM_DEF(ticker)
delay_end = 0 // reset this in case round start was delayed
mode.process()
mode.process_job_tasks()
+
+ if(world.time > next_autotransfer)
+ SSvote.autotransfer()
+ next_autotransfer = world.time + config.vote_autotransfer_interval
+
var/game_finished = SSshuttle.emergency.mode >= SHUTTLE_ENDGAME || mode.station_was_nuked
if(config.continuous_rounds)
mode.check_finished() // some modes contain var-changing code in here, so call even if we don't uses result
@@ -111,19 +116,6 @@ SUBSYSTEM_DEF(ticker)
else
world.Reboot("Round ended.", "end_proper", "proper completion")
-
-/datum/controller/subsystem/ticker/proc/votetimer()
- var/timerbuffer = 0
- if(initialtpass == 0)
- timerbuffer = config.vote_autotransfer_initial
- else
- timerbuffer = config.vote_autotransfer_interval
- spawn(timerbuffer)
- SSvote.autotransfer()
- initialtpass = 1
- votetimer()
-
-
/datum/controller/subsystem/ticker/proc/setup()
cultdat = setupcult()
//Create and announce mode
@@ -281,11 +273,8 @@ SUBSYSTEM_DEF(ticker)
auto_toggle_ooc(0) // Turn it off
round_start_time = world.time
- if(config.sql_enabled)
- spawn(3000)
- statistic_cycle() // Polls population totals regularly and stores them in an SQL DB
-
- votetimer()
+ // Sets the auto shuttle vote to happen after the config duration
+ next_autotransfer = world.time + config.vote_autotransfer_initial
for(var/mob/new_player/N in GLOB.mob_list)
if(N.client)
diff --git a/code/controllers/subsystem/weather.dm b/code/controllers/subsystem/weather.dm
index 7b08bd3ca48..bf405444110 100644
--- a/code/controllers/subsystem/weather.dm
+++ b/code/controllers/subsystem/weather.dm
@@ -20,7 +20,7 @@ SUBSYSTEM_DEF(weather)
var/datum/weather/W = V
if(W.aesthetic || W.stage != MAIN_STAGE)
continue
- for(var/i in GLOB.living_mob_list)
+ for(var/i in GLOB.mob_living_list)
var/mob/living/L = i
if(W.can_weather_act(L))
W.weather_act(L)
diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm
index 63fa3af0605..81312cdfcc4 100644
--- a/code/datums/diseases/_MobProcs.dm
+++ b/code/datums/diseases/_MobProcs.dm
@@ -126,11 +126,19 @@
AddDisease(D)
+/**
+ * Forces the mob to contract a virus. If the mob can have viruses. Ignores clothing and other protection
+ * Returns TRUE if it succeeds. False if it doesn't
+ *
+ * Arguments:
+ * * D - the disease the mob will try to contract
+ */
//Same as ContractDisease, except never overidden clothes checks
/mob/proc/ForceContractDisease(datum/disease/D)
if(!CanContractDisease(D))
- return 0
+ return FALSE
AddDisease(D)
+ return TRUE
/mob/living/carbon/human/CanContractDisease(datum/disease/D)
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index 5464bd9f012..9aeade59a1d 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -396,7 +396,7 @@ GLOBAL_LIST_INIT(advance_cures, list(
for(var/datum/disease/advance/AD in GLOB.active_diseases)
AD.Refresh()
- for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
+ for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
if(!is_station_level(H.z))
continue
if(!H.HasDisease(D))
diff --git a/code/datums/diseases/advance/symptoms/deafness.dm b/code/datums/diseases/advance/symptoms/deafness.dm
index 1a9bba6961e..a3111478b26 100644
--- a/code/datums/diseases/advance/symptoms/deafness.dm
+++ b/code/datums/diseases/advance/symptoms/deafness.dm
@@ -33,7 +33,7 @@ Bonus
if(3, 4)
to_chat(M, "[pick("You hear a ringing in your ear.", "Your ears pop.")]")
if(5)
- if(!(M.disabilities & DEAF))
+ if(!(DEAF in M.mutations))
to_chat(M, "Your ears pop and begin ringing loudly!")
M.BecomeDeaf()
spawn(200)
diff --git a/code/datums/diseases/advance/symptoms/skin.dm b/code/datums/diseases/advance/symptoms/skin.dm
index aa5a3494584..a3346dce800 100644
--- a/code/datums/diseases/advance/symptoms/skin.dm
+++ b/code/datums/diseases/advance/symptoms/skin.dm
@@ -35,7 +35,7 @@ BONUS
switch(A.stage)
if(5)
H.s_tone = -85
- H.update_body(0)
+ H.update_body()
else
H.visible_message("[H] looks a bit pale...", "Your skin suddenly appears lighter...")
@@ -79,7 +79,7 @@ BONUS
switch(A.stage)
if(5)
H.s_tone = 85
- H.update_body(0)
+ H.update_body()
else
H.visible_message("[H] looks a bit dark...", "Your skin suddenly appears darker...")
diff --git a/code/datums/helper_datums/global_iterator.dm b/code/datums/helper_datums/global_iterator.dm
deleted file mode 100644
index 214045941b5..00000000000
--- a/code/datums/helper_datums/global_iterator.dm
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
-README:
-
-The global_iterator datum is supposed to provide a simple and robust way to
-create some constantly "looping" processes with ability to stop and restart them at will.
-Generally, the only thing you want to play with (meaning, redefine) is the process() proc.
-It must contain all the things you want done.
-
-Control functions:
- new - used to create datum. First argument (optional) - var list(to use in process() proc) as list,
- second (optional) - autostart control.
- If autostart == TRUE, the loop will be started immediately after datum creation.
-
- start(list/arguments) - starts the loop. Takes arguments(optional) as a list, which is then used
- by process() proc. Returns null if datum already active, 1 if loop started succesfully and 0 if there's
- an error in supplied arguments (not list or empty list).
-
- stop() - stops the loop. Returns null if datum is already inactive and 1 on success.
-
- set_delay(new_delay) - sets the delay between iterations. Pretty selfexplanatory.
- Returns 0 on error(new_delay is not numerical), 1 otherwise.
-
- set_process_args(list/arguments) - passes the supplied arguments to the process() proc.
-
- active() - Returns 1 if datum is active, 0 otherwise.
-
- toggle() - toggles datum state. Returns new datum state (see active()).
-
-Misc functions:
-
- get_last_exec_time() - Returns the time of last iteration.
-
- get_last_exec_time_as_text() - Returns the time of last iteration as text
-
-
-Control vars:
-
- delay - delay between iterations
-
- check_for_null - if equals TRUE, on each iteration the supplied arguments will be checked for nulls.
- If some varible equals null (and null only), the loop is stopped.
- Usefull, if some var unexpectedly becomes null - due to object deletion, for example.
- Of course, you can also check the variables inside process() proc to prevent runtime errors.
-
-Data storage vars:
-
- result - stores the value returned by process() proc
-*/
-
-/datum/global_iterator
- var/control_switch = 0
- var/delay = 10
- var/list/arg_list = new
- var/last_exec = null
- var/check_for_null = 1
- var/forbid_garbage = 0
- var/result
- var/state = 0
-
-/datum/global_iterator/New(list/arguments=null,autostart=1)
- delay = delay>0?(delay):1
- if(forbid_garbage) //prevents garbage collection with tag != null
- tag = "\ref[src]"
- set_process_args(arguments)
- if(autostart)
- start()
- return
-
-/datum/global_iterator/proc/main()
- state = 1
- while(src && control_switch)
- last_exec = world.timeofday
- if(check_for_null && has_null_args())
- stop()
- return 0
- result = process(arglist(arg_list))
- for(var/sleep_time=delay;sleep_time>0;sleep_time--) //uhh, this is ugly. But I see no other way to terminate sleeping proc. Such disgrace.
- if(!control_switch)
- return 0
- sleep(1)
- return 0
-
-/datum/global_iterator/proc/start(list/arguments=null)
- if(active())
- return
- if(arguments)
- if(!set_process_args(arguments))
- return 0
- if(!state_check()) //the main loop is sleeping, wait for it to terminate.
- return
- control_switch = 1
- spawn()
- state = main()
- return 1
-
-/datum/global_iterator/proc/stop()
- if(!active())
- return
- control_switch = 0
- spawn(-1) //report termination error but don't wait for state_check().
- state_check()
- return 1
-
-/datum/global_iterator/proc/state_check()
- var/lag = 0
- while(state)
- sleep(1)
- if(++lag>10)
- CRASH("The global_iterator loop \ref[src] failed to terminate in designated timeframe. This may be caused by server lagging.")
- return 1
-
-/datum/global_iterator/process()
- return
-
-/datum/global_iterator/proc/active()
- return control_switch
-
-/datum/global_iterator/proc/has_null_args()
- if(null in arg_list)
- return 1
- return 0
-
-
-/datum/global_iterator/proc/set_delay(new_delay)
- if(isnum(new_delay))
- delay = max(1, round(new_delay))
- return 1
- else
- return 0
-
-/datum/global_iterator/proc/get_last_exec_time()
- return (last_exec||0)
-
-/datum/global_iterator/proc/get_last_exec_time_as_text()
- return (time2text(last_exec)||"Wasn't executed yet")
-
-/datum/global_iterator/proc/set_process_args(list/arguments)
- if(arguments && istype(arguments, /list) && arguments.len)
- arg_list = arguments
- return 1
- else
-// to_chat(world, "Invalid arguments supplied for [src.type], ref = \ref[src]")
- return 0
-
-/datum/global_iterator/proc/toggle_null_checks()
- check_for_null = !check_for_null
- return check_for_null
-
-/datum/global_iterator/proc/toggle()
- if(!stop())
- start()
- return active()
diff --git a/code/datums/holocall.dm b/code/datums/holocall.dm
index b8684072c3f..369c01cce42 100644
--- a/code/datums/holocall.dm
+++ b/code/datums/holocall.dm
@@ -148,7 +148,6 @@
eye.eye_user = user
eye.name = "Camera Eye ([user.name])"
user.remote_control = eye
- user.remote_view = 1
user.reset_perspective(eye)
eye.setLoc(get_turf(H))
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 83e69bdf5b1..7d3a73abf24 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -1688,7 +1688,7 @@
if(H.w_uniform)
jumpsuit = H.w_uniform
jumpsuit.color = team_color
- H.update_inv_w_uniform(0,0)
+ H.update_inv_w_uniform()
add_attack_logs(missionary, current, "Converted to a zealot for [convert_duration/600] minutes")
addtimer(CALLBACK(src, .proc/remove_zealot, jumpsuit), convert_duration) //deconverts after the timer expires
@@ -1705,7 +1705,7 @@
jumpsuit.color = initial(jumpsuit.color) //reset the jumpsuit no matter where our mind is
if(ishuman(current)) //but only try updating us if we are still a human type since it is a human proc
var/mob/living/carbon/human/H = current
- H.update_inv_w_uniform(0,0)
+ H.update_inv_w_uniform()
to_chat(current, "You seem to have forgotten the events of the past 10 minutes or so, and your head aches a bit as if someone beat it savagely with a stick.")
to_chat(current, "This means you don't remember who you were working for or what you were doing.")
diff --git a/code/datums/spells/cluwne.dm b/code/datums/spells/cluwne.dm
index 91df261e9c2..19a12055fef 100644
--- a/code/datums/spells/cluwne.dm
+++ b/code/datums/spells/cluwne.dm
@@ -36,10 +36,10 @@
unEquip(gloves, 1)
if(!istype(wear_mask, /obj/item/clothing/mask/cursedclown)) //Infinite loops otherwise
unEquip(wear_mask, 1)
- equip_to_slot_if_possible(new /obj/item/clothing/under/cursedclown, slot_w_uniform, 1, 1, 1)
- equip_to_slot_if_possible(new /obj/item/clothing/gloves/cursedclown, slot_gloves, 1, 1, 1)
- equip_to_slot_if_possible(new /obj/item/clothing/mask/cursedclown, slot_wear_mask, 1, 1, 1)
- equip_to_slot_if_possible(new /obj/item/clothing/shoes/cursedclown, slot_shoes, 1, 1, 1)
+ equip_to_slot_if_possible(new /obj/item/clothing/under/cursedclown, slot_w_uniform, TRUE, TRUE)
+ equip_to_slot_if_possible(new /obj/item/clothing/gloves/cursedclown, slot_gloves, TRUE, TRUE)
+ equip_to_slot_if_possible(new /obj/item/clothing/mask/cursedclown, slot_wear_mask, TRUE, TRUE)
+ equip_to_slot_if_possible(new /obj/item/clothing/shoes/cursedclown, slot_shoes, TRUE, TRUE)
/mob/living/carbon/human/proc/makeAntiCluwne()
to_chat(src, "You don't feel very funny.")
@@ -83,5 +83,5 @@
unEquip(gloves, 1)
qdel(G)
- equip_to_slot_if_possible(new /obj/item/clothing/under/lawyer/black, slot_w_uniform, 1, 1, 1)
- equip_to_slot_if_possible(new /obj/item/clothing/shoes/black, slot_shoes, 1, 1, 1)
+ equip_to_slot_if_possible(new /obj/item/clothing/under/lawyer/black, slot_w_uniform, TRUE, TRUE)
+ equip_to_slot_if_possible(new /obj/item/clothing/shoes/black, slot_shoes, TRUE, TRUE)
diff --git a/code/datums/spells/devil.dm b/code/datums/spells/devil.dm
index 12e2a44a8c1..27b2fcb8851 100644
--- a/code/datums/spells/devil.dm
+++ b/code/datums/spells/devil.dm
@@ -142,7 +142,6 @@
return 0
fakefire()
forceMove(get_turf(src))
- reset_perspective()
visible_message("[src] appears in a firey blaze!")
playsound(get_turf(src), 'sound/misc/exit_blood.ogg', 100, 1, -1)
spawn(15)
diff --git a/code/datums/spells/genetic.dm b/code/datums/spells/genetic.dm
index 3c2f997e461..d95c6212486 100644
--- a/code/datums/spells/genetic.dm
+++ b/code/datums/spells/genetic.dm
@@ -2,7 +2,6 @@
name = "Genetic"
desc = "This spell inflicts a set of mutations and disabilities upon the target."
- var/disabilities = 0 //bits
var/list/mutations = list() //mutation strings
var/duration = 100 //deciseconds
/*
@@ -20,16 +19,12 @@
for(var/mob/living/target in targets)
for(var/x in mutations)
target.mutations.Add(x)
- /* if(x == HULK && ishuman(target))
- target:hulk_time=world.time + duration */
- target.disabilities |= disabilities
target.update_mutations() //update target's mutation overlays
var/mob/living/carbon/human/H = target
if(ishuman(target))
H.update_body()
spawn(duration)
target.mutations.Remove(mutations)
- target.disabilities &= ~disabilities
target.update_mutations()
if(ishuman(target))
H.update_body()
diff --git a/code/datums/spells/horsemask.dm b/code/datums/spells/horsemask.dm
index 2c000a0d232..0140fbdf951 100644
--- a/code/datums/spells/horsemask.dm
+++ b/code/datums/spells/horsemask.dm
@@ -43,6 +43,6 @@
"Your face burns up, and shortly after the fire you realise you have the face of a horse!")
if(!target.unEquip(target.wear_mask))
qdel(target.wear_mask)
- target.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
+ target.equip_to_slot_if_possible(magichead, slot_wear_mask, TRUE, TRUE)
target.flash_eyes()
diff --git a/code/datums/spells/summonitem.dm b/code/datums/spells/summonitem.dm
index c3301f4d6ab..2a8e1d94526 100644
--- a/code/datums/spells/summonitem.dm
+++ b/code/datums/spells/summonitem.dm
@@ -104,12 +104,12 @@
if(target.hand) //left active hand
- if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_l_hand, 0, 1, 1))
- if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_r_hand, 0, 1, 1))
+ if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_l_hand, FALSE, TRUE))
+ if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_r_hand, FALSE, TRUE))
butterfingers = 1
else //right active hand
- if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_r_hand, 0, 1, 1))
- if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_l_hand, 0, 1, 1))
+ if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_r_hand, FALSE, TRUE))
+ if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_l_hand, FALSE, TRUE))
butterfingers = 1
if(butterfingers)
item_to_retrieve.loc = target.loc
diff --git a/code/datums/spells/touch_attacks.dm b/code/datums/spells/touch_attacks.dm
index d656bccac4a..c242a1aa52f 100644
--- a/code/datums/spells/touch_attacks.dm
+++ b/code/datums/spells/touch_attacks.dm
@@ -27,12 +27,12 @@
var/hand_handled = 1
attached_hand = new hand_path(src)
if(user.hand) //left active hand
- if(!user.equip_to_slot_if_possible(attached_hand, slot_l_hand, 0, 1, 1))
- if(!user.equip_to_slot_if_possible(attached_hand, slot_r_hand, 0, 1, 1))
+ if(!user.equip_to_slot_if_possible(attached_hand, slot_l_hand, FALSE, TRUE))
+ if(!user.equip_to_slot_if_possible(attached_hand, slot_r_hand, FALSE, TRUE))
hand_handled = 0
else //right active hand
- if(!user.equip_to_slot_if_possible(attached_hand, slot_r_hand, 0, 1, 1))
- if(!user.equip_to_slot_if_possible(attached_hand, slot_l_hand, 0, 1, 1))
+ if(!user.equip_to_slot_if_possible(attached_hand, slot_r_hand, FALSE, TRUE))
+ if(!user.equip_to_slot_if_possible(attached_hand, slot_l_hand, FALSE, TRUE))
hand_handled = 0
if(!hand_handled)
qdel(attached_hand)
diff --git a/code/datums/spells/wizard.dm b/code/datums/spells/wizard.dm
index cf7e6fa3217..6a951ac66a0 100644
--- a/code/datums/spells/wizard.dm
+++ b/code/datums/spells/wizard.dm
@@ -304,7 +304,7 @@
sound = 'sound/magic/blind.ogg'
/obj/effect/proc_holder/spell/targeted/genetic/blind
- disabilities = BLIND
+ mutations = list(BLINDNESS)
duration = 300
sound = 'sound/magic/blind.ogg'
diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm
index 1a407f2ec50..907e6a695e1 100644
--- a/code/datums/wires/wires.dm
+++ b/code/datums/wires/wires.dm
@@ -87,7 +87,7 @@ GLOBAL_LIST_INIT(wireColours, list("red", "blue", "green", "black", "orange", "b
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes)
- if(eyes && H.disabilities & COLOURBLIND)
+ if(eyes && (COLOURBLIND in H.mutations))
replace_colours = eyes.replace_colours
diff --git a/code/defines/procs/statistics.dm b/code/defines/procs/statistics.dm
index e6e111880fb..094e4f9ca2b 100644
--- a/code/defines/procs/statistics.dm
+++ b/code/defines/procs/statistics.dm
@@ -1,35 +1,3 @@
-/proc/sql_poll_players()
- if(!config.sql_enabled)
- return
- var/playercount = 0
- for(var/mob/M in GLOB.player_list)
- if(M.client)
- playercount += 1
- establish_db_connection()
- if(!GLOB.dbcon.IsConnected())
- log_game("SQL ERROR during player polling. Failed to connect.")
- else
- var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
- var/DBQuery/query = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("legacy_population")] (playercount, time) VALUES ([playercount], '[sqltime]')")
- if(!query.Execute())
- var/err = query.ErrorMsg()
- log_game("SQL ERROR during player polling. Error : \[[err]\]\n")
-
-
-/proc/sql_poll_admins()
- if(!config.sql_enabled)
- return
- var/admincount = GLOB.admins.len
- establish_db_connection()
- if(!GLOB.dbcon.IsConnected())
- log_game("SQL ERROR during admin polling. Failed to connect.")
- else
- var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
- var/DBQuery/query = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("legacy_population")] (admincount, time) VALUES ([admincount], '[sqltime]')")
- if(!query.Execute())
- var/err = query.ErrorMsg()
- log_game("SQL ERROR during admin polling. Error : \[[err]\]\n")
-
/proc/sql_report_round_start()
// TODO
if(!config.sql_enabled)
@@ -110,15 +78,6 @@
var/err = query.ErrorMsg()
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
-/proc/statistic_cycle()
- if(!config.sql_enabled)
- return
- while(1)
- sql_poll_players()
- sleep(600)
- sql_poll_admins()
- sleep(6000) //Poll every ten minutes
-
//This proc is used for feedback. It is executed at round end.
/proc/sql_commit_feedback()
if(!GLOB.blackbox)
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 1cb0ee3baad..365e06aca4b 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -202,9 +202,7 @@
else
return null
-/atom/proc/check_eye(user as mob)
- if(istype(user, /mob/living/silicon/ai)) // WHYYYY
- return 1
+/atom/proc/check_eye(user)
return
/atom/proc/on_reagent_change()
@@ -618,19 +616,19 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
if(wear_suit)
wear_suit.add_blood(blood_dna, color)
wear_suit.blood_color = color
- update_inv_wear_suit(1)
+ update_inv_wear_suit()
else if(w_uniform)
w_uniform.add_blood(blood_dna, color)
w_uniform.blood_color = color
- update_inv_w_uniform(1)
+ update_inv_w_uniform()
if(head)
head.add_blood(blood_dna, color)
head.blood_color = color
- update_inv_head(0,0)
+ update_inv_head()
if(glasses)
glasses.add_blood(blood_dna, color)
glasses.blood_color = color
- update_inv_glasses(0)
+ update_inv_glasses()
if(gloves)
var/obj/item/clothing/gloves/G = gloves
G.add_blood(blood_dna, color)
@@ -642,7 +640,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
transfer_blood_dna(blood_dna)
verbs += /mob/living/carbon/human/proc/bloody_doodle
- update_inv_gloves(1) //handles bloody hands overlays and updating
+ update_inv_gloves() //handles bloody hands overlays and updating
return 1
/obj/item/proc/add_blood_overlay(color)
diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm
index ceabae25973..1a92210f570 100644
--- a/code/game/dna/dna2.dm
+++ b/code/game/dna/dna2.dm
@@ -22,17 +22,17 @@ GLOBAL_LIST_EMPTY(bad_blocks)
/datum/dna
// READ-ONLY, GETS OVERWRITTEN
// DO NOT FUCK WITH THESE OR BYOND WILL EAT YOUR FACE
- var/uni_identity="" // Encoded UI
- var/struc_enzymes="" // Encoded SE
- var/unique_enzymes="" // MD5 of player name
+ var/uni_identity = "" // Encoded UI
+ var/struc_enzymes = "" // Encoded SE
+ var/unique_enzymes = "" // MD5 of player name
// Original Encoded SE, for use with Ryetalin
- var/struc_enzymes_original="" // Encoded SE
+ var/struc_enzymes_original = "" // Encoded SE
var/list/SE_original[DNA_SE_LENGTH]
// Internal dirtiness checks
- var/dirtyUI=0
- var/dirtySE=0
+ var/dirtyUI = 0
+ var/dirtySE = 0
// Okay to read, but you're an idiot if you do.
// BLOCK = VALUE
@@ -50,10 +50,10 @@ GLOBAL_LIST_EMPTY(bad_blocks)
// USE THIS WHEN COPYING STUFF OR YOU'LL GET CORRUPTION!
/datum/dna/proc/Clone()
var/datum/dna/new_dna = new()
- new_dna.unique_enzymes=unique_enzymes
- new_dna.struc_enzymes_original=struc_enzymes_original // will make clone's SE the same as the original, do we want this?
+ new_dna.unique_enzymes = unique_enzymes
+ new_dna.struc_enzymes_original = struc_enzymes_original // will make clone's SE the same as the original, do we want this?
new_dna.blood_type = blood_type
- new_dna.real_name=real_name
+ new_dna.real_name = real_name
new_dna.species = new species.type
for(var/b=1;b<=DNA_SE_LENGTH;b++)
new_dna.SE[b]=SE[b]
@@ -68,17 +68,17 @@ GLOBAL_LIST_EMPTY(bad_blocks)
///////////////////////////////////////
// Create random UI.
-/datum/dna/proc/ResetUI(var/defer=0)
+/datum/dna/proc/ResetUI(defer = FALSE)
for(var/i=1,i<=DNA_UI_LENGTH,i++)
switch(i)
if(DNA_UI_SKIN_TONE)
- SetUIValueRange(DNA_UI_SKIN_TONE,rand(1,220),220,1) // Otherwise, it gets fucked
+ SetUIValueRange(DNA_UI_SKIN_TONE, rand(1, 220), 220, 1) // Otherwise, it gets fucked
else
UI[i]=rand(0,4095)
if(!defer)
UpdateUI()
-/datum/dna/proc/ResetUIFrom(var/mob/living/carbon/human/character)
+/datum/dna/proc/ResetUIFrom(mob/living/carbon/human/character)
// INITIALIZE!
ResetUI(1)
// Hair
@@ -135,83 +135,90 @@ GLOBAL_LIST_EMPTY(bad_blocks)
UpdateUI()
// Set a DNA UI block's raw value.
-/datum/dna/proc/SetUIValue(var/block,var/value,var/defer=0)
- if(block<=0) return
- ASSERT(value>0)
- ASSERT(value<=4095)
+/datum/dna/proc/SetUIValue(block, value, defer = FALSE)
+ if(block <= 0)
+ return
+ ASSERT(value > 0)
+ ASSERT(value <= 4095)
UI[block]=value
- dirtyUI=1
+ dirtyUI = 1
if(!defer)
UpdateUI()
// Get a DNA UI block's raw value.
-/datum/dna/proc/GetUIValue(var/block)
- if(block<=0) return 0
+/datum/dna/proc/GetUIValue(block)
+ if(block <= 0)
+ return FALSE
return UI[block]
// Set a DNA UI block's value, given a value and a max possible value.
// Used in hair and facial styles (value being the index and maxvalue being the len of the hairstyle list)
-/datum/dna/proc/SetUIValueRange(var/block,var/value,var/maxvalue,var/defer=0)
- if(block<=0)
+/datum/dna/proc/SetUIValueRange(block, value, maxvalue, defer = FALSE)
+ if(block <= 0)
return
if(value == 0)
value = 1
- ASSERT(maxvalue<=4095)
+ ASSERT(maxvalue <= 4095)
var/range = (4095 / maxvalue)
if(value)
- SetUIValue(block,round(value * range),defer)
+ SetUIValue(block,round(value * range), defer)
// Getter version of above.
-/datum/dna/proc/GetUIValueRange(var/block,var/maxvalue)
- if(block<=0) return 0
+/datum/dna/proc/GetUIValueRange(block, maxvalue)
+ if(block <= 0)
+ return FALSE
var/value = GetUIValue(block)
- return round(1 +(value / 4096)*maxvalue)
+ return round(1 + (value / 4096) * maxvalue)
// Is the UI gene "on" or "off"?
// For UI, this is simply a check of if the value is > 2050.
-/datum/dna/proc/GetUIState(var/block)
- if(block<=0) return
+/datum/dna/proc/GetUIState(block)
+ if(block <= 0)
+ return
return UI[block] > 2050
// Set UI gene "on" (1) or "off" (0)
-/datum/dna/proc/SetUIState(var/block,var/on,var/defer=0)
- if(block<=0) return
+/datum/dna/proc/SetUIState(block, on, defer = FALSE)
+ if(block <= 0)
+ return
var/val
if(on)
- val=rand(2050,4095)
+ val = rand(2050, 4095)
else
- val=rand(1,2049)
- SetUIValue(block,val,defer)
+ val=rand(1, 2049)
+ SetUIValue(block, val, defer)
// Get a hex-encoded UI block.
-/datum/dna/proc/GetUIBlock(var/block)
+/datum/dna/proc/GetUIBlock(block)
return EncodeDNABlock(GetUIValue(block))
// Do not use this unless you absolutely have to.
// Set a block from a hex string. This is inefficient. If you can, use SetUIValue().
// Used in DNA modifiers.
-/datum/dna/proc/SetUIBlock(var/block,var/value,var/defer=0)
- if(block<=0) return
- return SetUIValue(block,hex2num(value),defer)
+/datum/dna/proc/SetUIBlock(block, value, defer = FALSE)
+ if(block <= 0)
+ return
+ return SetUIValue(block, hex2num(value), defer)
// Get a sub-block from a block.
-/datum/dna/proc/GetUISubBlock(var/block,var/subBlock)
- return copytext(GetUIBlock(block),subBlock,subBlock+1)
+/datum/dna/proc/GetUISubBlock(block, subBlock)
+ return copytext(GetUIBlock(block), subBlock, subBlock + 1)
// Do not use this unless you absolutely have to.
// Set a block from a hex string. This is inefficient. If you can, use SetUIValue().
// Used in DNA modifiers.
-/datum/dna/proc/SetUISubBlock(var/block,var/subBlock, var/newSubBlock, var/defer=0)
- if(block<=0) return
- var/oldBlock=GetUIBlock(block)
- var/newBlock=""
- for(var/i=1, i<=length(oldBlock), i++)
+/datum/dna/proc/SetUISubBlock(block, subBlock, newSubBlock, defer = FALSE)
+ if(block <= 0)
+ return
+ var/oldBlock = GetUIBlock(block)
+ var/newBlock = ""
+ for(var/i = 1, i <= length(oldBlock), i++)
if(i==subBlock)
- newBlock+=newSubBlock
+ newBlock += newSubBlock
else
- newBlock+=copytext(oldBlock,i,i+1)
- SetUIBlock(block,newBlock,defer)
+ newBlock += copytext(oldBlock, i, i + 1)
+ SetUIBlock(block, newBlock, defer)
///////////////////////////////////////
// STRUCTURAL ENZYMES
@@ -220,126 +227,134 @@ GLOBAL_LIST_EMPTY(bad_blocks)
// "Zeroes out" all of the blocks.
/datum/dna/proc/ResetSE()
for(var/i = 1, i <= DNA_SE_LENGTH, i++)
- SetSEValue(i,rand(1,1024),1)
+ SetSEValue(i, rand(1, 1024), 1)
UpdateSE()
// Set a DNA SE block's raw value.
-/datum/dna/proc/SetSEValue(var/block,var/value,var/defer=0)
+/datum/dna/proc/SetSEValue(block, value, defer = FALSE)
- if(block<=0) return
- ASSERT(value>=0)
- ASSERT(value<=4095)
- SE[block]=value
- dirtySE=1
+ if(block<=0)
+ return
+ ASSERT(value >= 0)
+ ASSERT(value <= 4095)
+ SE[block] = value
+ dirtySE = 1
if(!defer)
UpdateSE()
//testing("SetSEBlock([block],[value],[defer]): [value] -> [GetSEValue(block)]")
// Get a DNA SE block's raw value.
-/datum/dna/proc/GetSEValue(var/block)
- if(block<=0) return 0
+/datum/dna/proc/GetSEValue(block)
+ if(block <= 0)
+ return FALSE
return SE[block]
// Set a DNA SE block's value, given a value and a max possible value.
// Might be used for species?
-/datum/dna/proc/SetSEValueRange(var/block,var/value,var/maxvalue)
- if(block<=0) return
- ASSERT(maxvalue<=4095)
+/datum/dna/proc/SetSEValueRange(block, value, maxvalue)
+ if(block <= 0)
+ return
+ ASSERT(maxvalue <= 4095)
var/range = round(4095 / maxvalue)
if(value)
- SetSEValue(block, value * range - rand(1,range-1))
+ SetSEValue(block, value * range - rand(1, range - 1))
// Getter version of above.
-/datum/dna/proc/GetSEValueRange(var/block,var/maxvalue)
- if(block<=0) return 0
+/datum/dna/proc/GetSEValueRange(block, maxvalue)
+ if(block <= 0)
+ return FALSE
var/value = GetSEValue(block)
- return round(1 +(value / 4096)*maxvalue)
+ return round(1 + (value / 4096) * maxvalue)
// Is the block "on" (1) or "off" (0)? (Un-assigned genes are always off.)
-/datum/dna/proc/GetSEState(var/block)
- if(block<=0) return 0
- var/list/BOUNDS=GetDNABounds(block)
- var/value=GetSEValue(block)
+/datum/dna/proc/GetSEState(block)
+ if(block <= 0)
+ return FALSE
+ var/list/BOUNDS = GetDNABounds(block)
+ var/value = GetSEValue(block)
return (value >= BOUNDS[DNA_ON_LOWERBOUND])
// Set a block "on" or "off".
-/datum/dna/proc/SetSEState(var/block,var/on,var/defer=0)
- if(block<=0) return
+/datum/dna/proc/SetSEState(block, on, defer = FALSE)
+ if(block <= 0)
+ return
var/list/BOUNDS=GetDNABounds(block)
var/val
if(on)
- val=rand(BOUNDS[DNA_ON_LOWERBOUND],BOUNDS[DNA_ON_UPPERBOUND])
+ val = rand(BOUNDS[DNA_ON_LOWERBOUND], BOUNDS[DNA_ON_UPPERBOUND])
else
- val=rand(1,BOUNDS[DNA_OFF_UPPERBOUND])
- SetSEValue(block,val,defer)
+ val = rand(1, BOUNDS[DNA_OFF_UPPERBOUND])
+ SetSEValue(block, val, defer)
// Get hex-encoded SE block.
-/datum/dna/proc/GetSEBlock(var/block)
+/datum/dna/proc/GetSEBlock(block)
return EncodeDNABlock(GetSEValue(block))
// Do not use this unless you absolutely have to.
// Set a block from a hex string. This is inefficient. If you can, use SetUIValue().
// Used in DNA modifiers.
-/datum/dna/proc/SetSEBlock(var/block,var/value,var/defer=0)
- if(block<=0) return
+/datum/dna/proc/SetSEBlock(block, value, defer = FALSE)
+ if(block <= 0)
+ return
var/nval=hex2num(value)
//testing("SetSEBlock([block],[value],[defer]): [value] -> [nval]")
- return SetSEValue(block,nval,defer)
+ return SetSEValue(block, nval, defer)
-/datum/dna/proc/GetSESubBlock(var/block,var/subBlock)
- return copytext(GetSEBlock(block),subBlock,subBlock+1)
+/datum/dna/proc/GetSESubBlock(block, subBlock)
+ return copytext(GetSEBlock(block), subBlock, subBlock + 1)
// Do not use this unless you absolutely have to.
// Set a sub-block from a hex character. This is inefficient. If you can, use SetUIValue().
// Used in DNA modifiers.
-/datum/dna/proc/SetSESubBlock(var/block,var/subBlock, var/newSubBlock, var/defer=0)
- if(block<=0) return
+/datum/dna/proc/SetSESubBlock(block, subBlock, newSubBlock, defer = FALSE)
+ if(block <= 0)
+ return
var/oldBlock=GetSEBlock(block)
- var/newBlock=""
- for(var/i=1, i<=length(oldBlock), i++)
+ var/newBlock = ""
+ for(var/i = 1, i <= length(oldBlock), i++)
if(i==subBlock)
newBlock+=newSubBlock
else
- newBlock+=copytext(oldBlock,i,i+1)
+ newBlock += copytext(oldBlock, i, i + 1)
//testing("SetSESubBlock([block],[subBlock],[newSubBlock],[defer]): [oldBlock] -> [newBlock]")
- SetSEBlock(block,newBlock,defer)
+ SetSEBlock(block, newBlock, defer)
-/proc/EncodeDNABlock(var/value)
- return add_zero2(num2hex(value,1), 3)
+/proc/EncodeDNABlock(value)
+ return add_zero2(num2hex(value, 1), 3)
/datum/dna/proc/UpdateUI()
- src.uni_identity=""
+ uni_identity = ""
for(var/block in UI)
uni_identity += EncodeDNABlock(block)
//testing("New UI: [uni_identity]")
- dirtyUI=0
+ dirtyUI = 0
/datum/dna/proc/UpdateSE()
//var/oldse=struc_enzymes
- struc_enzymes=""
+ struc_enzymes = ""
for(var/block in SE)
struc_enzymes += EncodeDNABlock(block)
//testing("Old SE: [oldse]")
//testing("New SE: [struc_enzymes]")
- dirtySE=0
+ dirtySE = 0
// BACK-COMPAT!
// Just checks our character has all the crap it needs.
-/datum/dna/proc/check_integrity(var/mob/living/carbon/human/character)
+/datum/dna/proc/check_integrity(mob/living/carbon/human/character)
if(character)
if(UI.len != DNA_UI_LENGTH)
ResetUIFrom(character)
- if(length(struc_enzymes)!= 3*DNA_SE_LENGTH)
+ if(length(struc_enzymes)!= 3 * DNA_SE_LENGTH)
ResetSE()
if(length(unique_enzymes) != 32)
unique_enzymes = md5(character.real_name)
else
- if(length(uni_identity) != 3*DNA_UI_LENGTH)
+ if(length(uni_identity) != 3 * DNA_UI_LENGTH)
uni_identity = "00600200A00E0110148FC01300B0095BD7FD3F4"
- if(length(struc_enzymes)!= 3*DNA_SE_LENGTH)
+ if(length(struc_enzymes)!= 3 * DNA_SE_LENGTH)
struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6"
// BACK-COMPAT!
diff --git a/code/game/dna/dna2_domutcheck.dm b/code/game/dna/dna2_domutcheck.dm
index 0091745c518..16eee549bf2 100644
--- a/code/game/dna/dna2_domutcheck.dm
+++ b/code/game/dna/dna2_domutcheck.dm
@@ -3,7 +3,7 @@
// M: Mob to mess with
// connected: Machine we're in, type unchecked so I doubt it's used beyond monkeying
// flags: See below, bitfield.
-/proc/domutcheck(var/mob/living/M, var/connected=null, var/flags=0)
+/proc/domutcheck(mob/living/M, connected = null, flags = 0)
for(var/datum/dna/gene/gene in GLOB.dna_genes)
if(!M || !M.dna)
return
@@ -13,7 +13,7 @@
domutation(gene, M, connected, flags)
// Use this to force a mut check on a single gene!
-/proc/genemutcheck(var/mob/living/M, var/block, var/connected=null, var/flags=0)
+/proc/genemutcheck(mob/living/M, block, connected = null, flags = 0)
if(ishuman(M)) // Would've done this via species instead of type, but the basic mob doesn't have a species, go figure.
var/mob/living/carbon/human/H = M
if(NO_DNA in H.dna.species.species_traits)
@@ -27,9 +27,9 @@
domutation(gene, M, connected, flags)
-/proc/domutation(var/datum/dna/gene/gene, var/mob/living/M, var/connected=null, var/flags=0)
+/proc/domutation(datum/dna/gene/gene, mob/living/M, connected = null, flags = 0)
if(!gene || !istype(gene))
- return 0
+ return FALSE
// Current state
var/gene_active = M.dna.GetSEState(gene.block)
@@ -37,7 +37,7 @@
// Sanity checks, don't skip.
if(!gene.can_activate(M,flags) && gene_active)
//testing("[M] - Failed to activate [gene.name] (can_activate fail).")
- return 0
+ return FALSE
var/defaultgenes // Do not mutate inherent species abilities
if(ishuman(M))
diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm
index 1857848c2c9..435133a3796 100644
--- a/code/game/dna/dna2_helpers.dm
+++ b/code/game/dna/dna2_helpers.dm
@@ -9,58 +9,61 @@
t = "0[t]"
temp1 = t
if(length(t) > u)
- temp1 = copytext(t,2,u+1)
+ temp1 = copytext(t, 2, u + 1)
return temp1
// DNA Gene activation boundaries, see dna2.dm.
// Returns a list object with 4 numbers.
-/proc/GetDNABounds(var/block)
- var/list/BOUNDS=GLOB.dna_activity_bounds[block]
+/proc/GetDNABounds(block)
+ var/list/BOUNDS = GLOB.dna_activity_bounds[block]
if(!istype(BOUNDS))
return DNA_DEFAULT_BOUNDS
return BOUNDS
// Give Random Bad Mutation to M
-/proc/randmutb(var/mob/living/M)
- if(!M || !M.dna) return
+/proc/randmutb(mob/living/M)
+ if(!M || !M.dna)
+ return
M.dna.check_integrity()
var/block = pick(GLOB.bad_blocks)
M.dna.SetSEState(block, 1)
// Give Random Good Mutation to M
-/proc/randmutg(var/mob/living/M)
- if(!M || !M.dna) return
+/proc/randmutg(mob/living/M)
+ if(!M || !M.dna)
+ return
M.dna.check_integrity()
var/block = pick(GLOB.good_blocks)
M.dna.SetSEState(block, 1)
// Random Appearance Mutation
-/proc/randmuti(var/mob/living/M)
- if(!M || !M.dna) return
+/proc/randmuti(mob/living/M)
+ if(!M || !M.dna)
+ return
M.dna.check_integrity()
- M.dna.SetUIValue(rand(1,DNA_UI_LENGTH),rand(1,4095))
+ M.dna.SetUIValue(rand(1, DNA_UI_LENGTH), rand(1, 4095))
// Scramble UI or SE.
-/proc/scramble(var/UI, var/mob/M, var/prob)
- if(!M || !M.dna) return
+/proc/scramble(UI, mob/M, prob)
+ if(!M || !M.dna)
+ return
M.dna.check_integrity()
if(UI)
- for(var/i = 1, i <= DNA_UI_LENGTH-1, i++)
+ for(var/i = 1, i <= DNA_UI_LENGTH - 1, i++)
if(prob(prob))
- M.dna.SetUIValue(i,rand(1,4095),1)
+ M.dna.SetUIValue(i, rand(1, 4095), 1)
M.dna.UpdateUI()
M.UpdateAppearance()
else
- for(var/i = 1, i <= DNA_SE_LENGTH-1, i++)
+ for(var/i = 1, i <= DNA_SE_LENGTH - 1, i++)
if(prob(prob))
- M.dna.SetSEValue(i,rand(1,4095),1)
+ M.dna.SetSEValue(i, rand(1, 4095), 1)
M.dna.UpdateSE()
domutcheck(M, null)
- return
// I haven't yet figured out what the fuck this is supposed to do.
-/proc/miniscramble(input,rs,rd)
+/proc/miniscramble(input, rs, rd)
var/output
output = null
if(input == "C" || input == "D" || input == "E" || input == "F")
@@ -79,7 +82,7 @@
// input: YOUR TARGET
// rs: RAD STRENGTH
// rd: DURATION
-/proc/miniscrambletarget(input,rs,rd)
+/proc/miniscrambletarget(input, rs, rd)
var/output = null
switch(input)
if("0")
@@ -124,11 +127,11 @@
// Use mob.UpdateAppearance() instead.
// Simpler. Don't specify UI in order for the mob to use its own.
-/mob/proc/UpdateAppearance(var/list/UI=null)
- if(istype(src, /mob/living/carbon/human))
+/mob/proc/UpdateAppearance(list/UI = null)
+ if(istype(src, /mob/living/carbon/human)) // WHY?!
if(UI!=null)
- src.dna.UI=UI
- src.dna.UpdateUI()
+ dna.UI = UI
+ dna.UpdateUI()
dna.check_integrity()
var/mob/living/carbon/human/H = src
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
@@ -169,9 +172,9 @@
H.regenerate_icons()
- return 1
+ return TRUE
else
- return 0
+ return FALSE
/*
ORGAN WRITING PROCS
@@ -219,9 +222,9 @@
// In absence of eyes, possibly randomize the eye color DNA?
return
- SetUIValueRange(DNA_UI_EYES_R, color2R(eyes_organ.eye_colour), 255, 1)
- SetUIValueRange(DNA_UI_EYES_G, color2G(eyes_organ.eye_colour), 255, 1)
- SetUIValueRange(DNA_UI_EYES_B, color2B(eyes_organ.eye_colour), 255, 1)
+ SetUIValueRange(DNA_UI_EYES_R, color2R(eyes_organ.eye_colour), 255, 1)
+ SetUIValueRange(DNA_UI_EYES_G, color2G(eyes_organ.eye_colour), 255, 1)
+ SetUIValueRange(DNA_UI_EYES_B, color2B(eyes_organ.eye_colour), 255, 1)
/datum/dna/proc/head_traits_to_dna(obj/item/organ/external/head/head_organ)
if(!head_organ)
@@ -241,26 +244,26 @@
head_organ.ha_style = "None"
var/headacc = GLOB.head_accessory_styles_list.Find(head_organ.ha_style)
- SetUIValueRange(DNA_UI_HAIR_R, color2R(head_organ.hair_colour), 255, 1)
- SetUIValueRange(DNA_UI_HAIR_G, color2G(head_organ.hair_colour), 255, 1)
- SetUIValueRange(DNA_UI_HAIR_B, color2B(head_organ.hair_colour), 255, 1)
+ SetUIValueRange(DNA_UI_HAIR_R, color2R(head_organ.hair_colour), 255, 1)
+ SetUIValueRange(DNA_UI_HAIR_G, color2G(head_organ.hair_colour), 255, 1)
+ SetUIValueRange(DNA_UI_HAIR_B, color2B(head_organ.hair_colour), 255, 1)
- SetUIValueRange(DNA_UI_HAIR2_R, color2R(head_organ.sec_hair_colour), 255, 1)
- SetUIValueRange(DNA_UI_HAIR2_G, color2G(head_organ.sec_hair_colour), 255, 1)
- SetUIValueRange(DNA_UI_HAIR2_B, color2B(head_organ.sec_hair_colour), 255, 1)
+ SetUIValueRange(DNA_UI_HAIR2_R, color2R(head_organ.sec_hair_colour), 255, 1)
+ SetUIValueRange(DNA_UI_HAIR2_G, color2G(head_organ.sec_hair_colour), 255, 1)
+ SetUIValueRange(DNA_UI_HAIR2_B, color2B(head_organ.sec_hair_colour), 255, 1)
- SetUIValueRange(DNA_UI_BEARD_R, color2R(head_organ.facial_colour), 255, 1)
- SetUIValueRange(DNA_UI_BEARD_G, color2G(head_organ.facial_colour), 255, 1)
- SetUIValueRange(DNA_UI_BEARD_B, color2B(head_organ.facial_colour), 255, 1)
+ SetUIValueRange(DNA_UI_BEARD_R, color2R(head_organ.facial_colour), 255, 1)
+ SetUIValueRange(DNA_UI_BEARD_G, color2G(head_organ.facial_colour), 255, 1)
+ SetUIValueRange(DNA_UI_BEARD_B, color2B(head_organ.facial_colour), 255, 1)
- SetUIValueRange(DNA_UI_BEARD2_R, color2R(head_organ.sec_facial_colour), 255, 1)
- SetUIValueRange(DNA_UI_BEARD2_G, color2G(head_organ.sec_facial_colour), 255, 1)
- SetUIValueRange(DNA_UI_BEARD2_B, color2B(head_organ.sec_facial_colour), 255, 1)
+ SetUIValueRange(DNA_UI_BEARD2_R, color2R(head_organ.sec_facial_colour), 255, 1)
+ SetUIValueRange(DNA_UI_BEARD2_G, color2G(head_organ.sec_facial_colour), 255, 1)
+ SetUIValueRange(DNA_UI_BEARD2_B, color2B(head_organ.sec_facial_colour), 255, 1)
- SetUIValueRange(DNA_UI_HACC_R, color2R(head_organ.headacc_colour), 255, 1)
- SetUIValueRange(DNA_UI_HACC_G, color2G(head_organ.headacc_colour), 255, 1)
- SetUIValueRange(DNA_UI_HACC_B, color2B(head_organ.headacc_colour), 255, 1)
+ SetUIValueRange(DNA_UI_HACC_R, color2R(head_organ.headacc_colour), 255, 1)
+ SetUIValueRange(DNA_UI_HACC_G, color2G(head_organ.headacc_colour), 255, 1)
+ SetUIValueRange(DNA_UI_HACC_B, color2B(head_organ.headacc_colour), 255, 1)
- SetUIValueRange(DNA_UI_HAIR_STYLE, hair, GLOB.hair_styles_full_list.len, 1)
- SetUIValueRange(DNA_UI_BEARD_STYLE, beard, GLOB.facial_hair_styles_list.len, 1)
- SetUIValueRange(DNA_UI_HACC_STYLE, headacc, GLOB.head_accessory_styles_list.len, 1)
+ SetUIValueRange(DNA_UI_HAIR_STYLE, hair, GLOB.hair_styles_full_list.len, 1)
+ SetUIValueRange(DNA_UI_BEARD_STYLE, beard, GLOB.facial_hair_styles_list.len, 1)
+ SetUIValueRange(DNA_UI_HACC_STYLE, headacc, GLOB.head_accessory_styles_list.len, 1)
diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm
index c06dc24c545..a6ec98e8866 100644
--- a/code/game/dna/dna_modifier.dm
+++ b/code/game/dna/dna_modifier.dm
@@ -10,15 +10,15 @@
//list("data" = null, "owner" = null, "label" = null, "type" = null, "ue" = 0),
/datum/dna2/record
var/datum/dna/dna = null
- var/types=0
- var/name="Empty"
+ var/types = 0
+ var/name = "Empty"
// Stuff for cloners
- var/id=null
- var/implant=null
- var/ckey=null
- var/mind=null
- var/languages=null
+ var/id = null
+ var/implant = null
+ var/ckey = null
+ var/mind = null
+ var/languages = null
/datum/dna2/record/proc/GetData()
var/list/ser=list("data" = null, "owner" = null, "label" = null, "type" = null, "ue" = 0)
@@ -28,7 +28,7 @@
ser["data"] = dna.SE
else
ser["data"] = dna.UI
- ser["owner"] = src.dna.real_name
+ ser["owner"] = dna.real_name
ser["label"] = name
if(types & DNA2_BUF_UI)
ser["type"] = "ui"
@@ -54,13 +54,13 @@
desc = "It scans DNA structures."
icon = 'icons/obj/cryogenic2.dmi'
icon_state = "scanner_open"
- density = 1
- anchored = 1.0
+ density = TRUE
+ anchored = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 50
active_power_usage = 300
interact_offline = 1
- var/locked = 0
+ var/locked = FALSE
var/mob/living/carbon/occupant = null
var/obj/item/reagent_containers/glass/beaker = null
var/opened = 0
@@ -106,31 +106,29 @@
/obj/machinery/dna_scannernew/AllowDrop()
return FALSE
-/obj/machinery/dna_scannernew/relaymove(mob/user as mob)
+/obj/machinery/dna_scannernew/relaymove(mob/user)
if(user.stat)
return
- src.go_out()
- return
+ go_out()
/obj/machinery/dna_scannernew/verb/eject()
set src in oview(1)
set category = null
set name = "Eject DNA Scanner"
- if(usr.stat != 0)
+ if(usr.incapacitated())
return
eject_occupant()
add_fingerprint(usr)
- return
/obj/machinery/dna_scannernew/Destroy()
eject_occupant()
return ..()
/obj/machinery/dna_scannernew/proc/eject_occupant()
- src.go_out()
+ go_out()
for(var/obj/O in src)
if(!istype(O,/obj/item/circuitboard/clonescanner) && \
!istype(O,/obj/item/stock_parts) && \
@@ -146,14 +144,12 @@
set category = null
set name = "Enter DNA Scanner"
- if(usr.stat != 0)
- return
if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other
return
if(!ishuman(usr)) //Make sure they're a mob that has dna
to_chat(usr, "Try as you might, you can not climb up into the [src].")
return
- if(src.occupant)
+ if(occupant)
to_chat(usr, "The [src] is already occupied!")
return
if(usr.abiotic())
@@ -164,12 +160,11 @@
return
usr.stop_pulling()
usr.forceMove(src)
- src.occupant = usr
- src.icon_state = "scanner_occupied"
- src.add_fingerprint(usr)
- return
+ occupant = usr
+ icon_state = "scanner_occupied"
+ add_fingerprint(usr)
-/obj/machinery/dna_scannernew/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
+/obj/machinery/dna_scannernew/MouseDrop_T(atom/movable/O, mob/user)
if(!istype(O))
return
if(O.loc == user) //no you can't pull things out of your ass
@@ -208,27 +203,27 @@
if(user.pulling == L)
user.stop_pulling()
-/obj/machinery/dna_scannernew/attackby(var/obj/item/item as obj, var/mob/user as mob, params)
- if(exchange_parts(user, item))
+/obj/machinery/dna_scannernew/attackby(obj/item/I, mob/user, params)
+ if(exchange_parts(user, I))
return
- else if(istype(item, /obj/item/reagent_containers/glass))
+ else if(istype(I, /obj/item/reagent_containers/glass))
if(beaker)
to_chat(user, "A beaker is already loaded into the machine.")
return
if(!user.drop_item())
- to_chat(user, "\The [item] is stuck to you!")
+ to_chat(user, "\The [I] is stuck to you!")
return
- beaker = item
- item.forceMove(src)
- user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!")
+ beaker = I
+ I.forceMove(src)
+ user.visible_message("[user] adds \a [I] to \the [src]!", "You add \a [I] to \the [src]!")
return
- if(istype(item, /obj/item/grab))
- var/obj/item/grab/G = item
+ if(istype(I, /obj/item/grab))
+ var/obj/item/grab/G = I
if(!ismob(G.affecting))
return
- if(src.occupant)
+ if(occupant)
to_chat(user, "The scanner is already occupied!")
return
if(G.affecting.abiotic())
@@ -241,7 +236,7 @@
to_chat(usr, "Close the maintenance panel first.")
return
put_in(G.affecting)
- src.add_fingerprint(user)
+ add_fingerprint(user)
qdel(G)
return
return ..()
@@ -249,7 +244,7 @@
/obj/machinery/dna_scannernew/crowbar_act(mob/user, obj/item/I)
if(default_deconstruction_crowbar(user, I))
for(var/obj/thing in contents) // in case there is something in the scanner
- thing.forceMove(src.loc)
+ thing.forceMove(loc)
/obj/machinery/dna_scannernew/screwdriver_act(mob/user, obj/item/I)
if(occupant)
@@ -258,15 +253,15 @@
if(default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]", I))
return TRUE
-/obj/machinery/dna_scannernew/relaymove(mob/user as mob)
+/obj/machinery/dna_scannernew/relaymove(mob/user)
if(user.incapacitated())
- return 0 //maybe they should be able to get out with cuffs, but whatever
+ return FALSE //maybe they should be able to get out with cuffs, but whatever
go_out()
-/obj/machinery/dna_scannernew/proc/put_in(var/mob/M)
+/obj/machinery/dna_scannernew/proc/put_in(mob/M)
M.forceMove(src)
- src.occupant = M
- src.icon_state = "scanner_occupied"
+ occupant = M
+ icon_state = "scanner_occupied"
// search for ghosts, if the corpse is empty and the scanner is connected to a cloner
if(locate(/obj/machinery/computer/cloning, get_step(src, NORTH)) \
@@ -275,20 +270,19 @@
|| locate(/obj/machinery/computer/cloning, get_step(src, WEST)))
occupant.notify_ghost_cloning(source = src)
- return
/obj/machinery/dna_scannernew/proc/go_out()
- if(!src.occupant)
+ if(!occupant)
to_chat(usr, "The scanner is empty!")
return
- if(src.locked)
+ if(locked)
to_chat(usr, "The scanner is locked!")
return
- src.occupant.forceMove(src.loc)
- src.occupant = null
- src.icon_state = "scanner_open"
+ occupant.forceMove(loc)
+ occupant = null
+ icon_state = "scanner_open"
/obj/machinery/dna_scannernew/ex_act(severity)
if(occupant)
@@ -305,18 +299,17 @@
// Checks if occupants can be irradiated/mutated - prevents exploits where wearing full rad protection would still let you gain mutations
/obj/machinery/dna_scannernew/proc/radiation_check()
if(!occupant)
- return 1
+ return TRUE
if(ishuman(occupant))
var/mob/living/carbon/human/H = occupant
if(NO_DNA in H.dna.species.species_traits)
- return 1
+ return TRUE
var/radiation_protection = occupant.run_armor_check(null, "rad", "Your clothes feel warm.", "Your clothes feel warm.")
if(radiation_protection > NEGATE_MUTATION_THRESHOLD)
- return 1
-
- return 0
+ return TRUE
+ return FALSE
/obj/machinery/computer/scan_consolenew
name = "\improper DNA Modifier access console"
@@ -324,7 +317,7 @@
icon = 'icons/obj/computer.dmi'
icon_screen = "dna"
icon_keyboard = "med_key"
- density = 1
+ density = TRUE
circuit = /obj/item/circuitboard/scan_consolenew
var/selected_ui_block = 1.0
var/selected_ui_subblock = 1.0
@@ -336,22 +329,22 @@
var/radiation_intensity = 1.0
var/list/datum/dna2/record/buffers[3]
var/irradiating = 0
- var/injector_ready = 0 //Quick fix for issue 286 (screwdriver the screen twice to restore injector) -Pete
+ var/injector_ready = FALSE //Quick fix for issue 286 (screwdriver the screen twice to restore injector) -Pete
var/obj/machinery/dna_scannernew/connected = null
var/obj/item/disk/data/disk = null
var/selected_menu_key = null
- anchored = 1
+ anchored = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 10
active_power_usage = 400
- var/waiting_for_user_input=0 // Fix for #274 (Mash create block injector without answering dialog to make unlimited injectors) - N3X
+ var/waiting_for_user_input = 0 // Fix for #274 (Mash create block injector without answering dialog to make unlimited injectors) - N3X
-/obj/machinery/computer/scan_consolenew/attackby(obj/item/I as obj, mob/user as mob, params)
+/obj/machinery/computer/scan_consolenew/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/disk/data)) //INSERT SOME diskS
- if(!src.disk)
+ if(!disk)
user.drop_item()
I.forceMove(src)
- src.disk = I
+ disk = I
to_chat(user, "You insert [I].")
SSnanoui.update_uis(src) // update all UIs attached to src()
return
@@ -368,39 +361,30 @@
if(!isnull(connected))
break
spawn(250)
- src.injector_ready = 1
- return
- return
+ injector_ready = TRUE
-/obj/machinery/computer/scan_consolenew/proc/all_dna_blocks(var/list/buffer)
+/obj/machinery/computer/scan_consolenew/proc/all_dna_blocks(list/buffer)
var/list/arr = list()
for(var/i = 1, i <= buffer.len, i++)
arr += "[i]:[EncodeDNABlock(buffer[i])]"
return arr
-/obj/machinery/computer/scan_consolenew/proc/setInjectorBlock(var/obj/item/dnainjector/I, var/blk, var/datum/dna2/record/buffer)
+/obj/machinery/computer/scan_consolenew/proc/setInjectorBlock(obj/item/dnainjector/I, blk, datum/dna2/record/buffer)
var/pos = findtext(blk,":")
- if(!pos) return 0
+ if(!pos)
+ return FALSE
var/id = text2num(copytext(blk,1,pos))
- if(!id) return 0
+ if(!id)
+ return FALSE
I.block = id
I.buf = buffer
- return 1
+ return TRUE
-/*
-/obj/machinery/computer/scan_consolenew/process() //not really used right now
- if(stat & (NOPOWER|BROKEN))
- return
- if(!( src.status )) //remove this
- return
- return
-*/
-
-/obj/machinery/computer/scan_consolenew/attack_ai(user as mob)
- src.add_hiddenprint(user)
+/obj/machinery/computer/scan_consolenew/attack_ai(mob/user)
+ add_hiddenprint(user)
attack_hand(user)
-/obj/machinery/computer/scan_consolenew/attack_hand(user as mob)
+/obj/machinery/computer/scan_consolenew/attack_hand(mob/user)
if(isnull(connected))
for(dir in list(NORTH,EAST,SOUTH,WEST))
connected = locate(/obj/machinery/dna_scannernew, get_step(src, dir))
@@ -427,7 +411,7 @@
*
* @return nothing
*/
-/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
+/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
if(user == connected.occupant)
return
@@ -445,7 +429,7 @@
/obj/machinery/computer/scan_consolenew/ui_data(mob/user, datum/topic_state/state)
var/data[0]
data["selectedMenuKey"] = selected_menu_key
- data["locked"] = src.connected.locked
+ data["locked"] = connected.locked
data["hasOccupant"] = connected.occupant ? 1 : 0
data["isInjectorReady"] = injector_ready
@@ -464,7 +448,7 @@
data["disk"] = diskData
var/list/new_buffers = list()
- for(var/datum/dna2/record/buf in src.buffers)
+ for(var/datum/dna2/record/buf in buffers)
new_buffers += list(buf.GetData())
data["buffers"]=new_buffers
@@ -481,7 +465,7 @@
data["selectedUITargetHex"] = selected_ui_target_hex
var/occupantData[0]
- if(!src.connected.occupant || !src.connected.occupant.dna)
+ if(!connected.occupant || !connected.occupant.dna)
occupantData["name"] = null
occupantData["stat"] = null
occupantData["isViableSubject"] = null
@@ -496,7 +480,7 @@
occupantData["name"] = connected.occupant.dna.real_name
occupantData["stat"] = connected.occupant.stat
occupantData["isViableSubject"] = 1
- if((NOCLONE in connected.occupant.mutations && connected.scan_level < 3) || !src.connected.occupant.dna || (NO_DNA in connected.occupant.dna.species.species_traits))
+ if((NOCLONE in connected.occupant.mutations && connected.scan_level < 3) || !connected.occupant.dna || (NO_DNA in connected.occupant.dna.species.species_traits))
occupantData["isViableSubject"] = 0
occupantData["health"] = connected.occupant.health
occupantData["maxHealth"] = connected.occupant.maxHealth
@@ -520,173 +504,173 @@
/obj/machinery/computer/scan_consolenew/Topic(href, href_list)
if(..())
- return 0 // don't update uis
+ return FALSE // don't update uis
if(!istype(usr.loc, /turf))
- return 0 // don't update uis
- if(!src || !src.connected)
- return 0 // don't update uis
+ return FALSE // don't update uis
+ if(!src || !connected)
+ return FALSE // don't update uis
if(irradiating) // Make sure that it isn't already irradiating someone...
- return 0 // don't update uis
+ return FALSE // don't update uis
add_fingerprint(usr)
if(href_list["selectMenuKey"])
selected_menu_key = href_list["selectMenuKey"]
- return 1 // return 1 forces an update to all Nano uis attached to src
+ return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["toggleLock"])
- if((src.connected && src.connected.occupant))
- src.connected.locked = !( src.connected.locked )
- return 1 // return 1 forces an update to all Nano uis attached to src
+ if((connected && connected.occupant))
+ connected.locked = !(connected.locked)
+ return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["pulseRadiation"])
- irradiating = src.radiation_duration
- var/lock_state = src.connected.locked
- src.connected.locked = 1//lock it
+ irradiating = radiation_duration
+ var/lock_state = connected.locked
+ connected.locked = TRUE //lock it
SSnanoui.update_uis(src) // update all UIs attached to src
- sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
+ sleep(10 * radiation_duration) // sleep for radiation_duration seconds
irradiating = 0
- src.connected.locked = lock_state
+ connected.locked = lock_state
- if(!src.connected.occupant)
- return 1 // return 1 forces an update to all Nano uis attached to src
+ if(!connected.occupant)
+ return TRUE // return 1 forces an update to all Nano uis attached to src
- var/radiation = (((src.radiation_intensity*3)+src.radiation_duration*3) / connected.damage_coeff)
- src.connected.occupant.apply_effect(radiation,IRRADIATE,0)
- if(src.connected.radiation_check())
- return 1
+ var/radiation = (((radiation_intensity * 3) + radiation_duration * 3) / connected.damage_coeff)
+ connected.occupant.apply_effect(radiation, IRRADIATE, 0)
+ if(connected.radiation_check())
+ return TRUE
if(prob(95))
if(prob(75))
- randmutb(src.connected.occupant)
+ randmutb(connected.occupant)
else
- randmuti(src.connected.occupant)
+ randmuti(connected.occupant)
else
if(prob(95))
- randmutg(src.connected.occupant)
+ randmutg(connected.occupant)
else
- randmuti(src.connected.occupant)
+ randmuti(connected.occupant)
- return 1 // return 1 forces an update to all Nano uis attached to src
+ return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["radiationDuration"])
if(text2num(href_list["radiationDuration"]) > 0)
- if(src.radiation_duration < 20)
- src.radiation_duration += 2
+ if(radiation_duration < 20)
+ radiation_duration += 2
else
- if(src.radiation_duration > 2)
- src.radiation_duration -= 2
- return 1 // return 1 forces an update to all Nano uis attached to src
+ if(radiation_duration > 2)
+ radiation_duration -= 2
+ return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["radiationIntensity"])
if(text2num(href_list["radiationIntensity"]) > 0)
- if(src.radiation_intensity < 10)
- src.radiation_intensity++
+ if(radiation_intensity < 10)
+ radiation_intensity++
else
- if(src.radiation_intensity > 1)
- src.radiation_intensity--
- return 1 // return 1 forces an update to all Nano uis attached to src
+ if(radiation_intensity > 1)
+ radiation_intensity--
+ return TRUE // return 1 forces an update to all Nano uis attached to src
////////////////////////////////////////////////////////
if(href_list["changeUITarget"] && text2num(href_list["changeUITarget"]) > 0)
- if(src.selected_ui_target < 15)
- src.selected_ui_target++
- src.selected_ui_target_hex = src.selected_ui_target
+ if(selected_ui_target < 15)
+ selected_ui_target++
+ selected_ui_target_hex = selected_ui_target
switch(selected_ui_target)
if(10)
- src.selected_ui_target_hex = "A"
+ selected_ui_target_hex = "A"
if(11)
- src.selected_ui_target_hex = "B"
+ selected_ui_target_hex = "B"
if(12)
- src.selected_ui_target_hex = "C"
+ selected_ui_target_hex = "C"
if(13)
- src.selected_ui_target_hex = "D"
+ selected_ui_target_hex = "D"
if(14)
- src.selected_ui_target_hex = "E"
+ selected_ui_target_hex = "E"
if(15)
- src.selected_ui_target_hex = "F"
+ selected_ui_target_hex = "F"
else
- src.selected_ui_target = 0
- src.selected_ui_target_hex = 0
- return 1 // return 1 forces an update to all Nano uis attached to src
+ selected_ui_target = 0
+ selected_ui_target_hex = 0
+ return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["changeUITarget"] && text2num(href_list["changeUITarget"]) < 1)
- if(src.selected_ui_target > 0)
- src.selected_ui_target--
- src.selected_ui_target_hex = src.selected_ui_target
+ if(selected_ui_target > 0)
+ selected_ui_target--
+ selected_ui_target_hex = selected_ui_target
switch(selected_ui_target)
if(10)
- src.selected_ui_target_hex = "A"
+ selected_ui_target_hex = "A"
if(11)
- src.selected_ui_target_hex = "B"
+ selected_ui_target_hex = "B"
if(12)
- src.selected_ui_target_hex = "C"
+ selected_ui_target_hex = "C"
if(13)
- src.selected_ui_target_hex = "D"
+ selected_ui_target_hex = "D"
if(14)
- src.selected_ui_target_hex = "E"
+ selected_ui_target_hex = "E"
else
- src.selected_ui_target = 15
- src.selected_ui_target_hex = "F"
- return 1 // return 1 forces an update to all Nano uis attached to src
+ selected_ui_target = 15
+ selected_ui_target_hex = "F"
+ return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["selectUIBlock"] && href_list["selectUISubblock"]) // This chunk of code updates selected block / sub-block based on click
var/select_block = text2num(href_list["selectUIBlock"])
var/select_subblock = text2num(href_list["selectUISubblock"])
if((select_block <= DNA_UI_LENGTH) && (select_block >= 1))
- src.selected_ui_block = select_block
+ selected_ui_block = select_block
if((select_subblock <= DNA_BLOCK_SIZE) && (select_subblock >= 1))
- src.selected_ui_subblock = select_subblock
- return 1 // return 1 forces an update to all Nano uis attached to src
+ selected_ui_subblock = select_subblock
+ return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["pulseUIRadiation"])
- var/block = src.connected.occupant.dna.GetUISubBlock(src.selected_ui_block,src.selected_ui_subblock)
+ var/block = connected.occupant.dna.GetUISubBlock(selected_ui_block, selected_ui_subblock)
- irradiating = src.radiation_duration
- var/lock_state = src.connected.locked
- src.connected.locked = 1//lock it
+ irradiating = radiation_duration
+ var/lock_state = connected.locked
+ connected.locked = TRUE //lock it
SSnanoui.update_uis(src) // update all UIs attached to src
- sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
+ sleep(10 * radiation_duration) // sleep for radiation_duration seconds
irradiating = 0
- src.connected.locked = lock_state
+ connected.locked = lock_state
- if(!src.connected.occupant)
- return 1
+ if(!connected.occupant)
+ return TRUE
- if(prob((80 + (src.radiation_duration / 2))))
- var/radiation = (src.radiation_intensity+src.radiation_duration)
- src.connected.occupant.apply_effect(radiation,IRRADIATE,0)
+ if(prob((80 + (radiation_duration / 2))))
+ var/radiation = (radiation_intensity + radiation_duration)
+ connected.occupant.apply_effect(radiation,IRRADIATE,0)
- if(src.connected.radiation_check())
- return 1
+ if(connected.radiation_check())
+ return TRUE
- block = miniscrambletarget(num2text(selected_ui_target), src.radiation_intensity, src.radiation_duration)
- src.connected.occupant.dna.SetUISubBlock(src.selected_ui_block,src.selected_ui_subblock,block)
- src.connected.occupant.UpdateAppearance()
+ block = miniscrambletarget(num2text(selected_ui_target), radiation_intensity, radiation_duration)
+ connected.occupant.dna.SetUISubBlock(selected_ui_block, selected_ui_subblock, block)
+ connected.occupant.UpdateAppearance()
else
- var/radiation = ((src.radiation_intensity*2)+src.radiation_duration)
- src.connected.occupant.apply_effect(radiation,IRRADIATE,0)
- if(src.connected.radiation_check())
- return 1
+ var/radiation = ((radiation_intensity * 2) + radiation_duration)
+ connected.occupant.apply_effect(radiation, IRRADIATE, 0)
+ if(connected.radiation_check())
+ return TRUE
- if(prob(20+src.radiation_intensity))
- randmutb(src.connected.occupant)
- domutcheck(src.connected.occupant,src.connected)
+ if(prob(20 + radiation_intensity))
+ randmutb(connected.occupant)
+ domutcheck(connected.occupant, connected)
else
- randmuti(src.connected.occupant)
- src.connected.occupant.UpdateAppearance()
- return 1 // return 1 forces an update to all Nano uis attached to src
+ randmuti(connected.occupant)
+ connected.occupant.UpdateAppearance()
+ return TRUE // return 1 forces an update to all Nano uis attached to src
////////////////////////////////////////////////////////
if(href_list["injectRejuvenators"])
if(!connected.occupant)
- return 0
+ return FALSE
var/inject_amount = round(text2num(href_list["injectRejuvenators"]), 5) // round to nearest 5
if(inject_amount < 0) // Since the user can actually type the commands himself, some sanity checking
inject_amount = 0
@@ -694,7 +678,7 @@
inject_amount = 50
connected.beaker.reagents.trans_to(connected.occupant, inject_amount)
connected.beaker.reagents.reaction(connected.occupant)
- return 1 // return 1 forces an update to all Nano uis attached to src
+ return TRUE // return 1 forces an update to all Nano uis attached to src
////////////////////////////////////////////////////////
@@ -702,73 +686,73 @@
var/select_block = text2num(href_list["selectSEBlock"])
var/select_subblock = text2num(href_list["selectSESubblock"])
if((select_block <= DNA_SE_LENGTH) && (select_block >= 1))
- src.selected_se_block = select_block
+ selected_se_block = select_block
if((select_subblock <= DNA_BLOCK_SIZE) && (select_subblock >= 1))
- src.selected_se_subblock = select_subblock
+ selected_se_subblock = select_subblock
//testing("User selected block [selected_se_block] (sent [select_block]), subblock [selected_se_subblock] (sent [select_block]).")
- return 1 // return 1 forces an update to all Nano uis attached to src
+ return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["pulseSERadiation"])
- var/block = src.connected.occupant.dna.GetSESubBlock(src.selected_se_block,src.selected_se_subblock)
+ var/block = connected.occupant.dna.GetSESubBlock(selected_se_block, selected_se_subblock)
//var/original_block=block
- //testing("Irradiating SE block [src.selected_se_block]:[src.selected_se_subblock] ([block])...")
+ //testing("Irradiating SE block [selected_se_block]:[selected_se_subblock] ([block])...")
- irradiating = src.radiation_duration
- var/lock_state = src.connected.locked
- src.connected.locked = 1 //lock it
+ irradiating = radiation_duration
+ var/lock_state = connected.locked
+ connected.locked = TRUE //lock it
SSnanoui.update_uis(src) // update all UIs attached to src
- sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
+ sleep(10 * radiation_duration) // sleep for radiation_duration seconds
irradiating = 0
- src.connected.locked = lock_state
+ connected.locked = lock_state
- if(src.connected.occupant)
- if(prob((80 + ((src.radiation_duration / 2) + (connected.precision_coeff ** 3)))))
- var/radiation = ((src.radiation_intensity+src.radiation_duration) / connected.damage_coeff)
- src.connected.occupant.apply_effect(radiation,IRRADIATE,0)
+ if(connected.occupant)
+ if(prob((80 + ((radiation_duration / 2) + (connected.precision_coeff ** 3)))))
+ var/radiation = ((radiation_intensity + radiation_duration) / connected.damage_coeff)
+ connected.occupant.apply_effect(radiation, IRRADIATE, 0)
- if(src.connected.radiation_check())
+ if(connected.radiation_check())
return 1
var/real_SE_block=selected_se_block
- block = miniscramble(block, src.radiation_intensity, src.radiation_duration)
+ block = miniscramble(block, radiation_intensity, radiation_duration)
if(prob(20))
- if(src.selected_se_block > 1 && src.selected_se_block < DNA_SE_LENGTH/2)
+ if(selected_se_block > 1 && selected_se_block < DNA_SE_LENGTH/2)
real_SE_block++
- else if(src.selected_se_block > DNA_SE_LENGTH/2 && src.selected_se_block < DNA_SE_LENGTH)
+ else if(selected_se_block > DNA_SE_LENGTH/2 && selected_se_block < DNA_SE_LENGTH)
real_SE_block--
- //testing("Irradiated SE block [real_SE_block]:[src.selected_se_subblock] ([original_block] now [block]) [(real_SE_block!=selected_se_block) ? "(SHIFTED)":""]!")
- connected.occupant.dna.SetSESubBlock(real_SE_block,selected_se_subblock,block)
- domutcheck(src.connected.occupant,src.connected)
+ //testing("Irradiated SE block [real_SE_block]:[selected_se_subblock] ([original_block] now [block]) [(real_SE_block!=selected_se_block) ? "(SHIFTED)":""]!")
+ connected.occupant.dna.SetSESubBlock(real_SE_block, selected_se_subblock, block)
+ domutcheck(connected.occupant, connected)
else
- var/radiation = (((src.radiation_intensity*2)+src.radiation_duration) / connected.damage_coeff)
- src.connected.occupant.apply_effect(radiation,IRRADIATE,0)
+ var/radiation = (((radiation_intensity * 2) + radiation_duration) / connected.damage_coeff)
+ connected.occupant.apply_effect(radiation, IRRADIATE, 0)
- if(src.connected.radiation_check())
+ if(connected.radiation_check())
return 1
- if(prob(80-src.radiation_duration))
+ if(prob(80 - radiation_duration))
//testing("Random bad mut!")
- randmutb(src.connected.occupant)
- domutcheck(src.connected.occupant,src.connected)
+ randmutb(connected.occupant)
+ domutcheck(connected.occupant, connected)
else
- randmuti(src.connected.occupant)
+ randmuti(connected.occupant)
//testing("Random identity mut!")
- src.connected.occupant.UpdateAppearance()
- return 1 // return 1 forces an update to all Nano uis attached to src
+ connected.occupant.UpdateAppearance()
+ return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["ejectBeaker"])
if(connected.beaker)
var/obj/item/reagent_containers/glass/B = connected.beaker
B.forceMove(connected.loc)
connected.beaker = null
- return 1
+ return TRUE
if(href_list["ejectOccupant"])
connected.eject_occupant()
- return 1
+ return TRUE
// Transfer Buffer Management
if(href_list["bufferOption"])
@@ -776,113 +760,113 @@
// These bufferOptions do not require a bufferId
if(bufferOption == "wipeDisk")
- if((isnull(src.disk)) || (src.disk.read_only))
- //src.temphtml = "Invalid disk. Please try again."
- return 0
+ if((isnull(disk)) || (disk.read_only))
+ //temphtml = "Invalid disk. Please try again."
+ return FALSE
- src.disk.buf=null
- //src.temphtml = "Data saved."
- return 1
+ disk.buf = null
+ //temphtml = "Data saved."
+ return TRUE
if(bufferOption == "ejectDisk")
- if(!src.disk)
+ if(!disk)
return
- src.disk.forceMove(get_turf(src))
- src.disk = null
- return 1
+ disk.forceMove(get_turf(src))
+ disk = null
+ return TRUE
// All bufferOptions from here on require a bufferId
if(!href_list["bufferId"])
- return 0
+ return FALSE
var/bufferId = text2num(href_list["bufferId"])
if(bufferId < 1 || bufferId > 3)
- return 0 // Not a valid buffer id
+ return FALSE // Not a valid buffer id
if(bufferOption == "saveUI")
- if(src.connected.occupant && src.connected.occupant.dna)
- var/datum/dna2/record/databuf=new
+ if(connected.occupant && connected.occupant.dna)
+ var/datum/dna2/record/databuf = new
databuf.types = DNA2_BUF_UI // DNA2_BUF_UE
- databuf.dna = src.connected.occupant.dna.Clone()
+ databuf.dna = connected.occupant.dna.Clone()
if(ishuman(connected.occupant))
databuf.dna.real_name=connected.occupant.name
databuf.name = "Unique Identifier"
- src.buffers[bufferId] = databuf
- return 1
+ buffers[bufferId] = databuf
+ return TRUE
if(bufferOption == "saveUIAndUE")
- if(src.connected.occupant && src.connected.occupant.dna)
- var/datum/dna2/record/databuf=new
+ if(connected.occupant && connected.occupant.dna)
+ var/datum/dna2/record/databuf = new
databuf.types = DNA2_BUF_UI|DNA2_BUF_UE
- databuf.dna = src.connected.occupant.dna.Clone()
+ databuf.dna = connected.occupant.dna.Clone()
if(ishuman(connected.occupant))
databuf.dna.real_name=connected.occupant.dna.real_name
databuf.name = "Unique Identifier + Unique Enzymes"
- src.buffers[bufferId] = databuf
- return 1
+ buffers[bufferId] = databuf
+ return TRUE
if(bufferOption == "saveSE")
- if(src.connected.occupant && src.connected.occupant.dna)
- var/datum/dna2/record/databuf=new
+ if(connected.occupant && connected.occupant.dna)
+ var/datum/dna2/record/databuf = new
databuf.types = DNA2_BUF_SE
- databuf.dna = src.connected.occupant.dna.Clone()
+ databuf.dna = connected.occupant.dna.Clone()
if(ishuman(connected.occupant))
- databuf.dna.real_name=connected.occupant.dna.real_name
+ databuf.dna.real_name = connected.occupant.dna.real_name
databuf.name = "Structural Enzymes"
- src.buffers[bufferId] = databuf
- return 1
+ buffers[bufferId] = databuf
+ return TRUE
if(bufferOption == "clear")
- src.buffers[bufferId]=new /datum/dna2/record()
- return 1
+ buffers[bufferId] = new /datum/dna2/record()
+ return TRUE
if(bufferOption == "changeLabel")
- var/datum/dna2/record/buf = src.buffers[bufferId]
+ var/datum/dna2/record/buf = buffers[bufferId]
var/text = sanitize(input(usr, "New Label:", "Edit Label", buf.name) as text|null)
buf.name = text
- src.buffers[bufferId] = buf
- return 1
+ buffers[bufferId] = buf
+ return TRUE
if(bufferOption == "transfer")
- if(!src.connected.occupant || (NOCLONE in src.connected.occupant.mutations && connected.scan_level < 3) || !src.connected.occupant.dna)
- return 1
+ if(!connected.occupant || (NOCLONE in connected.occupant.mutations && connected.scan_level < 3) || !connected.occupant.dna)
+ return TRUE
irradiating = 2
- var/lock_state = src.connected.locked
- src.connected.locked = 1//lock it
+ var/lock_state = connected.locked
+ connected.locked = TRUE //lock it
SSnanoui.update_uis(src) // update all UIs attached to src
sleep(2 SECONDS)
irradiating = 0
- src.connected.locked = lock_state
+ connected.locked = lock_state
var/radiation = (rand(20,50) / connected.damage_coeff)
- src.connected.occupant.apply_effect(radiation,IRRADIATE,0)
+ connected.occupant.apply_effect(radiation, IRRADIATE, 0)
- if(src.connected.radiation_check())
- return 1
+ if(connected.radiation_check())
+ return TRUE
- var/datum/dna2/record/buf = src.buffers[bufferId]
+ var/datum/dna2/record/buf = buffers[bufferId]
if((buf.types & DNA2_BUF_UI))
if((buf.types & DNA2_BUF_UE))
- src.connected.occupant.real_name = buf.dna.real_name
- src.connected.occupant.name = buf.dna.real_name
- src.connected.occupant.UpdateAppearance(buf.dna.UI.Copy())
+ connected.occupant.real_name = buf.dna.real_name
+ connected.occupant.name = buf.dna.real_name
+ connected.occupant.UpdateAppearance(buf.dna.UI.Copy())
else if(buf.types & DNA2_BUF_SE)
- src.connected.occupant.dna.SE = buf.dna.SE.Copy()
- src.connected.occupant.dna.UpdateSE()
- domutcheck(src.connected.occupant,src.connected)
- return 1
+ connected.occupant.dna.SE = buf.dna.SE.Copy()
+ connected.occupant.dna.UpdateSE()
+ domutcheck(connected.occupant, connected)
+ return TRUE
if(bufferOption == "createInjector")
if(injector_ready && !waiting_for_user_input)
var/success = 1
var/obj/item/dnainjector/I = new /obj/item/dnainjector
- var/datum/dna2/record/buf = src.buffers[bufferId]
+ var/datum/dna2/record/buf = buffers[bufferId]
buf = buf.copy()
if(href_list["createBlockInjector"])
waiting_for_user_input=1
@@ -897,35 +881,35 @@
I.buf = buf
waiting_for_user_input = 0
if(success)
- I.forceMove(src.loc)
+ I.forceMove(loc)
I.name += " ([buf.name])"
if(connected)
I.damage_coeff = connected.damage_coeff
- src.injector_ready = 0
+ injector_ready = FALSE
spawn(300)
- src.injector_ready = 1
- return 1
+ injector_ready = TRUE
+ return TRUE
if(bufferOption == "loadDisk")
- if((isnull(src.disk)) || (!src.disk.buf))
- //src.temphtml = "Invalid disk. Please try again."
- return 0
+ if((isnull(disk)) || (!disk.buf))
+ //temphtml = "Invalid disk. Please try again."
+ return FALSE
- src.buffers[bufferId]=src.disk.buf.copy()
- //src.temphtml = "Data loaded."
- return 1
+ buffers[bufferId] = disk.buf.copy()
+ //temphtml = "Data loaded."
+ return TRUE
if(bufferOption == "saveDisk")
- if((isnull(src.disk)) || (src.disk.read_only))
- //src.temphtml = "Invalid disk. Please try again."
- return 0
+ if((isnull(disk)) || (disk.read_only))
+ //temphtml = "Invalid disk. Please try again."
+ return FALSE
- var/datum/dna2/record/buf = src.buffers[bufferId]
+ var/datum/dna2/record/buf = buffers[bufferId]
- src.disk.buf = buf.copy()
- src.disk.name = "data disk - '[buf.dna.real_name]'"
- //src.temphtml = "Data saved."
- return 1
+ disk.buf = buf.copy()
+ disk.name = "data disk - '[buf.dna.real_name]'"
+ //temphtml = "Data saved."
+ return TRUE
/////////////////////////// DNA MACHINES
diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm
index e1af06f2ff4..48ffb648121 100644
--- a/code/game/dna/genes/disabilities.dm
+++ b/code/game/dna/genes/disabilities.dm
@@ -7,113 +7,144 @@
/////////////////////
/datum/dna/gene/disability
- name="DISABILITY"
+ name = "DISABILITY"
// Mutation to give (or 0)
- var/mutation=0
-
- // Disability to give (or 0)
- var/disability=0
+ var/mutation = 0
// Activation message
- var/activation_message=""
+ var/activation_message = ""
// Yay, you're no longer growing 3 arms
- var/deactivation_message=""
+ var/deactivation_message = ""
-/datum/dna/gene/disability/can_activate(var/mob/M,var/flags)
- return 1 // Always set!
+/datum/dna/gene/disability/can_activate(mob/M, flags)
+ return TRUE // Always set!
-/datum/dna/gene/disability/activate(var/mob/living/M, var/connected, var/flags)
+/datum/dna/gene/disability/activate(mob/living/M, connected, flags)
..()
- if(mutation && !(mutation in M.mutations))
- M.mutations.Add(mutation)
- if(disability)
- M.disabilities|=disability
+ M.mutations |= mutation
if(activation_message)
to_chat(M, "[activation_message]")
else
testing("[name] has no activation message.")
-/datum/dna/gene/disability/deactivate(var/mob/living/M, var/connected, var/flags)
+/datum/dna/gene/disability/deactivate(mob/living/M, connected, flags)
..()
- if(mutation && (mutation in M.mutations))
- M.mutations.Remove(mutation)
- if(disability)
- M.disabilities &= ~disability
+ M.mutations.Remove(mutation)
if(deactivation_message)
to_chat(M, "[deactivation_message]")
else
testing("[name] has no deactivation message.")
/datum/dna/gene/disability/hallucinate
- name="Hallucinate"
- activation_message="Your mind says 'Hello'."
- deactivation_message ="Sanity returns. Or does it?"
+ name = "Hallucinate"
+ activation_message = "Your mind says 'Hello'."
+ deactivation_message = "Sanity returns. Or does it?"
instability = -GENE_INSTABILITY_MODERATE
- mutation=HALLUCINATE
+ mutation = HALLUCINATE
/datum/dna/gene/disability/hallucinate/New()
- block=GLOB.hallucinationblock
+ ..()
+ block = GLOB.hallucinationblock
+
+/datum/dna/gene/disability/hallucinate/OnMobLife(mob/living/carbon/human/H)
+ if(prob(1))
+ H.Hallucinate(20)
/datum/dna/gene/disability/epilepsy
- name="Epilepsy"
- activation_message="You get a headache."
- deactivation_message ="Your headache is gone, at last."
+ name = "Epilepsy"
+ activation_message = "You get a headache."
+ deactivation_message = "Your headache is gone, at last."
instability = -GENE_INSTABILITY_MODERATE
- disability=EPILEPSY
+ mutation = EPILEPSY
/datum/dna/gene/disability/epilepsy/New()
- block=GLOB.epilepsyblock
+ ..()
+ block = GLOB.epilepsyblock
+
+/datum/dna/gene/disability/epilepsy/OnMobLife(mob/living/carbon/human/H)
+ if((prob(1) && H.paralysis < 1))
+ H.visible_message("[src] starts having a seizure!","You have a seizure!")
+ H.Paralyse(10)
+ H.Jitter(1000)
/datum/dna/gene/disability/cough
- name="Coughing"
- activation_message="You start coughing."
- deactivation_message ="Your throat stops aching."
+ name = "Coughing"
+ activation_message = "You start coughing."
+ deactivation_message = "Your throat stops aching."
instability = -GENE_INSTABILITY_MINOR
- disability=COUGHING
+ mutation = COUGHING
/datum/dna/gene/disability/cough/New()
- block=GLOB.coughblock
+ ..()
+ block = GLOB.coughblock
+
+/datum/dna/gene/disability/cough/OnMobLife(mob/living/carbon/human/H)
+ if((prob(5) && H.paralysis <= 1))
+ H.drop_item()
+ H.emote("cough")
/datum/dna/gene/disability/clumsy
- name="Clumsiness"
- activation_message="You feel lightheaded."
- deactivation_message ="You regain some control of your movements"
+ name = "Clumsiness"
+ activation_message = "You feel lightheaded."
+ deactivation_message = "You regain some control of your movements"
instability = -GENE_INSTABILITY_MINOR
- mutation=CLUMSY
+ mutation = CLUMSY
/datum/dna/gene/disability/clumsy/New()
- block=GLOB.clumsyblock
+ ..()
+ block = GLOB.clumsyblock
/datum/dna/gene/disability/tourettes
- name="Tourettes"
- activation_message="You twitch."
- deactivation_message ="Your mouth tastes like soap."
+ name = "Tourettes"
+ activation_message = "You twitch."
+ deactivation_message = "Your mouth tastes like soap."
instability = -GENE_INSTABILITY_MODERATE
- disability=TOURETTES
+ mutation = TOURETTES
/datum/dna/gene/disability/tourettes/New()
- block=GLOB.twitchblock
+ ..()
+ block = GLOB.twitchblock
+
+/datum/dna/gene/disability/tourettes/OnMobLife(mob/living/carbon/human/H)
+ if((prob(10) && H.paralysis <= 1))
+ H.Stun(10)
+ switch(rand(1, 3))
+ if(1)
+ H.emote("twitch")
+ if(2 to 3)
+ H.say("[prob(50) ? ";" : ""][pick("SHIT", "PISS", "FUCK", "CUNT", "COCKSUCKER", "MOTHERFUCKER", "TITS")]")
+ var/x_offset_old = H.pixel_x
+ var/y_offset_old = H.pixel_y
+ var/x_offset = H.pixel_x + rand(-2, 2)
+ var/y_offset = H.pixel_y + rand(-1, 1)
+ animate(H, pixel_x = x_offset, pixel_y = y_offset, time = 1)
+ animate(H, pixel_x = x_offset_old, pixel_y = y_offset_old, time = 1)
/datum/dna/gene/disability/nervousness
- name="Nervousness"
+ name = "Nervousness"
activation_message="You feel nervous."
deactivation_message ="You feel much calmer."
- disability=NERVOUS
+ mutation = NERVOUS
/datum/dna/gene/disability/nervousness/New()
- block=GLOB.nervousblock
+ ..()
+ block = GLOB.nervousblock
+/datum/dna/gene/disability/nervousness/OnMobLife(mob/living/carbon/human/H)
+ if(prob(10))
+ H.Stuttering(10)
/datum/dna/gene/disability/blindness
- name="Blindness"
+ name = "Blindness"
activation_message = "You can't seem to see anything."
deactivation_message = "You can see now, in case you didn't notice..."
instability = -GENE_INSTABILITY_MAJOR
- disability = BLIND
+ mutation = BLINDNESS
/datum/dna/gene/disability/blindness/New()
+ ..()
block = GLOB.blindblock
/datum/dna/gene/disability/blindness/activate(mob/M, connected, flags)
@@ -130,51 +161,54 @@
activation_message = "You feel a peculiar prickling in your eyes while your perception of colour changes."
deactivation_message ="Your eyes tingle unsettlingly, though everything seems to become alot more colourful."
instability = -GENE_INSTABILITY_MODERATE
- disability = COLOURBLIND
+ mutation = COLOURBLIND
/datum/dna/gene/disability/colourblindness/New()
- block=GLOB.colourblindblock
+ ..()
+ block = GLOB.colourblindblock
-/datum/dna/gene/disability/colourblindness/activate(var/mob/M, var/connected, var/flags)
+/datum/dna/gene/disability/colourblindness/activate(mob/M, connected, flags)
..()
M.update_client_colour() //Handle the activation of the colourblindness on the mob.
M.update_icons() //Apply eyeshine as needed.
-/datum/dna/gene/disability/colourblindness/deactivate(var/mob/M, var/connected, var/flags)
+/datum/dna/gene/disability/colourblindness/deactivate(mob/M, connected, flags)
..()
M.update_client_colour() //Handle the deactivation of the colourblindness on the mob.
M.update_icons() //Remove eyeshine as needed.
/datum/dna/gene/disability/deaf
- name="Deafness"
+ name = "Deafness"
activation_message="It's kinda quiet."
deactivation_message ="You can hear again!"
instability = -GENE_INSTABILITY_MAJOR
- disability=DEAF
+ mutation = DEAF
/datum/dna/gene/disability/deaf/New()
- block=GLOB.deafblock
+ ..()
+ block = GLOB.deafblock
-/datum/dna/gene/disability/deaf/activate(var/mob/M, var/connected, var/flags)
+/datum/dna/gene/disability/deaf/activate(mob/M, connected, flags)
..()
M.MinimumDeafTicks(1)
/datum/dna/gene/disability/nearsighted
- name="Nearsightedness"
+ name = "Nearsightedness"
activation_message="Your eyes feel weird..."
deactivation_message ="You can see clearly now"
instability = -GENE_INSTABILITY_MODERATE
- disability=NEARSIGHTED
+ mutation = NEARSIGHTED
/datum/dna/gene/disability/nearsighted/New()
- block=GLOB.glassesblock
+ ..()
+ block = GLOB.glassesblock
/datum/dna/gene/disability/nearsighted/activate(mob/living/M, connected, flags)
- . = ..()
+ ..()
M.update_nearsighted_effects()
/datum/dna/gene/disability/nearsighted/deactivate(mob/living/M, connected, flags)
- . = ..()
+ ..()
M.update_nearsighted_effects()
/datum/dna/gene/disability/lisp
@@ -186,9 +220,9 @@
/datum/dna/gene/disability/lisp/New()
..()
- block=GLOB.lispblock
+ block = GLOB.lispblock
-/datum/dna/gene/disability/lisp/OnSay(var/mob/M, var/message)
+/datum/dna/gene/disability/lisp/OnSay(mob/M, message)
return replacetext(message,"s","th")
/datum/dna/gene/disability/comic
@@ -196,9 +230,10 @@
desc = "This will only bring death and destruction."
activation_message = "Uh oh!"
deactivation_message = "Well thank god that's over with."
- mutation=COMIC
+ mutation = COMIC
/datum/dna/gene/disability/comic/New()
+ ..()
block = GLOB.comicblock
/datum/dna/gene/disability/wingdings
@@ -210,9 +245,10 @@
mutation = WINGDINGS
/datum/dna/gene/disability/wingdings/New()
+ ..()
block = GLOB.wingdingsblock
-/datum/dna/gene/disability/wingdings/OnSay(var/mob/M, var/message)
+/datum/dna/gene/disability/wingdings/OnSay(mob/M, message)
var/list/chars = string2charlist(message)
var/garbled_message = ""
for(var/C in chars)
diff --git a/code/game/dna/genes/gene.dm b/code/game/dna/genes/gene.dm
index a8357a437f1..1509cd098a4 100644
--- a/code/game/dna/genes/gene.dm
+++ b/code/game/dna/genes/gene.dm
@@ -11,63 +11,61 @@
/datum/dna/gene
// Display name
- var/name="BASE GENE"
+ var/name = "BASE GENE"
// Probably won't get used but why the fuck not
var/desc="Oh god who knows what this does."
// Set in initialize()!
// What gene activates this?
- var/block=0
+ var/block = 0
// Any of a number of GENE_ flags.
- var/flags=0
+ var/flags = 0
// Chance of the gene to cause adverse effects when active
- var/instability=0
+ var/instability = 0
/*
* Is the gene active in this mob's DNA?
*/
-/datum/dna/gene/proc/is_active(var/mob/M)
+/datum/dna/gene/proc/is_active(mob/M)
return M.active_genes && (type in M.active_genes)
// Return 1 if we can activate.
// HANDLE MUTCHK_FORCED HERE!
-/datum/dna/gene/proc/can_activate(var/mob/M, var/flags)
- return 0
+/datum/dna/gene/proc/can_activate(mob/M, flags)
+ return FALSE
// Called when the gene activates. Do your magic here.
-/datum/dna/gene/proc/activate(var/mob/living/M, var/connected, var/flags)
+/datum/dna/gene/proc/activate(mob/living/M, connected, flags)
M.gene_stability -= instability
- return
/**
* Called when the gene deactivates. Undo your magic here.
* Only called when the block is deactivated.
*/
-/datum/dna/gene/proc/deactivate(var/mob/living/M, var/connected, var/flags)
+/datum/dna/gene/proc/deactivate(mob/living/M, connected, flags)
M.gene_stability += instability
- return
// This section inspired by goone's bioEffects.
/**
* Called in each life() tick.
*/
-/datum/dna/gene/proc/OnMobLife(var/mob/M)
+/datum/dna/gene/proc/OnMobLife(mob/M)
return
/**
* Called when the mob dies
*/
-/datum/dna/gene/proc/OnMobDeath(var/mob/M)
+/datum/dna/gene/proc/OnMobDeath(mob/M)
return
/**
* Called when the mob says shit
*/
-/datum/dna/gene/proc/OnSay(var/mob/M, var/message)
+/datum/dna/gene/proc/OnSay(mob/M, message)
return message
/**
@@ -77,7 +75,7 @@
* @params g Gender (m or f)
*/
/datum/dna/gene/proc/OnDrawUnderlays(mob/M, g)
- return 0
+ return FALSE
/////////////////////
@@ -93,34 +91,34 @@
/datum/dna/gene/basic
- name="BASIC GENE"
+ name = "BASIC GENE"
// Mutation to give
- var/mutation=0
+ var/mutation = 0
// Activation probability
- var/activation_prob=100
+ var/activation_prob = 100
// Possible activation messages
- var/list/activation_messages=list()
+ var/list/activation_messages = list()
// Possible deactivation messages
- var/list/deactivation_messages=list()
+ var/list/deactivation_messages = list()
-/datum/dna/gene/basic/can_activate(var/mob/M,var/flags)
+/datum/dna/gene/basic/can_activate(mob/M, flags)
if(flags & MUTCHK_FORCED)
- return 1
+ return TRUE
// Probability check
return prob(activation_prob)
-/datum/dna/gene/basic/activate(var/mob/M)
+/datum/dna/gene/basic/activate(mob/M, connected, flags)
..()
M.mutations.Add(mutation)
if(activation_messages.len)
var/msg = pick(activation_messages)
to_chat(M, "[msg]")
-/datum/dna/gene/basic/deactivate(var/mob/M)
+/datum/dna/gene/basic/deactivate(mob/living/M, connected, flags)
..()
M.mutations.Remove(mutation)
if(deactivation_messages.len)
diff --git a/code/game/dna/genes/goon_disabilities.dm b/code/game/dna/genes/goon_disabilities.dm
index f8c9f53d0e5..7615f737cd0 100644
--- a/code/game/dna/genes/goon_disabilities.dm
+++ b/code/game/dna/genes/goon_disabilities.dm
@@ -13,13 +13,13 @@
activation_message = "You feel unable to express yourself at all."
deactivation_message = "You feel able to speak freely again."
instability = -GENE_INSTABILITY_MODERATE
- disability = MUTE
+ mutation = MUTE
/datum/dna/gene/disability/mute/New()
..()
- block=GLOB.muteblock
+ block = GLOB.muteblock
-/datum/dna/gene/disability/mute/OnSay(var/mob/M, var/message)
+/datum/dna/gene/disability/mute/OnSay(mob/M, message)
return ""
////////////////////////////////////////
@@ -36,27 +36,26 @@
/datum/dna/gene/disability/radioactive/New()
..()
- block=GLOB.radblock
+ block = GLOB.radblock
-/datum/dna/gene/disability/radioactive/can_activate(var/mob/M,var/flags)
+/datum/dna/gene/disability/radioactive/can_activate(mob/M, flags)
if(!..())
- return 0
+ return FALSE
if(ishuman(M))
var/mob/living/carbon/human/H = M
if((RADIMMUNE in H.dna.species.species_traits) && !(flags & MUTCHK_FORCED))
- return 0
- return 1
+ return FALSE
+ return TRUE
-/datum/dna/gene/disability/radioactive/OnMobLife(var/mob/living/owner)
- var/radiation_amount = abs(min(owner.radiation - 20,0))
- owner.apply_effect(radiation_amount, IRRADIATE)
- for(var/mob/living/L in range(1, owner))
- if(L == owner)
+/datum/dna/gene/disability/radioactive/OnMobLife(mob/living/carbon/human/H)
+ var/radiation_amount = abs(min(H.radiation - 20,0))
+ H.apply_effect(radiation_amount, IRRADIATE)
+ for(var/mob/living/L in range(1, H))
+ if(L == H)
continue
- to_chat(L, "You are enveloped by a soft green glow emanating from [owner].")
+ to_chat(L, "You are enveloped by a soft green glow emanating from [H].")
L.apply_effect(5, IRRADIATE)
- return
/datum/dna/gene/disability/radioactive/OnDrawUnderlays(mob/M, g)
return "rads_s"
@@ -76,7 +75,7 @@
/datum/dna/gene/disability/fat/New()
..()
- block=GLOB.fatblock
+ block = GLOB.fatblock
// WAS: /datum/bioEffect/chav
/datum/dna/gene/disability/speech/chav
@@ -88,9 +87,9 @@
/datum/dna/gene/disability/speech/chav/New()
..()
- block=GLOB.chavblock
+ block = GLOB.chavblock
-/datum/dna/gene/disability/speech/chav/OnSay(var/mob/M, var/message)
+/datum/dna/gene/disability/speech/chav/OnSay(mob/M, message)
// THIS ENTIRE THING BEGS FOR REGEX
message = replacetext(message,"dick","prat")
message = replacetext(message,"comdom","knob'ead")
@@ -127,9 +126,9 @@
/datum/dna/gene/disability/speech/swedish/New()
..()
- block=GLOB.swedeblock
+ block = GLOB.swedeblock
-/datum/dna/gene/disability/speech/swedish/OnSay(var/mob/M, var/message)
+/datum/dna/gene/disability/speech/swedish/OnSay(mob/M, message)
// svedish
message = replacetextEx(message,"W","V")
message = replacetextEx(message,"w","v")
@@ -157,10 +156,10 @@
/datum/dna/gene/disability/unintelligable/New()
..()
- block=GLOB.scrambleblock
+ block = GLOB.scrambleblock
-/datum/dna/gene/disability/unintelligable/OnSay(var/mob/M, var/message)
- var/prefix=copytext(message,1,2)
+/datum/dna/gene/disability/unintelligable/OnSay(mob/M, message)
+ var/prefix = copytext(message,1,2)
if(prefix == ";")
message = copytext(message,2)
else if(prefix in list(":","#"))
@@ -197,7 +196,7 @@
/datum/dna/gene/disability/strong/New()
..()
- block=GLOB.strongblock
+ block = GLOB.strongblock
// WAS: /datum/bioEffect/horns
/datum/dna/gene/disability/horns
@@ -209,7 +208,7 @@
/datum/dna/gene/disability/horns/New()
..()
- block=GLOB.hornsblock
+ block = GLOB.hornsblock
/datum/dna/gene/disability/horns/OnDrawUnderlays(mob/M, g)
return "horns_s"
@@ -223,7 +222,7 @@
deactivation_messages = list("You no longer feel uncomfortably hot.")
mutation = IMMOLATE
- spelltype=/obj/effect/proc_holder/spell/targeted/immolate
+ spelltype = /obj/effect/proc_holder/spell/targeted/immolate
/datum/dna/gene/basic/grant_spell/immolate/New()
..()
diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm
index fd2f300e8fb..87bbdf97c5c 100644
--- a/code/game/dna/genes/goon_powers.dm
+++ b/code/game/dna/genes/goon_powers.dm
@@ -2,26 +2,28 @@
// WAS: /datum/bioEffect/alcres
/datum/dna/gene/basic/sober
- name="Sober"
- activation_messages=list("You feel unusually sober.")
+ name = "Sober"
+ activation_messages = list("You feel unusually sober.")
deactivation_messages = list("You feel like you could use a stiff drink.")
- mutation=SOBER
+ mutation = SOBER
/datum/dna/gene/basic/sober/New()
- block=GLOB.soberblock
+ ..()
+ block = GLOB.soberblock
//WAS: /datum/bioEffect/psychic_resist
/datum/dna/gene/basic/psychic_resist
- name="Psy-Resist"
+ name = "Psy-Resist"
desc = "Boosts efficiency in sectors of the brain commonly associated with meta-mental energies."
activation_messages = list("Your mind feels closed.")
deactivation_messages = list("You feel oddly exposed.")
- mutation=PSY_RESIST
+ mutation = PSY_RESIST
/datum/dna/gene/basic/psychic_resist/New()
- block=GLOB.psyresistblock
+ ..()
+ block = GLOB.psyresistblock
/////////////////////////
// Stealth Enhancers
@@ -30,16 +32,16 @@
/datum/dna/gene/basic/stealth
instability = GENE_INSTABILITY_MODERATE
-/datum/dna/gene/basic/stealth/can_activate(var/mob/M, var/flags)
+/datum/dna/gene/basic/stealth/can_activate(mob/M, flags)
// Can only activate one of these at a time.
if(is_type_in_list(/datum/dna/gene/basic/stealth,M.active_genes))
testing("Cannot activate [type]: /datum/dna/gene/basic/stealth in M.active_genes.")
- return 0
- return ..(M,flags)
+ return FALSE
+ return ..()
-/datum/dna/gene/basic/stealth/deactivate(var/mob/M)
- ..(M)
- M.alpha=255
+/datum/dna/gene/basic/stealth/deactivate(mob/living/M, connected, flags)
+ ..()
+ M.alpha = 255
// WAS: /datum/bioEffect/darkcloak
/datum/dna/gene/basic/stealth/darkcloak
@@ -47,13 +49,14 @@
desc = "Enables the subject to bend low levels of light around themselves, creating a cloaking effect."
activation_messages = list("You begin to fade into the shadows.")
deactivation_messages = list("You become fully visible.")
- activation_prob=25
+ activation_prob = 25
mutation = CLOAK
/datum/dna/gene/basic/stealth/darkcloak/New()
- block=GLOB.shadowblock
+ ..()
+ block = GLOB.shadowblock
-/datum/dna/gene/basic/stealth/darkcloak/OnMobLife(var/mob/M)
+/datum/dna/gene/basic/stealth/darkcloak/OnMobLife(mob/M)
var/turf/simulated/T = get_turf(M)
if(!istype(T))
return
@@ -69,13 +72,14 @@
desc = "The subject becomes able to subtly alter light patterns to become invisible, as long as they remain still."
activation_messages = list("You feel one with your surroundings.")
deactivation_messages = list("You feel oddly visible.")
- activation_prob=25
+ activation_prob = 25
mutation = CHAMELEON
/datum/dna/gene/basic/stealth/chameleon/New()
- block=GLOB.chameleonblock
+ ..()
+ block = GLOB.chameleonblock
-/datum/dna/gene/basic/stealth/chameleon/OnMobLife(var/mob/M)
+/datum/dna/gene/basic/stealth/chameleon/OnMobLife(mob/M)
if((world.time - M.last_movement) >= 30 && !M.stat && M.canmove && !M.restrained())
M.alpha -= 25
else
@@ -86,27 +90,27 @@
/datum/dna/gene/basic/grant_spell
var/obj/effect/proc_holder/spell/spelltype
-/datum/dna/gene/basic/grant_spell/activate(var/mob/M, var/connected, var/flags)
+/datum/dna/gene/basic/grant_spell/activate(mob/M, connected, flags)
M.AddSpell(new spelltype(null))
..()
- return 1
+ return TRUE
-/datum/dna/gene/basic/grant_spell/deactivate(var/mob/M, var/connected, var/flags)
+/datum/dna/gene/basic/grant_spell/deactivate(mob/M, connected, flags)
for(var/obj/effect/proc_holder/spell/S in M.mob_spell_list)
if(istype(S, spelltype))
M.RemoveSpell(S)
..()
- return 1
+ return TRUE
/datum/dna/gene/basic/grant_verb
var/verbtype
-/datum/dna/gene/basic/grant_verb/activate(var/mob/M, var/connected, var/flags)
+/datum/dna/gene/basic/grant_verb/activate(mob/M, connected, flags)
..()
M.verbs += verbtype
- return 1
+ return TRUE
-/datum/dna/gene/basic/grant_verb/deactivate(var/mob/M, var/connected, var/flags)
+/datum/dna/gene/basic/grant_verb/deactivate(mob/M, connected, flags)
..()
M.verbs -= verbtype
@@ -183,8 +187,6 @@
new/obj/effect/self_deleting(C.loc, icon('icons/effects/genetics.dmi', "cryokinesis"))
- return
-
/obj/effect/self_deleting
density = 0
opacity = 0
@@ -193,12 +195,11 @@
desc = ""
//layer = 15
-/obj/effect/self_deleting/New(var/atom/location, var/icon/I, var/duration = 20, var/oname = "something")
- src.name = oname
+/obj/effect/self_deleting/New(atom/location, icon/I, duration = 20, oname = "something")
+ name = oname
loc=location
- src.icon = I
- spawn(duration)
- qdel(src)
+ icon = I
+ QDEL_IN(src, duration)
///////////////////////////////////////////////////////////////////////////////////////////
@@ -255,7 +256,7 @@
/obj/item/implant
)
-/obj/effect/proc_holder/spell/targeted/eat/proc/doHeal(var/mob/user)
+/obj/effect/proc_holder/spell/targeted/eat/proc/doHeal(mob/user)
if(ishuman(user))
var/mob/living/carbon/human/H = user
for(var/name in H.bodyparts_by_name)
@@ -300,12 +301,12 @@
perform(targets, user = user)
/obj/effect/proc_holder/spell/targeted/eat/proc/check_mouth(mob/user = usr)
- var/can_eat = 1
+ var/can_eat = TRUE
if(iscarbon(user))
var/mob/living/carbon/C = user
if((C.head && (C.head.flags_cover & HEADCOVERSMOUTH)) || (C.wear_mask && (C.wear_mask.flags_cover & MASKCOVERSMOUTH) && !C.wear_mask.mask_adjusted))
to_chat(C, "Your mouth is covered, preventing you from eating!")
- can_eat = 0
+ can_eat = FALSE
return can_eat
/obj/effect/proc_holder/spell/targeted/eat/cast(list/targets, mob/user = usr)
@@ -320,17 +321,17 @@
if(!istype(limb))
to_chat(user, "You can't eat this part of them!")
revert_cast()
- return 0
+ return FALSE
if(istype(limb,/obj/item/organ/external/head))
// Bullshit, but prevents being unable to clone someone.
to_chat(user, "You try to put \the [limb] in your mouth, but [the_item.p_their()] ears tickle your throat!")
revert_cast()
- return 0
+ return FALSE
if(istype(limb,/obj/item/organ/external/chest))
// Bullshit, but prevents being able to instagib someone.
to_chat(user, "You try to put [the_item.p_their()] [limb] in your mouth, but it's too big to fit!")
revert_cast()
- return 0
+ return FALSE
user.visible_message("[user] begins stuffing [the_item]'s [limb.name] into [user.p_their()] gaping maw!")
var/oldloc = H.loc
if(!do_mob(user,H,EAT_MOB_DELAY))
@@ -350,7 +351,6 @@
playsound(user.loc, 'sound/items/eatfood.ogg', 50, 0)
qdel(the_item)
doHeal(user)
- return
////////////////////////////////////////////////////////////////////////
@@ -387,7 +387,7 @@
action_icon_state = "genetic_jump"
/obj/effect/proc_holder/spell/targeted/leap/cast(list/targets, mob/user = usr)
- var/failure = 0
+ var/failure = FALSE
if(istype(user.loc,/mob/) || user.lying || user.stunned || user.buckled || user.stat)
to_chat(user, "You can't jump right now!")
return
@@ -397,7 +397,7 @@
for(var/mob/M in range(user, 1))
if(M.pulling == user)
if(!M.restrained() && M.stat == 0 && M.canmove && user.Adjacent(M))
- failure = 1
+ failure = TRUE
else
M.stop_pulling()
@@ -409,12 +409,12 @@
user.visible_message("[user] attempts to leap away but is slammed back down to the ground!",
"You attempt to leap away but are suddenly slammed back down to the ground!",
"You hear the flexing of powerful muscles and suddenly a crash as a body hits the floor.")
- return 0
+ return FALSE
var/prevLayer = user.layer
var/prevFlying = user.flying
user.layer = 9
- user.flying = 1
+ user.flying = TRUE
for(var/i=0, i<10, i++)
step(user, user.dir)
if(i < 5) user.pixel_y += 8
@@ -508,7 +508,7 @@
activation_messages = list("You suddenly notice more about others than you did before.")
deactivation_messages = list("You no longer feel able to sense intentions.")
instability = GENE_INSTABILITY_MINOR
- mutation=EMPATH
+ mutation = EMPATH
/datum/dna/gene/basic/grant_spell/empath/New()
..()
@@ -614,4 +614,3 @@
to_chat(M, "You sense [user.name] reading your mind.")
else if(prob(5) || M.mind.assigned_role=="Chaplain")
to_chat(M, "You sense someone intruding upon your thoughts...")
- return
diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm
index 3b6182ecf63..583b2c75836 100644
--- a/code/game/dna/genes/monkey.dm
+++ b/code/game/dna/genes/monkey.dm
@@ -1,10 +1,11 @@
/datum/dna/gene/monkey
- name="Monkey"
+ name = "Monkey"
/datum/dna/gene/monkey/New()
- block=GLOB.monkeyblock
+ ..()
+ block = GLOB.monkeyblock
-/datum/dna/gene/monkey/can_activate(var/mob/M,var/flags)
+/datum/dna/gene/monkey/can_activate(mob/M, flags)
return ishuman(M)
/datum/dna/gene/monkey/activate(mob/living/carbon/human/H, connected, flags)
@@ -21,7 +22,7 @@
H.regenerate_icons()
H.SetStunned(1)
- H.canmove = 0
+ H.canmove = FALSE
H.icon = null
H.invisibility = 101
var/has_primitive_form = H.dna.species.primitive_form // cache this
diff --git a/code/game/dna/genes/powers.dm b/code/game/dna/genes/powers.dm
index 465a58cab25..d893c64565c 100644
--- a/code/game/dna/genes/powers.dm
+++ b/code/game/dna/genes/powers.dm
@@ -3,109 +3,121 @@
///////////////////////////////////
/datum/dna/gene/basic/nobreath
- name="No Breathing"
- activation_messages=list("You feel no need to breathe.")
- deactivation_messages=list("You feel the need to breathe, once more.")
+ name = "No Breathing"
+ activation_messages = list("You feel no need to breathe.")
+ deactivation_messages = list("You feel the need to breathe, once more.")
instability = GENE_INSTABILITY_MODERATE
mutation = BREATHLESS
- activation_prob=25
+ activation_prob = 25
/datum/dna/gene/basic/nobreath/New()
+ ..()
block = GLOB.breathlessblock
/datum/dna/gene/basic/regenerate
- name="Regenerate"
- activation_messages=list("Your wounds start healing.")
- deactivation_messages=list("Your regenerative powers feel like they've vanished.")
+ name = "Regenerate"
+ activation_messages = list("Your wounds start healing.")
+ deactivation_messages = list("Your regenerative powers feel like they've vanished.")
instability = GENE_INSTABILITY_MINOR
- mutation=REGEN
+ mutation = REGEN
/datum/dna/gene/basic/regenerate/New()
- block=GLOB.regenerateblock
+ ..()
+ block = GLOB.regenerateblock
+
+/datum/dna/gene/basic/regenerate/OnMobLife(mob/living/carbon/human/H)
+ H.adjustBruteLoss(-0.1, FALSE)
+ H.adjustFireLoss(-0.1)
/datum/dna/gene/basic/increaserun
- name="Super Speed"
- activation_messages=list("You feel swift and unencumbered.")
- deactivation_messages=list("You feel slow.")
+ name = "Super Speed"
+ activation_messages = list("You feel swift and unencumbered.")
+ deactivation_messages = list("You feel slow.")
instability = GENE_INSTABILITY_MINOR
- mutation=RUN
+ mutation = RUN
/datum/dna/gene/basic/increaserun/New()
- block=GLOB.increaserunblock
+ ..()
+ block = GLOB.increaserunblock
-/datum/dna/gene/basic/increaserun/can_activate(var/mob/M,var/flags)
+/datum/dna/gene/basic/increaserun/can_activate(mob/M, flags)
if(!..())
- return 0
+ return FALSE
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.dna.species && H.dna.species.speed_mod && !(flags & MUTCHK_FORCED))
- return 0
- return 1
+ return FALSE
+ return TRUE
/datum/dna/gene/basic/heat_resist
- name="Heat Resistance"
- activation_messages=list("Your skin is icy to the touch.")
- deactivation_messages=list("Your skin no longer feels icy to the touch.")
+ name = "Heat Resistance"
+ activation_messages = list("Your skin is icy to the touch.")
+ deactivation_messages = list("Your skin no longer feels icy to the touch.")
instability = GENE_INSTABILITY_MODERATE
mutation = HEATRES
/datum/dna/gene/basic/heat_resist/New()
- block=GLOB.coldblock
+ ..()
+ block = GLOB.coldblock
/datum/dna/gene/basic/heat_resist/OnDrawUnderlays(mob/M, g)
return "cold_s"
/datum/dna/gene/basic/cold_resist
- name="Cold Resistance"
- activation_messages=list("Your body is filled with warmth.")
- deactivation_messages=list("Your body is no longer filled with warmth.")
+ name = "Cold Resistance"
+ activation_messages = list("Your body is filled with warmth.")
+ deactivation_messages = list("Your body is no longer filled with warmth.")
instability = GENE_INSTABILITY_MODERATE
mutation = COLDRES
/datum/dna/gene/basic/cold_resist/New()
- block=GLOB.fireblock
+ ..()
+ block = GLOB.fireblock
/datum/dna/gene/basic/cold_resist/OnDrawUnderlays(mob/M, g)
return "fire_s"
/datum/dna/gene/basic/noprints
- name="No Prints"
- activation_messages=list("Your fingers feel numb.")
- deactivation_messages=list("your fingers no longer feel numb.")
+ name = "No Prints"
+ activation_messages = list("Your fingers feel numb.")
+ deactivation_messages = list("your fingers no longer feel numb.")
instability = GENE_INSTABILITY_MINOR
- mutation=FINGERPRINTS
+ mutation = FINGERPRINTS
/datum/dna/gene/basic/noprints/New()
- block=GLOB.noprintsblock
+ ..()
+ block = GLOB.noprintsblock
/datum/dna/gene/basic/noshock
- name="Shock Immunity"
- activation_messages=list("Your skin feels dry and unreactive.")
- deactivation_messages=list("Your skin no longer feels dry and unreactive.")
+ name = "Shock Immunity"
+ activation_messages = list("Your skin feels dry and unreactive.")
+ deactivation_messages = list("Your skin no longer feels dry and unreactive.")
instability = GENE_INSTABILITY_MODERATE
- mutation=NO_SHOCK
+ mutation = NO_SHOCK
/datum/dna/gene/basic/noshock/New()
- block=GLOB.shockimmunityblock
+ ..()
+ block = GLOB.shockimmunityblock
/datum/dna/gene/basic/midget
- name="Midget"
- activation_messages=list("Everything around you seems bigger now...")
+ name = "Midget"
+ activation_messages = list("Everything around you seems bigger now...")
deactivation_messages = list("Everything around you seems to shrink...")
instability = GENE_INSTABILITY_MINOR
- mutation=DWARF
+ mutation = DWARF
/datum/dna/gene/basic/midget/New()
- block=GLOB.smallsizeblock
+ ..()
+ block = GLOB.smallsizeblock
-/datum/dna/gene/basic/midget/activate(var/mob/M, var/connected, var/flags)
- ..(M,connected,flags)
+/datum/dna/gene/basic/midget/activate(mob/M, connected, flags)
+ ..()
M.pass_flags |= PASSTABLE
M.resize = 0.8
M.update_transform()
-/datum/dna/gene/basic/midget/deactivate(var/mob/M, var/connected, var/flags)
+/datum/dna/gene/basic/midget/deactivate(mob/M, connected, flags)
..()
M.pass_flags &= ~PASSTABLE
M.resize = 1.25
@@ -113,31 +125,32 @@
// OLD HULK BEHAVIOR
/datum/dna/gene/basic/hulk
- name="Hulk"
- activation_messages=list("Your muscles hurt.")
- deactivation_messages=list("Your muscles shrink.")
+ name = "Hulk"
+ activation_messages = list("Your muscles hurt.")
+ deactivation_messages = list("Your muscles shrink.")
instability = GENE_INSTABILITY_MAJOR
- mutation=HULK
- activation_prob=15
+ mutation = HULK
+ activation_prob = 15
/datum/dna/gene/basic/hulk/New()
- block=GLOB.hulkblock
+ ..()
+ block = GLOB.hulkblock
-/datum/dna/gene/basic/hulk/activate(var/mob/M, var/connected, var/flags)
+/datum/dna/gene/basic/hulk/activate(mob/M, connected, flags)
..()
var/status = CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH
M.status_flags &= ~status
-/datum/dna/gene/basic/hulk/deactivate(var/mob/M, var/connected, var/flags)
+/datum/dna/gene/basic/hulk/deactivate(mob/M, connected, flags)
..()
M.status_flags |= CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH
/datum/dna/gene/basic/hulk/OnDrawUnderlays(mob/M, g)
if(HULK in M.mutations)
return "hulk_[g]_s"
- return 0
+ return FALSE
-/datum/dna/gene/basic/hulk/OnMobLife(var/mob/living/carbon/human/M)
+/datum/dna/gene/basic/hulk/OnMobLife(mob/living/carbon/human/M)
if(!istype(M))
return
if((HULK in M.mutations) && M.health <= 0)
@@ -150,15 +163,16 @@
to_chat(M, "You suddenly feel very weak.")
/datum/dna/gene/basic/xray
- name="X-Ray Vision"
- activation_messages=list("The walls suddenly disappear.")
- deactivation_messages=list("the walls around you re-appear.")
+ name = "X-Ray Vision"
+ activation_messages = list("The walls suddenly disappear.")
+ deactivation_messages = list("the walls around you re-appear.")
instability = GENE_INSTABILITY_MAJOR
- mutation=XRAY
- activation_prob=15
+ mutation = XRAY
+ activation_prob = 15
/datum/dna/gene/basic/xray/New()
- block=GLOB.xrayblock
+ ..()
+ block = GLOB.xrayblock
/datum/dna/gene/basic/xray/activate(mob/living/M, connected, flags)
..()
@@ -171,15 +185,16 @@
M.update_icons() //Remove eyeshine as needed.
/datum/dna/gene/basic/tk
- name="Telekenesis"
+ name = "Telekenesis"
activation_messages = list("You feel smarter.")
deactivation_messages = list("You feel dumber.")
instability = GENE_INSTABILITY_MAJOR
- mutation=TK
- activation_prob=15
+ mutation = TK
+ activation_prob = 15
/datum/dna/gene/basic/tk/New()
- block=GLOB.teleblock
+ ..()
+ block = GLOB.teleblock
/datum/dna/gene/basic/tk/OnDrawUnderlays(mob/M, g)
return "telekinesishead_s"
diff --git a/code/game/dna/genes/vg_disabilities.dm b/code/game/dna/genes/vg_disabilities.dm
index d423f0bf89b..c2ad1559b6a 100644
--- a/code/game/dna/genes/vg_disabilities.dm
+++ b/code/game/dna/genes/vg_disabilities.dm
@@ -8,11 +8,11 @@
/datum/dna/gene/disability/speech/loud/New()
..()
- block=GLOB.loudblock
+ block = GLOB.loudblock
-/datum/dna/gene/disability/speech/loud/OnSay(var/mob/M, var/message)
+/datum/dna/gene/disability/speech/loud/OnSay(mob/M, message)
message = replacetext(message,".","!")
message = replacetext(message,"?","?!")
message = replacetext(message,"!","!!")
@@ -28,15 +28,15 @@
/datum/dna/gene/disability/dizzy/New()
..()
- block=GLOB.dizzyblock
+ block = GLOB.dizzyblock
-/datum/dna/gene/disability/dizzy/OnMobLife(var/mob/living/carbon/human/M)
+/datum/dna/gene/disability/dizzy/OnMobLife(mob/living/carbon/human/M)
if(!istype(M))
return
if(DIZZY in M.mutations)
M.Dizzy(300)
/datum/dna/gene/disability/dizzy/deactivate(mob/living/M, connected, flags)
- . = ..()
+ ..()
M.SetDizzy(0)
diff --git a/code/game/dna/genes/vg_powers.dm b/code/game/dna/genes/vg_powers.dm
index 5ed6c705a17..cc54d817752 100644
--- a/code/game/dna/genes/vg_powers.dm
+++ b/code/game/dna/genes/vg_powers.dm
@@ -4,10 +4,10 @@
name = "Morphism"
desc = "Enables the subject to reconfigure their appearance to that of any human."
spelltype =/obj/effect/proc_holder/spell/targeted/morph
- activation_messages=list("Your body feels if can alter its appearance.")
+ activation_messages = list("Your body feels if can alter its appearance.")
deactivation_messages = list("Your body doesn't feel capable of altering its appearance.")
instability = GENE_INSTABILITY_MINOR
- mutation=MORPH
+ mutation = MORPH
/datum/dna/gene/basic/grant_spell/morph/New()
..()
@@ -29,7 +29,8 @@
action_icon_state = "genetic_morph"
/obj/effect/proc_holder/spell/targeted/morph/cast(list/targets, mob/user = usr)
- if(!ishuman(user)) return
+ if(!ishuman(user))
+ return
if(istype(user.loc,/mob/))
to_chat(user, "You can't change your appearance right now!")
@@ -176,21 +177,21 @@
M.visible_message("[src] morphs and changes [p_their()] appearance!", "You change your appearance!", "Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!")
/datum/dna/gene/basic/grant_spell/remotetalk
- name="Telepathy"
- activation_messages=list("You feel you can project your thoughts.")
- deactivation_messages=list("You no longer feel you can project your thoughts.")
+ name = "Telepathy"
+ activation_messages = list("You feel you can project your thoughts.")
+ deactivation_messages = list("You no longer feel you can project your thoughts.")
instability = GENE_INSTABILITY_MINOR
- mutation=REMOTE_TALK
+ mutation = REMOTE_TALK
spelltype =/obj/effect/proc_holder/spell/targeted/remotetalk
/datum/dna/gene/basic/grant_spell/remotetalk/New()
..()
- block=GLOB.remotetalkblock
+ block = GLOB.remotetalkblock
-/datum/dna/gene/basic/grant_spell/remotetalk/activate(mob/user)
+/datum/dna/gene/basic/grant_spell/remotetalk/activate(mob/living/M, connected, flags)
..()
- user.AddSpell(new /obj/effect/proc_holder/spell/targeted/mindscan(null))
+ M.AddSpell(new /obj/effect/proc_holder/spell/targeted/mindscan(null))
/datum/dna/gene/basic/grant_spell/remotetalk/deactivate(mob/user)
..()
@@ -336,22 +337,23 @@
return ..()
/datum/dna/gene/basic/grant_spell/remoteview
- name="Remote Viewing"
- activation_messages=list("Your mind can see things from afar.")
- deactivation_messages=list("Your mind can no longer can see things from afar.")
+ name = "Remote Viewing"
+ activation_messages = list("Your mind can see things from afar.")
+ deactivation_messages = list("Your mind can no longer can see things from afar.")
instability = GENE_INSTABILITY_MINOR
- mutation=REMOTE_VIEW
+ mutation = REMOTE_VIEW
spelltype =/obj/effect/proc_holder/spell/targeted/remoteview
/datum/dna/gene/basic/grant_spell/remoteview/New()
- block=GLOB.remoteviewblock
+ ..()
+ block = GLOB.remoteviewblock
/obj/effect/proc_holder/spell/targeted/remoteview
name = "Remote View"
desc = "Spy on people from any range!"
- charge_max = 600
+ charge_max = 100
clothes_req = 0
stat_allowed = 0
@@ -363,18 +365,23 @@
/obj/effect/proc_holder/spell/targeted/remoteview/choose_targets(mob/user = usr)
var/list/targets = list()
- var/list/remoteviewers = new /list()
- for(var/mob/M in GLOB.living_mob_list)
+ var/list/remoteviewers = list()
+ for(var/mob/M in GLOB.alive_mob_list)
+ if(M == user)
+ continue
if(PSY_RESIST in M.mutations)
continue
if(REMOTE_VIEW in M.mutations)
remoteviewers += M
- if(!remoteviewers.len || remoteviewers.len == 1)
+ if(!LAZYLEN(remoteviewers))
to_chat(user, "No valid targets with remote view were found!")
start_recharge()
return
- targets += input("Choose the target to spy on.", "Targeting") as mob in remoteviewers
-
+ targets += input("Choose the target to spy on.", "Targeting") as null|anything in remoteviewers
+ if(!targets)
+ to_chat(user, "You decide against remote viewing.")
+ start_recharge()
+ return
perform(targets, user = user)
/obj/effect/proc_holder/spell/targeted/remoteview/cast(list/targets, mob/user = usr)
@@ -386,15 +393,15 @@
var/mob/target
- if(istype(H.l_hand, /obj/item/tk_grab) || istype(H.r_hand, /obj/item/tk_grab/))
+ if(istype(H.l_hand, /obj/item/tk_grab) || istype(H.r_hand, /obj/item/tk_grab))
to_chat(H, "Your mind is too busy with that telekinetic grab.")
H.remoteview_target = null
- H.reset_perspective(0)
+ H.reset_perspective()
return
if(H.client.eye != user.client.mob)
H.remoteview_target = null
- H.reset_perspective(0)
+ H.reset_perspective()
return
for(var/mob/living/L in targets)
@@ -405,4 +412,4 @@
H.reset_perspective(target)
else
H.remoteview_target = null
- H.reset_perspective(0)
+ H.reset_perspective()
diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm
index fb26ce91698..b7bcd737dfd 100644
--- a/code/game/gamemodes/blob/blobs/blob_mobs.dm
+++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm
@@ -51,7 +51,8 @@
speak_emote = list("pulses")
var/obj/structure/blob/factory/factory = null
var/list/human_overlays = list()
- var/is_zombie = 0
+ var/mob/living/carbon/human/oldguy
+ var/is_zombie = FALSE
/mob/living/simple_animal/hostile/blob/blobspore/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
..()
@@ -102,6 +103,7 @@
human_overlays = H.overlays
update_icons()
H.forceMove(src)
+ oldguy = H
visible_message("The corpse of [H.name] suddenly rises!")
/mob/living/simple_animal/hostile/blob/blobspore/death(gibbed)
@@ -130,9 +132,9 @@
if(factory)
factory.spores -= src
factory = null
- if(contents)
- for(var/mob/M in contents)
- M.loc = get_turf(src)
+ if(oldguy)
+ oldguy.forceMove(get_turf(src))
+ oldguy = null
return ..()
diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm
index 74ed59d2469..0c2342328a2 100644
--- a/code/game/gamemodes/blob/overmind.dm
+++ b/code/game/gamemodes/blob/overmind.dm
@@ -35,11 +35,15 @@
color = blob_reagent_datum.complementary_color
..()
+ START_PROCESSING(SSobj, src)
-/mob/camera/blob/Life(seconds, times_fired)
+/mob/camera/blob/Destroy()
+ STOP_PROCESSING(SSobj, src)
+ return ..()
+
+/mob/camera/blob/process()
if(!blob_core)
qdel(src)
- ..()
/mob/camera/blob/Login()
..()
diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm
index bdbd875a3dc..6f2eed39499 100644
--- a/code/game/gamemodes/blob/powers.dm
+++ b/code/game/gamemodes/blob/powers.dm
@@ -357,7 +357,7 @@
if(!surrounding_turfs.len)
return
- for(var/mob/living/simple_animal/hostile/blob/blobspore/BS in GLOB.living_mob_list)
+ for(var/mob/living/simple_animal/hostile/blob/blobspore/BS in GLOB.alive_mob_list)
if(isturf(BS.loc) && get_dist(BS, T) <= 35)
BS.LoseTarget()
BS.Goto(pick(surrounding_turfs), BS.move_to_delay)
diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
index 4663fef8b97..34a2d67b58b 100644
--- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
+++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
@@ -49,7 +49,7 @@
/obj/item/organ/internal/cyberimp/eyes/shield/ling/on_life()
..()
var/obj/item/organ/internal/eyes/E = owner.get_int_organ(/obj/item/organ/internal/eyes)
- if(owner.eye_blind || owner.eye_blurry || (owner.disabilities & BLIND) || (owner.disabilities & NEARSIGHTED) || (E.damage > 0))
+ if(owner.eye_blind || owner.eye_blurry || (BLINDNESS in owner.mutations) || (NEARSIGHTED in owner.mutations) || (E.damage > 0))
owner.reagents.add_reagent("oculine", 1)
/obj/item/organ/internal/cyberimp/eyes/shield/ling/prepare_eat()
diff --git a/code/game/gamemodes/changeling/powers/fakedeath.dm b/code/game/gamemodes/changeling/powers/fakedeath.dm
index d403059b0c7..61882b85287 100644
--- a/code/game/gamemodes/changeling/powers/fakedeath.dm
+++ b/code/game/gamemodes/changeling/powers/fakedeath.dm
@@ -16,11 +16,8 @@
user.emote("deathgasp")
user.timeofdeath = world.time
user.status_flags |= FAKEDEATH //play dead
- user.update_stat("fakedeath sting")
+ user.updatehealth("fakedeath sting")
user.update_canmove()
- user.med_hud_set_health()
- user.handle_hud_icons_health()
- user.med_hud_set_status()
user.mind.changeling.regenerating = TRUE
addtimer(CALLBACK(src, .proc/ready_to_regenerate, user), LING_FAKEDEATH_TIME)
diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm
index d225ac6886a..ce62242ca0f 100644
--- a/code/game/gamemodes/changeling/powers/mutations.dm
+++ b/code/game/gamemodes/changeling/powers/mutations.dm
@@ -95,8 +95,8 @@
user.unEquip(user.head)
user.unEquip(user.wear_suit)
- user.equip_to_slot_if_possible(new suit_type(user), slot_wear_suit, 1, 1, 1)
- user.equip_to_slot_if_possible(new helmet_type(user), slot_head, 1, 1, 1)
+ user.equip_to_slot_if_possible(new suit_type(user), slot_wear_suit, TRUE, TRUE)
+ user.equip_to_slot_if_possible(new helmet_type(user), slot_head, TRUE, TRUE)
var/datum/changeling/changeling = user.mind.changeling
changeling.chem_recharge_slowdown += recharge_slowdown
diff --git a/code/game/gamemodes/changeling/powers/spiders.dm b/code/game/gamemodes/changeling/powers/spiders.dm
index 82b2db6ac7b..778ec768e55 100644
--- a/code/game/gamemodes/changeling/powers/spiders.dm
+++ b/code/game/gamemodes/changeling/powers/spiders.dm
@@ -1,7 +1,7 @@
/datum/action/changeling/spiders
name = "Spread Infestation"
desc = "Our form divides, creating arachnids which will grow into deadly beasts."
- helptext = "The spiders are thoughtless creatures, and may attack their creators when fully grown. Requires at least 5 DNA absorptions."
+ helptext = "The spiders are thoughtless creatures, and may attack their creators when fully grown. Requires at least 5 stored DNA."
button_icon_state = "spread_infestation"
chemical_cost = 45
dna_cost = 1
diff --git a/code/game/gamemodes/cult/cult_comms.dm b/code/game/gamemodes/cult/cult_comms.dm
index 375a02251bc..fcc39124233 100644
--- a/code/game/gamemodes/cult/cult_comms.dm
+++ b/code/game/gamemodes/cult/cult_comms.dm
@@ -23,7 +23,7 @@
if(!message)
return
- if((user.disabilities & MUTE) || user.mind.miming) //Under vow of silence/mute?
+ if((MUTE in user.mutations) || user.mind.miming) //Under vow of silence/mute?
user.visible_message("[user] appears to whisper to themselves.","You begin to whisper to yourself.") //Make them do *something* abnormal.
else
user.whisper("O bidai nabora se[pick("'","`")]sma!") // Otherwise book club sayings.
@@ -32,7 +32,7 @@
if(!user)
return
- if(!((user.disabilities & MUTE) || user.mind.miming)) // If they aren't mute/miming, commence the whisperting
+ if(!((MUTE in user.mutations) || user.mind.miming)) // If they aren't mute/miming, commence the whisperting
user.whisper(message)
var/my_message
if(istype(user, /mob/living/simple_animal/slaughter/cult)) //Harbringers of the Slaughter
@@ -46,3 +46,4 @@
to_chat(M, " (F) [my_message] ")
log_say("(CULT) [message]", user)
+ user.create_log(SAY_LOG, "(CULT) [message]")
diff --git a/code/game/gamemodes/devil/true_devil/inventory.dm b/code/game/gamemodes/devil/true_devil/inventory.dm
index 437203e2e91..3f5446d88bc 100644
--- a/code/game/gamemodes/devil/true_devil/inventory.dm
+++ b/code/game/gamemodes/devil/true_devil/inventory.dm
@@ -5,7 +5,7 @@
return 1
return 0
-/mob/living/carbon/true_devil/update_inv_r_hand(var/update_icons=1)
+/mob/living/carbon/true_devil/update_inv_r_hand()
..()
if(r_hand)
var/t_state = r_hand.item_state
@@ -17,11 +17,10 @@
devil_overlays[DEVIL_R_HAND_LAYER] = I
else
devil_overlays[DEVIL_R_HAND_LAYER] = null
- if(update_icons)
- update_icons()
+ update_icons()
-/mob/living/carbon/true_devil/update_inv_l_hand(var/update_icons=1)
+/mob/living/carbon/true_devil/update_inv_l_hand()
..()
if(l_hand)
var/t_state = l_hand.item_state
@@ -33,8 +32,7 @@
devil_overlays[DEVIL_L_HAND_LAYER] = I
else
devil_overlays[DEVIL_L_HAND_LAYER] = null
- if(update_icons)
- update_icons()
+ update_icons()
/mob/living/carbon/true_devil/proc/remove_overlay(cache_index)
if(devil_overlays[cache_index])
diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm
index fa797ac929b..f99a00567ae 100644
--- a/code/game/gamemodes/miniantags/borer/borer.dm
+++ b/code/game/gamemodes/miniantags/borer/borer.dm
@@ -590,8 +590,6 @@
GrantBorerActions()
RemoveInfestActions()
forceMove(get_turf(host))
-
- reset_perspective(null)
machine = null
host.reset_perspective(null)
diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm
index 126587a0c97..c0e22515553 100644
--- a/code/game/gamemodes/miniantags/guardian/guardian.dm
+++ b/code/game/gamemodes/miniantags/guardian/guardian.dm
@@ -112,7 +112,7 @@
summoner.death()
-/mob/living/simple_animal/hostile/guardian/handle_hud_icons_health()
+/mob/living/simple_animal/hostile/guardian/update_health_hud()
if(summoner)
var/resulthealth
if(iscarbon(summoner))
@@ -121,8 +121,6 @@
resulthealth = round((summoner.health / summoner.maxHealth) * 100)
if(hud_used)
hud_used.guardianhealthdisplay.maptext = "
[resulthealth]%
"
- med_hud_set_health()
- med_hud_set_status()
/mob/living/simple_animal/hostile/guardian/adjustHealth(amount, updating_health = TRUE) //The spirit is invincible, but passes on damage to the summoner
var/damage = amount * damage_transfer
@@ -164,7 +162,7 @@
if(loc == summoner)
forceMove(get_turf(summoner))
new /obj/effect/temp_visual/guardian/phase(loc)
- src.client.eye = loc
+ reset_perspective()
cooldown = world.time + 30
/mob/living/simple_animal/hostile/guardian/proc/Recall(forced = FALSE)
@@ -286,7 +284,7 @@
var/name_list = list("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces")
/obj/item/guardiancreator/attack_self(mob/living/user)
- for(var/mob/living/simple_animal/hostile/guardian/G in GLOB.living_mob_list)
+ for(var/mob/living/simple_animal/hostile/guardian/G in GLOB.alive_mob_list)
if(G.summoner == user)
to_chat(user, "You already have a [mob_name]!")
return
diff --git a/code/game/gamemodes/miniantags/slaughter/slaughter.dm b/code/game/gamemodes/miniantags/slaughter/slaughter.dm
index 73ab05a00aa..e3ce78d582a 100644
--- a/code/game/gamemodes/miniantags/slaughter/slaughter.dm
+++ b/code/game/gamemodes/miniantags/slaughter/slaughter.dm
@@ -139,7 +139,7 @@
/obj/effect/proc_holder/spell/targeted/sense_victims/cast(list/targets, mob/user)
var/list/victims = targets
- for(var/mob/living/L in GLOB.living_mob_list)
+ for(var/mob/living/L in GLOB.alive_mob_list)
if(!L.stat && !iscultist(L) && L.key && L != usr)
victims.Add(L)
if(!targets.len)
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index de15f62d09d..bedc3c4809b 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -475,7 +475,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
n_p++
target_amount = min(target_amount, n_p)
- explanation_text = "Absorb [target_amount] compatible genomes."
+ explanation_text = "Acquire [target_amount] compatible genomes. The 'Extract DNA Sting' can be used to stealthily get genomes without killing somebody."
return target_amount
/datum/objective/absorb/check_completion()
diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm
index 00ce24b6c46..a38982905bc 100644
--- a/code/game/gamemodes/revolution/revolution.dm
+++ b/code/game/gamemodes/revolution/revolution.dm
@@ -336,7 +336,7 @@
if(head_revolutionaries.len || GAMEMODE_IS_REVOLUTION)
var/num_revs = 0
var/num_survivors = 0
- for(var/mob/living/carbon/survivor in GLOB.living_mob_list)
+ for(var/mob/living/carbon/survivor in GLOB.alive_mob_list)
if(survivor.ckey)
num_survivors++
if(survivor.mind)
diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm
index c7c46d89c19..f6ba6504381 100644
--- a/code/game/gamemodes/setupgame.dm
+++ b/code/game/gamemodes/setupgame.dm
@@ -34,7 +34,7 @@
//message_admins("Assigning DNA blocks:")
// Standard muts
- GLOB.blindblock = getAssignedBlock("BLIND", numsToAssign)
+ GLOB.blindblock = getAssignedBlock("BLINDNESS", numsToAssign)
GLOB.colourblindblock = getAssignedBlock("COLOURBLIND", numsToAssign)
GLOB.deafblock = getAssignedBlock("DEAF", numsToAssign)
GLOB.hulkblock = getAssignedBlock("HULK", numsToAssign, DNA_HARD_BOUNDS, good=1)
diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm
index 37f7296bd4e..2cafb1bc219 100644
--- a/code/game/gamemodes/shadowling/shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm
@@ -375,7 +375,7 @@
to_chat(target, "You focus your telepathic energies abound, harnessing and drawing together the strength of your thralls.")
- for(M in GLOB.living_mob_list)
+ for(M in GLOB.alive_mob_list)
if(is_thrall(M))
thralls++
to_chat(M, "You feel hooks sink into your mind and pull.")
@@ -413,7 +413,7 @@
else if(thralls >= victory_threshold)
to_chat(target, "You are now powerful enough to ascend. Use the Ascendance ability when you are ready. This will kill all of your thralls.")
to_chat(target, "You may find Ascendance in the Shadowling Evolution tab.")
- for(M in GLOB.living_mob_list)
+ for(M in GLOB.alive_mob_list)
if(is_shadow(M))
var/obj/effect/proc_holder/spell/targeted/collective_mind/CM
if(CM in M.mind.spell_list)
diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm
index 032bab0b6e8..2c7cee9d61a 100644
--- a/code/game/gamemodes/vampire/vampire_powers.dm
+++ b/code/game/gamemodes/vampire/vampire_powers.dm
@@ -243,7 +243,7 @@
scramble(1, H, 100)
H.real_name = random_name(H.gender, H.dna.species.name) //Give them a name that makes sense for their species.
H.sync_organ_dna(assimilate = 1)
- H.update_body(0)
+ H.update_body()
H.reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
H.reset_markings() //...Or markings.
H.dna.ResetUIFrom(H)
diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm
index da7c6d4e1de..205fd63d9c6 100644
--- a/code/game/gamemodes/wizard/artefact.dm
+++ b/code/game/gamemodes/wizard/artefact.dm
@@ -809,7 +809,7 @@ GLOBAL_LIST_EMPTY(multiverse)
return
return ..()
-/obj/item/voodoo/check_eye(mob/user as mob)
+/obj/item/voodoo/check_eye(mob/user)
if(loc != user)
user.reset_perspective(null)
user.unset_machine()
@@ -866,7 +866,7 @@ GLOBAL_LIST_EMPTY(multiverse)
possible = list()
if(!link)
return
- for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
+ for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(md5(H.dna.uni_identity) in link.fingerprints)
possible |= H
diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm
index a7eb5d135e9..b76b31255e9 100644
--- a/code/game/gamemodes/wizard/spellbook.dm
+++ b/code/game/gamemodes/wizard/spellbook.dm
@@ -1011,7 +1011,7 @@
magichead.voicechange = 1 //NEEEEIIGHH
if(!user.unEquip(user.wear_mask))
qdel(user.wear_mask)
- user.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
+ user.equip_to_slot_if_possible(magichead, slot_wear_mask, TRUE, TRUE)
qdel(src)
else
to_chat(user, "I say thee neigh")
diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm
index 9d96ec94b99..1ee30b6e9d0 100644
--- a/code/game/machinery/adv_med.dm
+++ b/code/game/machinery/adv_med.dm
@@ -314,9 +314,9 @@
occupantData["intOrgan"] = intOrganData
- occupantData["blind"] = (occupant.disabilities & BLIND)
- occupantData["colourblind"] = (occupant.disabilities & COLOURBLIND)
- occupantData["nearsighted"] = (occupant.disabilities & NEARSIGHTED)
+ occupantData["blind"] = (BLINDNESS in occupant.mutations)
+ occupantData["colourblind"] = (COLOURBLIND in occupant.mutations)
+ occupantData["nearsighted"] = (NEARSIGHTED in occupant.mutations)
data["occupant"] = occupantData
return data
@@ -498,11 +498,11 @@
dat += "[i.name] | N/A | [i.damage] | [infection]:[mech][dead] | | "
dat += ""
dat += ""
- if(occupant.disabilities & BLIND)
+ if(BLINDNESS in occupant.mutations)
dat += "Cataracts detected.
"
- if(occupant.disabilities & COLOURBLIND)
+ if(COLOURBLIND in occupant.mutations)
dat += "Photoreceptor abnormalities detected.
"
- if(occupant.disabilities & NEARSIGHTED)
+ if(NEARSIGHTED in occupant.mutations)
dat += "Retinal misalignment detected.
"
else
dat += "[src] is empty."
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index a98d7b08c13..c622b12c94c 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -27,7 +27,7 @@ GLOBAL_LIST_INIT(cloner_biomass_items, list(\
desc = "An electronically-lockable pod for growing organic tissue."
density = 1
icon = 'icons/obj/cloning.dmi'
- icon_state = "pod_0"
+ icon_state = "pod_idle"
req_access = list(ACCESS_GENETICS) //For premature unlocking.
var/mob/living/carbon/human/occupant
@@ -419,7 +419,9 @@ GLOBAL_LIST_INIT(cloner_biomass_items, list(\
/obj/machinery/clonepod/screwdriver_act(mob/user, obj/item/I)
. = TRUE
- default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]", I)
+ // These icon states don't really matter since we need to call update_icon() to handle panel open/closed overlays anyway.
+ default_deconstruction_screwdriver(user, null, null, I)
+ update_icon()
/obj/machinery/clonepod/wrench_act(mob/user, obj/item/I)
. = TRUE
@@ -545,11 +547,17 @@ GLOBAL_LIST_INIT(cloner_biomass_items, list(\
/obj/machinery/clonepod/update_icon()
..()
- icon_state = "pod_0"
+ cut_overlays()
+
+ if(panel_open)
+ add_overlay("panel_open")
+
if(occupant && !(stat & NOPOWER))
- icon_state = "pod_1"
- else if(mess && !panel_open)
- icon_state = "pod_g"
+ icon_state = "pod_cloning"
+ else if(mess)
+ icon_state = "pod_mess"
+ else
+ icon_state = "pod_idle"
/obj/machinery/clonepod/relaymove(mob/user)
if(user.stat == CONSCIOUS)
diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm
index 1649397a68f..3f8fc080bf8 100644
--- a/code/game/machinery/computer/camera.dm
+++ b/code/game/machinery/computer/camera.dm
@@ -53,6 +53,9 @@
return TRUE
/obj/machinery/computer/security/check_eye(mob/user)
+ if((stat & (NOPOWER|BROKEN)) || user.incapacitated() || !user.has_vision())
+ user.unset_machine()
+ return
if(!(user in watchers))
user.unset_machine()
return
@@ -65,8 +68,6 @@
return
if(!can_access_camera(C, user))
user.unset_machine()
- return
- return 1
/obj/machinery/computer/security/on_unset_machine(mob/user)
watchers.Remove(user)
diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm
index 76242c4a0e4..bc1bfe6135b 100644
--- a/code/game/machinery/computer/camera_advanced.dm
+++ b/code/game/machinery/computer/camera_advanced.dm
@@ -37,17 +37,14 @@
eyeobj.RemoveImages()
eyeobj.eye_user = null
user.remote_control = null
- user.remote_view = FALSE
current_user = null
user.unset_machine()
playsound(src, 'sound/machines/terminal_off.ogg', 25, 0)
/obj/machinery/computer/camera_advanced/check_eye(mob/user)
- if((stat & (NOPOWER|BROKEN)) || !Adjacent(user) || !user.has_vision() || user.incapacitated())
+ if((stat & (NOPOWER|BROKEN)) || (!Adjacent(user) && !user.has_unlimited_silicon_privilege) || !user.has_vision() || user.incapacitated())
user.unset_machine()
- return 0
- return 1
/obj/machinery/computer/camera_advanced/Destroy()
if(current_user)
@@ -99,8 +96,6 @@
current_user = user
eyeobj.eye_user = user
eyeobj.name = "Camera Eye ([user.name])"
- // This should be able to be excised once the full view refactor rolls out
- user.remote_view = 1
user.remote_control = eyeobj
user.reset_perspective(eyeobj)
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index 756a22259f0..c7dc139446a 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -533,11 +533,17 @@
/datum/data/function/proc/display()
return
-/obj/machinery/atmospherics/components/unary/cryo_cell/get_remote_view_fullscreens(mob/user)
+/obj/machinery/atmospherics/unary/cryo_cell/get_remote_view_fullscreens(mob/user)
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
-/obj/machinery/atmospherics/components/unary/cryo_cell/update_remote_sight(mob/living/user)
+/obj/machinery/atmospherics/unary/cryo_cell/update_remote_sight(mob/living/user)
return //we don't see the pipe network while inside cryo.
+/obj/machinery/atmospherics/unary/cryo_cell/can_crawl_through()
+ return // can't ventcrawl in or out of cryo.
+
+/obj/machinery/atmospherics/unary/cryo_cell/can_see_pipes()
+ return FALSE // you can't see the pipe network when inside a cryo cell.
+
#undef AUTO_EJECT_HEALTHY
#undef AUTO_EJECT_DEAD
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index de077917adf..49b75588468 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -444,7 +444,7 @@
control_computer.frozen_crew += "[occupant.real_name]"
var/ailist[] = list()
- for(var/mob/living/silicon/ai/A in GLOB.living_mob_list)
+ for(var/mob/living/silicon/ai/A in GLOB.alive_mob_list)
ailist += A
if(ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 1a8828012dc..73d0e9281e1 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -949,7 +949,7 @@ About the new airlock wires panel:
if(note)
remove_airlock_note(user, TRUE)
else
- return interact_with_panel(user)
+ interact_with_panel(user)
/obj/machinery/door/airlock/multitool_act(mob/user, obj/item/I)
if(!headbutt_shock_check(user))
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index b7b7e35eef6..57057ad510a 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -58,6 +58,8 @@
playsound(loc, 'sound/weapons/flash.ogg', 100, 1)
flick("[base_state]_flash", src)
+ set_light(2, 1, COLOR_WHITE)
+ addtimer(CALLBACK(src, /atom./proc/set_light, 0), 2)
last_flash = world.time
use_power(1000)
diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm
index c0b1c44f806..cc9fc3e4666 100644
--- a/code/game/machinery/transformer.dm
+++ b/code/game/machinery/transformer.dm
@@ -317,7 +317,7 @@
scramble(1, H, 100)
H.generate_name()
H.sync_organ_dna(assimilate = 1)
- H.update_body(0)
+ H.update_body()
H.reset_hair()
H.dna.ResetUIFrom(H)
diff --git a/code/game/mecha/combat/gygax.dm b/code/game/mecha/combat/gygax.dm
index d9ec4412ab3..0898936cbfb 100644
--- a/code/game/mecha/combat/gygax.dm
+++ b/code/game/mecha/combat/gygax.dm
@@ -39,7 +39,7 @@
icon_state = "darkgygax"
initial_icon = "darkgygax"
max_integrity = 300
- deflect_chance = 15
+ deflect_chance = 20
armor = list(melee = 40, bullet = 40, laser = 50, energy = 35, bomb = 20, bio = 0, rad =20, fire = 100, acid = 100)
max_temperature = 35000
leg_overload_coeff = 100
@@ -50,16 +50,24 @@
starting_voice = /obj/item/mecha_modkit/voice/syndicate
destruction_sleep_duration = 1
+/obj/mecha/combat/gygax/dark/GrantActions(mob/living/user, human_occupant = 0)
+ . = ..()
+ thrusters_action.Grant(user, src)
+
+/obj/mecha/combat/gygax/dark/RemoveActions(mob/living/user, human_occupant = 0)
+ . = ..()
+ thrusters_action.Remove(user)
+
/obj/mecha/combat/gygax/dark/loaded/New()
..()
- var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
+ var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
ME.attach(src)
- ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang
+ ME = new /obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster
ME.attach(src)
- ME = new /obj/item/mecha_parts/mecha_equipment/teleporter/precise
+ ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay
ME.attach(src)
/obj/mecha/combat/gygax/dark/add_cell()
- cell = new /obj/item/stock_parts/cell/hyper(src)
+ cell = new /obj/item/stock_parts/cell/bluespace(src)
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 7efa81863b6..610436406d8 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -1102,7 +1102,6 @@
occupant = H
H.stop_pulling()
H.forceMove(src)
- H.reset_perspective(src)
add_fingerprint(H)
GrantActions(H, human_occupant = 1)
forceMove(loc)
diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm
index 1e7ad8397ee..b7eea1b367f 100644
--- a/code/game/objects/effects/decals/Cleanable/humans.dm
+++ b/code/game/objects/effects/decals/Cleanable/humans.dm
@@ -86,7 +86,7 @@ GLOBAL_LIST_EMPTY(splatter_cache)
user.blood_DNA |= blood_DNA.Copy()
user.bloody_hands += taken
user.hand_blood_color = basecolor
- user.update_inv_gloves(1)
+ user.update_inv_gloves()
user.verbs += /mob/living/carbon/human/proc/bloody_doodle
/obj/effect/decal/cleanable/blood/can_bloodcrawl_in()
diff --git a/code/game/objects/effects/misc.dm b/code/game/objects/effects/misc.dm
index 434c0af1136..a0006fd00d6 100644
--- a/code/game/objects/effects/misc.dm
+++ b/code/game/objects/effects/misc.dm
@@ -88,7 +88,7 @@
name = "horrific experiment"
desc = "Some sort of pod filled with blood and vicerea. You swear you can see it moving..."
icon = 'icons/obj/cloning.dmi'
- icon_state = "pod_g"
+ icon_state = "pod_mess"
//Makes a tile fully lit no matter what
diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm
index 7acf6b61a6d..7724d499e7e 100644
--- a/code/game/objects/items/devices/camera_bug.dm
+++ b/code/game/objects/items/devices/camera_bug.dm
@@ -54,21 +54,21 @@
user.set_machine(src)
interact(user)
-/obj/item/camera_bug/check_eye(var/mob/user as mob)
- if(user.stat || loc != user || !user.canmove || !user.has_vision() || !current)
- user.reset_perspective(null)
+/obj/item/camera_bug/check_eye(mob/user)
+ if(loc != user || user.incapacitated() || !user.has_vision() || !current)
user.unset_machine()
- return null
-
- var/turf/T = get_turf(user.loc)
- if(T.z != current.z || !current.can_use())
+ return FALSE
+ var/turf/T_user = get_turf(user.loc)
+ var/turf/T_current = get_turf(current)
+ if(!atoms_share_level(T_user, T_current) || !current.can_use())
to_chat(user, "[src] has lost the signal.")
current = null
- user.reset_perspective(null)
user.unset_machine()
- return null
+ return FALSE
+ return TRUE
- return 1
+/obj/item/camera_bug/on_unset_machine(mob/user)
+ user.reset_perspective(null)
/obj/item/camera_bug/proc/get_cameras()
if(world.time > (last_net_update + 100))
@@ -182,7 +182,6 @@
/obj/item/camera_bug/Topic(var/href,var/list/href_list)
if(usr != loc)
usr.unset_machine()
- usr.reset_perspective(null)
usr << browse(null, "window=camerabug")
return
usr.set_machine(src)
@@ -233,7 +232,6 @@
interact()
else
usr.unset_machine()
- usr.reset_perspective(null)
usr << browse(null, "window=camerabug")
return
else
diff --git a/code/game/objects/items/devices/enginepicker.dm b/code/game/objects/items/devices/enginepicker.dm
index a2fa30a243b..0fd3a591560 100644
--- a/code/game/objects/items/devices/enginepicker.dm
+++ b/code/game/objects/items/devices/enginepicker.dm
@@ -76,7 +76,7 @@
new G(T) //Spawns the switch-selected engine on the chosen beacon's turf
var/ailist[] = list()
- for(var/mob/living/silicon/ai/A in GLOB.living_mob_list)
+ for(var/mob/living/silicon/ai/A in GLOB.alive_mob_list)
ailist += A
if(ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index b8602e671c3..58848f3f7e4 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -67,20 +67,22 @@
times_used = max(0, times_used) //sanity
-/obj/item/flash/proc/try_use_flash(var/mob/user = null)
+/obj/item/flash/proc/try_use_flash(mob/user = null)
flash_recharge(user)
if(broken)
- return 0
+ return FALSE
- playsound(src.loc, use_sound, 100, 1)
+ playsound(loc, use_sound, 100, 1)
flick("[initial(icon_state)]2", src)
+ set_light(2, 1, COLOR_WHITE)
+ addtimer(CALLBACK(src, /atom./proc/set_light, 0), 2)
times_used++
if(user && !clown_check(user))
- return 0
+ return FALSE
- return 1
+ return TRUE
/obj/item/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, targeted = 1)
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index 4ce64a859ec..307964ca25c 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -74,7 +74,7 @@
if(istype(H)) //robots and aliens are unaffected
var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes)
- if(M.stat == DEAD || !eyes || M.disabilities & BLIND) //mob is dead or fully blind
+ if(M.stat == DEAD || !eyes || (BLINDNESS in M.mutations)) //mob is dead or fully blind
to_chat(user, "[M]'s pupils are unresponsive to the light!")
else if((XRAY in M.mutations) || eyes.see_in_dark >= 8) //The mob's either got the X-RAY vision or has a tapetum lucidum (extreme nightvision, i.e. Vulp/Tajara with COLOURBLIND & their monkey forms).
to_chat(user, "[M]'s pupils glow eerily!")
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 6d0f6d1dfe1..0d8873a6377 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -859,11 +859,11 @@ REAGENT SCANNER
dat += "[i.name] | N/A | [i.damage] | [infection]:[mech] | | "
dat += ""
dat += ""
- if(target.disabilities & BLIND)
+ if(BLINDNESS in target.mutations)
dat += "Cataracts detected.
"
- if(target.disabilities & COLOURBLIND)
+ if(COLOURBLIND in target.mutations)
dat += "Photoreceptor abnormalities detected.
"
- if(target.disabilities & NEARSIGHTED)
+ if(NEARSIGHTED in target.mutations)
dat += "Retinal misalignment detected.
"
return dat
diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm
index a13bce6fb61..43178a85ef8 100644
--- a/code/game/objects/items/robot/robot_upgrades.dm
+++ b/code/game/objects/items/robot/robot_upgrades.dm
@@ -74,7 +74,7 @@
R.stat = CONSCIOUS
GLOB.dead_mob_list -= R //please never forget this ever kthx
- GLOB.living_mob_list += R
+ GLOB.alive_mob_list += R
R.notify_ai(1)
return 1
diff --git a/code/game/objects/items/weapons/cigs.dm b/code/game/objects/items/weapons/cigs.dm
index 24c904bc9d3..98a7b769642 100644
--- a/code/game/objects/items/weapons/cigs.dm
+++ b/code/game/objects/items/weapons/cigs.dm
@@ -360,7 +360,7 @@ LIGHTERS ARE IN LIGHTERS.DM
lit = FALSE
icon_state = icon_off
item_state = icon_off
- M.update_inv_wear_mask(0)
+ M.update_inv_wear_mask()
STOP_PROCESSING(SSobj, src)
return
smoke()
diff --git a/code/game/objects/items/weapons/dnascrambler.dm b/code/game/objects/items/weapons/dnascrambler.dm
index c2dc8e285ab..1dcc4a942c2 100644
--- a/code/game/objects/items/weapons/dnascrambler.dm
+++ b/code/game/objects/items/weapons/dnascrambler.dm
@@ -45,7 +45,7 @@
scramble(1, H, 100)
H.real_name = random_name(H.gender, H.dna.species.name) //Give them a name that makes sense for their species.
H.sync_organ_dna(assimilate = 1)
- H.update_body(0)
+ H.update_body()
H.reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
H.reset_markings() //...Or markings.
H.dna.ResetUIFrom(H)
diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm
index 5a3286bfc05..48edcc826e6 100644
--- a/code/game/objects/items/weapons/gift_wrappaper.dm
+++ b/code/game/objects/items/weapons/gift_wrappaper.dm
@@ -49,8 +49,7 @@
to_chat(user, "You cut open the present.")
for(var/mob/M in src) //Should only be one but whatever.
- M.loc = src.loc
- M.reset_perspective(null)
+ M.forceMove(loc)
qdel(src)
diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm
index c3f2e50174b..006de63af17 100644
--- a/code/game/objects/items/weapons/melee/energy.dm
+++ b/code/game/objects/items/weapons/melee/energy.dm
@@ -37,7 +37,7 @@
return BRUTELOSS|FIRELOSS
/obj/item/melee/energy/attack_self(mob/living/carbon/user)
- if(user.disabilities & CLUMSY && prob(50))
+ if((CLUMSY in user.mutations) && prob(50))
to_chat(user, "You accidentally cut yourself with [src], like a doofus!")
user.take_organ_damage(5,5)
active = !active
@@ -290,7 +290,7 @@
if(ishuman(user))
var/mob/living/carbon/human/H = user
- if(H.disabilities & CLUMSY && prob(50))
+ if((CLUMSY in H.mutations) && prob(50))
to_chat(H, "You accidentally cut yourself with [src], like a doofus!")
H.take_organ_damage(10,10)
active = !active
diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm
index 0f25239e4e4..14f3b0ab91f 100644
--- a/code/game/objects/items/weapons/scrolls.dm
+++ b/code/game/objects/items/weapons/scrolls.dm
@@ -100,7 +100,7 @@
break
if(!success)
- user.loc = pick(L)
+ user.forceMove(pick(L))
smoke.start()
src.uses -= 1
diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm
index 362ab601685..19e56e161e3 100644
--- a/code/game/objects/items/weapons/shields.dm
+++ b/code/game/objects/items/weapons/shields.dm
@@ -76,7 +76,7 @@
return (active)
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
- if(user.disabilities & CLUMSY && prob(50))
+ if((CLUMSY in user.mutations) && prob(50))
to_chat(user, "You beat yourself in the head with [src].")
user.take_organ_damage(5)
active = !active
diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm
index 0aa7d976082..55b25ad725a 100644
--- a/code/game/objects/items/weapons/storage/storage.dm
+++ b/code/game/objects/items/weapons/storage/storage.dm
@@ -83,13 +83,14 @@
return
/obj/item/storage/AltClick(mob/user)
- if(Adjacent(user) && !user.incapacitated(FALSE, TRUE, TRUE))
+ if(ishuman(user) && Adjacent(user) && !user.incapacitated(FALSE, TRUE, TRUE))
orient2hud(user)
if(user.s_active)
user.s_active.close(user)
show_to(user)
playsound(loc, "rustle", 50, 1, -5)
add_fingerprint(user)
+ return ..()
/obj/item/storage/proc/return_inv()
diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm
index 501abd4922d..e285c6a0ae9 100644
--- a/code/game/objects/structures/crates_lockers/closets/statue.dm
+++ b/code/game/objects/structures/crates_lockers/closets/statue.dm
@@ -19,7 +19,7 @@
L.buckled = 0
L.anchored = 0
L.forceMove(src)
- L.disabilities += MUTE
+ L.mutations |= MUTE
max_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
intialTox = L.getToxLoss()
intialFire = L.getFireLoss()
@@ -69,7 +69,7 @@
for(var/mob/living/M in src)
M.forceMove(loc)
- M.disabilities -= MUTE
+ M.mutations -= MUTE
M.take_overall_damage((M.health - obj_integrity - 100),0) //any new damage the statue incurred is transfered to the mob
..()
diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
index 7095fd4eeda..8984dc60a52 100644
--- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
+++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
@@ -144,9 +144,7 @@
if(istype(mob, /mob) && mob.client)
// If the pod is not in a tube at all, you can get out at any time.
if(!(locate(/obj/structure/transit_tube) in loc))
- mob.loc = loc
- mob.client.Move(get_step(loc, direction), direction)
- mob.reset_perspective(null)
+ mob.forceMove(loc)
//if(moving && istype(loc, /turf/space))
// Todo: If you get out of a moving pod in space, you should move as well.
@@ -158,9 +156,7 @@
if(!station.pod_moving)
if(direction == station.dir)
if(station.icon_state == "open")
- mob.loc = loc
- mob.client.Move(get_step(loc, direction), direction)
- mob.reset_perspective(null)
+ mob.forceMove(loc)
else
station.open_animation()
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index a529dc3a6e7..87107f97abe 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -411,7 +411,7 @@
M.l_hand.clean_blood()
if(M.back)
if(M.back.clean_blood())
- M.update_inv_back(0)
+ M.update_inv_back()
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/washgloves = 1
@@ -437,38 +437,38 @@
if(H.head)
if(H.head.clean_blood())
- H.update_inv_head(0,0)
+ H.update_inv_head()
if(H.wear_suit)
if(H.wear_suit.clean_blood())
- H.update_inv_wear_suit(0,0)
+ H.update_inv_wear_suit()
else if(H.w_uniform)
if(H.w_uniform.clean_blood())
- H.update_inv_w_uniform(0,0)
+ H.update_inv_w_uniform()
if(H.gloves && washgloves)
if(H.gloves.clean_blood())
- H.update_inv_gloves(0,0)
+ H.update_inv_gloves()
if(H.shoes && washshoes)
if(H.shoes.clean_blood())
- H.update_inv_shoes(0,0)
+ H.update_inv_shoes()
if(H.wear_mask && washmask)
if(H.wear_mask.clean_blood())
- H.update_inv_wear_mask(0)
+ H.update_inv_wear_mask()
if(H.glasses && washglasses)
if(H.glasses.clean_blood())
- H.update_inv_glasses(0)
+ H.update_inv_glasses()
if(H.l_ear && washears)
if(H.l_ear.clean_blood())
- H.update_inv_ears(0)
+ H.update_inv_ears()
if(H.r_ear && washears)
if(H.r_ear.clean_blood())
- H.update_inv_ears(0)
+ H.update_inv_ears()
if(H.belt)
if(H.belt.clean_blood())
- H.update_inv_belt(0)
+ H.update_inv_belt()
else
if(M.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags
if(M.wear_mask.clean_blood())
- M.update_inv_wear_mask(0)
+ M.update_inv_wear_mask()
else
O.clean_blood()
diff --git a/code/game/world.dm b/code/game/world.dm
index 174a1662dd0..c1f6a076677 100644
--- a/code/game/world.dm
+++ b/code/game/world.dm
@@ -267,6 +267,10 @@ GLOBAL_VAR_INIT(world_topic_spam_protect_time, world.timeofday)
/world/Reboot(var/reason, var/feedback_c, var/feedback_r, var/time)
if(reason == 1) //special reboot, do none of the normal stuff
if(usr)
+ if(!check_rights(R_SERVER))
+ message_admins("[key_name_admin(usr)] attempted to restart the server via the Profiler, without access.")
+ log_admin("[key_name(usr)] attempted to restart the server via the Profiler, without access.")
+ return
message_admins("[key_name_admin(usr)] has requested an immediate world restart via client side debugging tools")
log_admin("[key_name(usr)] has requested an immediate world restart via client side debugging tools")
spawn(0)
diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm
index fdf3d0dc8d0..5956819d3d4 100644
--- a/code/modules/admin/admin_ranks.dm
+++ b/code/modules/admin/admin_ranks.dm
@@ -68,6 +68,10 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons
C.holder = null
GLOB.admins.Cut()
+ // Remove all profiler access
+ for(var/A in world.GetConfig("admin"))
+ world.SetConfig("APP/admin", A, null)
+
if(config.admin_legacy_system)
load_admin_ranks()
@@ -98,6 +102,9 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons
//create the admin datum and store it for later use
var/datum/admins/D = new /datum/admins(rank, rights, ckey)
+ if(D.rights & R_DEBUG || D.rights & R_VIEWRUNTIMES) // Grants profiler access to anyone with R_DEBUG or R_VIEWRUNTIMES
+ world.SetConfig("APP/admin", ckey, "role=admin")
+
//find the client for a ckey if they are connected and associate them with the new admin datum
D.associate(GLOB.directory[ckey])
@@ -122,6 +129,9 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons
if(istext(rights)) rights = text2num(rights)
var/datum/admins/D = new /datum/admins(rank, rights, ckey)
+ if(D.rights & R_DEBUG || D.rights & R_VIEWRUNTIMES) // Grants profiler access to anyone with R_DEBUG or R_VIEWRUNTIMES
+ world.SetConfig("APP/admin", ckey, "role=admin")
+
//find the client for a ckey if they are connected and associate them with the new admin datum
D.associate(GLOB.directory[ckey])
if(!GLOB.admin_datums)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 62cb627db17..4e3d2d65f30 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -247,6 +247,8 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
verbs += GLOB.admin_verbs_server
if(holder.rights & R_DEBUG)
verbs += GLOB.admin_verbs_debug
+ spawn(1)
+ control_freak = 0 // Setting control_freak to 0 allows you to use the Profiler and other client-side tools
if(holder.rights & R_POSSESS)
verbs += GLOB.admin_verbs_possess
if(holder.rights & R_PERMISSIONS)
@@ -267,6 +269,9 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
verbs += GLOB.admin_verbs_proccall
if(holder.rights & R_VIEWRUNTIMES)
verbs += /client/proc/view_runtimes
+ spawn(1) // This setting exposes the profiler for people with R_VIEWRUNTIMES. They must still have it set in cfg/admin.txt
+ control_freak = 0
+
/client/proc/remove_admin_verbs()
verbs.Remove(
diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm
index 2a1d03b79aa..0d55840b5b8 100644
--- a/code/modules/admin/player_panel.dm
+++ b/code/modules/admin/player_panel.dm
@@ -2,6 +2,10 @@
/datum/admins/proc/player_panel_new()//The new one
if(!usr.client.holder)
return
+ // This stops the panel from being invoked by mentors who press F7.
+ if(!check_rights(R_ADMIN))
+ message_admins("[key_name_admin(usr)] attempted to invoke player panel without admin rights. If this is a mentor, its a chance they accidentally hit F7. If this is NOT a mentor, there is a high chance an exploit is being used")
+ return
var/dat = "Admin Player Panel"
//javascript, the part that does most of the work~
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 7826a005e7d..1a040d46e90 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -1980,7 +1980,7 @@
to_chat(usr, "ERROR: This mob ([H]) has no mind!")
return
var/list/possible_traitors = list()
- for(var/mob/living/player in GLOB.living_mob_list)
+ for(var/mob/living/player in GLOB.alive_mob_list)
if(player.client && player.mind && player.stat != DEAD && player != H)
if(ishuman(player) && !player.mind.special_role)
if(player.client && (ROLE_TRAITOR in player.client.prefs.be_special) && !jobban_isbanned(player, ROLE_TRAITOR) && !jobban_isbanned(player, "Syndicate"))
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 32dcf3daa7b..c92e100b641 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -716,23 +716,25 @@ GLOBAL_PROTECT(AdminProcCaller)
if(!check_rights(R_DEBUG))
return
- switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Silicons","Clients","Respawnable Mobs"))
+ switch(input("Which list?") in list("Players", "Admins", "Mobs", "Living Mobs", "Alive Mobs", "Dead Mobs", "Silicons", "Clients", "Respawnable Mobs"))
if("Players")
- to_chat(usr, jointext(GLOB.player_list,","))
+ to_chat(usr, jointext(GLOB.player_list, ","))
if("Admins")
- to_chat(usr, jointext(GLOB.admins,","))
+ to_chat(usr, jointext(GLOB.admins, ","))
if("Mobs")
- to_chat(usr, jointext(GLOB.mob_list,","))
+ to_chat(usr, jointext(GLOB.mob_list, ","))
if("Living Mobs")
- to_chat(usr, jointext(GLOB.living_mob_list,","))
+ to_chat(usr, jointext(GLOB.mob_living_list, ","))
+ if("Alive Mobs")
+ to_chat(usr, jointext(GLOB.alive_mob_list, ","))
if("Dead Mobs")
- to_chat(usr, jointext(GLOB.dead_mob_list,","))
+ to_chat(usr, jointext(GLOB.dead_mob_list, ","))
if("Silicons")
- to_chat(usr, jointext(GLOB.silicon_mob_list,","))
+ to_chat(usr, jointext(GLOB.silicon_mob_list, ","))
if("Clients")
- to_chat(usr, jointext(GLOB.clients,","))
+ to_chat(usr, jointext(GLOB.clients, ","))
if("Respawnable Mobs")
- to_chat(usr, jointext(GLOB.respawnable_list,","))
+ to_chat(usr, jointext(GLOB.respawnable_list, ","))
/client/proc/cmd_display_del_log()
set category = "Debug"
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 13a258e4212..a7763f31fb1 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -979,7 +979,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/role_string
var/obj_count = 0
var/obj_string = ""
- for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
+ for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(!isLivingSSD(H))
continue
mins_ssd = round((world.time - H.last_logout) / 600)
@@ -1016,7 +1016,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
msg += "AFK Players:
"
msg += "| Key | Real Name | Job | Mins AFK | Special Role | Area | PPN | Cryo |
"
var/mins_afk
- for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
+ for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(H.client == null || H.stat == DEAD) // No clientless or dead
continue
mins_afk = round(H.client.inactivity / 600)
diff --git a/code/modules/awaymissions/mission_code/ruins/oldstation.dm b/code/modules/awaymissions/mission_code/ruins/oldstation.dm
index e939cf06f32..4d3c54f8f4b 100644
--- a/code/modules/awaymissions/mission_code/ruins/oldstation.dm
+++ b/code/modules/awaymissions/mission_code/ruins/oldstation.dm
@@ -105,7 +105,7 @@
/obj/item/paper/fluff/ruins/oldstation/damagereport
name = "Damage Report"
- info = "*Damage Report*
Alpha Station - Destroyed
Beta Station - Catastrophic Damage. Medical, destroyed. Atmospherics, partially destroyed. Engine Core, destroyed.
Charlie Station - Intact. Loss of oxygen to eastern side of main corridor.
Delta Station - Intact. WARNING: Unknown force occupying Delta Station. Intent unknown. Species unknown. Numbers unknown.
Recommendation - Reestablish station powernet via solar array. Reestablish station atmospherics system to restore air."
+ info = "*Damage Report*
Alpha Station - Destroyed
Beta Station - Catastrophic Damage. Medical, destroyed. Atmospherics, partially destroyed. Engine Core, destroyed.
Charlie Station - Intact. Loss of oxygen to eastern side of main corridor.
Theta Station - Intact. WARNING: Unknown force occupying Theta Station. Intent unknown. Species unknown. Numbers unknown.
Recommendation - Reestablish station powernet via solar array. Reestablish station atmospherics system to restore air."
/obj/item/paper/fluff/ruins/oldstation/protosuit
name = "B01-RIG Hardsuit Report"
@@ -145,7 +145,7 @@
info = "Artificial Program's report to surviving crewmembers.
Crew were placed into cryostasis on March 10th, 2445.
Crew were awoken from cryostasis around June, 2557.
\
SIGNIFICANT EVENTS OF NOTE
1: The primary radiation detectors were taken offline after 112 years due to power failure, secondary radiation detectors showed no residual \
radiation on station. Deduction, primarily detector was malfunctioning and was producing a radiation signal when there was none.
2: A data burst from a nearby Nanotrasen Space \
- Station was received, this data burst contained research data that has been uploaded to our RnD labs.
3: Unknown invasion force has occupied Delta station."
+ Station was received, this data burst contained research data that has been uploaded to our RnD labs.
3: Unknown invasion force has occupied Theta station."
/obj/item/paper/fluff/ruins/oldstation/generator_manual
name = "S.U.P.E.R.P.A.C.M.A.N.-type portable generator manual"
@@ -350,16 +350,16 @@
name = "Charlie Station Security"
icon_state = "red"
-/area/ruin/space/ancientstation/deltacorridor
- name = "Delta Station Main Corridor"
+/area/ruin/space/ancientstation/thetacorridor
+ name = "Theta Station Main Corridor"
icon_state = "green"
/area/ruin/space/ancientstation/proto
- name = "Delta Station Prototype Lab"
+ name = "Theta Station Prototype Lab"
icon_state = "toxlab"
/area/ruin/space/ancientstation/rnd
- name = "Delta Station Research and Development"
+ name = "Theta Station Research and Development"
icon_state = "toxlab"
/area/ruin/space/ancientstation/hivebot
diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm
index ca79a1ea2a6..5aa3e89192f 100644
--- a/code/modules/awaymissions/mission_code/wildwest.dm
+++ b/code/modules/awaymissions/mission_code/wildwest.dm
@@ -173,23 +173,9 @@
to_chat(C, "Death is not your end!")
spawn(rand(800,1200))
- if(C.stat == DEAD)
- GLOB.dead_mob_list -= C
- GLOB.living_mob_list += C
- C.stat = CONSCIOUS
- C.timeofdeath = 0
- C.setToxLoss(0)
- C.setOxyLoss(0)
- C.setCloneLoss(0)
- C.SetParalysis(0)
- C.SetStunned(0)
- C.SetWeakened(0)
- C.radiation = 0
- C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss())
- C.reagents.clear_reagents()
+ C.revive()
to_chat(C, "You have regenerated.")
C.visible_message("[usr] appears to wake from the dead, having healed all wounds.")
- C.update_canmove()
return 1
/obj/item/wildwest_communicator
@@ -247,7 +233,7 @@
used = TRUE
/obj/item/wildwest_communicator/proc/stand_down()
- for(var/mob/living/simple_animal/hostile/syndicate/ranged/wildwest/W in GLOB.living_mob_list)
+ for(var/mob/living/simple_animal/hostile/syndicate/ranged/wildwest/W in GLOB.alive_mob_list)
W.on_alert = FALSE
/mob/living/simple_animal/hostile/syndicate/ranged/wildwest
@@ -262,6 +248,6 @@
// putting this up here so we don't say anything after deathgasp
if(can_die() && !on_alert)
say("How could you betray the Syndicate?")
- for(var/mob/living/simple_animal/hostile/syndicate/ranged/wildwest/W in GLOB.living_mob_list)
+ for(var/mob/living/simple_animal/hostile/syndicate/ranged/wildwest/W in GLOB.alive_mob_list)
W.on_alert = TRUE
return ..(gibbed)
diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm
index a063fafd736..3cd6458afdf 100644
--- a/code/modules/client/client defines.dm
+++ b/code/modules/client/client defines.dm
@@ -20,7 +20,6 @@
var/skip_antag = FALSE //TRUE when a player declines to be included for the selection process of game mode antagonists.
var/move_delay = 1
var/moving = null
- var/adminobs = null
var/area = null
var/time_died_as_mouse = null //when the client last died as a mouse
diff --git a/code/modules/client/preference/preferences_mysql.dm b/code/modules/client/preference/preferences_mysql.dm
index 811d163c955..94f724b77a6 100644
--- a/code/modules/client/preference/preferences_mysql.dm
+++ b/code/modules/client/preference/preferences_mysql.dm
@@ -320,6 +320,10 @@
if(!rlimb_data) src.rlimb_data = list()
if(!loadout_gear) loadout_gear = list()
+ // Check if the current body accessory exists
+ if(!GLOB.body_accessory_by_name[body_accessory])
+ body_accessory = null
+
return 1
/datum/preferences/proc/save_character(client/C)
diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm
index 1b9c87f56e5..011bc60cdc4 100644
--- a/code/modules/clothing/glasses/glasses.dm
+++ b/code/modules/clothing/glasses/glasses.dm
@@ -376,7 +376,6 @@
desc = "Covers the eyes, preventing sight."
icon_state = "blindfold"
item_state = "blindfold"
- //vision_flags = BLIND
flash_protect = 2
tint = 3 //to make them blind
prescription_upgradable = 0
@@ -412,7 +411,7 @@
if(M.glasses == src)
M.EyeBlind(3)
M.EyeBlurry(5)
- if(!(M.disabilities & NEARSIGHTED))
+ if(!(NEARSIGHTED in M.mutations))
M.BecomeNearsighted()
spawn(100)
M.CureNearsighted()
diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm
index 3608ee85164..cd4ac697406 100644
--- a/code/modules/clothing/spacesuits/rig/rig.dm
+++ b/code/modules/clothing/spacesuits/rig/rig.dm
@@ -798,7 +798,7 @@
to_chat(wearer, "You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.")
return
use_obj.forceMove(wearer)
- if(!wearer.equip_to_slot_if_possible(use_obj, equip_to, 0, 1))
+ if(!wearer.equip_to_slot_if_possible(use_obj, equip_to, FALSE, TRUE))
use_obj.forceMove(src)
else
if(wearer)
diff --git a/code/modules/clothing/suits/hood.dm b/code/modules/clothing/suits/hood.dm
index 83f0fcfc211..be05ced4fd8 100644
--- a/code/modules/clothing/suits/hood.dm
+++ b/code/modules/clothing/suits/hood.dm
@@ -59,7 +59,7 @@
if(H.head)
to_chat(H,"You're already wearing something on your head!")
return
- else if(H.equip_to_slot_if_possible(hood, slot_head, 0, 0, 1))
+ else if(H.equip_to_slot_if_possible(hood, slot_head, FALSE, FALSE))
suit_adjusted = 1
icon_state = "[initial(icon_state)]_hood"
H.update_inv_wear_suit()
diff --git a/code/modules/clothing/suits/toggles.dm b/code/modules/clothing/suits/toggles.dm
index c329d8a0033..7e1a993fca4 100644
--- a/code/modules/clothing/suits/toggles.dm
+++ b/code/modules/clothing/suits/toggles.dm
@@ -68,7 +68,7 @@
if(H.head)
to_chat(H, "You're already wearing something on your head!")
return
- else if(H.equip_to_slot_if_possible(helmet, slot_head, 0 ,0, 1))
+ else if(H.equip_to_slot_if_possible(helmet, slot_head, FALSE, FALSE))
to_chat(H, "You engage the helmet on the hardsuit.")
suittoggled = TRUE
H.update_inv_wear_suit()
diff --git a/code/modules/events/apc_overload.dm b/code/modules/events/apc_overload.dm
new file mode 100644
index 00000000000..a773e71a173
--- /dev/null
+++ b/code/modules/events/apc_overload.dm
@@ -0,0 +1,63 @@
+#define APC_BREAK_PROBABILITY 25 // the probability that a given APC will be broken
+
+/datum/event/apc_overload
+ var/const/announce_after_mc_ticks = 5
+ var/const/delayed = FALSE
+ var/const/event_max_duration_mc_ticks = announce_after_mc_ticks * 2
+ var/const/event_min_duration_mc_ticks = announce_after_mc_ticks
+
+ announceWhen = announce_after_mc_ticks
+
+/datum/event/apc_overload/setup()
+ endWhen = rand(event_min_duration_mc_ticks, event_max_duration_mc_ticks)
+
+/datum/event/apc_overload/start()
+ apc_overload_failure(announce=delayed)
+ var/sound/S = sound('sound/effects/powerloss.ogg')
+ for(var/mob/living/M in GLOB.player_list)
+ var/turf/T = get_turf(M)
+ if(!M.client || !is_station_level(T.z))
+ continue
+ SEND_SOUND(M, S)
+
+/datum/event/apc_overload/announce()
+ GLOB.event_announcement.Announce("Overload detected in [station_name()]'s powernet. Engineering, please check all underfloor APC terminals.", "Critical Power Failure", new_sound = 'sound/AI/apc_overload.ogg')
+
+/datum/event/apc_overload/end()
+ return TRUE
+
+/proc/apc_overload_failure(announce=TRUE)
+ var/list/skipped_areas_apc = list(
+ /area/engine/engineering,
+ /area/turret_protected/ai)
+
+ if(announce)
+ GLOB.event_announcement.Announce("Overload detected in [station_name()]'s powernet. Engineering, please check all underfloor APC terminals.", "Critical Power Failure", new_sound = 'sound/AI/apc_overload.ogg')
+
+ // break APC_BREAK_PROBABILITY% of all of the APCs on the station
+ var/affected_apc_count = 0
+ for(var/obj/machinery/power/apc/C in GLOB.apcs)
+ // skip any APCs that are too critical to break
+ var/area/current_area = get_area(C)
+ if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
+ continue
+ // if we are going to break this one
+ if(prob(APC_BREAK_PROBABILITY))
+ // if it has a cell, drain all the charge from the cell
+ if(C.cell)
+ C.cell.charge = 0
+ // if it has a terminal, disconnect and delete the terminal
+ if(C.terminal)
+ var/obj/machinery/power/terminal/T = C.terminal
+ C.terminal.master = null
+ C.terminal = null
+ qdel(T)
+ // if it was operating, toggle off the breaker
+ if(C.operating)
+ C.toggle_breaker()
+ // no matter what, ensure the area knows something happened to the power
+ current_area.power_change()
+ affected_apc_count++
+ log_and_message_admins("APC Overload event deleted [affected_apc_count] underfloor APC terminals.")
+
+#undef APC_BREAK_PROBABILITY
diff --git a/code/modules/events/apc_short.dm b/code/modules/events/apc_short.dm
new file mode 100644
index 00000000000..b128fe6c2e9
--- /dev/null
+++ b/code/modules/events/apc_short.dm
@@ -0,0 +1,78 @@
+#define APC_BREAK_PROBABILITY 25 // the probability that a given APC will be disabled
+
+/datum/event/apc_short
+ var/const/announce_after_mc_ticks = 5
+ var/const/delayed = FALSE
+ var/const/event_max_duration_mc_ticks = announce_after_mc_ticks * 2
+ var/const/event_min_duration_mc_ticks = announce_after_mc_ticks
+
+ announceWhen = announce_after_mc_ticks
+
+/datum/event/apc_short/setup()
+ endWhen = rand(event_min_duration_mc_ticks, event_max_duration_mc_ticks)
+
+/datum/event/apc_short/start()
+ power_failure(announce=delayed)
+ var/sound/S = sound('sound/effects/powerloss.ogg')
+ for(var/mob/living/M in GLOB.player_list)
+ var/turf/T = get_turf(M)
+ if(!M.client || !is_station_level(T.z))
+ continue
+ SEND_SOUND(M, S)
+
+/datum/event/apc_short/announce()
+ GLOB.event_announcement.Announce("Overload detected in [station_name()]'s powernet. Engineering, please repair shorted APCs.", "Systems Power Failure", new_sound = 'sound/AI/apc_short.ogg')
+
+/datum/event/apc_short/end()
+ return TRUE
+
+/proc/power_failure(announce=TRUE)
+ var/list/skipped_areas_apc = list(
+ /area/engine/engineering,
+ /area/turret_protected/ai)
+
+ if(announce)
+ GLOB.event_announcement.Announce("Overload detected in [station_name()]'s powernet. Engineering, please repair shorted APCs.", "Systems Power Failure", new_sound = 'sound/AI/apc_short.ogg')
+
+ // break APC_BREAK_PROBABILITY% of all of the APCs on the station
+ var/affected_apc_count = 0
+ for(var/obj/machinery/power/apc/C in GLOB.apcs)
+ // skip any APCs that are too critical to disable
+ var/area/current_area = get_area(C)
+ if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
+ continue
+ // if we are going to break this one
+ if(prob(APC_BREAK_PROBABILITY))
+ // if it has internal wires, cut the power wires
+ if(C.wires)
+ if(!C.wires.IsIndexCut(APC_WIRE_MAIN_POWER1))
+ C.wires.CutWireIndex(APC_WIRE_MAIN_POWER1)
+ if(!C.wires.IsIndexCut(APC_WIRE_MAIN_POWER2))
+ C.wires.CutWireIndex(APC_WIRE_MAIN_POWER2)
+ // if it was operating, toggle off the breaker
+ if(C.operating)
+ C.toggle_breaker()
+ // no matter what, ensure the area knows something happened to the power
+ current_area.power_change()
+ affected_apc_count++
+ log_and_message_admins("APC Short event shorted out [affected_apc_count] APCs.")
+
+/proc/power_restore(announce=TRUE)
+ power_restore_quick(announce)
+
+/proc/power_restore_quick(announce=TRUE)
+ if(announce)
+ GLOB.event_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
+
+ // fix all of the SMESs
+ for(var/obj/machinery/power/smes/S in GLOB.machines)
+ if(!is_station_level(S.z))
+ continue
+ S.charge = S.capacity
+ S.output_level = S.output_level_max
+ S.output_attempt = 1
+ S.input_attempt = 1
+ S.update_icon()
+ S.power_change()
+
+#undef APC_BREAK_PROBABILITY
diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm
index 291ae55c743..1bc00c93025 100644
--- a/code/modules/events/disease_outbreak.dm
+++ b/code/modules/events/disease_outbreak.dm
@@ -1,43 +1,36 @@
/datum/event/disease_outbreak
announceWhen = 15
-
- var/datum/disease/advance/virus_type
+ var/datum/disease/D
/datum/event/disease_outbreak/setup()
announceWhen = rand(15, 30)
+ if(prob(25))
+ var/virus_type = pick(/datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis, /datum/disease/beesease, /datum/disease/anxiety, /datum/disease/fake_gbs, /datum/disease/fluspanish, /datum/disease/pierrot_throat, /datum/disease/lycan)
+ D = new virus_type()
+ else
+ var/datum/disease/advance/A = new /datum/disease/advance
+ A.name = capitalize(pick(GLOB.adjectives)) + " " + capitalize(pick(GLOB.nouns + GLOB.verbs)) // random silly name
+ A.GenerateSymptoms(1,9,6)
+ A.AssignProperties(list("resistance" = rand(0,11), "stealth" = rand(0,2), "stage_rate" = rand(0,5), "transmittable" = rand(0,5), "severity" = rand(0,10)))
+ D = A
+
+ D.carrier = TRUE
/datum/event/disease_outbreak/announce()
GLOB.event_announcement.Announce("Confirmed outbreak of level 7 major viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
/datum/event/disease_outbreak/start()
- if(prob(25))
- virus_type = pick(/datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis, /datum/disease/beesease, /datum/disease/anxiety, /datum/disease/fake_gbs, /datum/disease/fluspanish, /datum/disease/pierrot_throat, /datum/disease/lycan)
- else
- virus_type = new /datum/disease/advance
- virus_type.name = capitalize(pick(GLOB.adjectives)) + " " + capitalize(pick(GLOB.nouns,GLOB.verbs)) // random silly name
- virus_type.GenerateSymptoms(1,9,6)
- virus_type.AssignProperties(list("resistance" = rand(0,11), "stealth" = rand(0,2), "stage_rate" = rand(0,5), "transmittable" = rand(0,5), "severity" = rand(0,10)))
- for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
- if(issmall(H)) //don't infect monkies; that's a waste
- continue
+ for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
if(!H.client)
continue
- if(VIRUSIMMUNE in H.dna.species.species_traits) //don't let virus immune things get diseases they're not supposed to get.
+ if(issmall(H)) //don't infect monkies; that's a waste
continue
var/turf/T = get_turf(H)
if(!T)
continue
if(!is_station_level(T.z))
continue
- var/foundAlready = FALSE // don't infect someone that already has the virus
- for(var/thing in H.viruses)
- foundAlready = TRUE
- break
- if(H.stat == DEAD || foundAlready)
- continue
- var/datum/disease/advance/D
- D = virus_type
- D.carrier = TRUE
- H.AddDisease(D)
+ if(!H.ForceContractDisease(D))
+ continue
break
diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm
index 9c744b8060a..908bc762315 100644
--- a/code/modules/events/event_container.dm
+++ b/code/modules/events/event_container.dm
@@ -128,7 +128,7 @@ GLOBAL_LIST_EMPTY(event_last_fired)
/datum/event_container/mundane
severity = EVENT_LEVEL_MUNDANE
available_events = list(
- // Severity level, event name, even type, base weight, role weights, one shot, min weight, max weight. Last two only used if set and non-zero
+ // Severity level, event name, event type, base weight, role weights, one shot, min weight, max weight. Last two only used if set and non-zero
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Nothing", /datum/event/nothing, 1100),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "PDA Spam", /datum/event/pda_spam, 0, list(ASSIGNMENT_ANY = 4), 0, 25, 50),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Lotto", /datum/event/money_lotto, 0, list(ASSIGNMENT_ANY = 1), 1, 5, 15),
@@ -157,7 +157,7 @@ GLOBAL_LIST_EMPTY(event_last_fired)
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 100)),
//new /datum/event_meta(EVENT_LEVEL_MODERATE, "Virology Breach", /datum/event/prison_break/virology, 0, list(ASSIGNMENT_MEDICAL = 100)),
//new /datum/event_meta(EVENT_LEVEL_MODERATE, "Xenobiology Breach", /datum/event/prison_break/xenobiology, 0, list(ASSIGNMENT_SCIENCE = 100)),
- new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 200, list(ASSIGNMENT_ENGINEER = 60)),
+ new /datum/event_meta(EVENT_LEVEL_MODERATE, "APC Short", /datum/event/apc_short, 200, list(ASSIGNMENT_ENGINEER = 60)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 250, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_JANITOR = 150)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 25, list(ASSIGNMENT_MEDICAL = 50), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), 1),
@@ -191,6 +191,7 @@ GLOBAL_LIST_EMPTY(event_last_fired)
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Nothing", /datum/event/nothing, 1320),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, 0, list(ASSIGNMENT_SECURITY = 3), 1),
//new /datum/event_meta(EVENT_LEVEL_MAJOR, "Containment Breach", /datum/event/prison_break/station, 0, list(ASSIGNMENT_ANY = 5)),
+ new /datum/event_meta(EVENT_LEVEL_MAJOR, "APC Overload", /datum/event/apc_overload, 0),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, 0, list(ASSIGNMENT_ENGINEER = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 5), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Abductor Visit", /datum/event/abductor, 80, is_one_shot = 1),
diff --git a/code/modules/events/grid_check.dm b/code/modules/events/grid_check.dm
deleted file mode 100644
index 8da2a6d707e..00000000000
--- a/code/modules/events/grid_check.dm
+++ /dev/null
@@ -1,82 +0,0 @@
-/datum/event/grid_check //NOTE: Times are measured in master controller ticks!
- announceWhen = 5
-
-/datum/event/grid_check/setup()
- endWhen = rand(30,120)
-
-/datum/event/grid_check/start()
- power_failure(0)
- var/sound/S = sound('sound/effects/powerloss.ogg')
- for(var/mob/living/M in GLOB.player_list)
- var/turf/T = get_turf(M)
- if(!M.client || !is_station_level(T.z))
- continue
- SEND_SOUND(M, S)
-
-/datum/event/grid_check/announce()
- GLOB.event_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check", new_sound = 'sound/AI/poweroff.ogg')
-
-/datum/event/grid_check/end()
- power_restore()
-
-/proc/power_failure(var/announce = 1)
- if(announce)
- GLOB.event_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", new_sound = 'sound/AI/poweroff.ogg')
-
- var/list/skipped_areas = list(/area/turret_protected/ai)
- var/list/skipped_areas_apc = list(/area/engine/engineering)
-
- for(var/obj/machinery/power/smes/S in GLOB.machines)
- var/area/current_area = get_area(S)
- if((current_area.type in skipped_areas) || !is_station_level(S.z))
- continue
- S.last_charge = S.charge
- S.last_output_attempt = S.output_attempt
- S.last_input_attempt = S.input_attempt
- S.charge = 0
- S.inputting(0)
- S.outputting(0)
- S.update_icon()
- S.power_change()
-
- for(var/obj/machinery/power/apc/C in GLOB.apcs)
- var/area/current_area = get_area(C)
- if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
- continue
- if(C.cell)
- C.cell.charge = 0
-
-/proc/power_restore(var/announce = 1)
- var/list/skipped_areas = list(/area/turret_protected/ai)
- var/list/skipped_areas_apc = list(/area/engine/engineering)
-
- if(announce)
- GLOB.event_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
- for(var/obj/machinery/power/apc/C in GLOB.apcs)
- var/area/current_area = get_area(C)
- if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
- continue
- if(C.cell)
- C.cell.charge = C.cell.maxcharge
- for(var/obj/machinery/power/smes/S in GLOB.machines)
- var/area/current_area = get_area(S)
- if((current_area.type in skipped_areas) || !is_station_level(S.z))
- continue
- S.charge = S.last_charge
- S.output_attempt = S.last_output_attempt
- S.input_attempt = S.last_input_attempt
- S.update_icon()
- S.power_change()
-
-/proc/power_restore_quick(var/announce = 1)
- if(announce)
- GLOB.event_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
- for(var/obj/machinery/power/smes/S in GLOB.machines)
- if(!is_station_level(S.z))
- continue
- S.charge = S.capacity
- S.output_level = S.output_level_max
- S.output_attempt = 1
- S.input_attempt = 1
- S.update_icon()
- S.power_change()
diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm
index 021004c6ee9..90718ef2928 100644
--- a/code/modules/events/ion_storm.dm
+++ b/code/modules/events/ion_storm.dm
@@ -22,7 +22,7 @@
/datum/event/ion_storm/start()
//AI laws
- for(var/mob/living/silicon/ai/M in GLOB.living_mob_list)
+ for(var/mob/living/silicon/ai/M in GLOB.alive_mob_list)
if(M.stat != DEAD && M.see_in_dark != FALSE)
var/message = generate_ion_law(ionMessage)
if(message)
diff --git a/code/modules/events/mass_hallucination.dm b/code/modules/events/mass_hallucination.dm
index 6aceefcd41a..196642ce39c 100644
--- a/code/modules/events/mass_hallucination.dm
+++ b/code/modules/events/mass_hallucination.dm
@@ -2,7 +2,7 @@
announceWhen = rand(0, 20)
/datum/event/mass_hallucination/start()
- for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
+ for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
var/armor = H.getarmor(type = "rad")
if((RADIMMUNE in H.dna.species.species_traits) || armor >= 75) // Leave radiation-immune species/rad armored players completely unaffected
continue
diff --git a/code/modules/events/sentience.dm b/code/modules/events/sentience.dm
index 4dfe181bdb5..918746f4595 100644
--- a/code/modules/events/sentience.dm
+++ b/code/modules/events/sentience.dm
@@ -8,7 +8,7 @@
var/list/potential = list()
var/sentience_type = SENTIENCE_ORGANIC
- for(var/mob/living/simple_animal/L in GLOB.living_mob_list)
+ for(var/mob/living/simple_animal/L in GLOB.alive_mob_list)
var/turf/T = get_turf(L)
if (T.z != 1)
continue
diff --git a/code/modules/events/spontaneous_appendicitis.dm b/code/modules/events/spontaneous_appendicitis.dm
index fb9c146d7cd..53923f4d124 100644
--- a/code/modules/events/spontaneous_appendicitis.dm
+++ b/code/modules/events/spontaneous_appendicitis.dm
@@ -1,5 +1,5 @@
/datum/event/spontaneous_appendicitis/start()
- for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
+ for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
if(issmall(H)) //don't infect monkies; that's a waste.
continue
if(!H.client)
diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm
index 32e209f98f6..51ac13d4e13 100644
--- a/code/modules/flufftext/Hallucination.dm
+++ b/code/modules/flufftext/Hallucination.dm
@@ -460,7 +460,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
target = T
var/image/A = null
var/kind = force_kind ? force_kind : pick("clown", "corgi", "carp", "skeleton", "demon","zombie")
- for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
+ for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(H == target)
continue
if(skip_nearby && (H in view(target)))
@@ -539,7 +539,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
var/mob/living/carbon/human/clone = null
var/clone_weapon = null
- for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
+ for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(H.stat || H.lying)
continue
clone = H
@@ -751,7 +751,7 @@ GLOBAL_LIST_INIT(non_fakeattack_weapons, list(/obj/item/gun/projectile, /obj/ite
target.client.images.Remove(speech_overlay)
else // Radio talk
var/list/humans = list()
- for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
+ for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
humans += H
person = pick(humans)
target.hear_radio(message_to_multilingual(pick(radio_messages), pick(person.languages)), speaker = person, part_a = "\[[get_frequency_name(PUB_FREQ)]\] ", part_b = " ")
diff --git a/code/modules/karma/karma.dm b/code/modules/karma/karma.dm
index cccf9977ad6..f7d8b12f80c 100644
--- a/code/modules/karma/karma.dm
+++ b/code/modules/karma/karma.dm
@@ -4,9 +4,9 @@
proc/sql_report_karma(var/mob/spender, var/mob/receiver)
var/sqlspendername = sanitizeSQL(spender.name)
- var/sqlspenderkey = spender.ckey
+ var/sqlspenderkey = sanitizeSQL(spender.ckey)
var/sqlreceivername = sanitizeSQL(receiver.name)
- var/sqlreceiverkey = receiver.ckey
+ var/sqlreceiverkey = sanitizeSQL(receiver.ckey)
var/sqlreceiverrole = "None"
var/sqlreceiverspecial = "None"
@@ -28,7 +28,7 @@ proc/sql_report_karma(var/mob/spender, var/mob/receiver)
log_game("SQL ERROR during karma logging. Error : \[[err]\]\n")
- query = GLOB.dbcon.NewQuery("SELECT * FROM [format_table_name("karmatotals")] WHERE byondkey='[receiver.ckey]'")
+ query = GLOB.dbcon.NewQuery("SELECT * FROM [format_table_name("karmatotals")] WHERE byondkey='[sqlreceiverkey]'")
query.Execute()
var/karma
@@ -38,7 +38,7 @@ proc/sql_report_karma(var/mob/spender, var/mob/receiver)
karma = text2num(query.item[3])
if(karma == null)
karma = 1
- query = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("karmatotals")] (byondkey, karma) VALUES ('[receiver.ckey]', [karma])")
+ query = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("karmatotals")] (byondkey, karma) VALUES ('[sqlreceiverkey]', [karma])")
if(!query.Execute())
var/err = query.ErrorMsg()
log_game("SQL ERROR during karmatotal logging (adding new key). Error : \[[err]\]\n")
@@ -168,11 +168,12 @@ GLOBAL_LIST_EMPTY(karma_spenders)
/client/proc/verify_karma()
var/currentkarma = 0
+ var/sanitzedkey = sanitizeSQL(src.ckey)
if(!GLOB.dbcon.IsConnected())
to_chat(usr, "Unable to connect to karma database. Please try again later.
")
return
else
- var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT karma, karmaspent FROM [format_table_name("karmatotals")] WHERE byondkey='[src.ckey]'")
+ var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT karma, karmaspent FROM [format_table_name("karmatotals")] WHERE byondkey='[sanitzedkey]'")
query.Execute()
var/totalkarma
@@ -195,6 +196,24 @@ GLOBAL_LIST_EMPTY(karma_spenders)
karmashopmenu()
/client/proc/karmashopmenu()
+ var/sanitzedkey = sanitizeSQL(usr.ckey)
+ var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT * FROM [format_table_name("whitelist")] WHERE ckey='[sanitzedkey]'")
+ query.Execute()
+
+ var/list/joblist
+ var/list/specieslist
+ var/dbjob
+ var/dbspecies
+ var/dbckey
+ while(query.NextRow())
+ dbckey = query.item[2]
+ dbjob = query.item[3]
+ dbspecies = query.item[4]
+
+ if(dbckey)
+ joblist = splittext(dbjob,",")
+ specieslist = splittext(dbspecies,",")
+
var/dat = ""
dat += "Job Unlocks"
dat += "Species Unlocks"
@@ -202,28 +221,69 @@ GLOBAL_LIST_EMPTY(karma_spenders)
dat += ""
dat += "
"
+ var/currentkarma = verify_karma()
+ dat += "You have [currentkarma] available.
"
+
switch(karma_tab)
if(0) // Job Unlocks
- dat += {"
- Unlock Barber -- 5KP
- Unlock Brig Physician -- 5KP
- Unlock Nanotrasen Representative -- 30KP
- Unlock Blueshield -- 30KP
- Unlock Security Pod Pilot -- 30KP
- Unlock Mechanic -- 30KP
- Unlock Magistrate -- 45KP
- "}
+ if(!("Barber" in joblist))
+ dat += "Unlock Barber -- 5KP
"
+ else
+ dat += "Barber - Unlocked
"
+ if(!("Brig Physican" in joblist))
+ dat += "Unlock Brig Physician -- 5KP
"
+ else
+ dat += "Brig Physician - Unlocked
"
+ if(!("Nanotrasen Representative" in joblist))
+ dat += "Unlock Nanotrasen Representative -- 30KP
"
+ else
+ dat += "Nanotrasen Representative - Unlocked
"
+ if(!("Blueshield" in joblist))
+ dat += "Unlock Blueshield -- 30KP
"
+ else
+ dat += "Blueshield - Unlocked
"
+ if(!("Security Pod Pilot" in joblist))
+ dat += "Unlock Security Pod Pilot -- 30KP
"
+ else
+ dat += "Security Pod Pilot - Unlocked
"
+ if(!("Mechanic" in joblist))
+ dat += "Unlock Mechanic -- 30KP
"
+ else
+ dat += "Mechanic - Unlocked
"
+ if(!("Magistrate" in joblist))
+ dat += "Unlock Magistrate -- 45KP
"
+ else
+ dat+= "Magistrate - Unlocked
"
if(1) // Species Unlocks
- dat += {"
- Unlock Machine People -- 15KP
- Unlock Kidan -- 30KP
- Unlock Grey -- 30KP
- Unlock Drask -- 30KP
- Unlock Vox -- 45KP
- Unlock Slime People -- 45KP
- Unlock Plasmaman -- 45KP
- "}
+ if(!("Machine" in specieslist))
+ dat += "Unlock Machine People -- 15KP
"
+ else
+ dat += "Machine People - Unlocked
"
+ if(!("Kidan" in specieslist))
+ dat += "Unlock Kidan -- 30KP
"
+ else
+ dat += "Kidan - Unlocked
"
+ if(!("Grey" in specieslist))
+ dat += "Unlock Grey -- 30KP
"
+ else
+ dat += "Grey - Unlocked
"
+ if(!("Drask" in specieslist))
+ dat += "Unlock Drask -- 30KP
"
+ else
+ dat += "Drask - Unlocked
"
+ if(!("Vox" in specieslist))
+ dat += "Unlock Vox -- 45KP
"
+ else
+ dat += "Vox - Unlocked
"
+ if(!("Slime People" in specieslist))
+ dat += "Unlock Slime People -- 45KP
"
+ else
+ dat += "Slime People - Unlocked
"
+ if(!("Plasmaman" in specieslist))
+ dat += "Unlock Plasmaman -- 45KP
"
+ else
+ dat += "Plasmaman - Unlocked
"
if(2) // Karma Refunds
var/list/refundable = list()
@@ -283,11 +343,14 @@ GLOBAL_LIST_EMPTY(karma_spenders)
name = DBname
if(category == "job")
DB_job_unlock(name,price)
+ karmashopmenu()
else if(category == "species")
DB_species_unlock(name,price)
+ karmashopmenu()
/client/proc/DB_job_unlock(var/job,var/cost)
- var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT * FROM [format_table_name("whitelist")] WHERE ckey='[usr.ckey]'")
+ var/sanitzedkey = sanitizeSQL(usr.ckey)
+ var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT * FROM [format_table_name("whitelist")] WHERE ckey='[sanitzedkey]'")
query.Execute()
var/dbjob
@@ -296,7 +359,7 @@ GLOBAL_LIST_EMPTY(karma_spenders)
dbckey = query.item[2]
dbjob = query.item[3]
if(!dbckey)
- query = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("whitelist")] (ckey, job) VALUES ('[usr.ckey]','[job]')")
+ query = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("whitelist")] (ckey, job) VALUES ('[sanitzedkey]','[job]')")
if(!query.Execute())
queryErrorLog(query.ErrorMsg(),"adding new key")
return
@@ -323,7 +386,8 @@ GLOBAL_LIST_EMPTY(karma_spenders)
return
/client/proc/DB_species_unlock(var/species,var/cost)
- var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT * FROM [format_table_name("whitelist")] WHERE ckey='[usr.ckey]'")
+ var/sanitzedkey = sanitizeSQL(usr.ckey)
+ var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT * FROM [format_table_name("whitelist")] WHERE ckey='[sanitzedkey]'")
query.Execute()
var/dbspecies
@@ -332,7 +396,7 @@ GLOBAL_LIST_EMPTY(karma_spenders)
dbckey = query.item[2]
dbspecies = query.item[4]
if(!dbckey)
- query = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("whitelist")] (ckey, species) VALUES ('[usr.ckey]','[species]')")
+ query = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("whitelist")] (ckey, species) VALUES ('[sanitzedkey]','[species]')")
if(!query.Execute())
queryErrorLog(query.ErrorMsg(),"adding new key")
return
@@ -359,7 +423,8 @@ GLOBAL_LIST_EMPTY(karma_spenders)
return
/client/proc/karmacharge(var/cost,var/refund = FALSE)
- var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT * FROM [format_table_name("karmatotals")] WHERE byondkey='[usr.ckey]'")
+ var/sanitzedkey = sanitizeSQL(usr.ckey)
+ var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT * FROM [format_table_name("karmatotals")] WHERE byondkey='[sanitzedkey]'")
query.Execute()
while(query.NextRow())
@@ -368,7 +433,7 @@ GLOBAL_LIST_EMPTY(karma_spenders)
spent -= cost
else
spent += cost
- query = GLOB.dbcon.NewQuery("UPDATE [format_table_name("karmatotals")] SET karmaspent=[spent] WHERE byondkey='[usr.ckey]'")
+ query = GLOB.dbcon.NewQuery("UPDATE [format_table_name("karmatotals")] SET karmaspent=[spent] WHERE byondkey='[sanitzedkey]'")
if(!query.Execute())
queryErrorLog(query.ErrorMsg(),"updating existing entry")
return
@@ -378,6 +443,7 @@ GLOBAL_LIST_EMPTY(karma_spenders)
return
/client/proc/karmarefund(var/type,var/name,var/cost)
+ var/sanitzedkey = sanitizeSQL(usr.ckey)
switch(name)
if("Tajaran Ambassador","Unathi Ambassador","Skrell Ambassador","Diona Ambassador","Kidan Ambassador",
"Slime People Ambassador","Grey Ambassador","Vox Ambassador","Customs Officer")
@@ -388,7 +454,7 @@ GLOBAL_LIST_EMPTY(karma_spenders)
to_chat(usr, "That job is not refundable.")
return
- var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT * FROM [format_table_name("whitelist")] WHERE ckey='[usr.ckey]'")
+ var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT * FROM [format_table_name("whitelist")] WHERE ckey='[sanitzedkey]'")
query.Execute()
var/dbjob
@@ -431,7 +497,8 @@ GLOBAL_LIST_EMPTY(karma_spenders)
message_admins("SQL ERROR during whitelist logging ([errType]]). Error : \[[err]\]\n")
/client/proc/checkpurchased(var/name = null) // If the first parameter is null, return a full list of purchases
- var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT * FROM [format_table_name("whitelist")] WHERE ckey='[usr.ckey]'")
+ var/sanitzedkey = sanitizeSQL(usr.ckey)
+ var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT * FROM [format_table_name("whitelist")] WHERE ckey='[sanitzedkey]'")
query.Execute()
var/dbjob
diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm
index 64e7cba86cd..478438c47cb 100644
--- a/code/modules/martial_arts/martial.dm
+++ b/code/modules/martial_arts/martial.dm
@@ -227,7 +227,7 @@
/obj/item/twohanded/bostaff/attack(mob/target, mob/living/user)
add_fingerprint(user)
- if((CLUMSY in user.disabilities) && prob(50))
+ if((CLUMSY in user.mutations) && prob(50))
to_chat(user, "You club yourself over the head with [src].")
user.Weaken(3)
if(ishuman(user))
diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm
index ac4d6a1e551..0bde4d95464 100644
--- a/code/modules/mining/lavaland/loot/colossus_loot.dm
+++ b/code/modules/mining/lavaland/loot/colossus_loot.dm
@@ -306,7 +306,7 @@
if(H.stat == DEAD)
H.set_species(/datum/species/shadow)
H.revive()
- H.disabilities |= NOCLONE //Free revives, but significantly limits your options for reviving except via the crystal
+ H.mutations |= NOCLONE //Free revives, but significantly limits your options for reviving except via the crystal
H.grab_ghost(force = TRUE)
/obj/machinery/anomalous_crystal/helpers //Lets ghost spawn as helpful creatures that can only heal people slightly. Incredibly fragile and they can't converse with humans
@@ -458,7 +458,7 @@
if(isliving(A) && holder_animal)
var/mob/living/L = A
L.notransform = 1
- L.disabilities |= MUTE
+ L.mutations |= MUTE
L.status_flags |= GODMODE
L.mind.transfer_to(holder_animal)
var/obj/effect/proc_holder/spell/targeted/exit_possession/P = new /obj/effect/proc_holder/spell/targeted/exit_possession
@@ -468,7 +468,7 @@
/obj/structure/closet/stasis/dump_contents(var/kill = 1)
STOP_PROCESSING(SSobj, src)
for(var/mob/living/L in src)
- L.disabilities &= ~MUTE
+ L.mutations -=MUTE
L.status_flags &= ~GODMODE
L.notransform = 0
if(holder_animal && !QDELETED(holder_animal))
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 91a57e1ccbe..dc7c2b4439e 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -91,10 +91,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
..()
/mob/dead/observer/Destroy()
- if(ismob(following))
- var/mob/M = following
- M.following_mobs -= src
- following = null
if(ghostimage)
GLOB.ghost_images -= ghostimage
QDEL_NULL(ghostimage)
@@ -142,13 +138,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
Transfer_mind is there to check if mob is being deleted/not going to have a body.
Works together with spawning an observer, noted above.
*/
-/mob/dead/observer/Life(seconds, times_fired)
- ..()
- if(!loc) return
- if(!client) return 0
-
-
-
/mob/dead/proc/assess_targets(list/target_list, mob/dead/observer/U)
var/client/C = U.client
for(var/mob/living/carbon/human/target in target_list)
@@ -477,28 +466,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
setDir(2)//reset dir so the right directional sprites show up
return ..()
-/mob/proc/update_following()
- . = get_turf(src)
- for(var/mob/dead/observer/M in following_mobs)
- if(M.following != src)
- following_mobs -= M
- else
- if(M.loc != .)
- M.forceMove(.)
-
-/mob
- var/list/following_mobs = list()
-
-/mob/Move()
- . = ..()
- if(.)
- update_following()
-
-/mob/Life(seconds, times_fired)
- // to catch teleports etc which directly set loc
- update_following()
- return ..()
-
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
set category = "Ghost"
set name = "Jump to Mob"
diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm
index ee9a3c3cca2..f89d19afaac 100644
--- a/code/modules/mob/holder.dm
+++ b/code/modules/mob/holder.dm
@@ -22,7 +22,6 @@
var/atom/movable/mob_container
mob_container = M
mob_container.forceMove(get_turf(src))
- M.reset_perspective()
qdel(src)
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index 6d96d77c321..8f4f4dbb2da 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -214,9 +214,9 @@
if(M.equip_to_appropriate_slot(src))
if(M.hand)
- M.update_inv_l_hand(0)
+ M.update_inv_l_hand()
else
- M.update_inv_r_hand(0)
+ M.update_inv_r_hand()
return 1
if(M.s_active && M.s_active.can_be_inserted(src, 1)) //if storage active insert there
diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm
index 8445dec51ee..7f3a7049558 100644
--- a/code/modules/mob/language.dm
+++ b/code/modules/mob/language.dm
@@ -619,7 +619,7 @@
var/message_start_dead = "[name], [speaker.name] ([ghost_follow_link(speaker, ghost=M)])"
M.show_message("[message_start_dead] [message_body]", 2)
- for(var/mob/living/S in GLOB.living_mob_list)
+ for(var/mob/living/S in GLOB.alive_mob_list)
if(drone_only && !istype(S,/mob/living/silicon/robot/drone))
continue
else if(isAI(S))
diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm
index 1b85c3e5386..247e0bcbab2 100644
--- a/code/modules/mob/living/carbon/alien/alien.dm
+++ b/code/modules/mob/living/carbon/alien/alien.dm
@@ -26,6 +26,8 @@
var/death_sound = 'sound/voice/hiss6.ogg'
/mob/living/carbon/alien/New()
+ ..()
+ create_reagents(1000)
verbs += /mob/living/verb/mob_sleep
verbs += /mob/living/verb/lay_down
alien_organs += new /obj/item/organ/internal/brain/xeno
@@ -33,7 +35,6 @@
alien_organs += new /obj/item/organ/internal/ears
for(var/obj/item/organ/internal/I in alien_organs)
I.insert(src)
- ..()
/mob/living/carbon/alien/get_default_language()
if(default_language)
@@ -67,18 +68,6 @@
/mob/living/carbon/alien/check_eye_prot()
return 2
-/mob/living/carbon/alien/updatehealth(reason = "none given")
- if(status_flags & GODMODE)
- health = maxHealth
- stat = CONSCIOUS
- return
- health = maxHealth - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
-
- update_stat("updatehealth([reason])")
- med_hud_set_health()
- med_hud_set_status()
- handle_hud_icons_health()
-
/mob/living/carbon/alien/handle_environment(var/datum/gas_mixture/environment)
if(!environment)
@@ -118,12 +107,6 @@
else
clear_alert("alien_fire")
-/mob/living/carbon/alien/handle_fire()//Aliens on fire code
- if(..())
- return
- bodytemperature += BODYTEMP_HEATING_MAX //If you're on fire, you heat up!
- return
-
/mob/living/carbon/alien/IsAdvancedToolUser()
return has_fine_manipulation
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
index 2d894ee357e..99900183185 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
@@ -6,7 +6,6 @@
icon_state = "aliend_s"
/mob/living/carbon/alien/humanoid/drone/New()
- create_reagents(100)
if(src.name == "alien drone")
src.name = text("alien drone ([rand(1, 1000)])")
src.real_name = src.name
@@ -26,7 +25,7 @@
if(powerc(500))
// Queen check
var/no_queen = 1
- for(var/mob/living/carbon/alien/humanoid/queen/Q in GLOB.living_mob_list)
+ for(var/mob/living/carbon/alien/humanoid/queen/Q in GLOB.alive_mob_list)
if(!Q.key && Q.get_int_organ(/obj/item/organ/internal/brain/))
continue
no_queen = 0
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
index 73931aa7be9..f23f9b7aa42 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
@@ -6,7 +6,6 @@
icon_state = "alienh_s"
/mob/living/carbon/alien/humanoid/hunter/New()
- create_reagents(100)
if(name == "alien hunter")
name = text("alien hunter ([rand(1, 1000)])")
real_name = name
@@ -17,28 +16,6 @@
. = -1 //hunters are sanic
. += ..() //but they still need to slow down on stun
-/mob/living/carbon/alien/humanoid/hunter/handle_hud_icons_health()
- ..() //-Yvarov
-
- if(healths)
- if(stat != 2)
- switch(health)
- if(125 to INFINITY)
- healths.icon_state = "health0"
- if(100 to 125)
- healths.icon_state = "health1"
- if(50 to 100)
- healths.icon_state = "health2"
- if(25 to 50)
- healths.icon_state = "health3"
- if(0 to 25)
- healths.icon_state = "health4"
- else
- healths.icon_state = "health5"
- else
- healths.icon_state = "health6"
-
-
/mob/living/carbon/alien/humanoid/hunter/handle_environment()
if(m_intent == MOVE_INTENT_RUN || resting)
..()
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
index c436a43e4ff..4dd2d1b8569 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
@@ -33,7 +33,6 @@
overlays += I
/mob/living/carbon/alien/humanoid/sentinel/New()
- create_reagents(100)
if(name == "alien sentinel")
name = text("alien sentinel ([rand(1, 1000)])")
real_name = name
@@ -42,27 +41,6 @@
alien_organs += new /obj/item/organ/internal/xenos/neurotoxin
..()
-/mob/living/carbon/alien/humanoid/sentinel/handle_hud_icons_health()
- ..() //-Yvarov
-
- if(healths)
- if(stat != 2)
- switch(health)
- if(150 to INFINITY)
- healths.icon_state = "health0"
- if(100 to 150)
- healths.icon_state = "health1"
- if(75 to 100)
- healths.icon_state = "health2"
- if(25 to 75)
- healths.icon_state = "health3"
- if(0 to 25)
- healths.icon_state = "health4"
- else
- healths.icon_state = "health5"
- else
- healths.icon_state = "health6"
-
/*
/mob/living/carbon/alien/humanoid/sentinel/verb/evolve() // -- TLE
set name = "Evolve (250)"
diff --git a/code/modules/mob/living/carbon/alien/humanoid/empress.dm b/code/modules/mob/living/carbon/alien/humanoid/empress.dm
index a64602d030c..63514686f3d 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/empress.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/empress.dm
@@ -30,17 +30,17 @@
overlays += I
/mob/living/carbon/alien/humanoid/empress/New()
- create_reagents(100)
-
//there should only be one queen
- for(var/mob/living/carbon/alien/humanoid/empress/E in GLOB.living_mob_list)
- if(E == src) continue
- if(E.stat == DEAD) continue
+ for(var/mob/living/carbon/alien/humanoid/empress/E in GLOB.alive_mob_list)
+ if(E == src)
+ continue
+ if(E.stat == DEAD)
+ continue
if(E.client)
name = "alien grand princess ([rand(1, 999)])" //if this is too cutesy feel free to change it/remove it.
break
- real_name = src.name
+ real_name = name
alien_organs += new /obj/item/organ/internal/xenos/plasmavessel/queen
alien_organs += new /obj/item/organ/internal/xenos/acidgland
alien_organs += new /obj/item/organ/internal/xenos/eggsac
@@ -48,27 +48,6 @@
alien_organs += new /obj/item/organ/internal/xenos/neurotoxin
..()
-/mob/living/carbon/alien/humanoid/empress/handle_hud_icons_health()
- ..() //-Yvarov
-
- if(healths)
- if(stat != 2)
- switch(health)
- if(250 to INFINITY)
- healths.icon_state = "health0"
- if(175 to 250)
- healths.icon_state = "health1"
- if(100 to 175)
- healths.icon_state = "health2"
- if(50 to 100)
- healths.icon_state = "health3"
- if(0 to 50)
- healths.icon_state = "health4"
- else
- healths.icon_state = "health5"
- else
- healths.icon_state = "health6"
-
/mob/living/carbon/alien/humanoid/empress/verb/lay_egg()
set name = "Lay Egg (250)"
set desc = "Lay an egg to produce huggers to impregnate prey with."
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
index 63f6d3dcea9..e82488ee064 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
@@ -17,7 +17,6 @@
//This is fine right now, if we're adding organ specific damage this needs to be updated
/mob/living/carbon/alien/humanoid/New()
- create_reagents(1000)
if(name == "alien")
name = text("alien ([rand(1, 1000)])")
real_name = name
diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm
index 646f069970b..071987f808e 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/life.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm
@@ -2,27 +2,6 @@
. = ..()
update_icons()
-
-
-/mob/living/carbon/alien/humanoid/handle_disabilities()
- if(disabilities & EPILEPSY)
- if((prob(1) && paralysis < 10))
- to_chat(src, "You have a seizure!")
- Paralyse(10)
- if(disabilities & COUGHING)
- if((prob(5) && paralysis <= 1))
- drop_item()
- emote("cough")
- return
- if(disabilities & TOURETTES)
- if((prob(10) && paralysis <= 1))
- Stun(10)
- emote("twitch")
- return
- if(disabilities & NERVOUS)
- if(prob(10))
- stuttering = max(10, stuttering)
-
/mob/living/carbon/alien/humanoid/proc/adjust_body_temperature(current, loc_temp, boost)
var/temperature = current
var/difference = abs(current-loc_temp) //get difference
@@ -39,51 +18,3 @@
temperature = max(loc_temp, temperature-change)
temp_change = (temperature - current)
return temp_change
-
-/mob/living/carbon/alien/humanoid/handle_regular_status_updates()
- updatehealth()
-
- if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
- SetSilence(0)
- else //ALIVE. LIGHTS ARE ON
- if(health < HEALTH_THRESHOLD_DEAD && check_death_method() || !get_int_organ(/obj/item/organ/internal/brain))
- death()
- SetSilence(0)
- return 1
-
- //UNCONSCIOUS. NO-ONE IS HOME
- if((getOxyLoss() > 50) || (HEALTH_THRESHOLD_CRIT >= health && check_death_method()))
- if(health <= 20 && prob(1))
- emote("gasp")
- if(!reagents.has_reagent("epinephrine"))
- adjustOxyLoss(1)
- Paralyse(3)
-
- if(paralysis)
- stat = UNCONSCIOUS
- else if(sleeping)
- stat = UNCONSCIOUS
- if(prob(10) && health)
- emote("hiss")
- //CONSCIOUS
- else
- stat = CONSCIOUS
-
- /* What in the living hell is this?*/
- if(move_delay_add > 0)
- move_delay_add = max(0, move_delay_add - rand(1, 2))
-
- if(eye_blind) //blindness, heals slowly over time
- AdjustEyeBlind(-1)
- else if(eye_blurry) //blurry eyes heal slowly
- AdjustEyeBlurry(-1)
-
- if(stuttering)
- AdjustStuttering(-1)
-
- if(silent)
- AdjustSilence(-1)
-
- if(druggy)
- AdjustDruggy(-1)
- return 1
diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
index 9390885c558..3adb87ad505 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
@@ -11,12 +11,12 @@
pressure_resistance = 200 //Because big, stompy xenos should not be blown around like paper.
/mob/living/carbon/alien/humanoid/queen/New()
- create_reagents(100)
-
//there should only be one queen
- for(var/mob/living/carbon/alien/humanoid/queen/Q in GLOB.living_mob_list)
- if(Q == src) continue
- if(Q.stat == DEAD) continue
+ for(var/mob/living/carbon/alien/humanoid/queen/Q in GLOB.alive_mob_list)
+ if(Q == src)
+ continue
+ if(Q.stat == DEAD)
+ continue
if(Q.client)
name = "alien princess ([rand(1, 999)])" //if this is too cutesy feel free to change it/remove it.
break
@@ -33,27 +33,6 @@
. = ..()
. += 3
-/mob/living/carbon/alien/humanoid/queen/handle_hud_icons_health()
- ..() //-Yvarov
-
- if(healths)
- if(stat != DEAD)
- switch(health)
- if(250 to INFINITY)
- healths.icon_state = "health0"
- if(175 to 250)
- healths.icon_state = "health1"
- if(100 to 175)
- healths.icon_state = "health2"
- if(50 to 100)
- healths.icon_state = "health3"
- if(0 to 50)
- healths.icon_state = "health4"
- else
- healths.icon_state = "health5"
- else
- healths.icon_state = "health6"
-
/mob/living/carbon/alien/humanoid/queen/can_inject(mob/user, error_msg, target_zone, penetrate_thick)
return FALSE
diff --git a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm
index 4776f32596a..94c65095f01 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm
@@ -56,13 +56,14 @@
/mob/living/carbon/alien/humanoid/regenerate_icons()
..()
- if(notransform) return
+ if(notransform)
+ return
- update_inv_head(0,0)
- update_inv_wear_suit(0,0)
- update_inv_r_hand(0)
- update_inv_l_hand(0)
- update_inv_pockets(0)
+ update_inv_head()
+ update_inv_wear_suit()
+ update_inv_r_hand()
+ update_inv_l_hand()
+ update_inv_pockets()
update_icons()
update_fire()
update_transform()
@@ -82,7 +83,7 @@
else
overlays_standing[X_FIRE_LAYER] = null
-/mob/living/carbon/alien/humanoid/update_inv_wear_suit(var/update_icons=1)
+/mob/living/carbon/alien/humanoid/update_inv_wear_suit()
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_wear_suit]
inv.update_icon()
@@ -110,10 +111,10 @@
overlays_standing[X_SUIT_LAYER] = standing
else
overlays_standing[X_SUIT_LAYER] = null
- if(update_icons) update_icons()
+ update_icons()
-/mob/living/carbon/alien/humanoid/update_inv_head(var/update_icons=1)
+/mob/living/carbon/alien/humanoid/update_inv_head()
if(head)
var/t_state = head.item_state
if(!t_state) t_state = head.icon_state
@@ -124,17 +125,19 @@
overlays_standing[X_HEAD_LAYER] = standing
else
overlays_standing[X_HEAD_LAYER] = null
- if(update_icons) update_icons()
+ update_icons()
-/mob/living/carbon/alien/humanoid/update_inv_pockets(var/update_icons=1)
- if(l_store) l_store.screen_loc = ui_storage1
- if(r_store) r_store.screen_loc = ui_storage2
- if(update_icons) update_icons()
+/mob/living/carbon/alien/humanoid/update_inv_pockets()
+ if(l_store)
+ l_store.screen_loc = ui_storage1
+ if(r_store)
+ r_store.screen_loc = ui_storage2
+ update_icons()
-/mob/living/carbon/alien/humanoid/update_inv_r_hand(var/update_icons=1)
- ..(1)
+/mob/living/carbon/alien/humanoid/update_inv_r_hand()
+ ..()
if(r_hand)
var/t_state = r_hand.item_state
if(!t_state) t_state = r_hand.icon_state
@@ -142,10 +145,10 @@
overlays_standing[X_R_HAND_LAYER] = image("icon" = r_hand.righthand_file, "icon_state" = t_state)
else
overlays_standing[X_R_HAND_LAYER] = null
- if(update_icons) update_icons()
+ update_icons()
-/mob/living/carbon/alien/humanoid/update_inv_l_hand(var/update_icons=1)
- ..(1)
+/mob/living/carbon/alien/humanoid/update_inv_l_hand()
+ ..()
if(l_hand)
var/t_state = l_hand.item_state
if(!t_state) t_state = l_hand.icon_state
@@ -153,7 +156,7 @@
overlays_standing[X_L_HAND_LAYER] = image("icon" = l_hand.lefthand_file, "icon_state" = t_state)
else
overlays_standing[X_L_HAND_LAYER] = null
- if(update_icons) update_icons()
+ update_icons()
//Xeno Overlays Indexes//////////
diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm
index a55126ec045..aeee677b905 100644
--- a/code/modules/mob/living/carbon/alien/larva/larva.dm
+++ b/code/modules/mob/living/carbon/alien/larva/larva.dm
@@ -5,8 +5,8 @@
pass_flags = PASSTABLE | PASSMOB
mob_size = MOB_SIZE_SMALL
- maxHealth = 30
- health = 30
+ maxHealth = 25
+ health = 25
density = 0
var/amount_grown = 0
@@ -17,7 +17,6 @@
//This is fine right now, if we're adding organ specific damage this needs to be updated
/mob/living/carbon/alien/larva/New()
- create_reagents(100)
if(name == "alien larva")
name = "alien larva ([rand(1, 1000)])"
real_name = name
@@ -25,7 +24,6 @@
add_language("Xenomorph")
add_language("Hivemind")
alien_organs += new /obj/item/organ/internal/xenos/plasmavessel/larva
-
..()
//This needs to be fixed
diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm
index fd1543673e6..496a12cbf82 100644
--- a/code/modules/mob/living/carbon/alien/larva/life.dm
+++ b/code/modules/mob/living/carbon/alien/larva/life.dm
@@ -1,57 +1,28 @@
/mob/living/carbon/alien/larva/Life(seconds, times_fired)
- if(..()) //still breathing
+ set invisibility = 0
+ if(notransform)
+ return
+ if(..()) //not dead and not in stasis
// GROW!
if(amount_grown < max_grown)
amount_grown++
+ update_icons()
- //some kind of bug in canmove() isn't properly calling update_icons, so this is here as a placeholder
- update_icons()
-
-/mob/living/carbon/alien/larva/handle_regular_status_updates()
- updatehealth()
-
- if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
- SetSilence(0)
- else //ALIVE. LIGHTS ARE ON
- if(health < -25 || !get_int_organ(/obj/item/organ/internal/brain))
+/mob/living/carbon/alien/larva/update_stat(reason = "None given")
+ if(status_flags & GODMODE)
+ return
+ if(stat != DEAD)
+ if(health <= -maxHealth || !get_int_organ(/obj/item/organ/internal/brain))
death()
- SetSilence(0)
- return 1
+ return
- //UNCONSCIOUS. NO-ONE IS HOME
- if((getOxyLoss() > 25) || (HEALTH_THRESHOLD_CRIT >= health && check_death_method()))
- //if( health <= 20 && prob(1) )
- // spawn(0)
- // emote("gasp")
- if(!reagents.has_reagent("epinephrine"))
- adjustOxyLoss(1)
- Paralyse(3)
-
- if(paralysis)
- stat = UNCONSCIOUS
- else if(sleeping)
- stat = UNCONSCIOUS
- if(prob(10) && health)
- emote("hiss_")
- //CONSCIOUS
+ if(paralysis || sleeping || getOxyLoss() > 50 || (HEALTH_THRESHOLD_CRIT <= health && check_death_method()))
+ if(stat == CONSCIOUS)
+ KnockOut()
+ create_debug_log("fell unconscious, trigger reason: [reason]")
else
- stat = CONSCIOUS
-
- /* What in the living hell is this?*/
- if(move_delay_add > 0)
- move_delay_add = max(0, move_delay_add - rand(1, 2))
-
- if(eye_blind) //blindness, heals slowly over time
- AdjustEyeBlind(-1)
- else if(eye_blurry) //blurry eyes heal slowly
- AdjustEyeBlurry(-1)
-
- if(stuttering)
- AdjustStuttering(-1)
-
- if(silent)
- AdjustSilence(-1)
-
- if(druggy)
- AdjustDruggy(-1)
- return 1
+ if(stat == UNCONSCIOUS)
+ WakeUp()
+ create_debug_log("woke up, trigger reason: [reason]")
+ update_damage_hud()
+ update_health_hud()
diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm
index a584f66dc97..5a1d08a010a 100644
--- a/code/modules/mob/living/carbon/alien/life.dm
+++ b/code/modules/mob/living/carbon/alien/life.dm
@@ -28,3 +28,15 @@
//BREATH TEMPERATURE
handle_breath_temperature(breath)
+
+/mob/living/carbon/alien/handle_status_effects()
+ ..()
+ //natural reduction of movement delay due to stun.
+ if(move_delay_add > 0)
+ move_delay_add = max(0, move_delay_add - rand(1, 2))
+
+/mob/living/carbon/alien/handle_fire()//Aliens on fire code
+ . = ..()
+ if(.) //if the mob isn't on fire anymore
+ return
+ adjust_bodytemperature(BODYTEMP_HEATING_MAX) //If you're on fire, you heat up!
diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm
index 5b80f6d032f..1dcd76c0358 100644
--- a/code/modules/mob/living/carbon/alien/special/facehugger.dm
+++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm
@@ -146,7 +146,7 @@
"[src] tears [W] off of [target]'s face!")
src.loc = target
- target.equip_to_slot(src, slot_wear_mask,,0)
+ target.equip_to_slot_if_possible(src, slot_wear_mask, FALSE, TRUE)
if(!sterile)
M.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm
index 130a2e3a574..16014e7c353 100644
--- a/code/modules/mob/living/carbon/brain/MMI.dm
+++ b/code/modules/mob/living/carbon/brain/MMI.dm
@@ -49,7 +49,7 @@
brainmob.stat = CONSCIOUS
GLOB.respawnable_list -= brainmob
GLOB.dead_mob_list -= brainmob//Update dem lists
- GLOB.living_mob_list += brainmob
+ GLOB.alive_mob_list += brainmob
held_brain = B
if(istype(O,/obj/item/organ/internal/brain/xeno)) // kept the type check, as it still does other weird stuff
@@ -157,7 +157,7 @@
brainmob.container = null//Reset brainmob mmi var.
brainmob.forceMove(held_brain) //Throw mob into brain.
GLOB.respawnable_list += brainmob
- GLOB.living_mob_list -= brainmob//Get outta here
+ GLOB.alive_mob_list -= brainmob//Get outta here
held_brain.brainmob = brainmob//Set the brain to use the brainmob
held_brain.brainmob.cancel_camera()
brainmob = null//Set mmi brainmob var to null
diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm
index ec80d6a44b4..386d5ae138f 100644
--- a/code/modules/mob/living/carbon/brain/brain.dm
+++ b/code/modules/mob/living/carbon/brain/brain.dm
@@ -7,9 +7,8 @@
icon_state = "brain1"
/mob/living/carbon/brain/New()
- create_reagents(330)
- add_language("Galactic Common")
..()
+ add_language("Galactic Common")
/mob/living/carbon/brain/Destroy()
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm
index 0b6bcededaf..93f31d0128c 100644
--- a/code/modules/mob/living/carbon/brain/brain_item.dm
+++ b/code/modules/mob/living/carbon/brain/brain_item.dm
@@ -26,11 +26,9 @@
mmi_icon = 'icons/mob/alien.dmi'
mmi_icon_state = "AlienMMI"
-/obj/item/organ/internal/brain/New()
- ..()
- spawn(5)
- if(brainmob && brainmob.client)
- brainmob.client.screen.len = null //clear the hud
+/obj/item/organ/internal/brain/Destroy()
+ QDEL_NULL(brainmob)
+ return ..()
/obj/item/organ/internal/brain/proc/transfer_identity(var/mob/living/carbon/H)
brainmob = new(src)
@@ -72,7 +70,7 @@
if(istype(owner,/mob/living/carbon/human))
var/mob/living/carbon/human/H = owner
- H.update_hair(1)
+ H.update_hair()
. = ..()
/obj/item/organ/internal/brain/insert(var/mob/living/target,special = 0)
@@ -84,7 +82,7 @@
brain_already_exists = 1
var/mob/living/carbon/human/H = target
- H.update_hair(1)
+ H.update_hair()
if(!brain_already_exists)
if(brainmob)
diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm
index 6bd88e5e111..0faa238190e 100644
--- a/code/modules/mob/living/carbon/brain/life.dm
+++ b/code/modules/mob/living/carbon/brain/life.dm
@@ -28,13 +28,11 @@
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
adjustFireLoss(5.0*discomfort)
-/mob/living/carbon/brain/handle_regular_status_updates()
+/mob/living/carbon/brain/Life()
. = ..()
-
if(.)
- if(!container && (health < HEALTH_THRESHOLD_DEAD && check_death_method() || ((world.time - timeofhostdeath) > config.revival_brain_life)))
+ if(!container && (world.time - timeofhostdeath) > config.revival_brain_life)
death()
- return 0
/mob/living/carbon/brain/breathe()
return
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 3efcc7a9ce9..74c5a71c94b 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -486,7 +486,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/starting_machine)
- if(!istype(starting_machine) || !starting_machine.returnPipenet())
+ if(!istype(starting_machine) || !starting_machine.returnPipenet() || !starting_machine.can_see_pipes())
return
var/datum/pipeline/pipeline = starting_machine.returnPipenet()
var/list/totalMembers = list()
diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm
index bc4b5b43b1c..58c6a39e6c1 100644
--- a/code/modules/mob/living/carbon/human/appearance.dm
+++ b/code/modules/mob/living/carbon/human/appearance.dm
@@ -131,7 +131,7 @@
m_styles["head"] = "None"
update_markings()
- update_body(1, 1) //Update the body and force limb icon regeneration to update the head with the new icon.
+ update_body(TRUE) //Update the body and force limb icon regeneration to update the head with the new icon.
if(wear_mask)
update_inv_wear_mask()
return 1
@@ -469,7 +469,7 @@
scramble(1, src, 100)
real_name = random_name(gender, dna.species.name) //Give them a name that makes sense for their species.
sync_organ_dna(assimilate = 1)
- update_body(0)
+ update_body()
reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
reset_markings() //...Or markings.
dna.ResetUIFrom(src)
diff --git a/code/modules/mob/living/carbon/human/body_accessories.dm b/code/modules/mob/living/carbon/human/body_accessories.dm
index e214f6068bb..043a704ab0c 100644
--- a/code/modules/mob/living/carbon/human/body_accessories.dm
+++ b/code/modules/mob/living/carbon/human/body_accessories.dm
@@ -77,15 +77,6 @@ GLOBAL_LIST_INIT(body_accessory_by_species, list("None" = null))
/datum/body_accessory/body
blend_mode = ICON_MULTIPLY
-/datum/body_accessory/body/snake
- name = "Snake"
-
- icon = 'icons/mob/body_accessory_64.dmi'
- icon_state = "snake"
-
- pixel_x_offset = -16
-
-
//Tails
/datum/body_accessory/tail
icon = 'icons/mob/body_accessory.dmi'
diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm
index aa8643173f4..6b7a0a2b15d 100644
--- a/code/modules/mob/living/carbon/human/death.dm
+++ b/code/modules/mob/living/carbon/human/death.dm
@@ -103,7 +103,6 @@
set_heartattack(FALSE)
SSmobs.cubemonkeys -= src
if(dna.species)
- dna.species.handle_hud_icons(src)
//Handle species-specific deaths.
dna.species.handle_death(gibbed, src)
@@ -124,10 +123,10 @@
if(. && healthdoll)
// We're alive again, so re-build the entire healthdoll
healthdoll.cached_healthdoll_overlays.Cut()
+ update_health_hud()
// Update healthdoll
if(dna.species)
dna.species.update_sight(src)
- dna.species.handle_hud_icons(src)
/mob/living/carbon/human/proc/makeSkeleton()
var/obj/item/organ/external/head/H = get_organ("head")
@@ -146,14 +145,14 @@
H.alt_head = initial(H.alt_head)
H.handle_alt_icon()
m_styles = DEFAULT_MARKING_STYLES
- update_fhair(0)
- update_hair(0)
- update_head_accessory(0)
- update_markings(0)
+ update_fhair()
+ update_hair()
+ update_head_accessory()
+ update_markings()
mutations.Add(SKELETON)
mutations.Add(NOCLONE)
- update_body(0)
+ update_body()
update_mutantrace()
return
@@ -172,11 +171,11 @@
H.f_style = "Shaved" //we only change the icon_state of the hair datum, so it doesn't mess up their UI/UE
if(H.h_style)
H.h_style = "Bald"
- update_fhair(0)
- update_hair(0)
+ update_fhair()
+ update_hair()
mutations.Add(HUSK)
- update_body(0)
+ update_body()
update_mutantrace()
return
@@ -190,6 +189,6 @@
var/obj/item/organ/external/head/H = bodyparts_by_name["head"]
if(istype(H))
H.disfigured = FALSE
- update_body(0)
- update_mutantrace(0)
+ update_body()
+ update_mutantrace()
UpdateAppearance() // reset hair from DNA
diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm
index c1f6acdefe5..a34f02bc868 100644
--- a/code/modules/mob/living/carbon/human/emote.dm
+++ b/code/modules/mob/living/carbon/human/emote.dm
@@ -256,12 +256,12 @@
if(body_accessory)
if(body_accessory.try_restrictions(src))
message = "[src] starts wagging [p_their()] tail."
- start_tail_wagging(1)
+ start_tail_wagging()
else if(dna.species.bodyflags & TAIL_WAGGING)
if(!wear_suit || !(wear_suit.flags_inv & HIDETAIL))
message = "[src] starts wagging [p_their()] tail."
- start_tail_wagging(1)
+ start_tail_wagging()
else
return
else
@@ -271,7 +271,7 @@
if("swag", "swags")
if(dna.species.bodyflags & TAIL_WAGGING || body_accessory)
message = "[src] stops wagging [p_their()] tail."
- stop_tail_wagging(1)
+ stop_tail_wagging()
else
return
m_type = 1
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 7d1073fbdb2..828dc25322c 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -18,10 +18,10 @@
dna = new /datum/dna(null)
// Species name is handled by set_species()
- set_species(new_species, 1, delay_icon_update = 1, skip_same_check = TRUE)
-
..()
+ set_species(new_species, 1, delay_icon_update = 1, skip_same_check = TRUE)
+
if(dna.species)
real_name = dna.species.get_random_name(gender)
name = real_name
@@ -658,7 +658,7 @@
else
if(place_item)
usr.unEquip(place_item)
- equip_to_slot_if_possible(place_item, pocket_id, 0, 1)
+ equip_to_slot_if_possible(place_item, pocket_id, FALSE, TRUE)
add_attack_logs(usr, src, "Equipped with [place_item]", isLivingSSD(src) ? null : ATKLOG_ALL)
// Update strip window
@@ -1169,7 +1169,7 @@
qdel(feet_blood_DNA)
bloody_feet = list(BLOOD_STATE_HUMAN = 0, BLOOD_STATE_XENO = 0, BLOOD_STATE_NOT_BLOODY = 0)
blood_state = BLOOD_STATE_NOT_BLOODY
- update_inv_shoes(1)
+ update_inv_shoes()
return 1
/mob/living/carbon/human/cuff_resist(obj/item/I)
@@ -1349,7 +1349,7 @@
dna.species.create_organs(src)
for(var/obj/item/thing in kept_items)
- equip_to_slot_if_possible(thing, kept_items[thing], redraw_mob = 0)
+ equip_to_slot_if_possible(thing, kept_items[thing])
thing.flags = item_flags[thing] // Reset the flags to the origional ones
//Handle default hair/head accessories for created mobs.
@@ -1399,7 +1399,7 @@
UpdateAppearance()
overlays.Cut()
- update_mutantrace(1)
+ update_mutantrace()
regenerate_icons()
if(dna.species)
@@ -1962,3 +1962,6 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
if(O && O.glowing)
O.toggle_biolum(TRUE)
visible_message("[src] is engulfed in shadows and fades into the darkness.", "A sense of dread washes over you as you suddenly dim dark.")
+
+/mob/living/carbon/human/proc/get_perceived_trauma()
+ return min(health, maxHealth - getStaminaLoss())
diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm
index f2a976e46d2..89aa7854264 100644
--- a/code/modules/mob/living/carbon/human/human_damage.dm
+++ b/code/modules/mob/living/carbon/human/human_damage.dm
@@ -19,8 +19,6 @@
ChangeToHusk()
update_stat("updatehealth([reason])")
med_hud_set_health()
- med_hud_set_status()
- handle_hud_icons_health()
/mob/living/carbon/human/adjustBrainLoss(amount, updating = TRUE, use_brain_mod = TRUE)
if(status_flags & GODMODE)
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index d698a68c6d5..82b61a04391 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -457,13 +457,13 @@ emp_act
if(bloody)//Apply blood
if(wear_mask)
wear_mask.add_mob_blood(src)
- update_inv_wear_mask(0)
+ update_inv_wear_mask()
if(head)
head.add_mob_blood(src)
- update_inv_head(0,0)
+ update_inv_head()
if(glasses && prob(33))
glasses.add_mob_blood(src)
- update_inv_glasses(0)
+ update_inv_glasses()
if("chest")//Easier to score a stun but lasts less time
@@ -475,10 +475,10 @@ emp_act
if(bloody)
if(wear_suit)
wear_suit.add_mob_blood(src)
- update_inv_wear_suit(1)
+ update_inv_wear_suit()
if(w_uniform)
w_uniform.add_mob_blood(src)
- update_inv_w_uniform(1)
+ update_inv_w_uniform()
@@ -525,16 +525,16 @@ emp_act
else
add_mob_blood(source)
bloody_hands = amount
- update_inv_gloves(1) //updates on-mob overlays for bloody hands and/or bloody gloves
+ update_inv_gloves() //updates on-mob overlays for bloody hands and/or bloody gloves
/mob/living/carbon/human/proc/bloody_body(var/mob/living/source)
if(wear_suit)
wear_suit.add_mob_blood(source)
- update_inv_wear_suit(0)
+ update_inv_wear_suit()
return
if(w_uniform)
w_uniform.add_mob_blood(source)
- update_inv_w_uniform(1)
+ update_inv_w_uniform()
/mob/living/carbon/human/proc/handle_suit_punctures(var/damtype, var/damage)
diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm
index ea62f2fb5f9..b4a65b110a9 100644
--- a/code/modules/mob/living/carbon/human/human_organs.dm
+++ b/code/modules/mob/living/carbon/human/human_organs.dm
@@ -8,12 +8,15 @@
/mob/living/carbon/human/var/list/bodyparts_by_name = list() // map organ names to organs
// Takes care of organ related updates, such as broken and missing limbs
-/mob/living/carbon/human/proc/handle_organs()
+/mob/living/carbon/human/handle_organs()
+ ..()
//processing internal organs is pretty cheap, do that first.
- for(var/obj/item/organ/internal/I in internal_organs)
+ for(var/X in internal_organs)
+ var/obj/item/organ/internal/I = X
I.process()
- for(var/obj/item/organ/external/E in bodyparts)
+ for(var/Y in bodyparts)
+ var/obj/item/organ/external/E = Y
E.process()
if(!lying && world.time - l_move_time < 15)
@@ -109,6 +112,11 @@
do_sparks(5, 0, src)
+/mob/living/carbon/human/handle_germs()
+ ..()
+ if(gloves && germ_level > gloves.germ_level && prob(10))
+ gloves.germ_level += 1
+
/mob/living/carbon/human/proc/becomeSlim()
to_chat(src, "You feel fit again!")
mutations.Remove(FAT)
diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index ea48884df9b..954d4e8fa55 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -178,8 +178,7 @@
//This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible()
-//set redraw_mob to 0 if you don't wish the hud to be updated - if you're doing it manually in your own proc.
-/mob/living/carbon/human/equip_to_slot(obj/item/I, slot, redraw_mob = 1)
+/mob/living/carbon/human/equip_to_slot(obj/item/I, slot)
if(!slot)
return
if(!istype(I))
@@ -203,40 +202,40 @@
switch(slot)
if(slot_back)
back = I
- update_inv_back(redraw_mob)
+ update_inv_back()
if(slot_wear_mask)
wear_mask = I
if((wear_mask.flags & BLOCKHAIR) || (wear_mask.flags & BLOCKHEADHAIR))
- update_hair(redraw_mob) //rebuild hair
- update_fhair(redraw_mob)
- update_head_accessory(redraw_mob)
+ update_hair() //rebuild hair
+ update_fhair()
+ update_head_accessory()
if(hud_list.len)
sec_hud_set_ID()
wear_mask_update(I, toggle_off = TRUE)
- update_inv_wear_mask(redraw_mob)
+ update_inv_wear_mask()
if(slot_handcuffed)
handcuffed = I
- update_inv_handcuffed(redraw_mob)
+ update_inv_handcuffed()
if(slot_legcuffed)
legcuffed = I
- update_inv_legcuffed(redraw_mob)
+ update_inv_legcuffed()
if(slot_l_hand)
l_hand = I
- update_inv_l_hand(redraw_mob)
+ update_inv_l_hand()
if(slot_r_hand)
r_hand = I
- update_inv_r_hand(redraw_mob)
+ update_inv_r_hand()
if(slot_belt)
belt = I
- update_inv_belt(redraw_mob)
+ update_inv_belt()
if(slot_wear_id)
wear_id = I
if(hud_list.len)
sec_hud_set_ID()
- update_inv_wear_id(redraw_mob)
+ update_inv_wear_id()
if(slot_wear_pda)
wear_pda = I
- update_inv_wear_pda(redraw_mob)
+ update_inv_wear_pda()
if(slot_l_ear)
l_ear = I
if(l_ear.slot_flags & SLOT_TWOEARS)
@@ -245,7 +244,7 @@
r_ear = O
O.layer = ABOVE_HUD_LAYER
O.plane = ABOVE_HUD_PLANE
- update_inv_ears(redraw_mob)
+ update_inv_ears()
if(slot_r_ear)
r_ear = I
if(r_ear.slot_flags & SLOT_TWOEARS)
@@ -254,7 +253,7 @@
l_ear = O
O.layer = ABOVE_HUD_LAYER
O.plane = ABOVE_HUD_PLANE
- update_inv_ears(redraw_mob)
+ update_inv_ears()
if(slot_glasses)
glasses = I
var/obj/item/clothing/glasses/G = I
@@ -264,42 +263,42 @@
update_nearsighted_effects()
if(G.vision_flags || G.see_in_dark || G.invis_override || G.invis_view || !isnull(G.lighting_alpha))
update_sight()
- update_inv_glasses(redraw_mob)
+ update_inv_glasses()
update_client_colour()
if(slot_gloves)
gloves = I
- update_inv_gloves(redraw_mob)
+ update_inv_gloves()
if(slot_head)
head = I
if((head.flags & BLOCKHAIR) || (head.flags & BLOCKHEADHAIR))
- update_hair(redraw_mob) //rebuild hair
- update_fhair(redraw_mob)
- update_head_accessory(redraw_mob)
+ update_hair() //rebuild hair
+ update_fhair()
+ update_head_accessory()
// paper + bandanas
if(istype(I, /obj/item/clothing/head))
var/obj/item/clothing/head/hat = I
if(hat.vision_flags || hat.see_in_dark || !isnull(hat.lighting_alpha))
update_sight()
head_update(I)
- update_inv_head(redraw_mob)
+ update_inv_head()
if(slot_shoes)
shoes = I
- update_inv_shoes(redraw_mob)
+ update_inv_shoes()
if(slot_wear_suit)
wear_suit = I
- update_inv_wear_suit(redraw_mob)
+ update_inv_wear_suit()
if(slot_w_uniform)
w_uniform = I
- update_inv_w_uniform(redraw_mob)
+ update_inv_w_uniform()
if(slot_l_store)
l_store = I
- update_inv_pockets(redraw_mob)
+ update_inv_pockets()
if(slot_r_store)
r_store = I
- update_inv_pockets(redraw_mob)
+ update_inv_pockets()
if(slot_s_store)
s_store = I
- update_inv_s_store(redraw_mob)
+ update_inv_s_store()
if(slot_in_backpack)
if(get_active_hand() == I)
unEquip(I)
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 8f548100650..c74340d0901 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -1,18 +1,26 @@
/mob/living/carbon/human/Life(seconds, times_fired)
+ set invisibility = 0
+ if(notransform)
+ return
+
+ . = ..()
+
+ if(QDELETED(src))
+ return FALSE
+
life_tick++
voice = GetVoice()
- if(..())
+ if(.) //not dead
if(check_mutations)
domutcheck(src,null)
update_mutations()
- check_mutations=0
+ check_mutations = FALSE
handle_pain()
handle_heartbeat()
- handle_drunk()
dna.species.handle_life(src)
if(!client)
dna.species.handle_npc(src)
@@ -24,45 +32,45 @@
if(stat == DEAD)
handle_decay()
- if(life_tick > 5 && timeofdeath && (timeofdeath < 5 || world.time - timeofdeath > 6000)) //We are long dead, or we're junk mobs spawned like the clowns on the clown shuttle
- return //We go ahead and process them 5 times for HUD images and other stuff though.
-
//Update our name based on whether our face is obscured/disfigured
name = get_visible_name()
pulse = handle_pulse(times_fired)
- if(mind && mind.vampire)
+ if(mind?.vampire)
mind.vampire.handle_vampire()
if(life_tick == 1)
regenerate_icons() // Make sure the inventory updates
- handle_ghosted()
- handle_ssd()
+ if(player_ghosted > 0 && stat == CONSCIOUS && job && !restrained())
+ handle_ghosted()
+ if(player_logged > 0 && stat != DEAD && job)
+ handle_ssd()
+
+ if(stat != DEAD)
+ return TRUE
/mob/living/carbon/human/proc/handle_ghosted()
- if(player_ghosted > 0 && stat == CONSCIOUS && job && !restrained())
- if(key)
- player_ghosted = 0
- else
- player_ghosted++
- if(player_ghosted % 150 == 0)
- force_cryo_human(src)
+ if(key)
+ player_ghosted = 0
+ else
+ player_ghosted++
+ if(player_ghosted % 150 == 0)
+ force_cryo_human(src)
/mob/living/carbon/human/proc/handle_ssd()
- if(player_logged > 0 && stat != DEAD && job)
- player_logged++
- if(istype(loc, /obj/machinery/cryopod))
+ player_logged++
+ if(istype(loc, /obj/machinery/cryopod))
+ return
+ if(config.auto_cryo_ssd_mins && (player_logged >= (config.auto_cryo_ssd_mins * 30)) && player_logged % 30 == 0)
+ var/turf/T = get_turf(src)
+ if(!is_station_level(T.z))
return
- if(config.auto_cryo_ssd_mins && (player_logged >= (config.auto_cryo_ssd_mins * 30)) && player_logged % 30 == 0)
- var/turf/T = get_turf(src)
- if(!is_station_level(T.z))
- return
- var/area/A = get_area(src)
- if(cryo_ssd(src))
- var/obj/effect/portal/P = new /obj/effect/portal(T, null, null, 40)
- P.name = "NT SSD Teleportation Portal"
- if(A.fast_despawn)
- force_cryo_human(src)
+ var/area/A = get_area(src)
+ if(cryo_ssd(src))
+ var/obj/effect/portal/P = new /obj/effect/portal(T, null, null, 40)
+ P.name = "NT SSD Teleportation Portal"
+ if(A.fast_despawn)
+ force_cryo_human(src)
/mob/living/carbon/human/calculate_affecting_pressure(var/pressure)
..()
@@ -80,38 +88,35 @@
/mob/living/carbon/human/handle_disabilities()
- if(disabilities & EPILEPSY)
- if((prob(1) && paralysis < 1))
- visible_message("[src] starts having a seizure!","You have a seizure!")
- Paralyse(10)
- Jitter(1000)
+ //Vision //god knows why this is here
+ var/obj/item/organ/vision
+ if(dna.species.vision_organ)
+ vision = get_int_organ(dna.species.vision_organ)
- // If we have the gene for being crazy, have random events.
- if(dna.GetSEState(GLOB.hallucinationblock))
- if(prob(1))
- Hallucinate(20)
+ if(!dna.species.vision_organ) // Presumably if a species has no vision organs, they see via some other means.
+ SetEyeBlind(0)
+ SetEyeBlurry(0)
- if(disabilities & COUGHING)
- if((prob(5) && paralysis <= 1))
- drop_item()
- emote("cough")
- if(disabilities & TOURETTES)
- if((prob(10) && paralysis <= 1))
- Stun(10)
- switch(rand(1, 3))
- if(1)
- emote("twitch")
- if(2 to 3)
- var/tourettes = pick("SHIT", "PISS", "FUCK", "CUNT", "COCKSUCKER", "MOTHERFUCKER", "TITS")
- say("[prob(50) ? ";" : ""][tourettes]")
- var/x_offset = pixel_x + rand(-2,2) //Should probably be moved into the twitch emote at some point.
- var/y_offset = pixel_y + rand(-1,1)
- animate(src, pixel_x = pixel_x + x_offset, pixel_y = pixel_y + y_offset, time = 1)
- animate(pixel_x = initial(pixel_x) , pixel_y = initial(pixel_y), time = 1)
+ else if(!vision || vision.is_broken()) // Vision organs cut out or broken? Permablind.
+ EyeBlind(2)
+ EyeBlurry(2)
- if(disabilities & NERVOUS)
- if(prob(10))
- Stuttering(10)
+ else
+ //blindness
+ if(BLINDNESS in mutations) // Disabled-blind, doesn't get better on its own
+
+ else if(eye_blind) // Blindness, heals slowly over time
+ AdjustEyeBlind(-1)
+
+ else if(istype(glasses, /obj/item/clothing/glasses/sunglasses/blindfold) && eye_blurry) //resting your eyes with a blindfold heals blurry eyes faster
+ AdjustEyeBlurry(-3)
+
+ //blurry sight
+ if(vision.is_bruised()) // Vision organs impaired? Permablurry.
+ EyeBlurry(2)
+
+ if(eye_blurry) // Blurry eyes heal slowly
+ AdjustEyeBlurry(-1)
if(getBrainLoss() >= 60 && stat != DEAD)
if(prob(3))
@@ -607,6 +612,7 @@
// nutrition decrease
if(nutrition > 0 && stat != DEAD)
+ handle_nutrition_alerts()
// THEY HUNGER
var/hunger_rate = hunger_drain
if(satiety > 0)
@@ -656,22 +662,25 @@
AdjustSleeping(1)
Paralyse(5)
- AdjustConfused(-1)
+ if(confused)
+ AdjustConfused(-1)
// decrement dizziness counter, clamped to 0
if(resting)
- AdjustDizzy(-15)
- AdjustJitter(-15)
+ if(dizziness)
+ AdjustDizzy(-15)
+ if(jitteriness)
+ AdjustJitter(-15)
else
- AdjustDizzy(-3)
- AdjustJitter(-3)
+ if(dizziness)
+ AdjustDizzy(-3)
+ if(jitteriness)
+ AdjustJitter(-3)
if(NO_INTORGANS in dna.species.species_traits)
return
handle_trace_chems()
- return //TODO: DEFERRED
-
/mob/living/carbon/human/handle_drunk()
var/slur_start = 30 //12u ethanol, 30u whiskey FOR HUMANS
var/confused_start = 40
@@ -683,55 +692,54 @@
var/collapse_start = 75
var/braindamage_start = 120
var/alcohol_strength = drunk
- var/sober_str=!(SOBER in mutations)?1:2
+ var/sober_str =! (SOBER in mutations) ? 1 : 2
- if(drunk)
- alcohol_strength/=sober_str
+ alcohol_strength /= sober_str
- var/obj/item/organ/internal/liver/L
- if(!isSynthetic())
- L = get_int_organ(/obj/item/organ/internal/liver)
+ var/obj/item/organ/internal/liver/L
+ if(!isSynthetic())
+ L = get_int_organ(/obj/item/organ/internal/liver)
+ if(L)
+ alcohol_strength *= L.alcohol_intensity
+ else
+ alcohol_strength *= 5
+
+ if(alcohol_strength >= slur_start) //slurring
+ Slur(drunk)
+ if(alcohol_strength >= brawl_start) //the drunken martial art
+ if(!istype(martial_art, /datum/martial_art/drunk_brawling))
+ var/datum/martial_art/drunk_brawling/F = new
+ F.teach(src, 1)
+ if(alcohol_strength < brawl_start) //removing the art
+ if(istype(martial_art, /datum/martial_art/drunk_brawling))
+ martial_art.remove(src)
+ if(alcohol_strength >= confused_start && prob(33)) //confused walking
+ if(!confused)
+ Confused(1)
+ AdjustConfused(3 / sober_str)
+ if(alcohol_strength >= blur_start) //blurry eyes
+ EyeBlurry(10 / sober_str)
+ if(!isSynthetic()) //stuff only for non-synthetics
+ if(alcohol_strength >= vomit_start) //vomiting
+ if(prob(8))
+ fakevomit()
+ if(alcohol_strength >= pass_out)
+ Paralyse(5 / sober_str)
+ Drowsy(30 / sober_str)
if(L)
- alcohol_strength *= L.alcohol_intensity
- else
- alcohol_strength *= 5
-
- if(alcohol_strength >= slur_start) //slurring
- Slur(drunk)
- if(alcohol_strength >= brawl_start) //the drunken martial art
- if(!istype(martial_art, /datum/martial_art/drunk_brawling))
- var/datum/martial_art/drunk_brawling/F = new
- F.teach(src,1)
- if(alcohol_strength < brawl_start) //removing the art
- if(istype(martial_art, /datum/martial_art/drunk_brawling))
- martial_art.remove(src)
- if(alcohol_strength >= confused_start && prob(33)) //confused walking
- if(!confused) Confused(1)
- AdjustConfused(3/sober_str)
- if(alcohol_strength >= blur_start) //blurry eyes
- EyeBlurry(10/sober_str)
- if(!isSynthetic()) //stuff only for non-synthetics
- if(alcohol_strength >= vomit_start) //vomiting
- if(prob(8))
- fakevomit()
- if(alcohol_strength >= pass_out)
- Paralyse(5/sober_str)
- Drowsy(30/sober_str)
- if(L)
- L.receive_damage(0.1, 1)
- adjustToxLoss(0.1)
- else //stuff only for synthetics
- if(alcohol_strength >= spark_start && prob(25))
- do_sparks(3, 1, src)
- if(alcohol_strength >= collapse_start && prob(10))
- emote("collapse")
- do_sparks(3, 1, src)
- if(alcohol_strength >= braindamage_start && prob(10))
- adjustBrainLoss(1)
+ L.receive_damage(0.1, 1)
+ adjustToxLoss(0.1)
+ else //stuff only for synthetics
+ if(alcohol_strength >= spark_start && prob(25))
+ do_sparks(3, 1, src)
+ if(alcohol_strength >= collapse_start && prob(10))
+ emote("collapse")
+ do_sparks(3, 1, src)
+ if(alcohol_strength >= braindamage_start && prob(10))
+ adjustBrainLoss(1)
if(!has_booze())
AdjustDrunk(-0.5)
- return
/mob/living/carbon/human/proc/has_booze() //checks if the human has ethanol or its subtypes inside
for(var/A in reagents.reagent_list)
@@ -740,180 +748,154 @@
return 1
return 0
-/mob/living/carbon/human/handle_regular_status_updates()
+/mob/living/carbon/human/handle_critical_condition()
if(status_flags & GODMODE)
return 0
- . = ..()
+ var/guaranteed_death_threshold = health + (getOxyLoss() * 0.5) - (getFireLoss() * 0.67) - (getBruteLoss() * 0.67)
- if(.) //alive
- if(REGEN in mutations)
- heal_overall_damage(0.1, 0.1)
+ if(getBrainLoss() >= 120 || (guaranteed_death_threshold) <= -500)
+ death()
+ return
- if(paralysis)
- stat = UNCONSCIOUS
+ if(getBrainLoss() >= 100) // braindeath
+ AdjustLoseBreath(10, bound_lower = 0, bound_upper = 25)
+ Weaken(30)
- else if(sleeping)
+ if(!check_death_method())
+ if(health <= HEALTH_THRESHOLD_DEAD)
+ var/deathchance = min(99, ((getBrainLoss() * -5) + (health + (getOxyLoss() / 2))) * -0.01)
+ if(prob(deathchance))
+ death()
+ return
- stat = UNCONSCIOUS
+ if(health <= HEALTH_THRESHOLD_CRIT)
+ if(prob(5))
+ emote(pick("faint", "collapse", "cry", "moan", "gasp", "shudder", "shiver"))
+ AdjustStuttering(5, bound_lower = 0, bound_upper = 5)
+ EyeBlurry(5)
+ if(prob(7))
+ AdjustConfused(2)
+ if(prob(5))
+ Paralyse(2)
+ switch(health)
+ if(-INFINITY to -100)
+ adjustOxyLoss(1)
+ if(prob(health * -0.1))
+ if(ishuman(src))
+ var/mob/living/carbon/human/H = src
+ H.set_heartattack(TRUE)
+ if(prob(health * -0.2))
+ var/datum/disease/D = new /datum/disease/critical/heart_failure
+ ForceContractDisease(D)
+ Paralyse(5)
+ if(-99 to -80)
+ adjustOxyLoss(1)
+ if(prob(4))
+ to_chat(src, "Your chest hurts...")
+ Paralyse(2)
+ var/datum/disease/D = new /datum/disease/critical/heart_failure
+ ForceContractDisease(D)
+ if(-79 to -50)
+ adjustOxyLoss(1)
+ if(prob(10))
+ var/datum/disease/D = new /datum/disease/critical/shock
+ ForceContractDisease(D)
+ if(prob(health * -0.08))
+ var/datum/disease/D = new /datum/disease/critical/heart_failure
+ ForceContractDisease(D)
+ if(prob(6))
+ to_chat(src, "You feel [pick("horrible pain", "awful", "like shit", "absolutely awful", "like death", "like you are dying", "nothing", "warm", "sweaty", "tingly", "really, really bad", "horrible")]!")
+ Weaken(3)
+ if(prob(3))
+ Paralyse(2)
+ if(-49 to 0)
+ adjustOxyLoss(1)
+ if(prob(3))
+ var/datum/disease/D = new /datum/disease/critical/shock
+ ForceContractDisease(D)
+ if(prob(5))
+ to_chat(src, "You feel [pick("terrible", "awful", "like shit", "sick", "numb", "cold", "sweaty", "tingly", "horrible")]!")
+ Weaken(3)
- if(mind)
- if(mind.vampire)
- if(istype(loc, /obj/structure/closet/coffin))
- adjustBruteLoss(-1)
- adjustFireLoss(-1)
- adjustToxLoss(-1)
-
- else if(status_flags & FAKEDEATH)
- stat = UNCONSCIOUS
-
- //Vision //god knows why this is here
- var/obj/item/organ/vision
- if(dna.species.vision_organ)
- vision = get_int_organ(dna.species.vision_organ)
-
- if(!dna.species.vision_organ) // Presumably if a species has no vision organs, they see via some other means.
- SetEyeBlind(0)
- SetEyeBlurry(0)
-
- else if(!vision || vision.is_broken()) // Vision organs cut out or broken? Permablind.
- EyeBlind(2)
- EyeBlurry(2)
-
- else
- //blindness
- if(disabilities & BLIND) // Disabled-blind, doesn't get better on its own
-
- else if(eye_blind) // Blindness, heals slowly over time
- AdjustEyeBlind(-1)
-
- else if(istype(glasses, /obj/item/clothing/glasses/sunglasses/blindfold)) //resting your eyes with a blindfold heals blurry eyes faster
- AdjustEyeBlurry(-3)
-
- //blurry sight
- if(vision.is_bruised()) // Vision organs impaired? Permablurry.
- EyeBlurry(2)
-
- if(eye_blurry) // Blurry eyes heal slowly
- AdjustEyeBlurry(-1)
-
-
- if(flying)
- animate(src, pixel_y = pixel_y + 5 , time = 10, loop = 1, easing = SINE_EASING)
- animate(pixel_y = pixel_y - 5, time = 10, loop = 1, easing = SINE_EASING)
-
- // If you're dirty, your gloves will become dirty, too.
- if(gloves && germ_level > gloves.germ_level && prob(10))
- gloves.germ_level += 1
-
- handle_organs()
-
- var/guaranteed_death_threshold = health + (getOxyLoss() * 0.5) - (getFireLoss() * 0.67) - (getBruteLoss() * 0.67)
-
- if(getBrainLoss() >= 120 || (guaranteed_death_threshold) <= -500)
- death()
- return
-
- if(getBrainLoss() >= 100) // braindeath
- AdjustLoseBreath(10, bound_lower = 0, bound_upper = 25)
- Weaken(30)
-
- if(!check_death_method())
- if(health <= HEALTH_THRESHOLD_DEAD)
- var/deathchance = min(99, ((getBrainLoss() * -5) + (health + (getOxyLoss() / 2))) * -0.01)
- if(prob(deathchance))
- death()
- return
-
- if(health <= HEALTH_THRESHOLD_CRIT)
- if(prob(5))
- emote(pick("faint", "collapse", "cry", "moan", "gasp", "shudder", "shiver"))
- AdjustStuttering(5, bound_lower = 0, bound_upper = 5)
- EyeBlurry(5)
- if(prob(7))
- AdjustConfused(2)
- if(prob(5))
- Paralyse(2)
- switch(health)
- if(-INFINITY to -100)
- adjustOxyLoss(1)
- if(prob(health * -0.1))
- if(ishuman(src))
- var/mob/living/carbon/human/H = src
- H.set_heartattack(TRUE)
- if(prob(health * -0.2))
- var/datum/disease/D = new /datum/disease/critical/heart_failure
- ForceContractDisease(D)
- Paralyse(5)
- if(-99 to -80)
- adjustOxyLoss(1)
- if(prob(4))
- to_chat(src, "Your chest hurts...")
- Paralyse(2)
- var/datum/disease/D = new /datum/disease/critical/heart_failure
- ForceContractDisease(D)
- if(-79 to -50)
- adjustOxyLoss(1)
- if(prob(10))
- var/datum/disease/D = new /datum/disease/critical/shock
- ForceContractDisease(D)
- if(prob(health * -0.08))
- var/datum/disease/D = new /datum/disease/critical/heart_failure
- ForceContractDisease(D)
- if(prob(6))
- to_chat(src, "You feel [pick("horrible pain", "awful", "like shit", "absolutely awful", "like death", "like you are dying", "nothing", "warm", "sweaty", "tingly", "really, really bad", "horrible")]!")
- Weaken(3)
- if(prob(3))
- Paralyse(2)
- if(-49 to 0)
- adjustOxyLoss(1)
- if(prob(3))
- var/datum/disease/D = new /datum/disease/critical/shock
- ForceContractDisease(D)
- if(prob(5))
- to_chat(src, "You feel [pick("terrible", "awful", "like shit", "sick", "numb", "cold", "sweaty", "tingly", "horrible")]!")
- Weaken(3)
-
- else //dead
- SetSilence(0)
-
-
-/mob/living/carbon/human/handle_vision()
- if(machine)
- if(!machine.check_eye(src))
- reset_perspective(null)
+/mob/living/carbon/human/update_health_hud()
+ if(!client)
+ return
+ if(dna.species.update_health_hud())
+ return
else
- var/isRemoteObserve = 0
- if((REMOTE_VIEW in mutations) && remoteview_target)
- isRemoteObserve = 1
+ if(healths)
+ var/health_amount = get_perceived_trauma()
+ if(..(health_amount)) //not dead
+ switch(hal_screwyhud)
+ if(SCREWYHUD_CRIT)
+ healths.icon_state = "health6"
+ if(SCREWYHUD_DEAD)
+ healths.icon_state = "health7"
+ if(SCREWYHUD_HEALTHY)
+ healths.icon_state = "health0"
- if(remoteview_target.stat != CONSCIOUS)
- to_chat(src, "Your psy-connection grows too faint to maintain!")
- isRemoteObserve = 0
+ if(healthdoll)
+ if(stat == DEAD)
+ healthdoll.icon_state = "healthdoll_DEAD"
+ if(healthdoll.overlays.len)
+ healthdoll.overlays.Cut()
+ else
+ var/list/new_overlays = list()
+ var/list/cached_overlays = healthdoll.cached_healthdoll_overlays
+ // Use the dead health doll as the base, since we have proper "healthy" overlays now
+ healthdoll.icon_state = "healthdoll_DEAD"
+ for(var/obj/item/organ/external/O in bodyparts)
+ var/damage = O.burn_dam + O.brute_dam
+ var/comparison = (O.max_damage/5)
+ var/icon_num = 0
+ if(damage)
+ icon_num = 1
+ if(damage > (comparison))
+ icon_num = 2
+ if(damage > (comparison*2))
+ icon_num = 3
+ if(damage > (comparison*3))
+ icon_num = 4
+ if(damage > (comparison*4))
+ icon_num = 5
+ new_overlays += "[O.limb_name][icon_num]"
+ healthdoll.overlays += (new_overlays - cached_overlays)
+ healthdoll.overlays -= (cached_overlays - new_overlays)
+ healthdoll.cached_healthdoll_overlays = new_overlays
- if(PSY_RESIST in remoteview_target.mutations)
- to_chat(src, "Your mind is shut out!")
- isRemoteObserve = 0
+/mob/living/carbon/human/proc/handle_nutrition_alerts() //This is a terrible abuse of the alert system; something like this should be a HUD element
+ if(NO_HUNGER in dna.species.species_traits)
+ return
+ if(mind?.vampire && (mind in SSticker.mode.vampires)) //Vampires
+ switch(nutrition)
+ if(NUTRITION_LEVEL_FULL to INFINITY)
+ throw_alert("nutrition", /obj/screen/alert/fat/vampire)
+ if(NUTRITION_LEVEL_WELL_FED to NUTRITION_LEVEL_FULL)
+ throw_alert("nutrition", /obj/screen/alert/full/vampire)
+ if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
+ throw_alert("nutrition", /obj/screen/alert/well_fed/vampire)
+ if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
+ throw_alert("nutrition", /obj/screen/alert/fed/vampire)
+ if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
+ throw_alert("nutrition", /obj/screen/alert/hungry/vampire)
+ else
+ throw_alert("nutrition", /obj/screen/alert/starving/vampire)
- // Not on the station or mining?
- var/turf/temp_turf = get_turf(remoteview_target)
- if(!(temp_turf in config.contact_levels))
- to_chat(src, "Your psy-connection grows too faint to maintain!")
- isRemoteObserve = 0
-
- if(remote_view)
- isRemoteObserve = 1
-
- if(!isRemoteObserve && client && !client.adminobs)
- remoteview_target = null
- reset_perspective(null)
-
-/mob/living/carbon/human/handle_hud_icons()
- dna.species.handle_hud_icons(src)
-
-/mob/living/carbon/human/handle_hud_icons_health()
- dna.species.handle_hud_icons_health(src)
- handle_hud_icons_health_overlay()
+ else //Any other non-vampires
+ switch(nutrition)
+ if(NUTRITION_LEVEL_FULL to INFINITY)
+ throw_alert("nutrition", /obj/screen/alert/fat)
+ if(NUTRITION_LEVEL_WELL_FED to NUTRITION_LEVEL_FULL)
+ throw_alert("nutrition", /obj/screen/alert/full)
+ if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
+ throw_alert("nutrition", /obj/screen/alert/well_fed)
+ if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
+ throw_alert("nutrition", /obj/screen/alert/fed)
+ if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
+ throw_alert("nutrition", /obj/screen/alert/hungry)
+ else
+ throw_alert("nutrition", /obj/screen/alert/starving)
/mob/living/carbon/human/handle_random_events()
// Puke if toxloss is too high
@@ -942,15 +924,14 @@
clear_alert("embeddedobject")
/mob/living/carbon/human/handle_changeling()
- if(mind)
- if(mind.changeling)
- mind.changeling.regenerate(src)
- if(hud_used)
- hud_used.lingchemdisplay.invisibility = 0
- hud_used.lingchemdisplay.maptext = "[round(mind.changeling.chem_charges)]
"
- else
- if(hud_used)
- hud_used.lingchemdisplay.invisibility = 101
+ if(mind.changeling)
+ mind.changeling.regenerate(src)
+ if(hud_used)
+ hud_used.lingchemdisplay.invisibility = 0
+ hud_used.lingchemdisplay.maptext = "[round(mind.changeling.chem_charges)]
"
+ else
+ if(hud_used)
+ hud_used.lingchemdisplay.invisibility = 101
/mob/living/carbon/human/proc/handle_pulse(times_fired)
diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm
index b53fa03cebf..98edb60c6bf 100644
--- a/code/modules/mob/living/carbon/human/say.dm
+++ b/code/modules/mob/living/carbon/human/say.dm
@@ -151,7 +151,7 @@
if(S.speaking && S.speaking.flags & NO_STUTTER)
continue
- if(silent || (disabilities & MUTE))
+ if(silent || (MUTE in mutations))
S.message = ""
if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm
index 06b42202b45..21695e25e78 100644
--- a/code/modules/mob/living/carbon/human/species/_species.dm
+++ b/code/modules/mob/living/carbon/human/species/_species.dm
@@ -754,105 +754,8 @@
return FALSE //Unsupported slot
-/datum/species/proc/get_perceived_trauma(mob/living/carbon/human/H)
- return min(H.health, H.maxHealth - H.getStaminaLoss())
-
-/datum/species/proc/handle_hud_icons(mob/living/carbon/human/H)
- if(!H.client)
- return
- handle_hud_icons_health(H)
- H.handle_hud_icons_health_overlay()
- handle_hud_icons_nutrition(H)
-
-/datum/species/proc/handle_hud_icons_health(mob/living/carbon/H)
- if(!H.client)
- return
- handle_hud_icons_health_side(H)
- handle_hud_icons_health_doll(H)
-
-/datum/species/proc/handle_hud_icons_health_side(mob/living/carbon/human/H)
- if(H.healths)
- if(H.stat == DEAD || (H.status_flags & FAKEDEATH))
- H.healths.icon_state = "health7"
- else
- switch(H.hal_screwyhud)
- if(SCREWYHUD_CRIT) H.healths.icon_state = "health6"
- if(SCREWYHUD_DEAD) H.healths.icon_state = "health7"
- if(SCREWYHUD_HEALTHY) H.healths.icon_state = "health0"
- else
- switch(get_perceived_trauma(H))
- if(100 to INFINITY) H.healths.icon_state = "health0"
- if(80 to 100) H.healths.icon_state = "health1"
- if(60 to 80) H.healths.icon_state = "health2"
- if(40 to 60) H.healths.icon_state = "health3"
- if(20 to 40) H.healths.icon_state = "health4"
- if(0 to 20) H.healths.icon_state = "health5"
- else H.healths.icon_state = "health6"
-
-/datum/species/proc/handle_hud_icons_health_doll(mob/living/carbon/human/H)
- if(H.healthdoll)
- if(H.stat == DEAD || (H.status_flags & FAKEDEATH))
- H.healthdoll.icon_state = "healthdoll_DEAD"
- if(H.healthdoll.overlays.len)
- H.healthdoll.overlays.Cut()
- else
- var/list/new_overlays = list()
- var/list/cached_overlays = H.healthdoll.cached_healthdoll_overlays
- // Use the dead health doll as the base, since we have proper "healthy" overlays now
- H.healthdoll.icon_state = "healthdoll_DEAD"
- for(var/obj/item/organ/external/O in H.bodyparts)
- var/damage = O.burn_dam + O.brute_dam
- var/comparison = (O.max_damage/5)
- var/icon_num = 0
- if(damage)
- icon_num = 1
- if(damage > (comparison))
- icon_num = 2
- if(damage > (comparison*2))
- icon_num = 3
- if(damage > (comparison*3))
- icon_num = 4
- if(damage > (comparison*4))
- icon_num = 5
- new_overlays += "[O.limb_name][icon_num]"
- H.healthdoll.overlays += (new_overlays - cached_overlays)
- H.healthdoll.overlays -= (cached_overlays - new_overlays)
- H.healthdoll.cached_healthdoll_overlays = new_overlays
-
-/datum/species/proc/handle_hud_icons_nutrition(mob/living/carbon/human/H)
- if(NO_HUNGER in species_traits)
- return FALSE
- if(H.mind && H.mind.vampire && (H.mind in SSticker.mode.vampires)) //Vampires
- switch(H.nutrition)
- if(NUTRITION_LEVEL_FULL to INFINITY)
- H.throw_alert("nutrition", /obj/screen/alert/fat/vampire)
- if(NUTRITION_LEVEL_WELL_FED to NUTRITION_LEVEL_FULL)
- H.throw_alert("nutrition", /obj/screen/alert/full/vampire)
- if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
- H.throw_alert("nutrition", /obj/screen/alert/well_fed/vampire)
- if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
- H.throw_alert("nutrition", /obj/screen/alert/fed/vampire)
- if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
- H.throw_alert("nutrition", /obj/screen/alert/hungry/vampire)
- else
- H.throw_alert("nutrition", /obj/screen/alert/starving/vampire)
- return 1
-
- else ///Any other non-vampires
- switch(H.nutrition)
- if(NUTRITION_LEVEL_FULL to INFINITY)
- H.throw_alert("nutrition", /obj/screen/alert/fat)
- if(NUTRITION_LEVEL_WELL_FED to NUTRITION_LEVEL_FULL)
- H.throw_alert("nutrition", /obj/screen/alert/full)
- if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
- H.throw_alert("nutrition", /obj/screen/alert/well_fed)
- if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
- H.throw_alert("nutrition", /obj/screen/alert/fed)
- if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
- H.throw_alert("nutrition", /obj/screen/alert/hungry)
- else
- H.throw_alert("nutrition", /obj/screen/alert/starving)
- return 1
+/datum/species/proc/update_health_hud(mob/living/carbon/human/H)
+ return FALSE
/*
Returns the path corresponding to the corresponding organ
diff --git a/code/modules/mob/living/carbon/human/species/slime.dm b/code/modules/mob/living/carbon/human/species/slime.dm
index 0a708db223f..60f972b69a4 100644
--- a/code/modules/mob/living/carbon/human/species/slime.dm
+++ b/code/modules/mob/living/carbon/human/species/slime.dm
@@ -95,7 +95,7 @@
var/obj/item/organ/external/E = H.bodyparts_by_name[organname]
if(istype(E) && E.dna && istype(E.dna.species, /datum/species/slime))
E.sync_colour_to_human(H)
- H.update_hair(0)
+ H.update_hair()
H.update_body()
..()
diff --git a/code/modules/mob/living/carbon/human/species/tajaran.dm b/code/modules/mob/living/carbon/human/species/tajaran.dm
index 1b1589cb6fd..903e4a32332 100644
--- a/code/modules/mob/living/carbon/human/species/tajaran.dm
+++ b/code/modules/mob/living/carbon/human/species/tajaran.dm
@@ -56,4 +56,4 @@
"is holding their breath!")
/datum/species/tajaran/handle_death(gibbed, mob/living/carbon/human/H)
- H.stop_tail_wagging(1)
+ H.stop_tail_wagging()
diff --git a/code/modules/mob/living/carbon/human/species/unathi.dm b/code/modules/mob/living/carbon/human/species/unathi.dm
index 61c34ab41d9..d4e9b02cd9b 100644
--- a/code/modules/mob/living/carbon/human/species/unathi.dm
+++ b/code/modules/mob/living/carbon/human/species/unathi.dm
@@ -104,7 +104,7 @@
return
/datum/species/unathi/handle_death(gibbed, mob/living/carbon/human/H)
- H.stop_tail_wagging(1)
+ H.stop_tail_wagging()
/datum/species/unathi/ashwalker
name = "Ash Walker"
diff --git a/code/modules/mob/living/carbon/human/species/vox.dm b/code/modules/mob/living/carbon/human/species/vox.dm
index e803a33f3ec..6ac20e77b9b 100644
--- a/code/modules/mob/living/carbon/human/species/vox.dm
+++ b/code/modules/mob/living/carbon/human/species/vox.dm
@@ -76,7 +76,7 @@
speciesbox = /obj/item/storage/box/survival_vox
/datum/species/vox/handle_death(gibbed, mob/living/carbon/human/H)
- H.stop_tail_wagging(1)
+ H.stop_tail_wagging()
/datum/species/vox/after_equip_job(datum/job/J, mob/living/carbon/human/H)
if(!H.mind || !H.mind.assigned_role || H.mind.assigned_role != "Clown" && H.mind.assigned_role != "Mime")
diff --git a/code/modules/mob/living/carbon/human/species/vulpkanin.dm b/code/modules/mob/living/carbon/human/species/vulpkanin.dm
index 9a313042d2d..920cd86659d 100644
--- a/code/modules/mob/living/carbon/human/species/vulpkanin.dm
+++ b/code/modules/mob/living/carbon/human/species/vulpkanin.dm
@@ -50,4 +50,4 @@
"is holding their breath!")
/datum/species/vulpkanin/handle_death(gibbed, mob/living/carbon/human/H)
- H.stop_tail_wagging(1)
+ H.stop_tail_wagging()
diff --git a/code/modules/mob/living/carbon/human/species/wryn.dm b/code/modules/mob/living/carbon/human/species/wryn.dm
index 9e02e2e28be..080a67a032b 100644
--- a/code/modules/mob/living/carbon/human/species/wryn.dm
+++ b/code/modules/mob/living/carbon/human/species/wryn.dm
@@ -50,7 +50,7 @@
/datum/species/wryn/handle_death(gibbed, mob/living/carbon/human/H)
- for(var/mob/living/carbon/C in GLOB.living_mob_list)
+ for(var/mob/living/carbon/C in GLOB.alive_mob_list)
if(C.get_int_organ(/obj/item/organ/internal/wryn/hivenode))
to_chat(C, "Your antennae tingle as you are overcome with pain...")
to_chat(C, "It feels like part of you has died.") // This is bullshit
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index cbc768cdd02..2cce48d51c2 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -77,14 +77,14 @@ There are several things that need to be remembered:
If you wish to update several overlays at once, you can set the argument to 0 to disable the update and call
it manually:
e.g.
- update_inv_head(0)
- update_inv_l_hand(0)
+ update_inv_head()
+ update_inv_l_hand()
update_inv_r_hand() //<---calls update_icons()
or equivillantly:
- update_inv_head(0)
- update_inv_l_hand(0)
- update_inv_r_hand(0)
+ update_inv_head()
+ update_inv_l_hand()
+ update_inv_r_hand()
update_icons()
> If you need to update all overlays you can use regenerate_icons(). it works exactly like update_clothing used to.
@@ -124,7 +124,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
//DAMAGE OVERLAYS
//constructs damage icon for each organ from mask * damage field and saves it in our overlays_ lists
-/mob/living/carbon/human/UpdateDamageIcon(var/update_icons=1)
+/mob/living/carbon/human/UpdateDamageIcon()
// first check whether something actually changed about damage appearance
var/damage_appearance = ""
@@ -164,7 +164,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
//BASE MOB SPRITE
-/mob/living/carbon/human/proc/update_body(var/update_icons=1, var/rebuild_base=0)
+/mob/living/carbon/human/proc/update_body(rebuild_base = FALSE)
remove_overlay(BODY_LAYER)
remove_overlay(LIMBS_LAYER) // So we don't get the old species' sprite splatted on top of the new one's
remove_overlay(UNDERWEAR_LAYER)
@@ -281,19 +281,19 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
overlays_standing[BODY_LAYER] = standing
apply_overlay(BODY_LAYER)
//tail
- update_tail_layer(0)
+ update_tail_layer()
update_int_organs()
//head accessory
- update_head_accessory(0)
+ update_head_accessory()
//markings
- update_markings(0)
+ update_markings()
//hair
- update_hair(0)
- update_fhair(0)
+ update_hair()
+ update_fhair()
//MARKINGS OVERLAY
-/mob/living/carbon/human/proc/update_markings(var/update_icons=1)
+/mob/living/carbon/human/proc/update_markings()
//Reset our markings.
remove_overlay(MARKINGS_LAYER)
@@ -325,7 +325,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
apply_overlay(MARKINGS_LAYER)
//HEAD ACCESSORY OVERLAY
-/mob/living/carbon/human/proc/update_head_accessory(var/update_icons=1)
+/mob/living/carbon/human/proc/update_head_accessory()
//Reset our head accessory
remove_overlay(HEAD_ACCESSORY_LAYER)
remove_overlay(HEAD_ACC_OVER_LAYER)
@@ -362,7 +362,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
//HAIR OVERLAY
-/mob/living/carbon/human/proc/update_hair(var/update_icons=1)
+/mob/living/carbon/human/proc/update_hair()
//Reset our hair
remove_overlay(HAIR_LAYER)
@@ -403,7 +403,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
//FACIAL HAIR OVERLAY
-/mob/living/carbon/human/proc/update_fhair(var/update_icons=1)
+/mob/living/carbon/human/proc/update_fhair()
//Reset our facial hair
remove_overlay(FHAIR_LAYER)
remove_overlay(FHAIR_OVER_LAYER)
@@ -447,7 +447,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
-/mob/living/carbon/human/update_mutations(var/update_icons=1)
+/mob/living/carbon/human/update_mutations()
remove_overlay(MUTATIONS_LAYER)
var/mutable_appearance/standing = mutable_appearance('icons/effects/genetics.dmi', layer = -MUTATIONS_LAYER)
var/add_image = 0
@@ -478,7 +478,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
apply_overlay(MUTATIONS_LAYER)
-/mob/living/carbon/human/proc/update_mutantrace(var/update_icons=1)
+/mob/living/carbon/human/proc/update_mutantrace()
//BS12 EDIT
var/skel = (SKELETON in mutations)
if(skel)
@@ -486,8 +486,8 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
else
skeleton = null
- update_hair(0)
- update_fhair(0)
+ update_hair()
+ update_fhair()
/mob/living/carbon/human/update_fire()
@@ -501,41 +501,42 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
//For legacy support.
/mob/living/carbon/human/regenerate_icons()
..()
- if(notransform) return
- update_mutations(0)
- update_body(0, 1) //Update the body and force limb icon regeneration.
- update_hair(0)
- update_head_accessory(0)
- update_fhair(0)
- update_mutantrace(0)
- update_inv_w_uniform(0,0)
- update_inv_wear_id(0)
- update_inv_gloves(0,0)
- update_inv_glasses(0)
- update_inv_ears(0)
- update_inv_shoes(0,0)
- update_inv_s_store(0)
- update_inv_wear_mask(0)
- update_inv_head(0,0)
- update_inv_belt(0)
- update_inv_back(0)
- update_inv_wear_suit(0)
- update_inv_r_hand(0)
- update_inv_l_hand(0)
- update_inv_handcuffed(0)
- update_inv_legcuffed(0)
- update_inv_pockets(0)
- update_inv_wear_pda(0)
- UpdateDamageIcon(0)
+ if(notransform)
+ return
+ update_mutations()
+ update_body(TRUE) //Update the body and force limb icon regeneration.
+ update_hair()
+ update_head_accessory()
+ update_fhair()
+ update_mutantrace()
+ update_inv_w_uniform()
+ update_inv_wear_id()
+ update_inv_gloves()
+ update_inv_glasses()
+ update_inv_ears()
+ update_inv_shoes()
+ update_inv_s_store()
+ update_inv_wear_mask()
+ update_inv_head()
+ update_inv_belt()
+ update_inv_back()
+ update_inv_wear_suit()
+ update_inv_r_hand()
+ update_inv_l_hand()
+ update_inv_handcuffed()
+ update_inv_legcuffed()
+ update_inv_pockets()
+ update_inv_wear_pda()
+ UpdateDamageIcon()
force_update_limbs()
- update_tail_layer(0)
+ update_tail_layer()
overlays.Cut() // Force all overlays to regenerate
update_fire()
update_icons()
/* --------------------------------------- */
//vvvvvv UPDATE_INV PROCS vvvvvv
-/mob/living/carbon/human/update_inv_w_uniform(var/update_icons=1)
+/mob/living/carbon/human/update_inv_w_uniform()
remove_overlay(UNIFORM_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_w_uniform]
@@ -593,7 +594,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
thing.plane = initial(thing.plane)
apply_overlay(UNIFORM_LAYER)
-/mob/living/carbon/human/update_inv_wear_id(var/update_icons=1)
+/mob/living/carbon/human/update_inv_wear_id()
remove_overlay(ID_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_wear_id]
@@ -609,7 +610,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
overlays_standing[ID_LAYER] = mutable_appearance('icons/mob/mob.dmi', "id", layer = -ID_LAYER)
apply_overlay(ID_LAYER)
-/mob/living/carbon/human/update_inv_gloves(var/update_icons=1)
+/mob/living/carbon/human/update_inv_gloves()
remove_overlay(GLOVES_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_gloves]
@@ -646,7 +647,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
apply_overlay(GLOVES_LAYER)
-/mob/living/carbon/human/update_inv_glasses(var/update_icons=1)
+/mob/living/carbon/human/update_inv_glasses()
remove_overlay(GLASSES_LAYER)
remove_overlay(GLASSES_OVER_LAYER)
remove_overlay(OVER_MASK_LAYER)
@@ -687,7 +688,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
update_misc_effects()
-/mob/living/carbon/human/update_inv_ears(var/update_icons=1)
+/mob/living/carbon/human/update_inv_ears()
remove_overlay(EARS_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_l_ear]
@@ -735,7 +736,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
overlays_standing[EARS_LAYER] = mutable_appearance('icons/mob/ears.dmi', "[t_type]", layer = -EARS_LAYER)
apply_overlay(EARS_LAYER)
-/mob/living/carbon/human/update_inv_shoes(var/update_icons=1)
+/mob/living/carbon/human/update_inv_shoes()
remove_overlay(SHOES_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_shoes]
@@ -771,7 +772,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
overlays_standing[SHOES_LAYER] = bloodsies
apply_overlay(SHOES_LAYER)
-/mob/living/carbon/human/update_inv_s_store(var/update_icons=1)
+/mob/living/carbon/human/update_inv_s_store()
remove_overlay(SUIT_STORE_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_s_store]
@@ -792,7 +793,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
apply_overlay(SUIT_STORE_LAYER)
-/mob/living/carbon/human/update_inv_head(var/update_icons=1)
+/mob/living/carbon/human/update_inv_head()
..()
remove_overlay(HEAD_LAYER)
if(client && hud_used)
@@ -818,7 +819,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
overlays_standing[HEAD_LAYER] = standing
apply_overlay(HEAD_LAYER)
-/mob/living/carbon/human/update_inv_belt(var/update_icons=1)
+/mob/living/carbon/human/update_inv_belt()
remove_overlay(BELT_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_belt]
@@ -844,7 +845,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
apply_overlay(BELT_LAYER)
-/mob/living/carbon/human/update_inv_wear_suit(var/update_icons=1)
+/mob/living/carbon/human/update_inv_wear_suit()
remove_overlay(SUIT_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_wear_suit]
@@ -885,8 +886,8 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
overlays_standing[SUIT_LAYER] = standing
apply_overlay(SUIT_LAYER)
- update_tail_layer(0)
- update_collar(0)
+ update_tail_layer()
+ update_collar()
/mob/living/carbon/human/update_inv_pockets()
if(client && hud_used)
@@ -919,7 +920,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
client.screen += wear_pda
wear_pda.screen_loc = ui_pda
-/mob/living/carbon/human/update_inv_wear_mask(var/update_icons = 1)
+/mob/living/carbon/human/update_inv_wear_mask()
..()
remove_overlay(FACEMASK_LAYER)
if(client && hud_used)
@@ -955,7 +956,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
apply_overlay(FACEMASK_LAYER)
-/mob/living/carbon/human/update_inv_back(var/update_icons=1)
+/mob/living/carbon/human/update_inv_back()
..()
remove_overlay(BACK_LAYER)
if(back)
@@ -978,7 +979,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
overlays_standing[BACK_LAYER] = standing
apply_overlay(BACK_LAYER)
-/mob/living/carbon/human/update_inv_handcuffed(var/update_icons=1)
+/mob/living/carbon/human/update_inv_handcuffed()
remove_overlay(HANDCUFF_LAYER)
if(handcuffed)
if(istype(handcuffed, /obj/item/restraints/handcuffs/pinkcuffs))
@@ -987,7 +988,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
overlays_standing[HANDCUFF_LAYER] = mutable_appearance('icons/mob/mob.dmi', "handcuff1", layer = -HANDCUFF_LAYER)
apply_overlay(HANDCUFF_LAYER)
-/mob/living/carbon/human/update_inv_legcuffed(var/update_icons=1)
+/mob/living/carbon/human/update_inv_legcuffed()
remove_overlay(LEGCUFF_LAYER)
clear_alert("legcuffed")
if(legcuffed)
@@ -1000,7 +1001,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
apply_overlay(LEGCUFF_LAYER)
-/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1)
+/mob/living/carbon/human/update_inv_r_hand()
..()
remove_overlay(R_HAND_LAYER)
if(r_hand)
@@ -1019,7 +1020,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
apply_overlay(R_HAND_LAYER)
-/mob/living/carbon/human/update_inv_l_hand(var/update_icons=1)
+/mob/living/carbon/human/update_inv_l_hand()
..()
remove_overlay(L_HAND_LAYER)
if(l_hand)
@@ -1060,7 +1061,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
client.screen += I
-/mob/living/carbon/human/proc/update_tail_layer(var/update_icons=1)
+/mob/living/carbon/human/proc/update_tail_layer()
remove_overlay(TAIL_UNDERLIMBS_LAYER) // SEW direction icons, overlayed by LIMBS_LAYER.
remove_overlay(TAIL_LAYER) /* This will be one of two things:
If the species' tail is overlapped by limbs, this will be only the N direction icon so tails
@@ -1135,7 +1136,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
apply_overlay(TAIL_LAYER)
apply_overlay(TAIL_UNDERLIMBS_LAYER)
-/mob/living/carbon/human/proc/start_tail_wagging(var/update_icons=1)
+/mob/living/carbon/human/proc/start_tail_wagging()
remove_overlay(TAIL_UNDERLIMBS_LAYER) // SEW direction icons, overlayed by LIMBS_LAYER.
remove_overlay(TAIL_LAYER) /* This will be one of two things:
If the species' tail is overlapped by limbs, this will be only the N direction icon so tails
@@ -1211,10 +1212,10 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
apply_overlay(TAIL_LAYER)
apply_overlay(TAIL_UNDERLIMBS_LAYER)
-/mob/living/carbon/human/proc/stop_tail_wagging(var/update_icons=1)
+/mob/living/carbon/human/proc/stop_tail_wagging()
remove_overlay(TAIL_UNDERLIMBS_LAYER)
remove_overlay(TAIL_LAYER)
- update_tail_layer(update_icons) //just trigger a full update for normal stationary sprites
+ update_tail_layer() //just trigger a full update for normal stationary sprites
/mob/living/carbon/human/proc/update_int_organs()
remove_overlay(INTORGAN_LAYER)
@@ -1236,7 +1237,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
//Adds a collar overlay above the helmet layer if the suit has one
// Suit needs an identically named sprite in icons/mob/collar.dmi
// For suits with sprite_sheets, an identically named sprite needs to exist in a file like this icons/mob/species/[species_name_here]/collar.dmi.
-/mob/living/carbon/human/proc/update_collar(var/update_icons=1)
+/mob/living/carbon/human/proc/update_collar()
remove_overlay(COLLAR_LAYER)
var/icon/C = new('icons/mob/collar.dmi')
var/mutable_appearance/standing = null
@@ -1282,7 +1283,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
/mob/living/carbon/human/proc/force_update_limbs()
for(var/obj/item/organ/external/O in bodyparts)
O.sync_colour_to_human(src)
- update_body(0)
+ update_body()
/mob/living/carbon/human/proc/get_overlays_copy(list/unwantedLayers)
var/list/out = new
diff --git a/code/modules/mob/living/carbon/human/update_stat.dm b/code/modules/mob/living/carbon/human/update_stat.dm
index 14c87e13722..d5d1801e1a7 100644
--- a/code/modules/mob/living/carbon/human/update_stat.dm
+++ b/code/modules/mob/living/carbon/human/update_stat.dm
@@ -12,7 +12,7 @@
/mob/living/carbon/human/update_nearsighted_effects()
var/obj/item/clothing/glasses/G = glasses
- if((disabilities & NEARSIGHTED) && (!istype(G) || !G.prescription))
+ if((NEARSIGHTED in mutations) && (!istype(G) || !G.prescription))
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
else
clear_fullscreen("nearsighted")
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index 87832154876..66e2e60f144 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -1,25 +1,35 @@
/mob/living/carbon/Life(seconds, times_fired)
set invisibility = 0
- set background = BACKGROUND_ENABLED
if(notransform)
return
- if(!loc)
+
+ if(damageoverlaytemp)
+ damageoverlaytemp = 0
+ update_damage_hud()
+
+ if(stat != DEAD)
+ handle_organs()
+
+ . = ..()
+
+ if(QDELETED(src))
return
- if(..())
- . = 1
+ if(.) //not dead
handle_blood()
- for(var/obj/item/organ/internal/O in internal_organs)
- O.on_life()
- handle_patches()
- handle_changeling()
+ if(LAZYLEN(processing_patches))
+ handle_patches()
+ if(mind)
+ handle_changeling()
handle_wetness(times_fired)
// Increase germ_level regularly
- if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
- germ_level++
+ handle_germs()
+
+ if(stat != DEAD)
+ return TRUE
///////////////
@@ -192,6 +202,11 @@
else
update_action_buttons_icon()
+/mob/living/carbon/proc/handle_organs()
+ for(var/thing in internal_organs)
+ var/obj/item/organ/internal/O = thing
+ O.on_life()
+
/mob/living/carbon/handle_diseases()
for(var/thing in viruses)
var/datum/disease/D = thing
@@ -234,8 +249,7 @@
/mob/living/carbon/handle_chemicals_in_body()
- if(reagents)
- reagents.metabolize(src)
+ reagents.metabolize(src)
/mob/living/carbon/proc/handle_wetness(times_fired)
@@ -262,7 +276,9 @@
if(stam_regen_start_time <= world.time)
if(stam_paralyzed)
update_stamina()
- setStaminaLoss(0, FALSE)
+ if(staminaloss)
+ setStaminaLoss(0, FALSE)
+ update_health_hud()
var/restingpwr = 1 + 4 * resting
@@ -320,8 +336,17 @@
AdjustHallucinate(-2)
+ // Keep SSD people asleep
+ if(player_logged)
+ Sleeping(2)
+
/mob/living/carbon/handle_sleeping()
if(..())
+ if(mind?.vampire)
+ if(istype(loc, /obj/structure/closet/coffin))
+ adjustBruteLoss(-1, FALSE)
+ adjustFireLoss(-1, FALSE)
+ adjustToxLoss(-1)
handle_dreams()
adjustStaminaLoss(-10)
var/comfort = 1
@@ -337,44 +362,42 @@
comfort += 1 //Aren't naps SO much better when drunk?
AdjustDrunk(-0.2*comfort) //reduce drunkenness while sleeping.
if(comfort > 1 && prob(3))//You don't heal if you're just sleeping on the floor without a blanket.
- adjustBruteLoss(-1*comfort)
- adjustFireLoss(-1*comfort)
+ adjustBruteLoss(-1 * comfort, FALSE)
+ adjustFireLoss(-1 * comfort)
if(prob(10) && health && hal_screwyhud != SCREWYHUD_CRIT)
emote("snore")
- // Keep SSD people asleep
- if(player_logged)
- Sleeping(2)
+
return sleeping
-/mob/living/carbon/handle_hud_icons()
- return
-
-/mob/living/carbon/handle_hud_icons_health()
+/mob/living/carbon/update_health_hud(shown_health_amount)
if(!client)
return
if(healths)
if(stat != DEAD)
- switch(health)
- if(100 to INFINITY)
- healths.icon_state = "health0"
- if(80 to 100)
- healths.icon_state = "health1"
- if(60 to 80)
- healths.icon_state = "health2"
- if(40 to 60)
- healths.icon_state = "health3"
- if(20 to 40)
- healths.icon_state = "health4"
- if(0 to 20)
- healths.icon_state = "health5"
- else
- healths.icon_state = "health6"
+ . = TRUE
+ if(shown_health_amount == null)
+ shown_health_amount = health
+ if(shown_health_amount >= maxHealth)
+ healths.icon_state = "health0"
+ else if(shown_health_amount > maxHealth * 0.8)
+ healths.icon_state = "health1"
+ else if(shown_health_amount > maxHealth * 0.6)
+ healths.icon_state = "health2"
+ else if(shown_health_amount > maxHealth * 0.4)
+ healths.icon_state = "health3"
+ else if(shown_health_amount > maxHealth * 0.2)
+ healths.icon_state = "health4"
+ else if(shown_health_amount > 0)
+ healths.icon_state = "health5"
+ else
+ healths.icon_state = "health6"
else
healths.icon_state = "health7"
- handle_hud_icons_health_overlay()
-/mob/living/carbon/proc/handle_hud_icons_health_overlay()
+/mob/living/carbon/update_damage_hud()
+ if(!client)
+ return
if(stat == UNCONSCIOUS && health <= HEALTH_THRESHOLD_CRIT)
if(check_death_method())
var/severity = 0
@@ -441,20 +464,23 @@
clear_fullscreen("brute")
/mob/living/carbon/proc/handle_patches()
- if(LAZYLEN(processing_patches))
- var/multiple_patch_multiplier = processing_patches.len > 1 ? (processing_patches.len * 1.5) : 1
- var/applied_amount = 0.35 * multiple_patch_multiplier
+ var/multiple_patch_multiplier = processing_patches.len > 1 ? (processing_patches.len * 1.5) : 1
+ var/applied_amount = 0.35 * multiple_patch_multiplier
- for(var/patch in processing_patches)
- var/obj/item/reagent_containers/food/pill/patch/P = patch
+ for(var/patch in processing_patches)
+ var/obj/item/reagent_containers/food/pill/patch/P = patch
- if(P.reagents && P.reagents.total_volume)
- var/fractional_applied_amount = applied_amount / P.reagents.total_volume
- P.reagents.reaction(src, REAGENT_TOUCH, fractional_applied_amount, P.needs_to_apply_reagents)
- P.needs_to_apply_reagents = FALSE
- P.reagents.trans_to(src, applied_amount * 0.5)
- P.reagents.remove_any(applied_amount * 0.5)
- else
- if(!P.reagents || P.reagents.total_volume <= 0)
- processing_patches -= P
- qdel(P)
+ if(P.reagents && P.reagents.total_volume)
+ var/fractional_applied_amount = applied_amount / P.reagents.total_volume
+ P.reagents.reaction(src, REAGENT_TOUCH, fractional_applied_amount, P.needs_to_apply_reagents)
+ P.needs_to_apply_reagents = FALSE
+ P.reagents.trans_to(src, applied_amount * 0.5)
+ P.reagents.remove_any(applied_amount * 0.5)
+ else
+ if(!P.reagents || P.reagents.total_volume <= 0)
+ processing_patches -= P
+ qdel(P)
+
+/mob/living/carbon/proc/handle_germs()
+ if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
+ germ_level++
diff --git a/code/modules/mob/living/carbon/update_status.dm b/code/modules/mob/living/carbon/update_status.dm
index b67953c7e69..918968800ce 100644
--- a/code/modules/mob/living/carbon/update_status.dm
+++ b/code/modules/mob/living/carbon/update_status.dm
@@ -2,12 +2,10 @@
if(status_flags & GODMODE)
return
if(stat != DEAD)
-// if(health <= min_health)
if(health <= HEALTH_THRESHOLD_DEAD && check_death_method())
death()
create_debug_log("died of damage, trigger reason: [reason]")
return
-// if(paralysis || sleeping || getOxyLoss() > low_oxy_ko || (status_flags & FAKEDEATH) || health <= crit_health)
if(paralysis || sleeping || (check_death_method() && getOxyLoss() > 50) || (status_flags & FAKEDEATH) || health <= HEALTH_THRESHOLD_CRIT && check_death_method())
if(stat == CONSCIOUS)
KnockOut()
@@ -16,6 +14,9 @@
if(stat == UNCONSCIOUS)
WakeUp()
create_debug_log("woke up, trigger reason: [reason]")
+ update_damage_hud()
+ update_health_hud()
+ med_hud_set_status()
/mob/living/carbon/update_stamina()
var/stam = getStaminaLoss()
@@ -24,7 +25,6 @@
else if(stam_paralyzed)
stam_paralyzed = FALSE
update_canmove()
- handle_hud_icons_health()
/mob/living/carbon/can_hear()
. = FALSE
diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm
index fa1c392334d..60f186631b7 100644
--- a/code/modules/mob/living/damage_procs.dm
+++ b/code/modules/mob/living/damage_procs.dm
@@ -269,6 +269,7 @@
if(amount > 0)
stam_regen_start_time = world.time + STAMINA_REGEN_BLOCK_TIME
if(updating)
+ update_health_hud()
update_stamina()
/mob/living/proc/setStaminaLoss(amount, updating = TRUE)
@@ -284,6 +285,7 @@
if(amount > 0)
stam_regen_start_time = world.time + STAMINA_REGEN_BLOCK_TIME
if(updating)
+ update_health_hud()
update_stamina()
/mob/living/proc/getMaxHealth()
diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm
index 0984c56decb..6af90792355 100644
--- a/code/modules/mob/living/death.dm
+++ b/code/modules/mob/living/death.dm
@@ -61,10 +61,13 @@
if(mind && suiciding)
mind.suicided = TRUE
+ reset_perspective(null)
clear_fullscreens()
update_sight()
update_action_buttons_icon()
+ update_damage_hud()
+ update_health_hud()
med_hud_set_health()
med_hud_set_status()
if(!gibbed && !QDELETED(src))
@@ -83,7 +86,7 @@
timeofdeath = world.time
create_log(ATTACK_LOG, "died[gibbed ? " (Gibbed)": ""]")
- GLOB.living_mob_list -= src
+ GLOB.alive_mob_list -= src
GLOB.dead_mob_list += src
if(mind)
mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0)
diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm
index 5ab604e5b3e..6d020ccdad1 100644
--- a/code/modules/mob/living/life.dm
+++ b/code/modules/mob/living/life.dm
@@ -1,12 +1,10 @@
-/mob/living/Life(seconds, times_fired)
+/mob/living/proc/Life(seconds, times_fired)
+ set waitfor = FALSE
set invisibility = 0
- set background = BACKGROUND_ENABLED
- if(notransform)
- return FALSE
- if(!loc)
- return FALSE
- var/datum/gas_mixture/environment = loc.return_air()
+ if(flying) //TODO: Better floating
+ animate(src, pixel_y = pixel_y + 5 , time = 10, loop = 1, easing = SINE_EASING)
+ animate(pixel_y = pixel_y - 5, time = 10, loop = 1, easing = SINE_EASING)
if(client || registered_z) // This is a temporary error tracker to make sure we've caught everything
var/turf/T = get_turf(src)
@@ -17,28 +15,44 @@
else if (!client && registered_z)
log_game("Z-TRACKING: [src] of type [src.type] has a Z-registration despite not having a client.")
update_z(null)
+
+ if(notransform)
+ return FALSE
+ if(!loc)
+ return FALSE
+
if(stat != DEAD)
//Chemicals in the body
- handle_chemicals_in_body()
+ if(reagents)
+ handle_chemicals_in_body()
+ if(QDELETED(src)) // some chems can gib mobs
+ return
+
+ if(stat != DEAD)
//Mutations and radiation
handle_mutations_and_radiation()
+ if(stat != DEAD)
//Breathing, if applicable
handle_breathing(times_fired)
+ if(stat != DEAD)
//Random events (vomiting etc)
handle_random_events()
- . = 1
+ if(LAZYLEN(viruses))
+ handle_diseases()
- handle_diseases()
+ if(QDELETED(src)) // diseases can qdel the mob via transformations
+ return
//Heart Attack, if applicable
if(stat != DEAD)
handle_heartattack()
//Handle temperature/pressure differences between body and environment
+ var/datum/gas_mixture/environment = loc.return_air()
if(environment)
handle_environment(environment)
@@ -49,19 +63,38 @@
update_gravity(mob_has_gravity())
- update_pulling()
+ if(pulling)
+ update_pulling()
for(var/obj/item/grab/G in src)
G.process()
- if(handle_regular_status_updates()) // Status & health update, are we dead or alive etc.
+ if(stat != DEAD)
+ handle_critical_condition()
+
+ if(stat != DEAD) // Status & health update, are we dead or alive etc.
handle_disabilities() // eye, ear, brain damages
+
+ if(stat != DEAD)
handle_status_effects() //all special effects, stunned, weakened, jitteryness, hallucination, sleeping, etc
- if(client)
- handle_regular_hud_updates()
+ if(stat != DEAD)
+ if(forced_look)
+ if(!isnum(forced_look))
+ var/atom/A = locateUID(forced_look)
+ if(istype(A))
+ var/view = client ? client.view : world.view
+ if(get_dist(src, A) > view || !(src in viewers(view, A)))
+ forced_look = null
+ to_chat(src, "Your direction target has left your view, you are no longer facing anything.")
+ return
+ setDir()
- ..()
+ if(machine)
+ machine.check_eye(src)
+
+ if(stat != DEAD)
+ return TRUE
/mob/living/proc/handle_breathing(times_fired)
return
@@ -71,7 +104,6 @@
/mob/living/proc/handle_mutations_and_radiation()
radiation = 0 //so radiation don't accumulate in simple animals
- return
/mob/living/proc/handle_chemicals_in_body()
return
@@ -89,122 +121,54 @@
return
/mob/living/proc/update_pulling()
- if(pulling)
- if(incapacitated())
- stop_pulling()
-
-//This updates the health and status of the mob (conscious, unconscious, dead)
-/mob/living/proc/handle_regular_status_updates()
- return stat != DEAD
+ if(incapacitated())
+ stop_pulling()
//this updates all special effects: stunned, sleeping, weakened, druggy, stuttering, etc..
-/mob/living/proc/handle_status_effects()
- handle_stunned()
- handle_weakened()
- handle_stuttering()
- handle_silent()
- handle_drugged()
- handle_slurring()
- handle_paralysed()
- handle_sleeping()
- handle_slowed()
- handle_drunk()
- handle_cultslurring()
-
-
-/mob/living/proc/handle_stunned()
+/mob/living/proc/handle_status_effects() // We check for the status effect in this proc as opposed to the procs below to avoid excessive proc call overhead
if(stunned)
AdjustStunned(-1, updating = 1, force = 1)
- if(!stunned)
- update_icons()
- return stunned
-
-/mob/living/proc/handle_weakened()
if(weakened)
AdjustWeakened(-1, updating = 1, force = 1)
- if(!weakened)
- update_icons()
- return weakened
-
-/mob/living/proc/handle_stuttering()
if(stuttering)
- stuttering = max(stuttering-1, 0)
- return stuttering
-
-/mob/living/proc/handle_silent()
+ stuttering = max(stuttering - 1, 0)
if(silent)
AdjustSilence(-1)
- return silent
-
-/mob/living/proc/handle_drugged()
if(druggy)
AdjustDruggy(-1)
- return druggy
-
-/mob/living/proc/handle_slurring()
if(slurring)
AdjustSlur(-1)
- return slurring
-
-/mob/living/proc/handle_cultslurring()
- if(cultslurring)
- AdjustCultSlur(-1)
- return cultslurring
-
-/mob/living/proc/handle_paralysed()
if(paralysis)
AdjustParalysis(-1, updating = 1, force = 1)
- return paralysis
-
-/mob/living/proc/handle_sleeping()
if(sleeping)
- AdjustSleeping(-1)
- throw_alert("asleep", /obj/screen/alert/asleep)
- else
- clear_alert("asleep")
- return sleeping
-
-/mob/living/proc/handle_slowed()
+ handle_sleeping()
if(slowed)
AdjustSlowed(-1)
- return slowed
+ if(drunk)
+ handle_drunk()
+ if(cultslurring)
+ AdjustCultSlur(-1)
+
+/mob/living/proc/update_damage_hud()
+ return
+
+/mob/living/proc/handle_sleeping()
+ AdjustSleeping(-1)
+ return sleeping
/mob/living/proc/handle_drunk()
- if(drunk)
- AdjustDrunk(-1)
+ AdjustDrunk(-1)
return drunk
/mob/living/proc/handle_disabilities()
//Eyes
- if(disabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own
+ if((BLINDNESS in mutations) || stat) //blindness from disability or unconsciousness doesn't get better on its own
EyeBlind(1)
else if(eye_blind) //blindness, heals slowly over time
AdjustEyeBlind(-1)
else if(eye_blurry) //blurry eyes heal slowly
AdjustEyeBlurry(-1)
-//this handles hud updates. Calls update_vision() and handle_hud_icons()
-/mob/living/proc/handle_regular_hud_updates()
- if(!client) return 0
-
- handle_vision()
- handle_hud_icons()
-
- return 1
-
-/mob/living/proc/handle_vision()
- update_sight()
-
- if(stat == DEAD)
- return
-
- if(machine)
- if(!machine.check_eye(src))
- reset_perspective(null)
- else
- if(!remote_view && !client.adminobs)
- reset_perspective(null)
-
// Gives a mob the vision of being dead
/mob/living/proc/grant_death_vision()
sight |= SEE_TURFS
@@ -215,9 +179,37 @@
see_invisible = SEE_INVISIBLE_OBSERVER
sync_lighting_plane_alpha()
-/mob/living/proc/handle_hud_icons()
- handle_hud_icons_health()
+/mob/living/proc/handle_critical_condition()
return
-/mob/living/proc/handle_hud_icons_health()
- return
+/mob/living/update_health_hud()
+ if(!client)
+ return
+ if(healths)
+ var/severity = 0
+ var/healthpercent = (health / maxHealth) * 100
+ switch(healthpercent)
+ if(100 to INFINITY)
+ healths.icon_state = "health0"
+ if(80 to 100)
+ healths.icon_state = "health1"
+ severity = 1
+ if(60 to 80)
+ healths.icon_state = "health2"
+ severity = 2
+ if(40 to 60)
+ healths.icon_state = "health3"
+ severity = 3
+ if(20 to 40)
+ healths.icon_state = "health4"
+ severity = 4
+ if(1 to 20)
+ healths.icon_state = "health5"
+ severity = 5
+ else
+ healths.icon_state = "health7"
+ severity = 6
+ if(severity > 0)
+ overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
+ else
+ clear_fullscreen("brute")
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 8371cacaebe..dfa4bb61c9d 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -3,6 +3,7 @@
var/datum/atom_hud/data/human/medical/advanced/medhud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
medhud.add_to_hud(src)
faction += "\ref[src]"
+ GLOB.mob_living_list += src
/mob/living/prepare_huds()
..()
@@ -17,7 +18,7 @@
if(ranged_ability)
ranged_ability.remove_ranged_ability(src)
remove_from_all_data_huds()
-
+ GLOB.mob_living_list -= src
if(LAZYLEN(status_effects))
for(var/s in status_effects)
var/datum/status_effect/S = s
@@ -285,8 +286,9 @@
health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
update_stat("updatehealth([reason])")
- handle_hud_icons_health()
med_hud_set_health()
+ med_hud_set_status()
+ update_health_hud()
//This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually
@@ -759,7 +761,7 @@
//called when the mob receives a bright flash
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash)
- if(check_eye_prot() < intensity && (override_blindness_check || !(disabilities & BLIND)))
+ if(check_eye_prot() < intensity && (override_blindness_check || !(BLINDNESS in mutations)))
overlay_fullscreen("flash", type)
addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25)
return 1
@@ -802,7 +804,7 @@
if(do_mob(src, who, what.put_on_delay))
if(what && Adjacent(who) && !(what.flags & NODROP))
unEquip(what)
- who.equip_to_slot_if_possible(what, where, 0, 1)
+ who.equip_to_slot_if_possible(what, where, FALSE, TRUE)
add_attack_logs(src, who, "Equipped [what]")
/mob/living/singularity_act()
@@ -1025,9 +1027,9 @@
if("stat")
if((stat == DEAD) && (var_value < DEAD))//Bringing the dead back to life
GLOB.dead_mob_list -= src
- GLOB.living_mob_list += src
+ GLOB.alive_mob_list += src
if((stat < DEAD) && (var_value == DEAD))//Kill he
- GLOB.living_mob_list -= src
+ GLOB.alive_mob_list -= src
GLOB.dead_mob_list += src
. = ..()
switch(var_name)
diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm
index edb62d0e013..c272952b6bf 100644
--- a/code/modules/mob/living/say.dm
+++ b/code/modules/mob/living/say.dm
@@ -172,6 +172,9 @@ proc/get_radio_key_from_channel(var/channel)
var/list/hsp = handle_speech_problems(message_pieces, verb)
verb = hsp["verb"]
+ // Do this so it gets logged for all types of communication
+ var/log_message = "[message_mode ? "([message_mode])" : ""] '[message]'"
+ create_log(SAY_LOG, log_message)
var/list/used_radios = list()
if(handle_message_mode(message_mode, message_pieces, verb, used_radios))
@@ -179,9 +182,7 @@ proc/get_radio_key_from_channel(var/channel)
// Log of what we've said, plain message, no spans or junk
// handle_message_mode should have logged this already if it handled it
- var/log_message = "[message_mode ? "([message_mode])" : ""] '[message]'"
say_log += log_message
- create_log(SAY_LOG, log_message) // TODO after #13047: Include the channel
log_say(log_message, src)
var/list/handle_v = handle_speech_sound()
@@ -364,7 +365,6 @@ proc/get_radio_key_from_channel(var/channel)
say_log += "whisper: [message]"
log_whisper(message, src)
- create_log(SAY_LOG, "WHISPER: [message]")
var/message_range = 1
var/eavesdropping_range = 2
var/watching_range = 5
diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm
index 8d1555182a2..61151e35c92 100644
--- a/code/modules/mob/living/silicon/ai/life.dm
+++ b/code/modules/mob/living/silicon/ai/life.dm
@@ -37,7 +37,8 @@
else
adjustOxyLoss(-1)
- handle_stunned()
+ if(stunned)
+ AdjustStunned(-1, updating = 1, force = 1)
var/area/my_area = get_area(src)
@@ -140,7 +141,6 @@
else
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
update_stat("updatehealth([reason])")
- diag_hud_set_status()
diag_hud_set_health()
diff --git a/code/modules/mob/living/silicon/ai/update_status.dm b/code/modules/mob/living/silicon/ai/update_status.dm
index fd001956c67..8ee4a825631 100644
--- a/code/modules/mob/living/silicon/ai/update_status.dm
+++ b/code/modules/mob/living/silicon/ai/update_status.dm
@@ -9,7 +9,7 @@
else if(stat == UNCONSCIOUS)
WakeUp()
create_debug_log("woke up, trigger reason: [reason]")
- //diag_hud_set_status()
+ diag_hud_set_status()
/mob/living/silicon/ai/has_vision(information_only = FALSE)
return ..() && !lacks_power()
diff --git a/code/modules/mob/living/silicon/pai/life.dm b/code/modules/mob/living/silicon/pai/life.dm
index d91b724370b..321362217a1 100644
--- a/code/modules/mob/living/silicon/pai/life.dm
+++ b/code/modules/mob/living/silicon/pai/life.dm
@@ -1,22 +1,18 @@
/mob/living/silicon/pai/Life(seconds, times_fired)
. = ..()
- if(.)
- //if(secHUD == 1)
- // process_sec_hud(src, 1)
- ////if(medHUD == 1)
- // process_med_hud(src, 1)
- if(silence_time)
- if(world.timeofday >= silence_time)
- silence_time = null
- to_chat(src, "Communication circuit reinitialized. Speech and messaging functionality restored.")
+ if(QDELETED(src) || stat == DEAD)
+ return
+ if(silence_time)
+ if(world.timeofday >= silence_time)
+ silence_time = null
+ to_chat(src, "Communication circuit reinitialized. Speech and messaging functionality restored.")
- if(cable)
- if(get_dist(src, cable) > 1)
- var/turf/T = get_turf_or_move(loc)
- for(var/mob/M in viewers(T))
- M.show_message("The data cable rapidly retracts back into its spool.", 3, "You hear a click and the sound of wire spooling rapidly.", 2)
- qdel(src.cable)
- cable = null
+ if(cable)
+ if(get_dist(src, cable) > 1)
+ var/turf/T = get_turf_or_move(loc)
+ for(var/mob/M in viewers(T))
+ M.show_message("The data cable rapidly retracts back into its spool.", 3, "You hear a click and the sound of wire spooling rapidly.", 2)
+ QDEL_NULL(cable)
/mob/living/silicon/pai/updatehealth(reason = "none given")
if(status_flags & GODMODE)
diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm
index 224c706f324..72d9b210712 100644
--- a/code/modules/mob/living/silicon/robot/death.dm
+++ b/code/modules/mob/living/silicon/robot/death.dm
@@ -18,7 +18,7 @@
flick("gibbed-r", animation)
robogibs(loc)
- GLOB.living_mob_list -= src
+ GLOB.alive_mob_list -= src
GLOB.dead_mob_list -= src
QDEL_IN(animation, 15)
QDEL_IN(src, 15)
diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm
index dc32deaf5a7..b181cec8ec0 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone.dm
@@ -18,6 +18,8 @@
magpulse = 1
mob_size = MOB_SIZE_SMALL
+ modules_break = FALSE
+
// We need to keep track of a few module items so we don't need to do list operations
// every time we need them. These get set in New() after the module is chosen.
var/obj/item/stack/sheet/metal/cyborg/stack_metal = null
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 80eac952966..d64824b1876 100644
--- a/code/modules/mob/living/silicon/robot/drone/update_status.dm
+++ b/code/modules/mob/living/silicon/robot/drone/update_status.dm
@@ -4,7 +4,7 @@
/mob/living/silicon/robot/drone/update_stat(reason = "none given")
if(status_flags & GODMODE)
return
- if(health <= -35 && stat != DEAD)
+ if(health <= -maxHealth && stat != DEAD)
gib()
create_debug_log("died of damage, trigger reason: [reason]")
return
diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm
index a68da651ee9..f5b7048c3a8 100644
--- a/code/modules/mob/living/silicon/robot/inventory.dm
+++ b/code/modules/mob/living/silicon/robot/inventory.dm
@@ -78,6 +78,7 @@
set_actions(O)
else
to_chat(src, "You need to disable a module first!")
+ check_module_damage(FALSE)
update_icons()
/mob/living/silicon/robot/proc/set_actions(obj/item/I)
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index d40e801ba5f..afdab2f5649 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -1,23 +1,20 @@
/mob/living/silicon/robot/Life(seconds, times_fired)
set invisibility = 0
- set background = BACKGROUND_ENABLED
-
- if(src.notransform)
+ if(notransform)
return
- //Status updates, death etc.
- clamp_values()
+ . = ..()
- if(..())
+ handle_equipment()
+
+ // if Alive
+ if(.)
+ handle_robot_hud_updates()
handle_robot_cell()
process_locks()
+ update_items()
process_queued_alarms()
-/mob/living/silicon/robot/proc/clamp_values()
- SetStunned(min(stunned, 30))
- SetParalysis(min(paralysis, 30))
- SetWeakened(min(weakened, 20))
- SetSleeping(0)
/mob/living/silicon/robot/proc/handle_robot_cell()
if(stat != DEAD)
@@ -47,36 +44,13 @@
update_headlamp()
diag_hud_set_borgcell()
-/mob/living/silicon/robot/handle_regular_status_updates()
-
- . = ..()
-
+/mob/living/silicon/robot/proc/handle_equipment()
if(camera && !scrambledcodes)
if(stat == DEAD || wires.IsCameraCut())
camera.status = 0
else
camera.status = 1
- if(sleeping)
- AdjustSleeping(-1)
-
- if(.) //alive
- if(!istype(src, /mob/living/silicon/robot/drone))
- if(health < 50) //Gradual break down of modules as more damage is sustained
- if(uneq_module(module_state_3))
- to_chat(src, "SYSTEM ERROR: Module 3 OFFLINE.")
-
- if(health < 0)
- if(uneq_module(module_state_2))
- to_chat(src, "SYSTEM ERROR: Module 2 OFFLINE.")
-
- if(health < -50)
- if(uneq_module(module_state_1))
- to_chat(src, "CRITICAL ERROR: All modules OFFLINE.")
-
- diag_hud_set_health()
- diag_hud_set_status()
-
//update the state of modules and components here
if(stat != CONSCIOUS)
uneq_all()
@@ -86,18 +60,21 @@
else
radio.on = 1
- return 1
-
-/mob/living/silicon/robot/handle_hud_icons()
- update_items()
- update_cell()
+/mob/living/silicon/robot/proc/SetEmagged(new_state)
+ emagged = new_state
+ update_icons()
if(emagged)
throw_alert("hacked", /obj/screen/alert/hacked)
else
clear_alert("hacked")
- ..()
-/mob/living/silicon/robot/handle_hud_icons_health()
+/mob/living/silicon/robot/proc/handle_robot_hud_updates()
+ if(!client)
+ return
+
+ update_cell_hud_icon()
+
+/mob/living/silicon/robot/update_health_hud()
if(healths)
if(stat != DEAD)
if(health >= maxHealth)
@@ -115,19 +92,7 @@
else
healths.icon_state = "health7"
- switch(bodytemperature) //310.055 optimal body temp
- if(335 to INFINITY)
- throw_alert("temp", /obj/screen/alert/hot/robot, 2)
- if(320 to 335)
- throw_alert("temp", /obj/screen/alert/hot/robot, 1)
- if(300 to 320)
- clear_alert("temp")
- if(260 to 300)
- throw_alert("temp", /obj/screen/alert/cold/robot, 1)
- else
- throw_alert("temp", /obj/screen/alert/cold/robot, 2)
-
-/mob/living/silicon/robot/proc/update_cell()
+/mob/living/silicon/robot/proc/update_cell_hud_icon()
if(cell)
var/cellcharge = cell.charge/cell.maxcharge
switch(cellcharge)
@@ -146,7 +111,7 @@
-/mob/living/silicon/robot/proc/update_items()
+/mob/living/silicon/robot/proc/update_items() // What in the Sam hell is this?
if(client)
for(var/obj/I in get_all_slots())
client.screen |= I
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index cf3067b934f..2eb1e4669ab 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -87,6 +87,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
var/braintype = "Cyborg"
var/base_icon = ""
var/crisis = 0
+ var/modules_break = TRUE
var/lamp_max = 10 //Maximum brightness of a borg lamp. Set as a var for easy adjusting.
var/lamp_intensity = 0 //Luminosity of the headlamp. 0 is off. Higher settings than the minimum require power.
@@ -840,7 +841,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
return
else
sleep(6)
- emagged = 1
+ SetEmagged(TRUE)
SetLockdown(1) //Borgs were getting into trouble because they would attack the emagger before the new laws were shown
if(src.hud_used)
src.hud_used.update_robot_modules_display() //Shows/hides the emag item if the inventory screen is already open.
@@ -1157,16 +1158,16 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
if(cleaned_human.lying)
if(cleaned_human.head)
cleaned_human.head.clean_blood()
- cleaned_human.update_inv_head(0,0)
+ cleaned_human.update_inv_head()
if(cleaned_human.wear_suit)
cleaned_human.wear_suit.clean_blood()
- cleaned_human.update_inv_wear_suit(0,0)
+ cleaned_human.update_inv_wear_suit()
else if(cleaned_human.w_uniform)
cleaned_human.w_uniform.clean_blood()
- cleaned_human.update_inv_w_uniform(0,0)
+ cleaned_human.update_inv_w_uniform()
if(cleaned_human.shoes)
cleaned_human.shoes.clean_blood()
- cleaned_human.update_inv_shoes(0,0)
+ cleaned_human.update_inv_shoes()
cleaned_human.clean_blood()
to_chat(cleaned_human, "[src] cleans your face!")
if(floor_only)
@@ -1481,3 +1482,26 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
else
uneq_active() // else unequip the module and put it back into the robot's inventory.
return
+
+/mob/living/silicon/robot/proc/check_module_damage(makes_sound = TRUE)
+ if(modules_break)
+ if(health < 50) //Gradual break down of modules as more damage is sustained
+ if(uneq_module(module_state_3))
+ if(makes_sound)
+ audible_message("[src] sounds an alarm! \"SYSTEM ERROR: Module 3 OFFLINE.\"")
+ playsound(loc, 'sound/machines/warning-buzzer.ogg', 50, TRUE)
+ to_chat(src, "SYSTEM ERROR: Module 3 OFFLINE.")
+
+ if(health < 0)
+ if(uneq_module(module_state_2))
+ if(makes_sound)
+ audible_message("[src] sounds an alarm! \"SYSTEM ERROR: Module 2 OFFLINE.\"")
+ playsound(loc, 'sound/machines/warning-buzzer.ogg', 60, TRUE)
+ to_chat(src, "SYSTEM ERROR: Module 2 OFFLINE.")
+
+ if(health < -50)
+ if(uneq_module(module_state_1))
+ if(makes_sound)
+ audible_message("[src] sounds an alarm! \"CRITICAL ERROR: All modules OFFLINE.\"")
+ playsound(loc, 'sound/machines/warning-buzzer.ogg', 75, TRUE)
+ to_chat(src, "CRITICAL ERROR: All modules OFFLINE.")
diff --git a/code/modules/mob/living/silicon/robot/robot_damage.dm b/code/modules/mob/living/silicon/robot/robot_damage.dm
index c73d566b729..f4290d764d6 100644
--- a/code/modules/mob/living/silicon/robot/robot_damage.dm
+++ b/code/modules/mob/living/silicon/robot/robot_damage.dm
@@ -1,12 +1,6 @@
/mob/living/silicon/robot/updatehealth(reason = "none given")
- if(status_flags & GODMODE)
- health = maxHealth
- stat = CONSCIOUS
- return
- health = maxHealth - (getOxyLoss() + getFireLoss() + getBruteLoss())
- update_stat("updatehealth([reason])")
- handle_hud_icons_health()
- diag_hud_set_health()
+ ..(reason)
+ check_module_damage()
/mob/living/silicon/robot/getBruteLoss(repairable_only = FALSE)
var/amount = 0
@@ -72,7 +66,7 @@
/mob/living/silicon/robot/heal_organ_damage(brute, burn, updating_health = TRUE)
var/list/datum/robot_component/parts = get_damaged_components(brute, burn)
- if(!LAZYLEN(parts))
+ if(!LAZYLEN(parts))
return
var/datum/robot_component/picked = pick(parts)
picked.heal_damage(brute, burn, updating_health)
diff --git a/code/modules/mob/living/silicon/robot/update_status.dm b/code/modules/mob/living/silicon/robot/update_status.dm
index 5f1519395c7..91f9952c075 100644
--- a/code/modules/mob/living/silicon/robot/update_status.dm
+++ b/code/modules/mob/living/silicon/robot/update_status.dm
@@ -17,10 +17,12 @@
if(!is_component_functioning("actuator") || !is_component_functioning("power cell") || paralysis || sleeping || resting || stunned || IsWeakened() || getOxyLoss() > maxHealth * 0.5)
if(stat == CONSCIOUS)
KnockOut()
+ update_headlamp()
create_debug_log("fell unconscious, trigger reason: [reason]")
else
if(stat == UNCONSCIOUS)
WakeUp()
+ update_headlamp()
create_debug_log("woke up, trigger reason: [reason]")
else
if(health > 0)
@@ -31,9 +33,10 @@
ghost << sound('sound/effects/genetics.ogg')
create_attack_log("revived, trigger reason: [reason]")
create_log(MISC_LOG, "revived, trigger reason: [reason]")
- // diag_hud_set_status()
- // diag_hud_set_health()
- // update_health_hud()
+
+ diag_hud_set_status()
+ diag_hud_set_health()
+ update_health_hud()
/mob/living/silicon/robot/SetStunned(amount, updating = 1, force = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
. = STATUS_UPDATE_CANMOVE
diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index 88d130ddc82..962b4722f39 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -1031,20 +1031,6 @@ Pass a positive integer as an argument to override a bot's default speed.
Radio.talk_into(src, message, message_mode, verb, speaking)
used_radios += Radio
-/mob/living/simple_animal/bot/handle_hud_icons_health()
- ..()
- switch(bodytemperature) //310.055 optimal body temp
- if(335 to INFINITY)
- throw_alert("temp", /obj/screen/alert/hot/robot, 2)
- if(320 to 335)
- throw_alert("temp", /obj/screen/alert/hot/robot, 1)
- if(300 to 320)
- clear_alert("temp")
- if(260 to 300)
- throw_alert("temp", /obj/screen/alert/cold/robot, 1)
- else
- throw_alert("temp", /obj/screen/alert/cold/robot, 2)
-
/mob/living/simple_animal/bot/is_mechanical()
return 1
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index c89b160bf0e..728b050dd54 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -391,8 +391,6 @@
passenger = M
load = M
can_buckle = FALSE
- // Not sure why this is done
- reset_perspective(src)
return TRUE
return FALSE
@@ -417,9 +415,6 @@
overlays.Cut()
- if(ismob(load))
- var/mob/M = load
- M.reset_perspective(null)
unbuckle_all_mobs()
if(load)
@@ -446,9 +441,6 @@
AM.layer = initial(AM.layer)
AM.pixel_y = initial(AM.pixel_y)
AM.plane = initial(AM.plane)
- if(ismob(AM))
- var/mob/M = AM
- M.reset_perspective(null)
/mob/living/simple_animal/bot/mulebot/call_bot()
..()
diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm
index ee03c204d48..f150005116e 100644
--- a/code/modules/mob/living/simple_animal/constructs.dm
+++ b/code/modules/mob/living/simple_animal/constructs.dm
@@ -333,73 +333,116 @@
///ui stuff
-/mob/living/simple_animal/hostile/construct/armoured/handle_hud_icons_health()
- ..()
+/mob/living/simple_animal/hostile/construct/armoured/update_health_hud()
+ if(!client)
+ return
if(healths)
switch(health)
- if(250 to INFINITY) healths.icon_state = "juggernaut_health0"
- if(208 to 249) healths.icon_state = "juggernaut_health1"
- if(167 to 207) healths.icon_state = "juggernaut_health2"
- if(125 to 166) healths.icon_state = "juggernaut_health3"
- if(84 to 124) healths.icon_state = "juggernaut_health4"
- if(42 to 83) healths.icon_state = "juggernaut_health5"
- if(1 to 41) healths.icon_state = "juggernaut_health6"
- else healths.icon_state = "juggernaut_health7"
+ if(250 to INFINITY)
+ healths.icon_state = "juggernaut_health0"
+ if(208 to 249)
+ healths.icon_state = "juggernaut_health1"
+ if(167 to 207)
+ healths.icon_state = "juggernaut_health2"
+ if(125 to 166)
+ healths.icon_state = "juggernaut_health3"
+ if(84 to 124)
+ healths.icon_state = "juggernaut_health4"
+ if(42 to 83)
+ healths.icon_state = "juggernaut_health5"
+ if(1 to 41)
+ healths.icon_state = "juggernaut_health6"
+ else
+ healths.icon_state = "juggernaut_health7"
-/mob/living/simple_animal/hostile/construct/behemoth/handle_hud_icons_health()
- ..()
+/mob/living/simple_animal/hostile/construct/behemoth/update_health_hud()
+ if(!client)
+ return
if(healths)
switch(health)
- if(750 to INFINITY) healths.icon_state = "juggernaut_health0"
- if(625 to 749) healths.icon_state = "juggernaut_health1"
- if(500 to 624) healths.icon_state = "juggernaut_health2"
- if(375 to 499) healths.icon_state = "juggernaut_health3"
- if(250 to 374) healths.icon_state = "juggernaut_health4"
- if(125 to 249) healths.icon_state = "juggernaut_health5"
- if(1 to 124) healths.icon_state = "juggernaut_health6"
- else healths.icon_state = "juggernaut_health7"
+ if(750 to INFINITY)
+ healths.icon_state = "juggernaut_health0"
+ if(625 to 749)
+ healths.icon_state = "juggernaut_health1"
+ if(500 to 624)
+ healths.icon_state = "juggernaut_health2"
+ if(375 to 499)
+ healths.icon_state = "juggernaut_health3"
+ if(250 to 374)
+ healths.icon_state = "juggernaut_health4"
+ if(125 to 249)
+ healths.icon_state = "juggernaut_health5"
+ if(1 to 124)
+ healths.icon_state = "juggernaut_health6"
+ else
+ healths.icon_state = "juggernaut_health7"
-/mob/living/simple_animal/hostile/construct/builder/handle_hud_icons_health()
- ..()
+/mob/living/simple_animal/hostile/construct/builder/update_health_hud()
+ if(!client)
+ return
if(healths)
switch(health)
- if(50 to INFINITY) healths.icon_state = "artificer_health0"
- if(42 to 49) healths.icon_state = "artificer_health1"
- if(34 to 41) healths.icon_state = "artificer_health2"
- if(26 to 33) healths.icon_state = "artificer_health3"
- if(18 to 25) healths.icon_state = "artificer_health4"
- if(10 to 17) healths.icon_state = "artificer_health5"
- if(1 to 9) healths.icon_state = "artificer_health6"
- else healths.icon_state = "artificer_health7"
+ if(50 to INFINITY)
+ healths.icon_state = "artificer_health0"
+ if(42 to 49)
+ healths.icon_state = "artificer_health1"
+ if(34 to 41)
+ healths.icon_state = "artificer_health2"
+ if(26 to 33)
+ healths.icon_state = "artificer_health3"
+ if(18 to 25)
+ healths.icon_state = "artificer_health4"
+ if(10 to 17)
+ healths.icon_state = "artificer_health5"
+ if(1 to 9)
+ healths.icon_state = "artificer_health6"
+ else
+ healths.icon_state = "artificer_health7"
-/mob/living/simple_animal/hostile/construct/wraith/handle_hud_icons_health()
-
- ..()
+/mob/living/simple_animal/hostile/construct/wraith/update_health_hud()
+ if(!client)
+ return
if(healths)
switch(health)
- if(75 to INFINITY) healths.icon_state = "wraith_health0"
- if(62 to 74) healths.icon_state = "wraith_health1"
- if(50 to 61) healths.icon_state = "wraith_health2"
- if(37 to 49) healths.icon_state = "wraith_health3"
- if(25 to 36) healths.icon_state = "wraith_health4"
- if(12 to 24) healths.icon_state = "wraith_health5"
- if(1 to 11) healths.icon_state = "wraith_health6"
- else healths.icon_state = "wraith_health7"
+ if(75 to INFINITY)
+ healths.icon_state = "wraith_health0"
+ if(62 to 74)
+ healths.icon_state = "wraith_health1"
+ if(50 to 61)
+ healths.icon_state = "wraith_health2"
+ if(37 to 49)
+ healths.icon_state = "wraith_health3"
+ if(25 to 36)
+ healths.icon_state = "wraith_health4"
+ if(12 to 24)
+ healths.icon_state = "wraith_health5"
+ if(1 to 11)
+ healths.icon_state = "wraith_health6"
+ else
+ healths.icon_state = "wraith_health7"
-/mob/living/simple_animal/hostile/construct/harvester/handle_hud_icons_health()
-
- ..()
+/mob/living/simple_animal/hostile/construct/harvester/update_health_hud()
+ if(!client)
+ return
if(healths)
switch(health)
- if(150 to INFINITY) healths.icon_state = "harvester_health0"
- if(125 to 149) healths.icon_state = "harvester_health1"
- if(100 to 124) healths.icon_state = "harvester_health2"
- if(75 to 99) healths.icon_state = "harvester_health3"
- if(50 to 74) healths.icon_state = "harvester_health4"
- if(25 to 49) healths.icon_state = "harvester_health5"
- if(1 to 24) healths.icon_state = "harvester_health6"
- else healths.icon_state = "harvester_health7"
+ if(150 to INFINITY)
+ healths.icon_state = "harvester_health0"
+ if(125 to 149)
+ healths.icon_state = "harvester_health1"
+ if(100 to 124)
+ healths.icon_state = "harvester_health2"
+ if(75 to 99)
+ healths.icon_state = "harvester_health3"
+ if(50 to 74)
+ healths.icon_state = "harvester_health4"
+ if(25 to 49)
+ healths.icon_state = "harvester_health5"
+ if(1 to 24)
+ healths.icon_state = "harvester_health6"
+ else
+ healths.icon_state = "harvester_health7"
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
index 6cde07d0b8d..c9139ea7bfd 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
@@ -79,7 +79,7 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/megafauna/bubblegum/Initialize(mapload)
. = ..()
if(true_spawn)
- for(var/mob/living/simple_animal/hostile/megafauna/bubblegum/B in GLOB.living_mob_list)
+ for(var/mob/living/simple_animal/hostile/megafauna/bubblegum/B in GLOB.alive_mob_list)
if(B != src)
qdel(src) //There can be only one
return
diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm
index 95ce5491395..105b9a02819 100644
--- a/code/modules/mob/living/simple_animal/hostile/statue.dm
+++ b/code/modules/mob/living/simple_animal/hostile/statue.dm
@@ -180,7 +180,7 @@
range = 10
/obj/effect/proc_holder/spell/aoe_turf/blindness/cast(list/targets, mob/user = usr)
- for(var/mob/living/L in GLOB.living_mob_list)
+ for(var/mob/living/L in GLOB.alive_mob_list)
if(L == user)
continue
var/turf/T = get_turf(L.loc)
diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
index f3389108498..23970e88826 100644
--- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
@@ -281,7 +281,7 @@
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/armory/LateInitialize()
if(istype(depotarea))
var/list/key_candidates = list()
- for(var/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/officer/O in GLOB.living_mob_list)
+ for(var/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/officer/O in GLOB.alive_mob_list)
key_candidates += O
if(key_candidates.len)
var/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/officer/O = pick(key_candidates)
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm
index 828e0e5f8f6..047219a151b 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm
@@ -38,9 +38,12 @@
evolvequeen_action.Grant(src)
/mob/living/simple_animal/hostile/poison/terror_spider/princess/proc/evolve_to_queen()
- var/mob/living/simple_animal/hostile/poison/terror_spider/queen/Q = new /mob/living/simple_animal/hostile/poison/terror_spider/queen(loc)
+ var/mob/living/simple_animal/hostile/poison/terror_spider/queen/Q = new(loc)
if(mind)
mind.transfer_to(Q)
+ // Calling `transfer_to()` removes our new body (the Queen's) ability to see the med hud, so we have to re-add the queen here.
+ var/datum/atom_hud/U = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
+ U.add_hud_to(Q)
qdel(src)
/mob/living/simple_animal/hostile/poison/terror_spider/princess/DoWrap()
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index 2479f3c0674..ada8ed9896b 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -145,7 +145,7 @@
/mob/living/simple_animal/updatehealth(reason = "none given")
..(reason)
health = Clamp(health, 0, maxHealth)
- med_hud_set_status()
+ med_hud_set_health()
/mob/living/simple_animal/StartResting(updating = 1)
..()
@@ -166,12 +166,14 @@
/mob/living/simple_animal/update_stat(reason = "none given")
if(status_flags & GODMODE)
return
-
- ..(reason)
if(stat != DEAD)
- if(health < 1)
+ if(health <= 0)
death()
create_debug_log("died of damage, trigger reason: [reason]")
+ else
+ WakeUp()
+ create_debug_log("woke up, trigger reason: [reason]")
+ med_hud_set_status()
/mob/living/simple_animal/proc/handle_automated_action()
set waitfor = FALSE
diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm
index 91e6c502869..8c7d14b23f4 100644
--- a/code/modules/mob/living/simple_animal/slime/slime.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime.dm
@@ -156,7 +156,7 @@
. += config.slime_delay
-/mob/living/simple_animal/slime/handle_hud_icons_health()
+/mob/living/simple_animal/slime/update_health_hud()
if(hud_used)
if(!client)
return
diff --git a/code/modules/mob/living/stat_states.dm b/code/modules/mob/living/stat_states.dm
index 926bdc5970d..eab88b5ec4d 100644
--- a/code/modules/mob/living/stat_states.dm
+++ b/code/modules/mob/living/stat_states.dm
@@ -51,7 +51,7 @@
log_game("[key_name(src)] came back to life at [atom_loc_line(get_turf(src))]")
stat = CONSCIOUS
GLOB.dead_mob_list -= src
- GLOB.living_mob_list += src
+ GLOB.alive_mob_list += src
if(mind)
GLOB.respawnable_list -= src
timeofdeath = null
diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm
index b2871038155..7cd2b4414f7 100644
--- a/code/modules/mob/living/status_procs.dm
+++ b/code/modules/mob/living/status_procs.dm
@@ -125,10 +125,6 @@
var/stuttering = 0
var/weakened = 0
-/mob/living
- // Bitfields
- var/disabilities = 0
-
// RESTING
/mob/living/proc/StartResting(updating = 1)
@@ -467,16 +463,16 @@
// Blind
/mob/living/proc/BecomeBlind(updating = TRUE)
- var/val_change = !(disabilities & BLIND)
+ var/val_change = !(BLINDNESS in mutations)
. = val_change ? STATUS_UPDATE_BLIND : STATUS_UPDATE_NONE
- disabilities |= BLIND
+ mutations |= BLINDNESS
if(val_change && updating)
update_blind_effects()
/mob/living/proc/CureBlind(updating = TRUE)
- var/val_change = !!(disabilities & BLIND)
+ var/val_change = !!(BLINDNESS in mutations)
. = val_change ? STATUS_UPDATE_BLIND : STATUS_UPDATE_NONE
- disabilities &= ~BLIND
+ mutations -= BLINDNESS
if(val_change && updating)
CureIfHasDisability(GLOB.blindblock)
update_blind_effects()
@@ -484,52 +480,52 @@
// Coughing
/mob/living/proc/BecomeCoughing()
- disabilities |= COUGHING
+ mutations |= COUGHING
/mob/living/proc/CureCoughing()
- disabilities &= ~COUGHING
+ mutations -= COUGHING
CureIfHasDisability(GLOB.coughblock)
// Deaf
/mob/living/proc/BecomeDeaf()
- disabilities |= DEAF
+ mutations |= DEAF
/mob/living/proc/CureDeaf()
- disabilities &= ~DEAF
+ mutations -= DEAF
CureIfHasDisability(GLOB.deafblock)
// Epilepsy
/mob/living/proc/BecomeEpilepsy()
- disabilities |= EPILEPSY
+ mutations |= EPILEPSY
/mob/living/proc/CureEpilepsy()
- disabilities &= ~EPILEPSY
+ mutations -= EPILEPSY
CureIfHasDisability(GLOB.epilepsyblock)
// Mute
/mob/living/proc/BecomeMute()
- disabilities |= MUTE
+ mutations |= MUTE
/mob/living/proc/CureMute()
- disabilities &= ~MUTE
+ mutations -= MUTE
CureIfHasDisability(GLOB.muteblock)
// Nearsighted
/mob/living/proc/BecomeNearsighted(updating = TRUE)
- var/val_change = !(disabilities & NEARSIGHTED)
+ var/val_change = !(NEARSIGHTED in mutations)
. = val_change ? STATUS_UPDATE_NEARSIGHTED : STATUS_UPDATE_NONE
- disabilities |= NEARSIGHTED
+ mutations |= NEARSIGHTED
if(val_change && updating)
update_nearsighted_effects()
/mob/living/proc/CureNearsighted(updating = TRUE)
- var/val_change = !!(disabilities & NEARSIGHTED)
+ var/val_change = !!(NEARSIGHTED in mutations)
. = val_change ? STATUS_UPDATE_NEARSIGHTED : STATUS_UPDATE_NONE
- disabilities &= ~NEARSIGHTED
+ mutations -= NEARSIGHTED
if(val_change && updating)
CureIfHasDisability(GLOB.glassesblock)
update_nearsighted_effects()
@@ -537,19 +533,19 @@
// Nervous
/mob/living/proc/BecomeNervous()
- disabilities |= NERVOUS
+ mutations |= NERVOUS
/mob/living/proc/CureNervous()
- disabilities &= ~NERVOUS
+ mutations -= NERVOUS
CureIfHasDisability(GLOB.nervousblock)
// Tourettes
/mob/living/proc/BecomeTourettes()
- disabilities |= TOURETTES
+ mutations |= TOURETTES
/mob/living/proc/CureTourettes()
- disabilities &= ~TOURETTES
+ mutations -= TOURETTES
CureIfHasDisability(GLOB.twitchblock)
/mob/living/proc/CureIfHasDisability(block)
diff --git a/code/modules/mob/living/update_status.dm b/code/modules/mob/living/update_status.dm
index d24301b0dd0..8ef178918b4 100644
--- a/code/modules/mob/living/update_status.dm
+++ b/code/modules/mob/living/update_status.dm
@@ -25,7 +25,7 @@
clear_alert("high")
/mob/living/update_nearsighted_effects()
- if(disabilities & NEARSIGHTED)
+ if(NEARSIGHTED in mutations)
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
else
clear_fullscreen("nearsighted")
@@ -41,17 +41,17 @@
// Whether the mob can hear things
/mob/living/can_hear()
- . = !(disabilities & DEAF)
+ . = !(DEAF in mutations)
// Whether the mob is able to see
// `information_only` is for stuff that's purely informational - like blindness overlays
// This flag exists because certain things like angel statues expect this to be false for dead people
/mob/living/has_vision(information_only = FALSE)
- return (information_only && stat == DEAD) || !(eye_blind || (disabilities & BLIND) || stat)
+ return (information_only && stat == DEAD) || !(eye_blind || (BLINDNESS in mutations) || stat)
// Whether the mob is capable of talking
/mob/living/can_speak()
- if(!(silent || (disabilities & MUTE)))
+ if(!(silent || (MUTE in mutations)))
if(is_muzzled())
var/obj/item/clothing/mask/muzzle/M = wear_mask
if(M.mute >= MUZZLE_MUTE_MUFFLE)
@@ -112,22 +112,6 @@
/mob/living/proc/update_stamina()
return
-/mob/living/update_stat(reason = "None given")
- if(status_flags & GODMODE)
- return
- if(stat != DEAD)
- if(health <= HEALTH_THRESHOLD_DEAD && check_death_method())
- death()
- create_debug_log("died of damage, trigger reason: [reason]")
- else if(paralysis || status_flags & FAKEDEATH)
- if(stat == CONSCIOUS)
- KnockOut()
- create_debug_log("fell unconscious, trigger reason: [reason]")
- else
- if(stat == UNCONSCIOUS)
- WakeUp()
- create_debug_log("woke up, trigger reason: [reason]")
-
/mob/living/vv_edit_var(var_name, var_value)
. = ..()
switch(var_name)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 6123c8429c5..235996e571f 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -1,7 +1,7 @@
/mob/Destroy()//This makes sure that mobs with clients/keys are not just deleted from the game.
GLOB.mob_list -= src
GLOB.dead_mob_list -= src
- GLOB.living_mob_list -= src
+ GLOB.alive_mob_list -= src
focus = null
QDEL_NULL(hud_used)
if(mind && mind.current == src)
@@ -9,9 +9,6 @@
mobspellremove(src)
QDEL_LIST(viruses)
ghostize()
- for(var/mob/dead/observer/M in following_mobs)
- M.following = null
- following_mobs = null
QDEL_LIST_ASSOC_VAL(tkgrabbed_objects)
for(var/I in tkgrabbed_objects)
qdel(tkgrabbed_objects[I])
@@ -31,7 +28,7 @@
if(stat == DEAD)
GLOB.dead_mob_list += src
else
- GLOB.living_mob_list += src
+ GLOB.alive_mob_list += src
set_focus(src)
prepare_huds()
..()
@@ -174,21 +171,6 @@
/mob/proc/movement_delay()
return 0
-/mob/proc/Life(seconds, times_fired)
- set waitfor = FALSE
- if(forced_look)
- if(!isnum(forced_look))
- var/atom/A = locateUID(forced_look)
- if(istype(A))
- var/view = client ? client.view : world.view
- if(get_dist(src, A) > view || !(src in viewers(view, A)))
- forced_look = null
- to_chat(src, "Your direction target has left your view, you are no longer facing anything.")
- return
- setDir()
-// handle_typing_indicator()
- return
-
//This proc is called whenever someone clicks an inventory ui slot.
/mob/proc/attack_ui(slot)
var/obj/item/W = get_active_hand()
@@ -204,10 +186,10 @@
src:update_hair()
src:update_fhair()
-/mob/proc/put_in_any_hand_if_possible(obj/item/W as obj, del_on_fail = 0, disable_warning = 1, redraw_mob = 1)
- if(equip_to_slot_if_possible(W, slot_l_hand, del_on_fail, disable_warning, redraw_mob))
+/mob/proc/put_in_any_hand_if_possible(obj/item/W as obj, del_on_fail = 0, disable_warning = 1)
+ if(equip_to_slot_if_possible(W, slot_l_hand, del_on_fail, disable_warning))
return 1
- else if(equip_to_slot_if_possible(W, slot_r_hand, del_on_fail, disable_warning, redraw_mob))
+ else if(equip_to_slot_if_possible(W, slot_r_hand, del_on_fail, disable_warning))
return 1
return 0
@@ -216,8 +198,7 @@
//This is a SAFE proc. Use this instead of equip_to_slot()!
//set del_on_fail to have it delete W if it fails to equip
//set disable_warning to disable the 'you are unable to equip that' warning.
-//unset redraw_mob to prevent the mob from being redrawn at the end.
-/mob/proc/equip_to_slot_if_possible(obj/item/W as obj, slot, del_on_fail = 0, disable_warning = 0, redraw_mob = 1)
+/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, del_on_fail = 0, disable_warning = 0)
if(!istype(W)) return 0
if(!W.mob_can_equip(src, slot, disable_warning))
@@ -229,17 +210,17 @@
return 0
- equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail.
+ equip_to_slot(W, slot) //This proc should not ever fail.
return 1
//This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't eqip need to be done before! Use mob_can_equip() for that task.
//In most cases you will want to use equip_to_slot_if_possible()
-/mob/proc/equip_to_slot(obj/item/W as obj, slot)
+/mob/proc/equip_to_slot(obj/item/W, slot)
return
//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the rounds tarts and when events happen and such.
/mob/proc/equip_to_slot_or_del(obj/item/W as obj, slot)
- return equip_to_slot_if_possible(W, slot, 1, 1, 0)
+ return equip_to_slot_if_possible(W, slot, TRUE, TRUE)
// Convinience proc. Collects crap that fails to equip either onto the mob's back, or drops it.
// Used in job equipping so shit doesn't pile up at the start loc.
@@ -290,7 +271,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
for(var/slot in GLOB.slot_equipment_priority)
if(istype(W,/obj/item/storage/) && slot == slot_head) // Storage items should be put on the belt before the head
continue
- if(equip_to_slot_if_possible(W, slot, 0, 1, 1)) //del_on_fail = 0; disable_warning = 0; redraw_mob = 1
+ if(equip_to_slot_if_possible(W, slot, FALSE, TRUE)) //del_on_fail = 0; disable_warning = 0
return 1
return 0
@@ -527,12 +508,6 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
update_pipe_vision()
/mob/dead/reset_perspective(atom/A)
- if(client)
- if(ismob(client.eye) && (client.eye != src))
- // Note to self: Use `client.eye` for ghost following in place
- // of periodic ghost updates
- var/mob/target = client.eye
- target.following_mobs -= src
. = ..()
if(.)
// Allows sharing HUDs with ghosts
@@ -839,10 +814,6 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
if(client && mob_eye)
client.eye = mob_eye
- if(is_admin)
- client.adminobs = 1
- if(mob_eye == client.mob || client.eye == client.mob)
- client.adminobs = 0
/mob/verb/cancel_camera()
set name = "Cancel Camera View"
@@ -1092,7 +1063,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
if((usr in GLOB.respawnable_list) && (stat==2 || istype(usr,/mob/dead/observer)))
var/list/creatures = list("Mouse")
- for(var/mob/living/L in GLOB.living_mob_list)
+ for(var/mob/living/L in GLOB.alive_mob_list)
if(safe_respawn(L.type) && L.stat!=2)
if(!L.key)
creatures += L
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index ee514930c95..dc77610b97e 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -160,8 +160,6 @@
var/atom/movable/remote_control //Calls relaymove() to whatever it is
- var/remote_view = 0 // Set to 1 to prevent view resets on Life
-
var/obj/control_object //Used by admins to possess objects. All mobs should have this var
//Whether or not mobs can understand other mobtypes. These stay in /mob so that ghosts can hear everything.
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index 1e0f31ac6fe..df2a39c0930 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -521,11 +521,11 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM
alert_overlay.plane = FLOAT_PLANE
A.overlays += alert_overlay
-/mob/proc/switch_to_camera(var/obj/machinery/camera/C)
- if(!C.can_use() || stat || (get_dist(C, src) > 1 || machine != src || !has_vision() || !canmove))
- return 0
+/mob/proc/switch_to_camera(obj/machinery/camera/C)
+ if(!C.can_use() || incapacitated() || (get_dist(C, src) > 1 || machine != src || !has_vision()))
+ return FALSE
check_eye(src)
- return 1
+ return TRUE
/mob/proc/rename_character(oldname, newname)
if(!newname)
diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm
index 69e27595a07..af3d439df59 100644
--- a/code/modules/mob/new_player/new_player.dm
+++ b/code/modules/mob/new_player/new_player.dm
@@ -392,7 +392,7 @@
/mob/new_player/proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank, var/join_message)
if(SSticker.current_state == GAME_STATE_PLAYING)
var/ailist[] = list()
- for(var/mob/living/silicon/ai/A in GLOB.living_mob_list)
+ for(var/mob/living/silicon/ai/A in GLOB.alive_mob_list)
ailist += A
if(ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
@@ -424,7 +424,7 @@
/mob/new_player/proc/AnnounceCyborg(var/mob/living/character, var/rank, var/join_message)
if(SSticker.current_state == GAME_STATE_PLAYING)
var/ailist[] = list()
- for(var/mob/living/silicon/ai/A in GLOB.living_mob_list)
+ for(var/mob/living/silicon/ai/A in GLOB.alive_mob_list)
ailist += A
if(ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm
index 880d9c167d6..77f8cc40da9 100644
--- a/code/modules/mob/new_player/preferences_setup.dm
+++ b/code/modules/mob/new_player/preferences_setup.dm
@@ -921,7 +921,7 @@
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
- if(disabilities & NEARSIGHTED)
+ if(disabilities & DISABILITY_FLAG_NEARSIGHTED)
preview_icon.Blend(new /icon('icons/mob/eyes.dmi', "glasses"), ICON_OVERLAY)
// Observers get tourist outfit.
diff --git a/code/modules/mob/typing_indicator.dm b/code/modules/mob/typing_indicator.dm
index 7b13ab68229..4dfbddc2d84 100644
--- a/code/modules/mob/typing_indicator.dm
+++ b/code/modules/mob/typing_indicator.dm
@@ -15,7 +15,7 @@ GLOBAL_DATUM(typing_indicator, /image)
if(ishuman(src))
var/mob/living/carbon/human/H = src
- if(H.disabilities & MUTE || H.silent)
+ if((MUTE in H.mutations) || H.silent)
overlays -= GLOB.typing_indicator
return
diff --git a/code/modules/modular_computers/file_system/programs/research/airestorer.dm b/code/modules/modular_computers/file_system/programs/research/airestorer.dm
index d5ff31af66b..a87a2cd87b4 100644
--- a/code/modules/modular_computers/file_system/programs/research/airestorer.dm
+++ b/code/modules/modular_computers/file_system/programs/research/airestorer.dm
@@ -78,7 +78,7 @@
A.stat = CONSCIOUS
A.lying = 0
GLOB.dead_mob_list -= A
- GLOB.living_mob_list += A
+ GLOB.alive_mob_list += A
// Finished restoring
if(A.health >= 100)
ai_slot.locked = FALSE
diff --git a/code/modules/ninja/energy_katana.dm b/code/modules/ninja/energy_katana.dm
index cf694e59d83..741f0399922 100644
--- a/code/modules/ninja/energy_katana.dm
+++ b/code/modules/ninja/energy_katana.dm
@@ -52,7 +52,7 @@
if(user.put_in_hands(src))
msg = "Your Energy Katana teleports into your hand!"
- else if(user.equip_to_slot_if_possible(src, slot_belt, 0, 1, 1))
+ else if(user.equip_to_slot_if_possible(src, slot_belt, FALSE, TRUE))
msg = "Your Energy Katana teleports back to you, sheathing itself as it does so!"
else
loc = get_turf(user)
diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm
index 7fac0e3386a..aa2a033f130 100644
--- a/code/modules/paperwork/paperplane.dm
+++ b/code/modules/paperwork/paperplane.dm
@@ -72,7 +72,7 @@
update_icon()
else if(is_hot(P))
- if(user.disabilities & CLUMSY && prob(10))
+ if((CLUMSY in user.mutations) && prob(10))
user.visible_message("[user] accidentally ignites [user.p_them()]self!", \
"You miss [src] and accidentally light yourself on fire!")
user.unEquip(P)
diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm
index 8d0525c5eb1..1134f7a0752 100644
--- a/code/modules/paperwork/photography.dm
+++ b/code/modules/paperwork/photography.dm
@@ -324,24 +324,26 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor
mob_detail += "You can also see [A] on the photo[A:health < 75 ? " - [A] looks hurt":""].[holding ? " [holding]":"."]."
return mob_detail
-/obj/item/camera/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
- if(!on || !pictures_left || ismob(target.loc)) return
+/obj/item/camera/afterattack(atom/target, mob/user, flag)
+ if(!on || !pictures_left || ismob(target.loc))
+ return
captureimage(target, user, flag)
playsound(loc, pick('sound/items/polaroid1.ogg', 'sound/items/polaroid2.ogg'), 75, 1, -3)
-
+ set_light(3, 2, LIGHT_COLOR_TUNGSTEN)
+ addtimer(CALLBACK(src, /atom./proc/set_light, 0), 2)
pictures_left--
desc = "A polaroid camera. It has [pictures_left] photos left."
to_chat(user, "[pictures_left] photos left.")
icon_state = icon_off
- on = 0
+ on = FALSE
if(istype(src,/obj/item/camera/spooky))
if(user.mind && user.mind.assigned_role == "Chaplain" && see_ghosts)
if(prob(24))
handle_haunt(user)
spawn(64)
icon_state = icon_on
- on = 1
+ on = TRUE
/obj/item/camera/proc/can_capture_turf(turf/T, mob/user)
var/viewer = user
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 89988ec9f55..234b885284e 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -244,7 +244,7 @@
else if(has_electronics && !terminal)
. += "Electronics installed but not wired."
else /* if(!has_electronics && !terminal) */
- . += "There is no electronics nor connected wires."
+ . += "There are no electronics nor connected wires."
else
if(stat & MAINT)
. += "The cover is closed. Something wrong with it: it doesn't work."
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index 78c2561ae7d..0a31d882488 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -39,81 +39,86 @@
if(3)
. += "The casing is closed."
-/obj/machinery/light_construct/attackby(obj/item/W as obj, mob/living/user as mob, params)
- src.add_fingerprint(user)
- if(istype(W, /obj/item/wrench))
- if(src.stage == 1)
- playsound(src.loc, W.usesound, 75, 1)
- to_chat(usr, "You begin deconstructing [src].")
- if(!do_after(usr, 30 * W.toolspeed, target = src))
+/obj/machinery/light_construct/wrench_act(mob/living/user, obj/item/I)
+ . = TRUE
+ switch(stage)
+ if(1)
+ to_chat(user, "You begin deconstructing [src].")
+ if(!I.use_tool(src, user, 30, volume = I.tool_volume))
return
- new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
- user.visible_message("[user.name] deconstructs [src].", \
- "You deconstruct [src].", "You hear a noise.")
- playsound(src.loc, W.usesound, 75, 1)
+ new /obj/item/stack/sheet/metal(get_turf(loc), sheets_refunded)
+ user.visible_message("[user] deconstructs [src].", \
+ "You deconstruct [src].", "You hear a noise.")
qdel(src)
- if(src.stage == 2)
- to_chat(usr, "You have to remove the wires first.")
- return
+ if(2)
+ to_chat(user, "You have to remove the wires first.")
+ if(3)
+ to_chat(user, "You have to unscrew the case first.")
- if(src.stage == 3)
- to_chat(usr, "You have to unscrew the case first.")
- return
-
- if(istype(W, /obj/item/wirecutters))
- if(src.stage != 2) return
- src.stage = 1
- switch(fixture_type)
- if("tube")
- src.icon_state = "tube-construct-stage1"
- if("bulb")
- src.icon_state = "bulb-construct-stage1"
- new /obj/item/stack/cable_coil(get_turf(src.loc), 1, paramcolor = COLOR_RED)
- user.visible_message("[user.name] removes the wiring from [src].", \
- "You remove the wiring from [src].", "You hear a noise.")
- playsound(loc, W.usesound, 100, 1)
+/obj/machinery/light_construct/wirecutter_act(mob/living/user, obj/item/I)
+ if(stage != 2)
return
+ . = TRUE
+ if(!I.use_tool(src, user, 0))
+ return
+ playsound(loc, I.usesound, 100, 1)
+ . = TRUE
+ stage = 1
+ switch(fixture_type)
+ if("tube")
+ icon_state = "tube-construct-stage1"
+ if("bulb")
+ icon_state = "bulb-construct-stage1"
+ new /obj/item/stack/cable_coil(get_turf(loc), 1, paramcolor = COLOR_RED)
+ user.visible_message("[user] removes the wiring from [src].", \
+ "You remove the wiring from [src].", "You hear a noise.")
+
+/obj/machinery/light_construct/screwdriver_act(mob/living/user, obj/item/I)
+ if(stage != 2)
+ return
+ . = TRUE
+ if(!I.use_tool(src, user, 0))
+ return
+ switch(fixture_type)
+ if("tube")
+ icon_state = "tube-empty"
+ if("bulb")
+ icon_state = "bulb-empty"
+ stage = 3
+ user.visible_message("[user] closes [src]'s casing.", \
+ "You close [src]'s casing.", "You hear a noise.")
+ playsound(loc, I.usesound, 75, 1)
+
+ switch(fixture_type)
+ if("tube")
+ newlight = new /obj/machinery/light/built(loc)
+ if("bulb")
+ newlight = new /obj/machinery/light/small/built(loc)
+
+ newlight.setDir(dir)
+ transfer_fingerprints_to(newlight)
+ qdel(src)
+
+/obj/machinery/light_construct/attackby(obj/item/W, mob/living/user, params)
+ add_fingerprint(user)
if(istype(W, /obj/item/stack/cable_coil))
- if(src.stage != 1) return
+ if(stage != 1)
+ return
var/obj/item/stack/cable_coil/coil = W
coil.use(1)
switch(fixture_type)
if("tube")
- src.icon_state = "tube-construct-stage2"
+ icon_state = "tube-construct-stage2"
if("bulb")
- src.icon_state = "bulb-construct-stage2"
- src.stage = 2
+ icon_state = "bulb-construct-stage2"
+ stage = 2
playsound(loc, coil.usesound, 50, 1)
- user.visible_message("[user.name] adds wires to [src].", \
- "You add wires to [src].")
+ user.visible_message("[user.name] adds wires to [src].", \
+ "You add wires to [src].")
return
- if(istype(W, /obj/item/screwdriver))
- if(src.stage == 2)
- switch(fixture_type)
- if("tube")
- src.icon_state = "tube-empty"
- if("bulb")
- src.icon_state = "bulb-empty"
- src.stage = 3
- user.visible_message("[user.name] closes [src]'s casing.", \
- "You close [src]'s casing.", "You hear a noise.")
- playsound(src.loc, W.usesound, 75, 1)
-
- switch(fixture_type)
-
- if("tube")
- newlight = new /obj/machinery/light/built(src.loc)
- if("bulb")
- newlight = new /obj/machinery/light/small/built(src.loc)
-
- newlight.dir = src.dir
- src.transfer_fingerprints_to(newlight)
- qdel(src)
- return
- else
- return ..()
+ return ..()
/obj/machinery/light_construct/blob_act(obj/structure/blob/B)
if(B && B.loc == loc)
diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm
index cf3a16432c0..74acdf618d0 100644
--- a/code/modules/power/singularity/narsie.dm
+++ b/code/modules/power/singularity/narsie.dm
@@ -93,7 +93,7 @@
/obj/singularity/narsie/proc/pickcultist() //Narsie rewards his cultists with being devoured first, then picks a ghost to follow. --NEO
var/list/cultists = list()
var/list/noncultists = list()
- for(var/mob/living/carbon/food in GLOB.living_mob_list) //we don't care about constructs or cult-Ians or whatever. cult-monkeys are fair game i guess
+ for(var/mob/living/carbon/food in GLOB.alive_mob_list) //we don't care about constructs or cult-Ians or whatever. cult-monkeys are fair game i guess
var/turf/pos = get_turf(food)
if(pos.z != src.z)
continue
diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm
index f2e8fa53a8d..f88128ab974 100644
--- a/code/modules/power/smes.dm
+++ b/code/modules/power/smes.dm
@@ -29,11 +29,6 @@
var/output_level_max = 200000 // cap on output_level
var/output_used = 0 // amount of power actually outputted. may be less than output_level if the powernet returns excess power
- //Holders for powerout event.
- var/last_output_attempt = 0
- var/last_input_attempt = 0
- var/last_charge = 0
-
var/name_tag = null
var/obj/machinery/power/terminal/terminal = null
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index f8c23a696fa..7e1d4f59267 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -183,7 +183,7 @@
if(damage > explosion_point)
if(get_turf(src))
var/turf/position = get_turf(src)
- for(var/mob/living/mob in GLOB.living_mob_list)
+ for(var/mob/living/mob in GLOB.alive_mob_list)
var/turf/mob_pos = get_turf(mob)
if(mob_pos && mob_pos.z == position.z)
if(ishuman(mob))
diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm
index d18c9c1832b..5a0069632a2 100644
--- a/code/modules/reagents/chemistry/holder.dm
+++ b/code/modules/reagents/chemistry/holder.dm
@@ -331,6 +331,7 @@
M.update_canmove()
if(update_flags & STATUS_UPDATE_STAMINA)
M.update_stamina()
+ M.update_health_hud()
if(update_flags & STATUS_UPDATE_BLIND)
M.update_blind_effects()
if(update_flags & STATUS_UPDATE_BLURRY)
diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm
index 8cdb69062ff..f3b4181062e 100644
--- a/code/modules/reagents/chemistry/reagents.dm
+++ b/code/modules/reagents/chemistry/reagents.dm
@@ -203,9 +203,7 @@
return
M.emote("deathgasp")
M.status_flags |= FAKEDEATH
- M.update_stat("fakedeath reagent")
- M.med_hud_set_health()
- M.med_hud_set_status()
+ M.updatehealth("fakedeath reagent")
/datum/reagent/proc/fakerevive(mob/living/M)
if(!(M.status_flags & FAKEDEATH))
@@ -215,10 +213,6 @@
if(M.resting)
M.StopResting()
M.status_flags &= ~(FAKEDEATH)
- M.update_stat("fakedeath reagent end")
- M.med_hud_set_status()
- M.med_hud_set_health()
if(M.healthdoll)
M.healthdoll.cached_healthdoll_overlays.Cut()
- if(M.dna.species)
- M.dna.species.handle_hud_icons(M)
+ M.updatehealth("fakedeath reagent end")
diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm
index 262acae5f82..4a1f9213267 100644
--- a/code/modules/reagents/chemistry/reagents/medicine.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine.dm
@@ -790,7 +790,7 @@
..()
return
M.SetJitter(0)
- var/needs_update = M.mutations.len > 0 || M.disabilities > 0
+ var/needs_update = M.mutations.len > 0
if(needs_update)
for(var/block = 1; block<=DNA_SE_LENGTH; block++)
diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm
index c6960aac916..f975cac7293 100644
--- a/code/modules/reagents/chemistry/reagents/water.dm
+++ b/code/modules/reagents/chemistry/reagents/water.dm
@@ -96,21 +96,21 @@
C.l_hand.clean_blood()
if(C.wear_mask)
if(C.wear_mask.clean_blood())
- C.update_inv_wear_mask(0)
+ C.update_inv_wear_mask()
if(ishuman(M))
var/mob/living/carbon/human/H = C
if(H.head)
if(H.head.clean_blood())
- H.update_inv_head(0,0)
+ H.update_inv_head()
if(H.wear_suit)
if(H.wear_suit.clean_blood())
- H.update_inv_wear_suit(0,0)
+ H.update_inv_wear_suit()
else if(H.w_uniform)
if(H.w_uniform.clean_blood())
- H.update_inv_w_uniform(0,0)
+ H.update_inv_w_uniform()
if(H.shoes)
if(H.shoes.clean_blood())
- H.update_inv_shoes(0,0)
+ H.update_inv_shoes()
M.clean_blood()
..()
diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm
index e16ce4a0824..544deb8d11f 100644
--- a/code/modules/recycling/disposal.dm
+++ b/code/modules/recycling/disposal.dm
@@ -330,7 +330,7 @@
// eject the contents of the disposal unit
/obj/machinery/disposal/proc/eject()
for(var/atom/movable/AM in src)
- AM.loc = src.loc
+ AM.forceMove(loc)
AM.pipe_eject(0)
update()
@@ -471,7 +471,7 @@
for(var/atom/movable/AM in H)
target = get_offset_target_turf(src.loc, rand(5)-rand(5), rand(5)-rand(5))
- AM.loc = src.loc
+ AM.forceMove(loc)
AM.pipe_eject(0)
if(!istype(AM, /mob/living/silicon/robot/drone) && !istype(AM, /mob/living/silicon/robot/syndicate/saboteur)) //Poor drones kept smashing windows and taking system damage being fired out of disposals. ~Z
spawn(1)
@@ -487,7 +487,7 @@
if(istype(I, /obj/item/projectile))
return
if(prob(75))
- I.loc = src
+ I.forceMove(src)
for(var/mob/M in viewers(src))
M.show_message("\the [I] lands in \the [src].", 3)
update()
@@ -550,7 +550,7 @@
// now everything inside the disposal gets put into the holder
// note AM since can contain mobs or objs
for(var/atom/movable/AM in D)
- AM.loc = src
+ AM.forceMove(src)
SEND_SIGNAL(AM, COMSIG_MOVABLE_DISPOSING, src, D)
if(istype(AM, /mob/living/carbon/human))
var/mob/living/carbon/human/H = AM
@@ -582,7 +582,7 @@
D.expel(src) // no trunk connected, so expel immediately
return
- loc = D.trunk
+ forceMove(D.trunk)
active = 1
dir = DOWN
spawn(1)
@@ -639,11 +639,10 @@
// used when a a holder meets a stuck holder
/obj/structure/disposalholder/proc/merge(var/obj/structure/disposalholder/other)
for(var/atom/movable/AM in other)
- AM.loc = src // move everything in other holder to this one
+ AM.forceMove(src) // move everything in other holder to this one
if(ismob(AM))
var/mob/M = AM
- if(M.client) // if a client mob, update eye to follow this holder
- M.client.eye = src
+ M.reset_perspective(src) // if a client mob, update eye to follow this holder
if(other.has_fat_guy)
has_fat_guy = 1
@@ -712,7 +711,7 @@
// this is unlikely, but just dump out everything into the turf in case
for(var/atom/movable/AM in H)
- AM.loc = T
+ AM.forceMove(T)
AM.pipe_eject(0)
qdel(H)
..()
@@ -747,9 +746,9 @@
if(H2 && !H2.active)
H.merge(H2)
- H.loc = P
+ H.forceMove(P)
else // if wasn't a pipe, then set loc to turf
- H.loc = T
+ H.forceMove(T)
return null
return P
@@ -791,7 +790,7 @@
if(T.density) // dense ouput turf, so stop holder
H.active = 0
- H.loc = src
+ H.forceMove(src)
return
if(T.intact && istype(T,/turf/simulated/floor)) //intact floor, pop the tile
var/turf/simulated/floor/F = T
@@ -807,7 +806,7 @@
playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0)
if(H)
for(var/atom/movable/AM in H)
- AM.loc = T
+ AM.forceMove(T)
AM.pipe_eject(direction)
spawn(1)
if(AM)
@@ -822,7 +821,7 @@
for(var/atom/movable/AM in H)
target = get_offset_target_turf(T, rand(5)-rand(5), rand(5)-rand(5))
- AM.loc = T
+ AM.forceMove(T)
AM.pipe_eject(0)
spawn(1)
if(AM)
@@ -853,7 +852,7 @@
// this is unlikely, but just dump out everything into the turf in case
for(var/atom/movable/AM in H)
- AM.loc = T
+ AM.forceMove(T)
AM.pipe_eject(0)
qdel(H)
return
@@ -1070,9 +1069,9 @@
var/obj/structure/disposalholder/H2 = locate() in P
if(H2 && !H2.active)
H.merge(H2)
- H.loc = P
+ H.forceMove(P)
else // if wasn't a pipe, then set loc to turf
- H.loc = T
+ H.forceMove(T)
return null
return P
@@ -1129,9 +1128,9 @@
if(H2 && !H2.active)
H.merge(H2)
- H.loc = P
+ H.forceMove(P)
else // if wasn't a pipe, then set loc to turf
- H.loc = T
+ H.forceMove(T)
return null
return P
@@ -1361,10 +1360,6 @@
/atom/movable/proc/pipe_eject(var/direction)
return
-// check if mob has client, if so restore client view on eject
-/mob/pipe_eject(var/direction)
- reset_perspective(null)
-
/obj/effect/decal/cleanable/blood/gibs/pipe_eject(var/direction)
var/list/dirs
if(direction)
diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm
index 403df48be69..ecf6b9887fc 100755
--- a/code/modules/recycling/sortingmachinery.dm
+++ b/code/modules/recycling/sortingmachinery.dm
@@ -25,7 +25,7 @@
/obj/structure/bigDelivery/attack_hand(mob/user as mob)
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
if(wrapped)
- wrapped.loc = get_turf(src)
+ wrapped.forceMove(get_turf(src))
if(istype(wrapped, /obj/structure/closet))
var/obj/structure/closet/O = wrapped
O.welded = init_welded
diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm
index 3951cf23312..95cee124076 100644
--- a/code/modules/research/experimentor.dm
+++ b/code/modules/research/experimentor.dm
@@ -89,8 +89,8 @@
component_parts += new /obj/item/stock_parts/micro_laser(src)
component_parts += new /obj/item/stock_parts/micro_laser(src)
spawn(1)
- trackedIan = locate(/mob/living/simple_animal/pet/dog/corgi/Ian) in GLOB.mob_list
- trackedRuntime = locate(/mob/living/simple_animal/pet/cat/Runtime) in GLOB.mob_list
+ trackedIan = locate(/mob/living/simple_animal/pet/dog/corgi/Ian) in GLOB.mob_living_list
+ trackedRuntime = locate(/mob/living/simple_animal/pet/cat/Runtime) in GLOB.mob_living_list
SetTypeReactions()
RefreshParts()
diff --git a/code/modules/spacepods/spacepod.dm b/code/modules/spacepods/spacepod.dm
index de24c351c4a..2e3c89017ef 100644
--- a/code/modules/spacepods/spacepod.dm
+++ b/code/modules/spacepods/spacepod.dm
@@ -37,8 +37,6 @@
var/datum/gas_mixture/cabin_air
var/obj/machinery/portable_atmospherics/canister/internal_tank
var/use_internal_tank = 0
- var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature
- var/datum/global_iterator/pr_give_air //moves air from tank to cabin
var/datum/effect_system/trail_follow/ion/space_trail/ion_trail
@@ -117,8 +115,6 @@
src.ion_trail.set_up(src)
src.ion_trail.start()
src.use_internal_tank = 1
- pr_int_temp_processor = new /datum/global_iterator/pod_preserve_temp(list(src))
- pr_give_air = new /datum/global_iterator/pod_tank_give_air(list(src))
equipment_system = new(src)
equipment_system.installed_modules += battery
GLOB.spacepods_list += src
@@ -127,6 +123,7 @@
cargo_hold.storage_slots = 0 //You need to install cargo modules to use it.
cargo_hold.max_w_class = 5 //fit almost anything
cargo_hold.max_combined_w_class = 0 //you can optimize your stash with larger items
+ START_PROCESSING(SSobj, src)
/obj/spacepod/Destroy()
if(equipment_system.cargo_system)
@@ -136,8 +133,6 @@
QDEL_NULL(battery)
QDEL_NULL(cabin_air)
QDEL_NULL(internal_tank)
- QDEL_NULL(pr_int_temp_processor)
- QDEL_NULL(pr_give_air)
QDEL_NULL(ion_trail)
occupant_sanity_check()
if(pilot)
@@ -148,13 +143,14 @@
M.forceMove(get_turf(src))
passengers -= M
GLOB.spacepods_list -= src
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/spacepod/process()
+ give_air()
+ regulate_temp()
if(src.empcounter > 0)
src.empcounter--
- else
- STOP_PROCESSING(SSobj, src)
/obj/spacepod/proc/update_icons()
if(!pod_overlays)
@@ -288,7 +284,6 @@
deal_damage(80 / severity)
if(empcounter < (40 / severity))
empcounter = 40 / severity
- START_PROCESSING(SSobj, src)
switch(severity)
if(1)
@@ -998,22 +993,17 @@
return 1
-/datum/global_iterator/pod_preserve_temp //normalizing cabin air temperature to 20 degrees celsium
- delay = 20
-
- process(var/obj/spacepod/spacepod)
- if(spacepod.cabin_air && spacepod.cabin_air.return_volume() > 0)
- var/delta = spacepod.cabin_air.temperature - T20C
- spacepod.cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1)))
-
-/datum/global_iterator/pod_tank_give_air
- delay = 15
-
-/datum/global_iterator/pod_tank_give_air/process(var/obj/spacepod/spacepod)
- if(spacepod && spacepod.internal_tank)
- var/datum/gas_mixture/tank_air = spacepod.internal_tank.return_air()
- var/datum/gas_mixture/cabin_air = spacepod.cabin_air
+// Fun fact, these procs are just copypastes from mech code
+// And have been for the past 4 years
+// Please send help
+/obj/spacepod/proc/regulate_temp()
+ if(cabin_air && cabin_air.return_volume() > 0)
+ var/delta = cabin_air.temperature - T20C
+ cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1)))
+/obj/spacepod/proc/give_air()
+ if(internal_tank)
+ var/datum/gas_mixture/tank_air = internal_tank.return_air()
var/release_pressure = ONE_ATMOSPHERE
var/cabin_pressure = cabin_air.return_pressure()
var/pressure_delta = min(release_pressure - cabin_pressure, (tank_air.return_pressure() - cabin_pressure)/2)
@@ -1024,7 +1014,7 @@
var/datum/gas_mixture/removed = tank_air.remove(transfer_moles)
cabin_air.merge(removed)
else if(pressure_delta < 0) //cabin pressure higher than release pressure
- var/datum/gas_mixture/t_air = spacepod.get_turf_air()
+ var/datum/gas_mixture/t_air = get_turf_air()
pressure_delta = cabin_pressure - release_pressure
if(t_air)
pressure_delta = min(cabin_pressure - t_air.return_pressure(), pressure_delta)
@@ -1035,8 +1025,6 @@
t_air.merge(removed)
else //just delete the cabin gas, we're in space or some shit
qdel(removed)
- else
- return stop()
/obj/spacepod/relaymove(mob/user, direction)
if(user != src.pilot)
diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm
index 510d3b32171..19ff7fa37d8 100644
--- a/code/modules/surgery/organs/augments_internal.dm
+++ b/code/modules/surgery/organs/augments_internal.dm
@@ -141,9 +141,11 @@
/obj/item/organ/internal/cyberimp/brain/anti_stun/emp_act(severity)
if(crit_fail || emp_proof)
return
- crit_fail = 1
- spawn(90 / severity)
- crit_fail = 0
+ crit_fail = TRUE
+ addtimer(CALLBACK(src, .proc/reboot), 90 / severity)
+
+/obj/item/organ/internal/cyberimp/brain/anti_stun/proc/reboot()
+ crit_fail = FALSE
/obj/item/organ/internal/cyberimp/brain/clown_voice
name = "Comical implant"
@@ -230,11 +232,13 @@
if(owner.stat == DEAD)
return
if(owner.nutrition <= hunger_threshold)
- synthesizing = 1
+ synthesizing = TRUE
to_chat(owner, "You feel less hungry...")
owner.adjust_nutrition(50)
- spawn(50)
- synthesizing = 0
+ addtimer(CALLBACK(src, .proc/synth_cool), 50)
+
+/obj/item/organ/internal/cyberimp/chest/nutriment/proc/synth_cool()
+ synthesizing = FALSE
/obj/item/organ/internal/cyberimp/chest/nutriment/emp_act(severity)
if(!owner || emp_proof)
@@ -309,10 +313,15 @@
var/mob/living/carbon/human/H = owner
if(H.stat != DEAD && prob(50 / severity))
H.set_heartattack(TRUE)
- spawn(600 / severity)
- H.set_heartattack(FALSE)
- if(H.stat == CONSCIOUS)
- to_chat(H, "You feel your heart beating again!")
+ addtimer(CALLBACK(src, .proc/undo_heart_attack), 600 / severity)
+
+/obj/item/organ/internal/cyberimp/chest/reviver/proc/undo_heart_attack()
+ var/mob/living/carbon/human/H = owner
+ if(!istype(H))
+ return
+ H.set_heartattack(FALSE)
+ if(H.stat == CONSCIOUS)
+ to_chat(H, "You feel your heart beating again!")
//BOX O' IMPLANTS
diff --git a/code/modules/surgery/organs/ears.dm b/code/modules/surgery/organs/ears.dm
index 02b788eb7a5..bc57338dbbe 100644
--- a/code/modules/surgery/organs/ears.dm
+++ b/code/modules/surgery/organs/ears.dm
@@ -19,7 +19,7 @@
return
var/mob/living/carbon/C = owner
// genetic deafness prevents the body from using the ears, even if healthy
- if(C.disabilities & DEAF)
+ if(DEAF in C.mutations)
deaf = max(deaf, 1)
else
if(ishuman(C))
@@ -37,7 +37,7 @@
ear_damage = 0
var/mob/living/carbon/C = owner
- if(istype(C) && C.disabilities & DEAF)
+ if(istype(C) && (DEAF in C.mutations))
deaf = 1
/obj/item/organ/internal/ears/proc/AdjustEarDamage(ddmg, ddeaf)
diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm
index e2b70207532..1b205f957ce 100644
--- a/code/modules/surgery/organs/eyes.dm
+++ b/code/modules/surgery/organs/eyes.dm
@@ -9,7 +9,7 @@
var/list/colourmatrix = null
var/list/colourblind_matrix = MATRIX_GREYSCALE //Special colourblindness parameters. By default, it's black-and-white.
var/list/replace_colours = LIST_GREYSCALE_REPLACE
- var/dependent_disabilities = null //Gets set by eye-dependent disabilities such as colourblindness so the eyes can transfer the disability during transplantation.
+ var/dependent_disabilities = list() //Gets set by eye-dependent disabilities such as colourblindness so the eyes can transfer the disability during transplantation.
var/weld_proof = null //If set, the eyes will not take damage during welding. eg. IPC optical sensors do not take damage when they weld things while all other eyes will.
var/vision_flags = 0
@@ -30,7 +30,7 @@
return eyes_icon
/obj/item/organ/internal/eyes/proc/get_colourmatrix() //Returns a special colour matrix if the eyes are organic and the mob is colourblind, otherwise it uses the current one.
- if(!is_robotic() && owner.disabilities & COLOURBLIND)
+ if(!is_robotic() && (COLOURBLIND in owner.mutations))
return colourblind_matrix
else
return colourmatrix
@@ -44,16 +44,16 @@
if(istype(M) && eye_colour)
M.update_body() //Apply our eye colour to the target.
- if(!(M.disabilities & COLOURBLIND) && (dependent_disabilities & COLOURBLIND)) //If the eyes are colourblind and we're not, carry over the gene.
- dependent_disabilities &= ~COLOURBLIND
+ if(!(COLOURBLIND in M.mutations) && (COLOURBLIND in dependent_disabilities)) //If the eyes are colourblind and we're not, carry over the gene.
+ dependent_disabilities -= COLOURBLIND
M.dna.SetSEState(GLOB.colourblindblock,1)
genemutcheck(M,GLOB.colourblindblock,null,MUTCHK_FORCED)
else
M.update_client_colour() //If we're here, that means the mob acquired the colourblindness gene while they didn't have eyes. Better handle it.
/obj/item/organ/internal/eyes/remove(mob/living/carbon/human/M, special = 0)
- if(!special && (M.disabilities & COLOURBLIND)) //If special is set, that means these eyes are getting deleted (i.e. during set_species())
- if(!(dependent_disabilities & COLOURBLIND)) //We only want to change COLOURBLINDBLOCK and such it the eyes are being surgically removed.
+ if(!special && (COLOURBLIND in M.mutations)) //If special is set, that means these eyes are getting deleted (i.e. during set_species())
+ if(!(COLOURBLIND in dependent_disabilities)) //We only want to change COLOURBLINDBLOCK and such it the eyes are being surgically removed.
dependent_disabilities |= COLOURBLIND
M.dna.SetSEState(GLOB.colourblindblock,0)
genemutcheck(M,GLOB.colourblindblock,null,MUTCHK_FORCED)
diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm
index 51175fd53be..8308a793ca9 100644
--- a/code/modules/surgery/organs/heart.dm
+++ b/code/modules/surgery/organs/heart.dm
@@ -23,9 +23,8 @@
Stop()
return
- spawn(120)
- if(!owner)
- Stop()
+ if(!special)
+ addtimer(CALLBACK(src, .proc/stop_if_unowned), 120)
/obj/item/organ/internal/heart/emp_act(intensity)
if(!is_robotic() || emp_proof)
@@ -43,14 +42,16 @@
return
if(!beating)
Restart()
- spawn(80)
- if(!owner)
- Stop()
+ addtimer(CALLBACK(src, .proc/stop_if_unowned), 80)
/obj/item/organ/internal/heart/safe_replace(mob/living/carbon/human/target)
Restart()
..()
+/obj/item/organ/internal/heart/proc/stop_if_unowned()
+ if(!owner)
+ Stop()
+
/obj/item/organ/internal/heart/proc/Stop()
beating = FALSE
update_icon()
diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm
index 1813a73cee1..0ae2f4c395a 100644
--- a/code/modules/surgery/organs/organ_external.dm
+++ b/code/modules/surgery/organs/organ_external.dm
@@ -68,7 +68,7 @@
icon_state = dead_icon
if(owner)
to_chat(owner, "You can't feel your [name] anymore...")
- owner.update_body(update_sprite)
+ owner.update_body()
if(vital)
owner.death()
@@ -672,12 +672,12 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/mutate()
src.status |= ORGAN_MUTATED
if(owner)
- owner.update_body(1, 1) //Forces all bodyparts to update in order to correctly render the deformed sprite.
+ owner.update_body(TRUE) //Forces all bodyparts to update in order to correctly render the deformed sprite.
/obj/item/organ/external/proc/unmutate()
src.status &= ~ORGAN_MUTATED
if(owner)
- owner.update_body(1, 1) //Forces all bodyparts to update in order to correctly return them to normal.
+ owner.update_body(TRUE) //Forces all bodyparts to update in order to correctly return them to normal.
/obj/item/organ/external/proc/get_damage() //returns total damage
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health?
diff --git a/icons/mob/body_accessory_64.dmi b/icons/mob/body_accessory_64.dmi
deleted file mode 100644
index 72d7f5e0d46..00000000000
Binary files a/icons/mob/body_accessory_64.dmi and /dev/null differ
diff --git a/icons/mob/screen_alien.dmi b/icons/mob/screen_alien.dmi
index c254b276bc5..209ec839939 100644
Binary files a/icons/mob/screen_alien.dmi and b/icons/mob/screen_alien.dmi differ
diff --git a/icons/obj/cloning.dmi b/icons/obj/cloning.dmi
index 69abac9ee4f..83f5d6352d2 100644
Binary files a/icons/obj/cloning.dmi and b/icons/obj/cloning.dmi differ
diff --git a/paradise.dme b/paradise.dme
index acc84e8d18f..f2dbf198ebd 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -242,6 +242,7 @@
#include "code\controllers\subsystem\radio.dm"
#include "code\controllers\subsystem\shuttles.dm"
#include "code\controllers\subsystem\spacedrift.dm"
+#include "code\controllers\subsystem\statistics.dm"
#include "code\controllers\subsystem\sun.dm"
#include "code\controllers\subsystem\throwing.dm"
#include "code\controllers\subsystem\ticker.dm"
@@ -360,7 +361,6 @@
#include "code\datums\diseases\advance\symptoms\youth.dm"
#include "code\datums\helper_datums\construction_datum.dm"
#include "code\datums\helper_datums\events.dm"
-#include "code\datums\helper_datums\global_iterator.dm"
#include "code\datums\helper_datums\icon_snapshot.dm"
#include "code\datums\helper_datums\input.dm"
#include "code\datums\helper_datums\map_template.dm"
@@ -1485,7 +1485,8 @@
#include "code\modules\events\event_procs.dm"
#include "code\modules\events\false_alarm.dm"
#include "code\modules\events\floorcluwne.dm"
-#include "code\modules\events\grid_check.dm"
+#include "code\modules\events\apc_overload.dm"
+#include "code\modules\events\apc_short.dm"
#include "code\modules\events\headcrabs.dm"
#include "code\modules\events\immovable_rod.dm"
#include "code\modules\events\infestation.dm"
diff --git a/sound/AI/apc_overload.ogg b/sound/AI/apc_overload.ogg
new file mode 100644
index 00000000000..ef9357b9eb6
Binary files /dev/null and b/sound/AI/apc_overload.ogg differ
diff --git a/sound/AI/apc_short.ogg b/sound/AI/apc_short.ogg
new file mode 100644
index 00000000000..90afc50f6fb
Binary files /dev/null and b/sound/AI/apc_short.ogg differ