diff --git a/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm b/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm
index 95499e5a1f3..7cbbaf16f80 100644
--- a/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm
+++ b/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm
@@ -384,7 +384,7 @@
"GK" = (
/obj/item/clothing/head/bearpelt,
/obj/structure/table/wood,
-/obj/item/reagent_containers/food/snacks/burger/fish,
+/obj/item/food/burger/fish,
/obj/item/reagent_containers/food/drinks/beer{
pixel_x = -4
},
diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_random_ripley.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_random_ripley.dmm
index 546ddcff7e4..a4485e0b8c5 100644
--- a/_maps/RandomRuins/LavaRuins/lavaland_surface_random_ripley.dmm
+++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_random_ripley.dmm
@@ -9,9 +9,7 @@
/turf/open/floor/plating/asteroid/basalt/lava_land_surface,
/area/lavaland/surface/outdoors)
"d" = (
-/obj/mecha/working/ripley/mining{
- ruin_mecha = 1
- },
+/obj/vehicle/sealed/mecha/working/ripley/mining,
/turf/open/floor/plating/asteroid/basalt/lava_land_surface,
/area/lavaland/surface/outdoors)
"e" = (
diff --git a/_maps/RandomRuins/SpaceRuins/mechtransport.dmm b/_maps/RandomRuins/SpaceRuins/mechtransport.dmm
index 778809373dc..e715917000a 100644
--- a/_maps/RandomRuins/SpaceRuins/mechtransport.dmm
+++ b/_maps/RandomRuins/SpaceRuins/mechtransport.dmm
@@ -101,9 +101,7 @@
/turf/open/floor/mineral/titanium/yellow/airless,
/area/ruin/space/has_grav/powered/mechtransport)
"A" = (
-/obj/mecha/working/ripley{
- ruin_mecha = 1
- },
+/obj/vehicle/sealed/mecha/working/ripley,
/turf/open/floor/mineral/titanium/yellow/airless,
/area/ruin/space/has_grav/powered/mechtransport)
"B" = (
diff --git a/_maps/RandomZLevels/Academy.dmm b/_maps/RandomZLevels/Academy.dmm
index 8dd85592076..6043b0ea763 100644
--- a/_maps/RandomZLevels/Academy.dmm
+++ b/_maps/RandomZLevels/Academy.dmm
@@ -1320,7 +1320,7 @@
/obj/machinery/light{
dir = 4
},
-/obj/item/reagent_containers/food/snacks/burger/spell,
+/obj/item/food/burger/spell,
/obj/effect/turf_decal/tile/blue{
dir = 4
},
diff --git a/_maps/RandomZLevels/caves.dmm b/_maps/RandomZLevels/caves.dmm
index 955f16277f2..1a86b6b07e0 100644
--- a/_maps/RandomZLevels/caves.dmm
+++ b/_maps/RandomZLevels/caves.dmm
@@ -2018,9 +2018,7 @@
},
/area/awaymission/caves/bmp_asteroid)
"gC" = (
-/obj/mecha/working/ripley/mining{
- ruin_mecha = 1
- },
+/obj/vehicle/sealed/mecha/working/ripley/mining,
/turf/open/floor/plasteel/recharge_floor,
/area/awaymission/caves/bmp_asteroid)
"gD" = (
diff --git a/_maps/RandomZLevels/snowdin.dmm b/_maps/RandomZLevels/snowdin.dmm
index 58ee677789f..1ba6334ed50 100644
--- a/_maps/RandomZLevels/snowdin.dmm
+++ b/_maps/RandomZLevels/snowdin.dmm
@@ -13637,10 +13637,7 @@
/turf/open/floor/plasteel/dark,
/area/awaymission/snowdin/post/mining_main/mechbay)
"In" = (
-/obj/mecha/working/ripley/mining{
- dir = 1;
- ruin_mecha = 1
- },
+/obj/vehicle/sealed/mecha/working/ripley/mining,
/obj/effect/turf_decal/bot,
/turf/open/floor/mech_bay_recharge_floor,
/area/awaymission/snowdin/post/mining_main/mechbay)
diff --git a/_maps/RandomZLevels/spacebattle.dmm b/_maps/RandomZLevels/spacebattle.dmm
index 17826ee8e9f..8105a180f17 100644
--- a/_maps/RandomZLevels/spacebattle.dmm
+++ b/_maps/RandomZLevels/spacebattle.dmm
@@ -815,13 +815,11 @@
/turf/open/floor/plasteel,
/area/awaymission/spacebattle/cruiser)
"dK" = (
-/obj/mecha/medical/odysseus,
+/obj/vehicle/sealed/mecha/medical/odysseus,
/turf/open/floor/plating,
/area/awaymission/spacebattle/cruiser)
"dL" = (
-/obj/mecha/working/clarke{
- ruin_mecha = 1
- },
+/obj/vehicle/sealed/mecha/working/clarke,
/turf/open/floor/plating,
/area/awaymission/spacebattle/cruiser)
"dM" = (
@@ -2366,7 +2364,7 @@
/turf/open/floor/plasteel/rockvault/alien,
/area/awaymission/spacebattle/secret)
"jp" = (
-/obj/mecha/combat/gygax,
+/obj/vehicle/sealed/mecha/combat/gygax,
/turf/open/floor/plating,
/area/awaymission/spacebattle/cruiser)
"jq" = (
@@ -2444,7 +2442,7 @@
/area/awaymission/spacebattle/cruiser)
"jz" = (
/mob/living/simple_animal/hostile/syndicate/mecha_pilot{
- spawn_mecha_type = /obj/mecha/combat/gygax/dark/loaded
+ spawn_mecha_type = /obj/vehicle/sealed/mecha/combat/gygax/dark/loaded
},
/turf/open/floor/plasteel,
/area/awaymission/spacebattle/cruiser)
@@ -2581,13 +2579,13 @@
/area/awaymission/spacebattle/cruiser)
"jV" = (
/mob/living/simple_animal/hostile/syndicate/mecha_pilot{
- spawn_mecha_type = /obj/mecha/combat/gygax/dark/loaded
+ spawn_mecha_type = /obj/vehicle/sealed/mecha/combat/gygax/dark/loaded
},
/turf/open/floor/plating/airless,
/area/awaymission/spacebattle/cruiser)
"jW" = (
/mob/living/simple_animal/hostile/syndicate/mecha_pilot{
- spawn_mecha_type = /obj/mecha/combat/gygax/dark/loaded
+ spawn_mecha_type = /obj/vehicle/sealed/mecha/combat/gygax/dark/loaded
},
/turf/open/floor/plasteel/airless,
/area/awaymission/spacebattle/cruiser)
diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm
index cee110ca599..11aed37f3ce 100644
--- a/_maps/map_files/Deltastation/DeltaStation2.dmm
+++ b/_maps/map_files/Deltastation/DeltaStation2.dmm
@@ -51177,12 +51177,12 @@
/turf/open/floor/plating,
/area/ai_monitored/turret_protected/aisat_interior)
"bTp" = (
-/obj/machinery/meter,
/obj/structure/cable,
/obj/effect/turf_decal/stripes/line,
/obj/machinery/atmospherics/pipe/manifold/supply/hidden/layer3{
dir = 4
},
+/obj/machinery/meter/atmos/layer3,
/turf/open/floor/plating,
/area/ai_monitored/turret_protected/aisat_interior)
"bTq" = (
@@ -55936,8 +55936,6 @@
"cbF" = (
/obj/structure/closet/secure_closet/warden,
/obj/item/clothing/under/rank/security/warden/grey,
-/obj/item/storage/box/flashbangs,
-/obj/item/storage/box/handcuffs,
/obj/effect/turf_decal/tile/red,
/obj/effect/turf_decal/tile/red{
dir = 4
@@ -59126,7 +59124,7 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1,
/turf/open/floor/plasteel,
-/area/crew_quarters/heads/captain/private)
+/area/maintenance/central/secondary)
"cik" = (
/obj/structure/disposalpipe/segment,
/obj/machinery/firealarm{
@@ -59955,7 +59953,7 @@
dir = 5
},
/turf/open/floor/plasteel,
-/area/teleporter)
+/area/maintenance/central/secondary)
"cjN" = (
/obj/structure/disposalpipe/segment{
dir = 4
@@ -59967,8 +59965,9 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
dir = 8
},
+/obj/structure/cable,
/turf/open/floor/plating,
-/area/teleporter)
+/area/maintenance/central/secondary)
"cjO" = (
/obj/structure/disposalpipe/segment{
dir = 10
@@ -59981,11 +59980,18 @@
dir = 10
},
/turf/open/floor/plating,
-/area/teleporter)
+/area/maintenance/central/secondary)
"cjP" = (
/obj/effect/decal/cleanable/dirt,
+/obj/machinery/power/apc{
+ areastring = "/area/maintenance/central";
+ dir = 1;
+ name = "Central Maintenance APC";
+ pixel_y = 23
+ },
+/obj/structure/cable,
/turf/open/floor/plating,
-/area/teleporter)
+/area/maintenance/central/secondary)
"cjQ" = (
/obj/structure/closet/emcloset,
/obj/effect/decal/cleanable/dirt,
@@ -59993,7 +59999,7 @@
dir = 4
},
/turf/open/floor/plasteel,
-/area/teleporter)
+/area/maintenance/central/secondary)
"cjR" = (
/obj/structure/disposalpipe/segment,
/obj/effect/turf_decal/tile/neutral,
@@ -60571,7 +60577,7 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1,
/turf/open/floor/plating,
-/area/teleporter)
+/area/maintenance/central/secondary)
"cle" = (
/obj/machinery/light{
dir = 8
@@ -78915,10 +78921,10 @@
/obj/machinery/atmospherics/pipe/manifold/scrubbers/visible{
dir = 1
},
+/obj/machinery/meter,
/turf/open/floor/plasteel,
/area/maintenance/department/electrical)
"cVq" = (
-/obj/machinery/meter,
/obj/effect/turf_decal/tile/yellow{
dir = 8
},
diff --git a/_maps/map_files/IceBoxStation/IceBoxStation.dmm b/_maps/map_files/IceBoxStation/IceBoxStation.dmm
index f1e3d830d7c..8c82b10d8b9 100644
--- a/_maps/map_files/IceBoxStation/IceBoxStation.dmm
+++ b/_maps/map_files/IceBoxStation/IceBoxStation.dmm
@@ -4741,7 +4741,6 @@
/turf/open/floor/plasteel,
/area/security/processing)
"akL" = (
-/obj/machinery/meter,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
dir = 9
},
@@ -5774,7 +5773,6 @@
/area/crew_quarters/fitness)
"anb" = (
/obj/structure/disposalpipe/segment,
-/obj/machinery/meter,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
dir = 4
},
@@ -6184,7 +6182,6 @@
/obj/structure/disposalpipe/segment{
dir = 9
},
-/obj/machinery/meter,
/turf/open/floor/plating,
/area/maintenance/fore/secondary)
"aoa" = (
@@ -6711,6 +6708,7 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3{
dir = 4
},
+/obj/machinery/meter/atmos/layer3,
/turf/open/floor/plating,
/area/maintenance/fore/secondary)
"apv" = (
@@ -13662,12 +13660,6 @@
},
/turf/open/floor/plasteel,
/area/storage/primary)
-"aFV" = (
-/obj/structure/disposalpipe/segment,
-/obj/machinery/meter,
-/obj/structure/cable,
-/turf/open/floor/plating,
-/area/maintenance/fore)
"aFW" = (
/obj/structure/chair/stool,
/turf/open/floor/plasteel,
@@ -20072,17 +20064,6 @@
/obj/item/stack/package_wrap,
/turf/open/floor/plasteel/cafeteria,
/area/crew_quarters/kitchen)
-"aVC" = (
-/obj/machinery/meter,
-/obj/structure/disposalpipe/segment{
- dir = 4
- },
-/obj/structure/cable,
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
- dir = 4
- },
-/turf/open/floor/plating,
-/area/maintenance/port)
"aVD" = (
/obj/structure/table,
/obj/item/reagent_containers/food/condiment/saltshaker{
@@ -37102,10 +37083,6 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1,
/turf/open/floor/plating,
/area/construction)
-"bKB" = (
-/obj/machinery/meter,
-/turf/open/floor/plating,
-/area/maintenance/aft)
"bKD" = (
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden/layer1{
@@ -43342,13 +43319,13 @@
/turf/open/floor/plating,
/area/maintenance/aft)
"ceM" = (
-/obj/machinery/meter,
/obj/structure/disposalpipe/segment,
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1,
/obj/machinery/atmospherics/pipe/manifold/supply/hidden/layer3{
dir = 8
},
+/obj/machinery/meter/atmos/layer3,
/turf/open/floor/plating,
/area/maintenance/starboard/aft)
"ceO" = (
@@ -50816,6 +50793,14 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3,
/turf/open/floor/plasteel,
/area/science/misc_lab)
+"fXZ" = (
+/obj/structure/disposalpipe/segment,
+/obj/structure/cable,
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1,
+/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3,
+/obj/machinery/meter/atmos/layer3,
+/turf/open/floor/plating,
+/area/maintenance/fore/secondary)
"fYd" = (
/obj/effect/turf_decal/tile/yellow{
dir = 8
@@ -52859,6 +52844,31 @@
/obj/item/kirbyplants/random,
/turf/open/floor/plasteel/white,
/area/medical/psychology)
+"mhJ" = (
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/structure/cable,
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3{
+ dir = 4
+ },
+/obj/machinery/meter/atmos/layer3,
+/turf/open/floor/plating,
+/area/maintenance/aft)
+"miW" = (
+/obj/structure/cable,
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3{
+ dir = 4
+ },
+/obj/machinery/meter/atmos/layer3,
+/turf/open/floor/plating,
+/area/maintenance/port/fore)
"mje" = (
/obj/machinery/door/airlock{
name = "Private Restroom"
@@ -54563,6 +54573,12 @@
},
/turf/open/floor/wood,
/area/hallway/secondary/service)
+"rrg" = (
+/obj/structure/cable,
+/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3,
+/obj/machinery/meter/atmos/layer3,
+/turf/open/floor/plating,
+/area/maintenance/port)
"ruy" = (
/obj/effect/turf_decal/stripes/line{
dir = 8
@@ -54832,6 +54848,12 @@
/obj/effect/landmark/start/medical_doctor,
/turf/open/floor/plasteel/white,
/area/medical/break_room)
+"smt" = (
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1,
+/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3,
+/obj/machinery/meter/atmos/layer3,
+/turf/open/floor/plating,
+/area/maintenance/fore)
"soQ" = (
/obj/machinery/power/apc{
areastring = "/area/vacant_room/commissary";
@@ -73105,7 +73127,7 @@ asU
bbV
boP
alU
-asK
+miW
azF
aAS
aFP
@@ -78006,7 +78028,7 @@ aPG
aPG
aPG
aPG
-aVC
+aSX
gjl
baS
aZp
@@ -78262,7 +78284,7 @@ aPI
aRb
aRb
aRb
-aRb
+rrg
aWx
gjl
baS
@@ -79536,7 +79558,7 @@ ayH
ayH
ayH
ayH
-aFV
+ayH
ayH
ayH
aKy
@@ -81592,7 +81614,7 @@ aBi
apV
arF
arF
-arF
+smt
arF
aue
arP
@@ -89086,8 +89108,8 @@ bDO
bFl
bDO
bHU
-hxs
-bKB
+mhJ
+bAw
bLK
bMM
bOd
@@ -91599,7 +91621,7 @@ anc
anc
anc
bkV
-anc
+fXZ
anD
aoI
arj
diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm
index 68ebbce0b85..f95097975f2 100644
--- a/_maps/map_files/PubbyStation/PubbyStation.dmm
+++ b/_maps/map_files/PubbyStation/PubbyStation.dmm
@@ -4643,10 +4643,6 @@
},
/turf/open/floor/plating,
/area/maintenance/department/security/brig)
-"alV" = (
-/obj/machinery/meter,
-/turf/open/floor/plating,
-/area/maintenance/department/security/brig)
"alW" = (
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1,
@@ -38358,10 +38354,10 @@
},
/area/maintenance/department/engine)
"bSt" = (
-/obj/machinery/meter,
/obj/machinery/atmospherics/pipe/simple/cyan/hidden/layer3{
dir = 10
},
+/obj/machinery/meter/atmos/layer3,
/turf/open/floor/plating,
/area/maintenance/department/engine)
"bSu" = (
@@ -38610,8 +38606,7 @@
"bTf" = (
/obj/machinery/atmospherics/pipe/simple/cyan/hidden/layer3,
/obj/machinery/atmospherics/components/binary/pump/on/layer1{
- name = "Virology Waste to Space";
- pixel_x = -1
+ name = "Virology Waste to Space"
},
/turf/open/floor/plating{
icon_state = "platingdmg1"
@@ -38619,8 +38614,7 @@
/area/maintenance/department/engine)
"bTg" = (
/obj/machinery/atmospherics/components/binary/pump/on/layer1{
- name = "Virology Waste to Space";
- pixel_x = -1
+ name = "Virology Waste to Space"
},
/turf/open/floor/plating,
/area/maintenance/department/engine)
@@ -41230,7 +41224,6 @@
/turf/open/floor/plasteel/dark,
/area/maintenance/disposal/incinerator)
"bZi" = (
-/obj/machinery/meter,
/obj/machinery/atmospherics/pipe/simple/purple/visible,
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 4
@@ -41387,6 +41380,7 @@
/obj/machinery/atmospherics/pipe/simple/purple/visible{
dir = 5
},
+/obj/machinery/meter,
/turf/closed/wall/r_wall,
/area/maintenance/disposal/incinerator)
"bZS" = (
@@ -44123,8 +44117,7 @@
"clM" = (
/obj/machinery/atmospherics/components/binary/pump/on/layer1{
dir = 1;
- name = "Tcomms Sat Waste";
- pixel_x = -1
+ name = "Tcomms Sat Waste"
},
/turf/open/floor/plating,
/area/tcommsat/computer)
@@ -55701,13 +55694,13 @@
/turf/open/floor/plating,
/area/maintenance/department/cargo)
"sUP" = (
-/obj/machinery/meter,
/obj/machinery/atmospherics/pipe/simple/cyan/hidden/layer3{
dir = 6
},
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden/layer1{
dir = 8
},
+/obj/machinery/meter/atmos/layer1,
/turf/open/floor/plating{
icon_state = "panelscorched"
},
@@ -76508,7 +76501,7 @@ afU
ajG
akw
all
-alV
+ajD
aiu
vCC
apB
diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm
index f039c9068a0..d331d42e911 100644
--- a/_maps/map_files/generic/CentCom.dmm
+++ b/_maps/map_files/generic/CentCom.dmm
@@ -13603,7 +13603,7 @@
"El" = (
/obj/structure/table/wood,
/obj/item/storage/bag/tray,
-/obj/item/reagent_containers/food/snacks/burger/spell,
+/obj/item/food/burger/spell,
/turf/open/floor/carpet,
/area/wizard_station)
"Em" = (
diff --git a/_maps/shuttles/emergency_cruise.dmm b/_maps/shuttles/emergency_cruise.dmm
index c32ee237bc8..16596547877 100644
--- a/_maps/shuttles/emergency_cruise.dmm
+++ b/_maps/shuttles/emergency_cruise.dmm
@@ -257,7 +257,7 @@
/area/template_noop)
"kJ" = (
/obj/structure/table/wood/fancy,
-/obj/item/reagent_containers/food/snacks/burger/baconburger{
+/obj/item/food/burger/baconburger{
pixel_x = 3
},
/obj/item/reagent_containers/food/snacks/cracker{
diff --git a/_maps/shuttles/emergency_luxury.dmm b/_maps/shuttles/emergency_luxury.dmm
index 7c9ea9ecdad..5cf7597bec8 100644
--- a/_maps/shuttles/emergency_luxury.dmm
+++ b/_maps/shuttles/emergency_luxury.dmm
@@ -232,7 +232,7 @@
/turf/open/floor/mineral/diamond,
/area/shuttle/escape/luxury)
"aN" = (
-/obj/item/reagent_containers/food/snacks/burger/baconburger{
+/obj/item/food/burger/baconburger{
pixel_y = 2
},
/obj/structure/table/wood/fancy/black,
diff --git a/_maps/shuttles/whiteship_kilo.dmm b/_maps/shuttles/whiteship_kilo.dmm
index e881e56aabb..9ab91165ab3 100644
--- a/_maps/shuttles/whiteship_kilo.dmm
+++ b/_maps/shuttles/whiteship_kilo.dmm
@@ -1450,7 +1450,7 @@
/obj/structure/table/wood,
/obj/effect/decal/cleanable/dirt,
/obj/item/storage/bag/tray,
-/obj/item/reagent_containers/food/snacks/burger/bearger,
+/obj/item/food/burger/bearger,
/turf/open/floor/wood{
icon_state = "wood-broken3"
},
diff --git a/code/__DEFINES/cooldowns.dm b/code/__DEFINES/cooldowns.dm
index a6bceddbd73..adc4109a2be 100644
--- a/code/__DEFINES/cooldowns.dm
+++ b/code/__DEFINES/cooldowns.dm
@@ -29,6 +29,12 @@
#define COOLDOWN_BORG_SELF_REPAIR "borg_self_repair"
#define COOLDOWN_EXPRESSPOD_CONSOLE "expresspod_console"
+//Mecha cooldowns
+#define COOLDOWN_MECHA_MESSAGE "mecha_message"
+#define COOLDOWN_MECHA_EQUIPMENT "mecha_equipment"
+#define COOLDOWN_MECHA_ARMOR "mecha_armor"
+#define COOLDOWN_MECHA_MELEE_ATTACK "mecha_melee"
+#define COOLDOWN_MECHA_SMOKE "mecha_smoke"
//TIMER COOLDOWN MACROS
diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm
index d0bc71e4827..658d1082b8b 100644
--- a/code/__DEFINES/dcs/signals.dm
+++ b/code/__DEFINES/dcs/signals.dm
@@ -442,6 +442,8 @@
#define COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH "obj_default_unfasten_wrench"
///from base of /turf/proc/levelupdate(). (intact) true to hide and false to unhide
#define COMSIG_OBJ_HIDE "obj_hide"
+/// from /obj/item/toy/crayon/spraycan/afterattack: (color_is_dark)
+#define COMSIG_OBJ_PAINTED "obj_painted"
// /obj/machinery signals
@@ -606,11 +608,11 @@
///sent to targets during the process_hit proc of projectiles
#define COMSIG_PELLET_CLOUD_INIT "pellet_cloud_init"
-
-// /obj/mecha signals
+// /obj/vehicle/sealed/mecha signals
///sent from mecha action buttons to the mecha they're linked to
-#define COMSIG_MECHA_ACTION_ACTIVATE "mecha_action_activate"
+#define COMSIG_MECHA_ACTION_TRIGGER "mecha_action_activate"
+
// /mob/living/carbon/human signals
@@ -660,6 +662,9 @@
///from base of obj/item/reagent_containers/food/snacks/attack() & Edible component: (mob/living/eater, mob/feeder, bitecount, bitesize)
#define COMSIG_FOOD_EATEN "food_eaten"
+///from base of Component/edible/On_Consume: (mob/living/eater, mob/living/feeder)
+#define COMSIG_FOOD_CONSUMED "food_consumed"
+
#define COMSIG_ITEM_FRIED "item_fried"
#define COMSIG_FRYING_HANDLED (1<<0)
diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm
index c54c7bae57d..0b7e5b585e3 100644
--- a/code/__DEFINES/flags.dm
+++ b/code/__DEFINES/flags.dm
@@ -42,7 +42,10 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define RAD_PROTECT_CONTENTS_1 (1 << 17)
/// should this object be allowed to be contaminated
#define RAD_NO_CONTAMINATE_1 (1 << 18)
-
+/// Should this object be paintable with very dark colors?
+#define ALLOW_DARK_PAINTS_1 (1 << 19)
+/// Should this object be unpaintable?
+#define UNPAINTABLE_1 (1 << 20)
/// If the thing can reflect light (lasers/energy)
#define RICOCHET_SHINY (1<<0)
diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm
index 9ff6c8e84d2..1a0d829993c 100644
--- a/code/__DEFINES/is_helpers.dm
+++ b/code/__DEFINES/is_helpers.dm
@@ -170,7 +170,7 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
#define ismachinery(A) (istype(A, /obj/machinery))
-#define ismecha(A) (istype(A, /obj/mecha))
+#define ismecha(A) (istype(A, /obj/vehicle/sealed/mecha))
#define ismopable(A) (A && (A.layer <= HIGH_SIGIL_LAYER)) //If something can be cleaned by floor-cleaning devices such as mops or clean bots
diff --git a/code/__DEFINES/maps.dm b/code/__DEFINES/maps.dm
index b0989828fe7..7be150fbf72 100644
--- a/code/__DEFINES/maps.dm
+++ b/code/__DEFINES/maps.dm
@@ -105,3 +105,19 @@ require only minor tweaks.
#define PLACE_LAVA_RUIN "lavaland" //On lavaland ruin z levels(s)
#define PLACE_BELOW "below" //On z levl below - centered on same tile
#define PLACE_ISOLATED "isolated" //On isolated ruin z level
+
+
+///Map generation defines
+#define PERLIN_LAYER_HEIGHT "perlin_height"
+#define PERLIN_LAYER_HUMIDITY "perlin_humidity"
+#define PERLIN_LAYER_HEAT "perlin_heat"
+
+#define BIOME_LOW_HEAT "low_heat"
+#define BIOME_LOWMEDIUM_HEAT "lowmedium_heat"
+#define BIOME_HIGHMEDIUM_HEAT "highmedium_heat"
+#define BIOME_HIGH_HEAT "high_heat"
+
+#define BIOME_LOW_HUMIDITY "low_humidity"
+#define BIOME_LOWMEDIUM_HUMIDITY "lowmedium_humidity"
+#define BIOME_HIGHMEDIUM_HUMIDITY "highmedium_humidity"
+#define BIOME_HIGH_HUMIDITY "high_humidity"
diff --git a/code/__DEFINES/tgs.dm b/code/__DEFINES/tgs.dm
index 35d9dbefbdf..5a143b391ab 100644
--- a/code/__DEFINES/tgs.dm
+++ b/code/__DEFINES/tgs.dm
@@ -1,6 +1,6 @@
// tgstation-server DMAPI
-#define TGS_DMAPI_VERSION "5.2.3"
+#define TGS_DMAPI_VERSION "5.2.4"
// All functions and datums outside this document are subject to change with any version and should not be relied on.
diff --git a/code/__DEFINES/vehicles.dm b/code/__DEFINES/vehicles.dm
index 48383546b9d..4b59e585aa3 100644
--- a/code/__DEFINES/vehicles.dm
+++ b/code/__DEFINES/vehicles.dm
@@ -4,6 +4,15 @@
#define VEHICLE_CONTROL_DRIVE 2
#define VEHICLE_CONTROL_KIDNAPPED 4 //Can't leave vehicle voluntarily, has to resist.
+//Mech flags
+#define ADDING_ACCESS_POSSIBLE (1<<0)
+#define ADDING_MAINT_ACCESS_POSSIBLE (1<<1)
+#define CANSTRAFE (1<<2)
+#define LIGHTS_ON (1<<3)
+#define SILICON_PILOT (1<<4)
+#define IS_ENCLOSED (1<<5)
+#define HAS_LIGHTS (1<<6)
+
//Car trait flags
#define CAN_KIDNAP 1
diff --git a/code/__HELPERS/_lists.dm b/code/__HELPERS/_lists.dm
index aaf004cc1a9..156432f74dc 100644
--- a/code/__HELPERS/_lists.dm
+++ b/code/__HELPERS/_lists.dm
@@ -24,6 +24,7 @@
#define reverseList(L) reverseRange(L.Copy())
#define LAZYADDASSOC(L, K, V) if(!L) { L = list(); } L[K] += list(V);
#define LAZYREMOVEASSOC(L, K, V) if(L) { if(L[K]) { L[K] -= V; if(!length(L[K])) L -= K; } if(!length(L)) L = null; }
+#define LAZYACCESSASSOC(L, I, K) L ? L[I] ? L[I][K] ? L[I][K] : null : null : null
/// Passed into BINARY_INSERT to compare keys
#define COMPARE_KEY __BIN_LIST[__BIN_MID]
diff --git a/code/__HELPERS/files.dm b/code/__HELPERS/files.dm
index f102a96adfe..6fc48ded6a6 100644
--- a/code/__HELPERS/files.dm
+++ b/code/__HELPERS/files.dm
@@ -47,12 +47,12 @@
var/time_to_wait = GLOB.fileaccess_timer - world.time
if(time_to_wait > 0)
to_chat(src, "Error: file_spam_check(): Spam. Please wait [DisplayTimeText(time_to_wait)].")
- return 1
+ return TRUE
var/delay = FTPDELAY
if(holder)
delay *= ADMIN_FTPDELAY_MODIFIER
GLOB.fileaccess_timer = world.time + delay
- return 0
+ return FALSE
#undef FTPDELAY
#undef ADMIN_FTPDELAY_MODIFIER
diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index 7dd96e00f01..e4c6b403e05 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -94,8 +94,8 @@
if(C == must_be_alone)
continue
if(our_area == get_area(C))
- return 0
- return 1
+ return FALSE
+ return TRUE
//We used to use linear regression to approximate the answer, but Mloc realized this was actually faster.
//And lo and behold, it is, and it's more accurate to boot.
@@ -263,7 +263,7 @@
while(Y1!=Y2)
T=locate(X1,Y1,Z)
if(IS_OPAQUE_TURF(T))
- return 0
+ return FALSE
Y1+=s
else
var/m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
@@ -279,8 +279,8 @@
X1+=signX //Line exits tile horizontally
T=locate(X1,Y1,Z)
if(IS_OPAQUE_TURF(T))
- return 0
- return 1
+ return FALSE
+ return TRUE
#undef SIGNV
@@ -289,13 +289,9 @@
var/turf/Bturf = get_turf(B)
if(!Aturf || !Bturf)
- return 0
+ return FALSE
- if(inLineOfSight(Aturf.x,Aturf.y, Bturf.x,Bturf.y,Aturf.z))
- return 1
-
- else
- return 0
+ return inLineOfSight(Aturf.x,Aturf.y, Bturf.x,Bturf.y,Aturf.z)
/proc/try_move_adjacent(atom/movable/AM, trydir)
var/turf/T = get_turf(AM)
diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm
index cf58c075c73..6b20b969624 100644
--- a/code/__HELPERS/text.dm
+++ b/code/__HELPERS/text.dm
@@ -257,15 +257,15 @@
/proc/text_in_list(haystack, list/needle_list, start=1, end=0)
for(var/needle in needle_list)
if(findtext(haystack, needle, start, end))
- return 1
- return 0
+ return TRUE
+ return FALSE
//Like above, but case sensitive
/proc/text_in_list_case(haystack, list/needle_list, start=1, end=0)
for(var/needle in needle_list)
if(findtextEx(haystack, needle, start, end))
- return 1
- return 0
+ return TRUE
+ return FALSE
//Adds 'char' ahead of 'text' until there are 'count' characters total
/proc/add_leading(text, count, char = " ")
diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm
index 2e7ffd49133..46719b900a2 100644
--- a/code/__HELPERS/type2type.dm
+++ b/code/__HELPERS/type2type.dm
@@ -385,6 +385,12 @@ GLOBAL_LIST_INIT(modulo_angle_to_dir, list(NORTH,NORTHEAST,EAST,SOUTHEAST,SOUTH,
else
return "#FFFFFF"
+/// Converts "#RRGGBB" to list(0xRR, 0xGG, 0xBB)
+/proc/hex2rgb(color)
+ var/r = hex2num(copytext(color, 2, 4))
+ var/g = hex2num(copytext(color, 4, 6))
+ var/b = hex2num(copytext(color, 6, 8))
+ return list(r, g, b)
//This is a weird one:
//It returns a list of all var names found in the string
@@ -426,10 +432,8 @@ GLOBAL_LIST_INIT(modulo_angle_to_dir, list(NORTH,NORTHEAST,EAST,SOUTHEAST,SOUTH,
/proc/color_hex2num(A)
if(!A || length(A) != length_char(A))
return 0
- var/R = hex2num(copytext(A, 2, 4))
- var/G = hex2num(copytext(A, 4, 6))
- var/B = hex2num(copytext(A, 6, 8))
- return R+G+B
+ var/rgb = hex2rgb(A)
+ return rgb[1] + rgb[2] + rgb[3]
//word of warning: using a matrix like this as a color value will simplify it back to a string after being set
/proc/color_hex2color_matrix(string)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 0b396ce67aa..9b1f6ec3c8c 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -669,28 +669,28 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
//Direction works sometimes
if(is_type_in_typecache(O, GLOB.WALLITEMS_INVERSE))
if(O.dir == turn(dir, 180))
- return 1
+ return TRUE
else if(O.dir == dir)
- return 1
+ return TRUE
//Some stuff doesn't use dir properly, so we need to check pixel instead
//That's exactly what get_turf_pixel() does
if(get_turf_pixel(O) == locdir)
- return 1
+ return TRUE
if(is_type_in_typecache(O, GLOB.WALLITEMS_EXTERNAL) && check_external)
if(is_type_in_typecache(O, GLOB.WALLITEMS_INVERSE))
if(O.dir == turn(dir, 180))
- return 1
+ return TRUE
else if(O.dir == dir)
- return 1
+ return TRUE
//Some stuff is placed directly on the wallturf (signs)
for(var/obj/O in locdir)
if(is_type_in_typecache(O, GLOB.WALLITEMS) && check_external != 2)
if(O.pixel_x == 0 && O.pixel_y == 0)
- return 1
- return 0
+ return TRUE
+ return FALSE
/proc/format_text(text)
return replacetext(replacetext(text,"\proper ",""),"\improper ","")
@@ -976,13 +976,13 @@ B --><-- A
/atom/proc/contains(atom/A)
if(!A)
- return 0
+ return FALSE
for(var/atom/location = A.loc, location, location = location.loc)
if(location == src)
- return 1
+ return TRUE
/proc/flick_overlay_static(O, atom/A, duration)
- set waitfor = 0
+ set waitfor = FALSE
if(!A || !O)
return
A.add_overlay(O)
diff --git a/code/_onclick/adjacent.dm b/code/_onclick/adjacent.dm
index c9746fae980..db2f62052f4 100644
--- a/code/_onclick/adjacent.dm
+++ b/code/_onclick/adjacent.dm
@@ -11,7 +11,7 @@
to check that the mob is not inside of something
*/
/atom/proc/Adjacent(atom/neighbor) // basic inheritance, unused
- return 0
+ return
// Not a sane use of the function and (for now) indicative of an error elsewhere
/area/Adjacent(atom/neighbor)
@@ -57,9 +57,9 @@
if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target, mover = mover))
continue // could not enter src
- return 1 // we don't care about our own density
+ return TRUE // we don't care about our own density
- return 0
+ return FALSE
/*
Adjacency (to anything else):
@@ -78,11 +78,11 @@
// This is necessary for storage items not on your person.
/obj/item/Adjacent(atom/neighbor, recurse = 1)
if(neighbor == loc)
- return 1
+ return TRUE
if(isitem(loc))
if(recurse > 0)
return loc.Adjacent(neighbor,recurse - 1)
- return 0
+ return FALSE
return ..()
/*
@@ -99,7 +99,7 @@
if( O.flags_1&ON_BORDER_1) // windows are on border, check them first
if( O.dir & target_dir || O.dir & (O.dir-1) ) // full tile windows are just diagonals mechanically
- return 0 //O.dir&(O.dir-1) is false for any cardinal direction, but true for diagonal ones
+ return FALSE //O.dir&(O.dir-1) is false for any cardinal direction, but true for diagonal ones
else if( !border_only ) // dense, not on border, cannot pass over
- return 0
- return 1
+ return FALSE
+ return TRUE
diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm
index ce5f6b451b0..14733e1881c 100644
--- a/code/_onclick/ai.dm
+++ b/code/_onclick/ai.dm
@@ -58,10 +58,6 @@
if(modifiers["shift"] && modifiers["ctrl"])
CtrlShiftClickOn(A)
return
- if(modifiers["middle"])
- if(controlled_mech) //Are we piloting a mech? Placed here so the modifiers are not overridden.
- controlled_mech.click_action(A, src, params) //Override AI normal click behavior.
- return
if(modifiers["shift"])
ShiftClickOn(A)
return
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 1a6820170b9..28841f3d5ba 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -109,10 +109,6 @@
if(!modifiers["catcher"] && A.IsObscured())
return
- if(ismecha(loc))
- var/obj/mecha/M = loc
- return M.click_action(A,src,params)
-
if(restrained())
changeNext_move(CLICK_CD_HANDCUFFED) //Doing shit in cuffs shall be vey slow
RestrainedClickOn(A)
diff --git a/code/_onclick/drag_drop.dm b/code/_onclick/drag_drop.dm
index f70b6a86a65..d40d0e65504 100644
--- a/code/_onclick/drag_drop.dm
+++ b/code/_onclick/drag_drop.dm
@@ -78,13 +78,13 @@
. = automatic
/atom/proc/IsAutoclickable()
- . = 1
+ return TRUE
/obj/screen/IsAutoclickable()
- . = 0
+ return FALSE
/obj/screen/click_catcher/IsAutoclickable()
- . = 1
+ return TRUE
/client/MouseDrag(src_object,atom/over_object,src_location,over_location,src_control,over_control,params)
var/list/L = params2list(params)
diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm
index 2809f851b05..1f588774511 100644
--- a/code/_onclick/hud/action_button.dm
+++ b/code/_onclick/hud/action_button.dm
@@ -40,7 +40,7 @@
/obj/screen/movable/action_button/Click(location,control,params)
if (!can_use(usr))
- return
+ return FALSE
var/list/modifiers = params2list(params)
if(modifiers["shift"])
@@ -68,7 +68,7 @@
desc = "Shift-click any button to reset its position, and Control-click it to lock it in place. Alt-click this button to reset all buttons to their default positions."
icon = 'icons/mob/actions.dmi'
icon_state = "bg_default"
- var/hidden = 0
+ var/hidden = FALSE
var/hide_icon = 'icons/mob/actions.dmi'
var/hide_state = "hide"
var/show_state = "show"
@@ -78,7 +78,7 @@
/obj/screen/movable/action_button/hide_toggle/Initialize()
. = ..()
var/static/list/icon_cache = list()
-
+
var/cache_key = "[hide_icon][hide_state]"
hide_appearance = icon_cache[cache_key]
if(!hide_appearance)
diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm
index 5570b64d541..aabe5bf2e3f 100644
--- a/code/_onclick/hud/human.dm
+++ b/code/_onclick/hud/human.dm
@@ -29,7 +29,7 @@
/obj/screen/human/equip/Click()
if(ismecha(usr.loc)) // stops inventory actions in a mech
- return 1
+ return TRUE
var/mob/living/carbon/human/H = usr
H.quick_equip()
diff --git a/code/_onclick/hud/pai.dm b/code/_onclick/hud/pai.dm
index a5f19e263f3..ca4bf1a5bc2 100644
--- a/code/_onclick/hud/pai.dm
+++ b/code/_onclick/hud/pai.dm
@@ -83,14 +83,15 @@
required_software = "host scan"
/obj/screen/pai/host_monitor/Click()
- if(!..())
+ . = ..()
+ if(!.)
return
var/mob/living/silicon/pai/pAI = usr
if(iscarbon(pAI.card.loc))
pAI.hostscan.attack(pAI.card.loc, pAI)
else
to_chat(src, "You are not being carried by anyone!")
- return 0
+ return FALSE
/obj/screen/pai/crew_manifest
name = "Crew Manifest"
diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm
index eed8baa1339..e777f4a1778 100644
--- a/code/_onclick/other_mobs.dm
+++ b/code/_onclick/other_mobs.dm
@@ -81,7 +81,7 @@
*/
/mob/living/carbon/RestrainedClickOn(atom/A)
- return 0
+ return
/mob/living/carbon/human/RangedAttack(atom/A, mouseparams)
. = ..()
diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm
index eb4c75312bc..827ffd6eac4 100644
--- a/code/controllers/configuration/configuration.dm
+++ b/code/controllers/configuration/configuration.dm
@@ -52,7 +52,7 @@
LoadMOTD()
LoadPolicy()
LoadChatFilter()
-
+
if (Master)
Master.OnConfigLoad()
@@ -186,10 +186,9 @@
var/list/banned_edits = list(NAMEOF(src, entries_by_type), NAMEOF(src, entries), NAMEOF(src, directory))
return !(var_name in banned_edits) && ..()
-/datum/controller/configuration/stat_entry()
- if(!statclick)
- statclick = new/obj/effect/statclick/debug(null, "Edit", src)
- stat("[name]:", statclick)
+/datum/controller/configuration/stat_entry(msg)
+ msg = "Edit"
+ return msg
/datum/controller/configuration/proc/Get(entry_type)
var/datum/config_entry/E = entry_type
diff --git a/code/controllers/controller.dm b/code/controllers/controller.dm
index c9d5f1e5650..1f0a01a072c 100644
--- a/code/controllers/controller.dm
+++ b/code/controllers/controller.dm
@@ -16,4 +16,4 @@
/datum/controller/proc/Recover()
-/datum/controller/proc/stat_entry()
+/datum/controller/proc/stat_entry(msg)
diff --git a/code/controllers/failsafe.dm b/code/controllers/failsafe.dm
index 3ce770b66d5..f90cebd5ba1 100644
--- a/code/controllers/failsafe.dm
+++ b/code/controllers/failsafe.dm
@@ -31,7 +31,7 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
Initialize()
/datum/controller/failsafe/Initialize()
- set waitfor = 0
+ set waitfor = FALSE
Failsafe.Loop()
if(!QDELETED(src))
qdel(src) //when Loop() returns, we delete ourselves and let the mc recreate us
@@ -95,8 +95,6 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
/datum/controller/failsafe/proc/defcon_pretty()
return defcon
-/datum/controller/failsafe/stat_entry()
- if(!statclick)
- statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
-
- stat("Failsafe Controller:", statclick.update("Defcon: [defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])"))
+/datum/controller/failsafe/stat_entry(msg)
+ msg = "Defcon: [defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])"
+ return msg
diff --git a/code/controllers/globals.dm b/code/controllers/globals.dm
index 707adfc83fe..21f022acfd0 100644
--- a/code/controllers/globals.dm
+++ b/code/controllers/globals.dm
@@ -22,14 +22,12 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
/datum/controller/global_vars/Destroy(force)
// This is done to prevent an exploit where admins can get around protected vars
- SHOULD_CALL_PARENT(0)
+ SHOULD_CALL_PARENT(FALSE)
return QDEL_HINT_IWILLGC
-/datum/controller/global_vars/stat_entry()
- if(!statclick)
- statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
-
- stat("Globals:", statclick.update("Edit"))
+/datum/controller/global_vars/stat_entry(msg)
+ msg = "Edit"
+ return msg
/datum/controller/global_vars/vv_edit_var(var_name, var_value)
if(gvars_datum_protected_varlist[var_name])
diff --git a/code/controllers/master.dm b/code/controllers/master.dm
index ffe29172f2e..3ec5045a881 100644
--- a/code/controllers/master.dm
+++ b/code/controllers/master.dm
@@ -39,7 +39,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
///Only run ticker subsystems for the next n ticks.
var/skip_ticks = 0
- var/make_runtime = 0
+ var/make_runtime = FALSE
var/initializations_finished_with_no_players_logged_in //I wonder what this could be?
@@ -601,12 +601,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
skip_ticks = 1
-/datum/controller/master/stat_entry()
- if(!statclick)
- statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
-
- stat("Byond:", "(FPS:[world.fps]) (TickCount:[world.time/world.tick_lag]) (TickDrift:[round(Master.tickdrift,1)]([round((Master.tickdrift/(world.time/world.tick_lag))*100,0.1)]%)) (Internal Tick Usage: [round(MAPTICK_LAST_INTERNAL_TICK_USAGE,0.1)]%)")
- stat("Master Controller:", statclick.update("(TickRate:[Master.processing]) (Iteration:[Master.iteration]) (TickLimit: [round(Master.current_ticklimit, 0.1)])"))
+/datum/controller/master/stat_entry(msg)
+ msg = "(TickRate:[Master.processing]) (Iteration:[Master.iteration]) (TickLimit: [round(Master.current_ticklimit, 0.1)])"
+ return msg
/datum/controller/master/StartLoadingMap()
diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm
index 16558f5870d..cd029b58ed8 100644
--- a/code/controllers/subsystem.dm
+++ b/code/controllers/subsystem.dm
@@ -23,7 +23,7 @@
var/priority = FIRE_PRIORITY_DEFAULT
/// [Subsystem Flags][SS_NO_INIT] to control binary behavior. Flags must be set at compile time or before preinit finishes to take full effect. (You can also restart the mc to force them to process again)
- var/flags = 0
+ var/flags = NONE
/// This var is set to TRUE after the subsystem has been initialized.
var/initialized = FALSE
diff --git a/code/controllers/subsystem/acid.dm b/code/controllers/subsystem/acid.dm
index 25d080a1b10..49c4f58ffa9 100644
--- a/code/controllers/subsystem/acid.dm
+++ b/code/controllers/subsystem/acid.dm
@@ -12,7 +12,7 @@ SUBSYSTEM_DEF(acid)
return ..()
-/datum/controller/subsystem/acid/fire(resumed = 0)
+/datum/controller/subsystem/acid/fire(resumed = FALSE)
if (!resumed)
src.currentrun = processing.Copy()
diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm
index 71b82973c6b..a2744cb27be 100644
--- a/code/controllers/subsystem/air.dm
+++ b/code/controllers/subsystem/air.dm
@@ -70,7 +70,7 @@ SUBSYSTEM_DEF(air)
return ..()
-/datum/controller/subsystem/air/fire(resumed = 0)
+/datum/controller/subsystem/air/fire(resumed = FALSE)
var/timer = TICK_USAGE_REAL
if(currentpart == SSAIR_REBUILD_PIPENETS)
@@ -90,7 +90,7 @@ SUBSYSTEM_DEF(air)
cost_pipenets = MC_AVERAGE(cost_pipenets, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
- resumed = 0
+ resumed = FALSE
currentpart = SSAIR_ATMOSMACHINERY
if(currentpart == SSAIR_ATMOSMACHINERY)
@@ -99,7 +99,7 @@ SUBSYSTEM_DEF(air)
cost_atmos_machinery = MC_AVERAGE(cost_atmos_machinery, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
- resumed = 0
+ resumed = FALSE
currentpart = SSAIR_ACTIVETURFS
if(currentpart == SSAIR_ACTIVETURFS)
@@ -108,7 +108,7 @@ SUBSYSTEM_DEF(air)
cost_turfs = MC_AVERAGE(cost_turfs, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
- resumed = 0
+ resumed = FALSE
currentpart = SSAIR_EXCITEDGROUPS
if(currentpart == SSAIR_EXCITEDGROUPS)
@@ -117,7 +117,7 @@ SUBSYSTEM_DEF(air)
cost_groups = MC_AVERAGE(cost_groups, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
- resumed = 0
+ resumed = FALSE
currentpart = SSAIR_HIGHPRESSURE
if(currentpart == SSAIR_HIGHPRESSURE)
@@ -126,7 +126,7 @@ SUBSYSTEM_DEF(air)
cost_highpressure = MC_AVERAGE(cost_highpressure, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
- resumed = 0
+ resumed = FALSE
currentpart = SSAIR_HOTSPOTS
if(currentpart == SSAIR_HOTSPOTS)
@@ -135,7 +135,7 @@ SUBSYSTEM_DEF(air)
cost_hotspots = MC_AVERAGE(cost_hotspots, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
- resumed = 0
+ resumed = FALSE
currentpart = SSAIR_SUPERCONDUCTIVITY
if(currentpart == SSAIR_SUPERCONDUCTIVITY)
@@ -144,13 +144,13 @@ SUBSYSTEM_DEF(air)
cost_superconductivity = MC_AVERAGE(cost_superconductivity, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
- resumed = 0
+ resumed = FALSE
currentpart = SSAIR_REBUILD_PIPENETS
SStgui.update_uis(SSair) //Lightning fast debugging motherfucker
-/datum/controller/subsystem/air/proc/process_pipenets(resumed = 0)
+/datum/controller/subsystem/air/proc/process_pipenets(resumed = FALSE)
if (!resumed)
src.currentrun = networks.Copy()
//cache for sanic speed (lists are references anyways)
@@ -169,7 +169,7 @@ SUBSYSTEM_DEF(air)
if(istype(atmos_machine, /obj/machinery/atmospherics))
pipenets_needing_rebuilt += atmos_machine
-/datum/controller/subsystem/air/proc/process_atmos_machinery(resumed = 0)
+/datum/controller/subsystem/air/proc/process_atmos_machinery(resumed = FALSE)
var/seconds = wait * 0.1
if (!resumed)
src.currentrun = atmos_machinery.Copy()
@@ -184,7 +184,7 @@ SUBSYSTEM_DEF(air)
return
-/datum/controller/subsystem/air/proc/process_super_conductivity(resumed = 0)
+/datum/controller/subsystem/air/proc/process_super_conductivity(resumed = FALSE)
if (!resumed)
src.currentrun = active_super_conductivity.Copy()
//cache for sanic speed (lists are references anyways)
@@ -196,7 +196,7 @@ SUBSYSTEM_DEF(air)
if(MC_TICK_CHECK)
return
-/datum/controller/subsystem/air/proc/process_hotspots(resumed = 0)
+/datum/controller/subsystem/air/proc/process_hotspots(resumed = FALSE)
if (!resumed)
src.currentrun = hotspots.Copy()
//cache for sanic speed (lists are references anyways)
@@ -212,7 +212,7 @@ SUBSYSTEM_DEF(air)
return
-/datum/controller/subsystem/air/proc/process_high_pressure_delta(resumed = 0)
+/datum/controller/subsystem/air/proc/process_high_pressure_delta(resumed = FALSE)
while (high_pressure_delta.len)
var/turf/open/T = high_pressure_delta[high_pressure_delta.len]
high_pressure_delta.len--
@@ -221,7 +221,7 @@ SUBSYSTEM_DEF(air)
if(MC_TICK_CHECK)
return
-/datum/controller/subsystem/air/proc/process_active_turfs(resumed = 0)
+/datum/controller/subsystem/air/proc/process_active_turfs(resumed = FALSE)
//cache for sanic speed
var/fire_count = times_fired
if (!resumed)
@@ -236,7 +236,7 @@ SUBSYSTEM_DEF(air)
if (MC_TICK_CHECK)
return
-/datum/controller/subsystem/air/proc/process_excited_groups(resumed = 0)
+/datum/controller/subsystem/air/proc/process_excited_groups(resumed = FALSE)
if (!resumed)
src.currentrun = excited_groups.Copy()
//cache for sanic speed (lists are references anyways)
@@ -262,7 +262,7 @@ SUBSYSTEM_DEF(air)
T.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, COLOR_VIBRANT_LIME)
#endif
if(istype(T))
- T.excited = 0
+ T.excited = FALSE
if(T.excited_group)
T.excited_group.garbage_collect()
@@ -271,7 +271,7 @@ SUBSYSTEM_DEF(air)
#ifdef VISUALIZE_ACTIVE_TURFS
T.add_atom_colour(COLOR_VIBRANT_LIME, TEMPORARY_COLOUR_PRIORITY)
#endif
- T.excited = 1
+ T.excited = TRUE
active_turfs |= T
if(currentpart == SSAIR_ACTIVETURFS)
currentrun |= T
@@ -370,7 +370,7 @@ SUBSYSTEM_DEF(air)
else
EG.add_turf(ET)
if (!ET.excited)
- ET.excited = 1
+ ET.excited = TRUE
. += ET
/turf/open/space/resolve_active_graph()
return list()
diff --git a/code/controllers/subsystem/discord.dm b/code/controllers/subsystem/discord.dm
index 2bd0ad695d8..f53c983acfc 100644
--- a/code/controllers/subsystem/discord.dm
+++ b/code/controllers/subsystem/discord.dm
@@ -42,14 +42,14 @@ SUBSYSTEM_DEF(discord)
var/list/reverify_cache = list()
var/notify_file = file("data/notify.json")
/// Is TGS enabled (If not we won't fire because otherwise this is useless)
- var/enabled = 0
+ var/enabled = FALSE
/datum/controller/subsystem/discord/Initialize(start_timeofday)
// Check for if we are using TGS, otherwise return and disables firing
if(world.TgsAvailable())
- enabled = 1 // Allows other procs to use this (Account linking, etc)
+ enabled = TRUE // Allows other procs to use this (Account linking, etc)
else
- can_fire = 0 // We dont want excess firing
+ can_fire = FALSE // We dont want excess firing
return ..() // Cancel
try
diff --git a/code/controllers/subsystem/events.dm b/code/controllers/subsystem/events.dm
index 1c74266d6ac..43cce09c44d 100644
--- a/code/controllers/subsystem/events.dm
+++ b/code/controllers/subsystem/events.dm
@@ -25,7 +25,7 @@ SUBSYSTEM_DEF(events)
return ..()
-/datum/controller/subsystem/events/fire(resumed = 0)
+/datum/controller/subsystem/events/fire(resumed = FALSE)
if(!resumed)
checkEvent() //only check these if we aren't resuming a paused fire
src.currentrun = running.Copy()
diff --git a/code/controllers/subsystem/ipintel.dm b/code/controllers/subsystem/ipintel.dm
index fca394924d9..fb0ddead09a 100644
--- a/code/controllers/subsystem/ipintel.dm
+++ b/code/controllers/subsystem/ipintel.dm
@@ -2,13 +2,13 @@ SUBSYSTEM_DEF(ipintel)
name = "XKeyScore"
init_order = INIT_ORDER_XKEYSCORE
flags = SS_NO_FIRE
- var/enabled = 0 //disable at round start to avoid checking reconnects
+ var/enabled = FALSE //disable at round start to avoid checking reconnects
var/throttle = 0
var/errors = 0
var/list/cache = list()
/datum/controller/subsystem/ipintel/Initialize(timeofday, zlevel)
- enabled = 1
+ enabled = TRUE
. = ..()
diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm
index 8d8874f1f70..cefc91b7107 100644
--- a/code/controllers/subsystem/job.dm
+++ b/code/controllers/subsystem/job.dm
@@ -45,7 +45,7 @@ SUBSYSTEM_DEF(job)
var/list/all_jobs = subtypesof(/datum/job)
if(!all_jobs.len)
to_chat(world, "Error setting up jobs, no job datums found")
- return 0
+ return FALSE
for(var/J in all_jobs)
var/datum/job/job = new J()
@@ -62,7 +62,7 @@ SUBSYSTEM_DEF(job)
name_occupations[job.title] = job
type_occupations[J] = job
- return 1
+ return TRUE
/datum/controller/subsystem/job/proc/GetJob(rank)
@@ -189,8 +189,8 @@ SUBSYSTEM_DEF(job)
continue
var/mob/dead/new_player/candidate = pick(candidates)
if(AssignRole(candidate, command_position))
- return 1
- return 0
+ return TRUE
+ return FALSE
//This proc is called at the start of the level loop of DivideOccupations() and will cause head jobs to be checked before any other jobs of the same level
@@ -209,10 +209,10 @@ SUBSYSTEM_DEF(job)
AssignRole(candidate, command_position)
/datum/controller/subsystem/job/proc/FillAIPosition()
- var/ai_selected = 0
+ var/ai_selected = FALSE
var/datum/job/job = GetJob("AI")
if(!job)
- return 0
+ return FALSE
for(var/i = job.total_positions, i > 0, i--)
for(var/level in level_order)
var/list/candidates = list()
@@ -223,8 +223,8 @@ SUBSYSTEM_DEF(job)
ai_selected++
break
if(ai_selected)
- return 1
- return 0
+ return TRUE
+ return FALSE
/** Proc DivideOccupations
diff --git a/code/controllers/subsystem/machines.dm b/code/controllers/subsystem/machines.dm
index f356009569e..60bf8314db3 100644
--- a/code/controllers/subsystem/machines.dm
+++ b/code/controllers/subsystem/machines.dm
@@ -27,7 +27,7 @@ SUBSYSTEM_DEF(machines)
return ..()
-/datum/controller/subsystem/machines/fire(resumed = 0)
+/datum/controller/subsystem/machines/fire(resumed = FALSE)
if (!resumed)
for(var/datum/powernet/Powernet in powernets)
Powernet.reset() //reset the power state.
diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm
index 18f9de9a6d1..28ef539fb01 100644
--- a/code/controllers/subsystem/mapping.dm
+++ b/code/controllers/subsystem/mapping.dm
@@ -34,6 +34,9 @@ SUBSYSTEM_DEF(mapping)
var/list/reservation_ready = list()
var/clearing_reserved_turfs = FALSE
+ ///All possible biomes in assoc list as type || instance
+ var/list/biomes = list()
+
// Z-manager stuff
var/station_start // should only be used for maploading-related tasks
var/space_levels_so_far = 0
@@ -61,6 +64,7 @@ SUBSYSTEM_DEF(mapping)
if(!config || config.defaulted)
to_chat(world, "Unable to load next or default map config, defaulting to Meta Station")
config = old_config
+ initialize_biomes()
loadWorld()
repopulate_sorted_areas()
process_teleport_locs() //Sets up the wizard teleport locations
@@ -551,7 +555,11 @@ GLOBAL_LIST_EMPTY(the_station_areas)
used_turfs.Cut()
reserve_turfs(clearing)
-
+///Initialize all biomes, assoc as type || instance
+/datum/controller/subsystem/mapping/proc/initialize_biomes()
+ for(var/biome_path in subtypesof(/datum/biome))
+ var/datum/biome/biome_instance = new biome_path()
+ biomes[biome_path] += biome_instance
/datum/controller/subsystem/mapping/proc/reg_in_areas_in_z(list/areas)
for(var/B in areas)
diff --git a/code/controllers/subsystem/mobs.dm b/code/controllers/subsystem/mobs.dm
index 5a7dd30ce3b..94140c0f8fe 100644
--- a/code/controllers/subsystem/mobs.dm
+++ b/code/controllers/subsystem/mobs.dm
@@ -24,7 +24,7 @@ SUBSYSTEM_DEF(mobs)
dead_players_by_zlevel.len++
dead_players_by_zlevel[dead_players_by_zlevel.len] = list()
-/datum/controller/subsystem/mobs/fire(resumed = 0)
+/datum/controller/subsystem/mobs/fire(resumed = FALSE)
var/seconds = wait * 0.1
if (!resumed)
src.currentrun = GLOB.mob_living_list.Copy()
diff --git a/code/controllers/subsystem/pai.dm b/code/controllers/subsystem/pai.dm
index 342392ec67f..c563e2a7452 100644
--- a/code/controllers/subsystem/pai.dm
+++ b/code/controllers/subsystem/pai.dm
@@ -68,7 +68,7 @@ SUBSYSTEM_DEF(pai)
if("submit")
if(candidate)
- candidate.ready = 1
+ candidate.ready = TRUE
for(var/obj/item/paicard/p in pai_card_list)
if(!p.pai)
p.alertUpdate()
@@ -195,4 +195,4 @@ SUBSYSTEM_DEF(pai)
var/description
var/role
var/comments
- var/ready = 0
+ var/ready = FALSE
diff --git a/code/controllers/subsystem/processing/processing.dm b/code/controllers/subsystem/processing/processing.dm
index 454709e1d52..f099c3afb2d 100644
--- a/code/controllers/subsystem/processing/processing.dm
+++ b/code/controllers/subsystem/processing/processing.dm
@@ -14,7 +14,7 @@ SUBSYSTEM_DEF(processing)
msg = "[stat_tag]:[length(processing)]"
return ..()
-/datum/controller/subsystem/processing/fire(resumed = 0)
+/datum/controller/subsystem/processing/fire(resumed = FALSE)
if (!resumed)
currentrun = processing.Copy()
//cache for sanic speed (lists are references anyways)
@@ -34,5 +34,5 @@ SUBSYSTEM_DEF(processing)
///This proc is called on a datum if it is being processed in a subsystem. If you override this do not call parent, as it will return PROCESS_KILL. This is done to prevent objects that dont override process() from staying in the processing list
/datum/proc/process()
- set waitfor = 0
+ set waitfor = FALSE
return PROCESS_KILL
diff --git a/code/controllers/subsystem/profiler.dm b/code/controllers/subsystem/profiler.dm
index b3e972bdef4..7533e9663ff 100644
--- a/code/controllers/subsystem/profiler.dm
+++ b/code/controllers/subsystem/profiler.dm
@@ -12,7 +12,7 @@ SUBSYSTEM_DEF(profiler)
/datum/controller/subsystem/profiler/stat_entry(msg)
msg += "F:[round(fetch_cost,1)]ms"
msg += "|W:[round(write_cost,1)]ms"
- ..(msg)
+ return msg
/datum/controller/subsystem/profiler/Initialize()
if(CONFIG_GET(flag/auto_profile))
diff --git a/code/controllers/subsystem/runechat.dm b/code/controllers/subsystem/runechat.dm
index 22cc7254278..f590674bde2 100644
--- a/code/controllers/subsystem/runechat.dm
+++ b/code/controllers/subsystem/runechat.dm
@@ -40,7 +40,8 @@ SUBSYSTEM_DEF(runechat)
bucket_resolution = world.tick_lag
/datum/controller/subsystem/runechat/stat_entry(msg)
- ..("ActMsgs:[bucket_count] SecQueue:[length(second_queue)]")
+ msg = "ActMsgs:[bucket_count] SecQueue:[length(second_queue)]"
+ return msg
/datum/controller/subsystem/runechat/fire(resumed = FALSE)
// Store local references to datum vars as it is faster to access them this way
diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm
index f989e5ff359..6281c98d190 100644
--- a/code/controllers/subsystem/shuttle.dm
+++ b/code/controllers/subsystem/shuttle.dm
@@ -303,7 +303,7 @@ SUBSYSTEM_DEF(shuttle)
if (!SSticker.IsRoundInProgress())
return
- var/callShuttle = 1
+ var/callShuttle = TRUE
for(var/thing in GLOB.shuttle_caller_list)
if(isAI(thing))
@@ -319,7 +319,7 @@ SUBSYSTEM_DEF(shuttle)
var/turf/T = get_turf(thing)
if(T && is_station_level(T.z))
- callShuttle = 0
+ callShuttle = FALSE
break
if(callShuttle)
diff --git a/code/controllers/subsystem/spacedrift.dm b/code/controllers/subsystem/spacedrift.dm
index 0e9aa01753c..c1c7e2a872f 100644
--- a/code/controllers/subsystem/spacedrift.dm
+++ b/code/controllers/subsystem/spacedrift.dm
@@ -13,7 +13,7 @@ SUBSYSTEM_DEF(spacedrift)
return ..()
-/datum/controller/subsystem/spacedrift/fire(resumed = 0)
+/datum/controller/subsystem/spacedrift/fire(resumed = FALSE)
if (!resumed)
src.currentrun = processing.Copy()
diff --git a/code/controllers/subsystem/statpanel.dm b/code/controllers/subsystem/statpanel.dm
index 60ab051456e..720b13dfcd4 100644
--- a/code/controllers/subsystem/statpanel.dm
+++ b/code/controllers/subsystem/statpanel.dm
@@ -32,11 +32,11 @@ SUBSYSTEM_DEF(statpanels)
list("CPU:", world.cpu),
list("Instances:", "[num2text(world.contents.len, 10)]"),
list("World Time:", "[world.time]"),
- list("Globals:", "Edit", "\ref[GLOB]"),
- list("[config]:", "Edit", "\ref[config]"),
- list("Byond:", "(FPS:[world.fps]) (TickCount:[world.time/world.tick_lag]) (TickDrift:[round(Master.tickdrift,1)]([round((Master.tickdrift/(world.time/world.tick_lag))*100,0.1)]%))"),
- list("Master Controller:", Master ? "(TickRate:[Master.processing]) (Iteration:[Master.iteration])" : "ERROR", "\ref[Master]"),
- list("Failsafe Controller:", Failsafe ? "Defcon: [Failsafe.defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])" : "ERROR", "\ref[Failsafe]"),
+ list("Globals:", GLOB.stat_entry(), "\ref[GLOB]"),
+ list("[config]:", config.stat_entry(), "\ref[config]"),
+ list("Byond:", "(FPS:[world.fps]) (TickCount:[world.time/world.tick_lag]) (TickDrift:[round(Master.tickdrift,1)]([round((Master.tickdrift/(world.time/world.tick_lag))*100,0.1)]%)) (Internal Tick Usage: [round(MAPTICK_LAST_INTERNAL_TICK_USAGE,0.1)]%)"),
+ list("Master Controller:", Master.stat_entry(), "\ref[Master]"),
+ list("Failsafe Controller:", Failsafe.stat_entry(), "\ref[Failsafe]"),
list("","")
)
for(var/ss in Master.subsystems)
@@ -94,6 +94,10 @@ SUBSYSTEM_DEF(statpanels)
if(!target_image.loc || target_image.loc.loc != target_mob.listed_turf || !target_image.override)
continue
overrides += target_image.loc
+ if(!(REF(target_mob.listed_turf) in cached_images))
+ target << browse_rsc(getFlatIcon(target_mob.listed_turf, no_anim = TRUE), "[REF(target_mob.listed_turf)].png")
+ cached_images += REF(target_mob.listed_turf)
+ turfitems[++turfitems.len] = list("[target_mob.listed_turf]", REF(target_mob.listed_turf), "[REF(target_mob.listed_turf)].png")
for(var/tc in target_mob.listed_turf)
var/atom/movable/turf_content = tc
if(turf_content.mouse_opacity == MOUSE_OPACITY_TRANSPARENT)
diff --git a/code/controllers/subsystem/tgui.dm b/code/controllers/subsystem/tgui.dm
index 2fe7c64c72d..511ab623da4 100644
--- a/code/controllers/subsystem/tgui.dm
+++ b/code/controllers/subsystem/tgui.dm
@@ -33,7 +33,7 @@ SUBSYSTEM_DEF(tgui)
msg = "P:[length(open_uis)]"
return ..()
-/datum/controller/subsystem/tgui/fire(resumed = 0)
+/datum/controller/subsystem/tgui/fire(resumed = FALSE)
if(!resumed)
src.current_run = open_uis.Copy()
// Cache for sanic speed (lists are references anyways)
diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm
index 98578c9134c..02aff955936 100755
--- a/code/controllers/subsystem/ticker.dm
+++ b/code/controllers/subsystem/ticker.dm
@@ -14,7 +14,7 @@ SUBSYSTEM_DEF(ticker)
var/start_immediately = FALSE
var/setup_done = FALSE //All game setup done including mode post setup and
- var/hide_mode = 0
+ var/hide_mode = FALSE
var/datum/game_mode/mode = null
var/login_music //music played in pregame lobby
@@ -23,7 +23,7 @@ SUBSYSTEM_DEF(ticker)
var/list/datum/mind/minds = list() //The characters in the game. Used for objective tracking.
- var/delay_end = 0 //if set true, the round will not restart on it's own
+ var/delay_end = FALSE //if set true, the round will not restart on it's own
var/admin_delay_notice = "" //a message to display to anyone who tries to restart the world after a delay
var/ready_for_reboot = FALSE //all roundend preparation done with, all that's left is reboot
@@ -32,7 +32,7 @@ SUBSYSTEM_DEF(ticker)
///Boolean to see if the game needs to set up a triumvirate ai (see tripAI.dm)
var/triai = FALSE
- var/tipped = 0 //Did we broadcast the tip of the day yet?
+ var/tipped = FALSE //Did we broadcast the tip of the day yet?
var/selected_tip // What will be the tip of the day?
var/timeLeft //pregame timer
@@ -227,7 +227,7 @@ SUBSYSTEM_DEF(ticker)
if(!mode)
if(!runnable_modes.len)
to_chat(world, "Unable to choose playable game mode. Reverting to pre-game lobby.")
- return 0
+ return FALSE
mode = pickweight(runnable_modes)
if(!mode) //too few roundtypes all run too recently
mode = pick(runnable_modes)
@@ -239,7 +239,7 @@ SUBSYSTEM_DEF(ticker)
qdel(mode)
mode = null
SSjob.ResetOccupations()
- return 0
+ return FALSE
CHECK_TICK
//Configure mode and assign player to special mode stuff
@@ -255,7 +255,7 @@ SUBSYSTEM_DEF(ticker)
QDEL_NULL(mode)
to_chat(world, "Error setting up [GLOB.master_mode]. Reverting to pre-game lobby.")
SSjob.ResetOccupations()
- return 0
+ return FALSE
else
message_admins("DEBUG: Bypassing prestart checks...")
diff --git a/code/datums/action.dm b/code/datums/action.dm
index 5952340136b..8225d1e7f72 100644
--- a/code/datums/action.dm
+++ b/code/datums/action.dm
@@ -168,12 +168,13 @@
return ..()
/datum/action/item_action/Trigger()
- if(!..())
- return 0
+ . = ..()
+ if(!.)
+ return FALSE
if(target)
var/obj/item/I = target
I.ui_action_click(owner, src)
- return 1
+ return TRUE
/datum/action/item_action/ApplyIcon(obj/screen/movable/action_button/current_button, force)
if(button_icon && button_icon_state)
@@ -315,7 +316,7 @@
if(istype(target, /obj/item/hierophant_club))
var/obj/item/hierophant_club/H = target
if(H.teleporting)
- return 0
+ return FALSE
return ..()
/datum/action/item_action/toggle_helmet_flashlight
@@ -384,7 +385,7 @@
/datum/action/item_action/jetpack_stabilization/IsAvailable()
var/obj/item/tank/jetpack/J = target
if(!istype(J) || !J.on)
- return 0
+ return FALSE
return ..()
/datum/action/item_action/hands_free
@@ -439,7 +440,7 @@
/datum/action/item_action/organ_action/IsAvailable()
var/obj/item/organ/I = target
if(!I.owner)
- return 0
+ return FALSE
return ..()
/datum/action/item_action/organ_action/toggle/New(Target)
@@ -586,12 +587,12 @@
/datum/action/innate/Trigger()
if(!..())
- return 0
+ return FALSE
if(!active)
Activate()
else
Deactivate()
- return 1
+ return TRUE
/datum/action/innate/proc/Activate()
return
diff --git a/code/datums/browser.dm b/code/datums/browser.dm
index 0d44759a6f3..96ac651fdaf 100644
--- a/code/datums/browser.dm
+++ b/code/datums/browser.dm
@@ -198,7 +198,7 @@
opentime = 0
/datum/browser/modal/open(use_onclose)
- set waitfor = 0
+ set waitfor = FALSE
opentime = world.time
if (stealfocus)
diff --git a/code/datums/components/armor_plate.dm b/code/datums/components/armor_plate.dm
index 25a886a3c92..41f127c9aab 100644
--- a/code/datums/components/armor_plate.dm
+++ b/code/datums/components/armor_plate.dm
@@ -12,7 +12,7 @@
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine)
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/applyplate)
RegisterSignal(parent, COMSIG_PARENT_PREQDELETED, .proc/dropplates)
- if(istype(parent, /obj/mecha/working/ripley))
+ if(istype(parent, /obj/vehicle/sealed/mecha/working/ripley))
RegisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/apply_mech_overlays)
if(_maxamount)
@@ -71,7 +71,7 @@
O.armor = O.armor.attachArmor(added_armor)
if(ismecha(O))
- var/obj/mecha/R = O
+ var/obj/vehicle/sealed/mecha/R = O
R.update_icon()
to_chat(user, "You strengthen [R], improving its resistance against melee, bullet and laser damage.")
else
@@ -85,13 +85,13 @@
for(var/i in 1 to amount)
new upgrade_item(get_turf(parent))
-/datum/component/armor_plate/proc/apply_mech_overlays(obj/mecha/mech, list/overlays)
+/datum/component/armor_plate/proc/apply_mech_overlays(obj/vehicle/sealed/mecha/mech, list/overlays)
SIGNAL_HANDLER
if(amount)
var/overlay_string = "ripley-g"
if(amount >= 3)
overlay_string += "-full"
- if(!mech.occupant)
+ if(LAZYLEN(mech.occupants))
overlay_string += "-open"
overlays += overlay_string
diff --git a/code/datums/components/food/edible.dm b/code/datums/components/food/edible.dm
index 4886c8b4df4..a38dcc04d59 100644
--- a/code/datums/components/food/edible.dm
+++ b/code/datums/components/food/edible.dm
@@ -40,7 +40,7 @@ Behavior that's still missing from this component that original food items had t
food_flags = NONE,
foodtypes = NONE,
volume = 50,
- eat_time = 30,
+ eat_time = 10,
list/tastes,
list/eatverbs = list("bite","chew","nibble","gnaw","gobble","chomp"),
bite_consumption = 2,
@@ -55,6 +55,9 @@ Behavior that's still missing from this component that original food items had t
if(isitem(parent))
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/UseFromHand)
RegisterSignal(parent, COMSIG_ITEM_FRIED, .proc/OnFried)
+ var/obj/item/item = parent
+ item.grind_results = list() //Cursed but this is how snacks did it, grinding needs a refactor in the future.
+
else if(isturf(parent))
RegisterSignal(parent, COMSIG_ATOM_ATTACK_HAND, .proc/TryToEatTurf)
@@ -144,13 +147,16 @@ Behavior that's still missing from this component that original food items had t
set waitfor = FALSE
+ if(QDELETED(parent))
+ return
+
var/atom/owner = parent
+
if(feeder.a_intent == INTENT_HARM)
return
if(!owner.reagents.total_volume)//Shouldn't be needed but it checks to see if it has anything left in it.
to_chat(feeder, "None of [owner] left, oh no!")
- on_consume?.Invoke(eater, feeder)
if(isturf(parent))
var/turf/T = parent
T.ScrapeAway(1, CHANGETURF_INHERIT_AIR)
@@ -203,6 +209,11 @@ Behavior that's still missing from this component that original food items had t
TakeBite(eater, feeder)
+ //If we're not force-feeding, try take another bite
+ if(eater == feeder)
+ INVOKE_ASYNC(src, .proc/TryToEat, eater, feeder)
+
+
///This function lets the eater take a bite and transfers the reagents to the eater.
/datum/component/edible/proc/TakeBite(mob/living/eater, mob/living/feeder)
@@ -218,7 +229,8 @@ Behavior that's still missing from this component that original food items had t
var/fraction = min(bite_consumption / owner.reagents.total_volume, 1)
owner.reagents.trans_to(eater, bite_consumption, transfered_by = feeder, methods = INGEST)
bitecount++
- On_Consume(eater)
+ if(!owner.reagents.total_volume)
+ On_Consume(eater, feeder)
checkLiked(fraction, eater)
//Invoke our after eat callback if it is valid
@@ -271,18 +283,16 @@ Behavior that's still missing from this component that original food items had t
last_check_time = world.time
///Delete the item when it is fully eaten
-/datum/component/edible/proc/On_Consume(mob/living/eater)
+/datum/component/edible/proc/On_Consume(mob/living/eater, mob/living/feeder)
+ SEND_SIGNAL(parent, COMSIG_FOOD_CONSUMED, eater, feeder)
- var/atom/owner = parent
+ on_consume?.Invoke(eater, feeder)
- if(!eater)
- return
- if(!owner.reagents.total_volume)
- if(isturf(parent))
- var/turf/T = parent
- T.ScrapeAway(1, CHANGETURF_INHERIT_AIR)
- else
- qdel(parent)
+ if(isturf(parent))
+ var/turf/T = parent
+ T.ScrapeAway(1, CHANGETURF_INHERIT_AIR)
+ else
+ qdel(parent)
///Ability to feed food to puppers
/datum/component/edible/proc/UseByAnimal(datum/source, mob/user)
diff --git a/code/datums/components/honkspam.dm b/code/datums/components/honkspam.dm
index 73b5e3335aa..7f2069d18df 100644
--- a/code/datums/components/honkspam.dm
+++ b/code/datums/components/honkspam.dm
@@ -2,9 +2,10 @@
// used ONLY on april's fool. I moved it to a component so it could be
// used in other places
+//This is copypasted on other obj so if you are readin this go refactor it, start on objs with var/limiting_spam
/datum/component/honkspam
dupe_mode = COMPONENT_DUPE_UNIQUE
- var/spam_flag = FALSE
+ var/limiting_spam = FALSE
/datum/component/honkspam/Initialize()
if(!isitem(parent))
@@ -12,11 +13,11 @@
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, .proc/interact)
/datum/component/honkspam/proc/reset_spamflag()
- spam_flag = FALSE
+ limiting_spam = FALSE
/datum/component/honkspam/proc/interact(mob/user)
- if(!spam_flag)
- spam_flag = TRUE
+ if(!limiting_spam)
+ limiting_spam = TRUE
var/obj/item/parent_item = parent
playsound(parent_item.loc, 'sound/items/bikehorn.ogg', 50, TRUE)
addtimer(CALLBACK(src, .proc/reset_spamflag), 2 SECONDS)
diff --git a/code/datums/components/mood.dm b/code/datums/components/mood.dm
index 65da13931e7..6ef4d2e31cb 100644
--- a/code/datums/components/mood.dm
+++ b/code/datums/components/mood.dm
@@ -257,7 +257,7 @@
else
if(the_event.timeout)
addtimer(CALLBACK(src, .proc/clear_event, null, category), the_event.timeout, TIMER_UNIQUE|TIMER_OVERRIDE)
- return 0 //Don't have to update the event.
+ return //Don't have to update the event.
var/list/params = args.Copy(4)
params.Insert(1, parent)
the_event = new type(arglist(params))
@@ -276,7 +276,7 @@
category = REF(category)
var/datum/mood_event/event = mood_events[category]
if(!event)
- return 0
+ return
mood_events -= category
qdel(event)
diff --git a/code/datums/components/paintable.dm b/code/datums/components/paintable.dm
deleted file mode 100644
index a0ed2873c90..00000000000
--- a/code/datums/components/paintable.dm
+++ /dev/null
@@ -1,31 +0,0 @@
-/datum/component/spraycan_paintable
- var/current_paint
-
-/datum/component/spraycan_paintable/Initialize()
- RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/Repaint)
-
-/datum/component/spraycan_paintable/Destroy()
- RemoveCurrentCoat()
- return ..()
-
-/datum/component/spraycan_paintable/proc/RemoveCurrentCoat()
- var/atom/A = parent
- A.remove_atom_colour(FIXED_COLOUR_PRIORITY, current_paint)
-
-/datum/component/spraycan_paintable/proc/Repaint(datum/source, obj/item/toy/crayon/spraycan/spraycan, mob/living/user)
- SIGNAL_HANDLER
-
- if(!istype(spraycan) || user.a_intent == INTENT_HARM)
- return
- . = COMPONENT_NO_AFTERATTACK
- if(spraycan.is_capped)
- to_chat(user, "Take the cap off first!")
- return
- RemoveCurrentCoat()
- if(spraycan.use_charges(user, 2))
- var/colour = spraycan.paint_color
- current_paint = colour
- var/atom/A = parent
- A.add_atom_colour(colour, FIXED_COLOUR_PRIORITY)
- playsound(spraycan, 'sound/effects/spray.ogg', 5, TRUE, 5)
- to_chat(user, "You spray [spraycan] on [A], painting it.")
diff --git a/code/datums/components/spawner.dm b/code/datums/components/spawner.dm
index 8600a59de0c..af7bd200799 100644
--- a/code/datums/components/spawner.dm
+++ b/code/datums/components/spawner.dm
@@ -40,9 +40,9 @@
/datum/component/spawner/proc/try_spawn_mob()
var/atom/P = parent
if(spawned_mobs.len >= max_mobs)
- return 0
+ return
if(spawn_delay > world.time)
- return 0
+ return
spawn_delay = world.time + spawn_time
var/chosen_mob_type = pick(mob_types)
var/mob/living/simple_animal/L = new chosen_mob_type(P.loc)
diff --git a/code/datums/components/summoning.dm b/code/datums/components/summoning.dm
index 9109e26b300..f23229c9d8d 100644
--- a/code/datums/components/summoning.dm
+++ b/code/datums/components/summoning.dm
@@ -52,11 +52,11 @@
/datum/component/summoning/proc/do_spawn_mob(atom/spawn_location, summoner)
if(spawned_mobs.len >= max_mobs)
- return 0
+ return
if(last_spawned_time > world.time)
- return 0
+ return
if(!prob(spawn_chance))
- return 0
+ return
last_spawned_time = world.time + spawn_delay
var/chosen_mob_type = pick(mob_types)
var/mob/living/simple_animal/L = new chosen_mob_type(spawn_location)
diff --git a/code/datums/datum.dm b/code/datums/datum.dm
index 1061bc3e778..2c94fcaa766 100644
--- a/code/datums/datum.dm
+++ b/code/datums/datum.dm
@@ -92,7 +92,7 @@
* Returns [QDEL_HINT_QUEUE]
*/
/datum/proc/Destroy(force=FALSE, ...)
- SHOULD_CALL_PARENT(1)
+ SHOULD_CALL_PARENT(TRUE)
tag = null
datum_flags &= ~DF_USE_TAG //In case something tries to REF us
weak_reference = null //ensure prompt GCing of weakref.
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index e7031761542..8e9fc5755ed 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -136,11 +136,11 @@
/datum/disease/advance/IsSame(datum/disease/advance/D)
if(!(istype(D, /datum/disease/advance)))
- return 0
+ return FALSE
if(GetDiseaseID() != D.GetDiseaseID())
- return 0
- return 1
+ return FALSE
+ return TRUE
// Returns the advance disease with a different reference memory.
/datum/disease/advance/Copy()
@@ -178,8 +178,8 @@
/datum/disease/advance/proc/HasSymptom(datum/symptom/S)
for(var/datum/symptom/symp in symptoms)
if(symp.type == S.type)
- return 1
- return 0
+ return TRUE
+ return FALSE
// Will generate new unique symptoms, use this if there are none. Returns a list of symptoms that were generated.
/datum/disease/advance/proc/GenerateSymptoms(level_min, level_max, amount_get = 0)
diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm
index 5a62dacbbc9..b573233c837 100644
--- a/code/datums/diseases/transformation.dm
+++ b/code/datums/diseases/transformation.dm
@@ -110,7 +110,7 @@
desc = "Monkeys with this disease will bite humans, causing humans to mutate into a monkey."
severity = DISEASE_SEVERITY_BIOHAZARD
stage_prob = 4
- visibility_flags = 0
+ visibility_flags = NONE
agent = "Kongey Vibrion M-909"
new_form = /mob/living/carbon/monkey
bantype = ROLE_MONKEY
@@ -172,7 +172,7 @@
agent = "R2D2 Nanomachines"
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
severity = DISEASE_SEVERITY_BIOHAZARD
- visibility_flags = 0
+ visibility_flags = NONE
stage1 = list()
stage2 = list("Your joints feel stiff.", "Beep...boop..")
stage3 = list("Your joints feel very stiff.", "Your skin feels loose.", "You can feel something move...inside.")
@@ -209,7 +209,7 @@
agent = "Rip-LEY Alien Microbes"
desc = "This disease changes the victim into a xenomorph."
severity = DISEASE_SEVERITY_BIOHAZARD
- visibility_flags = 0
+ visibility_flags = NONE
stage1 = list()
stage2 = list("Your throat feels scratchy.", "Kill...")
stage3 = list("Your throat feels very scratchy.", "Your skin feels tight.", "You can feel something move...inside.")
@@ -242,7 +242,7 @@
agent = "Advanced Mutation Toxin"
desc = "This highly concentrated extract converts anything into more of itself."
severity = DISEASE_SEVERITY_BIOHAZARD
- visibility_flags = 0
+ visibility_flags = NONE
stage1 = list("You don't feel very well.")
stage2 = list("Your skin feels a little slimy.")
stage3 = list("Your appendages are melting away.", "Your limbs begin to lose their shape.")
@@ -275,7 +275,7 @@
agent = "Fell Doge Majicks"
desc = "This disease transforms the victim into a corgi."
severity = DISEASE_SEVERITY_BIOHAZARD
- visibility_flags = 0
+ visibility_flags = NONE
stage1 = list("BARK.")
stage2 = list("You feel the need to wear silly hats.")
stage3 = list("Must... eat... chocolate....", "YAP")
@@ -305,7 +305,7 @@
desc = "A 'gift' from somewhere terrible."
stage_prob = 20
severity = DISEASE_SEVERITY_BIOHAZARD
- visibility_flags = 0
+ visibility_flags = NONE
stage1 = list("Your stomach rumbles.")
stage2 = list("Your skin feels saggy.")
stage3 = list("Your appendages are melting away.", "Your limbs begin to lose their shape.")
@@ -324,7 +324,7 @@
agent = "Tranquility"
desc = "Consuming the flesh of a Gondola comes at a terrible price."
severity = DISEASE_SEVERITY_BIOHAZARD
- visibility_flags = 0
+ visibility_flags = NONE
stage1 = list("You seem a little lighter in your step.")
stage2 = list("You catch yourself smiling for no reason.")
stage3 = list("A cruel sense of calm overcomes you.", "You can't feel your arms!", "You let go of the urge to hurt clowns.")
diff --git a/code/datums/dna.dm b/code/datums/dna.dm
index 82833241d55..e6aaf50246e 100644
--- a/code/datums/dna.dm
+++ b/code/datums/dna.dm
@@ -221,8 +221,8 @@
/datum/dna/proc/is_same_as(datum/dna/D)
if(uni_identity == D.uni_identity && mutation_index == D.mutation_index && real_name == D.real_name)
if(species.type == D.species.type && features == D.features && blood_type == D.blood_type)
- return 1
- return 0
+ return TRUE
+ return FALSE
/datum/dna/proc/update_instability(alert=TRUE)
stability = 100
@@ -438,7 +438,7 @@
/datum/dna/proc/check_block_string(mutation)
if((LAZYLEN(mutation_index) > DNA_MUTATION_BLOCKS) || !(mutation in mutation_index))
- return 0
+ return FALSE
return is_gene_active(mutation)
/datum/dna/proc/is_gene_active(mutation)
@@ -549,7 +549,7 @@
/proc/scramble_dna(mob/living/carbon/M, ui=FALSE, se=FALSE, probability)
if(!M.has_dna())
- return 0
+ return FALSE
if(se)
for(var/i=1, i<=DNA_MUTATION_BLOCKS, i++)
if(prob(probability))
@@ -560,7 +560,7 @@
if(prob(probability))
M.dna.uni_identity = setblock(M.dna.uni_identity, i, random_string(DNA_BLOCK_SIZE, GLOB.hex_characters))
M.updateappearance(mutations_overlay_update=1)
- return 1
+ return TRUE
//value in range 1 to values. values must be greater than 0
//all arguments assumed to be positive integers
diff --git a/code/datums/elements/_element.dm b/code/datums/elements/_element.dm
index 015267b5966..004c11071d8 100644
--- a/code/datums/elements/_element.dm
+++ b/code/datums/elements/_element.dm
@@ -18,7 +18,7 @@
/// Activates the functionality defined by the element on the given target datum
/datum/element/proc/Attach(datum/target)
- SHOULD_CALL_PARENT(1)
+ SHOULD_CALL_PARENT(TRUE)
if(type == /datum/element)
return ELEMENT_INCOMPATIBLE
SEND_SIGNAL(target, COMSIG_ELEMENT_ATTACH, src)
@@ -30,7 +30,7 @@
SIGNAL_HANDLER
SEND_SIGNAL(source, COMSIG_ELEMENT_DETACH, src)
- SHOULD_CALL_PARENT(1)
+ SHOULD_CALL_PARENT(TRUE)
UnregisterSignal(source, COMSIG_PARENT_QDELETING)
/datum/element/Destroy(force)
diff --git a/code/datums/elements/food/food_trash.dm b/code/datums/elements/food/food_trash.dm
new file mode 100644
index 00000000000..b38f328bd0c
--- /dev/null
+++ b/code/datums/elements/food/food_trash.dm
@@ -0,0 +1,37 @@
+// If an item has the food_trash element it will drop an item when it is consumed.
+/datum/element/food_trash
+ element_flags = ELEMENT_BESPOKE
+ id_arg_index = 2
+ /// The type of trash that is spawned by this element
+ var/trash
+
+/datum/element/food_trash/Attach(datum/target, atom/trash)
+ . = ..()
+ if(!isatom(target))
+ return ELEMENT_INCOMPATIBLE
+ src.trash = trash
+ RegisterSignal(target, COMSIG_FOOD_CONSUMED, .proc/generate_trash)
+
+/datum/element/food_trash/Detach(datum/target)
+ . = ..()
+ UnregisterSignal(target, COMSIG_FOOD_CONSUMED)
+
+/datum/element/food_trash/proc/generate_trash(datum/source, mob/living/eater, mob/living/feeder)
+ SIGNAL_HANDLER
+
+ ///cringy signal_handler shouldnt be needed if you dont want to return but oh well
+ INVOKE_ASYNC(src, .proc/async_generate_trash, source)
+
+/datum/element/food_trash/proc/async_generate_trash(datum/source)
+ var/datum/component/edible/edible_component = source
+
+ var/obj/item/trash_item = new trash()
+
+ var/atom/edible_object = edible_component.parent
+
+ var/mob/living/mob_location = edible_object.loc //The foods location
+
+ if(istype(mob_location))
+ mob_location.put_in_hands(trash_item)
+ else
+ trash_item.forceMove(get_turf(edible_component.parent))
diff --git a/code/datums/mapgen/JungleGenerator.dm b/code/datums/mapgen/JungleGenerator.dm
new file mode 100644
index 00000000000..25348640ef7
--- /dev/null
+++ b/code/datums/mapgen/JungleGenerator.dm
@@ -0,0 +1,91 @@
+//the random offset applied to square coordinates, causes intermingling at biome borders
+#define BIOME_RANDOM_SQUARE_DRIFT 2
+
+/datum/map_generator/jungle_generator
+ ///2D list of all biomes based on heat and humidity combos.
+ var/list/possible_biomes = list(
+ BIOME_LOW_HEAT = list(
+ BIOME_LOW_HUMIDITY = /datum/biome/plains,
+ BIOME_LOWMEDIUM_HUMIDITY = /datum/biome/mudlands,
+ BIOME_HIGHMEDIUM_HUMIDITY = /datum/biome/mudlands,
+ BIOME_HIGH_HUMIDITY = /datum/biome/water
+ ),
+ BIOME_LOWMEDIUM_HEAT = list(
+ BIOME_LOW_HUMIDITY = /datum/biome/plains,
+ BIOME_LOWMEDIUM_HUMIDITY = /datum/biome/jungle,
+ BIOME_HIGHMEDIUM_HUMIDITY = /datum/biome/jungle,
+ BIOME_HIGH_HUMIDITY = /datum/biome/mudlands
+ ),
+ BIOME_HIGHMEDIUM_HEAT = list(
+ BIOME_LOW_HUMIDITY = /datum/biome/plains,
+ BIOME_LOWMEDIUM_HUMIDITY = /datum/biome/plains,
+ BIOME_HIGHMEDIUM_HUMIDITY = /datum/biome/jungle/deep,
+ BIOME_HIGH_HUMIDITY = /datum/biome/jungle
+ ),
+ BIOME_HIGH_HEAT = list(
+ BIOME_LOW_HUMIDITY = /datum/biome/wasteland,
+ BIOME_LOWMEDIUM_HUMIDITY = /datum/biome/plains,
+ BIOME_HIGHMEDIUM_HUMIDITY = /datum/biome/jungle,
+ BIOME_HIGH_HUMIDITY = /datum/biome/jungle/deep
+ )
+ )
+ ///Used to select "zoom" level into the perlin noise, higher numbers result in slower transitions
+ var/perlin_zoom = 65
+
+///Seeds the rust-g perlin noise with a random number.
+/datum/map_generator/jungle_generator/generate_terrain(var/list/turfs)
+ . = ..()
+ var/height_seed = rand(0, 50000)
+ var/humidity_seed = rand(0, 50000)
+ var/heat_seed = rand(0, 50000)
+
+ for(var/t in turfs) //Go through all the turfs and generate them
+ var/turf/gen_turf = t
+ var/drift_x = (gen_turf.x + rand(-BIOME_RANDOM_SQUARE_DRIFT, BIOME_RANDOM_SQUARE_DRIFT)) / perlin_zoom
+ var/drift_y = (gen_turf.y + rand(-BIOME_RANDOM_SQUARE_DRIFT, BIOME_RANDOM_SQUARE_DRIFT)) / perlin_zoom
+
+ var/height = text2num(rustg_noise_get_at_coordinates("[height_seed]", "[drift_x]", "[drift_y]"))
+
+
+ var/datum/biome/selected_biome
+ if(height <= 0.85) //If height is less than 0.85, we generate biomes based on the heat and humidity of the area.
+ var/humidity = text2num(rustg_noise_get_at_coordinates("[humidity_seed]", "[drift_x]", "[drift_y]"))
+ var/heat = text2num(rustg_noise_get_at_coordinates("[heat_seed]", "[drift_x]", "[drift_y]"))
+ var/heat_level //Type of heat zone we're in LOW-MEDIUM-HIGH
+ var/humidity_level //Type of humidity zone we're in LOW-MEDIUM-HIGH
+
+ switch(heat)
+ if(0 to 0.25)
+ heat_level = BIOME_LOW_HEAT
+ if(0.25 to 0.5)
+ heat_level = BIOME_LOWMEDIUM_HEAT
+ if(0.5 to 0.75)
+ heat_level = BIOME_HIGHMEDIUM_HEAT
+ if(0.75 to 1)
+ heat_level = BIOME_HIGH_HEAT
+ switch(humidity)
+ if(0 to 0.25)
+ humidity_level = BIOME_LOW_HUMIDITY
+ if(0.25 to 0.5)
+ humidity_level = BIOME_LOWMEDIUM_HUMIDITY
+ if(0.5 to 0.75)
+ humidity_level = BIOME_HIGHMEDIUM_HUMIDITY
+ if(0.75 to 1)
+ humidity_level = BIOME_HIGH_HUMIDITY
+ selected_biome = possible_biomes[heat_level][humidity_level]
+ else //Over 0.85; It's a mountain
+ selected_biome = /datum/biome/mountain
+ selected_biome = SSmapping.biomes[selected_biome] //Get the instance of this biome from SSmapping
+ selected_biome.generate_turf(gen_turf)
+ CHECK_TICK
+
+/turf/open/genturf
+ name = "ungenerated turf"
+ desc = "If you see this, and you're not a ghost, yell at coders"
+ icon = 'icons/turf/debug.dmi'
+ icon_state = "genturf"
+
+/area/mine/planetgeneration
+ name = "planet generation area"
+ dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
+ map_generator = /datum/map_generator/jungle_generator
diff --git a/code/datums/mapgen/_MapGenerator.dm b/code/datums/mapgen/_MapGenerator.dm
new file mode 100644
index 00000000000..aa4406bf789
--- /dev/null
+++ b/code/datums/mapgen/_MapGenerator.dm
@@ -0,0 +1,6 @@
+///This type is responsible for any map generation behavior that is done in areas, override this to allow for area-specific map generation. This generation is ran by areas in initialize.
+/datum/map_generator
+
+///This proc will be ran by areas on Initialize, and provides the areas turfs as argument to allow for generation.
+/datum/map_generator/proc/generate_terrain(var/list/turfs)
+ return
diff --git a/code/datums/mapgen/biomes/_biome.dm b/code/datums/mapgen/biomes/_biome.dm
new file mode 100644
index 00000000000..bf0f02cfbaa
--- /dev/null
+++ b/code/datums/mapgen/biomes/_biome.dm
@@ -0,0 +1,50 @@
+///This datum handles the transitioning from a turf to a specific biome, and handles spawning decorative structures and mobs.
+/datum/biome
+ ///Type of turf this biome creates
+ var/turf_type
+ ///Chance of having a structure from the flora types list spawn
+ var/flora_density = 0
+ ///Chance of having a mob from the fauna types list spawn
+ var/fauna_density = 0
+ ///list of type paths of objects that can be spawned when the turf spawns flora
+ var/list/flora_types = list(/obj/structure/flora/grass/jungle)
+ ///list of type paths of mobs that can be spawned when the turf spawns fauna
+ var/list/fauna_types = list()
+
+///This proc handles the creation of a turf of a specific biome type
+/datum/biome/proc/generate_turf(var/turf/gen_turf)
+ gen_turf.ChangeTurf(turf_type, null, CHANGETURF_DEFER_CHANGE)
+ if(length(fauna_types) && prob(fauna_density))
+ var/mob/fauna = pick(fauna_types)
+ new fauna(gen_turf)
+
+ if(length(flora_types) && prob(flora_density))
+ var/obj/structure/flora = pick(flora_types)
+ new flora(gen_turf)
+
+/datum/biome/mudlands
+ turf_type = /turf/open/floor/plating/dirt/jungle/dark
+ flora_types = list(/obj/structure/flora/grass/jungle,/obj/structure/flora/grass/jungle/b, /obj/structure/flora/rock/jungle, /obj/structure/flora/rock/pile/largejungle)
+ flora_density = 3
+
+/datum/biome/plains
+ turf_type = /turf/open/floor/plating/grass/jungle
+ flora_types = list(/obj/structure/flora/grass/jungle,/obj/structure/flora/grass/jungle/b, /obj/structure/flora/tree/jungle, /obj/structure/flora/rock/jungle, /obj/structure/flora/junglebush, /obj/structure/flora/junglebush/b, /obj/structure/flora/junglebush/c, /obj/structure/flora/junglebush/large, /obj/structure/flora/rock/pile/largejungle)
+ flora_density = 15
+
+/datum/biome/jungle
+ turf_type = /turf/open/floor/plating/grass/jungle
+ flora_types = list(/obj/structure/flora/grass/jungle,/obj/structure/flora/grass/jungle/b, /obj/structure/flora/tree/jungle, /obj/structure/flora/rock/jungle, /obj/structure/flora/junglebush, /obj/structure/flora/junglebush/b, /obj/structure/flora/junglebush/c, /obj/structure/flora/junglebush/large, /obj/structure/flora/rock/pile/largejungle)
+ flora_density = 40
+
+/datum/biome/jungle/deep
+ flora_density = 65
+
+/datum/biome/wasteland
+ turf_type = /turf/open/floor/plating/dirt/jungle/wasteland
+
+/datum/biome/water
+ turf_type = /turf/open/water/jungle
+
+/datum/biome/mountain
+ turf_type = /turf/closed/mineral/random/jungle
diff --git a/code/datums/martial/boxing.dm b/code/datums/martial/boxing.dm
index d351a1f8aee..2760c333ece 100644
--- a/code/datums/martial/boxing.dm
+++ b/code/datums/martial/boxing.dm
@@ -23,7 +23,7 @@
"You avoid [A]'s [atk_verb]!", "You hear a swoosh!", COMBAT_MESSAGE_RANGE, A)
to_chat(A, "Your [atk_verb] misses [D]!")
log_combat(A, D, "attempted to hit", atk_verb)
- return 0
+ return FALSE
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
@@ -46,7 +46,7 @@
D.apply_effect(200,EFFECT_KNOCKDOWN,armor_block)
D.SetSleeping(100)
log_combat(A, D, "knocked out (boxing) ")
- return 1
+ return TRUE
/obj/item/clothing/gloves/boxing
var/datum/martial_art/boxing/style = new
diff --git a/code/datums/martial/krav_maga.dm b/code/datums/martial/krav_maga.dm
index 3e989d30b67..7406723cb93 100644
--- a/code/datums/martial/krav_maga.dm
+++ b/code/datums/martial/krav_maga.dm
@@ -75,20 +75,20 @@
if("neck_chop")
streak = ""
neck_chop(A,D)
- return 1
+ return TRUE
if("leg_sweep")
streak = ""
leg_sweep(A,D)
- return 1
+ return TRUE
if("quick_choke")//is actually lung punch
streak = ""
quick_choke(A,D)
- return 1
- return 0
+ return TRUE
+ return FALSE
/datum/martial_art/krav_maga/proc/leg_sweep(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(D.stat || D.IsParalyzed())
- return 0
+ return FALSE
var/obj/item/bodypart/affecting = D.get_bodypart(BODY_ZONE_CHEST)
var/armor_block = D.run_armor_check(affecting, MELEE)
D.visible_message("[A] leg sweeps [D]!", \
@@ -98,7 +98,7 @@
D.apply_damage(rand(20,30), STAMINA, affecting, armor_block)
D.Knockdown(60)
log_combat(A, D, "leg sweeped")
- return 1
+ return TRUE
/datum/martial_art/krav_maga/proc/quick_choke(mob/living/carbon/human/A, mob/living/carbon/human/D)//is actually lung punch
D.visible_message("[A] pounds [D] on the chest!", \
@@ -109,7 +109,7 @@
D.losebreath = clamp(D.losebreath + 5, 0, 10)
D.adjustOxyLoss(10)
log_combat(A, D, "quickchoked")
- return 1
+ return TRUE
/datum/martial_art/krav_maga/proc/neck_chop(mob/living/carbon/human/A, mob/living/carbon/human/D)
D.visible_message("[A] karate chops [D]'s neck!", \
@@ -120,17 +120,17 @@
if(D.silent <= 10)
D.silent = clamp(D.silent + 10, 0, 10)
log_combat(A, D, "neck chopped")
- return 1
+ return TRUE
/datum/martial_art/krav_maga/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(check_streak(A,D))
- return 1
+ return TRUE
log_combat(A, D, "grabbed (Krav Maga)")
..()
/datum/martial_art/krav_maga/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(check_streak(A,D))
- return 1
+ return TRUE
log_combat(A, D, "punched")
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
var/armor_block = D.run_armor_check(affecting, MELEE)
@@ -150,11 +150,11 @@
"You're [picked_hit_type]ed by [A]!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, A)
to_chat(A, "You [picked_hit_type] [D]!")
log_combat(A, D, "[picked_hit_type] with [name]")
- return 1
+ return TRUE
/datum/martial_art/krav_maga/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(check_streak(A,D))
- return 1
+ return TRUE
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
var/armor_block = D.run_armor_check(affecting, MELEE)
if((D.mobility_flags & MOBILITY_STAND))
@@ -176,7 +176,7 @@
if(prob(D.getStaminaLoss()))
D.visible_message("[D] sputters and recoils in pain!", "You recoil in pain as you are jabbed in a nerve!")
D.drop_all_held_items()
- return 1
+ return TRUE
//Krav Maga Gloves
diff --git a/code/datums/martial/wrestling.dm b/code/datums/martial/wrestling.dm
index 8342897b9fc..04c7bc91aed 100644
--- a/code/datums/martial/wrestling.dm
+++ b/code/datums/martial/wrestling.dm
@@ -22,24 +22,24 @@
if("drop")
streak = ""
drop(A,D)
- return 1
+ return TRUE
if("strike")
streak = ""
strike(A,D)
- return 1
+ return TRUE
if("kick")
streak = ""
kick(A,D)
- return 1
+ return TRUE
if("throw")
streak = ""
throw_wrassle(A,D)
- return 1
+ return TRUE
if("slam")
streak = ""
slam(A,D)
- return 1
- return 0
+ return TRUE
+ return FALSE
/datum/action/slam
name = "Slam (Cinch) - Slam a grappled opponent into the floor."
@@ -158,11 +158,11 @@
if (get_dist(A, D) > 1)
to_chat(A, "[D] is too far away!")
- return 0
+ return
if (!isturf(A.loc) || !isturf(D.loc))
to_chat(A, "You can't throw [D] from here!")
- return 0
+ return
A.setDir(turn(A.dir, 90))
var/turf/T = get_step(A, A.dir)
@@ -171,7 +171,7 @@
D.forceMove(T)
D.setDir(get_dir(D, A))
else
- return 0
+ return
sleep(delay)
@@ -180,11 +180,11 @@
if (get_dist(A, D) > 1)
to_chat(A, "[D] is too far away!")
- return 0
+ return
if (!isturf(A.loc) || !isturf(D.loc))
to_chat(A, "You can't throw [D] from here!")
- return 0
+ return
D.forceMove(A.loc) // Maybe this will help with the wallthrowing bug.
@@ -198,7 +198,7 @@
D.emote("scream")
D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human.proc/Paralyze, 20))
log_combat(A, D, "has thrown with wrestling")
- return 0
+ return
/datum/martial_art/wrestling/proc/FlipAnimation(mob/living/carbon/human/D)
set waitfor = FALSE
@@ -247,7 +247,7 @@
A.pixel_y = 0
D.pixel_x = 0
D.pixel_y = 0
- return 0
+ return
if (!isturf(A.loc) || !isturf(D.loc))
to_chat(A, "You can't slam [D] here!")
@@ -255,7 +255,7 @@
A.pixel_y = 0
D.pixel_x = 0
D.pixel_y = 0
- return 0
+ return
else
if (A)
A.pixel_x = 0
@@ -263,7 +263,7 @@
if (D)
D.pixel_x = 0
D.pixel_y = 0
- return 0
+ return
sleep(1)
@@ -275,11 +275,11 @@
if (get_dist(A, D) > 1)
to_chat(A, "[D] is too far away!")
- return 0
+ return
if (!isturf(A.loc) || !isturf(D.loc))
to_chat(A, "You can't slam [D] here!")
- return 0
+ return
D.forceMove(A.loc)
@@ -318,7 +318,7 @@
log_combat(A, D, "body-slammed")
- return 0
+ return
/datum/martial_art/wrestling/proc/CheckStrikeTurf(mob/living/carbon/human/A, turf/T)
if (A && (T && isturf(T) && get_dist(A, T) <= 1))
@@ -401,12 +401,12 @@
A.adjustBruteLoss(rand(10,20))
A.Paralyze(60)
to_chat(A, "[D] is too far away!")
- return 0
+ return
if (!isturf(A.loc) || !isturf(D.loc))
A.pixel_y = 0
to_chat(A, "You can't drop onto [D] from here!")
- return 0
+ return
if(A)
animate(A, transform = matrix(90, MATRIX_ROTATE), time = 1, loop = 0)
diff --git a/code/datums/materials/basemats.dm b/code/datums/materials/basemats.dm
index ef79c9f9cad..77b154f2017 100644
--- a/code/datums/materials/basemats.dm
+++ b/code/datums/materials/basemats.dm
@@ -347,6 +347,17 @@ Unless you know what you're doing, only use the first three numbers. They're in
M.apply_damage(15, BRUTE, BODY_ZONE_HEAD, wound_bonus = 7)
return TRUE
+/datum/material/otherworld_crystal
+ name = "Otherworld Crystal"
+ desc = "An unkown crystal from an unkown dimension"
+ color = COLOR_YELLOW
+ strength_modifier = 0.95
+ categories = list(MAT_CATEGORY_RIGID = TRUE)
+ sheet_type = /obj/item/stack/sheet/otherworld_crystal
+ value_per_unit = 0.25
+ beauty_modifier = 0.4
+ alpha = 150
+
//I don't like sand. It's coarse, and rough, and irritating, and it gets everywhere.
/datum/material/sand
name = "sand"
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index a6bc5a3a3ff..562882b03dd 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -34,7 +34,7 @@
var/name //replaces mob/var/original_name
var/ghostname //replaces name for observers name if set
var/mob/living/current
- var/active = 0
+ var/active = FALSE
var/memory
@@ -779,7 +779,7 @@
/mob/proc/sync_mind()
mind_initialize() //updates the mind (or creates and initializes one if one doesn't exist)
- mind.active = 1 //indicates that the mind is currently synced with a client
+ mind.active = TRUE //indicates that the mind is currently synced with a client
/datum/mind/proc/has_martialart(string)
if(martial_art && martial_art.id == string)
diff --git a/code/datums/wires/robot.dm b/code/datums/wires/robot.dm
index 871f33e585e..7927ffe1266 100644
--- a/code/datums/wires/robot.dm
+++ b/code/datums/wires/robot.dm
@@ -39,7 +39,7 @@
new_ai = select_active_ai(R, R.z)
R.notify_ai(DISCONNECT)
if(new_ai && (new_ai != R.connected_ai))
- R.connected_ai = new_ai
+ R.set_connected_ai(new_ai)
if(R.shell)
R.undeploy() //If this borg is an AI shell, disconnect the controlling AI and assign ti to a new AI
R.notify_ai(AI_SHELL)
@@ -68,7 +68,7 @@
R.notify_ai(DISCONNECT)
if(R.shell)
R.undeploy()
- R.connected_ai = null
+ R.set_connected_ai(null)
if(WIRE_LAWSYNC) // Cut the law wire, and the borg will no longer receive law updates from its AI. Repair and it will re-sync.
if(mend)
if(!R.emagged)
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index e02f51946a6..d3fe5b6b218 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -67,6 +67,9 @@
/// Wire assignment for airlocks in this area
var/airlock_wires = /datum/wires/airlock
+
+ ///This datum, if set, allows terrain generation behavior to be ran on Initialize()
+ var/datum/map_generator/map_generator
/**
@@ -157,6 +160,9 @@ GLOBAL_LIST_EMPTY(teleportlocs)
/area/LateInitialize()
power_change() // all machines set to current power level, also updates icon
update_beauty()
+ if(map_generator)
+ map_generator = new map_generator()
+ map_generator.generate_terrain(get_area_turfs(src))
/**
* Register this area as belonging to a z level
@@ -451,9 +457,9 @@ GLOBAL_LIST_EMPTY(teleportlocs)
/area/proc/powered(chan) // return true if the area has power to given channel
if(!requires_power)
- return 1
+ return TRUE
if(always_unpowered)
- return 0
+ return FALSE
switch(chan)
if(AREA_USAGE_EQUIP)
return power_equip
@@ -462,13 +468,13 @@ GLOBAL_LIST_EMPTY(teleportlocs)
if(AREA_USAGE_ENVIRON)
return power_environ
- return 0
+ return FALSE
/**
- * Space is not powered ever, so this returns 0
+ * Space is not powered ever, so this returns false
*/
/area/space/powered(chan) //Nope.avi
- return 0
+ return FALSE
/**
* Called when the area power status changes
diff --git a/code/game/area/areas/holodeck.dm b/code/game/area/areas/holodeck.dm
index 0fec5debd21..35f5314deb1 100644
--- a/code/game/area/areas/holodeck.dm
+++ b/code/game/area/areas/holodeck.dm
@@ -6,7 +6,7 @@
area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT | HIDDEN_AREA
var/obj/machinery/computer/holodeck/linked
- var/restricted = 0 // if true, program goes on emag list
+ var/restricted = FALSE // if true, program goes on emag list
/*
Power tracking: Use the holodeck computer's power grid
@@ -33,7 +33,7 @@
/area/holodeck/use_power(amount, chan)
if(!linked)
- return 0
+ return FALSE
var/area/A = get_area(linked)
ASSERT(!istype(A, /area/holodeck))
return ..()
@@ -102,28 +102,28 @@
/area/holodeck/rec_center/medical
name = "Holodeck - Emergency Medical"
- restricted = 1
+ restricted = TRUE
/area/holodeck/rec_center/thunderdome1218
name = "Holodeck - 1218 AD"
- restricted = 1
+ restricted = TRUE
/area/holodeck/rec_center/burn
name = "Holodeck - Atmospheric Burn Test"
- restricted = 1
+ restricted = TRUE
/area/holodeck/rec_center/wildlife
name = "Holodeck - Wildlife Simulation"
- restricted = 1
+ restricted = TRUE
/area/holodeck/rec_center/bunker
name = "Holodeck - Holdout Bunker"
- restricted = 1
+ restricted = TRUE
/area/holodeck/rec_center/anthophila
name = "Holodeck - Anthophila"
- restricted = 1
+ restricted = TRUE
/area/holodeck/rec_center/refuel
name = "Holodeck - Refueling Station"
- restricted = 1
+ restricted = TRUE
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 40fb1eef94e..325901f99c8 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -643,7 +643,7 @@
/// Updates the overlays of the atom
/atom/proc/update_overlays()
- SHOULD_CALL_PARENT(1)
+ SHOULD_CALL_PARENT(TRUE)
. = list()
SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS, .)
@@ -921,10 +921,6 @@
SEND_SIGNAL(src, COMSIG_ATOM_DIR_CHANGE, dir, newdir)
dir = newdir
-///Handle melee attack by a mech
-/atom/proc/mech_melee_attack(obj/mecha/M)
- return
-
/**
* Called when the atom log's in or out
*
@@ -1482,10 +1478,10 @@
return max_grav
if(isspaceturf(T)) // Turf never has gravity
- return FALSE
+ return 0
if(istype(T, /turf/open/transparent/openspace)) //openspace in a space area doesn't get gravity
if(istype(get_area(T), /area/space))
- return FALSE
+ return 0
var/area/A = get_area(T)
if(A.has_gravity) // Areas which always has gravity
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 5d6187ecd69..9704fbb28da 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -605,38 +605,38 @@
*/
/atom/movable/proc/Process_Spacemove(movement_dir = 0)
if(has_gravity(src))
- return 1
+ return TRUE
if(pulledby)
- return 1
+ return TRUE
if(throwing)
- return 1
+ return TRUE
if(!isturf(loc))
- return 1
+ return TRUE
if(locate(/obj/structure/lattice) in range(1, get_turf(src))) //Not realistic but makes pushing things in space easier
- return 1
+ return TRUE
- return 0
+ return FALSE
/// Only moves the object if it's under no gravity
/atom/movable/proc/newtonian_move(direction)
if(!loc || Process_Spacemove(0))
inertia_dir = 0
- return 0
+ return FALSE
inertia_dir = direction
if(!direction)
- return 1
+ return TRUE
inertia_last_loc = loc
SSspacedrift.processing[src] = src
- return 1
+ return TRUE
/atom/movable/proc/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
- set waitfor = 0
+ set waitfor = FALSE
var/hitpush = TRUE
var/impact_signal = SEND_SIGNAL(src, COMSIG_MOVABLE_IMPACT, hit_atom, throwingdatum)
if(impact_signal & COMPONENT_MOVABLE_IMPACT_FLIP_HITPUSH)
@@ -998,7 +998,7 @@
if(!anchored && has_gravity())
step(src, movedir)
-//Returns an atom's power cell, if it has one. Overload for individual items.
+///Returns an atom's power cell, if it has one. Overload for individual items.
/atom/movable/proc/get_cell()
return
diff --git a/code/game/communications.dm b/code/game/communications.dm
index 9d7daeeec7b..615a829e4c5 100644
--- a/code/game/communications.dm
+++ b/code/game/communications.dm
@@ -150,7 +150,7 @@ GLOBAL_LIST_INIT(reverseradiochannels, list(
if(range)
start_point = get_turf(source)
if(!start_point)
- return 0
+ return
//Send the data
for(var/current_filter in filter_list)
diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm
index 0044d18f106..de24e9e5199 100644
--- a/code/game/data_huds.dm
+++ b/code/game/data_huds.dm
@@ -24,13 +24,13 @@
/datum/atom_hud/data/human/medical/basic/proc/check_sensors(mob/living/carbon/human/H)
if(!istype(H))
- return 0
+ return FALSE
var/obj/item/clothing/under/U = H.w_uniform
if(!istype(U))
- return 0
+ return FALSE
if(U.sensor_mode <= SENSOR_VITALS)
- return 0
- return 1
+ return FALSE
+ return TRUE
/datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H)
if(check_sensors(H))
@@ -379,14 +379,14 @@
/*~~~~~~~~~~~~~~~~~~~~
BIG STOMPY MECHS
~~~~~~~~~~~~~~~~~~~~~*/
-/obj/mecha/proc/diag_hud_set_mechhealth()
+/obj/vehicle/sealed/mecha/proc/diag_hud_set_mechhealth()
var/image/holder = hud_list[DIAG_MECH_HUD]
var/icon/I = icon(icon, icon_state, dir)
holder.pixel_y = I.Height() - world.icon_size
holder.icon_state = "huddiag[RoundDiagBar(obj_integrity/max_integrity)]"
-/obj/mecha/proc/diag_hud_set_mechcell()
+/obj/vehicle/sealed/mecha/proc/diag_hud_set_mechcell()
var/image/holder = hud_list[DIAG_BATT_HUD]
var/icon/I = icon(icon, icon_state, dir)
holder.pixel_y = I.Height() - world.icon_size
@@ -397,7 +397,7 @@
holder.icon_state = "hudnobatt"
-/obj/mecha/proc/diag_hud_set_mechstat()
+/obj/vehicle/sealed/mecha/proc/diag_hud_set_mechstat()
var/image/holder = hud_list[DIAG_STAT_HUD]
var/icon/I = icon(icon, icon_state, dir)
holder.pixel_y = I.Height() - world.icon_size
@@ -405,7 +405,7 @@
if(internal_damage)
holder.icon_state = "hudwarn"
-/obj/mecha/proc/diag_hud_set_mechtracking() //Shows tracking beacons on the mech
+/obj/vehicle/sealed/mecha/proc/diag_hud_set_mechtracking() //Shows tracking beacons on the mech
var/image/holder = hud_list[DIAG_TRACK_HUD]
var/icon/I = icon(icon, icon_state, dir)
holder.pixel_y = I.Height() - world.icon_size
diff --git a/code/game/gamemodes/changeling/traitor_chan.dm b/code/game/gamemodes/changeling/traitor_chan.dm
index e722505c2d3..80cdc0105cc 100644
--- a/code/game/gamemodes/changeling/traitor_chan.dm
+++ b/code/game/gamemodes/changeling/traitor_chan.dm
@@ -17,12 +17,13 @@
var/const/changeling_amount = 1 //hard limit on changelings if scaling is turned off
/datum/game_mode/traitor/changeling/can_start()
- if(!..())
- return 0
+ . = ..()
+ if(!.)
+ return
possible_changelings = get_players_for_role(ROLE_CHANGELING)
if(possible_changelings.len < required_enemies)
- return 0
- return 1
+ return FALSE
+ return TRUE
/datum/game_mode/traitor/changeling/pre_setup()
if(CONFIG_GET(flag/protect_roles_from_antagonist))
diff --git a/code/game/gamemodes/clown_ops/clown_weapons.dm b/code/game/gamemodes/clown_ops/clown_weapons.dm
index a7798e99e3e..058da3c061a 100644
--- a/code/game/gamemodes/clown_ops/clown_weapons.dm
+++ b/code/game/gamemodes/clown_ops/clown_weapons.dm
@@ -236,7 +236,7 @@
projectiles = 8
projectile_energy_cost = 1000
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/bombanana/can_attach(obj/mecha/combat/honker/M)
+/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/bombanana/can_attach(obj/vehicle/sealed/mecha/combat/honker/M)
if(..())
if(istype(M))
return TRUE
@@ -254,13 +254,13 @@
equip_cooldown = 60
det_time = 20
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/tearstache/can_attach(obj/mecha/combat/honker/M)
+/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/tearstache/can_attach(obj/vehicle/sealed/mecha/combat/honker/M)
if(..())
if(istype(M))
return TRUE
return FALSE
-/obj/mecha/combat/honker/dark
+/obj/vehicle/sealed/mecha/combat/honker/dark
desc = "Produced by \"Tyranny of Honk, INC\", this exosuit is designed as heavy clown-support. This one has been painted black for maximum fun. HONK!"
name = "\improper Dark H.O.N.K"
icon_state = "darkhonker"
@@ -273,14 +273,14 @@
wreckage = /obj/structure/mecha_wreckage/honker/dark
max_equip = 4
-/obj/mecha/combat/honker/dark/add_cell(obj/item/stock_parts/cell/C)
+/obj/vehicle/sealed/mecha/combat/honker/dark/add_cell(obj/item/stock_parts/cell/C)
if(C)
C.forceMove(src)
cell = C
return
cell = new /obj/item/stock_parts/cell/hyper(src)
-/obj/mecha/combat/honker/dark/loaded/Initialize()
+/obj/vehicle/sealed/mecha/combat/honker/dark/loaded/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/thrusters/ion(src)
ME.attach(src)
diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm
index 519f4646fbd..d6376328014 100644
--- a/code/game/gamemodes/cult/cult.dm
+++ b/code/game/gamemodes/cult/cult.dm
@@ -48,8 +48,6 @@
Cultists: Carry out Nar'Sie's will.\n\
Crew: Prevent the cult from expanding and drive it out."
- var/finished = 0
-
var/acolytes_needed = 10 //for the survive objective
var/acolytes_survived = 0
@@ -145,9 +143,9 @@
if(cult_mind.current.onCentCom() || cult_mind.current.onSyndieBase())
acolytes_survived++
if(acolytes_survived>=acolytes_needed)
- return 0
+ return FALSE
else
- return 1
+ return TRUE
/datum/game_mode/cult/generate_report()
diff --git a/code/game/gamemodes/devil/devil_agent/devil_agent.dm b/code/game/gamemodes/devil/devil_agent/devil_agent.dm
index c8fb62faba0..e3ccca09ac0 100644
--- a/code/game/gamemodes/devil/devil_agent/devil_agent.dm
+++ b/code/game/gamemodes/devil/devil_agent/devil_agent.dm
@@ -40,5 +40,5 @@
outsellobjective.target = target_mind
outsellobjective.update_explanation_text()
D.objectives += outsellobjective
- return 1
- return 0
+ return TRUE
+ return FALSE
diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets.dm b/code/game/gamemodes/dynamic/dynamic_rulesets.dm
index b47c0a4fd53..406b515e769 100644
--- a/code/game/gamemodes/dynamic/dynamic_rulesets.dm
+++ b/code/game/gamemodes/dynamic/dynamic_rulesets.dm
@@ -50,7 +50,7 @@
/// A flag that determines how the ruleset is handled
/// HIGHLANDER_RULESET are rulesets can end the round.
/// TRAITOR_RULESET and MINOR_RULESET can't end the round and have no difference right now.
- var/flags = 0
+ var/flags = NONE
/// Pop range per requirement. If zero defaults to mode's pop_per_requirement.
var/pop_per_requirement = 0
/// Requirements are the threat level requirements per pop range.
diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
index 3d7e95b9869..b285ad00765 100644
--- a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
+++ b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
@@ -714,7 +714,7 @@
cost = 0
requirements = list(101,101,101,101,101,101,101,101,101,101)
var/meteordelay = 2000
- var/nometeors = 0
+ var/nometeors = FALSE
var/rampupdelta = 5
/datum/dynamic_ruleset/roundstart/meteor/rule_process()
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 3c65135dbe4..df2a1e99538 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -69,20 +69,20 @@
playerC++
if(!GLOB.Debug2)
if(playerC < required_players || (maximum_players >= 0 && playerC > maximum_players))
- return 0
+ return FALSE
antag_candidates = get_players_for_role(antag_flag)
if(!GLOB.Debug2)
if(antag_candidates.len < required_enemies)
- return 0
- return 1
+ return FALSE
+ return TRUE
else
message_admins("DEBUG: GAME STARTING WITHOUT PLAYER NUMBER CHECKS, THIS WILL PROBABLY BREAK SHIT.")
- return 1
+ return TRUE
///Attempts to select players for special roles the mode might have.
/datum/game_mode/proc/pre_setup()
- return 1
+ return TRUE
///Everyone should now be on the station and have their normal gear. This is the place to give the special roles extra things
/datum/game_mode/proc/post_setup(report) //Gamemodes can override the intercept report. Passing TRUE as the argument will force a report.
@@ -119,7 +119,7 @@
addtimer(CALLBACK(src, .proc/send_intercept, 0), rand(waittime_l, waittime_h))
generate_station_goals()
gamemode_ready = TRUE
- return 1
+ return TRUE
///Handles late-join antag assignments
@@ -159,10 +159,10 @@
switch(SSshuttle.emergency.mode) //Rounds on the verge of ending don't get new antags, they just run out
if(SHUTTLE_STRANDED, SHUTTLE_ESCAPE)
- return 1
+ return TRUE
if(SHUTTLE_CALL)
if(SSshuttle.emergency.timeLeft(1) < initial(SSshuttle.emergencyCallTime)*0.5)
- return 1
+ return TRUE
var/matc = CONFIG_GET(number/midround_antag_time_check)
if(world.time >= (matc * 600))
@@ -199,7 +199,7 @@
//somewhere between 1 and 3 minutes from now
if(!CONFIG_GET(keyed_list/midround_antag)[SSticker.mode.config_tag])
round_converted = 0
- return 1
+ return TRUE
for(var/mob/living/carbon/human/H in antag_candidates)
if(H.client)
replacementmode.make_antag_chance(H)
@@ -210,7 +210,7 @@
///Called by the gameSSticker
/datum/game_mode/process()
- return 0
+ return
//For things that do not die easily
/datum/game_mode/proc/are_special_antags_dead()
@@ -234,41 +234,41 @@
if(Player.mind)
if(Player.mind.special_role || LAZYLEN(Player.mind.antag_datums))
continuous_sanity_checked = 1
- return 0
+ return FALSE
if(!continuous_sanity_checked)
message_admins("The roundtype ([config_tag]) has no antagonists, continuous round has been defaulted to on and midround_antag has been defaulted to off.")
continuous[config_tag] = TRUE
midround_antag[config_tag] = FALSE
SSshuttle.clearHostileEnvironment(src)
- return 0
+ return FALSE
if(living_antag_player && living_antag_player.mind && isliving(living_antag_player) && living_antag_player.stat != DEAD && !isnewplayer(living_antag_player) &&!isbrain(living_antag_player) && (living_antag_player.mind.special_role || LAZYLEN(living_antag_player.mind.antag_datums)))
- return 0 //A resource saver: once we find someone who has to die for all antags to be dead, we can just keep checking them, cycling over everyone only when we lose our mark.
+ return FALSE //A resource saver: once we find someone who has to die for all antags to be dead, we can just keep checking them, cycling over everyone only when we lose our mark.
for(var/mob/Player in GLOB.alive_mob_list)
if(Player.mind && Player.stat != DEAD && !isnewplayer(Player) &&!isbrain(Player) && Player.client && (Player.mind.special_role || LAZYLEN(Player.mind.antag_datums))) //Someone's still antagging but is their antagonist datum important enough to skip mulligan?
for(var/datum/antagonist/antag_types in Player.mind.antag_datums)
if(antag_types.prevent_roundtype_conversion)
living_antag_player = Player //they were an important antag, they're our new mark
- return 0
+ return FALSE
if(!are_special_antags_dead())
return FALSE
if(!continuous[config_tag] || force_ending)
- return 1
+ return TRUE
else
round_converted = convert_roundtype()
if(!round_converted)
if(round_ends_with_antag_death)
- return 1
+ return TRUE
else
midround_antag[config_tag] = 0
- return 0
+ return FALSE
- return 0
+ return FALSE
/datum/game_mode/proc/send_intercept()
diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm
index 8545f4500ea..30f38889ccb 100644
--- a/code/game/gamemodes/meteor/meteors.dm
+++ b/code/game/gamemodes/meteor/meteors.dm
@@ -92,7 +92,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
var/hitpwr = 2 //Level of ex_act to be called on hit.
var/dest
pass_flags = PASSTABLE
- var/heavy = 0
+ var/heavy = FALSE
var/meteorsound = 'sound/effects/meteorimpact.ogg'
var/z_original
var/threat = 0 // used for determining which meteors are most interesting
@@ -245,7 +245,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
name = "big meteor"
icon_state = "large"
hits = 6
- heavy = 1
+ heavy = TRUE
dropamt = 4
threat = 10
@@ -258,7 +258,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
name = "flaming meteor"
icon_state = "flaming"
hits = 5
- heavy = 1
+ heavy = TRUE
meteorsound = 'sound/effects/bamf.ogg'
meteordrop = list(/obj/item/stack/ore/plasma)
threat = 20
@@ -271,7 +271,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
/obj/effect/meteor/irradiated
name = "glowing meteor"
icon_state = "glowing"
- heavy = 1
+ heavy = TRUE
meteordrop = list(/obj/item/stack/ore/uranium)
threat = 15
@@ -288,7 +288,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
icon_state = "meateor"
desc = "Just... don't think too hard about where this thing came from."
hits = 2
- heavy = 1
+ heavy = TRUE
meteorsound = 'sound/effects/blobattack.ogg'
meteordrop = list(/obj/item/reagent_containers/food/snacks/meat/slab/human, /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant, /obj/item/organ/heart, /obj/item/organ/lungs, /obj/item/organ/tongue, /obj/item/organ/appendix/)
var/meteorgibs = /obj/effect/gibspawner/generic
@@ -340,7 +340,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
desc = "Your life briefly passes before your eyes the moment you lay them on this monstrosity."
hits = 30
hitpwr = 1
- heavy = 1
+ heavy = TRUE
meteorsound = 'sound/effects/bamf.ogg'
meteordrop = list(/obj/item/stack/ore/plasma)
threat = 50
@@ -371,7 +371,7 @@ GLOBAL_LIST_INIT(meteorsSPOOKY, list(/obj/effect/meteor/pumpkin))
icon = 'icons/obj/meteor_spooky.dmi'
icon_state = "pumpkin"
hits = 10
- heavy = 1
+ heavy = TRUE
dropamt = 1
meteordrop = list(/obj/item/clothing/head/hardhat/pumpkinhead, /obj/item/reagent_containers/food/snacks/grown/pumpkin)
threat = 100
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index 06cba324617..0b309bcc312 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -8,8 +8,8 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
var/team_explanation_text //For when there are multiple owners.
var/datum/mind/target = null //If they are focused on a particular person.
var/target_amount = 0 //If they are focused on a particular number. Steal objectives have their own counter.
- var/completed = 0 //currently only used for custom objectives.
- var/martyr_compatible = 0 //If the objective is compatible with martyr objective, i.e. if you can still do it while dead.
+ var/completed = FALSE //currently only used for custom objectives.
+ var/martyr_compatible = FALSE //If the objective is compatible with martyr objective, i.e. if you can still do it while dead.
/datum/objective/New(text)
if(text)
@@ -170,7 +170,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
/datum/objective/assassinate
name = "assasinate"
var/target_role_type=FALSE
- martyr_compatible = 1
+ martyr_compatible = TRUE
/datum/objective/assassinate/find_target_by_role(role, role_type=FALSE,invert=FALSE)
if(!invert)
@@ -191,7 +191,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
admin_simple_target_pick(admin)
/datum/objective/assassinate/internal
- var/stolen = 0 //Have we already eliminated this target?
+ var/stolen = FALSE //Have we already eliminated this target?
/datum/objective/assassinate/internal/update_explanation_text()
..()
@@ -224,7 +224,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
/datum/objective/maroon
name = "maroon"
var/target_role_type=FALSE
- martyr_compatible = 1
+ martyr_compatible = TRUE
/datum/objective/maroon/find_target_by_role(role, role_type=FALSE,invert=FALSE)
if(!invert)
@@ -279,7 +279,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
/datum/objective/protect//The opposite of killing a dude.
name = "protect"
- martyr_compatible = 1
+ martyr_compatible = TRUE
var/target_role_type = FALSE
var/human_check = TRUE
@@ -350,7 +350,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
name = "hijack"
explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody."
team_explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody. Leave no team member behind."
- martyr_compatible = 0 //Technically you won't get both anyway.
+ martyr_compatible = FALSE //Technically you won't get both anyway.
/datum/objective/hijack/check_completion() // Requires all owners to escape.
if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME)
@@ -378,7 +378,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
/datum/objective/purge
name = "no mutants on shuttle"
explanation_text = "Ensure no mutant humanoid species are present aboard the escape shuttle."
- martyr_compatible = 1
+ martyr_compatible = TRUE
/datum/objective/purge/check_completion()
if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME)
@@ -393,7 +393,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
/datum/objective/robot_army
name = "robot army"
explanation_text = "Have at least eight active cyborgs synced to you."
- martyr_compatible = 0
+ martyr_compatible = FALSE
/datum/objective/robot_army/check_completion()
var/counter = 0
@@ -497,7 +497,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
/datum/objective/nuclear
name = "nuclear"
explanation_text = "Destroy the station with a nuclear device."
- martyr_compatible = 1
+ martyr_compatible = TRUE
/datum/objective/nuclear/check_completion()
if(SSticker && SSticker.mode && SSticker.mode.station_was_nuked)
@@ -509,7 +509,7 @@ GLOBAL_LIST_EMPTY(possible_items)
name = "steal"
var/datum/objective_item/targetinfo = null //Save the chosen item datum so we can access it later.
var/obj/item/steal_target = null //Needed for custom objectives (they're just items, not datums).
- martyr_compatible = 0
+ martyr_compatible = FALSE
/datum/objective/steal/get_target()
return steal_target
@@ -793,7 +793,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
/datum/objective/destroy
name = "destroy AI"
- martyr_compatible = 1
+ martyr_compatible = TRUE
/datum/objective/destroy/find_target(dupe_search_range)
var/list/possible_targets = active_ais(1)
@@ -891,7 +891,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
////////////////////////////////
/datum/objective/changeling_team_objective //Abstract type
- martyr_compatible = 0 //Suicide is not teamwork!
+ martyr_compatible = FALSE //Suicide is not teamwork!
explanation_text = "Changeling Friendship!"
var/min_lings = 3 //Minimum amount of lings for this team objective to be possible
var/escape_objective_compatible = FALSE
diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm
index 8251619012a..b1a6cf48c8b 100644
--- a/code/game/gamemodes/objective_items.dm
+++ b/code/game/gamemodes/objective_items.dm
@@ -136,8 +136,8 @@
/datum/objective_item/steal/functionalai/check_special_completion(obj/item/aicard/C)
for(var/mob/living/silicon/ai/A in C)
if(isAI(A) && A.stat != DEAD) //See if any AI's are alive inside that card.
- return 1
- return 0
+ return TRUE
+ return FALSE
/datum/objective_item/steal/blueprints
name = "the station blueprints."
diff --git a/code/game/gamemodes/sandbox/airlock_maker.dm b/code/game/gamemodes/sandbox/airlock_maker.dm
index ab98aa80b42..9f1cba51a85 100644
--- a/code/game/gamemodes/sandbox/airlock_maker.dm
+++ b/code/game/gamemodes/sandbox/airlock_maker.dm
@@ -21,7 +21,7 @@
var/require_all = 1
var/paintjob = "none"
- var/glassdoor = 0
+ var/glassdoor = FALSE
var/doorname = "airlock"
diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm
index 952b1093ba7..8f801af25d0 100644
--- a/code/game/gamemodes/sandbox/h_sandbox.dm
+++ b/code/game/gamemodes/sandbox/h_sandbox.dm
@@ -4,7 +4,7 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
sandbox = new/datum/h_sandbox
sandbox.owner = src.ckey
if(src.client.holder)
- sandbox.admin = 1
+ sandbox.admin = TRUE
add_verb(src, /mob/proc/sandbox_panel)
/mob/proc/sandbox_panel()
@@ -14,7 +14,7 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
/datum/h_sandbox
var/owner = null
- var/admin = 0
+ var/admin = FALSE
var/static/clothinfo = null
var/static/reaginfo = null
diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm
index 7bc293bf446..604b9bdc276 100644
--- a/code/game/machinery/_machinery.dm
+++ b/code/game/machinery/_machinery.dm
@@ -266,12 +266,12 @@ Class Procs:
/obj/machinery/proc/auto_use_power()
if(!powered(power_channel))
- return 0
+ return FALSE
if(use_power == 1)
use_power(idle_power_usage,power_channel)
else if(use_power >= 2)
use_power(active_power_usage,power_channel)
- return 1
+ return TRUE
///Called when we want to change the value of the `is_operational` variable. Boolean.
@@ -370,11 +370,11 @@ Class Procs:
/obj/machinery/Topic(href, href_list)
..()
if(!can_interact(usr))
- return 1
+ return TRUE
if(!usr.canUseTopic(src))
- return 1
+ return TRUE
add_fingerprint(usr)
- return 0
+ return FALSE
////////////////////////////////////////////////////////////////////////////////////////////
@@ -467,7 +467,7 @@ Class Procs:
M.icon_state = "box_1"
/obj/machinery/obj_break(damage_flag)
- SHOULD_CALL_PARENT(1)
+ SHOULD_CALL_PARENT(TRUE)
. = ..()
if(!(machine_stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
set_machine_stat(machine_stat | BROKEN)
@@ -513,8 +513,8 @@ Class Procs:
I.play_tool_sound(src, 50)
setDir(turn(dir,-90))
to_chat(user, "You rotate [src].")
- return 1
- return 0
+ return TRUE
+ return FALSE
/obj/proc/can_be_unfasten_wrench(mob/user, silent) //if we can unwrench this object; returns SUCCESSFUL_UNFASTEN and FAILED_UNFASTEN, which are both TRUE, or CANT_UNFASTEN, which isn't.
if(!(isfloorturf(loc) || istype(loc, /turf/open/indestructible)) && !anchored)
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 5b1d2d54f74..b1eed4cbaf7 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -17,7 +17,7 @@
var/list/L = list()
var/list/LL = list()
var/hacked = FALSE
- var/disabled = 0
+ var/disabled = FALSE
var/shocked = FALSE
var/hack_wire
var/disable_wire
diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm
index 1b4b01f204d..bb0424a7733 100644
--- a/code/game/machinery/camera/tracking.dm
+++ b/code/game/machinery/camera/tracking.dm
@@ -96,14 +96,14 @@
return
if(!target.can_track(usr))
- U.tracking = 1
+ U.tracking = TRUE
if(!cameraticks)
to_chat(U, "Target is not near any active cameras. Attempting to reacquire...")
cameraticks++
if(cameraticks > 9)
U.cameraFollow = null
to_chat(U, "Unable to reacquire, cancelling track...")
- tracking = 0
+ tracking = FALSE
return
else
sleep(10)
@@ -111,7 +111,7 @@
else
cameraticks = 0
- U.tracking = 0
+ U.tracking = FALSE
if(U.eyeobj)
U.eyeobj.setLoc(get_turf(target))
diff --git a/code/game/machinery/computer/_computer.dm b/code/game/machinery/computer/_computer.dm
index 5c83748afea..9a9eef0371a 100644
--- a/code/game/machinery/computer/_computer.dm
+++ b/code/game/machinery/computer/_computer.dm
@@ -25,8 +25,8 @@
/obj/machinery/computer/process()
if(machine_stat & (NOPOWER|BROKEN))
- return 0
- return 1
+ return FALSE
+ return TRUE
/obj/machinery/computer/update_overlays()
. = ..()
diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index 025b0f0843a..5647c351463 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -514,10 +514,10 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/datum/job/j = SSjob.GetJob(edit_job_target)
if(!j)
updateUsrDialog()
- return 0
+ return
if(can_open_job(j) != 1)
updateUsrDialog()
- return 0
+ return
if(opened_positions[edit_job_target] >= 0)
GLOB.time_last_changed_position = world.time / 10
j.total_positions++
@@ -531,10 +531,10 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/datum/job/j = SSjob.GetJob(edit_job_target)
if(!j)
updateUsrDialog()
- return 0
+ return
if(can_close_job(j) != 1)
updateUsrDialog()
- return 0
+ return
//Allow instant closing without cooldown if a position has been opened before
if(opened_positions[edit_job_target] <= 0)
GLOB.time_last_changed_position = world.time / 10
@@ -549,7 +549,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/datum/job/j = SSjob.GetJob(priority_target)
if(!j)
updateUsrDialog()
- return 0
+ return
var/priority = TRUE
if(j in SSjob.prioritized_jobs)
SSjob.prioritized_jobs -= j
diff --git a/code/game/machinery/computer/mechlaunchpad.dm b/code/game/machinery/computer/mechlaunchpad.dm
index 26fa79e6524..88d3c765cbf 100644
--- a/code/game/machinery/computer/mechlaunchpad.dm
+++ b/code/game/machinery/computer/mechlaunchpad.dm
@@ -90,7 +90,7 @@
if(connected_mechpad.panel_open)
to_chat(user, "[src]'s pad has its' panel open! It won't work!")
return
- if(!(locate(/obj/mecha) in get_turf(connected_mechpad)))
+ if(!(locate(/obj/vehicle/sealed/mecha) in get_turf(connected_mechpad)))
to_chat(user, "[src] detects no mecha on the pad!")
return
connected_mechpad.launch(where)
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index ac4dcd4abc3..9bc3af8e22d 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -559,14 +559,12 @@
continue
/obj/machinery/computer/med_data/proc/canUseMedicalRecordsConsole(mob/user, message = 1, record1, record2)
- if(user)
- if(message)
- if(authenticated)
- if(user.canUseTopic(src, !issilicon(user)))
- if(!record1 || record1 == active1)
- if(!record2 || record2 == active2)
- return 1
- return 0
+ if(user && message && authenticated)
+ if(user.canUseTopic(src, !issilicon(user)))
+ if(!record1 || record1 == active1)
+ if(!record2 || record2 == active2)
+ return TRUE
+ return FALSE
/obj/machinery/computer/med_data/laptop
name = "medical laptop"
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index 8079e397260..ed3bc77d8b9 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -855,12 +855,11 @@ What a mess.*/
continue
/obj/machinery/computer/secure_data/proc/canUseSecurityRecordsConsole(mob/user, message1 = 0, record1, record2)
- if(user)
- if(authenticated)
- if(user.canUseTopic(src, !issilicon(user)))
- if(!trim(message1))
- return 0
- if(!record1 || record1 == active1)
- if(!record2 || record2 == active2)
- return 1
- return 0
+ if(user && authenticated)
+ if(user.canUseTopic(src, !issilicon(user)))
+ if(!trim(message1))
+ return FALSE
+ if(!record1 || record1 == active1)
+ if(!record2 || record2 == active2)
+ return TRUE
+ return FALSE
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index eaca2b74abb..efd71785d72 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -31,7 +31,7 @@
/obj/structure/frame/machine/examine(user)
. = ..()
if(state == 3 && req_components && req_component_names)
- var/hasContent = 0
+ var/hasContent = FALSE
var/requires = "It requires"
for(var/i = 1 to req_components.len)
@@ -41,7 +41,7 @@
continue
var/use_and = i == req_components.len
requires += "[(hasContent ? (use_and ? ", and" : ",") : "")] [amt] [amt == 1 ? req_component_names[tname] : "[req_component_names[tname]]\s"]"
- hasContent = 1
+ hasContent = TRUE
if(hasContent)
. += "[requires]."
@@ -267,9 +267,9 @@
to_chat(user, "You add [P] to [src].")
components += P
req_components[I]--
- return 1
+ return TRUE
to_chat(user, "You cannot add that to the machine!")
- return 0
+ return FALSE
if(user.a_intent == INTENT_HARM)
return ..()
diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm
index 09307a846fa..275022e6437 100644
--- a/code/game/machinery/doors/airlock_types.dm
+++ b/code/game/machinery/doors/airlock_types.dm
@@ -472,11 +472,11 @@
/obj/machinery/door/airlock/cult/allowed(mob/living/L)
if(!density)
- return 1
+ return TRUE
if(friendly || iscultist(L) || istype(L, /mob/living/simple_animal/shade) || isconstruct(L))
if(!stealthy)
new openingoverlaytype(loc)
- return 1
+ return TRUE
else
if(!stealthy)
new /obj/effect/temp_visual/cult/sac(loc)
@@ -486,7 +486,7 @@
flash_color(L, flash_color="#960000", flash_time=20)
L.Paralyze(40)
L.throw_at(throwtarget, 5, 1,src)
- return 0
+ return FALSE
/obj/machinery/door/airlock/cult/proc/conceal()
icon = 'icons/obj/doors/airlocks/station/maintenance.dmi'
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index b88aa3438e9..d581ca1de3a 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -116,18 +116,6 @@
return
bumpopen(M)
return
-
- if(ismecha(AM))
- var/obj/mecha/mecha = AM
- if(density)
- if(mecha.occupant)
- if(world.time - mecha.occupant.last_bumped <= 10)
- return
- mecha.occupant.last_bumped = world.time
- if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
- open()
- else
- do_animate("deny")
return
if(isitem(AM))
@@ -370,7 +358,7 @@
//add_blood doesn't work for borgs/xenos, but add_blood_floor does.
L.add_splatter_floor(location)
log_combat(src, L, "crushed")
- for(var/obj/mecha/M in get_turf(src))
+ for(var/obj/vehicle/sealed/mecha/M in get_turf(src))
M.take_damage(DOOR_CRUSH_DAMAGE)
log_combat(src, M, "crushed")
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index bc364f13a0c..013b43be237 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -67,17 +67,19 @@
close()
/obj/machinery/door/window/Bumped(atom/movable/AM)
- if( operating || !density )
+ if(operating || !density)
return
- if (!( ismob(AM) ))
+ if(!ismob(AM))
if(ismecha(AM))
- var/obj/mecha/mecha = AM
- if(mecha.occupant && allowed(mecha.occupant))
- open_and_close()
- else
- do_animate("deny")
+ var/obj/vehicle/sealed/mecha/mecha = AM
+ for(var/O in mecha.occupants)
+ var/mob/living/occupant = O
+ if(allowed(occupant))
+ open_and_close()
+ return
+ do_animate("deny")
return
- if (!( SSticker ))
+ if(!SSticker)
return
var/mob/M = AM
if(M.restrained() || ((isdrone(M) || iscyborg(M)) && M.stat))
@@ -85,7 +87,7 @@
bumpopen(M)
/obj/machinery/door/window/bumpopen(mob/user)
- if( operating || !density )
+ if(operating || !density)
return
add_fingerprint(user)
if(!requiresID())
diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm
index 5d0165189d5..2d9cc6cf983 100644
--- a/code/game/machinery/embedded_controller/embedded_controller_base.dm
+++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm
@@ -35,15 +35,16 @@
/obj/machinery/embedded_controller/proc/return_text()
/obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line)
- return 0
+ return
/obj/machinery/embedded_controller/receive_signal(datum/signal/signal)
if(istype(signal) && program)
program.receive_signal(signal)
/obj/machinery/embedded_controller/Topic(href, href_list)
- if(..())
- return 0
+ . = ..()
+ if(.)
+ return
if(program)
program.receive_user_command(href_list["command"])
diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm
index 72590088a06..5978c0b7fa3 100644
--- a/code/game/machinery/lightswitch.dm
+++ b/code/game/machinery/lightswitch.dm
@@ -52,7 +52,7 @@
area.power_change()
/obj/machinery/light_switch/power_change()
- SHOULD_CALL_PARENT(0)
+ SHOULD_CALL_PARENT(FALSE)
if(area == get_area(src))
return ..()
diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm
index 4c18e747af4..39ceb210414 100644
--- a/code/game/machinery/magnet.dm
+++ b/code/game/machinery/magnet.dm
@@ -201,8 +201,8 @@
var/speed = 1 // lowest = 1, highest = 10
var/list/rpath = list() // real path of the magnet, used in iterator
- var/moving = 0 // 1 if scheduled to loop
- var/looping = 0 // 1 if looping
+ var/moving = TRUE // true if scheduled to loop
+ var/looping = TRUE // true if looping
var/datum/radio_frequency/radio_connection
@@ -301,7 +301,7 @@
if("setpath")
var/newpath = stripped_input(usr, "Please define a new path!", "New Path", path, MAX_MESSAGE_LEN)
if(newpath && newpath != "")
- moving = 0 // stop moving
+ moving = FALSE // stop moving
path = newpath
pathpos = 1 // reset position
filter_path() // renders rpath
@@ -323,7 +323,7 @@
if(machine_stat & (BROKEN|NOPOWER))
break
- looping = 1
+ looping = TRUE
// Prepare the radio signal
var/datum/signal/signal = new(list("code" = code))
@@ -353,7 +353,7 @@
else
sleep(12-speed)
- looping = 0
+ looping = FALSE
/obj/machinery/magnetic_controller/proc/filter_path()
diff --git a/code/game/machinery/medical_kiosk.dm b/code/game/machinery/medical_kiosk.dm
index 0b2f4f5db77..4f72b94eab0 100644
--- a/code/game/machinery/medical_kiosk.dm
+++ b/code/game/machinery/medical_kiosk.dm
@@ -234,7 +234,7 @@
if(altPatient.reagents.reagent_list.len) //Chemical Analysis details.
for(var/datum/reagent/R in altPatient.reagents.reagent_list)
chemical_list += list(list("name" = R.name, "volume" = round(R.volume, 0.01)))
- if(R.overdosed == 1)
+ if(R.overdosed)
overdose_list += list(list("name" = R.name))
if(altPatient.reagents.addiction_list.len)
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 04fc034ff8d..83441347ea6 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -13,7 +13,7 @@ GLOBAL_LIST_EMPTY(allCasters)
var/body =""
var/list/authorCensorTime = list()
var/list/bodyCensorTime = list()
- var/is_admin_message = 0
+ var/is_admin_message = FALSE
var/icon/img = null
var/time_stamp = ""
var/list/datum/newscaster/feed_comment/comments = list()
@@ -61,11 +61,11 @@ GLOBAL_LIST_EMPTY(allCasters)
var/list/datum/newscaster/feed_message/messages = list()
var/locked = FALSE
var/author = ""
- var/censored = 0
+ var/censored = FALSE
var/list/authorCensorTime = list()
var/list/DclassCensorTime = list()
var/authorCensor
- var/is_admin_channel = 0
+ var/is_admin_channel = FALSE
/datum/newscaster/feed_channel/proc/returnAuthor(censor)
if(censor == -1)
@@ -110,7 +110,7 @@ GLOBAL_LIST_EMPTY(allCasters)
CreateFeedChannel("Station Announcements", "SS13", 1)
wanted_issue = new /datum/newscaster/wanted_message
-/datum/newscaster/feed_network/proc/CreateFeedChannel(channel_name, author, locked, adminChannel = 0)
+/datum/newscaster/feed_network/proc/CreateFeedChannel(channel_name, author, locked, adminChannel = FALSE)
var/datum/newscaster/feed_channel/newChannel = new /datum/newscaster/feed_channel
newChannel.channel_name = channel_name
newChannel.author = author
@@ -118,7 +118,7 @@ GLOBAL_LIST_EMPTY(allCasters)
newChannel.is_admin_channel = adminChannel
network_channels += newChannel
-/datum/newscaster/feed_network/proc/SubmitArticle(msg, author, channel_name, datum/picture/picture, adminMessage = 0, allow_comments = 1, update_alert = TRUE)
+/datum/newscaster/feed_network/proc/SubmitArticle(msg, author, channel_name, datum/picture/picture, adminMessage = FALSE, allow_comments = TRUE, update_alert = TRUE)
var/datum/newscaster/feed_message/newMsg = new /datum/newscaster/feed_message
newMsg.author = author
newMsg.body = msg
@@ -138,8 +138,8 @@ GLOBAL_LIST_EMPTY(allCasters)
lastAction ++
newMsg.creationTime = lastAction
-/datum/newscaster/feed_network/proc/submitWanted(criminal, body, scanned_user, datum/picture/picture, adminMsg = 0, newMessage = 0)
- wanted_issue.active = 1
+/datum/newscaster/feed_network/proc/submitWanted(criminal, body, scanned_user, datum/picture/picture, adminMsg = FALSE, newMessage = FALSE)
+ wanted_issue.active = TRUE
wanted_issue.criminal = criminal
wanted_issue.body = body
wanted_issue.scannedUser = scanned_user
@@ -153,7 +153,7 @@ GLOBAL_LIST_EMPTY(allCasters)
N.update_icon()
/datum/newscaster/feed_network/proc/deleteWanted()
- wanted_issue.active = 0
+ wanted_issue.active = FALSE
wanted_issue.criminal = null
wanted_issue.body = null
wanted_issue.scannedUser = null
@@ -273,9 +273,9 @@ GLOBAL_LIST_EMPTY(allCasters)
dat+= "
Re-scan User"
dat+= "
Exit"
if(securityCaster)
- var/wanted_already = 0
+ var/wanted_already = FALSE
if(GLOB.news_network.wanted_issue.active)
- wanted_already = 1
+ wanted_already = TRUE
dat+="
Feed Security functions:
"
dat+="
[(wanted_already) ? ("Manage") : ("Publish")] \"Wanted\" Issue"
dat+="
Censor Feed Stories"
@@ -334,10 +334,10 @@ GLOBAL_LIST_EMPTY(allCasters)
dat+="There is already a Feed channel under your name.
"
if(channel_name=="" || channel_name == "\[REDACTED\]")
dat+="Invalid channel name.
"
- var/check = 0
+ var/check = FALSE
for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.channel_name == channel_name)
- check = 1
+ check = TRUE
break
if(check)
dat+="Channel name already in use.
"
@@ -436,10 +436,10 @@ GLOBAL_LIST_EMPTY(allCasters)
dat+="
Back"
if(14)
dat+="Wanted Issue Handler:"
- var/wanted_already = 0
+ var/wanted_already = FALSE
var/end_param = 1
if(GLOB.news_network.wanted_issue.active)
- wanted_already = 1
+ wanted_already = TRUE
end_param = 2
if(wanted_already)
dat+="
A wanted issue is already in Feed Circulation. You can edit or cancel it below."
@@ -516,10 +516,10 @@ GLOBAL_LIST_EMPTY(allCasters)
existing_authors += GLOB.news_network.redactedText
else
existing_authors += FC.author
- var/check = 0
+ var/check = FALSE
for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.channel_name == channel_name)
- check = 1
+ check = TRUE
break
if(channel_name == "" || channel_name == "\[REDACTED\]" || scanned_user == "Unknown" || check || (scanned_user in existing_authors) )
screen=7
@@ -578,10 +578,7 @@ GLOBAL_LIST_EMPTY(allCasters)
screen=11
updateUsrDialog()
else if(href_list["menu_wanted"])
- var/already_wanted = 0
if(GLOB.news_network.wanted_issue.active)
- already_wanted = 1
- if(already_wanted)
channel_name = GLOB.news_network.wanted_issue.criminal
msg = GLOB.news_network.wanted_issue.body
screen = 14
@@ -971,17 +968,17 @@ GLOBAL_LIST_EMPTY(allCasters)
/obj/item/newspaper/proc/notContent(list/L)
if(!L.len)
- return 0
+ return FALSE
for(var/i=L.len;i>0;i--)
var/num = abs(L[i])
if(creationTime <= num)
continue
else
if(L[i] > 0)
- return 1
+ return TRUE
else
- return 0
- return 0
+ return FALSE
+ return FALSE
/obj/item/newspaper/Topic(href, href_list)
var/mob/living/U = usr
diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm
index 30a78ea4410..0c58653a5ce 100644
--- a/code/game/machinery/porta_turret/portable_turret.dm
+++ b/code/game/machinery/porta_turret/portable_turret.dm
@@ -448,10 +448,12 @@
for(var/A in GLOB.mechas_list)
if((get_dist(A, base) < scan_range) && can_see(base, A, scan_range))
- var/obj/mecha/Mech = A
- if(Mech.occupant && !in_faction(Mech.occupant)) //If there is a user and they're not in our faction
- if(assess_perp(Mech.occupant) >= 4)
- targets += Mech
+ var/obj/vehicle/sealed/mecha/mech = A
+ for(var/O in mech.occupants)
+ var/mob/living/occupant = O
+ if(!in_faction(occupant)) //If there is a user and they're not in our faction
+ if(assess_perp(occupant) >= 4)
+ targets += mech
if((turret_flags & TURRET_FLAG_SHOOT_ANOMALOUS) && GLOB.blobs.len && (mode == TURRET_LETHAL))
for(var/obj/structure/blob/B in view(scan_range, base))
diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm
index b041b9aca5c..90a8f3e3081 100644
--- a/code/game/machinery/recycler.dm
+++ b/code/game/machinery/recycler.dm
@@ -10,7 +10,7 @@
circuit = /obj/item/circuitboard/machine/recycler
var/safety_mode = FALSE // Temporarily stops machine if it detects a mob
var/icon_name = "grinder-o"
- var/blood = 0
+ var/bloody = FALSE
var/eat_dir = WEST
var/amount_produced = 50
var/crush_damage = 1000
@@ -76,7 +76,7 @@
var/is_powered = !(machine_stat & (BROKEN|NOPOWER))
if(safety_mode)
is_powered = FALSE
- icon_state = icon_name + "[is_powered]" + "[(blood ? "bld" : "")]" // add the blood tag at the end
+ icon_state = icon_name + "[is_powered]" + "[(bloody ? "bld" : "")]" // add the blood tag at the end
/obj/machinery/recycler/CanAllowThrough(atom/movable/AM)
. = ..()
@@ -181,8 +181,8 @@
L.say("ARRRRRRRRRRRGH!!!", forced="recycler grinding")
add_mob_blood(L)
- if(!blood && !issilicon(L))
- blood = TRUE
+ if(!bloody && !issilicon(L))
+ bloody = TRUE
update_icon()
// Instantly lie down, also go unconscious from the pain, before you die.
diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm
index c1ec1a07811..f989b6ceed5 100644
--- a/code/game/machinery/slotmachine.dm
+++ b/code/game/machinery/slotmachine.dm
@@ -26,7 +26,7 @@
light_color = LIGHT_COLOR_BROWN
var/money = 3000 //How much money it has CONSUMED
var/plays = 0
- var/working = 0
+ var/working = FALSE
var/balance = 0 //How much money is in the machine, ready to be CONSUMED.
var/jackpots = 0
var/paymode = HOLOCHIP //toggles between HOLOCHIP/COIN, defined above
@@ -229,15 +229,17 @@
/obj/machinery/computer/slot_machine/proc/can_spin(mob/user)
if(machine_stat & NOPOWER)
to_chat(user, "The slot machine has no power!")
+ return FALSE
if(machine_stat & BROKEN)
to_chat(user, "The slot machine is broken!")
+ return FALSE
if(working)
to_chat(user, "You need to wait until the machine stops spinning before you can play again!")
- return 0
+ return FALSE
if(balance < SPIN_PRICE)
to_chat(user, "Insufficient money to play!")
- return 0
- return 1
+ return FALSE
+ return TRUE
/obj/machinery/computer/slot_machine/proc/toggle_reel_spin(value, delay = 0) //value is 1 or 0 aka on or off
for(var/list/reel in reels)
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index c52a5bccbe3..0b693f28d03 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -360,7 +360,7 @@
dump_contents()
/obj/machinery/suit_storage_unit/proc/resist_open(mob/user)
- if(!state_open && occupant && (user in src) && user.stat == 0) // Check they're still here.
+ if(!state_open && occupant && (user in src) && user.stat == CONSCIOUS) // Check they're still here.
visible_message("You see [user] burst out of [src]!", \
"You escape the cramped confines of [src]!")
open_machine()
diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm
index edeec36ef10..78c52b44a4f 100644
--- a/code/game/machinery/syndicatebeacon.dm
+++ b/code/game/machinery/syndicatebeacon.dm
@@ -13,7 +13,7 @@
verb_say = "states"
var/cooldown = 0
- var/active = 0
+ var/active = FALSE
var/icontype = "beacon"
@@ -26,7 +26,7 @@
if(singulo.z == z)
singulo.target = src
icon_state = "[icontype]1"
- active = 1
+ active = TRUE
if(user)
to_chat(user, "You activate the beacon.")
@@ -36,7 +36,7 @@
if(singulo.target == src)
singulo.target = null
icon_state = "[icontype]0"
- active = 0
+ active = FALSE
if(user)
to_chat(user, "You deactivate the beacon.")
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index 4beb14a5233..96bbf82affc 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -13,7 +13,7 @@
circuit = /obj/item/circuitboard/machine/teleporter_hub
var/accuracy = 0
var/obj/machinery/teleport/station/power_station
- var/calibrated //Calibration prevents mutation
+ var/calibrated = FALSE//Calibration prevents mutation
/obj/machinery/teleport/hub/Initialize()
. = ..()
@@ -83,7 +83,7 @@
log_game("[human] ([key_name(human)]) was turned into a fly person")
human.apply_effect((rand(120 - accuracy * 40, 180 - accuracy * 60)), EFFECT_IRRADIATE, 0)
- calibrated = 0
+ calibrated = FALSE
return
/obj/machinery/teleport/hub/update_icon_state()
diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm
index 794d886e64d..5cb65ab29a5 100644
--- a/code/game/machinery/transformer.dm
+++ b/code/game/machinery/transformer.dm
@@ -96,7 +96,7 @@
// So he can't jump out the gate right away.
R.SetLockdown()
if(masterAI)
- R.connected_ai = masterAI
+ R.set_connected_ai(masterAI)
R.lawsync()
R.lawupdate = 1
addtimer(CALLBACK(src, .proc/unlock_new_robot, R), 50)
diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm
index 1b5f1800b61..60c08003708 100644
--- a/code/game/machinery/washing_machine.dm
+++ b/code/game/machinery/washing_machine.dm
@@ -139,7 +139,7 @@ GLOBAL_LIST_INIT(dye_registry, list(
density = TRUE
state_open = TRUE
var/busy = FALSE
- var/bloody_mess = 0
+ var/bloody_mess = FALSE
var/obj/item/color_source
var/max_wash_capacity = 5
@@ -264,7 +264,7 @@ GLOBAL_LIST_INIT(dye_registry, list(
/obj/item/clothing/shoes/sneakers/machine_wash(obj/machinery/washing_machine/WM)
if(chained)
- chained = 0
+ chained = FALSE
slowdown = SHOES_SLOWDOWN
new /obj/item/restraints/handcuffs(loc)
..()
diff --git a/code/game/mecha/combat/five_stars.dm b/code/game/mecha/combat/five_stars.dm
deleted file mode 100644
index 82a961e1806..00000000000
--- a/code/game/mecha/combat/five_stars.dm
+++ /dev/null
@@ -1,22 +0,0 @@
-/obj/mecha/combat/five_stars
- desc = "A state of the art tank deployed by the Spinward Stellar Coalition National Guard."
- name = "\improper Tank"
- icon = 'icons/mecha/mecha_96x96.dmi'
- icon_state = "five_stars"
- armor = list(MELEE = 100, BULLET = 50, LASER = 35, ENERGY = 35, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 100)
- exit_delay = 40
- step_in = 4
- dir_in = 1 //Facing North.
- max_integrity = 800
- pixel_x = -32
- pixel_y = -32
-
-/obj/mecha/combat/five_stars/Initialize()
- . = ..()
- var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/spacecops(src)
- ME.attach(src)
- ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg(src)
- ME.attach(src)
- ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
- ME.attach(src)
- max_ammo()
diff --git a/code/game/mecha/mecha_actions.dm b/code/game/mecha/mecha_actions.dm
deleted file mode 100644
index 376b8857083..00000000000
--- a/code/game/mecha/mecha_actions.dm
+++ /dev/null
@@ -1,256 +0,0 @@
-//////////////////////////////////////// Action Buttons ///////////////////////////////////////////////
-
-/obj/mecha/proc/GrantActions(mob/living/user, human_occupant = 0)
- if(human_occupant)
- eject_action.Grant(user, src)
- if(enclosed)
- internals_action.Grant(user, src)
- cycle_action.Grant(user, src)
- if(haslights)
- lights_action.Grant(user, src)
- stats_action.Grant(user, src)
- if(canstrafe)
- strafing_action.Grant(user, src)
-
-
-/obj/mecha/proc/RemoveActions(mob/living/user, human_occupant = 0)
- if(human_occupant)
- eject_action.Remove(user)
- internals_action.Remove(user)
- cycle_action.Remove(user)
- if(haslights)
- lights_action.Remove(user)
- stats_action.Remove(user)
- if(canstrafe)
- strafing_action.Remove(user)
-
-
-/datum/action/innate/mecha
- check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUN | AB_CHECK_CONSCIOUS
- icon_icon = 'icons/mob/actions/actions_mecha.dmi'
- var/obj/mecha/chassis
-
-/datum/action/innate/mecha/Grant(mob/living/L, obj/mecha/M)
- if(M)
- chassis = M
- ..()
-
-/datum/action/innate/mecha/Destroy()
- chassis = null
- return ..()
-
-/datum/action/innate/mecha/mech_eject
- name = "Eject From Mech"
- button_icon_state = "mech_eject"
-
-/datum/action/innate/mecha/mech_eject/Activate()
- if(!owner)
- return
- if(!chassis || chassis.occupant != owner)
- return
- chassis.container_resist_act(chassis.occupant)
-
-/datum/action/innate/mecha/mech_toggle_internals
- name = "Toggle Internal Airtank Usage"
- button_icon_state = "mech_internals_off"
-
-/datum/action/innate/mecha/mech_toggle_internals/Activate()
- if(!owner || !chassis || chassis.occupant != owner)
- return
- chassis.use_internal_tank = !chassis.use_internal_tank
- button_icon_state = "mech_internals_[chassis.use_internal_tank ? "on" : "off"]"
- chassis.occupant_message("Now taking air from [chassis.use_internal_tank?"internal airtank":"environment"].")
- chassis.log_message("Now taking air from [chassis.use_internal_tank?"internal airtank":"environment"].", LOG_MECHA)
- UpdateButtonIcon()
-
-/datum/action/innate/mecha/mech_cycle_equip
- name = "Cycle Equipment"
- button_icon_state = "mech_cycle_equip_off"
-
-/datum/action/innate/mecha/mech_cycle_equip/Activate()
- if(!owner || !chassis || chassis.occupant != owner)
- return
-
- var/list/available_equipment = list()
- for(var/obj/item/mecha_parts/mecha_equipment/M in chassis.equipment)
- if(M.selectable)
- available_equipment += M
-
- if(available_equipment.len == 0)
- chassis.occupant_message("No equipment available!")
- return
- if(!chassis.selected)
- chassis.selected = available_equipment[1]
- chassis.occupant_message("You select [chassis.selected].")
- send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list())
- button_icon_state = "mech_cycle_equip_on"
- UpdateButtonIcon()
- return
- var/number = 0
- for(var/A in available_equipment)
- number++
- if(A == chassis.selected)
- if(available_equipment.len == number)
- chassis.selected = null
- chassis.occupant_message("You switch to no equipment.")
- button_icon_state = "mech_cycle_equip_off"
- else
- chassis.selected = available_equipment[number+1]
- chassis.occupant_message("You switch to [chassis.selected].")
- button_icon_state = "mech_cycle_equip_on"
- send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list())
- UpdateButtonIcon()
- return
-
-
-/datum/action/innate/mecha/mech_toggle_lights
- name = "Toggle Lights"
- button_icon_state = "mech_lights_off"
-
-/datum/action/innate/mecha/mech_toggle_lights/Activate()
- if(!owner || !chassis || chassis.occupant != owner)
- return
- chassis.lights = !chassis.lights
- if(chassis.lights)
- button_icon_state = "mech_lights_on"
- else
- button_icon_state = "mech_lights_off"
- chassis.set_light_on(chassis.lights)
- chassis.occupant_message("Toggled lights [chassis.lights?"on":"off"].")
- chassis.log_message("Toggled lights [chassis.lights?"on":"off"].", LOG_MECHA)
- UpdateButtonIcon()
-
-/datum/action/innate/mecha/mech_view_stats
- name = "View Stats"
- button_icon_state = "mech_view_stats"
-
-/datum/action/innate/mecha/mech_view_stats/Activate()
- if(!owner || !chassis || chassis.occupant != owner)
- return
- chassis.occupant << browse(chassis.get_stats_html(), "window=exosuit")
-
-
-/datum/action/innate/mecha/strafe
- name = "Toggle Strafing. Disabled when Alt is held."
- button_icon_state = "strafe"
-
-/datum/action/innate/mecha/strafe/Activate()
- if(!owner || !chassis || chassis.occupant != owner)
- return
-
- chassis.toggle_strafe()
-
-/obj/mecha/AltClick(mob/living/user)
- if((user == occupant) && user.canUseTopic(src))
- toggle_strafe()
-
-/obj/mecha/proc/toggle_strafe()
- strafe = !strafe
-
- occupant_message("Toggled strafing mode [strafe?"on":"off"].")
- log_message("Toggled strafing mode [strafe?"on":"off"].", LOG_MECHA)
- strafing_action.UpdateButtonIcon()
-
-//////////////////////////////////////// Specific Ability Actions ///////////////////////////////////////////////
-//Need to be granted by the mech type, Not default abilities.
-
-/datum/action/innate/mecha/mech_defense_mode
- name = "Toggle an energy shield that blocks all attacks from the faced direction at a heavy power cost."
- button_icon_state = "mech_defense_mode_off"
- var/image/def_overlay
-
-/datum/action/innate/mecha/mech_defense_mode/Activate(forced_state = FALSE)
- SEND_SIGNAL(chassis, COMSIG_MECHA_ACTION_ACTIVATE, args) ///Signal sent to the mech, to be handed to the shield. See durand.dm for more details
-
-/datum/action/innate/mecha/mech_overload_mode
- name = "Toggle leg actuators overload"
- button_icon_state = "mech_overload_off"
-
-/datum/action/innate/mecha/mech_overload_mode/Activate(forced_state = null)
- if(!owner || !chassis || chassis.occupant != owner)
- return
- if(!isnull(forced_state))
- chassis.leg_overload_mode = forced_state
- else
- chassis.leg_overload_mode = !chassis.leg_overload_mode
- button_icon_state = "mech_overload_[chassis.leg_overload_mode ? "on" : "off"]"
- chassis.log_message("Toggled leg actuators overload.", LOG_MECHA)
- if(chassis.leg_overload_mode)
- chassis.leg_overload_mode = 1
- chassis.step_in = min(1, round(chassis.step_in/2))
- chassis.step_energy_drain = max(chassis.overload_step_energy_drain_min,chassis.step_energy_drain*chassis.leg_overload_coeff)
- chassis.occupant_message("You enable leg actuators overload.")
- else
- chassis.leg_overload_mode = 0
- chassis.step_in = initial(chassis.step_in)
- chassis.step_energy_drain = chassis.normal_step_energy_drain
- chassis.occupant_message("You disable leg actuators overload.")
- UpdateButtonIcon()
-
-/datum/action/innate/mecha/mech_smoke
- name = "Smoke"
- button_icon_state = "mech_smoke"
-
-/datum/action/innate/mecha/mech_smoke/Activate()
- if(!owner || !chassis || chassis.occupant != owner)
- return
- if(chassis.smoke_ready && chassis.smoke>0)
- chassis.smoke_system.start()
- chassis.smoke--
- chassis.smoke_ready = FALSE
- addtimer(VARSET_CALLBACK(chassis, smoke_ready, TRUE), chassis.smoke_cooldown)
-
-
-/datum/action/innate/mecha/mech_zoom
- name = "Zoom"
- button_icon_state = "mech_zoom_off"
-
-/datum/action/innate/mecha/mech_zoom/Activate()
- if(!owner || !chassis || chassis.occupant != owner)
- return
- if(owner.client)
- chassis.zoom_mode = !chassis.zoom_mode
- button_icon_state = "mech_zoom_[chassis.zoom_mode ? "on" : "off"]"
- chassis.log_message("Toggled zoom mode.", LOG_MECHA)
- chassis.occupant_message("Zoom mode [chassis.zoom_mode?"en":"dis"]abled.")
- if(chassis.zoom_mode)
- owner.client.view_size.setTo(4.5)
- SEND_SOUND(owner, sound('sound/mecha/imag_enh.ogg',volume=50))
- else
- owner.client.view_size.resetToDefault() //Let's not let this stack shall we?
- UpdateButtonIcon()
-
-/datum/action/innate/mecha/mech_switch_damtype
- name = "Reconfigure arm microtool arrays"
- button_icon_state = "mech_damtype_brute"
-
-/datum/action/innate/mecha/mech_switch_damtype/Activate()
- if(!owner || !chassis || chassis.occupant != owner)
- return
- var/new_damtype
- switch(chassis.damtype)
- if(TOX)
- new_damtype = BRUTE
- chassis.occupant_message("Your exosuit's hands form into fists.")
- if(BRUTE)
- new_damtype = BURN
- chassis.occupant_message("A torch tip extends from your exosuit's hand, glowing red.")
- if(BURN)
- new_damtype = TOX
- chassis.occupant_message("A bone-chillingly thick plasteel needle protracts from the exosuit's palm.")
- chassis.damtype = new_damtype
- button_icon_state = "mech_damtype_[new_damtype]"
- playsound(src, 'sound/mecha/mechmove01.ogg', 50, TRUE)
- UpdateButtonIcon()
-
-/datum/action/innate/mecha/mech_toggle_phasing
- name = "Toggle Phasing"
- button_icon_state = "mech_phasing_off"
-
-/datum/action/innate/mecha/mech_toggle_phasing/Activate()
- if(!owner || !chassis || chassis.occupant != owner)
- return
- chassis.phasing = !chassis.phasing
- button_icon_state = "mech_phasing_[chassis.phasing ? "on" : "off"]"
- chassis.occupant_message("En":"#f00\">Dis"]abled phasing.")
- UpdateButtonIcon()
diff --git a/code/game/mecha/medical/medical.dm b/code/game/mecha/medical/medical.dm
deleted file mode 100644
index 1541ff1b7cd..00000000000
--- a/code/game/mecha/medical/medical.dm
+++ /dev/null
@@ -1,7 +0,0 @@
-/obj/mecha/medical
- internals_req_access = list(ACCESS_MECH_SCIENCE, ACCESS_MECH_MEDICAL)
-
-/obj/mecha/medical/mechturn(direction)
- . = ..()
- if(!strafe && !occupant.client.keys_held["Alt"])
- mechstep(direction) //agile mechs get to move and turn in the same step
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index 5379de73296..82564664fd4 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -1,7 +1,7 @@
/atom/movable
- var/can_buckle = 0
+ var/can_buckle = FALSE
var/buckle_lying = -1 //bed-like behaviour, forces mob.lying = buckle_lying if != -1
- var/buckle_requires_restraints = 0 //require people to be handcuffed before being able to buckle. eg: pipes
+ var/buckle_requires_restraints = FALSE //require people to be handcuffed before being able to buckle. eg: pipes
var/list/mob/living/buckled_mobs = null //list()
var/max_buckled_mobs = 1
var/buckle_prevents_pull = FALSE
@@ -15,10 +15,10 @@
if(buckled_mobs.len > 1)
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in sortNames(buckled_mobs)
if(user_unbuckle_mob(unbuckled,user))
- return 1
+ return TRUE
else
if(user_unbuckle_mob(buckled_mobs[1],user))
- return 1
+ return TRUE
/atom/movable/attackby(obj/item/W, mob/user, params)
if(!can_buckle || !istype(W, /obj/item/riding_offhand) || !user.Adjacent(src))
diff --git a/code/game/objects/effects/alien_acid.dm b/code/game/objects/effects/alien_acid.dm
index adabf3b7069..3c40c1366f2 100644
--- a/code/game/objects/effects/alien_acid.dm
+++ b/code/game/objects/effects/alien_acid.dm
@@ -32,10 +32,9 @@
return ..()
/obj/effect/acid/process()
- . = 1
if(!target)
qdel(src)
- return 0
+ return FALSE
if(prob(5))
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
@@ -50,7 +49,8 @@
acid_level = max(acid_level - (5 + 2*round(sqrt(acid_level))), 0)
if(acid_level <= 0)
qdel(src)
- return 0
+ return FALSE
+ return TRUE
/obj/effect/acid/Crossed(AM as mob|obj)
. = ..()
diff --git a/code/game/objects/effects/decals/cleanable/aliens.dm b/code/game/objects/effects/decals/cleanable/aliens.dm
index 6c3a455edde..f4cd4357fae 100644
--- a/code/game/objects/effects/decals/cleanable/aliens.dm
+++ b/code/game/objects/effects/decals/cleanable/aliens.dm
@@ -27,7 +27,7 @@
mergeable_decal = FALSE
/obj/effect/decal/cleanable/xenoblood/xgibs/proc/streak(list/directions)
- set waitfor = 0
+ set waitfor = FALSE
var/direction = pick(directions)
for(var/i = 0, i < pick(1, 200; 2, 150; 3, 50), i++)
sleep(2)
diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm
index ceb5f82d4cb..4500755446a 100644
--- a/code/game/objects/effects/decals/cleanable/humans.dm
+++ b/code/game/objects/effects/decals/cleanable/humans.dm
@@ -227,5 +227,5 @@
/obj/effect/decal/cleanable/blood/footprints/can_bloodcrawl_in()
if((blood_state != BLOOD_STATE_OIL) && (blood_state != BLOOD_STATE_NOT_BLOODY))
- return 1
- return 0
+ return TRUE
+ return FALSE
diff --git a/code/game/objects/effects/decals/cleanable/robots.dm b/code/game/objects/effects/decals/cleanable/robots.dm
index 79059b51f35..0d7c5f8e09e 100644
--- a/code/game/objects/effects/decals/cleanable/robots.dm
+++ b/code/game/objects/effects/decals/cleanable/robots.dm
@@ -13,7 +13,7 @@
beauty = -50
/obj/effect/decal/cleanable/robot_debris/proc/streak(list/directions)
- set waitfor = 0
+ set waitfor = FALSE
var/direction = pick(directions)
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50), i++)
sleep(2)
diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm
index 770dcf9d62f..0431da86ca0 100644
--- a/code/game/objects/effects/effect_system/effects_foam.dm
+++ b/code/game/objects/effects/effect_system/effects_foam.dm
@@ -162,14 +162,14 @@
/obj/effect/particle_effect/foam/proc/foam_mob(mob/living/L)
if(lifetime<1)
- return 0
+ return FALSE
if(!istype(L))
- return 0
+ return FALSE
var/fraction = 1/initial(reagent_divisor)
if(lifetime % reagent_divisor)
reagents.expose(L, VAPOR, fraction)
lifetime--
- return 1
+ return TRUE
/obj/effect/particle_effect/foam/proc/spread_foam()
var/turf/t_loc = get_turf(src)
diff --git a/code/game/objects/effects/effect_system/effects_other.dm b/code/game/objects/effects/effect_system/effects_other.dm
index 3f2b6ecaf94..520e251a2a8 100644
--- a/code/game/objects/effects/effect_system/effects_other.dm
+++ b/code/game/objects/effects/effect_system/effects_other.dm
@@ -85,11 +85,11 @@
/datum/effect_system/reagents_explosion
var/amount // TNT equivalent
- var/flashing = 0 // does explosion creates flash effect?
+ var/flashing = FALSE // does explosion creates flash effect?
var/flashing_factor = 0 // factor of how powerful the flash effect relatively to the explosion
var/explosion_message = 1 //whether we show a message to mobs.
-/datum/effect_system/reagents_explosion/set_up(amt, loca, flash = 0, flash_fact = 0, message = 1)
+/datum/effect_system/reagents_explosion/set_up(amt, loca, flash = FALSE, flash_fact = 0, message = TRUE)
amount = amt
explosion_message = message
if(isturf(loca))
diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm
index ce2742ace3f..438a80e3297 100644
--- a/code/game/objects/effects/effect_system/effects_smoke.dm
+++ b/code/game/objects/effects/effect_system/effects_smoke.dm
@@ -12,7 +12,7 @@
layer = FLY_LAYER
anchored = TRUE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
- animate_movement = 0
+ animate_movement = FALSE
var/amount = 4
var/lifetime = 5
var/opaque = 1 //whether the smoke can block the view when in enough amount
@@ -49,23 +49,23 @@
lifetime--
if(lifetime < 1)
kill_smoke()
- return 0
+ return FALSE
for(var/mob/living/L in range(0,src))
smoke_mob(L)
- return 1
+ return TRUE
/obj/effect/particle_effect/smoke/proc/smoke_mob(mob/living/carbon/C)
if(!istype(C))
- return 0
+ return FALSE
if(lifetime<1)
- return 0
+ return FALSE
if(C.internal != null || C.has_smoke_protection())
- return 0
+ return FALSE
if(C.smoke_delay)
- return 0
+ return FALSE
C.smoke_delay++
addtimer(CALLBACK(src, .proc/remove_smoke_delay, C), 10)
- return 1
+ return TRUE
/obj/effect/particle_effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C)
if(C)
@@ -126,11 +126,12 @@
lifetime = 8
/obj/effect/particle_effect/smoke/bad/smoke_mob(mob/living/carbon/M)
- if(..())
+ . = ..()
+ if(.)
M.drop_all_held_items()
M.adjustOxyLoss(1)
M.emote("cough")
- return 1
+ return TRUE
/obj/effect/particle_effect/smoke/bad/Crossed(atom/movable/AM, oldloc)
. = ..()
@@ -148,7 +149,7 @@
/obj/effect/particle_effect/smoke/freezing
name = "nanofrost smoke"
color = "#B2FFFF"
- opaque = 0
+ opaque = FALSE
/datum/effect_system/smoke_spread/freezing
effect_type = /obj/effect/particle_effect/smoke/freezing
@@ -226,7 +227,8 @@
/obj/effect/particle_effect/smoke/chem/process()
- if(..())
+ . = ..()
+ if(.)
var/turf/T = get_turf(src)
var/fraction = 1/initial(lifetime)
for(var/atom/movable/AM in T)
@@ -237,20 +239,20 @@
reagents.expose(AM, TOUCH, fraction)
reagents.expose(T, TOUCH, fraction)
- return 1
+ return TRUE
/obj/effect/particle_effect/smoke/chem/smoke_mob(mob/living/carbon/M)
if(lifetime<1)
- return 0
+ return FALSE
if(!istype(M))
- return 0
+ return FALSE
var/mob/living/carbon/C = M
if(C.internal != null || C.has_smoke_protection())
- return 0
+ return FALSE
var/fraction = 1/initial(lifetime)
reagents.copy_to(C, fraction*reagents.total_volume)
reagents.expose(M, INGEST, fraction)
- return 1
+ return TRUE
diff --git a/code/game/objects/effects/effect_system/effects_water.dm b/code/game/objects/effects/effect_system/effects_water.dm
index 44d9c485544..6d71fe9c2c7 100644
--- a/code/game/objects/effects/effect_system/effects_water.dm
+++ b/code/game/objects/effects/effect_system/effects_water.dm
@@ -14,10 +14,10 @@
/obj/effect/particle_effect/water/Move(turf/newloc)
if (--src.life < 1)
qdel(src)
- return 0
+ return FALSE
if(newloc.density)
- return 0
- .=..()
+ return FALSE
+ return ..()
/obj/effect/particle_effect/water/Bump(atom/A)
if(reagents)
diff --git a/code/game/objects/effects/effects.dm b/code/game/objects/effects/effects.dm
index 7e18077c841..b6748426de0 100644
--- a/code/game/objects/effects/effects.dm
+++ b/code/game/objects/effects/effects.dm
@@ -5,7 +5,7 @@
icon = 'icons/effects/effects.dmi'
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF
move_resist = INFINITY
- obj_flags = 0
+ obj_flags = NONE
vis_flags = VIS_INHERIT_PLANE
/obj/effect/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
@@ -17,9 +17,6 @@
/obj/effect/acid_act()
return
-/obj/effect/mech_melee_attack(obj/mecha/M)
- return 0
-
/obj/effect/blob_act(obj/structure/blob/B)
return
@@ -45,7 +42,6 @@
/obj/effect/singularity_act()
qdel(src)
- return 0
/obj/effect/ConveyorMove()
return
diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm
index 62cb31f1b6b..a036eb0c128 100644
--- a/code/game/objects/effects/overlays.dm
+++ b/code/game/objects/effects/overlays.dm
@@ -50,8 +50,10 @@
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
anchored = TRUE
vis_flags = NONE
- var/unused = 0 //When detected to be unused it gets set to world.time, after a while it gets removed
- var/cache_expiration = 2 MINUTES // overlays which go unused for 2 minutes get cleaned up
+ ///When detected to be unused it gets set to world.time, after a while it gets removed
+ var/unused = 0
+ ///overlays which go unused for this amount of time get cleaned up
+ var/cache_expiration = 2 MINUTES
/obj/effect/overlay/atmos_excited
name = "excited group"
diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm
index 8bb94375d4e..434bf00b082 100644
--- a/code/game/objects/effects/spawners/lootdrop.dm
+++ b/code/game/objects/effects/spawners/lootdrop.dm
@@ -231,9 +231,9 @@
/obj/item/reagent_containers/food/snacks/bearsteak,
/obj/item/reagent_containers/food/snacks/enchiladas,
/obj/item/reagent_containers/food/snacks/stewedsoymeat,
- /obj/item/reagent_containers/food/snacks/burger/bigbite,
- /obj/item/reagent_containers/food/snacks/burger/superbite,
- /obj/item/reagent_containers/food/snacks/burger/fivealarm)
+ /obj/item/food/burger/bigbite,
+ /obj/item/food/burger/superbite,
+ /obj/item/food/burger/fivealarm)
/obj/effect/spawner/lootdrop/three_course_meal/Initialize(mapload)
loot = list(pick(soups) = 1,pick(salads) = 1,pick(mains) = 1)
diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm
index f8da95fee32..be6e574d656 100644
--- a/code/game/objects/effects/step_triggers.dm
+++ b/code/game/objects/effects/step_triggers.dm
@@ -56,7 +56,7 @@
return
var/atom/movable/AM = A
var/curtiles = 0
- var/stopthrow = 0
+ var/stopthrow = FALSE
for(var/obj/effect/step_trigger/thrower/T in orange(2, src))
if(AM in T.affecting)
return
@@ -82,11 +82,11 @@
if(!nostop)
for(var/obj/effect/step_trigger/T in get_step(AM, direction))
if(T.stopper && T != src)
- stopthrow = 1
+ stopthrow = TRUE
else
for(var/obj/effect/step_trigger/teleporter/T in get_step(AM, direction))
if(T.stopper)
- stopthrow = 1
+ stopthrow = TRUE
if(AM)
var/predir = AM.dir
diff --git a/code/game/objects/effects/temporary_visuals/cult.dm b/code/game/objects/effects/temporary_visuals/cult.dm
index 93bf8c498b7..1a77d2427cd 100644
--- a/code/game/objects/effects/temporary_visuals/cult.dm
+++ b/code/game/objects/effects/temporary_visuals/cult.dm
@@ -1,11 +1,11 @@
//temporary visual effects(/obj/effect/temp_visual) used by cult stuff
/obj/effect/temp_visual/cult
icon = 'icons/effects/cult_effects.dmi'
- randomdir = 0
+ randomdir = FALSE
duration = 10
/obj/effect/temp_visual/cult/sparks
- randomdir = 1
+ randomdir = TRUE
name = "blood sparks"
icon_state = "bloodsparkles"
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 48dd5f90214..1bfdaf105f8 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -460,7 +460,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
return ITALICS | REDUCE_RANGE
/obj/item/proc/dropped(mob/user, silent = FALSE)
- SHOULD_CALL_PARENT(1)
+ SHOULD_CALL_PARENT(TRUE)
for(var/X in actions)
var/datum/action/A = X
A.Remove(user)
@@ -474,7 +474,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
/// called just as an item is picked up (loc is not yet changed)
/obj/item/proc/pickup(mob/user)
- SHOULD_CALL_PARENT(1)
+ SHOULD_CALL_PARENT(TRUE)
SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user)
item_flags |= IN_INVENTORY
@@ -491,7 +491,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
* * Initial is used to indicate whether or not this is the initial equipment (job datums etc) or just a player doing it
*/
/obj/item/proc/equipped(mob/user, slot, initial = FALSE)
- SHOULD_CALL_PARENT(1)
+ SHOULD_CALL_PARENT(TRUE)
SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot)
for(var/X in actions)
var/datum/action/A = X
@@ -758,9 +758,6 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
return ..()
return 0
-/obj/item/mech_melee_attack(obj/mecha/M)
- return 0
-
/obj/item/burn()
if(!QDELETED(src))
var/turf/T = get_turf(src)
diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm
index d41036342af..ecf89751392 100644
--- a/code/game/objects/items/RCD.dm
+++ b/code/game/objects/items/RCD.dm
@@ -810,7 +810,7 @@ RLD
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
if(do_after(user, decondelay, target = A))
if(!useResource(deconcost, user))
- return 0
+ return FALSE
activate()
qdel(A)
return TRUE
@@ -871,9 +871,9 @@ RLD
playsound(src.loc, 'sound/effects/light_flicker.ogg', 50, TRUE)
if(do_after(user, floordelay, target = A))
if(!istype(F))
- return 0
+ return FALSE
if(!useResource(floorcost, user))
- return 0
+ return FALSE
activate()
var/destination = get_turf(A)
var/obj/machinery/light/floor/FL = new /obj/machinery/light/floor(destination)
diff --git a/code/game/objects/items/RPD.dm b/code/game/objects/items/RPD.dm
index c91f7557eb2..2cc7e05a2b8 100644
--- a/code/game/objects/items/RPD.dm
+++ b/code/game/objects/items/RPD.dm
@@ -33,6 +33,7 @@ GLOBAL_LIST_INIT(atmos_pipe_recipes, list(
new /datum/pipe_info/pipe("Passive Vent", /obj/machinery/atmospherics/components/unary/passive_vent),
new /datum/pipe_info/pipe("Manual Valve", /obj/machinery/atmospherics/components/binary/valve),
new /datum/pipe_info/pipe("Digital Valve", /obj/machinery/atmospherics/components/binary/valve/digital),
+ new /datum/pipe_info/pipe("Pressure Valve", /obj/machinery/atmospherics/components/binary/pressure_valve),
new /datum/pipe_info/meter("Meter"),
),
"Heat Exchange" = list(
diff --git a/code/game/objects/items/airlock_painter.dm b/code/game/objects/items/airlock_painter.dm
index fd6ebbf9039..94f2045adc7 100644
--- a/code/game/objects/items/airlock_painter.dm
+++ b/code/game/objects/items/airlock_painter.dm
@@ -44,9 +44,9 @@
if(can_use(user))
ink.charges--
playsound(src.loc, 'sound/effects/spray2.ogg', 50, TRUE)
- return 1
+ return TRUE
else
- return 0
+ return FALSE
//This proc only checks if the painter can be used.
//Call this if you don't want the painter to be used right after this check, for example
@@ -54,12 +54,12 @@
/obj/item/airlock_painter/proc/can_use(mob/user)
if(!ink)
to_chat(user, "There is no toner cartridge installed in [src]!")
- return 0
+ return FALSE
else if(ink.charges < 1)
to_chat(user, "[src] is out of ink!")
- return 0
+ return FALSE
else
- return 1
+ return TRUE
/obj/item/airlock_painter/suicide_act(mob/user)
var/obj/item/organ/lungs/L = user.getorganslot(ORGAN_SLOT_LUNGS)
diff --git a/code/game/objects/items/body_egg.dm b/code/game/objects/items/body_egg.dm
index cc4fd287c8b..95bbccf4602 100644
--- a/code/game/objects/items/body_egg.dm
+++ b/code/game/objects/items/body_egg.dm
@@ -14,14 +14,14 @@
if(iscarbon(loc))
Insert(loc)
-/obj/item/organ/body_egg/Insert(mob/living/carbon/M, special = 0)
+/obj/item/organ/body_egg/Insert(mob/living/carbon/M, special = FALSE)
..()
ADD_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC)
ADD_TRAIT(owner, TRAIT_XENO_IMMUNE, "xeno immune")
owner.med_hud_set_status()
INVOKE_ASYNC(src, .proc/AddInfectionImages, owner)
-/obj/item/organ/body_egg/Remove(mob/living/carbon/M, special = 0)
+/obj/item/organ/body_egg/Remove(mob/living/carbon/M, special = FALSE)
if(owner)
REMOVE_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC)
REMOVE_TRAIT(owner, TRAIT_XENO_IMMUNE, "xeno immune")
diff --git a/code/game/objects/items/chainsaw.dm b/code/game/objects/items/chainsaw.dm
index 4cd293dbff7..3ca29de0155 100644
--- a/code/game/objects/items/chainsaw.dm
+++ b/code/game/objects/items/chainsaw.dm
@@ -88,5 +88,5 @@
if(attack_type == PROJECTILE_ATTACK)
owner.visible_message("Ranged attacks just make [owner] angrier!")
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, TRUE)
- return 1
- return 0
+ return TRUE
+ return FALSE
diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm
index 4399e69af02..375d407ef54 100644
--- a/code/game/objects/items/chrono_eraser.dm
+++ b/code/game/objects/items/chrono_eraser.dm
@@ -112,9 +112,9 @@
var/turf/currentpos = get_turf(src)
var/mob/living/user = loc
if((currentpos == startpos) && (field in view(CHRONO_BEAM_RANGE, currentpos)) && (user.mobility_flags & MOBILITY_STAND) && (user.stat == CONSCIOUS))
- return 1
+ return TRUE
field_disconnect(F)
- return 0
+ return FALSE
/obj/item/gun/energy/chrono_gun/proc/pass_mind(datum/mind/M)
if(TED)
@@ -170,7 +170,6 @@
var/obj/item/gun/energy/chrono_gun/gun = null
var/tickstokill = 15
var/mutable_appearance/mob_underlay
- var/preloaded = 0
var/RPpos = null
var/attached = TRUE //if the gun arg isn't included initially, then the chronofield will work without one
diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm
index 79482b3563e..b88352ef77c 100644
--- a/code/game/objects/items/cigs_lighters.dm
+++ b/code/game/objects/items/cigs_lighters.dm
@@ -519,7 +519,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
smoketime = 0
chem_volume = 100
list_reagents = null
- var/packeditem = 0
+ var/packeditem = FALSE
/obj/item/clothing/mask/cigarette/pipe/Initialize()
. = ..()
@@ -537,11 +537,11 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(ismob(loc))
var/mob/living/M = loc
to_chat(M, "Your [name] goes out.")
- lit = 0
+ lit = FALSE
icon_state = icon_off
inhand_icon_state = icon_off
M.update_inv_wear_mask()
- packeditem = 0
+ packeditem = FALSE
name = "empty [initial(name)]"
STOP_PROCESSING(SSobj, src)
return
@@ -557,7 +557,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(G.dry == 1)
to_chat(user, "You stuff [O] into [src].")
smoketime = 400
- packeditem = 1
+ packeditem = TRUE
name = "[O.name]-packed [initial(name)]"
if(O.reagents)
O.reagents.trans_to(src, O.reagents.total_volume, transfered_by = user)
@@ -580,7 +580,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/turf/location = get_turf(user)
if(lit)
user.visible_message("[user] puts out [src].", "You put out [src].")
- lit = 0
+ lit = FALSE
icon_state = icon_off
inhand_icon_state = icon_off
STOP_PROCESSING(SSobj, src)
@@ -588,7 +588,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(!lit && smoketime > 0)
to_chat(user, "You empty [src] onto [location].")
new /obj/effect/decal/cleanable/ash(location)
- packeditem = 0
+ packeditem = FALSE
smoketime = 0
reagents.clear_reagents()
name = "empty [initial(name)]"
@@ -626,7 +626,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
light_power = 0.6
light_color = LIGHT_COLOR_FIRE
light_on = FALSE
- var/lit = 0
+ var/lit = FALSE
var/fancy = TRUE
var/overlay_state
var/overlay_list = list(
@@ -849,8 +849,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
w_class = WEIGHT_CLASS_TINY
var/chem_volume = 100
var/vapetime = 0 //this so it won't puff out clouds every tick
- var/screw = 0 // kinky
- var/super = 0 //for the fattest vapes dude.
+ var/screw = FALSE // kinky
+ var/super = FALSE //for the fattest vapes dude.
/obj/item/clothing/mask/vape/suicide_act(mob/user)
user.visible_message("[user] is puffin hard on dat vape, [user.p_they()] trying to join the vape life on a whole notha plane!")//it doesn't give you cancer, it is cancer
@@ -888,12 +888,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(screw && !(obj_flags & EMAGGED))//also kinky
if(!super)
cut_overlays()
- super = 1
+ super = TRUE
to_chat(user, "You increase the voltage of [src].")
add_overlay("vapeopen_med")
else
cut_overlays()
- super = 0
+ super = FALSE
to_chat(user, "You decrease the voltage of [src].")
add_overlay("vapeopen_low")
@@ -908,7 +908,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(!(obj_flags & EMAGGED))
cut_overlays()
obj_flags |= EMAGGED
- super = 0
+ super = FALSE
to_chat(user, "You maximize the voltage of [src].")
add_overlay("vapeopen_high")
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread //for effect
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index 31702bffe7a..5bc04648583 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -1,3 +1,5 @@
+#define DARK_COLOR_LIGHTNESS_THRESHOLD 0.25
+
#define RANDOM_GRAFFITI "Random Graffiti"
#define RANDOM_LETTER "Random Letter"
#define RANDOM_PUNCTUATION "Random Punctuation"
@@ -730,13 +732,18 @@
return
- if(istype(target, /obj/structure/window))
+ if(isobj(target) && !(target.flags_1 & UNPAINTABLE_1))
if(actually_paints)
+ var/list/rgb = hex2rgb(paint_color)
+ var/list/hsl = rgb2hsl(rgb[1], rgb[2], rgb[3])
+ var/color_is_dark = hsl[3] < DARK_COLOR_LIGHTNESS_THRESHOLD
+
+ if (color_is_dark && !(target.flags_1 & ALLOW_DARK_PAINTS_1))
+ to_chat(user, "A color that dark on an object like this? Surely not...")
+ return FALSE
+
target.add_atom_colour(paint_color, WASHABLE_COLOUR_PRIORITY)
- if(color_hex2num(paint_color) < 255)
- target.set_opacity(255)
- else
- target.set_opacity(initial(target.opacity))
+ SEND_SIGNAL(target, COMSIG_OBJ_PAINTED, color_is_dark)
. = use_charges(user, 2)
reagents.trans_to(target, ., volume_multiplier, transfered_by = user, methods = VAPOR)
@@ -829,6 +836,7 @@
charges = -1
desc = "Now with 30% more bluespace technology."
+#undef DARK_COLOR_LIGHTNESS_THRESHOLD
#undef RANDOM_GRAFFITI
#undef RANDOM_LETTER
#undef RANDOM_PUNCTUATION
diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm
index fe2de57337d..49d1e5fc838 100644
--- a/code/game/objects/items/devices/camera_bug.dm
+++ b/code/game/objects/items/devices/camera_bug.dm
@@ -62,15 +62,15 @@
/obj/item/camera_bug/check_eye(mob/user)
if ( loc != user || user.incapacitated() || user.is_blind() || !current )
user.unset_machine()
- return 0
+ return FALSE
var/turf/T_user = get_turf(user.loc)
var/turf/T_current = get_turf(current)
if(T_user.z != T_current.z || !current.can_use())
to_chat(user, "[src] has lost the signal.")
current = null
user.unset_machine()
- return 0
- return 1
+ return FALSE
+ return TRUE
/obj/item/camera_bug/on_unset_machine(mob/user)
user.reset_perspective(null)
@@ -163,7 +163,7 @@
dat += " (Stage [stage])"
dat += " \[Track\]
"
- for(var/obj/mecha/M in seen)
+ for(var/obj/vehicle/sealed/mecha/M in seen)
if(M.name in names)
names[M.name]++
dat += "[M.name] ([names[M.name]])"
diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm
index 48e6d58d48a..1425adc6041 100644
--- a/code/game/objects/items/devices/geiger_counter.dm
+++ b/code/game/objects/items/devices/geiger_counter.dm
@@ -161,15 +161,15 @@
if(I.tool_behaviour == TOOL_SCREWDRIVER && (obj_flags & EMAGGED))
if(scanning)
to_chat(user, "Turn off [src] before you perform this action!")
- return 0
+ return FALSE
user.visible_message("[user] unscrews [src]'s maintenance panel and begins fiddling with its innards...", "You begin resetting [src]...")
if(!I.use_tool(src, user, 40, volume=50))
- return 0
+ return FALSE
user.visible_message("[user] refastens [src]'s maintenance panel!", "You reset [src] to its factory settings!")
obj_flags &= ~EMAGGED
radiation_count = 0
update_icon()
- return 1
+ return TRUE
else
return ..()
@@ -178,7 +178,7 @@
return ..()
if(!scanning)
to_chat(usr, "[src] must be on to reset its radiation level!")
- return 0
+ return
radiation_count = 0
to_chat(usr, "You flush [src]'s radiation counts, resetting it to normal.")
update_icon()
@@ -188,7 +188,7 @@
return
if(scanning)
to_chat(user, "Turn off [src] before you perform this action!")
- return 0
+ return
to_chat(user, "You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.")
obj_flags |= EMAGGED
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 797168179e3..b7656dd7dff 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -409,7 +409,7 @@ GENE SCANNER
if(M.reagents.reagent_list.len)
render_list += "Subject contains the following reagents:\n"
for(var/datum/reagent/R in M.reagents.reagent_list)
- render_list += "[round(R.volume, 0.001)] units of [R.name][R.overdosed == 1 ? " - OVERDOSING" : "."]\n"
+ render_list += "[round(R.volume, 0.001)] units of [R.name][R.overdosed ? " - OVERDOSING" : "."]\n"
else
render_list += "Subject contains no reagents.\n"
if(M.reagents.addiction_list.len)
diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm
index 3c4c856eaf1..2301a5516d9 100644
--- a/code/game/objects/items/devices/taperecorder.dm
+++ b/code/game/objects/items/devices/taperecorder.dm
@@ -13,13 +13,13 @@
custom_materials = list(/datum/material/iron=60, /datum/material/glass=30)
force = 2
throwforce = 0
- var/recording = 0
- var/playing = 0
+ var/recording = FALSE
+ var/playing = FALSE
var/playsleepseconds = 0
var/obj/item/tape/mytape
var/starting_tape_type = /obj/item/tape/random
- var/open_panel = 0
- var/canprint = 1
+ var/open_panel = FALSE
+ var/canprint = TRUE
var/list/icons_available = list()
var/icon_directory = 'icons/effects/icons.dmi'
@@ -47,13 +47,13 @@
else
if(!playing)
icons_available += list("Record" = image(icon = icon_directory, icon_state = "record"))
-
+
if(playing)
icons_available += list("Pause" = image(icon = icon_directory, icon_state = "pause"))
else
if(!recording)
icons_available += list("Play" = image(icon = icon_directory, icon_state = "play"))
-
+
if(canprint && !recording && !playing)
icons_available += list("Print Transcript" = image(icon = icon_directory, icon_state = "print"))
if(mytape)
@@ -147,7 +147,7 @@
mytape.used_capacity++
used++
sleep(10)
- recording = 0
+ recording = FALSE
update_icon()
else
to_chat(usr, "The tape is full.")
@@ -161,13 +161,13 @@
return
if(recording)
- recording = 0
+ recording = FALSE
mytape.timestamp += mytape.used_capacity
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording stopped."
to_chat(usr, "Recording stopped.")
return
else if(playing)
- playing = 0
+ playing = FALSE
var/turf/T = get_turf(src)
T.visible_message("Tape Recorder: Playback stopped.")
update_icon()
@@ -194,7 +194,7 @@
for(var/i = 1, used < max, sleep(10 * playsleepseconds))
if(!mytape)
break
- if(playing == 0)
+ if(playing == FALSE)
break
if(mytape.storedinfo.len < i)
break
@@ -211,7 +211,7 @@
playsleepseconds = 1
i++
- playing = 0
+ playing = FALSE
update_icon()
@@ -222,7 +222,7 @@
if(mytape.ruined)
to_chat(user, "The tape inside the [src] appears to be broken.")
return
-
+
update_available_icons()
if(icons_available)
var/selection = show_radial_menu(user, src, icons_available, radius = 38, require_near = TRUE, tooltips = TRUE)
@@ -289,7 +289,7 @@
var/used_capacity = 0
var/list/storedinfo = list()
var/list/timestamp = list()
- var/ruined = 0
+ var/ruined = FALSE
/obj/item/tape/fire_act(exposed_temperature, exposed_volume)
ruin()
@@ -306,12 +306,12 @@
//repeatedly
if(!ruined)
add_overlay("ribbonoverlay")
- ruined = 1
+ ruined = TRUE
/obj/item/tape/proc/fix()
cut_overlay("ribbonoverlay")
- ruined = 0
+ ruined = FALSE
/obj/item/tape/attackby(obj/item/I, mob/user, params)
diff --git a/code/game/objects/items/extinguisher.dm b/code/game/objects/items/extinguisher.dm
index b0a55aa5bb1..b5bc00308c5 100644
--- a/code/game/objects/items/extinguisher.dm
+++ b/code/game/objects/items/extinguisher.dm
@@ -108,7 +108,7 @@
if(reagents.total_volume == reagents.maximum_volume)
to_chat(user, "\The [src] is already full!")
safety = safety_save
- return 1
+ return TRUE
var/obj/structure/reagent_dispensers/W = target //will it work?
var/transferred = W.reagents.trans_to(src, max_water, transfered_by = user)
if(transferred > 0)
@@ -119,9 +119,9 @@
else
to_chat(user, "\The [W] is empty!")
safety = safety_save
- return 1
+ return TRUE
else
- return 0
+ return FALSE
/obj/item/extinguisher/afterattack(atom/target, mob/user , flag)
. = ..()
diff --git a/code/game/objects/items/food/burgers.dm b/code/game/objects/items/food/burgers.dm
new file mode 100644
index 00000000000..3a68ccd05db
--- /dev/null
+++ b/code/game/objects/items/food/burgers.dm
@@ -0,0 +1,368 @@
+/obj/item/food/burger
+ icon = 'icons/obj/food/burgerbread.dmi'
+ icon_state = "hburger"
+ bite_consumption = 3
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 1)
+ tastes = list("bun" = 2, "beef patty" = 4)
+ foodtypes = GRAIN | MEAT //lettuce doesn't make burger a vegetable.
+ eat_time = 15 //Quick snack
+
+/obj/item/food/burger/plain
+ name = "burger"
+ desc = "The cornerstone of every nutritious breakfast."
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 6, /datum/reagent/consumable/nutriment/vitamin = 1)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/plain/Initialize()
+ . = ..()
+ if(prob(1))
+ new/obj/effect/particle_effect/smoke(get_turf(src))
+ playsound(src, 'sound/effects/smoke.ogg', 50, TRUE)
+ visible_message("Oh, ye gods! [src] is ruined! But what if...?")
+ name = "steamed ham"
+ desc = pick("Ahh, Head of Personnel, welcome. I hope you're prepared for an unforgettable luncheon!",
+ "And you call these steamed hams despite the fact that they are obviously microwaved?",
+ "Aurora Station 13? At this time of shift, in this time of year, in this sector of space, localized entirely within your freezer?",
+ "You know, these hamburgers taste quite similar to the ones they have at the Maltese Falcon.")
+
+/obj/item/food/burger/human
+ name = "human burger"
+ desc = "A bloody burger."
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 6, /datum/reagent/consumable/nutriment/vitamin = 5)
+ tastes = list("bun" = 2, "long pig" = 4)
+ foodtypes = MEAT | GRAIN | GROSS
+ var/subjectname = ""
+ var/subjectjob = null
+
+/obj/item/food/burger/human/CheckParts(list/parts_list)
+ ..()
+ var/obj/item/reagent_containers/food/snacks/meat/M = locate(/obj/item/reagent_containers/food/snacks/meat/steak/plain/human) in contents
+ if(M)
+ subjectname = M.subjectname
+ subjectjob = M.subjectjob
+ if(subjectname)
+ name = "[subjectname] burger"
+ else if(subjectjob)
+ name = "[subjectjob] burger"
+ qdel(M)
+
+
+/obj/item/food/burger/corgi
+ name = "corgi burger"
+ desc = "You monster."
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 6, /datum/reagent/consumable/nutriment/vitamin = 6)
+ foodtypes = GRAIN | MEAT | GROSS
+
+/obj/item/food/burger/appendix
+ name = "appendix burger"
+ desc = "Tastes like appendicitis."
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 11, /datum/reagent/consumable/nutriment/vitamin = 7)
+ icon_state = "appendixburger"
+ tastes = list("bun" = 4, "grass" = 2)
+ foodtypes = GRAIN | MEAT | GROSS
+
+/obj/item/food/burger/fish
+ name = "fillet -o- carp sandwich"
+ desc = "Almost like a carp is yelling somewhere... Give me back that fillet -o- carp, give me that carp."
+ icon_state = "fishburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 3, /datum/reagent/consumable/nutriment/protein = 7, /datum/reagent/consumable/nutriment/vitamin = 4)
+ tastes = list("bun" = 4, "fish" = 4)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/tofu
+ name = "tofu burger"
+ desc = "What.. is that meat?"
+ icon_state = "tofuburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 3, /datum/reagent/consumable/nutriment/protein = 6, /datum/reagent/consumable/nutriment/vitamin = 3)
+ tastes = list("bun" = 4, "tofu" = 4)
+ foodtypes = GRAIN | VEGETABLES
+
+/obj/item/food/burger/roburger
+ name = "roburger"
+ desc = "The lettuce is the only organic component. Beep."
+ icon_state = "roburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 8, /datum/reagent/nanomachines = 7, /datum/reagent/consumable/nutriment/vitamin = 6)
+ tastes = list("bun" = 4, "lettuce" = 2, "sludge" = 1)
+ foodtypes = GRAIN | TOXIC
+
+/obj/item/food/burger/roburgerbig
+ name = "roburger"
+ desc = "This massive patty looks like poison. Beep."
+ icon_state = "roburger"
+ max_volume = 120
+ food_reagents = list(/datum/reagent/consumable/nutriment = 11, /datum/reagent/nanomachines = 140, /datum/reagent/consumable/nutriment/vitamin = 15)
+ tastes = list("bun" = 4, "lettuce" = 2, "sludge" = 1)
+ foodtypes = GRAIN | TOXIC
+
+/obj/item/food/burger/xeno
+ name = "xenoburger"
+ desc = "Smells caustic. Tastes like heresy."
+ icon_state = "xburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 3, /datum/reagent/consumable/nutriment/protein = 9, /datum/reagent/consumable/nutriment/vitamin = 7)
+ tastes = list("bun" = 4, "acid" = 4)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/bearger
+ name = "bearger"
+ desc = "Best served rawr."
+ icon_state = "bearger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 3, /datum/reagent/consumable/nutriment/protein = 8, /datum/reagent/consumable/nutriment/vitamin = 7)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/clown
+ name = "clown burger"
+ desc = "This tastes funny..."
+ icon_state = "clownburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 4, /datum/reagent/consumable/nutriment/protein = 12, /datum/reagent/medicine/mannitol = 11, /datum/reagent/consumable/nutriment/vitamin = 6)
+ foodtypes = GRAIN | FRUIT
+
+/obj/item/food/burger/mime
+ name = "mime burger"
+ desc = "Its taste defies language."
+ icon_state = "mimeburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 6, /datum/reagent/consumable/nutriment/protein = 11, /datum/reagent/consumable/nutriment/vitamin = 7, /datum/reagent/consumable/nothing = 6)
+ foodtypes = GRAIN
+
+/obj/item/food/burger/brain
+ name = "brainburger"
+ desc = "A strange looking burger. It looks almost sentient."
+ icon_state = "brainburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 12, /datum/reagent/medicine/mannitol = 11, /datum/reagent/consumable/nutriment/vitamin = 6)
+ tastes = list("bun" = 4, "brains" = 2)
+ foodtypes = GRAIN | MEAT | GROSS
+
+/obj/item/food/burger/ghost
+ name = "ghost burger"
+ desc = "Too Spooky!"
+ icon_state = "ghostburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 7, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 13, /datum/reagent/consumable/sodiumchloride = 5)
+ tastes = list("bun" = 2, "ectoplasm" = 4)
+ foodtypes = GRAIN
+ alpha = 170
+ verb_say = "moans"
+ verb_yell = "wails"
+
+/obj/item/food/burger/ghost/Initialize()
+ . = ..()
+ START_PROCESSING(SSobj, src)
+
+/obj/item/food/burger/ghost/process()
+ if(!isturf(loc)) //no floating out of bags
+ return
+ var/paranormal_activity = rand(100)
+ switch(paranormal_activity)
+ if(97 to 100)
+ audible_message("[src] rattles a length of chain.")
+ playsound(loc,'sound/spookoween/chain_rattling.ogg', 300, TRUE)
+ if(91 to 96)
+ say(pick("OoOoOoo.", "OoooOOooOoo!!"))
+ if(84 to 90)
+ dir = pick(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
+ step(src, dir)
+ if(71 to 83)
+ step(src, dir)
+ if(65 to 70)
+ var/obj/machinery/light/L = locate(/obj/machinery/light) in view(4, src)
+ if(L)
+ L.flicker()
+ if(62 to 64)
+ playsound(loc,pick('sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg'), 50, TRUE, ignore_walls = FALSE)
+ if(61)
+ visible_message("[src] spews out a glob of ectoplasm!")
+ new /obj/effect/decal/cleanable/greenglow/ecto(loc)
+ playsound(loc,'sound/effects/splat.ogg', 200, TRUE)
+
+ //If i was less lazy i would make the burger forcefeed itself to a nearby mob here.
+
+/obj/item/food/burger/ghost/Destroy()
+ STOP_PROCESSING(SSobj, src)
+ . = ..()
+
+/obj/item/food/burger/red
+ name = "red burger"
+ desc = "Perfect for hiding the fact it's burnt to a crisp."
+ icon_state = "cburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 6, /datum/reagent/colorful_reagent/powder/red = 10)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/orange
+ name = "orange burger"
+ desc = "Contains 0% juice."
+ icon_state = "cburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 6, /datum/reagent/colorful_reagent/powder/orange = 10)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/yellow
+ name = "yellow burger"
+ desc = "Bright to the last bite."
+ icon_state = "cburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 6, /datum/reagent/colorful_reagent/powder/yellow = 10)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/green
+ name = "green burger"
+ desc = "It's not tainted meat, it's painted meat!"
+ icon_state = "cburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 6, /datum/reagent/colorful_reagent/powder/green = 10)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/blue
+ name = "blue burger"
+ desc = "Is this blue rare?"
+ icon_state = "cburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 6, /datum/reagent/colorful_reagent/powder/blue = 10)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/purple
+ name = "purple burger"
+ desc = "Regal and low class at the same time."
+ icon_state = "cburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 6, /datum/reagent/colorful_reagent/powder/purple = 10)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/black
+ name = "black burger"
+ desc = "This is overcooked."
+ icon_state = "cburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 6, /datum/reagent/colorful_reagent/powder/black = 10)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/white
+ name = "white burger"
+ desc = "Delicous Titanium!"
+ icon_state = "cburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 6, /datum/reagent/colorful_reagent/powder/white = 10)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/spell
+ name = "spell burger"
+ desc = "This is absolutely Ei Nath."
+ icon_state = "spellburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 8, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 11)
+ tastes = list("bun" = 4, "magic" = 2)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/bigbite
+ name = "big bite burger"
+ desc = "Forget the Big Mac. THIS is the future!"
+ icon_state = "bigbiteburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 4, /datum/reagent/consumable/nutriment/protein = 11, /datum/reagent/consumable/nutriment/vitamin = 7)
+ w_class = WEIGHT_CLASS_NORMAL
+ foodtypes = GRAIN | MEAT | DAIRY
+
+/obj/item/food/burger/jelly
+ name = "jelly burger"
+ desc = "Culinary delight..?"
+ icon_state = "jellyburger"
+ tastes = list("bun" = 4, "jelly" = 2)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/jelly/slime
+ food_reagents = list(/datum/reagent/consumable/nutriment = 6, /datum/reagent/toxin/slimejelly = 10, /datum/reagent/consumable/nutriment/vitamin = 6)
+ foodtypes = GRAIN | TOXIC
+
+/obj/item/food/burger/jelly/cherry
+ food_reagents = list(/datum/reagent/consumable/nutriment = 6, /datum/reagent/consumable/cherryjelly = 10, /datum/reagent/consumable/nutriment/vitamin = 6)
+ foodtypes = GRAIN | FRUIT
+
+/obj/item/food/burger/superbite
+ name = "super bite burger"
+ desc = "This is a mountain of a burger. FOOD!"
+ icon_state = "superbiteburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 25, /datum/reagent/consumable/nutriment/protein = 42, /datum/reagent/consumable/nutriment/vitamin = 15)
+ w_class = WEIGHT_CLASS_NORMAL
+ bite_consumption = 7
+ max_volume = 100
+ tastes = list("bun" = 4, "type two diabetes" = 10)
+ foodtypes = GRAIN | MEAT | DAIRY
+
+/obj/item/food/burger/fivealarm
+ name = "five alarm burger"
+ desc = "HOT! HOT!"
+ icon_state = "fivealarmburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 4, /datum/reagent/consumable/nutriment/protein = 7, /datum/reagent/consumable/capsaicin = 5, /datum/reagent/consumable/condensedcapsaicin = 5, /datum/reagent/consumable/nutriment/vitamin = 6)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/rat
+ name = "rat burger"
+ desc = "Pretty much what you'd expect..."
+ icon_state = "ratburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 3, /datum/reagent/consumable/nutriment/protein = 7, /datum/reagent/consumable/nutriment/vitamin = 2)
+ foodtypes = GRAIN | MEAT | GROSS
+
+/obj/item/food/burger/baseball
+ name = "home run baseball burger"
+ desc = "It's still warm. The steam coming off of it looks like baseball."
+ icon_state = "baseball"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 3, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 2)
+ foodtypes = GRAIN | GROSS
+
+/obj/item/food/burger/baconburger
+ name = "bacon burger"
+ desc = "The perfect combination of all things American."
+ icon_state = "baconburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 3, /datum/reagent/consumable/nutriment/protein = 11, /datum/reagent/consumable/nutriment/vitamin = 2)
+ tastes = list("bacon" = 4, "bun" = 2)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/empoweredburger
+ name = "empowered burger"
+ desc = "It's shockingly good, if you live off of electricity that is."
+ icon_state = "empoweredburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 10, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 1, /datum/reagent/consumable/liquidelectricity = 5)
+ tastes = list("bun" = 2, "pure electricity" = 4)
+ foodtypes = GRAIN | TOXIC
+
+/obj/item/food/burger/crab
+ name = "crab burger"
+ desc = "A delicious patty of the crabby kind, slapped in between a bun."
+ icon_state = "crabburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 4, /datum/reagent/consumable/nutriment/protein = 7, /datum/reagent/consumable/nutriment/vitamin = 4)
+ tastes = list("bun" = 2, "crab meat" = 4)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/soylent
+ name = "soylent burger"
+ desc = "An eco-friendly burger made using upcycled low value biomass."
+ icon_state = "soylentburger"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 4, /datum/reagent/consumable/nutriment/protein = 9, /datum/reagent/consumable/nutriment/vitamin = 4)
+ tastes = list("bun" = 2, "assistant" = 4)
+ foodtypes = GRAIN | MEAT | DAIRY
+
+/obj/item/food/burger/rib
+ name = "mcrib"
+ desc = "An elusive rib shaped burger with limited availablity across the galaxy. Not as good as you remember it."
+ icon_state = "mcrib"
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 7, /datum/reagent/consumable/nutriment/vitamin = 4, /datum/reagent/consumable/bbqsauce = 1)
+ tastes = list("bun" = 2, "pork patty" = 4)
+ foodtypes = GRAIN | MEAT
+
+/obj/item/food/burger/mcguffin
+ name = "mcguffin"
+ desc = "A cheap and greasy imitation of an eggs benedict."
+ icon_state = "mcguffin"
+ tastes = list("muffin" = 2, "bacon" = 3)
+ food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/eggyolk = 3, /datum/reagent/consumable/nutriment/protein = 7, /datum/reagent/consumable/nutriment/vitamin = 1)
+ foodtypes = GRAIN | MEAT | BREAKFAST
+
+/obj/item/food/burger/chicken
+ name = "chicken sandwich" //Apparently the proud people of Americlapstan object to this thing being called a burger. Apparently McDonald's just calls it a burger in Europe as to not scare and confuse us.
+ desc = "A delicious chicken sandwich, it is said the proceeds from this treat helps criminalize disarming people on the space frontier."
+ icon_state = "chickenburger"
+ tastes = list("bun" = 2, "chicken" = 4, "God's covenant" = 1)
+ food_reagents = list(/datum/reagent/consumable/nutriment = 3, /datum/reagent/consumable/mayonnaise = 3, /datum/reagent/consumable/nutriment/protein = 7, /datum/reagent/consumable/nutriment/vitamin = 1, /datum/reagent/consumable/cooking_oil = 2)
+ foodtypes = GRAIN | MEAT | FRIED
+
+/obj/item/food/burger/cheese
+ name = "cheese burger"
+ desc = "This noble burger stands proudly clad in golden cheese."
+ icon_state = "cheeseburger"
+ tastes = list("bun" = 2, "beef patty" = 4, "cheese" = 3)
+ food_reagents = list(/datum/reagent/consumable/nutriment = 3, /datum/reagent/consumable/nutriment/protein = 7, /datum/reagent/consumable/nutriment/vitamin = 2)
+ foodtypes = GRAIN | MEAT | DAIRY
+
+/obj/item/food/burger/cheese/Initialize()
+ . = ..()
+ if(prob(33))
+ icon_state = "cheeseburgeralt"
+
diff --git a/code/game/objects/items/grenades/ghettobomb.dm b/code/game/objects/items/grenades/ghettobomb.dm
index 80b820d6672..cc0d7e335a6 100644
--- a/code/game/objects/items/grenades/ghettobomb.dm
+++ b/code/game/objects/items/grenades/ghettobomb.dm
@@ -13,7 +13,7 @@
throw_range = 7
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BELT
- active = 0
+ active = FALSE
det_time = 50
display_timer = 0
var/check_parts = FALSE
diff --git a/code/game/objects/items/implants/implant_chem.dm b/code/game/objects/items/implants/implant_chem.dm
index a7f98646d2f..44900a56739 100644
--- a/code/game/objects/items/implants/implant_chem.dm
+++ b/code/game/objects/items/implants/implant_chem.dm
@@ -38,7 +38,7 @@
/obj/item/implant/chem/activate(cause)
. = ..()
if(!cause || !imp_in)
- return 0
+ return
var/mob/living/carbon/R = imp_in
var/injectamount = null
if (cause == "action_button")
diff --git a/code/game/objects/items/implants/implant_mindshield.dm b/code/game/objects/items/implants/implant_mindshield.dm
index 78732e7e944..163940267c0 100644
--- a/code/game/objects/items/implants/implant_mindshield.dm
+++ b/code/game/objects/items/implants/implant_mindshield.dm
@@ -59,8 +59,8 @@
L.sec_hud_set_implants()
if(target.stat != DEAD && !silent)
to_chat(target, "Your mind suddenly feels terribly vulnerable. You are no longer safe from brainwashing.")
- return 1
- return 0
+ return TRUE
+ return FALSE
/obj/item/implanter/mindshield
name = "implanter (mindshield)"
diff --git a/code/game/objects/items/implants/implant_misc.dm b/code/game/objects/items/implants/implant_misc.dm
index 87c11c54507..09f910f8c04 100644
--- a/code/game/objects/items/implants/implant_misc.dm
+++ b/code/game/objects/items/implants/implant_misc.dm
@@ -2,7 +2,7 @@
name = "firearms authentication implant"
desc = "Lets you shoot your guns."
icon_state = "auth"
- activated = 0
+ activated = FALSE
/obj/item/implant/weapons_auth/get_data()
var/dat = {"Implant Specifications:
@@ -67,7 +67,7 @@
/obj/item/implant/health
name = "health implant"
- activated = 0
+ activated = FALSE
var/healthstring = ""
/obj/item/implant/health/proc/sensehealth()
diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm
index 193049d998a..2d0b25b9585 100644
--- a/code/game/objects/items/implants/implantchair.dm
+++ b/code/game/objects/items/implants/implantchair.dm
@@ -164,11 +164,11 @@
/obj/machinery/implantchair/genepurge/implant_action(mob/living/carbon/human/H,mob/user)
if(!istype(H))
- return 0
+ return FALSE
H.set_species(/datum/species/human, 1)//lizards go home
purrbation_remove(H)//remove cats
H.dna.remove_all_mutations()//hulks out
- return 1
+ return TRUE
/obj/machinery/implantchair/brainwash
diff --git a/code/game/objects/items/mop.dm b/code/game/objects/items/mop.dm
index 540e6bf33e2..51b3af2c794 100644
--- a/code/game/objects/items/mop.dm
+++ b/code/game/objects/items/mop.dm
@@ -13,7 +13,6 @@
attack_verb_continuous = list("mops", "bashes", "bludgeons", "whacks")
attack_verb_simple = list("mop", "bash", "bludgeon", "whack")
resistance_flags = FLAMMABLE
- var/mopping = 0
var/mopcount = 0
var/mopcap = 15
var/mopspeed = 15
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index 1e6360c7dd7..4cbea15b7bb 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -256,8 +256,8 @@
if(!O)
return
if(M.laws && M.laws.id != DEFAULT_AI_LAWID)
- aisync = 0
- lawsync = 0
+ aisync = FALSE
+ lawsync = FALSE
O.laws = M.laws
M.laws.associate(O)
@@ -266,14 +266,14 @@
O.custom_name = created_name
O.locked = panel_locked
if(!aisync)
- lawsync = 0
- O.connected_ai = null
+ lawsync = FALSE
+ O.set_connected_ai(null)
else
O.notify_ai(NEW_BORG)
if(forced_ai)
- O.connected_ai = forced_ai
+ O.set_connected_ai(forced_ai)
if(!lawsync)
- O.lawupdate = 0
+ O.lawupdate = FALSE
if(M.laws.id == DEFAULT_AI_LAWID)
O.make_laws()
@@ -324,10 +324,10 @@
if(!aisync)
lawsync = FALSE
- O.connected_ai = null
+ O.set_connected_ai(null)
else
if(forced_ai)
- O.connected_ai = forced_ai
+ O.set_connected_ai(forced_ai)
O.notify_ai(AI_SHELL)
if(!lawsync)
O.lawupdate = FALSE
diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm
index 2c7758db401..365289345ec 100644
--- a/code/game/objects/items/stacks/rods.dm
+++ b/code/game/objects/items/stacks/rods.dm
@@ -1,8 +1,8 @@
GLOBAL_LIST_INIT(rod_recipes, list ( \
new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = TRUE, on_floor = FALSE), \
- new/datum/stack_recipe("table frame", /obj/structure/table_frame, 2, time = 10, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("scooter frame", /obj/item/scooter_frame, 10, time = 25, one_per_turf = 0), \
- new/datum/stack_recipe("linen bin", /obj/structure/bedsheetbin/empty, 2, time = 5, one_per_turf = 0), \
+ new/datum/stack_recipe("table frame", /obj/structure/table_frame, 2, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
+ new/datum/stack_recipe("scooter frame", /obj/item/scooter_frame, 10, time = 25, one_per_turf = FALSE), \
+ new/datum/stack_recipe("linen bin", /obj/structure/bedsheetbin/empty, 2, time = 5, one_per_turf = FALSE), \
new/datum/stack_recipe("railing", /obj/structure/railing, 3, time = 18, window_checks = TRUE), \
))
diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm
index 0b1d542b920..2a93b59f0ae 100644
--- a/code/game/objects/items/stacks/sheets/mineral.dm
+++ b/code/game/objects/items/stacks/sheets/mineral.dm
@@ -24,10 +24,10 @@ Mineral Sheets
*/
GLOBAL_LIST_INIT(sandstone_recipes, list ( \
- new/datum/stack_recipe("pile of dirt", /obj/machinery/hydroponics/soil, 3, time = 10, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("Assistant Statue", /obj/structure/statue/sandstone/assistant, 5, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("Breakdown into sand", /obj/item/stack/ore/glass, 1, one_per_turf = 0, on_floor = 1) \
+ new/datum/stack_recipe("pile of dirt", /obj/machinery/hydroponics/soil, 3, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
+ new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = TRUE, on_floor = TRUE), \
+ new/datum/stack_recipe("Assistant Statue", /obj/structure/statue/sandstone/assistant, 5, one_per_turf = TRUE, on_floor = TRUE), \
+ new/datum/stack_recipe("Breakdown into sand", /obj/item/stack/ore/glass, 1, one_per_turf = FALSE, on_floor = TRUE) \
))
/obj/item/stack/sheet/mineral/sandstone
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 2a9ec5cf4b8..376c424e7f4 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -84,7 +84,7 @@
update_icon()
/obj/item/stack/proc/get_main_recipes()
- SHOULD_CALL_PARENT(1)
+ SHOULD_CALL_PARENT(TRUE)
return list()//empty list
/obj/item/stack/proc/update_weight()
@@ -369,8 +369,8 @@
return source.energy < cost
if(amount < 1)
qdel(src)
- return 1
- return 0
+ return TRUE
+ return FALSE
/obj/item/stack/proc/add(amount)
if (is_cyborg)
diff --git a/code/game/objects/items/stacks/wrap.dm b/code/game/objects/items/stacks/wrap.dm
index 40f3d8f2922..d673021ee11 100644
--- a/code/game/objects/items/stacks/wrap.dm
+++ b/code/game/objects/items/stacks/wrap.dm
@@ -53,16 +53,16 @@
return SHAME
/obj/item/proc/can_be_package_wrapped() //can the item be wrapped with package wrapper into a delivery package
- return 1
+ return TRUE
/obj/item/storage/can_be_package_wrapped()
- return 0
+ return FALSE
/obj/item/storage/box/can_be_package_wrapped()
- return 1
+ return TRUE
/obj/item/small_delivery/can_be_package_wrapped()
- return 0
+ return FALSE
/obj/item/stack/package_wrap/afterattack(obj/target, mob/user, proximity)
. = ..()
diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm
index d848e06749c..15384d70145 100644
--- a/code/game/objects/items/storage/book.dm
+++ b/code/game/objects/items/storage/book.dm
@@ -158,7 +158,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning",
if (!heal_mode)
return ..()
- var/smack = 1
+ var/smack = TRUE
if (M.stat != DEAD)
if(chaplain && user == M)
@@ -166,7 +166,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning",
return
if(prob(60) && bless(M, user))
- smack = 0
+ smack = FALSE
else if(iscarbon(M))
var/mob/living/carbon/C = M
if(!istype(C.head, /obj/item/clothing/head/helmet))
diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm
index 0e1c273fe14..f7bae8b357b 100644
--- a/code/game/objects/items/storage/boxes.dm
+++ b/code/game/objects/items/storage/boxes.dm
@@ -72,7 +72,7 @@
/obj/item/storage/box/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/package_wrap))
- return 0
+ return FALSE
return ..()
//Mime spell boxes
diff --git a/code/game/objects/items/storage/lockbox.dm b/code/game/objects/items/storage/lockbox.dm
index aa02aad30e9..647299ae9d6 100644
--- a/code/game/objects/items/storage/lockbox.dm
+++ b/code/game/objects/items/storage/lockbox.dm
@@ -157,6 +157,16 @@
medalicon.pixel_x += ((i-6)*3)
. += medalicon
+/obj/item/storage/lockbox/medal/hop
+ name = "Head of Personnel medal box"
+ desc = "A locked box used to store medals to be given to those exhibiting excellence in management."
+ req_access = list(ACCESS_HOP)
+
+/obj/item/storage/lockbox/medal/hop/PopulateContents()
+ for(var/i in 1 to 3)
+ new /obj/item/clothing/accessory/medal/silver/bureaucracy(src)
+ new /obj/item/clothing/accessory/medal/gold/ordom(src)
+
/obj/item/storage/lockbox/medal/sec
name = "security medal box"
desc = "A locked box used to store medals to be given to members of the security department."
diff --git a/code/game/objects/items/storage/secure.dm b/code/game/objects/items/storage/secure.dm
index c4df38c4486..67b8000bc05 100644
--- a/code/game/objects/items/storage/secure.dm
+++ b/code/game/objects/items/storage/secure.dm
@@ -17,9 +17,9 @@
var/icon_opened = "secure0"
var/code = ""
var/l_code = null
- var/l_set = 0
- var/l_setshort = 0
- var/l_hacking = 0
+ var/l_set = FALSE
+ var/l_setshort = FALSE
+ var/l_hacking = FALSE
var/open = FALSE
w_class = WEIGHT_CLASS_NORMAL
desc = "This shouldn't exist. If it does, create an issue report."
@@ -44,15 +44,15 @@
if (W.tool_behaviour == TOOL_WIRECUTTER)
to_chat(user, "[src] is protected from this sort of tampering, yet it appears the internal memory wires can still be pulsed.")
if ((W.tool_behaviour == TOOL_MULTITOOL) && (!l_hacking))
- if(open == 1)
+ if(open == TRUE)
to_chat(user, "Now attempting to reset internal memory, please hold.")
- l_hacking = 1
+ l_hacking = TRUE
if (W.use_tool(src, user, 400))
to_chat(user, "Internal memory reset - lock has been disengaged.")
- l_set = 0
- l_hacking = 0
+ l_set = FALSE
+ l_hacking = FALSE
else
- l_hacking = 0
+ l_hacking = FALSE
else
to_chat(user, "You must unscrew the service panel before you can pulse the wiring!")
return
@@ -84,10 +84,10 @@
return
if (href_list["type"])
if (href_list["type"] == "E")
- if ((l_set == 0) && (length(code) == 5) && (!l_setshort) && (code != "ERROR"))
+ if (!l_set && (length(code) == 5) && (!l_setshort) && (code != "ERROR"))
l_code = code
- l_set = 1
- else if ((code == l_code) && (l_set == 1))
+ l_set = TRUE
+ else if ((code == l_code) && l_set)
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE)
cut_overlays()
add_overlay(icon_opened)
diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm
index ce2b709512a..b33ea6bf97f 100644
--- a/code/game/objects/items/tanks/watertank.dm
+++ b/code/game/objects/items/tanks/watertank.dm
@@ -117,7 +117,7 @@
possible_transfer_amounts = list(25,50,100)
volume = 500
item_flags = NOBLUDGEON | ABSTRACT // don't put in storage
- slot_flags = 0
+ slot_flags = NONE
var/obj/item/watertank/tank
diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm
index d9b6d1d7922..a200e63a17b 100644
--- a/code/game/objects/items/tools/weldingtool.dm
+++ b/code/game/objects/items/tools/weldingtool.dm
@@ -213,8 +213,8 @@
set_light_on(FALSE)
switched_on(user)
update_icon()
- return 0
- return 1
+ return FALSE
+ return TRUE
//Switches the welder on
/obj/item/weldingtool/proc/switched_on(mob/user)
@@ -336,7 +336,7 @@
max_fuel = 10
w_class = WEIGHT_CLASS_TINY
custom_materials = list(/datum/material/iron=30, /datum/material/glass=10)
- change_icons = 0
+ change_icons = FALSE
/obj/item/weldingtool/mini/flamethrower_screwdriver()
return
@@ -349,7 +349,7 @@
toolspeed = 0.1
light_system = NO_LIGHT_SUPPORT
light_range = 0
- change_icons = 0
+ change_icons = FALSE
/obj/item/weldingtool/abductor/process()
if(get_fuel() <= max_fuel)
diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm
index 0f60485e4f1..3d12584d25e 100644
--- a/code/game/objects/items/weaponry.dm
+++ b/code/game/objects/items/weaponry.dm
@@ -931,8 +931,8 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
if(attack_type == PROJECTILE_ATTACK)
owner.visible_message("[owner] deflects [attack_text] with [src]!")
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, TRUE)
- return 1
+ return TRUE
else
owner.visible_message("[owner] parries [attack_text] with [src]!")
- return 1
- return 0
+ return TRUE
+ return FALSE
diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm
index 0b97f241df8..9a57ee62856 100644
--- a/code/game/objects/obj_defense.dm
+++ b/code/game/objects/obj_defense.dm
@@ -137,26 +137,6 @@
return
attack_generic(user, rand(10, 15), BRUTE, MELEE, 1)
-/obj/mech_melee_attack(obj/mecha/M)
- M.do_attack_animation(src)
- var/play_soundeffect = 0
- var/mech_damtype = M.damtype
- if(M.selected)
- mech_damtype = M.selected.damtype
- play_soundeffect = 1
- else
- switch(M.damtype)
- if(BRUTE)
- playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
- if(BURN)
- playsound(src, 'sound/items/welder.ogg', 50, TRUE)
- if(TOX)
- playsound(src, 'sound/effects/spray2.ogg', 50, TRUE)
- return 0
- else
- return 0
- M.visible_message("[M.name] hits [src]!", "You hit [src]!", null, COMBAT_MESSAGE_RANGE)
- return take_damage(M.force*3, mech_damtype, MELEE, play_soundeffect, get_dir(src, M)) // multiplied by 3 so we can hit objs hard but not be overpowered against mobs.
/obj/singularity_act()
SSexplosions.high_mov_atom += src
diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm
index 36fd5226951..1885a3da5a1 100644
--- a/code/game/objects/structures/artstuff.dm
+++ b/code/game/objects/structures/artstuff.dm
@@ -40,6 +40,7 @@
desc = "Draw out your soul on this canvas!"
icon = 'icons/obj/artstuff.dmi'
icon_state = "11x11"
+ flags_1 = UNPAINTABLE_1
resistance_flags = FLAMMABLE
var/width = 11
var/height = 11
@@ -220,7 +221,7 @@
desc = "The perfect showcase for your favorite deathtrap memories."
icon = 'icons/obj/decals.dmi'
custom_materials = list(/datum/material/wood = 2000)
- flags_1 = 0
+ flags_1 = NONE
icon_state = "frame-empty"
result_path = /obj/structure/sign/painting
diff --git a/code/game/objects/structures/beds_chairs/bed.dm b/code/game/objects/structures/beds_chairs/bed.dm
index ae0d17c7456..ef079d1270b 100644
--- a/code/game/objects/structures/beds_chairs/bed.dm
+++ b/code/game/objects/structures/beds_chairs/bed.dm
@@ -79,9 +79,9 @@
. = ..()
if(over_object == usr && Adjacent(usr))
if(!ishuman(usr) || !usr.canUseTopic(src, BE_CLOSE))
- return 0
+ return FALSE
if(has_buckled_mobs())
- return 0
+ return FALSE
usr.visible_message("[usr] collapses \the [src.name].", "You collapse \the [src.name].")
var/obj/structure/bed/roller/B = new foldabletype(get_turf(src))
usr.put_in_hands(B)
diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm
index a2182bbb146..d9d9c44915c 100644
--- a/code/game/objects/structures/beds_chairs/chair.dm
+++ b/code/game/objects/structures/beds_chairs/chair.dm
@@ -325,8 +325,8 @@
/obj/item/chair/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(attack_type == UNARMED_ATTACK && prob(hit_reaction_chance))
owner.visible_message("[owner] fends off [attack_text] with [src]!")
- return 1
- return 0
+ return TRUE
+ return FALSE
/obj/item/chair/afterattack(atom/target, mob/living/carbon/user, proximity)
. = ..()
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 3eb02423395..252f6a35454 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -393,8 +393,8 @@
/obj/structure/closet/Exit(atom/movable/AM)
open()
if(AM.loc == src)
- return 0
- return 1
+ return FALSE
+ return TRUE
/obj/structure/closet/container_resist_act(mob/living/user)
if(opened)
diff --git a/code/game/objects/structures/crates_lockers/closets/bodybag.dm b/code/game/objects/structures/crates_lockers/closets/bodybag.dm
index 81cc66b9e7a..2502d6eee8c 100644
--- a/code/game/objects/structures/crates_lockers/closets/bodybag.dm
+++ b/code/game/objects/structures/crates_lockers/closets/bodybag.dm
@@ -18,7 +18,7 @@
drag_slowdown = 0
var/foldedbag_path = /obj/item/bodybag
var/obj/item/bodybag/foldedbag_instance = null
- var/tagged = 0 // so closet code knows to put the tag overlay back
+ var/tagged = FALSE // so closet code knows to put the tag overlay back
/obj/structure/closet/body_bag/Destroy()
// If we have a stored bag, and it's in nullspace (not in someone's hand), delete it.
@@ -38,7 +38,7 @@
return
if(t)
name = "body bag - [t]"
- tagged = 1
+ tagged = TRUE
update_icon()
else
name = "body bag"
@@ -46,7 +46,7 @@
else if(I.tool_behaviour == TOOL_WIRECUTTER)
to_chat(user, "You cut the tag off [src].")
name = "body bag"
- tagged = 0
+ tagged = FALSE
update_icon()
/obj/structure/closet/body_bag/update_overlays()
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
index 0fa45680a68..642a48d0839 100755
--- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
@@ -61,6 +61,8 @@
new /obj/item/door_remote/civilian(src)
new /obj/item/circuitboard/machine/techfab/department/service(src)
new /obj/item/storage/photo_album/hop(src)
+ new /obj/item/storage/lockbox/medal/hop(src)
+
/obj/structure/closet/secure_closet/hos
name = "\proper head of security's locker"
diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm
index 45b73f5caea..68cb6568c52 100644
--- a/code/game/objects/structures/fireaxe.dm
+++ b/code/game/objects/structures/fireaxe.dm
@@ -45,7 +45,7 @@
return
to_chat(user, "You start fixing [src]...")
if(do_after(user, 20, target = src) && G.use(2))
- broken = 0
+ broken = FALSE
obj_integrity = max_integrity
update_icon()
else if(open || broken)
@@ -75,7 +75,7 @@
if(BURN)
playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE)
-/obj/structure/fireaxecabinet/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
+/obj/structure/fireaxecabinet/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = TRUE, attack_dir)
if(open)
return
. = ..()
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index 833cf07cf60..ef878ed4c4b 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -361,7 +361,7 @@
var/obj/item/stack/sheet/runed_metal/R = W
if(R.get_amount() < 1)
to_chat(user, "You need at least one sheet of runed metal to construct a runed wall!")
- return 0
+ return
user.visible_message("[user] begins laying runed metal on [src]...", "You begin constructing a runed wall...")
if(do_after(user, 50, target = src))
if(R.get_amount() < 1)
@@ -428,7 +428,7 @@
var/obj/item/stack/tile/bronze/B = W
if(B.get_amount() < 2)
to_chat(user, "You need at least two bronze sheets to build a bronze wall!")
- return 0
+ return
user.visible_message("[user] begins plating [src] with bronze...", "You begin constructing a bronze wall...")
if(do_after(user, 50, target = src))
if(B.get_amount() < 2)
diff --git a/code/game/objects/structures/guillotine.dm b/code/game/objects/structures/guillotine.dm
index 86a20291725..f4779664e52 100644
--- a/code/game/objects/structures/guillotine.dm
+++ b/code/game/objects/structures/guillotine.dm
@@ -21,7 +21,7 @@
anchored = TRUE
density = TRUE
max_buckled_mobs = 1
- buckle_lying = FALSE
+ buckle_lying = 0
buckle_prevents_pull = TRUE
layer = ABOVE_MOB_LAYER
var/blade_status = GUILLOTINE_BLADE_RAISED
diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm
index eedb3c3b439..9d3aa9c6f4d 100644
--- a/code/game/objects/structures/janicart.dm
+++ b/code/game/objects/structures/janicart.dm
@@ -23,13 +23,13 @@
/obj/structure/janitorialcart/proc/wet_mop(obj/item/mop, mob/user)
if(reagents.total_volume < 1)
to_chat(user, "[src] is out of water!")
- return 0
+ return FALSE
else
var/obj/item/mop/M = mop
reagents.trans_to(mop, M.mopcap, transfered_by = user)
to_chat(user, "You wet [mop] in [src].")
playsound(loc, 'sound/effects/slosh.ogg', 25, TRUE)
- return 1
+ return TRUE
/obj/structure/janitorialcart/proc/put_in_cart(obj/item/I, mob/user)
if(!user.transferItemToLoc(I, src))
diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm
index 60ff6964990..6081f2c59f2 100644
--- a/code/game/objects/structures/ladders.dm
+++ b/code/game/objects/structures/ladders.dm
@@ -84,39 +84,42 @@
user.forceMove(T)
if(AM)
user.start_pulling(AM)
+
+ //reopening ladder radial menu ahead
+ T = get_turf(user)
+ var/obj/structure/ladder/ladder_structure = locate() in T
+ if (ladder_structure)
+ ladder_structure.use(user)
/obj/structure/ladder/proc/use(mob/user, is_ghost=FALSE)
if (!is_ghost && !in_range(src, user))
return
- var/list/tool_list = list(
- "Up" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = NORTH),
- "Down" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = SOUTH)
- )
-
- if (up && down)
- var/result = show_radial_menu(user, src, tool_list, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE)
- if (!is_ghost && !in_range(src, user))
- return // nice try
- switch(result)
- if("Up")
- travel(TRUE, user, is_ghost, up)
- if("Down")
- travel(FALSE, user, is_ghost, down)
- if("Cancel")
- return
- else if(up)
- travel(TRUE, user, is_ghost, up)
- else if(down)
- travel(FALSE, user, is_ghost, down)
- else
+ var/list/tool_list = list()
+ if (up)
+ tool_list["Up"] = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = NORTH)
+ if (down)
+ tool_list["Down"] = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = SOUTH)
+ if (!length(tool_list))
to_chat(user, "[src] doesn't seem to lead anywhere!")
+ return
+
+ var/result = show_radial_menu(user, src, tool_list, custom_check = CALLBACK(src, .proc/check_menu, user, is_ghost), require_near = !is_ghost, tooltips = TRUE)
+ if (!is_ghost && !in_range(src, user))
+ return // nice try
+ switch(result)
+ if("Up")
+ travel(TRUE, user, is_ghost, up)
+ if("Down")
+ travel(FALSE, user, is_ghost, down)
+ if("Cancel")
+ return
if(!is_ghost)
add_fingerprint(user)
-/obj/structure/ladder/proc/check_menu(mob/user)
- if(user.incapacitated() || !user.Adjacent(src))
+/obj/structure/ladder/proc/check_menu(mob/user, is_ghost)
+ if(user.incapacitated() || (!user.Adjacent(src) && !is_ghost))
return FALSE
return TRUE
diff --git a/code/game/objects/structures/memorial.dm b/code/game/objects/structures/memorial.dm
index 7c73578dc12..cbfb9e49ac8 100644
--- a/code/game/objects/structures/memorial.dm
+++ b/code/game/objects/structures/memorial.dm
@@ -9,7 +9,6 @@ but we are all contributors together.
Goodbye, man. We'll miss you.
This memorial has been designed for him and any future coders to perish.
-
*/
/obj/structure/fluff/arc
@@ -20,3 +19,27 @@ This memorial has been designed for him and any future coders to perish.
density = TRUE
anchored = TRUE
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
+
+
+/*
+
+In Memoriam 26th August, 2020
+Our friend, fellow admin, and champion of the "short" reply, OrdoDictionary passed away recently.
+While this news was not unexpected - Ordo had been fighting bravely against prion disease for some time - it remains as heartbreaking as it is unfair.
+Ordo was sharp as a razor, with wit to match. During the time we knew him he was pursuing a PhD, yet he still found time to volunteer here and help his fellow spessman.
+In admin channels you were as likely to find Ordo pontificating on history or food or ham radio as you were anything related to the game. But you knew -
+no matter the topic - that his opinion was informed and valuable, and that he would deliver it with nuance, class and charm.
+
+This community - and the world - is worse off without him in it.
+He will be missed.
+
+So should you read this and should you get the chance, raise a glass in his memory.
+…but be sure to break out the good stuff.
+That’s how he would have wanted it.
+*/
+/obj/item/clothing/accessory/medal/gold/ordom
+ name = "\proper The OrdoM Memorial Medal For Excellence in Paperwork"
+ desc = "Awarded for outstanding excellence in paperwork, administration, and bureaucracy."
+ icon_state = "medal_paperwork"
+ medaltype = "medal-gold"
+ custom_materials = list(/datum/material/gold=1000)
diff --git a/code/game/objects/structures/petrified_statue.dm b/code/game/objects/structures/petrified_statue.dm
index c8b80446925..fa30cb34eb7 100644
--- a/code/game/objects/structures/petrified_statue.dm
+++ b/code/game/objects/structures/petrified_statue.dm
@@ -77,28 +77,28 @@
/mob/living/carbon/human/petrify(statue_timer)
if(!isturf(loc))
- return 0
+ return FALSE
var/obj/structure/statue/petrified/S = new(loc, src, statue_timer)
S.name = "statue of [name]"
bleedsuppress = 1
S.copy_overlays(src)
var/newcolor = list(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
S.add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
- return 1
+ return TRUE
/mob/living/carbon/monkey/petrify(statue_timer)
if(!isturf(loc))
- return 0
+ return FALSE
var/obj/structure/statue/petrified/S = new(loc, src, statue_timer)
S.name = "statue of a monkey"
S.icon_state = "monkey"
- return 1
+ return TRUE
/mob/living/simple_animal/pet/dog/corgi/petrify(statue_timer)
if(!isturf(loc))
- return 0
+ return FALSE
var/obj/structure/statue/petrified/S = new (loc, src, statue_timer)
S.name = "statue of a corgi"
S.icon_state = "corgi"
S.desc = "If it takes forever, I will wait for you..."
- return 1
+ return TRUE
diff --git a/code/game/objects/structures/shower.dm b/code/game/objects/structures/shower.dm
index e80853e34b1..2eea9f6fb07 100644
--- a/code/game/objects/structures/shower.dm
+++ b/code/game/objects/structures/shower.dm
@@ -121,7 +121,6 @@
A.wash(CLEAN_WASH)
SEND_SIGNAL(A, COMSIG_ADD_MOOD_EVENT, "shower", /datum/mood_event/nice_shower)
reagents.expose(A, TOUCH)
- reagents.expose(A, VAPOR)
if(isliving(A))
check_heat(A)
diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm
index 57a91ac8249..c6fc5e767f6 100644
--- a/code/game/objects/structures/statues.dm
+++ b/code/game/objects/structures/statues.dm
@@ -227,7 +227,7 @@
material_drop_type = /obj/item/stack/sheet/mineral/bananium
impressiveness = 50
desc = "A bananium statue with a small engraving:'HOOOOOOONK'."
- var/spam_flag = 0
+ var/limiting_spam = FALSE
/obj/structure/statue/bananium/clown
name = "statue of a clown"
@@ -250,10 +250,10 @@
..()
/obj/structure/statue/bananium/proc/honk()
- if(!spam_flag)
- spam_flag = TRUE
+ if(!limiting_spam)
+ limiting_spam = TRUE
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, TRUE)
- addtimer(VARSET_CALLBACK(src, spam_flag, FALSE), 2 SECONDS)
+ addtimer(VARSET_CALLBACK(src, limiting_spam, FALSE), 2 SECONDS)
/////////////////////sandstone/////////////////////////////////////////
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index d57f8388d18..c69100442d2 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -536,7 +536,7 @@
canSmoothWith = null
can_buckle = 1
buckle_lying = -1
- buckle_requires_restraints = 1
+ buckle_requires_restraints = TRUE
var/mob/living/carbon/human/patient = null
var/obj/machinery/computer/operating/computer = null
diff --git a/code/game/objects/structures/transit_tubes/transit_tube_construction.dm b/code/game/objects/structures/transit_tubes/transit_tube_construction.dm
index 354a9f98cdd..9ed25a0bafb 100644
--- a/code/game/objects/structures/transit_tubes/transit_tube_construction.dm
+++ b/code/game/objects/structures/transit_tubes/transit_tube_construction.dm
@@ -9,7 +9,7 @@
density = FALSE
layer = LOW_ITEM_LAYER //same as the built tube
anchored = FALSE
- var/flipped = 0
+ var/flipped = FALSE
var/build_type = /obj/structure/transit_tube
var/flipped_build_type
var/base_icon
@@ -62,7 +62,7 @@
/obj/structure/c_transit_tube/station/flipped
icon_state = "closed_station1"
- flipped = 1
+ flipped = TRUE
build_type = /obj/structure/transit_tube/station/flipped
flipped_build_type = /obj/structure/transit_tube/station
@@ -77,7 +77,7 @@
/obj/structure/c_transit_tube/station/reverse/flipped
icon_state = "closed_terminus1"
- flipped = 1
+ flipped = TRUE
build_type = /obj/structure/transit_tube/station/reverse/flipped
flipped_build_type = /obj/structure/transit_tube/station/reverse
@@ -91,7 +91,7 @@
/obj/structure/c_transit_tube/station/dispenser/flipped
icon_state = "closed_station1"
- flipped = 1
+ flipped = TRUE
build_type = /obj/structure/transit_tube/station/dispenser/flipped
flipped_build_type = /obj/structure/transit_tube/station/dispenser
@@ -106,7 +106,7 @@
/obj/structure/c_transit_tube/station/dispenser/reverse/flipped
icon_state = "closed_terminus1"
- flipped = 1
+ flipped = TRUE
build_type = /obj/structure/transit_tube/station/dispenser/reverse/flipped
flipped_build_type = /obj/structure/transit_tube/station/dispenser/reverse
@@ -136,7 +136,7 @@
icon_state = "curved1"
build_type = /obj/structure/transit_tube/curved/flipped
flipped_build_type = /obj/structure/transit_tube/curved
- flipped = 1
+ flipped = TRUE
/obj/structure/c_transit_tube/junction
@@ -148,7 +148,7 @@
/obj/structure/c_transit_tube/junction/flipped
icon_state = "junction1"
- flipped = 1
+ flipped = TRUE
build_type = /obj/structure/transit_tube/junction/flipped
flipped_build_type = /obj/structure/transit_tube/junction
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 6159e6640a9..961a37948b1 100644
--- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
+++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
@@ -98,7 +98,7 @@
return ..()
/obj/structure/transit_tube_pod/proc/follow_tube()
- set waitfor = 0
+ set waitfor = FALSE
if(moving)
return
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 092dcf2cbee..c0d21cb5e3b 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -64,6 +64,9 @@
real_explosion_block = explosion_block
explosion_block = EXPLOSION_BLOCK_PROC
+ flags_1 |= ALLOW_DARK_PAINTS_1
+ RegisterSignal(src, COMSIG_OBJ_PAINTED, .proc/on_painted)
+
/obj/structure/window/ComponentInitialize()
. = ..()
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ,null,CALLBACK(src, .proc/can_be_rotated),CALLBACK(src,.proc/after_rotation))
@@ -99,9 +102,9 @@
/obj/structure/window/CanAllowThrough(atom/movable/mover, turf/target)
. = ..()
if(istype(mover) && (mover.pass_flags & PASSGLASS))
- return 1
+ return TRUE
if(dir == FULLTILE_WINDOW_DIR)
- return 0 //full tile window, you can't move into it!
+ return FALSE //full tile window, you can't move into it!
var/attempted_dir = get_dir(loc, target)
if(attempted_dir == dir)
return
@@ -120,10 +123,10 @@
/obj/structure/window/CheckExit(atom/movable/O, turf/target)
if(istype(O) && (O.pass_flags & PASSGLASS))
- return 1
+ return TRUE
if(get_dir(O.loc, target) == dir)
- return 0
- return 1
+ return FALSE
+ return TRUE
/obj/structure/window/attack_tk(mob/user)
user.changeNext_move(CLICK_CD_MELEE)
@@ -217,18 +220,13 @@
/obj/structure/window/proc/check_state_and_anchored(checked_state, checked_anchored)
return check_state(checked_state) && check_anchored(checked_anchored)
-/obj/structure/window/mech_melee_attack(obj/mecha/M)
- if(!can_be_reached())
- return
- ..()
-
/obj/structure/window/proc/can_be_reached(mob/user)
if(!fulltile)
if(get_dir(user,src) & dir)
for(var/obj/O in loc)
if(!O.CanPass(user, user.loc, 1))
- return 0
- return 1
+ return FALSE
+ return TRUE
/obj/structure/window/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
. = ..()
@@ -283,6 +281,14 @@
ini_dir = dir
add_fingerprint(user)
+/obj/structure/window/proc/on_painted(is_dark_color)
+ SIGNAL_HANDLER
+
+ if (is_dark_color)
+ set_opacity(255)
+ else
+ set_opacity(initial(opacity))
+
/obj/structure/window/Destroy()
density = FALSE
air_update_turf(1)
@@ -337,11 +343,11 @@
/obj/structure/window/CanAStarPass(ID, to_dir)
if(!density)
- return 1
+ return TRUE
if((dir == FULLTILE_WINDOW_DIR) || (dir == to_dir))
- return 0
+ return FALSE
- return 1
+ return TRUE
/obj/structure/window/GetExplosionBlock()
return reinf && fulltile ? real_explosion_block : 0
diff --git a/code/game/turfs/closed/_closed.dm b/code/game/turfs/closed/_closed.dm
index e1705332786..bb3a77d64d1 100644
--- a/code/game/turfs/closed/_closed.dm
+++ b/code/game/turfs/closed/_closed.dm
@@ -30,7 +30,7 @@
return
/turf/closed/indestructible/acid_act(acidpwr, acid_volume, acid_id)
- return 0
+ return FALSE
/turf/closed/indestructible/Melt()
to_be_destroyed = FALSE
diff --git a/code/game/turfs/closed/minerals.dm b/code/game/turfs/closed/minerals.dm
index 5780f3fb129..0cc9ae9be12 100644
--- a/code/game/turfs/closed/minerals.dm
+++ b/code/game/turfs/closed/minerals.dm
@@ -656,8 +656,8 @@
countdown(notify_admins)
-/turf/closed/mineral/gibtonite/proc/countdown(notify_admins = 0)
- set waitfor = 0
+/turf/closed/mineral/gibtonite/proc/countdown(notify_admins = FALSE)
+ set waitfor = FALSE
while(istype(src, /turf/closed/mineral/gibtonite) && stage == GIBTONITE_ACTIVE && det_time > 0 && mineralAmt >= 1)
det_time--
sleep(5)
@@ -679,7 +679,7 @@
det_time = 0
visible_message("The chain reaction stopped! The gibtonite had [det_time] reactions left till the explosion!")
-/turf/closed/mineral/gibtonite/gets_drilled(mob/user, triggered_by_explosion = 0)
+/turf/closed/mineral/gibtonite/gets_drilled(mob/user, triggered_by_explosion = FALSE)
if(stage == GIBTONITE_UNSTRUCK && mineralAmt >= 1) //Gibtonite deposit is activated
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,TRUE)
explosive_reaction(user, triggered_by_explosion)
@@ -688,7 +688,7 @@
var/turf/bombturf = get_turf(src)
mineralAmt = 0
stage = GIBTONITE_DETONATE
- explosion(bombturf,1,2,5, adminlog = 0)
+ explosion(bombturf,1,2,5, adminlog = FALSE)
if(stage == GIBTONITE_STABLE) //Gibtonite deposit is now benign and extractable. Depending on how close you were to it blowing up before defusing, you get better quality ore.
var/obj/item/gibtonite/G = new (src)
if(det_time <= 0)
diff --git a/code/game/turfs/closed/wall/reinf_walls.dm b/code/game/turfs/closed/wall/reinf_walls.dm
index 648b3014eac..0c48b1a5379 100644
--- a/code/game/turfs/closed/wall/reinf_walls.dm
+++ b/code/game/turfs/closed/wall/reinf_walls.dm
@@ -59,25 +59,25 @@
d_state = SUPPORT_LINES
update_icon()
to_chat(user, "You cut the outer grille.")
- return 1
+ return TRUE
if(SUPPORT_LINES)
if(W.tool_behaviour == TOOL_SCREWDRIVER)
to_chat(user, "You begin unsecuring the support lines...")
if(W.use_tool(src, user, 40, volume=100))
if(!istype(src, /turf/closed/wall/r_wall) || d_state != SUPPORT_LINES)
- return 1
+ return TRUE
d_state = COVER
update_icon()
to_chat(user, "You unsecure the support lines.")
- return 1
+ return TRUE
else if(W.tool_behaviour == TOOL_WIRECUTTER)
W.play_tool_sound(src, 100)
d_state = INTACT
update_icon()
to_chat(user, "You repair the outer grille.")
- return 1
+ return TRUE
if(COVER)
if(W.tool_behaviour == TOOL_WELDER)
@@ -86,32 +86,32 @@
to_chat(user, "You begin slicing through the metal cover...")
if(W.use_tool(src, user, 60, volume=100))
if(!istype(src, /turf/closed/wall/r_wall) || d_state != COVER)
- return 1
+ return TRUE
d_state = CUT_COVER
update_icon()
to_chat(user, "You press firmly on the cover, dislodging it.")
- return 1
+ return TRUE
if(W.tool_behaviour == TOOL_SCREWDRIVER)
to_chat(user, "You begin securing the support lines...")
if(W.use_tool(src, user, 40, volume=100))
if(!istype(src, /turf/closed/wall/r_wall) || d_state != COVER)
- return 1
+ return TRUE
d_state = SUPPORT_LINES
update_icon()
to_chat(user, "The support lines have been secured.")
- return 1
+ return TRUE
if(CUT_COVER)
if(W.tool_behaviour == TOOL_CROWBAR)
to_chat(user, "You struggle to pry off the cover...")
if(W.use_tool(src, user, 100, volume=100))
if(!istype(src, /turf/closed/wall/r_wall) || d_state != CUT_COVER)
- return 1
+ return TRUE
d_state = ANCHOR_BOLTS
update_icon()
to_chat(user, "You pry off the cover.")
- return 1
+ return TRUE
if(W.tool_behaviour == TOOL_WELDER)
if(!W.tool_start_check(user, amount=0))
@@ -123,28 +123,28 @@
d_state = COVER
update_icon()
to_chat(user, "The metal cover has been welded securely to the frame.")
- return 1
+ return TRUE
if(ANCHOR_BOLTS)
if(W.tool_behaviour == TOOL_WRENCH)
to_chat(user, "You start loosening the anchoring bolts which secure the support rods to their frame...")
if(W.use_tool(src, user, 40, volume=100))
if(!istype(src, /turf/closed/wall/r_wall) || d_state != ANCHOR_BOLTS)
- return 1
+ return TRUE
d_state = SUPPORT_RODS
update_icon()
to_chat(user, "You remove the bolts anchoring the support rods.")
- return 1
+ return TRUE
if(W.tool_behaviour == TOOL_CROWBAR)
to_chat(user, "You start to pry the cover back into place...")
if(W.use_tool(src, user, 20, volume=100))
if(!istype(src, /turf/closed/wall/r_wall) || d_state != ANCHOR_BOLTS)
- return 1
+ return TRUE
d_state = CUT_COVER
update_icon()
to_chat(user, "The metal cover has been pried back into place.")
- return 1
+ return TRUE
if(SUPPORT_RODS)
if(W.tool_behaviour == TOOL_WELDER)
@@ -153,32 +153,32 @@
to_chat(user, "You begin slicing through the support rods...")
if(W.use_tool(src, user, 100, volume=100))
if(!istype(src, /turf/closed/wall/r_wall) || d_state != SUPPORT_RODS)
- return 1
+ return TRUE
d_state = SHEATH
update_icon()
to_chat(user, "You slice through the support rods.")
- return 1
+ return TRUE
if(W.tool_behaviour == TOOL_WRENCH)
to_chat(user, "You start tightening the bolts which secure the support rods to their frame...")
W.play_tool_sound(src, 100)
if(W.use_tool(src, user, 40))
if(!istype(src, /turf/closed/wall/r_wall) || d_state != SUPPORT_RODS)
- return 1
+ return TRUE
d_state = ANCHOR_BOLTS
update_icon()
to_chat(user, "You tighten the bolts anchoring the support rods.")
- return 1
+ return TRUE
if(SHEATH)
if(W.tool_behaviour == TOOL_CROWBAR)
to_chat(user, "You struggle to pry off the outer sheath...")
if(W.use_tool(src, user, 100, volume=100))
if(!istype(src, /turf/closed/wall/r_wall) || d_state != SHEATH)
- return 1
+ return TRUE
to_chat(user, "You pry off the outer sheath.")
dismantle_wall()
- return 1
+ return TRUE
if(W.tool_behaviour == TOOL_WELDER)
if(!W.tool_start_check(user, amount=0))
@@ -190,8 +190,8 @@
d_state = SUPPORT_RODS
update_icon()
to_chat(user, "You weld the support rods back together.")
- return 1
- return 0
+ return TRUE
+ return FALSE
/turf/closed/wall/r_wall/update_icon()
. = ..()
diff --git a/code/game/turfs/closed/walls.dm b/code/game/turfs/closed/walls.dm
index 68142b1f50d..9411630a726 100644
--- a/code/game/turfs/closed/walls.dm
+++ b/code/game/turfs/closed/walls.dm
@@ -100,24 +100,6 @@
else
add_dent(WALL_DENT_HIT)
-/turf/closed/wall/mech_melee_attack(obj/mecha/M)
- M.do_attack_animation(src)
- switch(M.damtype)
- if(BRUTE)
- playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
- M.visible_message("[M.name] hits [src]!", \
- "You hit [src]!", null, COMBAT_MESSAGE_RANGE)
- if(prob(hardness + M.force) && M.force > 20)
- dismantle_wall(1)
- playsound(src, 'sound/effects/meteorimpact.ogg', 100, TRUE)
- else
- add_dent(WALL_DENT_HIT)
- if(BURN)
- playsound(src, 'sound/items/welder.ogg', 100, TRUE)
- if(TOX)
- playsound(src, 'sound/effects/spray2.ogg', 100, TRUE)
- return FALSE
-
/turf/closed/wall/attack_paw(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
return attack_hand(user)
diff --git a/code/game/turfs/open/_open.dm b/code/game/turfs/open/_open.dm
index e81d9ef839b..12db5391b59 100644
--- a/code/game/turfs/open/_open.dm
+++ b/code/game/turfs/open/_open.dm
@@ -156,7 +156,7 @@
baseturfs = /turf/open/indestructible/airblock
/turf/open/Initalize_Atmos(times_fired)
- excited = 0
+ excited = FALSE
update_visuals()
current_cycle = times_fired
@@ -207,18 +207,18 @@
/turf/open/handle_slip(mob/living/carbon/C, knockdown_amount, obj/O, lube, paralyze_amount, force_drop)
if(C.movement_type & FLYING)
- return 0
+ return FALSE
if(has_gravity(src))
var/obj/buckled_obj
if(C.buckled)
buckled_obj = C.buckled
if(!(lube&GALOSHES_DONT_HELP)) //can't slip while buckled unless it's lube.
- return 0
+ return FALSE
else
if(!(lube&SLIP_WHEN_CRAWLING) && (!(C.mobility_flags & MOBILITY_STAND) || !(C.status_flags & CANKNOCKDOWN))) // can't slip unbuckled mob if they're lying or can't fall.
- return 0
+ return FALSE
if(C.m_intent == MOVE_INTENT_WALK && (lube&NO_SLIP_WHEN_WALKING))
- return 0
+ return FALSE
if(!(lube&SLIDE_ICE))
to_chat(C, "You slipped[ O ? " on the [O.name]" : ""]!")
playsound(C.loc, 'sound/misc/slip.ogg', 50, TRUE, -3)
@@ -247,7 +247,7 @@
if(C.force_moving) //If we're already slipping extend it
qdel(C.force_moving)
new /datum/forced_movement(C, get_ranged_target_turf(C, olddir, 1), 1, FALSE) //spinning would be bad for ice, fucks up the next dir
- return 1
+ return TRUE
/turf/open/proc/MakeSlippery(wet_setting = TURF_WET_WATER, min_wet_time = 0, wet_time_to_add = 0, max_wet_time = MAXIMUM_WET_TIME, permanent)
AddComponent(/datum/component/wet_floor, wet_setting, min_wet_time, wet_time_to_add, max_wet_time, permanent)
diff --git a/code/game/turfs/open/floor.dm b/code/game/turfs/open/floor.dm
index 6677a31d266..dc325c53f3d 100644
--- a/code/game/turfs/open/floor.dm
+++ b/code/game/turfs/open/floor.dm
@@ -18,9 +18,9 @@
var/icon_plating = "plating"
thermal_conductivity = 0.040
heat_capacity = 10000
- intact = 1
- var/broken = 0
- var/burnt = 0
+ intact = TRUE
+ var/broken = FALSE
+ var/burnt = FALSE
var/floor_tile = null //tile that this floor drops
var/list/broken_states
var/list/burnt_states
@@ -200,8 +200,8 @@
/turf/open/floor/proc/remove_tile(mob/user, silent = FALSE, make_tile = TRUE, force_plating)
if(broken || burnt)
- broken = 0
- burnt = 0
+ broken = FALSE
+ burnt = FALSE
if(user && !silent)
to_chat(user, "You remove the broken plating.")
else
diff --git a/code/game/turfs/open/floor/fancy_floor.dm b/code/game/turfs/open/floor/fancy_floor.dm
index e38b0fd8f6f..72d042a8881 100644
--- a/code/game/turfs/open/floor/fancy_floor.dm
+++ b/code/game/turfs/open/floor/fancy_floor.dm
@@ -46,8 +46,8 @@
/turf/open/floor/wood/remove_tile(mob/user, silent = FALSE, make_tile = TRUE, force_plating)
if(broken || burnt)
- broken = 0
- burnt = 0
+ broken = FALSE
+ burnt = FALSE
if(user && !silent)
to_chat(user, "You remove the broken planks.")
else
@@ -196,8 +196,9 @@
update_icon()
/turf/open/floor/carpet/update_icon()
- if(!..())
- return 0
+ . = ..()
+ if(!.)
+ return
if(!broken && !burnt)
if(smoothing_flags)
QUEUE_SMOOTH(src)
diff --git a/code/game/turfs/open/floor/mineral_floor.dm b/code/game/turfs/open/floor/mineral_floor.dm
index 89cc708e54b..5b4a89651ab 100644
--- a/code/game/turfs/open/floor/mineral_floor.dm
+++ b/code/game/turfs/open/floor/mineral_floor.dm
@@ -24,8 +24,9 @@
/turf/open/floor/mineral/update_icon()
- if(!..())
- return 0
+ . = ..()
+ if(!.)
+ return
if(!broken && !burnt)
if( !(icon_state in icons) )
icon_state = initial(icon_state)
@@ -147,7 +148,7 @@
icon_state = "bananium"
floor_tile = /obj/item/stack/tile/mineral/bananium
icons = list("bananium","bananium_dam")
- var/spam_flag = 0
+ var/sound_cooldown = 0
/turf/open/floor/mineral/bananium/Entered(atom/movable/AM)
.=..()
@@ -171,14 +172,14 @@
honk()
/turf/open/floor/mineral/bananium/proc/honk()
- if(spam_flag < world.time)
+ if(sound_cooldown < world.time)
playsound(src, 'sound/items/bikehorn.ogg', 50, TRUE)
- spam_flag = world.time + 20
+ sound_cooldown = world.time + 20
/turf/open/floor/mineral/bananium/proc/squeak()
- if(spam_flag < world.time)
+ if(sound_cooldown < world.time)
playsound(src, "clownstep", 50, TRUE)
- spam_flag = world.time + 10
+ sound_cooldown = world.time + 10
/turf/open/floor/mineral/bananium/airless
initial_gas_mix = AIRLESS_ATMOS
@@ -226,12 +227,12 @@
/turf/open/floor/mineral/uranium/proc/radiate()
if(!active)
if(world.time > last_event+15)
- active = 1
+ active = TRUE
radiation_pulse(src, 10)
for(var/turf/open/floor/mineral/uranium/T in orange(1,src))
T.radiate()
last_event = world.time
- active = 0
+ active = FALSE
return
// ALIEN ALLOY
diff --git a/code/game/turfs/open/floor/plasteel_floor.dm b/code/game/turfs/open/floor/plasteel_floor.dm
index 5c966778784..00614c80392 100644
--- a/code/game/turfs/open/floor/plasteel_floor.dm
+++ b/code/game/turfs/open/floor/plasteel_floor.dm
@@ -14,8 +14,9 @@
ChangeTurf(/turf/open/floor/plating/rust)
/turf/open/floor/plasteel/update_icon()
- if(!..())
- return 0
+ . = ..()
+ if(!.)
+ return
if(!broken && !burnt)
icon_state = icon_regular_floor
diff --git a/code/game/turfs/open/floor/plating/dirt.dm b/code/game/turfs/open/floor/plating/dirt.dm
deleted file mode 100644
index 9cfbe8433b3..00000000000
--- a/code/game/turfs/open/floor/plating/dirt.dm
+++ /dev/null
@@ -1,21 +0,0 @@
-/turf/open/floor/plating/dirt
- gender = PLURAL
- name = "dirt"
- desc = "Upon closer examination, it's still dirt."
- icon = 'icons/turf/floors.dmi'
- icon_state = "dirt"
- baseturfs = /turf/open/chasm/jungle
- initial_gas_mix = OPENTURF_LOW_PRESSURE
- planetary_atmos = TRUE
- attachment_holes = FALSE
- footstep = FOOTSTEP_SAND
- barefootstep = FOOTSTEP_SAND
- clawfootstep = FOOTSTEP_SAND
- heavyfootstep = FOOTSTEP_GENERIC_HEAVY
- tiled_dirt = FALSE
-
-/turf/open/floor/plating/dirt/dark
- icon_state = "greenerdirt"
-
-/turf/open/floor/plating/dirt/try_replace_tile(obj/item/stack/tile/T, mob/user, params)
- return
diff --git a/code/game/turfs/open/floor/plating/planet.dm b/code/game/turfs/open/floor/plating/planet.dm
new file mode 100644
index 00000000000..9f6c54a029f
--- /dev/null
+++ b/code/game/turfs/open/floor/plating/planet.dm
@@ -0,0 +1,59 @@
+/turf/open/floor/plating/dirt
+ gender = PLURAL
+ name = "dirt"
+ desc = "Upon closer examination, it's still dirt."
+ icon = 'icons/turf/floors.dmi'
+ icon_state = "dirt"
+ baseturfs = /turf/open/chasm/jungle
+ initial_gas_mix = OPENTURF_LOW_PRESSURE
+ planetary_atmos = TRUE
+ attachment_holes = FALSE
+ footstep = FOOTSTEP_SAND
+ barefootstep = FOOTSTEP_SAND
+ clawfootstep = FOOTSTEP_SAND
+ heavyfootstep = FOOTSTEP_GENERIC_HEAVY
+ tiled_dirt = FALSE
+
+/turf/open/floor/plating/dirt/dark
+ icon_state = "greenerdirt"
+
+/turf/open/floor/plating/dirt/try_replace_tile(obj/item/stack/tile/T, mob/user, params)
+ return
+
+/turf/open/floor/plating/dirt/jungle
+ slowdown = 0.5
+ initial_gas_mix = OPENTURF_DEFAULT_ATMOS
+
+/turf/open/floor/plating/dirt/jungle/dark
+ icon_state = "greenerdirt"
+
+/turf/open/floor/plating/dirt/jungle/wasteland //Like a more fun version of living in Arizona.
+ name = "cracked earth"
+ desc = "Looks a bit dry."
+ icon = 'icons/turf/floors.dmi'
+ icon_state = "wasteland"
+ slowdown = 1
+ var/floor_variance = 15
+
+/turf/open/floor/plating/dirt/jungle/wasteland/Initialize()
+ .=..()
+ if(prob(floor_variance))
+ icon_state = "[initial(icon_state)][rand(0,12)]"
+
+/turf/open/floor/plating/grass/jungle
+ name = "jungle grass"
+ initial_gas_mix = OPENTURF_DEFAULT_ATMOS
+ planetary_atmos = TRUE
+ desc = "Greener on the other side."
+ icon = 'icons/turf/floors.dmi'
+ icon_state = "junglegrass"
+
+/turf/open/floor/plating/grass/jungle/Initialize()
+ .=..()
+ icon_state = "[initial(icon_state)][rand(1,3)]"
+
+/turf/closed/mineral/random/jungle
+ mineralSpawnChanceList = list(/obj/item/stack/ore/uranium = 5, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 10,
+ /obj/item/stack/ore/silver = 12, /obj/item/stack/ore/plasma = 20, /obj/item/stack/ore/iron = 40, /obj/item/stack/ore/titanium = 11,
+ /obj/item/stack/ore/bluespace_crystal = 1)
+ baseturfs = /turf/open/floor/plating/dirt/dark
diff --git a/code/game/turfs/open/river.dm b/code/game/turfs/open/river.dm
index adc6b57960d..6e4695b0fe9 100644
--- a/code/game/turfs/open/river.dm
+++ b/code/game/turfs/open/river.dm
@@ -22,22 +22,22 @@
var/obj/effect/landmark/river_waypoint/W = A
if (W.z != target_z || W.connected)
continue
- W.connected = 1
+ W.connected = TRUE
var/turf/cur_turf = get_turf(W)
cur_turf.ChangeTurf(turf_type, new_baseturfs, CHANGETURF_IGNORE_AIR)
var/turf/target_turf = get_turf(pick(river_nodes - W))
if(!target_turf)
break
- var/detouring = 0
+ var/detouring = FALSE
var/cur_dir = get_dir(cur_turf, target_turf)
while(cur_turf != target_turf)
if(detouring) //randomly snake around a bit
if(prob(20))
- detouring = 0
+ detouring = FALSE
cur_dir = get_dir(cur_turf, target_turf)
else if(prob(20))
- detouring = 1
+ detouring = TRUE
if(prob(50))
cur_dir = turn(cur_dir, 45)
else
@@ -48,7 +48,7 @@
cur_turf = get_step(cur_turf, cur_dir)
var/area/new_area = get_area(cur_turf)
if(!istype(new_area, whitelist_area) || (cur_turf.flags_1 & NO_LAVA_GEN_1)) //Rivers will skip ruins
- detouring = 0
+ detouring = FALSE
cur_dir = get_dir(cur_turf, target_turf)
cur_turf = get_step(cur_turf, cur_dir)
continue
@@ -62,7 +62,7 @@
/obj/effect/landmark/river_waypoint
name = "river waypoint"
- var/connected = 0
+ var/connected = FALSE
invisibility = INVISIBILITY_ABSTRACT
diff --git a/code/game/turfs/open/space/space.dm b/code/game/turfs/open/space/space.dm
index 0519926ca7f..356f382c75a 100644
--- a/code/game/turfs/open/space/space.dm
+++ b/code/game/turfs/open/space/space.dm
@@ -206,16 +206,16 @@
/turf/open/space/can_have_cabling()
if(locate(/obj/structure/lattice/catwalk, src))
- return 1
- return 0
+ return TRUE
+ return FALSE
/turf/open/space/is_transition_turf()
if(destination_x || destination_y || destination_z)
- return 1
+ return TRUE
/turf/open/space/acid_act(acidpwr, acid_volume)
- return 0
+ return FALSE
/turf/open/space/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
underlay_appearance.icon = 'icons/turf/space.dmi'
diff --git a/code/game/turfs/open/water.dm b/code/game/turfs/open/water.dm
index 957fb3df19b..b29cb95c11d 100644
--- a/code/game/turfs/open/water.dm
+++ b/code/game/turfs/open/water.dm
@@ -15,3 +15,6 @@
barefootstep = FOOTSTEP_WATER
clawfootstep = FOOTSTEP_WATER
heavyfootstep = FOOTSTEP_WATER
+
+/turf/open/water/jungle
+ initial_gas_mix = OPENTURF_DEFAULT_ATMOS
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 39de5098c53..514b06977b1 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -487,7 +487,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
switch(choice)
if(null)
- return 0
+ return
if("Small Bomb (1, 2, 3, 3)")
explosion(epicenter, 1, 2, 3, 3, TRUE, TRUE)
if("Medium Bomb (2, 3, 4, 4)")
diff --git a/code/modules/admin/callproc/callproc.dm b/code/modules/admin/callproc/callproc.dm
index 1f60597e12c..daff5ffeb16 100644
--- a/code/modules/admin/callproc/callproc.dm
+++ b/code/modules/admin/callproc/callproc.dm
@@ -130,7 +130,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
/client/proc/callproc_datum(datum/A as null|area|mob|obj|turf)
set category = "Debug"
set name = "Atom ProcCall"
- set waitfor = 0
+ set waitfor = FALSE
if(!check_rights(R_DEBUG))
return
diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm
index e10c8dc15e1..2dab412e0c4 100644
--- a/code/modules/admin/holder2.dm
+++ b/code/modules/admin/holder2.dm
@@ -130,21 +130,21 @@ GLOBAL_PROTECT(href_token)
/datum/admins/proc/check_for_rights(rights_required)
if(rights_required && !(rights_required & rank.rights))
- return 0
- return 1
+ return FALSE
+ return TRUE
/datum/admins/proc/check_if_greater_rights_than_holder(datum/admins/other)
if(!other)
- return 1 //they have no rights
+ return TRUE //they have no rights
if(rank.rights == R_EVERYTHING)
- return 1 //we have all the rights
+ return TRUE //we have all the rights
if(src == other)
- return 1 //you always have more rights than yourself
+ return TRUE //you always have more rights than yourself
if(rank.rights != other.rank.rights)
if( (rank.rights & other.rank.rights) == other.rank.rights )
- return 1 //we have all the rights they have and more
- return 0
+ return TRUE //we have all the rights they have and more
+ return FALSE
/datum/admins/vv_edit_var(var_name, var_value)
return FALSE //nice try trialmin
@@ -166,26 +166,26 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
/proc/check_rights(rights_required, show_msg=1)
if(usr && usr.client)
if (check_rights_for(usr.client, rights_required))
- return 1
+ return TRUE
else
if(show_msg)
to_chat(usr, "Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].", confidential = TRUE)
- return 0
+ return FALSE
//probably a bit iffy - will hopefully figure out a better solution
/proc/check_if_greater_rights_than(client/other)
if(usr && usr.client)
if(usr.client.holder)
if(!other || !other.holder)
- return 1
+ return TRUE
return usr.client.holder.check_if_greater_rights_than_holder(other.holder)
- return 0
+ return FALSE
//This proc checks whether subject has at least ONE of the rights specified in rights_required.
/proc/check_rights_for(client/subject, rights_required)
if(subject && subject.holder)
return subject.holder.check_for_rights(rights_required)
- return 0
+ return FALSE
/proc/GenerateToken()
. = ""
diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm
index 3a51fa91ad8..1dbab89d88e 100644
--- a/code/modules/admin/secrets.dm
+++ b/code/modules/admin/secrets.dm
@@ -95,7 +95,7 @@
/datum/admins/proc/Secrets_topic(item,href_list)
var/datum/round_event/E
- var/ok = 0
+ var/ok = FALSE
switch(item)
if("admin_log")
var/dat = "Admin Log
"
@@ -290,7 +290,7 @@
for(var/i in GLOB.human_list)
var/mob/living/carbon/human/H = i
INVOKE_ASYNC(H, /mob/living/carbon.proc/monkeyize)
- ok = 1
+ ok = TRUE
if("allspecies")
if(!check_rights(R_FUN))
@@ -709,7 +709,7 @@
to_chat(world, text("A secret has been activated by []!", usr.key), confidential = TRUE)
/proc/portalAnnounce(announcement, playlightning)
- set waitfor = 0
+ set waitfor = FALSE
if (playlightning)
sound_to_playing_players('sound/magic/lightning_chargeup.ogg')
sleep(80)
diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm
index ae10d77657c..76e9a07cd9d 100644
--- a/code/modules/admin/verbs/adminhelp.dm
+++ b/code/modules/admin/verbs/adminhelp.dm
@@ -562,7 +562,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
. = list("total" = list(), "noflags" = list(), "afk" = list(), "stealth" = list(), "present" = list())
for(var/client/X in GLOB.admins)
.["total"] += X
- if(requiredflags != 0 && !check_rights_for(X, requiredflags))
+ if(requiredflags != NONE && !check_rights_for(X, requiredflags))
.["noflags"] += X
else if(X.is_afk())
.["afk"] += X
diff --git a/code/modules/admin/verbs/borgpanel.dm b/code/modules/admin/verbs/borgpanel.dm
index 03f5ad9a79e..e23742cde1b 100644
--- a/code/modules/admin/verbs/borgpanel.dm
+++ b/code/modules/admin/verbs/borgpanel.dm
@@ -199,7 +199,7 @@
borg.notify_ai(DISCONNECT)
if(borg.shell)
borg.undeploy()
- borg.connected_ai = newai
+ borg.set_connected_ai(newai)
borg.notify_ai(TRUE)
message_admins("[key_name_admin(user)] slaved [ADMIN_LOOKUPFLW(borg)] to the AI [ADMIN_LOOKUPFLW(newai)].")
log_admin("[key_name(user)] slaved [key_name(borg)] to the AI [key_name(newai)].")
@@ -207,7 +207,7 @@
borg.notify_ai(DISCONNECT)
if(borg.shell)
borg.undeploy()
- borg.connected_ai = null
+ borg.set_connected_ai(null)
message_admins("[key_name_admin(user)] freed [ADMIN_LOOKUPFLW(borg)] from being slaved to an AI.")
log_admin("[key_name(user)] freed [key_name(borg)] from being slaved to an AI.")
if (borg.lawupdate)
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 2677bdc82e0..a5676a8e03b 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -98,11 +98,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
available.Add(C)
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in sortNames(available)
if(!choice)
- return 0
+ return
if(!isobserver(choice))
var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
if(confirm != "Yes")
- return 0
+ return
var/obj/item/paicard/card = new(T)
var/mob/living/silicon/pai/pai = new(card)
@@ -590,12 +590,12 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
for(var/obj/machinery/power/emitter/E in GLOB.machines)
if(E.anchored)
- E.active = 1
+ E.active = TRUE
for(var/obj/machinery/field/generator/F in GLOB.machines)
- if(F.active == 0)
+ if(F.active == FALSE)
F.set_anchored(TRUE)
- F.active = 1
+ F.active = TRUE
F.state = 2
F.power = 250
F.warming_up = 3
diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm
index b187de8f6bc..843e53ee386 100644
--- a/code/modules/admin/verbs/mapping.dm
+++ b/code/modules/admin/verbs/mapping.dm
@@ -66,7 +66,7 @@ GLOBAL_PROTECT(admin_verbs_debug_mapping)
icon_state = "yellow"
/obj/effect/debugging/marker/Move()
- return 0
+ return FALSE
/client/proc/camera_view()
set category = "Mapping"
@@ -111,7 +111,7 @@ GLOBAL_LIST_EMPTY(dirty_vars)
if(!Master)
alert(usr,"Master_controller not found.","Sec Camera Report")
- return 0
+ return FALSE
var/list/obj/machinery/camera/CL = list()
diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm
index 89e0827149c..cef021f35c2 100644
--- a/code/modules/admin/verbs/one_click_antag.dm
+++ b/code/modules/admin/verbs/one_click_antag.dm
@@ -69,10 +69,10 @@
H.mind.make_Traitor()
candidates.Remove(H)
- return 1
+ return TRUE
- return 0
+ return FALSE
/datum/admins/proc/makeChangelings()
@@ -101,9 +101,9 @@
H.mind.make_Changeling()
candidates.Remove(H)
- return 1
+ return TRUE
- return 0
+ return FALSE
/datum/admins/proc/makeRevs()
@@ -130,9 +130,9 @@
H = pick(candidates)
H.mind.make_Rev()
candidates.Remove(H)
- return 1
+ return TRUE
- return 0
+ return FALSE
/datum/admins/proc/makeWizard()
@@ -170,9 +170,9 @@
H.mind.make_Cultist()
candidates.Remove(H)
- return 1
+ return TRUE
- return 0
+ return FALSE
@@ -200,7 +200,7 @@
break
//Making sure we have atleast 3 Nuke agents, because less than that is kinda bad
if(agentcount < 3)
- return 0
+ return FALSE
//Let's find the spawn locations
var/leader_chosen = FALSE
@@ -213,9 +213,9 @@
nuke_team = N.nuke_team
else
new_character.mind.add_antag_datum(/datum/antagonist/nukeop,nuke_team)
- return 1
+ return TRUE
else
- return 0
+ return FALSE
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index 701351b238d..6c992bdab85 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -16,7 +16,7 @@
admin_sound.channel = CHANNEL_ADMIN
admin_sound.frequency = freq
admin_sound.wait = 1
- admin_sound.repeat = 0
+ admin_sound.repeat = FALSE
admin_sound.status = SOUND_STREAM
admin_sound.volume = vol
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 52b6eff05cd..dd4d7b5bf4b 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -300,7 +300,7 @@
else
to_chat(usr, "Error: create_xeno(): no suitable candidates.", confidential = TRUE)
if(!istext(ckey))
- return 0
+ return FALSE
var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva")
var/obj/effect/landmark/spawn_here = GLOB.xeno_spawn.len ? pick(GLOB.xeno_spawn) : null
@@ -319,7 +319,7 @@
if("Larva")
new_xeno = new /mob/living/carbon/alien/larva(spawn_here)
else
- return 0
+ return FALSE
if(!spawn_here)
SSjob.SendToLateJoin(new_xeno, FALSE)
@@ -327,7 +327,7 @@
var/msg = "[key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste]."
message_admins(msg)
admin_ticket_log(new_xeno, msg)
- return 1
+ return TRUE
/*
If a guy was gibbed and you want to revive him, this is a good way to do so.
@@ -831,7 +831,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in GLOB.nuke_list)
set name = "Toggle Nuke"
set category = "Admin - Events"
- set popup_menu = 0
+ set popup_menu = FALSE
if(!check_rights(R_DEBUG))
return
diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm
index 2b3050343c1..0523b095fd7 100644
--- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm
+++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm
@@ -23,7 +23,7 @@
/obj/item/restraints/handcuffs
)
var/mode = VEST_STEALTH
- var/stealth_active = 0
+ var/stealth_active = FALSE
var/combat_cooldown = 10
var/datum/icon_snapshot/disguise
var/stealth_armor = list(MELEE = 15, BULLET = 15, LASER = 15, ENERGY = 25, BOMB = 15, BIO = 15, RAD = 15, FIRE = 70, ACID = 70)
@@ -70,7 +70,7 @@
/obj/item/clothing/suit/armor/abductor/vest/proc/ActivateStealth()
if(disguise == null)
return
- stealth_active = 1
+ stealth_active = TRUE
if(ishuman(loc))
var/mob/living/carbon/human/M = loc
new /obj/effect/temp_visual/dir_setting/ninja/cloak(get_turf(M), M.dir)
@@ -84,7 +84,7 @@
/obj/item/clothing/suit/armor/abductor/vest/proc/DeactivateStealth()
if(!stealth_active)
return
- stealth_active = 0
+ stealth_active = FALSE
if(ishuman(loc))
var/mob/living/carbon/human/M = loc
new /obj/effect/temp_visual/dir_setting/ninja(get_turf(M), M.dir)
@@ -876,4 +876,4 @@ Congratulations! You are now trained for invasive xenobiology research!"}
inhand_icon_state = "bl_suit"
worn_icon = 'icons/mob/clothing/under/syndicate.dmi'
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 10, rad = 0, fire = 0, acid = 0)
- can_adjust = 0
+ can_adjust = FALSE
diff --git a/code/modules/antagonists/abductor/equipment/abduction_surgery.dm b/code/modules/antagonists/abductor/equipment/abduction_surgery.dm
index 641c21bd5b2..28e2d174484 100644
--- a/code/modules/antagonists/abductor/equipment/abduction_surgery.dm
+++ b/code/modules/antagonists/abductor/equipment/abduction_surgery.dm
@@ -6,13 +6,13 @@
/datum/surgery/organ_extraction/can_start(mob/user, mob/living/carbon/target)
if(!ishuman(user))
- return 0
+ return FALSE
var/mob/living/carbon/human/H = user
if(H.dna.species.id == "abductor")
- return 1
+ return TRUE
for(var/obj/item/implant/abductor/A in H.implants)
- return 1
- return 0
+ return TRUE
+ return FALSE
/datum/surgery_step/extract_organ
diff --git a/code/modules/antagonists/abductor/equipment/gland.dm b/code/modules/antagonists/abductor/equipment/gland.dm
index a9f31b8ecc6..0fcb5357c6b 100644
--- a/code/modules/antagonists/abductor/equipment/gland.dm
+++ b/code/modules/antagonists/abductor/equipment/gland.dm
@@ -73,8 +73,8 @@
active_mind_control = FALSE
return TRUE
-/obj/item/organ/heart/gland/Remove(mob/living/carbon/M, special = 0)
- active = 0
+/obj/item/organ/heart/gland/Remove(mob/living/carbon/M, special = FALSE)
+ active = FALSE
if(initial(uses) == 1)
uses = initial(uses)
var/datum/atom_hud/abductor/hud = GLOB.huds[DATA_HUD_ABDUCTOR]
@@ -82,7 +82,7 @@
clear_mind_control()
..()
-/obj/item/organ/heart/gland/Insert(mob/living/carbon/M, special = 0)
+/obj/item/organ/heart/gland/Insert(mob/living/carbon/M, special = FALSE)
..()
if(special != 2 && uses) // Special 2 means abductor surgery
Start()
@@ -97,14 +97,14 @@
if(!active)
return
if(!ownerCheck())
- active = 0
+ active = FALSE
return
if(next_activation <= world.time)
activate()
uses--
next_activation = world.time + rand(cooldown_low,cooldown_high)
if(!uses)
- active = 0
+ active = FALSE
/obj/item/organ/heart/gland/proc/activate()
return
diff --git a/code/modules/antagonists/blob/blobstrains/_blobstrain.dm b/code/modules/antagonists/blob/blobstrains/_blobstrain.dm
index f6c61109512..5a2d9b5edef 100644
--- a/code/modules/antagonists/blob/blobstrains/_blobstrain.dm
+++ b/code/modules/antagonists/blob/blobstrains/_blobstrain.dm
@@ -65,7 +65,7 @@ GLOBAL_LIST_INIT(valid_blobstrains, subtypesof(/datum/blobstrain) - list(/datum/
return
/datum/blobstrain/proc/tesla_reaction(obj/structure/blob/B, power, coefficient = 1) //when the blob is hit by a tesla bolt, do this
- return 1 //return 0 to ignore damage
+ return TRUE //return 0 to ignore damage
/datum/blobstrain/proc/extinguish_reaction(obj/structure/blob/B, coefficient = 1) //when the blob is hit with water, do this
return
diff --git a/code/modules/antagonists/blob/blobstrains/energized_jelly.dm b/code/modules/antagonists/blob/blobstrains/energized_jelly.dm
index f0ab16706a5..1bf4b0b54f4 100644
--- a/code/modules/antagonists/blob/blobstrains/energized_jelly.dm
+++ b/code/modules/antagonists/blob/blobstrains/energized_jelly.dm
@@ -15,7 +15,7 @@
return ..()
/datum/blobstrain/reagent/energized_jelly/tesla_reaction(obj/structure/blob/B, power)
- return 0
+ return FALSE
/datum/blobstrain/reagent/energized_jelly/emp_reaction(obj/structure/blob/B, severity)
var/damage = rand(30, 50) - severity * rand(10, 15)
diff --git a/code/modules/antagonists/blob/overmind.dm b/code/modules/antagonists/blob/overmind.dm
index e1c09d065b7..9cdacdc9884 100644
--- a/code/modules/antagonists/blob/overmind.dm
+++ b/code/modules/antagonists/blob/overmind.dm
@@ -30,8 +30,8 @@ GLOBAL_LIST_EMPTY(blob_nodes)
var/list/resource_blobs = list()
var/free_strain_rerolls = 1 //one free strain reroll
var/last_reroll_time = 0 //time since we last rerolled, used to give free rerolls
- var/nodes_required = 1 //if the blob needs nodes to place resource and factory blobs
- var/placed = 0
+ var/nodes_required = TRUE //if the blob needs nodes to place resource and factory blobs
+ var/placed = FALSE
var/manualplace_min_time = 600 //in deciseconds //a minute, to get bearings
var/autoplace_max_time = 3600 //six minutes, as long as should be needed
var/list/blobs_legit = list()
@@ -271,13 +271,13 @@ GLOBAL_LIST_EMPTY(blob_nodes)
if(B)
forceMove(NewLoc)
else
- return 0
+ return FALSE
else
var/area/A = get_area(NewLoc)
if(isspaceturf(NewLoc) || istype(A, /area/shuttle)) //if unplaced, can't go on shuttles or space tiles
- return 0
+ return FALSE
forceMove(NewLoc)
- return 1
+ return TRUE
/mob/camera/blob/mind_initialize()
. = ..()
diff --git a/code/modules/antagonists/blob/powers.dm b/code/modules/antagonists/blob/powers.dm
index 1e542f994c6..40de8330ce5 100644
--- a/code/modules/antagonists/blob/powers.dm
+++ b/code/modules/antagonists/blob/powers.dm
@@ -1,15 +1,15 @@
/mob/camera/blob/proc/can_buy(cost = 15)
if(blob_points < cost)
to_chat(src, "You cannot afford this, you need at least [cost] resources!")
- return 0
+ return FALSE
add_points(-cost)
- return 1
+ return TRUE
// Power verbs
/mob/camera/blob/proc/place_blob_core(placement_override, pop_override = FALSE)
if(placed && placement_override != -1)
- return 1
+ return TRUE
if(!placement_override)
if(!pop_override)
for(var/mob/living/M in range(7, src))
@@ -17,34 +17,34 @@
continue
if(M.client)
to_chat(src, "There is someone too close to place your blob core!")
- return 0
+ return FALSE
for(var/mob/living/M in view(13, src))
if(ROLE_BLOB in M.faction)
continue
if(M.client)
to_chat(src, "Someone could see your blob core from here!")
- return 0
+ return FALSE
var/turf/T = get_turf(src)
if(T.density)
to_chat(src, "This spot is too dense to place a blob core on!")
- return 0
+ return FALSE
var/area/A = get_area(T)
if(isspaceturf(T) || A && !(A.area_flags & BLOBS_ALLOWED))
to_chat(src, "You cannot place your core here!")
- return 0
+ return FALSE
for(var/obj/O in T)
if(istype(O, /obj/structure/blob))
if(istype(O, /obj/structure/blob/normal))
qdel(O)
else
to_chat(src, "There is already a blob here!")
- return 0
+ return FALSE
else if(O.density)
to_chat(src, "This spot is too dense to place a blob core on!")
- return 0
+ return FALSE
if(!pop_override && world.time <= manualplace_min_time && world.time <= autoplace_max_time)
to_chat(src, "It is too early to place your blob core!")
- return 0
+ return FALSE
else if(placement_override == 1)
var/turf/T = pick(GLOB.blobstart)
forceMove(T) //got overrided? you're somewhere random, motherfucker
@@ -58,7 +58,7 @@
core.update_icon()
update_health_hud()
placed = 1
- return 1
+ return TRUE
/mob/camera/blob/verb/transport_core()
set category = "Blob"
diff --git a/code/modules/antagonists/blob/structures/_blob.dm b/code/modules/antagonists/blob/structures/_blob.dm
index 086f3835a02..6336fa4c7a1 100644
--- a/code/modules/antagonists/blob/structures/_blob.dm
+++ b/code/modules/antagonists/blob/structures/_blob.dm
@@ -129,8 +129,8 @@
heal_timestamp = world.time + 20
update_icon()
pulse_timestamp = world.time + 10
- return 1 //we did it, we were pulsed!
- return 0 //oh no we failed
+ return TRUE//we did it, we were pulsed!
+ return FALSE //oh no we failed
/obj/structure/blob/proc/ConsumeTile()
for(var/atom/A in loc)
@@ -163,7 +163,7 @@
else
T = null
if(!T)
- return 0
+ return
var/make_blob = TRUE //can we make a blob?
if(isspaceturf(T) && !(locate(/obj/structure/lattice) in T) && prob(80))
@@ -193,10 +193,10 @@
blob_attack_animation(T, controller)
T.blob_act(src) //if we can't move in hit the turf again
qdel(B) //we should never get to this point, since we checked before moving in. destroy the blob so we don't have two blobs on one tile
- return null
+ return
else
blob_attack_animation(T, controller) //if we can't, animate that we attacked
- return null
+ return
/obj/structure/blob/emp_act(severity)
. = ..()
diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm
index b9feb88dece..0801c30a09f 100644
--- a/code/modules/antagonists/changeling/changeling.dm
+++ b/code/modules/antagonists/changeling/changeling.dm
@@ -31,8 +31,8 @@
var/changelingID = "Changeling"
var/geneticdamage = 0
var/was_absorbed = FALSE //if they were absorbed by another ling already.
- var/isabsorbing = 0
- var/islinking = 0
+ var/isabsorbing = FALSE
+ var/islinking = FALSE
var/geneticpoints = 10
var/total_geneticspoints = 10
var/total_chem_storage = 75
@@ -210,12 +210,12 @@
if(canrespec)
to_chat(owner.current, "We have removed our evolutions from this form, and are now ready to readapt.")
reset_powers()
- canrespec = 0
+ canrespec = FALSE
SSblackbox.record_feedback("tally", "changeling_power_purchase", 1, "Readapt")
- return 1
+ return TRUE
else
to_chat(owner.current, "You lack the power to readapt your evolutions!")
- return 0
+ return FALSE
//Called in life()
/datum/antagonist/changeling/proc/regenerate()//grants the HuD in life.dm
@@ -276,7 +276,7 @@
if(verbose)
to_chat(user, "[target] is not compatible with our biology.")
return
- return 1
+ return TRUE
/datum/antagonist/changeling/proc/create_profile(mob/living/carbon/human/H, protect = 0)
@@ -348,8 +348,8 @@
var/datum/changelingprofile/removeprofile = get_profile_to_remove()
if(removeprofile)
stored_profiles -= removeprofile
- return 1
- return 0
+ return TRUE
+ return FALSE
/datum/antagonist/changeling/proc/create_initial_profile()
@@ -562,9 +562,9 @@
/datum/antagonist/changeling/roundend_report()
var/list/parts = list()
- var/changelingwin = 1
+ var/changelingwin = TRUE
if(!owner.current)
- changelingwin = 0
+ changelingwin = FALSE
parts += printplayer(owner)
@@ -579,7 +579,7 @@
parts += "Objective #[count]: [objective.explanation_text] Success!"
else
parts += "Objective #[count]: [objective.explanation_text] Fail."
- changelingwin = 0
+ changelingwin = FALSE
count++
if(changelingwin)
diff --git a/code/modules/antagonists/changeling/changeling_power.dm b/code/modules/antagonists/changeling/changeling_power.dm
index c03f817b43e..4df63b04377 100644
--- a/code/modules/antagonists/changeling/changeling_power.dm
+++ b/code/modules/antagonists/changeling/changeling_power.dm
@@ -58,10 +58,10 @@ the same goes for Remove(). if you override Remove(), call parent or else your p
/datum/action/changeling/proc/sting_action(mob/user, mob/target)
SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]"))
- return 0
+ return FALSE
/datum/action/changeling/proc/sting_feedback(mob/user, mob/target)
- return 0
+ return FALSE
//Fairly important to remember to return 1 on success >.<
@@ -91,7 +91,7 @@ the same goes for Remove(). if you override Remove(), call parent or else your p
/datum/action/changeling/proc/can_be_used_by(mob/user)
if(!user || QDELETED(user))
- return 0
+ return FALSE
if(!ishuman(user) && !ismonkey(user))
return FALSE
if(req_human && !ishuman(user))
diff --git a/code/modules/antagonists/changeling/powers/headcrab.dm b/code/modules/antagonists/changeling/powers/headcrab.dm
index 05bb3558a2e..22cad0e0b7e 100644
--- a/code/modules/antagonists/changeling/powers/headcrab.dm
+++ b/code/modules/antagonists/changeling/powers/headcrab.dm
@@ -38,6 +38,6 @@
I.forceMove(crab)
crab.origin = M
if(crab.origin)
- crab.origin.active = 1
+ crab.origin.active = TRUE
crab.origin.transfer_to(crab)
to_chat(crab, "You burst out of the remains of your former body in a shower of gore!")
diff --git a/code/modules/antagonists/changeling/powers/tiny_prick.dm b/code/modules/antagonists/changeling/powers/tiny_prick.dm
index dc2db854d48..0d73cc096f5 100644
--- a/code/modules/antagonists/changeling/powers/tiny_prick.dm
+++ b/code/modules/antagonists/changeling/powers/tiny_prick.dm
@@ -87,12 +87,13 @@
..()
/datum/action/changeling/sting/transformation/can_sting(mob/user, mob/living/carbon/target)
- if(!..())
+ . = ..()
+ if(!.)
return
if((HAS_TRAIT(target, TRAIT_HUSK)) || !iscarbon(target) || (NOTRANSSTING in target.dna.species.species_traits))
to_chat(user, "Our sting appears ineffective against its DNA.")
- return 0
- return 1
+ return FALSE
+ return TRUE
/datum/action/changeling/sting/transformation/sting_action(mob/user, mob/target)
log_combat(user, target, "stung", "transformation sting", " new identity is '[selected_dna.dna.real_name]'")
@@ -130,8 +131,8 @@
var/mob/living/L = target
if((HAS_TRAIT(L, TRAIT_HUSK)) || !L.has_dna())
to_chat(user, "Our sting appears ineffective against its DNA.")
- return 0
- return 1
+ return FALSE
+ return TRUE
/datum/action/changeling/sting/false_armblade/sting_action(mob/user, mob/target)
log_combat(user, target, "stung", object="false armblade sting")
diff --git a/code/modules/antagonists/cult/cult.dm b/code/modules/antagonists/cult/cult.dm
index 6ab1d073506..0b030b5e9fb 100644
--- a/code/modules/antagonists/cult/cult.dm
+++ b/code/modules/antagonists/cult/cult.dm
@@ -91,7 +91,7 @@
var/where = mob.equip_in_one_of_slots(T, slots)
if(!where)
to_chat(mob, "Unfortunately, you weren't able to get a [item_name]. This is very bad and you should adminhelp immediately (press F1).")
- return 0
+ return FALSE
else
to_chat(mob, "You have a [item_name] in your [where].")
if(where == "backpack")
diff --git a/code/modules/antagonists/cult/cult_comms.dm b/code/modules/antagonists/cult/cult_comms.dm
index 525457fcbbb..7310dc225f5 100644
--- a/code/modules/antagonists/cult/cult_comms.dm
+++ b/code/modules/antagonists/cult/cult_comms.dm
@@ -141,7 +141,7 @@
/datum/action/innate/cult/master/IsAvailable()
if(!owner.mind || !owner.mind.has_antag_datum(/datum/antagonist/cult/master) || GLOB.cult_narsie)
- return 0
+ return FALSE
return ..()
/datum/action/innate/cult/master/finalreck
diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm
index 17382d0e888..d7ff7ad1411 100644
--- a/code/modules/antagonists/cult/cult_items.dm
+++ b/code/modules/antagonists/cult/cult_items.dm
@@ -402,8 +402,8 @@
if(!current_charges)
owner.visible_message("The runed shield around [owner] suddenly disappears!")
owner.update_inv_wear_suit()
- return 1
- return 0
+ return TRUE
+ return FALSE
/obj/item/clothing/suit/hooded/cultrobes/cult_shield/worn_overlays(isinhands)
. = list()
diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm
index f3865f348df..a51cd0bb8aa 100644
--- a/code/modules/antagonists/cult/runes.dm
+++ b/code/modules/antagonists/cult/runes.dm
@@ -230,12 +230,12 @@ structure_check() searches for nearby cultist structures required for the invoca
for(var/M in invokers)
to_chat(M, "You need at least two invokers to convert [convertee]!")
log_game("Offer rune failed - tried conversion with one invoker")
- return 0
+ return FALSE
if(convertee.anti_magic_check(TRUE, TRUE, FALSE, 0)) //Not chargecost because it can be spammed
for(var/M in invokers)
to_chat(M, "Something is shielding [convertee]'s mind!")
log_game("Offer rune failed - convertee had anti-magic")
- return 0
+ return FALSE
var/brutedamage = convertee.getBruteLoss()
var/burndamage = convertee.getFireLoss()
if(brutedamage || burndamage)
@@ -258,7 +258,7 @@ structure_check() searches for nearby cultist structures required for the invoca
H.cultslurring = 0
if(prob(1) || SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
H.say("You son of a bitch! I'm in.", forced = "That son of a bitch! They're in.")
- return 1
+ return TRUE
/obj/effect/rune/convert/proc/do_sacrifice(mob/living/sacrificial, list/invokers)
var/mob/living/first_invoker = invokers[1]
diff --git a/code/modules/antagonists/devil/devil.dm b/code/modules/antagonists/devil/devil.dm
index 1f5f68a39f7..0add4f4a825 100644
--- a/code/modules/antagonists/devil/devil.dm
+++ b/code/modules/antagonists/devil/devil.dm
@@ -386,43 +386,43 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
if(iscarbon(body))
var/mob/living/carbon/H = body
return H.reagents.has_reagent(/datum/reagent/water/holywater)
- return 0
+ return FALSE
if(BANISH_COFFIN)
return (body && istype(body.loc, /obj/structure/closet/crate/coffin))
if(BANISH_FORMALDYHIDE)
if(iscarbon(body))
var/mob/living/carbon/H = body
return H.reagents.has_reagent(/datum/reagent/toxin/formaldehyde)
- return 0
+ return FALSE
if(BANISH_RUNES)
if(body)
for(var/obj/effect/decal/cleanable/crayon/R in range(0,body))
if (R.name == "rune")
- return 1
- return 0
+ return TRUE
+ return FALSE
if(BANISH_CANDLES)
if(body)
var/count = 0
for(var/obj/item/candle/C in range(1,body))
count += C.lit
if(count>=4)
- return 1
- return 0
+ return TRUE
+ return FALSE
if(BANISH_DESTRUCTION)
if(body)
- return 0
- return 1
+ return FALSE
+ return TRUE
if(BANISH_FUNERAL_GARB)
if(ishuman(body))
var/mob/living/carbon/human/H = body
if(H.w_uniform && istype(H.w_uniform, /obj/item/clothing/under/misc/burial))
- return 1
- return 0
+ return TRUE
+ return FALSE
else
for(var/obj/item/clothing/under/misc/burial/B in range(0,body))
if(B.loc == get_turf(B)) //Make sure it's not in someone's inventory or something.
- return 1
- return 0
+ return TRUE
+ return FALSE
/datum/antagonist/devil/proc/hellish_resurrection(mob/living/body)
message_admins("[key_name_admin(owner)] (true name is: [truename]) is resurrecting using hellish energy.")
diff --git a/code/modules/antagonists/devil/true_devil/_true_devil.dm b/code/modules/antagonists/devil/true_devil/_true_devil.dm
index a937c9c39de..eed7939a691 100644
--- a/code/modules/antagonists/devil/true_devil/_true_devil.dm
+++ b/code/modules/antagonists/devil/true_devil/_true_devil.dm
@@ -119,7 +119,7 @@
return ..() //flashes don't stop devils UNLESS it's their bane.
/mob/living/carbon/true_devil/soundbang_act()
- return 0
+ return FALSE
/mob/living/carbon/true_devil/get_ear_protection()
return 2
@@ -146,7 +146,7 @@
/mob/living/carbon/true_devil/singularity_act()
if(ascended)
- return 0
+ return FALSE
return ..()
//ATTACK GHOST IGNORING PARENT RETURN VALUE
diff --git a/code/modules/antagonists/devil/true_devil/inventory.dm b/code/modules/antagonists/devil/true_devil/inventory.dm
index a3d0dbdf582..b680a2c10e2 100644
--- a/code/modules/antagonists/devil/true_devil/inventory.dm
+++ b/code/modules/antagonists/devil/true_devil/inventory.dm
@@ -1,8 +1,7 @@
/mob/living/carbon/true_devil/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, silent = FALSE)
- if(..())
+ . = ..()
+ if(.)
update_inv_hands()
- return 1
- return 0
/mob/living/carbon/true_devil/update_inv_hands()
//TODO LORDPIDEY: Figure out how to make the hands line up properly. the l/r_hand_overlay should use the down sprite when facing down, left, or right, and the up sprite when facing up.
diff --git a/code/modules/antagonists/eldritch_cult/eldritch_magic.dm b/code/modules/antagonists/eldritch_cult/eldritch_magic.dm
index ebcd4d8a290..f654cd25aba 100644
--- a/code/modules/antagonists/eldritch_cult/eldritch_magic.dm
+++ b/code/modules/antagonists/eldritch_cult/eldritch_magic.dm
@@ -354,7 +354,7 @@
new /obj/effect/hotspot(T)
T.hotspot_expose(700,50,1)
// deals damage to mechs
- for(var/obj/mecha/M in T.contents)
+ for(var/obj/vehicle/sealed/mecha/M in T.contents)
if(M in hit_list)
continue
hit_list += M
diff --git a/code/modules/antagonists/morph/morph.dm b/code/modules/antagonists/morph/morph.dm
index d6a9d9ee728..f2afc164eb1 100644
--- a/code/modules/antagonists/morph/morph.dm
+++ b/code/modules/antagonists/morph/morph.dm
@@ -230,7 +230,7 @@
var/mob/dead/selected = pick_n_take(candidates)
var/datum/mind/player_mind = new /datum/mind(selected.key)
- player_mind.active = 1
+ player_mind.active = TRUE
if(!GLOB.xeno_spawn)
return MAP_ERROR
var/mob/living/simple_animal/hostile/morph/S = new /mob/living/simple_animal/hostile/morph(pick(GLOB.xeno_spawn))
diff --git a/code/modules/antagonists/ninja/ninja.dm b/code/modules/antagonists/ninja/ninja.dm
index 3a1c8fec4d3..110673043ae 100644
--- a/code/modules/antagonists/ninja/ninja.dm
+++ b/code/modules/antagonists/ninja/ninja.dm
@@ -38,9 +38,9 @@
if(M.current && M.current.stat != DEAD)
if(ishuman(M.current))
if(M.special_role)
- possible_targets[M] = 0 //bad-guy
+ possible_targets[M] = FALSE //bad-guy
else if(M.assigned_role in GLOB.command_positions)
- possible_targets[M] = 1 //good-guy
+ possible_targets[M] = TRUE //good-guy
var/list/possible_objectives = list(1,2,3,4)
diff --git a/code/modules/antagonists/revenant/revenant.dm b/code/modules/antagonists/revenant/revenant.dm
index 07a8f400276..475ed7ebbb7 100644
--- a/code/modules/antagonists/revenant/revenant.dm
+++ b/code/modules/antagonists/revenant/revenant.dm
@@ -223,7 +223,7 @@
/mob/living/simple_animal/revenant/death()
if(!revealed || stasis) //Revenants cannot die if they aren't revealed //or are already dead
- return 0
+ return
stasis = TRUE
to_chat(src, "NO! No... it's too late, you can feel your essence [pick("breaking apart", "drifting away")]...")
notransform = TRUE
diff --git a/code/modules/antagonists/slaughter/slaughterevent.dm b/code/modules/antagonists/slaughter/slaughterevent.dm
index aeda14e67fd..8015b9d6a71 100644
--- a/code/modules/antagonists/slaughter/slaughterevent.dm
+++ b/code/modules/antagonists/slaughter/slaughterevent.dm
@@ -20,7 +20,7 @@
var/mob/dead/selected = pick_n_take(candidates)
var/datum/mind/player_mind = new /datum/mind(selected.key)
- player_mind.active = 1
+ player_mind.active = TRUE
var/list/spawn_locs = list()
for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list)
diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm
index d2979a59c91..7afcf80b6c8 100644
--- a/code/modules/antagonists/wizard/equipment/artefact.dm
+++ b/code/modules/antagonists/wizard/equipment/artefact.dm
@@ -20,7 +20,7 @@
var/spawn_amt = 1
var/activate_descriptor = "reality"
var/rend_desc = "You should run now."
- var/spawn_fast = 0 //if 1, ignores checking for mobs on loc before spawning
+ var/spawn_fast = FALSE //if TRUE, ignores checking for mobs on loc before spawning
/obj/item/veilrender/attack_self(mob/user)
if(charges > 0)
@@ -39,7 +39,7 @@
anchored = TRUE
var/spawn_path = /mob/living/simple_animal/cow //defaulty cows to prevent unintentional narsies
var/spawn_amt_left = 20
- var/spawn_fast = 0
+ var/spawn_fast = FALSE
/obj/effect/rend/New(loc, spawn_type, spawn_amt, desc, spawn_fast)
src.spawn_path = spawn_type
diff --git a/code/modules/antagonists/wizard/equipment/soulstone.dm b/code/modules/antagonists/wizard/equipment/soulstone.dm
index 4c199645448..d799ef67981 100644
--- a/code/modules/antagonists/wizard/equipment/soulstone.dm
+++ b/code/modules/antagonists/wizard/equipment/soulstone.dm
@@ -297,7 +297,7 @@
newstruct.cancel_camera()
-/obj/item/soulstone/proc/init_shade(mob/living/carbon/human/T, mob/user, message_user = 0 , mob/shade_controller)
+/obj/item/soulstone/proc/init_shade(mob/living/carbon/human/T, mob/user, message_user = FALSE, mob/shade_controller)
if(!shade_controller)
shade_controller = T
new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton
diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
index 9b7eceb05be..d32f929861b 100644
--- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
+++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
@@ -285,7 +285,7 @@
var/const/PROBABILITY_OFFSET = 25
var/const/PROBABILITY_BASE_PRECENT = 75
var/max_force = sqrt(pressure_difference)*(MOVE_FORCE_DEFAULT / 5)
- set waitfor = 0
+ set waitfor = FALSE
var/move_prob = 100
if (pressure_resistance > 0)
move_prob = (pressure_difference/pressure_resistance*PROBABILITY_BASE_PRECENT)-PROBABILITY_OFFSET
diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
index 3939dba778a..20fb522d66e 100644
--- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm
+++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
@@ -105,7 +105,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
/// Calculate pressure in kilopascals
/datum/gas_mixture/proc/return_pressure()
- if(volume > 0) // to prevent division by zero
+ if(volume) // to prevent division by zero
var/cached_gases = gases
TOTAL_MOLES(cached_gases, .)
. *= R_IDEAL_GAS_EQUATION * temperature / volume
@@ -132,12 +132,12 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
for(var/id in cached_gases)
cached_gases[id][ARCHIVE] = cached_gases[id][MOLES]
- return 1
+ return TRUE
///Merges all air from giver into self. Deletes giver. Returns: 1 if we are mutable, 0 otherwise
/datum/gas_mixture/proc/merge(datum/gas_mixture/giver)
if(!giver)
- return 0
+ return FALSE
//heat transfer
if(abs(temperature - giver.temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
@@ -154,7 +154,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
ASSERT_GAS(giver_id, src)
cached_gases[giver_id][MOLES] += giver_gases[giver_id][MOLES]
- return 1
+ return TRUE
///Proportionally removes amount of gas from the gas_mixture.
///Returns: gas_mixture with the gases removed
diff --git a/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm b/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm
index dcea095d3cd..66ed5bc1c62 100644
--- a/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm
+++ b/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm
@@ -15,29 +15,29 @@
gases.Cut()
/datum/gas_mixture/immutable/archive()
- return 1 //nothing changes, so we do nothing and the archive is successful
+ return TRUE //nothing changes, so we do nothing and the archive is successful
/datum/gas_mixture/immutable/merge()
- return 0 //we're immutable.
+ return FALSE //we're immutable.
/datum/gas_mixture/immutable/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
. = ..(sharer, 0)
garbage_collect()
/datum/gas_mixture/immutable/react()
- return 0 //we're immutable.
+ return FALSE //we're immutable.
/datum/gas_mixture/immutable/copy()
return new type //we're immutable, so we can just return a new instance.
/datum/gas_mixture/immutable/copy_from()
- return 0 //we're immutable.
+ return FALSE //we're immutable.
/datum/gas_mixture/immutable/copy_from_turf()
- return 0 //we're immutable.
+ return FALSE //we're immutable.
/datum/gas_mixture/immutable/parse_gas_string()
- return 0 //we're immutable.
+ return FALSE //we're immutable.
/datum/gas_mixture/immutable/temperature_share(datum/gas_mixture/sharer, conduction_coefficient, sharer_temperature, sharer_heat_capacity)
. = ..()
diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm
index d2111fb14c6..1b9e2eb0e22 100644
--- a/code/modules/atmospherics/gasmixtures/reactions.dm
+++ b/code/modules/atmospherics/gasmixtures/reactions.dm
@@ -250,8 +250,8 @@ nobiliumsuppression = INFINITY
ASSERT_GAS(/datum/gas/tritium, air)
cached_gases[/datum/gas/tritium][MOLES] += plasma_burn_rate
else
- ASSERT_GAS(/datum/gas/carbon_dioxide, air)
- ASSERT_GAS(/datum/gas/water_vapor, air)
+ ASSERT_GAS(/datum/gas/carbon_dioxide,air)
+ ASSERT_GAS(/datum/gas/water_vapor,air)
cached_gases[/datum/gas/carbon_dioxide][MOLES] += plasma_burn_rate * 0.75
cached_gases[/datum/gas/water_vapor][MOLES] += plasma_burn_rate * 0.25
diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm
index 679286e20c4..261565e7ee9 100644
--- a/code/modules/atmospherics/machinery/airalarm.dm
+++ b/code/modules/atmospherics/machinery/airalarm.dm
@@ -463,16 +463,16 @@
/obj/machinery/airalarm/proc/shock(mob/user, prb)
if((machine_stat & (NOPOWER))) // unpowered, no shock
- return 0
+ return FALSE
if(!prob(prb))
- return 0 //you lucked out, no shock for you
+ return FALSE //you lucked out, no shock for you
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, src)
s.start() //sparks always.
if (electrocute_mob(user, get_area(src), src, 1, TRUE))
- return 1
+ return TRUE
else
- return 0
+ return FALSE
/obj/machinery/airalarm/proc/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
@@ -481,7 +481,7 @@
/obj/machinery/airalarm/proc/send_signal(target, list/command, atom/user)//sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise
if(!radio_connection)
- return 0
+ return FALSE
var/datum/signal/signal = new(command)
signal.data["tag"] = target
@@ -489,7 +489,7 @@
signal.data["user"] = user
radio_connection.post_signal(src, signal, RADIO_FROM_AIRALARM)
- return 1
+ return TRUE
/obj/machinery/airalarm/proc/get_mode_name(mode_value)
switch(mode_value)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm b/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm
new file mode 100644
index 00000000000..f378009a0b5
--- /dev/null
+++ b/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm
@@ -0,0 +1,176 @@
+/obj/machinery/atmospherics/components/binary/pressure_valve
+ icon_state = "pvalve_map-2"
+ name = "pressure valve"
+ desc = "An activable valve that let gas pass through if the pressure on the input side is higher than the set pressure."
+
+ can_unwrench = TRUE
+ shift_underlay_only = FALSE
+
+ ///Amount of pressure needed before the valve for it to open
+ var/target_pressure = ONE_ATMOSPHERE
+ ///Frequency for radio signaling
+ var/frequency = 0
+ ///ID for radio signaling
+ var/id = null
+ ///Connection to the radio processing
+ var/datum/radio_frequency/radio_connection
+ ///Check if the gas is moving from one pipenet to the other
+ var/is_gas_flowing = FALSE
+
+ construction_type = /obj/item/pipe/directional
+ pipe_state = "pvalve"
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/CtrlClick(mob/user)
+ if(can_interact(user))
+ on = !on
+ investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS)
+ update_icon()
+ return ..()
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/AltClick(mob/user)
+ if(can_interact(user))
+ target_pressure = MAX_OUTPUT_PRESSURE
+ investigate_log("was set to [target_pressure] kPa by [key_name(user)]", INVESTIGATE_ATMOS)
+ update_icon()
+ return ..()
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/Destroy()
+ SSradio.remove_object(src,frequency)
+ if(radio_connection)
+ radio_connection = null
+ return ..()
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/update_icon_nopipes()
+ if(on && is_operational && is_gas_flowing)
+ icon_state = "pvalve_flow"
+ else if(on && is_operational && !is_gas_flowing)
+ icon_state = "pvalve_on"
+ else
+ icon_state = "pvalve_off"
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/process_atmos()
+
+ if(!on || !is_operational)
+ return
+
+ var/datum/gas_mixture/air1 = airs[1]
+ var/datum/gas_mixture/air2 = airs[2]
+
+ if(air1.return_pressure() > target_pressure)
+ if(air1.pump_gas_to(air2, air1.return_pressure()))
+ update_parents()
+ is_gas_flowing = TRUE
+ update_icon_nopipes()
+ else
+ is_gas_flowing = FALSE
+ update_icon_nopipes()
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/proc/set_frequency(new_frequency)
+ SSradio.remove_object(src, frequency)
+ frequency = new_frequency
+ if(frequency)
+ radio_connection = SSradio.add_object(src, frequency, filter = RADIO_ATMOSIA)
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/proc/broadcast_status()
+ if(!radio_connection)
+ return
+
+ var/datum/signal/signal = new(list(
+ "tag" = id,
+ "device" = "AGP",
+ "power" = on,
+ "target_output" = target_pressure,
+ "sigtype" = "status"
+ ))
+ radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/ui_interact(mob/user, datum/tgui/ui)
+ ui = SStgui.try_update_ui(user, src, ui)
+ if(!ui)
+ ui = new(user, src, "AtmosPump", name)
+ ui.open()
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/ui_data()
+ var/data = list()
+ data["on"] = on
+ data["pressure"] = round(target_pressure)
+ data["max_pressure"] = round(MAX_OUTPUT_PRESSURE)
+ return data
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/ui_act(action, params)
+ if(..())
+ return
+ switch(action)
+ if("power")
+ on = !on
+ investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", INVESTIGATE_ATMOS)
+ . = TRUE
+ if("pressure")
+ var/pressure = params["pressure"]
+ if(pressure == "max")
+ pressure = MAX_OUTPUT_PRESSURE
+ . = TRUE
+ else if(text2num(pressure) != null)
+ pressure = text2num(pressure)
+ . = TRUE
+ if(.)
+ target_pressure = clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
+ investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
+ update_icon()
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/atmosinit()
+ . = ..()
+ if(frequency)
+ set_frequency(frequency)
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/receive_signal(datum/signal/signal)
+ if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
+ return
+
+ var/old_on = on //for logging
+
+ if("power" in signal.data)
+ on = text2num(signal.data["power"])
+
+ if("power_toggle" in signal.data)
+ on = !on
+
+ if("set_output_pressure" in signal.data)
+ target_pressure = clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
+
+ if(on != old_on)
+ investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
+
+ if("status" in signal.data)
+ broadcast_status()
+ return
+
+ broadcast_status()
+ update_icon()
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/can_unwrench(mob/user)
+ . = ..()
+ if(. && on && is_operational)
+ to_chat(user, "You cannot unwrench [src], turn it off first!")
+ return FALSE
+
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/layer1
+ piping_layer = 1
+ icon_state= "pvalve_map-1"
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/layer3
+ piping_layer = 3
+ icon_state= "pvalve_map-3"
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/on
+ on = TRUE
+ icon_state = "pvalve_on_map-2"
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/on/layer1
+ piping_layer = 1
+ icon_state= "pvalve_on_map-1"
+
+/obj/machinery/atmospherics/components/binary/pressure_valve/on/layer3
+ piping_layer = 3
+ icon_state= "pvalve_on_map-3"
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
index 4597c0cc401..db4b1dc8fd7 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
@@ -484,7 +484,7 @@
return // can't ventcrawl in or out of cryo.
/obj/machinery/atmospherics/components/unary/cryo_cell/can_see_pipes()
- return 0 // you can't see the pipe network when inside a cryo cell.
+ return FALSE // you can't see the pipe network when inside a cryo cell.
/obj/machinery/atmospherics/components/unary/cryo_cell/return_temperature()
var/datum/gas_mixture/G = airs[1]
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
index 260c8a589dd..483d86b91aa 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
@@ -218,7 +218,7 @@
/obj/machinery/atmospherics/components/unary/vent_scrubber/receive_signal(datum/signal/signal)
if(!is_operational || !signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
- return 0
+ return
var/atom/signal_sender = signal.data["user"]
diff --git a/code/modules/atmospherics/machinery/other/meter.dm b/code/modules/atmospherics/machinery/other/meter.dm
index 17687f5f5d6..854fa43d406 100644
--- a/code/modules/atmospherics/machinery/other/meter.dm
+++ b/code/modules/atmospherics/machinery/other/meter.dm
@@ -18,6 +18,12 @@
/obj/machinery/meter/atmos
frequency = FREQ_ATMOS_STORAGE
+/obj/machinery/meter/atmos/layer1
+ target_layer = 1
+
+/obj/machinery/meter/atmos/layer3
+ target_layer = 3
+
/obj/machinery/meter/atmos/atmos_waste_loop
name = "waste loop gas flow meter"
id_tag = ATMOS_GAS_MONITOR_LOOP_ATMOS_WASTE
@@ -55,18 +61,18 @@
/obj/machinery/meter/process_atmos()
if(!(target?.flags_1 & INITIALIZED_1))
icon_state = "meterX"
- return 0
+ return FALSE
if(machine_stat & (BROKEN|NOPOWER))
icon_state = "meter0"
- return 0
+ return FALSE
use_power(5)
var/datum/gas_mixture/environment = target.return_air()
if(!environment)
icon_state = "meterX"
- return 0
+ return FALSE
var/env_pressure = environment.return_pressure()
if(env_pressure <= 0.15*ONE_ATMOSPHERE)
diff --git a/code/modules/atmospherics/machinery/pipes/pipes.dm b/code/modules/atmospherics/machinery/pipes/pipes.dm
index a8db804a537..55f39a55506 100644
--- a/code/modules/atmospherics/machinery/pipes/pipes.dm
+++ b/code/modules/atmospherics/machinery/pipes/pipes.dm
@@ -8,8 +8,8 @@
var/datum/pipeline/parent = null
//Buckling
- can_buckle = 1
- buckle_requires_restraints = 1
+ can_buckle = TRUE
+ buckle_requires_restraints = TRUE
buckle_lying = -1
/obj/machinery/atmospherics/pipe/New()
diff --git a/code/modules/awaymissions/mission_code/Academy.dm b/code/modules/awaymissions/mission_code/Academy.dm
index 0d8c5fcd0fe..2c93f33367e 100644
--- a/code/modules/awaymissions/mission_code/Academy.dm
+++ b/code/modules/awaymissions/mission_code/Academy.dm
@@ -62,9 +62,9 @@
/obj/singularity/academy
- dissipate = 0
- move_self = 0
- grav_pull = 1
+ dissipate = FALSE
+ move_self = FALSE
+ grav_pull = TRUE
/obj/singularity/academy/admin_investigate_setup()
return
diff --git a/code/modules/awaymissions/mission_code/Cabin.dm b/code/modules/awaymissions/mission_code/Cabin.dm
index 5194b7348e2..33dfa19b508 100644
--- a/code/modules/awaymissions/mission_code/Cabin.dm
+++ b/code/modules/awaymissions/mission_code/Cabin.dm
@@ -122,8 +122,8 @@
/datum/map_generator_module/snow/checkPlaceAtom(turf/T)
if(istype(T, /turf/open/floor/plating/asteroid/snow))
- return ..(T)
- return 0
+ return ..()
+ return FALSE
/datum/map_generator_module/bottomlayer/snow
spawnableTurfs = list(/turf/open/floor/plating/asteroid/snow/atmosphere = 100)
diff --git a/code/modules/awaymissions/mission_code/stationCollision.dm b/code/modules/awaymissions/mission_code/stationCollision.dm
index c13dda15ba0..4858ec39ddb 100644
--- a/code/modules/awaymissions/mission_code/stationCollision.dm
+++ b/code/modules/awaymissions/mission_code/stationCollision.dm
@@ -43,8 +43,7 @@
name ="retro laser"
icon_state = "retro"
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's security or military forces."
-// projectile_type = "/obj/projectile/practice"
- clumsy_check = 0 //No sense in having a harmless gun blow up in the clowns face
+ clumsy_check = FALSE //No sense in having a harmless gun blow up in the clowns face
//Syndicate sub-machine guns.
/obj/item/gun/ballistic/automatic/c20r/sc_c20r
@@ -68,7 +67,7 @@
/obj/item/gun/energy/laser/practice/sc_laser
name = "Old laser"
desc = "A once potent weapon, years of dust have collected in the chamber and lens of this weapon, weakening the beam significantly."
- clumsy_check = 0
+ clumsy_check = FALSE
/*
* Safe code hints
diff --git a/code/modules/cargo/bounties/chef.dm b/code/modules/cargo/bounties/chef.dm
index 8689946cfeb..e31d816aa6c 100644
--- a/code/modules/cargo/bounties/chef.dm
+++ b/code/modules/cargo/bounties/chef.dm
@@ -69,7 +69,7 @@
name = "Super Bite Burger"
description = "Commander Tubbs thinks he can set a competitive eating world record. All he needs is a super bite burger shipped to him."
reward = 12000
- wanted_types = list(/obj/item/reagent_containers/food/snacks/burger/superbite)
+ wanted_types = list(/obj/item/food/burger/superbite)
/datum/bounty/item/chef/poppypretzel
name = "Poppy Pretzel"
diff --git a/code/modules/cargo/bounties/mech.dm b/code/modules/cargo/bounties/mech.dm
index 4b73dd51abc..3651be1af4e 100644
--- a/code/modules/cargo/bounties/mech.dm
+++ b/code/modules/cargo/bounties/mech.dm
@@ -5,8 +5,8 @@
/datum/bounty/item/mech/ship(obj/O)
if(!applies_to(O))
return
- if(istype(O, /obj/mecha))
- var/obj/mecha/M = O
+ if(istype(O, /obj/vehicle/sealed/mecha))
+ var/obj/vehicle/sealed/mecha/M = O
M.wreckage = null // So the mech doesn't explode.
..()
@@ -16,24 +16,24 @@
/datum/bounty/item/mech/ripleymkii
name = "APLU MK-II \"Ripley\""
reward = 13000
- wanted_types = list(/obj/mecha/working/ripley/mkii)
+ wanted_types = list(/obj/vehicle/sealed/mecha/working/ripley/mkii)
/datum/bounty/item/mech/clarke
name = "Clarke"
reward = 16000
- wanted_types = list(/obj/mecha/working/clarke)
+ wanted_types = list(/obj/vehicle/sealed/mecha/working/clarke)
/datum/bounty/item/mech/odysseus
name = "Odysseus"
reward = 11000
- wanted_types = list(/obj/mecha/medical/odysseus)
+ wanted_types = list(/obj/vehicle/sealed/mecha/medical/odysseus)
/datum/bounty/item/mech/gygax
name = "Gygax"
reward = 28000
- wanted_types = list(/obj/mecha/combat/gygax)
+ wanted_types = list(/obj/vehicle/sealed/mecha/combat/gygax)
/datum/bounty/item/mech/durand
name = "Durand"
reward = 20000
- wanted_types = list(/obj/mecha/combat/durand)
+ wanted_types = list(/obj/vehicle/sealed/mecha/combat/durand)
diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm
index 03fa982b2a1..923882a4f14 100644
--- a/code/modules/client/client_procs.dm
+++ b/code/modules/client/client_procs.dm
@@ -125,8 +125,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
/client/proc/is_content_unlocked()
if(!prefs.unlock_content)
to_chat(src, "Become a BYOND member to access member-perks and features, as well as support the engine that makes this game possible. Only 10 bucks for 3 months! Click Here to find out more.")
- return 0
- return 1
+ return FALSE
+ return TRUE
/*
* Call back proc that should be checked in all paths where a client can send messages
*
@@ -157,11 +157,11 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
total_message_count = 0
total_count_reset = 0
cmd_admin_mute(src, mute_type, 1)
- return 1
+ return TRUE
//Otherwise just supress the message
else if(cache >= SPAM_TRIGGER_AUTOMUTE)
- return 1
+ return TRUE
if(CONFIG_GET(flag/automute_on) && !holder && last_message == message)
@@ -169,21 +169,21 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if(src.last_message_count >= SPAM_TRIGGER_AUTOMUTE)
to_chat(src, "You have exceeded the spam filter limit for identical messages. An auto-mute was applied.")
cmd_admin_mute(src, mute_type, 1)
- return 1
+ return TRUE
if(src.last_message_count >= SPAM_TRIGGER_WARNING)
to_chat(src, "You are nearing the spam filter limit for identical messages.")
- return 0
+ return FALSE
else
last_message = message
src.last_message_count = 0
- return 0
+ return FALSE
//This stops files larger than UPLOAD_LIMIT being sent from client to server via input(), client.Import() etc.
/client/AllowUpload(filename, filelength)
if(filelength > UPLOAD_LIMIT)
to_chat(src, "Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT/1024]KiB.")
- return 0
- return 1
+ return FALSE
+ return TRUE
///////////
@@ -333,7 +333,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
to_chat(src, "Because you are an admin, you are being allowed to walk past this limitation, But it is still STRONGLY suggested you upgrade")
else
qdel(src)
- return 0
+ return
else if (byond_version < cwv) //We have words for this client.
if(CONFIG_GET(flag/client_warn_popup))
var/msg = "Your version of byond may be getting out of date:
"
@@ -353,11 +353,11 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if (!CONFIG_GET(flag/allow_webclient))
to_chat(src, "Web client is disabled")
qdel(src)
- return 0
+ return
if (CONFIG_GET(flag/webclient_only_byond_members) && !IsByondMember())
to_chat(src, "Sorry, but the web client is restricted to byond members only.")
qdel(src)
- return 0
+ return
if( (world.address == address || !address) && !GLOB.host )
GLOB.host = key
diff --git a/code/modules/client/verbs/suicide.dm b/code/modules/client/verbs/suicide.dm
index 625e448c5d0..0cf9013d364 100644
--- a/code/modules/client/verbs/suicide.dm
+++ b/code/modules/client/verbs/suicide.dm
@@ -1,4 +1,4 @@
-/mob/var/suiciding = 0
+/mob/var/suiciding = FALSE
/mob/proc/set_suicide(suicide_state)
suiciding = suicide_state
@@ -22,7 +22,7 @@
mmi.brainmob.suiciding = suicide_state
/mob/living/carbon/human/verb/suicide()
- set hidden = 1
+ set hidden = TRUE
if(!canSuicide())
return
var/oldkey = ckey
diff --git a/code/modules/clothing/gloves/_gloves.dm b/code/modules/clothing/gloves/_gloves.dm
index 20e557028f3..bce61a4adb1 100644
--- a/code/modules/clothing/gloves/_gloves.dm
+++ b/code/modules/clothing/gloves/_gloves.dm
@@ -38,4 +38,4 @@
// Called just before an attack_hand(), in mob/UnarmedAttack()
/obj/item/clothing/gloves/proc/Touch(atom/A, proximity)
- return 0 // return 1 to cancel attack_hand()
+ return FALSE // return 1 to cancel attack_hand()
diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm
index 76714b4b90a..77e52192d6c 100644
--- a/code/modules/clothing/head/misc_special.dm
+++ b/code/modules/clothing/head/misc_special.dm
@@ -120,7 +120,7 @@
icon_state = "ushankadown"
inhand_icon_state = "ushankadown"
flags_inv = HIDEEARS|HIDEHAIR
- var/earflaps = 1
+ var/earflaps = TRUE
cold_protection = HEAD
min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT
@@ -128,15 +128,14 @@
/obj/item/clothing/head/ushanka/attack_self(mob/user)
if(earflaps)
- src.icon_state = "ushankaup"
- src.inhand_icon_state = "ushankaup"
- earflaps = 0
+ icon_state = "ushankaup"
+ inhand_icon_state = "ushankaup"
to_chat(user, "You raise the ear flaps on the ushanka.")
else
- src.icon_state = "ushankadown"
- src.inhand_icon_state = "ushankadown"
- earflaps = 1
+ icon_state = "ushankadown"
+ inhand_icon_state = "ushankadown"
to_chat(user, "You lower the ear flaps on the ushanka.")
+ earflaps = !earflaps
/*
* Pumpkin head
diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm
index cfc90174c0b..80030e26cfa 100644
--- a/code/modules/clothing/head/soft_caps.dm
+++ b/code/modules/clothing/head/soft_caps.dm
@@ -7,11 +7,11 @@
dog_fashion = /datum/dog_fashion/head/cargo_tech
- var/flipped = 0
+ var/flipped = FALSE
/obj/item/clothing/head/soft/dropped()
icon_state = "[soft_type]soft"
- flipped=0
+ flipped = FALSE
..()
/obj/item/clothing/head/soft/verb/flipcap()
@@ -32,7 +32,7 @@
/obj/item/clothing/head/soft/proc/flip(mob/user)
if(!user.incapacitated())
flipped = !flipped
- if(src.flipped)
+ if(flipped)
icon_state = "[soft_type]soft_flipped"
to_chat(user, "You flip the hat backwards.")
else
diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm
index 4fc0dc41d93..1ccb2c3c176 100644
--- a/code/modules/clothing/masks/_masks.dm
+++ b/code/modules/clothing/masks/_masks.dm
@@ -6,7 +6,7 @@
strip_delay = 40
equip_delay_other = 40
var/modifies_speech = FALSE
- var/mask_adjusted = 0
+ var/mask_adjusted = FALSE
var/adjusted_flags = null
/obj/item/clothing/mask/attack_self(mob/user)
diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm
index 57d6a49e83a..ca8f591308e 100644
--- a/code/modules/clothing/shoes/_shoes.dm
+++ b/code/modules/clothing/shoes/_shoes.dm
@@ -3,7 +3,7 @@
icon = 'icons/obj/clothing/shoes.dmi'
desc = "Comfortable-looking shoes."
gender = PLURAL //Carn: for grammarically correct text-parsing
- var/chained = 0
+ var/chained = FALSE
body_parts_covered = FEET
slot_flags = ITEM_SLOT_FEET
diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm
index 15fe1838b0f..c3ea63da314 100644
--- a/code/modules/clothing/shoes/magboots.dm
+++ b/code/modules/clothing/shoes/magboots.dm
@@ -3,7 +3,7 @@
name = "magboots"
icon_state = "magboots0"
var/magboot_state = "magboots"
- var/magpulse = 0
+ var/magpulse = FALSE
var/slowdown_active = 2
permeability_coefficient = 0.05
actions_types = list(/datum/action/item_action/toggle)
diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm
index 4a612f9041e..383957b531e 100644
--- a/code/modules/clothing/spacesuits/chronosuit.dm
+++ b/code/modules/clothing/spacesuits/chronosuit.dm
@@ -30,10 +30,10 @@
var/obj/item/clothing/head/helmet/space/chronos/helmet
var/obj/effect/chronos_cam/camera
var/datum/action/innate/chrono_teleport/teleport_now = new
- var/activating = 0
- var/activated = 0
+ var/activating = FALSE
+ var/activated = FALSE
var/cooldowntime = 50 //deciseconds
- var/teleporting = 0
+ var/teleporting = FALSE
var/phase_timer_id
/obj/item/clothing/suit/space/chronos/Initialize()
@@ -96,7 +96,7 @@
user.animate_movement = FORWARD_STEPS
user.notransform = 0
user.set_anchored(FALSE)
- teleporting = 0
+ teleporting = FALSE
for(var/obj/item/I in user.held_items)
REMOVE_TRAIT(I, TRAIT_NODROP, CHRONOSUIT_TRAIT)
if(camera)
@@ -204,7 +204,7 @@
to_chat(user, "FATAL: Unable to locate /dev/helm. Aborting...")
teleport_now.Grant(user)
cooldown = world.time + cooldowntime
- activating = 0
+ activating = FALSE
/obj/item/clothing/suit/space/chronos/proc/deactivate(force = 0, silent = FALSE)
if(activated && (!teleporting || force))
@@ -213,8 +213,8 @@
var/hard_landing = teleporting && force
REMOVE_TRAIT(src, TRAIT_NODROP, CHRONOSUIT_TRAIT)
cooldown = world.time + cooldowntime * 1.5
- activated = 0
- activating = 0
+ activated = FALSE
+ activating = FALSE
finish_chronowalk()
if(user && ishuman(user))
teleport_now.Remove(user)
diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm
index 3e5be8a6262..d9a54c34417 100644
--- a/code/modules/clothing/spacesuits/hardsuit.dm
+++ b/code/modules/clothing/spacesuits/hardsuit.dm
@@ -751,12 +751,8 @@
owner.visible_message("[owner]'s shield overloads!")
shield_state = "broken"
owner.update_inv_wear_suit()
- return 1
- return 0
-
-
-/obj/item/clothing/suit/space/hardsuit/shielded/Destroy()
- return ..()
+ return TRUE
+ return FALSE
/obj/item/clothing/suit/space/hardsuit/shielded/process()
. = ..()
diff --git a/code/modules/clothing/suits/reactive_armour.dm b/code/modules/clothing/suits/reactive_armour.dm
index fcd1633b03b..1a142c1045c 100644
--- a/code/modules/clothing/suits/reactive_armour.dm
+++ b/code/modules/clothing/suits/reactive_armour.dm
@@ -27,7 +27,7 @@
/obj/item/clothing/suit/armor/reactive
name = "reactive armor"
desc = "Doesn't seem to do much for some reason."
- var/active = 0
+ var/active = FALSE
var/reactivearmor_cooldown_duration = 0 //cooldown specific to reactive armor
var/reactivearmor_cooldown = 0
icon_state = "reactiveoff"
@@ -55,7 +55,7 @@
. = ..()
if(. & EMP_PROTECT_SELF)
return
- active = 0
+ active = FALSE
icon_state = "reactiveoff"
inhand_icon_state = "reactiveoff"
reactivearmor_cooldown = world.time + 200
@@ -70,12 +70,12 @@
/obj/item/clothing/suit/armor/reactive/teleport/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(!active)
- return 0
+ return FALSE
if(prob(hit_reaction_chance))
var/mob/living/carbon/human/H = owner
if(world.time < reactivearmor_cooldown)
owner.visible_message("The reactive teleport system is still recharging! It fails to teleport [H]!")
- return
+ return FALSE
owner.visible_message("The reactive teleport system flings [H] clear of [attack_text], shutting itself off in the process!")
playsound(get_turf(owner),'sound/magic/blink.ogg', 100, TRUE)
var/list/turfs = new/list()
@@ -95,8 +95,8 @@
H.forceMove(picked)
H.rad_act(rad_amount)
reactivearmor_cooldown = world.time + reactivearmor_cooldown_duration
- return 1
- return 0
+ return TRUE
+ return FALSE
//Fire
@@ -106,11 +106,11 @@
/obj/item/clothing/suit/armor/reactive/fire/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(!active)
- return 0
+ return FALSE
if(prob(hit_reaction_chance))
if(world.time < reactivearmor_cooldown)
owner.visible_message("The reactive incendiary armor on [owner] activates, but fails to send out flames as it is still recharging its flame jets!")
- return
+ return FALSE
owner.visible_message("[src] blocks [attack_text], sending out jets of flame!")
playsound(get_turf(owner),'sound/magic/fireball.ogg', 100, TRUE)
for(var/mob/living/carbon/C in range(6, owner))
@@ -119,8 +119,8 @@
C.IgniteMob()
owner.fire_stacks = -20
reactivearmor_cooldown = world.time + reactivearmor_cooldown_duration
- return 1
- return 0
+ return TRUE
+ return FALSE
//Stealth
@@ -130,7 +130,7 @@
/obj/item/clothing/suit/armor/reactive/stealth/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(!active)
- return 0
+ return FALSE
if(prob(hit_reaction_chance))
if(world.time < reactivearmor_cooldown)
owner.visible_message("The reactive stealth system on [owner] activates, but is still recharging its holographic emitters!")
@@ -143,7 +143,7 @@
owner.visible_message("[owner] is hit by [attack_text] in the chest!") //We pretend to be hit, since blocking it would stop the message otherwise
addtimer(VARSET_CALLBACK(owner, alpha, initial(owner.alpha)), 4 SECONDS)
reactivearmor_cooldown = world.time + reactivearmor_cooldown_duration
- return 1
+ return TRUE
//Tesla
@@ -189,11 +189,11 @@
/obj/item/clothing/suit/armor/reactive/repulse/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(!active)
- return 0
+ return FALSE
if(prob(hit_reaction_chance))
if(world.time < reactivearmor_cooldown)
owner.visible_message("The repulse generator is still recharging!")
- return 0
+ return FALSE
playsound(get_turf(owner),'sound/magic/repulse.ogg', 100, TRUE)
owner.visible_message("[src] blocks [attack_text], converting the attack into a wave of force!")
var/turf/T = get_turf(owner)
@@ -206,7 +206,7 @@
thrown_items[A] = A
reactivearmor_cooldown = world.time + reactivearmor_cooldown_duration
- return 1
+ return TRUE
/obj/item/clothing/suit/armor/reactive/table
name = "reactive table armor"
@@ -215,12 +215,12 @@
/obj/item/clothing/suit/armor/reactive/table/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(!active)
- return 0
+ return FALSE
if(prob(hit_reaction_chance))
var/mob/living/carbon/human/H = owner
if(world.time < reactivearmor_cooldown)
owner.visible_message("The reactive table armor's fabricators are still on cooldown!")
- return
+ return FALSE
owner.visible_message("The reactive teleport system flings [H] clear of [attack_text] and slams [H.p_them()] into a fabricated table!")
owner.visible_message("[H] GOES ON THE TABLE!!!")
owner.Paralyze(40)
@@ -241,8 +241,8 @@
H.forceMove(picked)
new /obj/structure/table(get_turf(owner))
reactivearmor_cooldown = world.time + reactivearmor_cooldown_duration
- return 1
- return 0
+ return TRUE
+ return FALSE
/obj/item/clothing/suit/armor/reactive/table/emp_act()
return
diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm
index 4a8b62cc503..9149e1fd396 100644
--- a/code/modules/clothing/under/_under.dm
+++ b/code/modules/clothing/under/_under.dm
@@ -204,13 +204,13 @@
return
if(has_sensor == LOCKED_SENSORS)
to_chat(usr, "The controls are locked.")
- return 0
+ return
if(has_sensor == BROKEN_SENSORS)
to_chat(usr, "The sensors have shorted out!")
- return 0
+ return
if(has_sensor <= NO_SENSORS)
to_chat(usr, "This suit does not have any sensors.")
- return 0
+ return
var/list/modes = list("Off", "Binary vitals", "Exact vitals", "Tracking beacon")
var/switchMode = input("Select a sensor mode:", "Suit Sensor Mode", modes[sensor_mode + 1]) in modes
@@ -235,8 +235,9 @@
H.update_suit_sensors()
/obj/item/clothing/under/AltClick(mob/user)
- if(..())
- return 1
+ . = ..()
+ if(.)
+ return
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
diff --git a/code/modules/clothing/under/accessories.dm b/code/modules/clothing/under/accessories.dm
index 5561d2d9738..1b4e1145ad8 100755
--- a/code/modules/clothing/under/accessories.dm
+++ b/code/modules/clothing/under/accessories.dm
@@ -190,6 +190,10 @@
name = "\proper the head of personnel award for outstanding achievement in the field of excellence"
desc = "Nanotrasen's dictionary defines excellence as \"the quality or condition of being excellent\". This is awarded to those rare crewmembers who fit that definition."
+/obj/item/clothing/accessory/medal/silver/bureaucracy
+ name = "\improper Excellence in Bureaucracy Medal"
+ desc = "Awarded for exemplary managerial services rendered while under contract with Nanotrasen."
+
/obj/item/clothing/accessory/medal/gold
name = "gold medal"
desc = "A prestigious golden medal."
@@ -197,6 +201,7 @@
medaltype = "medal-gold"
custom_materials = list(/datum/material/gold=1000)
+
/obj/item/clothing/accessory/medal/gold/captain
name = "medal of captaincy"
desc = "A golden medal awarded exclusively to those promoted to the rank of captain. It signifies the codified responsibilities of a captain to Nanotrasen, and their undisputable authority over their crew."
diff --git a/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm b/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm
index c79e4e1d0fe..04ee1dd5a8f 100644
--- a/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm
+++ b/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm
@@ -79,4 +79,3 @@
H.visible_message("[H]'s suit spews space lube everywhere!","Your suit spews space lube everywhere!")
H.ExtinguishMob()
new /obj/effect/particle_effect/foam(loc) //Truely terrifying.
- return 0
diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm
index b9f141cd85e..ca6f58a5ab5 100644
--- a/code/modules/clothing/under/miscellaneous.dm
+++ b/code/modules/clothing/under/miscellaneous.dm
@@ -114,7 +114,6 @@
H.visible_message("[H]'s suit automatically extinguishes [H.p_them()]!","Your suit automatically extinguishes you.")
H.ExtinguishMob()
new /obj/effect/particle_effect/water(get_turf(H))
- return 0
/obj/item/clothing/under/plasmaman/attackby(obj/item/E, mob/user, params)
..()
diff --git a/code/modules/detectivework/scanner.dm b/code/modules/detectivework/scanner.dm
index c35e5fee7a6..a38a5ed31b8 100644
--- a/code/modules/detectivework/scanner.dm
+++ b/code/modules/detectivework/scanner.dm
@@ -15,7 +15,7 @@
flags_1 = CONDUCT_1
item_flags = NOBLUDGEON
slot_flags = ITEM_SLOT_BELT
- var/scanning = 0
+ var/scanning = FALSE
var/list/log = list()
var/range = 8
var/view_check = TRUE
@@ -32,7 +32,7 @@
/obj/item/detective_scanner/attack_self(mob/user)
if(log.len && !scanning)
- scanning = 1
+ scanning = TRUE
to_chat(user, "Printing report, please wait...")
addtimer(CALLBACK(src, .proc/PrintReport), 100)
else
@@ -61,7 +61,7 @@
// Clear the logs
log = list()
- scanning = 0
+ scanning = FALSE
/obj/item/detective_scanner/afterattack(atom/A, mob/user, params)
. = ..()
@@ -69,13 +69,13 @@
return FALSE
/obj/item/detective_scanner/proc/scan(atom/A, mob/user)
- set waitfor = 0
+ set waitfor = FALSE
if(!scanning)
// Can remotely scan objects and mobs.
if((get_dist(A, user) > range) || (!(A in view(range, user)) && view_check) || (loc != user))
return
- scanning = 1
+ scanning = TRUE
user.visible_message("\The [user] points the [src.name] at \the [A] and performs a forensic scan.")
to_chat(user, "You scan \the [A]. The scanner is now analysing the results...")
@@ -120,7 +120,7 @@
// We gathered everything. Create a fork and slowly display the results to the holder of the scanner.
- var/found_something = 0
+ var/found_something = FALSE
add_log("[station_time_timestamp()][get_timestamp()] - [target_name]", 0)
// Fingerprints
@@ -129,13 +129,13 @@
add_log("Prints:")
for(var/finger in fingerprints)
add_log("[finger]")
- found_something = 1
+ found_something = TRUE
// Blood
if (length(blood))
sleep(30)
add_log("Blood:")
- found_something = 1
+ found_something = TRUE
for(var/B in blood)
add_log("Type: [blood[B]] DNA (UE): [B]")
@@ -145,7 +145,7 @@
add_log("Fibers:")
for(var/fiber in fibers)
add_log("[fiber]")
- found_something = 1
+ found_something = TRUE
//Reagents
if(length(reagents))
@@ -153,7 +153,7 @@
add_log("Reagents:")
for(var/R in reagents)
add_log("Reagent: [R] Volume: [reagents[R]]")
- found_something = 1
+ found_something = TRUE
// Get a new user
var/mob/holder = null
@@ -169,7 +169,7 @@
to_chat(holder, "You finish scanning \the [target_name].")
add_log("---------------------------------------------------------", 0)
- scanning = 0
+ scanning = FALSE
return
/obj/item/detective_scanner/proc/add_log(msg, broadcast = 1)
diff --git a/code/modules/events/crystal_event.dm b/code/modules/events/crystal_event.dm
new file mode 100644
index 00000000000..1b822e38bda
--- /dev/null
+++ b/code/modules/events/crystal_event.dm
@@ -0,0 +1,517 @@
+GLOBAL_LIST_INIT(crystal_invasion_waves, list(
+ "small wave" = list(
+ /obj/structure/crystal_portal/small=4,
+ /obj/structure/crystal_portal/medium=1
+ ),
+ "medium wave" = list(
+ /obj/structure/crystal_portal/small=4,
+ /obj/structure/crystal_portal/medium=3,
+ /obj/structure/crystal_portal/big=1
+ ),
+ "big wave" = list(
+ /obj/structure/crystal_portal/small=5,
+ /obj/structure/crystal_portal/medium=3,
+ /obj/structure/crystal_portal/big=2,
+ /obj/structure/crystal_portal/huge=1
+ ),
+ "huge wave" = list(
+ /obj/structure/crystal_portal/small=7,
+ /obj/structure/crystal_portal/medium=5,
+ /obj/structure/crystal_portal/big=3,
+ /obj/structure/crystal_portal/huge=2
+ ),
+ ))
+GLOBAL_LIST_EMPTY(crystal_portals)
+
+/*
+This section is for the event controller
+*/
+/datum/round_event_control/crystal_invasion
+ name = "Crystal Invasion"
+ typepath = /datum/round_event/crystal_invasion
+ weight = 8
+ min_players = 35
+ max_occurrences = 1
+ earliest_start = 25 MINUTES
+
+/datum/round_event/crystal_invasion
+ startWhen = 10
+ announceWhen = 1
+ endWhen = 25 MINUTES
+ ///Is the name of the wave, used to check wich wave will be generated
+ var/wave_name
+ ///Max number of portals that can spawn per type of wave
+ var/portal_numbers
+ ///Check if this is the first wave or not
+ var/spawned = FALSE
+ ///Store the destabilized crystal
+ var/obj/machinery/destabilized_crystal/dest_crystal
+ ///Check if the event will end badly
+ var/is_zk_scenario = TRUE
+
+/datum/round_event/crystal_invasion/start()
+ choose_wave_type()
+
+/datum/round_event/crystal_invasion/announce(fake)
+ priority_announce("WARNING - Destabilization of the Supermatter Crystal Matrix detected, please stand by waiting further instructions", "Alert")
+ sound_to_playing_players('sound/misc/notice1.ogg')
+
+///Choose the type of the wave
+/datum/round_event/crystal_invasion/proc/choose_wave_type()
+ if(!wave_name)
+ wave_name = pickweight(list(
+ "small wave" = 35,
+ "medium wave" = 45,
+ "big wave" = 15,
+ "huge wave" = 5))
+ switch(wave_name)
+ if("small wave")
+ portal_numbers = rand(9, 11)
+ if("medium wave")
+ portal_numbers = rand(8, 12)
+ if("big wave")
+ portal_numbers = rand(9, 13)
+ if("huge wave")
+ portal_numbers = rand(11, 15)
+ else
+ kill()
+ CRASH("Wave name of [wave_name] not recognised.")
+
+ var/list/sm_crystal = list()
+ for(var/obj/machinery/power/supermatter_crystal/temp in GLOB.machines)
+ if(istype(temp, /obj/machinery/power/supermatter_crystal/shard))
+ continue
+ sm_crystal += temp
+ if(sm_crystal == null)
+ log_game("No engine found, killing the crystal invasion event.")
+ kill()
+ return
+ var/obj/machinery/power/supermatter_crystal/crystal = pick(sm_crystal)
+ dest_crystal = crystal.destabilize(portal_numbers)
+ RegisterSignal(dest_crystal, COMSIG_PARENT_QDELETING, .proc/on_dest_crystal_qdel)
+
+ priority_announce("WARNING - Numerous energy fluctuations have been detected from your Supermatter; we estimate a [wave_name] of crystalline creatures \
+ coming from \[REDACTED]; there will be [portal_numbers] portals spread around the station that you must close. Harvest a \[REDACTED] \
+ anomaly from a portal by using the anomaly neutralizer, place it inside a crystal stabilizer, and inject it into your Supermatter to stop a ZK-Lambda-Class Cosmic Fragmentation Scenario from occurring.", "Alert")
+ sound_to_playing_players('sound/misc/notice1.ogg')
+
+ addtimer(CALLBACK(src, .proc/spawn_portals), 10 SECONDS)
+
+///Pick a location from the generic_event_spawns list that are present on the maps and call the spawn anomaly and portal procs
+/datum/round_event/crystal_invasion/proc/spawn_portals()
+ var/list/spawners = list()
+ for(var/es in GLOB.generic_event_spawns)
+ var/obj/effect/landmark/event_spawn/temp = es
+ if(is_station_level(temp.z))
+ spawners += temp
+ for(var/i in 1 to portal_numbers)
+ spawn_portal(GLOB.crystal_invasion_waves[wave_name], spawners)
+ for(var/i in 1 to 6)
+ spawn_anomaly(spawners)
+
+ addtimer(CALLBACK(src, .proc/more_portals, GLOB.crystal_invasion_waves[wave_name]), 15 MINUTES)
+
+///Spawn an anomaly randomly in a different location than spawn_portal()
+/datum/round_event/crystal_invasion/proc/spawn_anomaly(list/spawners)
+ if(!spawners.len)
+ CRASH("No landmarks on the station map, aborting")
+ var/obj/spawner = pick(spawners)
+ new/obj/effect/anomaly/flux(spawner.loc)
+
+///Spawn one portal in a random location choosen from the generic_event_spawns list
+/datum/round_event/crystal_invasion/proc/spawn_portal(list/wave_type, list/spawners)
+ if(!spawners.len)
+ CRASH("No landmarks on the station map, aborting")
+ var/pick_portal = pickweight(wave_type)
+ var/obj/spawner = pick(spawners)
+ new pick_portal(spawner.loc)
+
+///If after 10 minutes the crystal is not stabilized more portals are spawned and the event progress further
+/datum/round_event/crystal_invasion/proc/more_portals()
+ priority_announce("WARNING - Detected another spike from the destabilized crystal. More portals are spawning all around the station, the next spike could \
+ cause a \[REDACTED] class event we assume you have 10 more minutes before total crystal annihilation", "Alert")
+ sound_to_playing_players('sound/misc/notice1.ogg')
+ var/list/spawners = list()
+ for(var/es in GLOB.generic_event_spawns)
+ var/obj/effect/landmark/event_spawn/temp = es
+ if(is_station_level(temp.z))
+ spawners += temp
+ for(var/i in 1 to rand(10, 15))
+ spawn_portal(GLOB.crystal_invasion_waves["small wave"], spawners)
+
+/datum/round_event/crystal_invasion/tick()
+ if(dest_crystal == null)
+ processing = FALSE
+ message_admins("Deleted Destabilized crystal, aborting")
+ kill()
+ if(dest_crystal.is_stabilized == TRUE)
+ processing = FALSE
+ is_zk_scenario = FALSE
+ end()
+
+/datum/round_event/crystal_invasion/end()
+ if(is_zk_scenario == TRUE)
+ processing = FALSE
+ zk_event_announcement()
+ else
+ restore()
+ kill()
+
+///This proc announces that the event is concluding with the worst scenario
+/datum/round_event/crystal_invasion/proc/zk_event_announcement()
+ dest_crystal.active = FALSE
+ priority_announce("WARNING - The crystal has reached critical instability point. ZK-Event inbound, please do not panic, anyone who panics will \
+ be terminated on the spot. Have a nice day", "Alert")
+ sound_to_playing_players('sound/machines/alarm.ogg')
+ addtimer(CALLBACK(src, .proc/do_zk_event), 10 SECONDS)
+
+///This proc actually manages the end of the event
+/datum/round_event/crystal_invasion/proc/do_zk_event()
+ var/list/spawners = list()
+ for(var/es in GLOB.generic_event_spawns)
+ var/obj/effect/landmark/event_spawn/temp = es
+ if(is_station_level(temp.z))
+ spawners += temp
+ for(var/i in 1 to rand(15, 25))
+ spawn_portal(GLOB.crystal_invasion_waves["huge wave"], spawners)
+ explosion(dest_crystal.loc, 15, 26, 33, 35, 1, 1) //a bit smaller than max supermatter explosion
+ priority_announce("WARNING - Portal are appearing everywhere, you failed to contain the event. You people should feel ashamed of yourselves!","Alarm")
+ QDEL_NULL(dest_crystal)
+
+///Restore the Destabilized Crystal as it was before
+/datum/round_event/crystal_invasion/proc/restore()
+ priority_announce("The Crystal has been restored and is now stable again, your sector of space is now safe from the ZK-Lambda-Class Scenario, \
+ kill the remaining crystal monsters and go back to work")
+ sound_to_playing_players('sound/misc/notice2.ogg')
+ var/turf/loc_turf = get_turf(dest_crystal.loc)
+ new/obj/machinery/power/supermatter_crystal(loc_turf)
+ for(var/Portal in GLOB.crystal_portals)
+ qdel(Portal)
+ QDEL_NULL(dest_crystal)
+
+///Handle the dest_crystal var to be null if the destabilized crystal is deleted by a badmin before the end of the event
+/datum/round_event/crystal_invasion/proc/on_dest_crystal_qdel()
+ UnregisterSignal(dest_crystal, COMSIG_PARENT_QDELETING)
+ processing = FALSE
+ dest_crystal = null
+ kill()
+
+/*
+This section is for the destabilized SM
+*/
+/obj/machinery/destabilized_crystal
+ name = "destabilized crystal"
+ desc = "A strangely translucent and iridescent crystal."
+ icon = 'icons/obj/supermatter.dmi'
+ icon_state = "psy"
+ density = TRUE
+ anchored = TRUE
+ flags_1 = PREVENT_CONTENTS_EXPLOSION_1
+ light_range = 4
+ resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF
+ ///If not active the crystal will not emit radiations and gases
+ var/active = TRUE
+ ///Check if the crew managed to stop the ZK-class event by stabilizing the crystal
+ var/is_stabilized = FALSE
+
+/obj/machinery/destabilized_crystal/process()
+ if(!active)
+ return
+ if(prob(75))
+ radiation_pulse(src, 250, 6)
+ var/turf/loc_turf = loc
+ var/datum/gas_mixture/env = loc_turf.return_air()
+ var/datum/gas_mixture/removed
+ var/gasefficency = 0.5
+ removed = env.remove(gasefficency * env.total_moles())
+ removed.assert_gases(/datum/gas/bz, /datum/gas/miasma)
+ removed.gases[/datum/gas/bz][MOLES] += 15.5
+ removed.gases[/datum/gas/miasma][MOLES] += 5.5
+ env.merge(removed)
+ air_update_turf()
+
+/obj/machinery/destabilized_crystal/attackby(obj/item/W, mob/living/user, params)
+ if(!istype(user))
+ return
+ if(istype(W, /obj/item/crystal_stabilizer))
+ var/obj/item/crystal_stabilizer/injector = W
+ if(!injector.filled)
+ to_chat(user, "\The [W] is empty!")
+ return
+ to_chat(user, "You carefully begin injecting \the [src] with \the [W]... take care not to move untill all the steps are finished!")
+ if(!W.use_tool(src, user, 5 SECONDS, volume = 100))
+ return
+ to_chat(user, "Seems that \the [src] internal resonance is fading with the fluid!")
+ playsound(get_turf(src), 'sound/effects/supermatter.ogg', 35, TRUE)
+ if(!W.use_tool(src, user, 6.5 SECONDS, volume = 100))
+ return
+ to_chat(user, "The [src] is reacting violently with the fluid!")
+ fire_nuclear_particle()
+ radiation_pulse(src, 2500, 6)
+ if(!W.use_tool(src, user, 7.5 SECONDS, volume = 100))
+ return
+ to_chat(user, "The [src] has been restored and restabilized!")
+ playsound(get_turf(src), 'sound/effects/supermatter.ogg', 35, TRUE)
+ injector.filled = FALSE
+ active = FALSE
+ is_stabilized = TRUE
+
+/*
+This section is for the crystal stabilizer item and the crystal from the closed portals
+*/
+/obj/item/crystal_stabilizer
+ name = "Supermatter Stabilizer"
+ desc = "Used when the Supermatter Matrix is starting to reach the destruction point."
+ icon = 'icons/obj/supermatter.dmi'
+ icon_state = "stabilizer"
+ slot_flags = ITEM_SLOT_BACK
+ w_class = WEIGHT_CLASS_HUGE
+ ///The stabilizer is one use only
+ var/filled = FALSE
+
+/obj/item/crystal_stabilizer/examine(user)
+ . = ..()
+ if(!filled)
+ . += "The [src] is empty."
+ else
+ . += "The [src] is full and can be used to stabilize the Supermatter."
+
+/obj/item/crystal_stabilizer/attackby(obj/item/W, mob/living/user, params)
+ . = ..()
+ if((W.item_flags & ABSTRACT) || !istype(user))
+ return
+ if(istype(W, /obj/item/stack/sheet/otherworld_crystal))
+ if(filled)
+ return
+ to_chat(user, "You refill the [src]")
+ playsound(src, 'sound/effects/spray2.ogg', 100, TRUE)
+ filled = TRUE
+ qdel(W)
+
+/obj/item/stack/sheet/otherworld_crystal
+ name = "Otherworld Crystals"
+ icon_state = "otherworld-crystal"
+ singular_name = "Otherworld Crystal"
+ icon = 'icons/obj/stack_objects.dmi'
+ material_type = /datum/material/otherworld_crystal
+
+/*
+This section is for the crystal portals variations
+*/
+/obj/structure/crystal_portal
+ name = "crystal portal"
+ desc = "this shouldn't be here"
+ icon = 'icons/effects/effects.dmi'
+ icon_state = "anom"
+ color = COLOR_SILVER
+ anchored = TRUE
+ resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF
+ ///Max amount of mobs that a portal can spawn in any given time
+ var/max_mobs = 5
+ ///Spawn time between each mobs
+ var/spawn_time = 1000
+ ///Type of mob that the portal will spawn, if more than one type in the list will choose randomly
+ var/mob_types = list(/mob/living/simple_animal/hostile/carp)
+ ///Fluff text for each mob spawned
+ var/spawn_text = "emerges from"
+ ///Affiliation to a faction, used to stop mobs from destroying their portals (unused for now)
+ var/faction = list("hostile")
+ ///Spawner component
+ var/spawner_type = /datum/component/spawner
+ ///This var check if the portal has been closed by a player with a neutralizer
+ var/closed = FALSE
+
+/obj/structure/crystal_portal/Initialize()
+ . = ..()
+ AddComponent(spawner_type, mob_types, spawn_time, faction, spawn_text, max_mobs)
+ GLOB.crystal_portals += src
+ mob_types = typelist("crystal_portal mob_types", mob_types)
+ faction = typelist("crystal_portal faction", faction)
+
+/obj/structure/crystal_portal/Destroy()
+ GLOB.crystal_portals -= src
+ if(!closed)
+ switch(name)
+ if("Small Portal")
+ explosion(loc, 0,1,3)
+ if("Medium Portal")
+ explosion(loc, 0,3,5)
+ if("Big Portal")
+ explosion(loc, 1,3,5)
+ if("Huge Portal")
+ explosion(loc, 2,5,7)
+ new/obj/item/stack/sheet/otherworld_crystal(loc)
+ return ..()
+
+/obj/structure/crystal_portal/attack_animal(mob/living/simple_animal/M)
+ if(faction_check(faction, M.faction, FALSE) && !M.client)
+ return ..()
+
+/obj/structure/crystal_portal/attackby(obj/item/W, mob/living/user, params)
+ if((W.item_flags & ABSTRACT) || !istype(user))
+ return
+ if(istype(W, /obj/item/anomaly_neutralizer))
+ to_chat(user, "You start closing \the [src]...")
+ if(W.use_tool(src, user, 5.5 SECONDS, volume = 100))
+ to_chat(user, "You successfully close \the [src]!")
+ closed = TRUE
+ qdel(src)
+
+/obj/structure/crystal_portal/small
+ name = "Small Portal"
+ desc = "A small portal to an unkown dimension!"
+ color = COLOR_BRIGHT_BLUE
+ max_mobs = 3
+ spawn_time = 200
+ mob_types = list(
+ /mob/living/simple_animal/hostile/crystal_monster/minion,
+ /mob/living/simple_animal/hostile/crystal_monster/thug
+ )
+
+/obj/structure/crystal_portal/medium
+ name = "Medium Portal"
+ desc = "A medium portal to an unkown dimension!"
+ color = COLOR_GREEN
+ max_mobs = 5
+ spawn_time = 180
+ mob_types = list(
+ /mob/living/simple_animal/hostile/crystal_monster/minion,
+ /mob/living/simple_animal/hostile/crystal_monster/thug,
+ /mob/living/simple_animal/hostile/crystal_monster/recruit
+ )
+
+/obj/structure/crystal_portal/big
+ name = "Big Portal"
+ desc = "A big portal to an unkown dimension!"
+ color = COLOR_RED
+ max_mobs = 8
+ spawn_time = 160
+ mob_types = list(
+ /mob/living/simple_animal/hostile/crystal_monster/minion,
+ /mob/living/simple_animal/hostile/crystal_monster/thug,
+ /mob/living/simple_animal/hostile/crystal_monster/recruit,
+ /mob/living/simple_animal/hostile/crystal_monster/killer
+ )
+
+/obj/structure/crystal_portal/huge
+ name = "Huge Portal"
+ desc = "A huge portal to an unkown dimension!"
+ color = COLOR_BLACK
+ max_mobs = 12
+ spawn_time = 140
+ mob_types = list(
+ /mob/living/simple_animal/hostile/crystal_monster/minion,
+ /mob/living/simple_animal/hostile/crystal_monster/thug,
+ /mob/living/simple_animal/hostile/crystal_monster/recruit,
+ /mob/living/simple_animal/hostile/crystal_monster/killer,
+ /mob/living/simple_animal/hostile/crystal_monster/boss,
+ )
+
+/*
+This section is for the crystal monsters variations
+*/
+/mob/living/simple_animal/hostile/crystal_monster
+ name = "crystal monster"
+ desc = "A monster made of crystals similar to the Supermatter ones."
+ icon = 'icons/mob/simple_human.dmi'
+ icon_state = "crystal_minion"
+ icon_living = "crystal_minion"
+ icon_dead = "crystal_minion"
+ gender = NEUTER
+ mob_biotypes = MOB_MINERAL|MOB_HUMANOID
+ turns_per_move = 5
+ speak_emote = list("resonates")
+ emote_see = list("resonates")
+ a_intent = INTENT_HARM
+ maxHealth = 25
+ health = 25
+ speed = 1.2
+ harm_intent_damage = 2.5
+ melee_damage_lower = 5
+ melee_damage_upper = 5
+ minbodytemp = 0
+ maxbodytemp = 1500
+ healable = 0 //they're crystals how would bruise packs help them??
+ attack_verb_continuous = "smashes"
+ attack_verb_simple = "smash"
+ attack_sound = 'sound/effects/supermatter.ogg'
+ atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
+ unsuitable_atmos_damage = 10
+ robust_searching = 1
+ stat_attack = UNCONSCIOUS
+ faction = list("crystal")
+ see_in_dark = 8
+ lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
+ deathmessage = "collapses into dust!"
+ del_on_death = 1
+ footstep_type = FOOTSTEP_MOB_SHOE
+
+/mob/living/simple_animal/hostile/crystal_monster/minion
+ name = "crystal minion"
+ desc = "A monster made of crystals similar to the Supermatter ones."
+ icon = 'icons/mob/simple_human.dmi'
+ icon_state = "crystal_minion"
+ icon_living = "crystal_minion"
+ icon_dead = "crystal_minion"
+ maxHealth = 40
+ health = 40
+ speed = 1.5
+ harm_intent_damage = 5
+ melee_damage_lower = 5
+ melee_damage_upper = 10
+
+/mob/living/simple_animal/hostile/crystal_monster/thug
+ name = "crystal thug"
+ desc = "A monster made of crystals similar to the Supermatter ones."
+ icon = 'icons/mob/simple_human.dmi'
+ icon_state = "crystal_thug"
+ icon_living = "crystal_thug"
+ icon_dead = "crystal_thug"
+ maxHealth = 50
+ health = 50
+ speed = 1.3
+ harm_intent_damage = 9
+ melee_damage_lower = 15
+ melee_damage_upper = 20
+
+/mob/living/simple_animal/hostile/crystal_monster/recruit
+ name = "crystal recruit"
+ desc = "A monster made of crystals similar to the Supermatter ones."
+ icon = 'icons/mob/simple_human.dmi'
+ icon_state = "crystal_recruit"
+ icon_living = "crystal_recruit"
+ icon_dead = "crystal_recruit"
+ maxHealth = 65
+ health = 65
+ speed = 1.2
+ harm_intent_damage = 11
+ melee_damage_lower = 20
+ melee_damage_upper = 35
+
+/mob/living/simple_animal/hostile/crystal_monster/killer
+ name = "crystal killer"
+ desc = "A monster made of crystals similar to the Supermatter ones."
+ icon = 'icons/mob/simple_human.dmi'
+ icon_state = "crystal_killer"
+ icon_living = "crystal_killer"
+ icon_dead = "crystal_killer"
+ maxHealth = 80
+ health = 80
+ speed = 1.2
+ harm_intent_damage = 13
+ melee_damage_lower = 30
+ melee_damage_upper = 45
+
+/mob/living/simple_animal/hostile/crystal_monster/boss
+ name = "crystal boss"
+ desc = "A monster made of crystals similar to the Supermatter ones."
+ icon = 'icons/mob/simple_human.dmi'
+ icon_state = "crystal_boss"
+ icon_living = "crystal_boss"
+ icon_dead = "crystal_boss"
+ maxHealth = 150
+ health = 150
+ speed = 1
+ harm_intent_damage = 15
+ melee_damage_lower = 45
+ melee_damage_upper = 65
diff --git a/code/modules/events/devil.dm b/code/modules/events/devil.dm
index 3760cbe05d9..6d9bb3a5065 100644
--- a/code/modules/events/devil.dm
+++ b/code/modules/events/devil.dm
@@ -26,11 +26,11 @@
var/mob/dead/selected_candidate = pick_n_take(candidates)
var/key = selected_candidate.key
- var/datum/mind/Mind = create_devil_mind(key)
- Mind.active = 1
+ var/datum/mind/mind = create_devil_mind(key)
+ mind.active = TRUE
var/mob/living/carbon/human/devil = create_event_devil()
- Mind.transfer_to(devil)
+ mind.transfer_to(devil)
add_devil(devil, ascendable = FALSE)
spawned_mobs += devil
diff --git a/code/modules/events/electrical_storm.dm b/code/modules/events/electrical_storm.dm
index db0eccf0c5c..a769bad1588 100644
--- a/code/modules/events/electrical_storm.dm
+++ b/code/modules/events/electrical_storm.dm
@@ -4,7 +4,7 @@
earliest_start = 10 MINUTES
min_players = 5
weight = 20
- alert_observers = 0
+ alert_observers = FALSE
/datum/round_event/electrical_storm
var/lightsoutAmount = 1
diff --git a/code/modules/events/false_alarm.dm b/code/modules/events/false_alarm.dm
index 5b032f85f87..e68f5a0e3f5 100644
--- a/code/modules/events/false_alarm.dm
+++ b/code/modules/events/false_alarm.dm
@@ -24,8 +24,8 @@
return ..() && length(gather_false_events())
/datum/round_event/falsealarm
- announceWhen = 0
- endWhen = 1
+ announceWhen = 0
+ endWhen = 1
fakeable = FALSE
/datum/round_event/falsealarm/announce(fake)
diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm
index 783bc9d9ba7..8867157194b 100644
--- a/code/modules/events/immovable_rod.dm
+++ b/code/modules/events/immovable_rod.dm
@@ -120,7 +120,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
walk_towards(src, destination, 1)
/obj/effect/immovablerod/ex_act(severity, target)
- return 0
+ return
/obj/effect/immovablerod/singularity_act()
return
diff --git a/code/modules/events/operative.dm b/code/modules/events/operative.dm
index 7fca4188b76..9e92364b89d 100644
--- a/code/modules/events/operative.dm
+++ b/code/modules/events/operative.dm
@@ -29,7 +29,7 @@
var/datum/mind/Mind = new /datum/mind(selected.key)
Mind.assigned_role = "Lone Operative"
Mind.special_role = "Lone Operative"
- Mind.active = 1
+ Mind.active = TRUE
Mind.transfer_to(operative)
Mind.add_antag_datum(/datum/antagonist/nukeop/lone)
diff --git a/code/modules/events/portal_storm.dm b/code/modules/events/portal_storm.dm
index 716fbd13e26..ad9eae0e278 100644
--- a/code/modules/events/portal_storm.dm
+++ b/code/modules/events/portal_storm.dm
@@ -106,11 +106,12 @@
/datum/round_event/portal_storm/proc/spawn_boss()
if(!boss_types || !boss_types.len)
- return 0
+ return FALSE
if(activeFor == next_boss_spawn)
next_boss_spawn += CEILING(number_of_hostiles / number_of_bosses, 1)
- return 1
+ return TRUE
+ return FALSE
/datum/round_event/portal_storm/proc/time_to_end()
if(!hostile_types.len && !boss_types.len)
diff --git a/code/modules/events/wizard/greentext.dm b/code/modules/events/wizard/greentext.dm
index 82e72df3b9d..431c249bf19 100644
--- a/code/modules/events/wizard/greentext.dm
+++ b/code/modules/events/wizard/greentext.dm
@@ -12,7 +12,7 @@
if(!ishuman(M))
holder_canadates -= M
if(!holder_canadates) //Very unlikely, but just in case
- return 0
+ return FALSE
var/mob/living/carbon/human/H = pick(holder_canadates)
new /obj/item/greentext(H.loc)
diff --git a/code/modules/fields/timestop.dm b/code/modules/fields/timestop.dm
index f6d2133bfaa..9908316020e 100644
--- a/code/modules/fields/timestop.dm
+++ b/code/modules/fields/timestop.dm
@@ -84,7 +84,7 @@
freeze_mob(A)
else if(istype(A, /obj/projectile))
freeze_projectile(A)
- else if(istype(A, /obj/mecha))
+ else if(istype(A, /obj/vehicle/sealed/mecha))
freeze_mecha(A)
else if((ismachinery(A) && !istype(A, /obj/machinery/light)) || isstructure(A)) //Special exception for light fixtures since recoloring causes them to change light
freeze_structure(A)
@@ -120,7 +120,7 @@
unfreeze_mob(A)
else if(istype(A, /obj/projectile))
unfreeze_projectile(A)
- else if(istype(A, /obj/mecha))
+ else if(istype(A, /obj/vehicle/sealed/mecha))
unfreeze_mecha(A)
UnregisterSignal(A, COMSIG_MOVABLE_PRE_MOVE)
@@ -131,10 +131,10 @@
global_frozen_atoms -= A
-/datum/proximity_monitor/advanced/timestop/proc/freeze_mecha(obj/mecha/M)
+/datum/proximity_monitor/advanced/timestop/proc/freeze_mecha(obj/vehicle/sealed/mecha/M)
M.completely_disabled = TRUE
-/datum/proximity_monitor/advanced/timestop/proc/unfreeze_mecha(obj/mecha/M)
+/datum/proximity_monitor/advanced/timestop/proc/unfreeze_mecha(obj/vehicle/sealed/mecha/M)
M.completely_disabled = FALSE
diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm
index 4dc24de4659..e8177822bf2 100644
--- a/code/modules/food_and_drinks/food/condiment.dm
+++ b/code/modules/food_and_drinks/food/condiment.dm
@@ -72,10 +72,10 @@
if(!reagents || !reagents.total_volume)
to_chat(user, "None of [src] left, oh no!")
- return 0
+ return FALSE
if(!canconsume(M, user))
- return 0
+ return FALSE
if(M == user)
user.visible_message("[user] swallows some of the contents of \the [src].", \
@@ -92,7 +92,7 @@
log_combat(user, M, "fed", reagents.log_list())
reagents.trans_to(M, 10, transfered_by = user, methods = INGEST)
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), TRUE)
- return 1
+ return TRUE
/obj/item/reagent_containers/food/condiment/afterattack(obj/target, mob/user , proximity)
. = ..()
diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm
index c9929b20eb9..72e37f6079f 100644
--- a/code/modules/food_and_drinks/food/snacks.dm
+++ b/code/modules/food_and_drinks/food/snacks.dm
@@ -141,14 +141,14 @@ All foods are distributed among various categories. Use common sense.
return FALSE
if(!do_mob(user, M))
- return
+ return FALSE
log_combat(user, M, "fed", reagents.log_list())
M.visible_message("[user] forces [M] to eat [src]!", \
"[user] forces you to eat [src]!")
else
to_chat(user, "[M] doesn't seem to have a mouth!")
- return
+ return FALSE
if(reagents) //Handle ingestion of the reagent.
if(M.satiety > -200)
@@ -163,7 +163,7 @@ All foods are distributed among various categories. Use common sense.
checkLiked(fraction, M)
return TRUE
- return 0
+ return FALSE
/obj/item/reagent_containers/food/snacks/examine(mob/user)
. = ..()
@@ -179,29 +179,28 @@ All foods are distributed among various categories. Use common sense.
. += "[src] was bitten multiple times!"
/obj/item/reagent_containers/food/snacks/attackby(obj/item/W, mob/user, params)
- if(istype(W, /obj/item/storage))
- ..() // -> item/attackby()
- return 0
+ if(istype(W, /obj/item/storage))// -> item/attackby()
+ return ..()
if(istype(W, /obj/item/reagent_containers/food/snacks))
var/obj/item/reagent_containers/food/snacks/S = W
if(custom_food_type && ispath(custom_food_type))
if(S.w_class > WEIGHT_CLASS_SMALL)
to_chat(user, "[S] is too big for [src]!")
- return 0
+ return FALSE
if(!S.customfoodfilling || istype(W, /obj/item/reagent_containers/food/snacks/customizable) || istype(W, /obj/item/reagent_containers/food/snacks/pizzaslice/custom) || istype(W, /obj/item/reagent_containers/food/snacks/cakeslice/custom))
to_chat(user, "[src] can't be filled with [S]!")
- return 0
+ return FALSE
if(contents.len >= 20)
to_chat(user, "You can't add more ingredients to [src]!")
- return 0
+ return FALSE
var/obj/item/reagent_containers/food/snacks/customizable/C = new custom_food_type(get_turf(src))
C.initialize_custom_food(src, S, user)
- return 0
+ return FALSE
if(user.a_intent != INTENT_DISARM)
var/sharp = W.get_sharpness()
return sharp && slice(sharp, W, user)
else
- ..()
+ return ..()
//Called when you finish tablecrafting a snack.
/obj/item/reagent_containers/food/snacks/CheckParts(list/parts_list, datum/crafting_recipe/food/R)
diff --git a/code/modules/food_and_drinks/food/snacks_burgers.dm b/code/modules/food_and_drinks/food/snacks_burgers.dm
deleted file mode 100644
index cd643485e93..00000000000
--- a/code/modules/food_and_drinks/food/snacks_burgers.dm
+++ /dev/null
@@ -1,415 +0,0 @@
-/obj/item/reagent_containers/food/snacks/burger
- filling_color = "#CD853F"
- icon = 'icons/obj/food/burgerbread.dmi'
- icon_state = "hburger"
- bitesize = 3
- list_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 1)
- tastes = list("bun" = 2, "beef patty" = 4)
- foodtype = GRAIN | MEAT //lettuce doesn't make burger a vegetable.
-
-/obj/item/reagent_containers/food/snacks/burger/plain
- name = "burger"
- desc = "The cornerstone of every nutritious breakfast."
- bonus_reagents = list(/datum/reagent/consumable/nutriment/protein = 1, /datum/reagent/consumable/nutriment/vitamin = 1)
- foodtype = GRAIN | MEAT
- value = FOOD_FAST
-
-/obj/item/reagent_containers/food/snacks/burger/plain/Initialize()
- . = ..()
- if(prob(1))
- new/obj/effect/particle_effect/smoke(get_turf(src))
- playsound(src, 'sound/effects/smoke.ogg', 50, TRUE)
- visible_message("Oh, ye gods! [src] is ruined! But what if...?")
- name = "steamed ham"
- desc = pick("Ahh, Head of Personnel, welcome. I hope you're prepared for an unforgettable luncheon!",
- "And you call these steamed hams despite the fact that they are obviously microwaved?",
- "Aurora Station 13? At this time of shift, in this time of year, in this sector of space, localized entirely within your freezer?",
- "You know, these hamburgers taste quite similar to the ones they have at the Maltese Falcon.")
- tastes = list("fast food hamburger" = 1)
-
-/obj/item/reagent_containers/food/snacks/burger/human
- var/subjectname = ""
- var/subjectjob = null
- name = "human burger"
- desc = "A bloody burger."
- bonus_reagents = list(/datum/reagent/consumable/nutriment/protein = 1, /datum/reagent/consumable/nutriment/vitamin = 4)
- tastes = list("bun" = 2, "long pig" = 4)
- foodtype = MEAT | GRAIN | GROSS
- value = FOOD_FAST
-
-/obj/item/reagent_containers/food/snacks/burger/human/CheckParts(list/parts_list)
- ..()
- var/obj/item/reagent_containers/food/snacks/meat/M = locate(/obj/item/reagent_containers/food/snacks/meat/steak/plain/human) in contents
- if(M)
- subjectname = M.subjectname
- subjectjob = M.subjectjob
- if(subjectname)
- name = "[subjectname] burger"
- else if(subjectjob)
- name = "[subjectjob] burger"
- qdel(M)
-
-
-/obj/item/reagent_containers/food/snacks/burger/corgi
- name = "corgi burger"
- desc = "You monster."
- bonus_reagents = list(/datum/reagent/consumable/nutriment/protein = 1, /datum/reagent/consumable/nutriment/vitamin = 5)
- foodtype = GRAIN | MEAT | GROSS
- value = FOOD_EXOTIC
-
-/obj/item/reagent_containers/food/snacks/burger/appendix
- name = "appendix burger"
- desc = "Tastes like appendicitis."
- bonus_reagents = list(/datum/reagent/consumable/nutriment/protein = 6, /datum/reagent/consumable/nutriment/vitamin = 6)
- icon_state = "appendixburger"
- tastes = list("bun" = 4, "grass" = 2)
- foodtype = GRAIN | MEAT | GROSS
- value = FOOD_RARE
-
-/obj/item/reagent_containers/food/snacks/burger/fish
- name = "fillet -o- carp sandwich"
- desc = "Almost like a carp is yelling somewhere... Give me back that fillet -o- carp, give me that carp."
- icon_state = "fishburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/protein = 2, /datum/reagent/consumable/nutriment/vitamin = 3)
- tastes = list("bun" = 4, "fish" = 4)
- foodtype = GRAIN | MEAT
- value = FOOD_EXOTIC
-
-/obj/item/reagent_containers/food/snacks/burger/tofu
- name = "tofu burger"
- desc = "What.. is that meat?"
- icon_state = "tofuburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/protein = 1, /datum/reagent/consumable/nutriment/vitamin = 2)
- tastes = list("bun" = 4, "tofu" = 4)
- foodtype = GRAIN | VEGETABLES
- value = FOOD_FAST
-
-/obj/item/reagent_containers/food/snacks/burger/roburger
- name = "roburger"
- desc = "The lettuce is the only organic component. Beep."
- icon_state = "roburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/nanomachines = 2, /datum/reagent/consumable/nutriment/vitamin = 5)
- list_reagents = list(/datum/reagent/consumable/nutriment = 6, /datum/reagent/nanomachines = 5, /datum/reagent/consumable/nutriment/vitamin = 1)
- tastes = list("bun" = 4, "lettuce" = 2, "sludge" = 1)
- foodtype = GRAIN | TOXIC
- value = FOOD_EXOTIC
-
-/obj/item/reagent_containers/food/snacks/burger/roburgerbig
- name = "roburger"
- desc = "This massive patty looks like poison. Beep."
- icon_state = "roburger"
- volume = 120
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/nanomachines = 70, /datum/reagent/consumable/nutriment/vitamin = 10)
- list_reagents = list(/datum/reagent/consumable/nutriment = 6, /datum/reagent/nanomachines = 70, /datum/reagent/consumable/nutriment/vitamin = 5)
- tastes = list("bun" = 4, "lettuce" = 2, "sludge" = 1)
- foodtype = GRAIN | TOXIC
- value = FOOD_LEGENDARY
-
-/obj/item/reagent_containers/food/snacks/burger/xeno
- name = "xenoburger"
- desc = "Smells caustic. Tastes like heresy."
- icon_state = "xburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/protein = 4, /datum/reagent/consumable/nutriment/vitamin = 6)
- tastes = list("bun" = 4, "acid" = 4)
- foodtype = GRAIN | MEAT
- value = FOOD_EXOTIC
-
-/obj/item/reagent_containers/food/snacks/burger/bearger
- name = "bearger"
- desc = "Best served rawr."
- icon_state = "bearger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/protein = 3, /datum/reagent/consumable/nutriment/vitamin = 6)
- foodtype = GRAIN | MEAT
- value = FOOD_EXOTIC
-
-/obj/item/reagent_containers/food/snacks/burger/clown
- name = "clown burger"
- desc = "This tastes funny..."
- icon_state = "clownburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 6, /datum/reagent/medicine/mannitol = 6, /datum/reagent/consumable/nutriment/vitamin = 5)
- list_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 6, /datum/reagent/medicine/mannitol = 5, /datum/reagent/consumable/nutriment/vitamin = 1)
- foodtype = GRAIN | FRUIT
- value = FOOD_EXOTIC
-
-/obj/item/reagent_containers/food/snacks/burger/mime
- name = "mime burger"
- desc = "Its taste defies language."
- icon_state = "mimeburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 4, /datum/reagent/consumable/nutriment/vitamin = 6, /datum/reagent/consumable/nothing = 6)
- foodtype = GRAIN
- value = FOOD_EXOTIC
-
-/obj/item/reagent_containers/food/snacks/burger/brain
- name = "brainburger"
- desc = "A strange looking burger. It looks almost sentient."
- icon_state = "brainburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 6, /datum/reagent/medicine/mannitol = 6, /datum/reagent/consumable/nutriment/vitamin = 5)
- list_reagents = list(/datum/reagent/consumable/nutriment = 6, /datum/reagent/medicine/mannitol = 5, /datum/reagent/consumable/nutriment/vitamin = 1)
- tastes = list("bun" = 4, "brains" = 2)
- foodtype = GRAIN | MEAT | GROSS
- value = FOOD_FAST
-
-/obj/item/reagent_containers/food/snacks/burger/ghost
- name = "ghost burger"
- desc = "Too Spooky!"
- icon_state = "ghostburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/consumable/nutriment/vitamin = 12, /datum/reagent/consumable/sodiumchloride = 5)
- tastes = list("bun" = 2, "ectoplasm" = 4)
- foodtype = GRAIN
- alpha = 170
- verb_say = "moans"
- verb_yell = "wails"
- value = FOOD_EXOTIC
-
-/obj/item/reagent_containers/food/snacks/burger/ghost/Initialize()
- . = ..()
- START_PROCESSING(SSobj, src)
-
-/obj/item/reagent_containers/food/snacks/burger/ghost/process()
- if(!isturf(loc)) //no floating out of bags
- return
- var/paranormal_activity = rand(100)
- switch(paranormal_activity)
- if(97 to 100)
- audible_message("[src] rattles a length of chain.")
- playsound(loc,'sound/spookoween/chain_rattling.ogg', 300, TRUE)
- if(91 to 96)
- say(pick("OoOoOoo.", "OoooOOooOoo!!"))
- if(84 to 90)
- dir = pick(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
- step(src, dir)
- if(71 to 83)
- step(src, dir)
- if(65 to 70)
- var/obj/machinery/light/L = locate(/obj/machinery/light) in view(4, src)
- if(L)
- L.flicker()
- if(62 to 64)
- playsound(loc,pick('sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg'), 50, TRUE, ignore_walls = FALSE)
- if(61)
- visible_message("[src] spews out a glob of ectoplasm!")
- new /obj/effect/decal/cleanable/greenglow/ecto(loc)
- playsound(loc,'sound/effects/splat.ogg', 200, TRUE)
-
- //If i was less lazy i would make the burger forcefeed itself to a nearby mob here.
-
-/obj/item/reagent_containers/food/snacks/burger/ghost/Destroy()
- STOP_PROCESSING(SSobj, src)
- . = ..()
-
-/obj/item/reagent_containers/food/snacks/burger/red
- name = "red burger"
- desc = "Perfect for hiding the fact it's burnt to a crisp."
- icon_state = "cburger"
- color = "#DA0000FF"
- bonus_reagents = list(/datum/reagent/colorful_reagent/powder/red = 10, /datum/reagent/consumable/nutriment/vitamin = 5)
- foodtype = GRAIN | MEAT
-
-/obj/item/reagent_containers/food/snacks/burger/orange
- name = "orange burger"
- desc = "Contains 0% juice."
- icon_state = "cburger"
- color = "#FF9300FF"
- bonus_reagents = list(/datum/reagent/colorful_reagent/powder/orange = 10, /datum/reagent/consumable/nutriment/vitamin = 5)
- foodtype = GRAIN | MEAT
-
-/obj/item/reagent_containers/food/snacks/burger/yellow
- name = "yellow burger"
- desc = "Bright to the last bite."
- icon_state = "cburger"
- color = "#FFF200FF"
- bonus_reagents = list(/datum/reagent/colorful_reagent/powder/yellow = 10, /datum/reagent/consumable/nutriment/vitamin = 5)
- foodtype = GRAIN | MEAT
-
-/obj/item/reagent_containers/food/snacks/burger/green
- name = "green burger"
- desc = "It's not tainted meat, it's painted meat!"
- icon_state = "cburger"
- color = "#A8E61DFF"
- bonus_reagents = list(/datum/reagent/colorful_reagent/powder/green = 10, /datum/reagent/consumable/nutriment/vitamin = 5)
- foodtype = GRAIN | MEAT
-
-/obj/item/reagent_containers/food/snacks/burger/blue
- name = "blue burger"
- desc = "Is this blue rare?"
- icon_state = "cburger"
- color = "#00B7EFFF"
- bonus_reagents = list(/datum/reagent/colorful_reagent/powder/blue = 10, /datum/reagent/consumable/nutriment/vitamin = 5)
- foodtype = GRAIN | MEAT
-
-/obj/item/reagent_containers/food/snacks/burger/purple
- name = "purple burger"
- desc = "Regal and low class at the same time."
- icon_state = "cburger"
- color = "#DA00FFFF"
- bonus_reagents = list(/datum/reagent/colorful_reagent/powder/purple = 10, /datum/reagent/consumable/nutriment/vitamin = 5)
- foodtype = GRAIN | MEAT
-
-/obj/item/reagent_containers/food/snacks/burger/black
- name = "black burger"
- desc = "This is overcooked."
- icon_state = "cburger"
- color = "#1C1C1C"
- bonus_reagents = list(/datum/reagent/colorful_reagent/powder/black = 10, /datum/reagent/consumable/nutriment/vitamin = 5)
- foodtype = GRAIN | MEAT
-
-/obj/item/reagent_containers/food/snacks/burger/white
- name = "white burger"
- desc = "Delicous Titanium!"
- icon_state = "cburger"
- color = "#FFFFFF"
- bonus_reagents = list(/datum/reagent/colorful_reagent/powder/white = 10, /datum/reagent/consumable/nutriment/vitamin = 5)
- foodtype = GRAIN | MEAT
-
-/obj/item/reagent_containers/food/snacks/burger/spell
- name = "spell burger"
- desc = "This is absolutely Ei Nath."
- icon_state = "spellburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 6, /datum/reagent/consumable/nutriment/vitamin = 10)
- tastes = list("bun" = 4, "magic" = 2)
- foodtype = GRAIN | MEAT
- value = FOOD_RARE
-
-/obj/item/reagent_containers/food/snacks/burger/bigbite
- name = "big bite burger"
- desc = "Forget the Big Mac. THIS is the future!"
- icon_state = "bigbiteburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment/protein = 2, /datum/reagent/consumable/nutriment/vitamin = 5)
- list_reagents = list(/datum/reagent/consumable/nutriment = 4, /datum/reagent/consumable/nutriment/protein = 9, /datum/reagent/consumable/nutriment/vitamin = 2)
- w_class = WEIGHT_CLASS_NORMAL
- foodtype = GRAIN | MEAT | DAIRY
- value = FOOD_RARE
-
-/obj/item/reagent_containers/food/snacks/burger/jelly
- name = "jelly burger"
- desc = "Culinary delight..?"
- icon_state = "jellyburger"
- tastes = list("bun" = 4, "jelly" = 2)
- foodtype = GRAIN | MEAT
- value = FOOD_EXOTIC
-
-/obj/item/reagent_containers/food/snacks/burger/jelly/slime
- bonus_reagents = list(/datum/reagent/toxin/slimejelly = 5, /datum/reagent/consumable/nutriment/vitamin = 5)
- list_reagents = list(/datum/reagent/consumable/nutriment = 6, /datum/reagent/toxin/slimejelly = 5, /datum/reagent/consumable/nutriment/vitamin = 1)
- foodtype = GRAIN | TOXIC
-
-/obj/item/reagent_containers/food/snacks/burger/jelly/cherry
- bonus_reagents = list(/datum/reagent/consumable/cherryjelly = 5, /datum/reagent/consumable/nutriment/vitamin = 5)
- list_reagents = list(/datum/reagent/consumable/nutriment = 6, /datum/reagent/consumable/cherryjelly = 5, /datum/reagent/consumable/nutriment/vitamin = 1)
- foodtype = GRAIN | FRUIT
-
-/obj/item/reagent_containers/food/snacks/burger/superbite
- name = "super bite burger"
- desc = "This is a mountain of a burger. FOOD!"
- icon_state = "superbiteburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment/protein = 4, /datum/reagent/consumable/nutriment/vitamin = 10)
- list_reagents = list(/datum/reagent/consumable/nutriment = 25, /datum/reagent/consumable/nutriment/protein = 38, /datum/reagent/consumable/nutriment/vitamin = 5)
- w_class = WEIGHT_CLASS_NORMAL
- bitesize = 7
- volume = 100
- tastes = list("bun" = 4, "type two diabetes" = 10)
- foodtype = GRAIN | MEAT | DAIRY
- value = FOOD_EXOTIC
-
-/obj/item/reagent_containers/food/snacks/burger/fivealarm
- name = "five alarm burger"
- desc = "HOT! HOT!"
- icon_state = "fivealarmburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 2, /datum/reagent/consumable/nutriment/vitamin = 5)
- list_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/capsaicin = 5, /datum/reagent/consumable/condensedcapsaicin = 5, /datum/reagent/consumable/nutriment/vitamin = 1)
- foodtype = GRAIN | MEAT
- value = FOOD_RARE
-
-/obj/item/reagent_containers/food/snacks/burger/rat
- name = "rat burger"
- desc = "Pretty much what you'd expect..."
- icon_state = "ratburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/protein = 2, /datum/reagent/consumable/nutriment/vitamin = 1)
- foodtype = GRAIN | MEAT | GROSS
- value = FOOD_FAST
-
-/obj/item/reagent_containers/food/snacks/burger/baseball
- name = "home run baseball burger"
- desc = "It's still warm. The steam coming off of it looks like baseball."
- icon_state = "baseball"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/vitamin = 1)
- foodtype = GRAIN | GROSS
- value = FOOD_RARE
-
-/obj/item/reagent_containers/food/snacks/burger/baconburger
- name = "bacon burger"
- desc = "The perfect combination of all things American."
- icon_state = "baconburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/protein = 6, /datum/reagent/consumable/nutriment/vitamin = 1)
- tastes = list("bacon" = 4, "bun" = 2)
- foodtype = GRAIN | MEAT
- value = FOOD_RARE
-
-/obj/item/reagent_containers/food/snacks/burger/empoweredburger
- name = "empowered burger"
- desc = "It's shockingly good, if you live off of electricity that is."
- icon_state = "empoweredburger"
- list_reagents = list(/datum/reagent/consumable/nutriment = 8, /datum/reagent/consumable/liquidelectricity = 5)
- tastes = list("bun" = 2, "pure electricity" = 4)
- foodtype = GRAIN | TOXIC
- value = FOOD_FAST
-
-/obj/item/reagent_containers/food/snacks/burger/crab
- name = "crab burger"
- desc = "A delicious patty of the crabby kind, slapped in between a bun."
- icon_state = "crabburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 2, /datum/reagent/consumable/nutriment/vitamin = 3)
- tastes = list("bun" = 2, "crab meat" = 4)
- foodtype = GRAIN | MEAT
- value = FOOD_RARE
-
-/obj/item/reagent_containers/food/snacks/burger/soylent
- name = "soylent burger"
- desc = "An eco-friendly burger made using upcycled low value biomass."
- icon_state = "soylentburger"
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 4, /datum/reagent/consumable/nutriment/vitamin = 3)
- tastes = list("bun" = 2, "assistant" = 4)
- foodtype = GRAIN | MEAT | DAIRY
- value = FOOD_EXOTIC
-
-/obj/item/reagent_containers/food/snacks/burger/rib
- name = "mcrib"
- desc = "An elusive rib shaped burger with limited availablity across the galaxy. Not as good as you remember it."
- icon_state = "mcrib"
- bonus_reagents = list(/datum/reagent/consumable/bbqsauce = 1, /datum/reagent/consumable/nutriment/protein = 2, /datum/reagent/consumable/nutriment/vitamin = 3)
- tastes = list("bun" = 2, "pork patty" = 4)
- foodtype = GRAIN | MEAT
- value = FOOD_RARE
-
-/obj/item/reagent_containers/food/snacks/burger/mcguffin
- name = "mcguffin"
- desc = "A cheap and greasy imitation of an eggs benedict."
- icon_state = "mcguffin"
- tastes = list("muffin" = 2, "bacon" = 3)
- bonus_reagents = list(/datum/reagent/consumable/eggyolk = 3, /datum/reagent/consumable/nutriment/protein = 2)
- foodtype = GRAIN | MEAT | BREAKFAST
- value = FOOD_RARE
-
-/obj/item/reagent_containers/food/snacks/burger/chicken
- name = "chicken sandwich" //Apparently the proud people of Americlapstan object to this thing being called a burger. Apparently McDonald's just calls it a burger in Europe as to not scare and confuse us.
- desc = "A delicious chicken sandwich, it is said the proceeds from this treat helps criminalize disarming people on the space frontier."
- icon_state = "chickenburger"
- tastes = list("bun" = 2, "chicken" = 4, "God's covenant" = 1)
- bonus_reagents = list(/datum/reagent/consumable/mayonnaise = 3, /datum/reagent/consumable/cooking_oil = 2, /datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/protein = 2)
- foodtype = GRAIN | MEAT | FRIED
- value = FOOD_RARE
-
-/obj/item/reagent_containers/food/snacks/burger/cheese
- name = "cheese burger"
- desc = "This noble burger stands proudly clad in golden cheese."
- icon_state = "cheeseburger"
- tastes = list("bun" = 2, "beef patty" = 4, "cheese" = 3)
- bonus_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/protein = 2, /datum/reagent/consumable/nutriment/vitamin = 1)
- foodtype = GRAIN | MEAT | DAIRY
- value = FOOD_FAST
-
-/obj/item/reagent_containers/food/snacks/burger/cheese/Initialize()
- . = ..()
- if(prob(33))
- icon_state = "cheeseburgeralt"
-
diff --git a/code/modules/food_and_drinks/food/snacks_other.dm b/code/modules/food_and_drinks/food/snacks_other.dm
index 08e92760dc2..652176caa70 100644
--- a/code/modules/food_and_drinks/food/snacks_other.dm
+++ b/code/modules/food_and_drinks/food/snacks_other.dm
@@ -760,7 +760,7 @@
/obj/item/reagent_containers/food/snacks/canned/attack(mob/living/M, mob/user, def_zone)
if (!is_drainable())
to_chat(user, "[src]'s lid hasn't been opened!")
- return 0
+ return FALSE
return ..()
/obj/item/reagent_containers/food/snacks/canned/beans
diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_burger.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_burger.dm
index 0bb2b970ca2..f40e11f3350 100644
--- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_burger.dm
+++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_burger.dm
@@ -13,7 +13,7 @@
parts = list(
/obj/item/reagent_containers/food/snacks/meat/steak/plain/human = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/human
+ result = /obj/item/food/burger/human
subcategory = CAT_BURGER
/datum/crafting_recipe/food/burger
@@ -23,7 +23,7 @@
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/plain
+ result = /obj/item/food/burger/plain
subcategory = CAT_BURGER
/datum/crafting_recipe/food/corgiburger
@@ -33,7 +33,7 @@
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/corgi
+ result = /obj/item/food/burger/corgi
subcategory = CAT_BURGER
/datum/crafting_recipe/food/appendixburger
@@ -42,7 +42,7 @@
/obj/item/organ/appendix = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/appendix
+ result = /obj/item/food/burger/appendix
subcategory = CAT_BURGER
/datum/crafting_recipe/food/brainburger
@@ -51,7 +51,7 @@
/obj/item/organ/brain = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/brain
+ result = /obj/item/food/burger/brain
subcategory = CAT_BURGER
/datum/crafting_recipe/food/xenoburger
@@ -60,7 +60,7 @@
/obj/item/reagent_containers/food/snacks/meat/steak/xeno = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/xeno
+ result = /obj/item/food/burger/xeno
subcategory = CAT_BURGER
/datum/crafting_recipe/food/bearger
@@ -69,7 +69,7 @@
/obj/item/reagent_containers/food/snacks/meat/steak/bear = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/bearger
+ result = /obj/item/food/burger/bearger
subcategory = CAT_BURGER
/datum/crafting_recipe/food/fishburger
@@ -79,7 +79,7 @@
/obj/item/reagent_containers/food/snacks/cheesewedge = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/fish
+ result = /obj/item/food/burger/fish
subcategory = CAT_BURGER
/datum/crafting_recipe/food/tofuburger
@@ -88,7 +88,7 @@
/obj/item/reagent_containers/food/snacks/tofu = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/tofu
+ result = /obj/item/food/burger/tofu
subcategory = CAT_BURGER
/datum/crafting_recipe/food/ghostburger
@@ -98,7 +98,7 @@
/datum/reagent/consumable/sodiumchloride = 2,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/ghost
+ result = /obj/item/food/burger/ghost
subcategory = CAT_BURGER
/datum/crafting_recipe/food/clownburger
@@ -107,7 +107,7 @@
/obj/item/clothing/mask/gas/clown_hat = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/clown
+ result = /obj/item/food/burger/clown
subcategory = CAT_BURGER
/datum/crafting_recipe/food/mimeburger
@@ -116,7 +116,7 @@
/obj/item/clothing/mask/gas/mime = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/mime
+ result = /obj/item/food/burger/mime
subcategory = CAT_BURGER
/datum/crafting_recipe/food/redburger
@@ -126,7 +126,7 @@
/obj/item/toy/crayon/red = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/red
+ result = /obj/item/food/burger/red
subcategory = CAT_BURGER
/datum/crafting_recipe/food/orangeburger
@@ -136,7 +136,7 @@
/obj/item/toy/crayon/orange = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/orange
+ result = /obj/item/food/burger/orange
subcategory = CAT_BURGER
/datum/crafting_recipe/food/yellowburger
@@ -146,7 +146,7 @@
/obj/item/toy/crayon/yellow = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/yellow
+ result = /obj/item/food/burger/yellow
subcategory = CAT_BURGER
/datum/crafting_recipe/food/greenburger
@@ -156,7 +156,7 @@
/obj/item/toy/crayon/green = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/green
+ result = /obj/item/food/burger/green
subcategory = CAT_BURGER
/datum/crafting_recipe/food/blueburger
@@ -166,7 +166,7 @@
/obj/item/toy/crayon/blue = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/blue
+ result = /obj/item/food/burger/blue
subcategory = CAT_BURGER
/datum/crafting_recipe/food/purpleburger
@@ -176,7 +176,7 @@
/obj/item/toy/crayon/purple = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/purple
+ result = /obj/item/food/burger/purple
subcategory = CAT_BURGER
/datum/crafting_recipe/food/blackburger
@@ -186,7 +186,7 @@
/obj/item/toy/crayon/black = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/black
+ result = /obj/item/food/burger/black
subcategory = CAT_BURGER
/datum/crafting_recipe/food/whiteburger
@@ -196,7 +196,7 @@
/obj/item/toy/crayon/white = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/white
+ result = /obj/item/food/burger/white
subcategory = CAT_BURGER
/datum/crafting_recipe/food/spellburger
@@ -205,7 +205,7 @@
/obj/item/clothing/head/wizard/fake = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/spell
+ result = /obj/item/food/burger/spell
subcategory = CAT_BURGER
/datum/crafting_recipe/food/spellburger2
@@ -214,7 +214,7 @@
/obj/item/clothing/head/wizard = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/spell
+ result = /obj/item/food/burger/spell
subcategory = CAT_BURGER
/datum/crafting_recipe/food/bigbiteburger
@@ -224,7 +224,7 @@
/obj/item/reagent_containers/food/snacks/cheesewedge = 2,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/bigbite
+ result = /obj/item/food/burger/bigbite
subcategory = CAT_BURGER
/datum/crafting_recipe/food/superbiteburger
@@ -240,7 +240,7 @@
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/superbite
+ result = /obj/item/food/burger/superbite
subcategory = CAT_BURGER
/datum/crafting_recipe/food/slimeburger
@@ -249,7 +249,7 @@
/datum/reagent/toxin/slimejelly = 5,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/jelly/slime
+ result = /obj/item/food/burger/jelly/slime
subcategory = CAT_BURGER
/datum/crafting_recipe/food/jellyburger
@@ -258,7 +258,7 @@
/datum/reagent/consumable/cherryjelly = 5,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/jelly/cherry
+ result = /obj/item/food/burger/jelly/cherry
subcategory = CAT_BURGER
/datum/crafting_recipe/food/fivealarmburger
@@ -268,7 +268,7 @@
/obj/item/reagent_containers/food/snacks/grown/ghost_chili = 2,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/fivealarm
+ result = /obj/item/food/burger/fivealarm
subcategory = CAT_BURGER
/datum/crafting_recipe/food/ratburger
@@ -277,7 +277,7 @@
/obj/item/reagent_containers/food/snacks/deadmouse = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/rat
+ result = /obj/item/food/burger/rat
subcategory = CAT_BURGER
/datum/crafting_recipe/food/baseballburger
@@ -286,7 +286,7 @@
/obj/item/melee/baseball_bat = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/baseball
+ result = /obj/item/food/burger/baseball
subcategory = CAT_BURGER
/datum/crafting_recipe/food/baconburger
@@ -296,7 +296,7 @@
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/baconburger
+ result = /obj/item/food/burger/baconburger
subcategory = CAT_BURGER
/datum/crafting_recipe/food/empoweredburger
@@ -306,7 +306,7 @@
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/empoweredburger
+ result = /obj/item/food/burger/empoweredburger
subcategory = CAT_BURGER
/datum/crafting_recipe/food/crabburger
@@ -316,7 +316,7 @@
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/crab
+ result = /obj/item/food/burger/crab
subcategory = CAT_BURGER
/datum/crafting_recipe/food/cheeseburger
@@ -326,7 +326,7 @@
/obj/item/reagent_containers/food/snacks/cheesewedge = 1,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/cheese
+ result = /obj/item/food/burger/cheese
subcategory = CAT_BURGER
/datum/crafting_recipe/food/soylentburger
@@ -336,7 +336,7 @@
/obj/item/reagent_containers/food/snacks/cheesewedge = 2,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/soylent
+ result = /obj/item/food/burger/soylent
subcategory = CAT_BURGER
/datum/crafting_recipe/food/ribburger
@@ -346,7 +346,7 @@
/obj/item/reagent_containers/food/snacks/onion_slice = 1, //feel free to remove if too burdensome.
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/rib
+ result = /obj/item/food/burger/rib
subcategory = CAT_BURGER
/datum/crafting_recipe/food/mcguffin
@@ -356,7 +356,7 @@
/obj/item/reagent_containers/food/snacks/meat/bacon = 2,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/mcguffin
+ result = /obj/item/food/burger/mcguffin
subcategory = CAT_BURGER
/datum/crafting_recipe/food/chickenburger
@@ -366,5 +366,5 @@
/datum/reagent/consumable/mayonnaise = 5,
/obj/item/reagent_containers/food/snacks/bun = 1
)
- result = /obj/item/reagent_containers/food/snacks/burger/chicken
+ result = /obj/item/food/burger/chicken
subcategory = CAT_BURGER
diff --git a/code/modules/holiday/holidays.dm b/code/modules/holiday/holidays.dm
index 5f431f4cc7d..799f5223a4b 100644
--- a/code/modules/holiday/holidays.dm
+++ b/code/modules/holiday/holidays.dm
@@ -322,11 +322,11 @@
if(mm == 9)
if(yy/4 == round(yy/4)) //Note: Won't work right on September 12th, 2200 (at least it's a Friday!)
if(dd == 12)
- return 1
+ return TRUE
else
if(dd == 13)
- return 1
- return 0
+ return TRUE
+ return FALSE
/datum/holiday/programmers/getStationPrefix()
return pick("span>","DEBUG: ","null","/list","EVENT PREFIX NOT FOUND") //Portability
diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm
index 14b8cf3bc84..f4d3dd477ba 100644
--- a/code/modules/hydroponics/grown.dm
+++ b/code/modules/hydroponics/grown.dm
@@ -54,8 +54,8 @@
if(reagents)
if(bitesize_mod)
bitesize = 1 + round(reagents.total_volume / bitesize_mod)
- return 1
- return 0
+ return TRUE
+ return FALSE
/obj/item/reagent_containers/food/snacks/grown/examine(user)
. = ..()
diff --git a/code/modules/hydroponics/growninedible.dm b/code/modules/hydroponics/growninedible.dm
index fb794db0e76..565f3ac6d1a 100644
--- a/code/modules/hydroponics/growninedible.dm
+++ b/code/modules/hydroponics/growninedible.dm
@@ -44,8 +44,8 @@
/obj/item/grown/proc/add_juice()
if(reagents)
- return 1
- return 0
+ return TRUE
+ return FALSE
/obj/item/grown/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..()) //was it caught by a mob?
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index ffed7d17489..6c8dfaae8dc 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -217,7 +217,7 @@
var/dat //Actual page content
var/due_date = 0 //Game time in 1/10th seconds
var/author //Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
- var/unique = 0 //0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified
+ var/unique = FALSE //false - Normal book, true - Should not be treated as normal book, unable to be copied, unable to be modified
var/title //The real name of the book.
var/window_size = null // Specific window size for the book, i.e: "1920x1080", Size x Width
diff --git a/code/modules/lighting/lighting_object.dm b/code/modules/lighting/lighting_object.dm
index 6c2db404e0f..72cc4c20a04 100644
--- a/code/modules/lighting/lighting_object.dm
+++ b/code/modules/lighting/lighting_object.dm
@@ -130,7 +130,7 @@
// Variety of overrides so the overlays don't get affected by weird things.
/atom/movable/lighting_object/ex_act(severity)
- return 0
+ return
/atom/movable/lighting_object/singularity_act()
return
diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm
index a214d653f71..c52470461e7 100644
--- a/code/modules/mining/equipment/explorer_gear.dm
+++ b/code/modules/mining/equipment/explorer_gear.dm
@@ -69,10 +69,6 @@
armor = list(MELEE = 70, BULLET = 40, LASER = 10, ENERGY = 20, BOMB = 50, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe)
-/obj/item/clothing/suit/space/hostile_environment/Initialize()
- . = ..()
- AddComponent(/datum/component/spraycan_paintable)
-
/obj/item/clothing/suit/space/hostile_environment/process()
. = ..()
var/mob/living/carbon/C = loc
@@ -96,7 +92,6 @@
/obj/item/clothing/head/helmet/space/hostile_environment/Initialize()
. = ..()
- AddComponent(/datum/component/spraycan_paintable)
update_icon()
/obj/item/clothing/head/helmet/space/hostile_environment/update_overlays()
diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm
index f9486a89776..eb464cc0ad7 100644
--- a/code/modules/mining/fulton.dm
+++ b/code/modules/mining/fulton.dm
@@ -181,13 +181,13 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
if(isliving(A))
var/mob/living/L = A
if(L.stat != DEAD)
- return 1
+ return TRUE
for(var/thing in A.GetAllContents())
if(isliving(A))
var/mob/living/L = A
if(L.stat != DEAD)
- return 1
- return 0
+ return TRUE
+ return FALSE
/obj/effect/extraction_holder/singularity_act()
return
diff --git a/code/modules/mining/lavaland/ash_flora.dm b/code/modules/mining/lavaland/ash_flora.dm
index ebf6e1e2c0f..4de3dec7bbd 100644
--- a/code/modules/mining/lavaland/ash_flora.dm
+++ b/code/modules/mining/lavaland/ash_flora.dm
@@ -30,7 +30,7 @@
/obj/structure/flora/ash/proc/harvest(user)
if(harvested)
- return 0
+ return FALSE
var/rand_harvested = rand(harvest_amount_low, harvest_amount_high)
if(rand_harvested)
@@ -49,7 +49,7 @@
desc = harvested_desc
harvested = TRUE
addtimer(CALLBACK(src, .proc/regrow), rand(regrowth_time_low, regrowth_time_high))
- return 1
+ return TRUE
/obj/structure/flora/ash/proc/regrow()
icon_state = base_icon
diff --git a/code/modules/mob/dead/new_player/login.dm b/code/modules/mob/dead/new_player/login.dm
index 237ce7f9e7e..2cc7ae74708 100644
--- a/code/modules/mob/dead/new_player/login.dm
+++ b/code/modules/mob/dead/new_player/login.dm
@@ -6,7 +6,7 @@
client.set_db_player_flags()
if(!mind)
mind = new /datum/mind(key)
- mind.active = 1
+ mind.active = TRUE
mind.current = src
. = ..()
diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm
index 527f0df3ae4..0825bc2be8f 100644
--- a/code/modules/mob/dead/new_player/new_player.dm
+++ b/code/modules/mob/dead/new_player/new_player.dm
@@ -108,10 +108,10 @@
/mob/dead/new_player/Topic(href, href_list[])
if(src != usr)
- return 0
+ return
if(!client)
- return 0
+ return
//Determines Relevent Population Cap
var/relevant_cap
@@ -124,7 +124,7 @@
if(href_list["show_preferences"])
client.prefs.ShowChoices(src)
- return 1
+ return TRUE
if(href_list["ready"])
var/tready = text2num(href_list["ready"])
@@ -451,7 +451,7 @@
if(mind)
if(transfer_after)
mind.late_joiner = TRUE
- mind.active = 0 //we wish to transfer the key manually
+ mind.active = FALSE //we wish to transfer the key manually
mind.transfer_to(H) //won't transfer key since the mind is not active
mind.original_character = H
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 3cad0475c18..4e75220ebcc 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -25,7 +25,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
var/datum/hud/living/carbon/hud = null // hud
var/bootime = 0
var/started_as_observer //This variable is set to 1 when you enter the game as an observer.
- //If you died in the game and are a ghsot - this will remain as null.
+ //If you died in the game and are a ghost - this will remain as null.
//Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot.
var/atom/movable/following = null
var/fun_verbs = 0
diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm
index c3af832fe70..79edeb9ff14 100644
--- a/code/modules/mob/living/blood.dm
+++ b/code/modules/mob/living/blood.dm
@@ -120,16 +120,16 @@
//Gets blood from mob to a container or other mob, preserving all data in it.
/mob/living/proc/transfer_blood_to(atom/movable/AM, amount, forced)
if(!blood_volume || !AM.reagents)
- return 0
+ return FALSE
if(blood_volume < BLOOD_VOLUME_BAD && !forced)
- return 0
+ return FALSE
if(blood_volume < amount)
amount = blood_volume
var/blood_id = get_blood_id()
if(!blood_id)
- return 0
+ return FALSE
blood_volume -= amount
@@ -147,13 +147,13 @@
C.ForceContractDisease(D)
if(!(blood_data["blood_type"] in get_safe_blood(C.dna.blood_type)))
C.reagents.add_reagent(/datum/reagent/toxin, amount * 0.5)
- return 1
+ return TRUE
C.blood_volume = min(C.blood_volume + round(amount, 0.1), BLOOD_VOLUME_MAX_LETHAL)
- return 1
+ return TRUE
AM.reagents.add_reagent(blood_id, amount, blood_data, bodytemperature)
- return 1
+ return TRUE
/mob/living/proc/get_blood_data(blood_id)
diff --git a/code/modules/mob/living/brain/MMI.dm b/code/modules/mob/living/brain/MMI.dm
index 9b3d62f61cd..2f0ea04750b 100644
--- a/code/modules/mob/living/brain/MMI.dm
+++ b/code/modules/mob/living/brain/MMI.dm
@@ -8,7 +8,7 @@
var/obj/item/radio/radio = null //Let's give it a radio.
var/mob/living/brain/brainmob = null //The current occupant.
var/mob/living/silicon/robot = null //Appears unused.
- var/obj/mecha = null //This does not appear to be used outside of reference in mecha.dm.
+ var/obj/vehicle/sealed/mecha = null //This does not appear to be used outside of reference in mecha.dm.
var/obj/item/organ/brain/brain = null //The actual brain
var/datum/ai_laws/laws = new()
var/force_replace_ai_name = FALSE
diff --git a/code/modules/mob/living/brain/brain.dm b/code/modules/mob/living/brain/brain.dm
index 25830066b9e..587d28c2513 100644
--- a/code/modules/mob/living/brain/brain.dm
+++ b/code/modules/mob/living/brain/brain.dm
@@ -35,7 +35,7 @@
return ..()
/mob/living/brain/update_mobility()
- if(in_contents_of(/obj/mecha))
+ if(in_contents_of(/obj/vehicle/sealed/mecha))
mobility_flags = MOBILITY_FLAGS_DEFAULT
else
mobility_flags = NONE
@@ -56,22 +56,15 @@
return // no eyes, no flashing
/mob/living/brain/can_be_revived()
- . = 1
if(!container || health <= HEALTH_THRESHOLD_DEAD)
- return 0
+ return FALSE
+ return TRUE
/mob/living/brain/fully_replace_character_name(oldname,newname)
..()
if(stored_dna)
stored_dna.real_name = real_name
-/mob/living/brain/ClickOn(atom/A, params)
- ..()
- if(container)
- var/obj/mecha/M = container.mecha
- if(istype(M))
- return M.click_action(A,src,params)
-
/mob/living/brain/forceMove(atom/destination)
if(container)
return container.forceMove(destination)
@@ -92,7 +85,7 @@
if(!container)
return
if (container.mecha)
- var/obj/mecha/M = container.mecha
+ var/obj/vehicle/sealed/mecha/M = container.mecha
if(M.mouse_pointer)
client.mouse_pointer_icon = M.mouse_pointer
if (client && ranged_ability && ranged_ability.ranged_mousepointer)
diff --git a/code/modules/mob/living/brain/life.dm b/code/modules/mob/living/brain/life.dm
index ff4b85bdcf5..4128235e45a 100644
--- a/code/modules/mob/living/brain/life.dm
+++ b/code/modules/mob/living/brain/life.dm
@@ -1,6 +1,5 @@
/mob/living/brain/Life()
- set invisibility = 0
if (notransform)
return
if(!loc)
diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm
index 8bc8f9eb40b..62c2e35faea 100644
--- a/code/modules/mob/living/carbon/alien/alien.dm
+++ b/code/modules/mob/living/carbon/alien/alien.dm
@@ -19,9 +19,9 @@
heat_protection = 0.5 // minor heat insulation
- var/leaping = 0
+ var/leaping = FALSE
gib_type = /obj/effect/decal/cleanable/xenoblood/xgibs
- unique_name = 1
+ unique_name = TRUE
var/static/regex/alien_name_regex = new("alien (larva|sentinel|drone|hunter|praetorian|queen)( \\(\\d+\\))?")
diff --git a/code/modules/mob/living/carbon/alien/alien_defense.dm b/code/modules/mob/living/carbon/alien/alien_defense.dm
index be92b6d7089..9a98d00a892 100644
--- a/code/modules/mob/living/carbon/alien/alien_defense.dm
+++ b/code/modules/mob/living/carbon/alien/alien_defense.dm
@@ -54,8 +54,9 @@ In all, this is a lot like the monkey code. /N
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M)
- if(..()) //to allow surgery to return properly.
- return 0
+ . = ..()
+ if(.) //to allow surgery to return properly.
+ return FALSE
switch(M.a_intent)
if("help")
@@ -64,11 +65,11 @@ In all, this is a lot like the monkey code. /N
grabbedby(M)
if ("harm")
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
- return 1
+ return TRUE
if("disarm")
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
- return 1
- return 0
+ return TRUE
+ return FALSE
/mob/living/carbon/alien/attack_paw(mob/living/carbon/monkey/M)
@@ -133,4 +134,4 @@ In all, this is a lot like the monkey code. /N
return 0
/mob/living/carbon/alien/acid_act(acidpwr, acid_volume)
- return 0//aliens are immune to acid.
+ return FALSE//aliens are immune to acid.
diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
index 1fc9e2853ea..4b175560a2d 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
@@ -77,10 +77,10 @@ Doesn't work on other aliens/AI.*/
/obj/effect/proc_holder/alien/plant/fire(mob/living/carbon/user)
if(locate(/obj/structure/alien/weeds/node) in get_turf(user))
to_chat(user, "There's already a weed node here!")
- return 0
+ return FALSE
user.visible_message("[user] plants some alien weeds!")
new/obj/structure/alien/weeds/node(user.loc)
- return 1
+ return TRUE
/obj/effect/proc_holder/alien/whisper
name = "Whisper"
@@ -94,7 +94,7 @@ Doesn't work on other aliens/AI.*/
options += Ms
var/mob/living/M = input("Select who to whisper to:","Whisper to?",null) as null|mob in sortNames(options)
if(!M)
- return 0
+ return FALSE
if(M.anti_magic_check(FALSE, FALSE, TRUE, 0))
to_chat(user, "As you try to communicate with [M], you're suddenly stopped by a vision of a massive tinfoil wall that streches beyond visible range. It seems you've been foiled.")
return FALSE
@@ -113,8 +113,8 @@ Doesn't work on other aliens/AI.*/
var/follow_link_whispee = FOLLOW_LINK(ded, M)
to_chat(ded, "[follow_link_user] [user] Alien Whisper --> [follow_link_whispee] [M] [msg]")
else
- return 0
- return 1
+ return FALSE
+ return TRUE
/obj/effect/proc_holder/alien/transfer
name = "Transfer Plasma"
@@ -129,7 +129,7 @@ Doesn't work on other aliens/AI.*/
aliens_around.Add(A)
var/mob/living/carbon/M = input("Select who to transfer to:","Transfer plasma to?",null) as mob in sortNames(aliens_around)
if(!M)
- return 0
+ return
var/amount = input("Amount:", "Transfer Plasma to [M]") as num|null
if (amount)
amount = min(abs(round(amount)), user.getPlasma())
@@ -158,21 +158,19 @@ Doesn't work on other aliens/AI.*/
if(target in oview(1,user))
if(target.acid_act(200, 100))
user.visible_message("[user] vomits globs of vile stuff all over [target]. It begins to sizzle and melt under the bubbling mess of acid!")
- return 1
+ return TRUE
else
to_chat(user, "You cannot dissolve this object.")
+ return FALSE
-
- return 0
- else
- to_chat(src, "[target] is too far away.")
- return 0
+ to_chat(src, "[target] is too far away.")
+ return FALSE
/obj/effect/proc_holder/alien/acid/fire(mob/living/carbon/alien/user)
var/O = input("Select what to dissolve:","Dissolve",null) as obj|turf in oview(1,user)
if(!O || user.incapacitated())
- return 0
+ return FALSE
else
return corrode(O,user)
@@ -208,19 +206,20 @@ Doesn't work on other aliens/AI.*/
action.UpdateButtonIcon()
/obj/effect/proc_holder/alien/neurotoxin/InterceptClickOn(mob/living/caller, params, atom/target)
- if(..())
+ . = ..()
+ if(.)
return
var/p_cost = 50
if(!iscarbon(ranged_ability_user) || ranged_ability_user.stat)
remove_ranged_ability()
- return
+ return FALSE
var/mob/living/carbon/user = ranged_ability_user
if(user.getPlasma() < p_cost)
to_chat(user, "You need at least [p_cost] plasma to spit.")
remove_ranged_ability()
- return
+ return FALSE
var/turf/T = user.loc
var/turf/U = get_step(user, user.dir) // Get the tile infront of the move, based on their direction
@@ -315,14 +314,14 @@ Doesn't work on other aliens/AI.*/
/mob/living/carbon/proc/adjustPlasma(amount)
var/obj/item/organ/alien/plasmavessel/vessel = getorgan(/obj/item/organ/alien/plasmavessel)
if(!vessel)
- return 0
+ return FALSE
vessel.storedPlasma = max(vessel.storedPlasma + amount,0)
vessel.storedPlasma = min(vessel.storedPlasma, vessel.max_plasma) //upper limit of max_plasma, lower limit of 0
for(var/X in abilities)
var/obj/effect/proc_holder/alien/APH = X
if(APH.has_action)
APH.action.UpdateButtonIcon()
- return 1
+ return TRUE
/mob/living/carbon/alien/adjustPlasma(amount)
. = ..()
@@ -331,6 +330,5 @@ Doesn't work on other aliens/AI.*/
/mob/living/carbon/proc/usePlasma(amount)
if(getPlasma() >= amount)
adjustPlasma(-amount)
- return 1
-
- return 0
+ return TRUE
+ return FALSE
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 d9ae677ab49..5b6f36c2f3e 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
@@ -26,18 +26,18 @@
var/obj/item/organ/alien/hivenode/node = user.getorgan(/obj/item/organ/alien/hivenode)
if(!node) //Players are Murphy's Law. We may not expect there to ever be a living xeno with no hivenode, but they _WILL_ make it happen.
to_chat(user, "Without the hivemind, you can't possibly hold the responsibility of leadership!")
- return 0
+ return FALSE
if(node.recent_queen_death)
to_chat(user, "Your thoughts are still too scattered to take up the position of leadership.")
- return 0
+ return FALSE
if(!isturf(user.loc))
to_chat(user, "You can't evolve here!")
- return 0
+ return FALSE
if(!get_alien_type(/mob/living/carbon/alien/humanoid/royal))
var/mob/living/carbon/alien/humanoid/royal/praetorian/new_xeno = new (user.loc)
user.alien_evolve(new_xeno)
- return 1
+ return TRUE
else
to_chat(user, "We already have a living royal!")
- return 0
+ return FALSE
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/praetorian.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/praetorian.dm
index bb6e22d7196..86038c84f5d 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/praetorian.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/praetorian.dm
@@ -29,14 +29,14 @@
var/obj/item/organ/alien/hivenode/node = user.getorgan(/obj/item/organ/alien/hivenode)
if(!node) //Just in case this particular Praetorian gets violated and kept by the RD as a replacement for Lamarr.
to_chat(user, "Without the hivemind, you would be unfit to rule as queen!")
- return 0
+ return FALSE
if(node.recent_queen_death)
to_chat(user, "You are still too burdened with guilt to evolve into a queen.")
- return 0
+ return FALSE
if(!get_alien_type(/mob/living/carbon/alien/humanoid/royal/queen))
var/mob/living/carbon/alien/humanoid/royal/queen/new_xeno = new (user.loc)
user.alien_evolve(new_xeno)
- return 1
+ return TRUE
else
to_chat(user, "We already have an alive queen!")
- return 0
+ return FALSE
diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
index acc833f89fb..2ae3f7fbf09 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
@@ -13,7 +13,7 @@
var/alt_inhands_file = 'icons/mob/alienqueen.dmi'
/mob/living/carbon/alien/humanoid/royal/can_inject()
- return 0
+ return FALSE
/mob/living/carbon/alien/humanoid/royal/queen
name = "alien queen"
@@ -83,20 +83,20 @@
var/obj/item/queenpromote/prom
if(get_alien_type(/mob/living/carbon/alien/humanoid/royal/praetorian/))
to_chat(user, "You already have a Praetorian!")
- return 0
+ return
else
for(prom in user)
to_chat(user, "You discard [prom].")
qdel(prom)
- return 0
+ return
prom = new (user.loc)
if(!user.put_in_active_hand(prom, 1))
to_chat(user, "You must empty your hands before preparing the parasite.")
- return 0
+ return
else //Just in case telling the player only once is not enough!
to_chat(user, "Use the royal parasite on one of your children to promote her to Praetorian!")
- return 0
+ return
/obj/item/queenpromote
name = "\improper royal parasite"
diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm
index fe53dfa7177..4b7bd676771 100644
--- a/code/modules/mob/living/carbon/alien/larva/life.dm
+++ b/code/modules/mob/living/carbon/alien/larva/life.dm
@@ -1,7 +1,6 @@
/mob/living/carbon/alien/larva/Life()
- set invisibility = 0
if (notransform)
return
if(..() && !IS_IN_STASIS(src)) //not dead and not in stasis
diff --git a/code/modules/mob/living/carbon/alien/larva/powers.dm b/code/modules/mob/living/carbon/alien/larva/powers.dm
index f7a4e2133ca..85a9b7746bf 100644
--- a/code/modules/mob/living/carbon/alien/larva/powers.dm
+++ b/code/modules/mob/living/carbon/alien/larva/powers.dm
@@ -57,7 +57,7 @@
new_xeno = new /mob/living/carbon/alien/humanoid/drone(L.loc)
L.alien_evolve(new_xeno)
- return 0
+ return
else
to_chat(user, "You are not fully grown!")
- return 0
+ return
diff --git a/code/modules/mob/living/carbon/alien/organs.dm b/code/modules/mob/living/carbon/alien/organs.dm
index d89945195b8..3e9becdddb6 100644
--- a/code/modules/mob/living/carbon/alien/organs.dm
+++ b/code/modules/mob/living/carbon/alien/organs.dm
@@ -103,7 +103,8 @@
zone = BODY_ZONE_HEAD
slot = "hivenode"
w_class = WEIGHT_CLASS_TINY
- var/recent_queen_death = 0 //Indicates if the queen died recently, aliens are heavily weakened while this is active.
+ ///Indicates if the queen died recently, aliens are heavily weakened while this is active.
+ var/recent_queen_death = FALSE
alien_powers = list(/obj/effect/proc_holder/alien/whisper)
/obj/item/organ/alien/hivenode/Insert(mob/living/carbon/M, special = 0)
@@ -135,7 +136,7 @@
owner.add_confusion(30)
owner.stuttering += 30
- recent_queen_death = 1
+ recent_queen_death = TRUE
owner.throw_alert("alien_noqueen", /obj/screen/alert/alien_vulnerable)
addtimer(CALLBACK(src, .proc/clear_queen_death), QUEEN_DEATH_DEBUFF_DURATION)
@@ -143,7 +144,7 @@
/obj/item/organ/alien/hivenode/proc/clear_queen_death()
if(QDELETED(src)) //In case the node is deleted
return
- recent_queen_death = 0
+ recent_queen_death = FALSE
if(!owner) //In case the xeno is butchered or subjected to surgery after death.
return
to_chat(owner, "The pain of the queen's death is easing. You begin to hear the hivemind again.")
diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm
index c636427ef9d..444c3156ba3 100644
--- a/code/modules/mob/living/carbon/alien/special/facehugger.dm
+++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm
@@ -96,15 +96,14 @@
/obj/item/clothing/mask/facehugger/on_found(mob/finder)
if(stat == CONSCIOUS)
return HasProximity(finder)
- return 0
/obj/item/clothing/mask/facehugger/HasProximity(atom/movable/AM as mob|obj)
if(CanHug(AM) && Adjacent(AM))
return Leap(AM)
- return 0
/obj/item/clothing/mask/facehugger/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, quickstart = TRUE)
- if(!..())
+ . = ..()
+ if(!.)
return
if(stat == CONSCIOUS)
icon_state = "[initial(icon_state)]_thrown"
@@ -248,22 +247,22 @@
/proc/CanHug(mob/living/M)
if(!istype(M))
- return 0
+ return FALSE
if(M.stat == DEAD)
- return 0
+ return FALSE
if(M.getorgan(/obj/item/organ/alien/hivenode))
- return 0
+ return FALSE
if(ismonkey(M))
- return 1
+ return TRUE
var/mob/living/carbon/C = M
if(ishuman(C) && !(ITEM_SLOT_MASK in C.dna.species.no_equip))
var/mob/living/carbon/human/H = C
if(H.is_mouth_covered(head_only = 1))
- return 0
- return 1
- return 0
+ return FALSE
+ return TRUE
+ return FALSE
#undef MIN_ACTIVE_TIME
#undef MAX_ACTIVE_TIME
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 444746b6476..9d2a67c94fa 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -871,7 +871,7 @@
/mob/living/carbon/can_be_revived()
. = ..()
if(!getorgan(/obj/item/organ/brain) && (!mind || !mind.has_antag_datum(/datum/antagonist/changeling)))
- return 0
+ return FALSE
/mob/living/carbon/proc/can_defib()
if (suiciding)
diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm
index e4d04473bf3..5d6074bd200 100644
--- a/code/modules/mob/living/carbon/examine.dm
+++ b/code/modules/mob/living/carbon/examine.dm
@@ -24,9 +24,9 @@
if (back)
. += "[t_He] [t_has] [back.get_examine_string(user)] on [t_his] back."
- var/appears_dead = 0
+ var/appears_dead = FALSE
if (stat == DEAD)
- appears_dead = 1
+ appears_dead = TRUE
if(getorgan(/obj/item/organ/brain))
. += "[t_He] [t_is] limp and unresponsive, with no signs of life."
else if(get_bodypart(BODY_ZONE_HEAD))
diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm
index f4a693d5ade..15423512d89 100644
--- a/code/modules/mob/living/carbon/human/death.dm
+++ b/code/modules/mob/living/carbon/human/death.dm
@@ -32,10 +32,6 @@ GLOBAL_LIST_EMPTY(dead_players_during_shift)
if(client && !suiciding && !(client in GLOB.dead_players_during_shift))
GLOB.dead_players_during_shift += client
GLOB.deaths_during_shift++
- if(ismecha(loc))
- var/obj/mecha/M = loc
- if(M.occupant == src)
- M.go_out()
if(!QDELETED(dna)) //The gibbed param is bit redundant here since dna won't exist at this point if they got deleted.
dna.species.spec_death(gibbed, src)
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 13c8f37e926..86ac018a071 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -167,7 +167,7 @@
/mob/living/carbon/human/attacked_by(obj/item/I, mob/living/user)
if(!I || !user)
- return 0
+ return FALSE
var/obj/item/bodypart/affecting
if(user == src)
@@ -212,7 +212,7 @@
affecting = get_bodypart(BODY_ZONE_CHEST)
if(M.a_intent == INTENT_HELP)
..() //shaking
- return 0
+ return FALSE
if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stunned instead.
var/obj/item/I = get_active_held_item()
@@ -243,150 +243,115 @@
if(..()) //successful monkey bite, this handles disease contraction.
var/damage = rand(1, 3)
if(check_shields(M, damage, "the [M.name]"))
- return 0
+ return FALSE
if(stat != DEAD)
apply_damage(damage, BRUTE, affecting, run_armor_check(affecting, MELEE))
- return 1
+ return TRUE
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M)
if(check_shields(M, 0, "the M.name"))
visible_message("[M] attempts to touch [src]!", \
"[M] attempts to touch you!", "You hear a swoosh!", null, M)
to_chat(M, "You attempt to touch [src]!")
- return 0
+ return FALSE
+ . = ..()
+ if(!.)
+ return
+ if(M.a_intent == INTENT_HARM)
+ if (w_uniform)
+ w_uniform.add_fingerprint(M)
+ var/damage = prob(90) ? 20 : 0
+ if(!damage)
+ playsound(loc, 'sound/weapons/slashmiss.ogg', 50, TRUE, -1)
+ visible_message("[M] lunges at [src]!", \
+ "[M] lunges at you!", "You hear a swoosh!", null, M)
+ to_chat(M, "You lunge at [src]!")
+ return FALSE
+ var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
+ if(!affecting)
+ affecting = get_bodypart(BODY_ZONE_CHEST)
+ var/armor_block = run_armor_check(affecting, MELEE,"","",10)
- if(..())
- if(M.a_intent == INTENT_HARM)
- if (w_uniform)
- w_uniform.add_fingerprint(M)
- var/damage = prob(90) ? 20 : 0
- if(!damage)
- playsound(loc, 'sound/weapons/slashmiss.ogg', 50, TRUE, -1)
- visible_message("[M] lunges at [src]!", \
- "[M] lunges at you!", "You hear a swoosh!", null, M)
- to_chat(M, "You lunge at [src]!")
- return 0
- var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
- if(!affecting)
- affecting = get_bodypart(BODY_ZONE_CHEST)
- var/armor_block = run_armor_check(affecting, MELEE,"","",10)
+ playsound(loc, 'sound/weapons/slice.ogg', 25, TRUE, -1)
+ visible_message("[M] slashes at [src]!", \
+ "[M] slashes at you!", "You hear a sickening sound of a slice!", null, M)
+ to_chat(M, "You slash at [src]!")
+ log_combat(M, src, "attacked")
+ if(!dismembering_strike(M, M.zone_selected)) //Dismemberment successful
+ return TRUE
+ apply_damage(damage, BRUTE, affecting, armor_block)
- playsound(loc, 'sound/weapons/slice.ogg', 25, TRUE, -1)
- visible_message("[M] slashes at [src]!", \
- "[M] slashes at you!", "You hear a sickening sound of a slice!", null, M)
- to_chat(M, "You slash at [src]!")
- log_combat(M, src, "attacked")
- if(!dismembering_strike(M, M.zone_selected)) //Dismemberment successful
- return 1
- apply_damage(damage, BRUTE, affecting, armor_block)
-
- if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stun instead.
- var/obj/item/I = get_active_held_item()
- if(I && dropItemToGround(I))
- playsound(loc, 'sound/weapons/slash.ogg', 25, TRUE, -1)
- visible_message("[M] disarms [src]!", \
- "[M] disarms you!", "You hear aggressive shuffling!", null, M)
- to_chat(M, "You disarm [src]!")
- else
- playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1)
- Paralyze(100)
- log_combat(M, src, "tackled")
- visible_message("[M] tackles [src] down!", \
- "[M] tackles you down!", "You hear aggressive shuffling followed by a loud thud!", null, M)
- to_chat(M, "You tackle [src] down!")
+ if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stun instead.
+ var/obj/item/I = get_active_held_item()
+ if(I && dropItemToGround(I))
+ playsound(loc, 'sound/weapons/slash.ogg', 25, TRUE, -1)
+ visible_message("[M] disarms [src]!", \
+ "[M] disarms you!", "You hear aggressive shuffling!", null, M)
+ to_chat(M, "You disarm [src]!")
+ else
+ playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1)
+ Paralyze(100)
+ log_combat(M, src, "tackled")
+ visible_message("[M] tackles [src] down!", \
+ "[M] tackles you down!", "You hear aggressive shuffling followed by a loud thud!", null, M)
+ to_chat(M, "You tackle [src] down!")
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L)
-
- if(..()) //successful larva bite.
- var/damage = rand(1, 3)
- if(check_shields(L, damage, "the [L.name]"))
- return 0
- if(stat != DEAD)
- L.amount_grown = min(L.amount_grown + damage, L.max_grown)
- var/obj/item/bodypart/affecting = get_bodypart(ran_zone(L.zone_selected))
- if(!affecting)
- affecting = get_bodypart(BODY_ZONE_CHEST)
- var/armor_block = run_armor_check(affecting, MELEE)
- apply_damage(damage, BRUTE, affecting, armor_block)
+ . = ..()
+ if(!.)
+ return //successful larva bite.
+ var/damage = rand(1, 3)
+ if(check_shields(L, damage, "the [L.name]"))
+ return FALSE
+ if(stat != DEAD)
+ L.amount_grown = min(L.amount_grown + damage, L.max_grown)
+ var/obj/item/bodypart/affecting = get_bodypart(ran_zone(L.zone_selected))
+ if(!affecting)
+ affecting = get_bodypart(BODY_ZONE_CHEST)
+ var/armor_block = run_armor_check(affecting, MELEE)
+ apply_damage(damage, BRUTE, affecting, armor_block)
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M)
. = ..()
- if(.)
- var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
- if(check_shields(M, damage, "the [M.name]", MELEE_ATTACK, M.armour_penetration))
- return FALSE
- var/dam_zone = dismembering_strike(M, pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
- if(!dam_zone) //Dismemberment successful
- return TRUE
- var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
- if(!affecting)
- affecting = get_bodypart(BODY_ZONE_CHEST)
- var/armor = run_armor_check(affecting, MELEE, armour_penetration = M.armour_penetration)
- apply_damage(damage, M.melee_damage_type, affecting, armor, wound_bonus = M.wound_bonus, bare_wound_bonus = M.bare_wound_bonus, sharpness = M.sharpness)
+ if(!.)
+ return
+ var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
+ if(check_shields(M, damage, "the [M.name]", MELEE_ATTACK, M.armour_penetration))
+ return FALSE
+ var/dam_zone = dismembering_strike(M, pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
+ if(!dam_zone) //Dismemberment successful
+ return TRUE
+ var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
+ if(!affecting)
+ affecting = get_bodypart(BODY_ZONE_CHEST)
+ var/armor = run_armor_check(affecting, MELEE, armour_penetration = M.armour_penetration)
+ apply_damage(damage, M.melee_damage_type, affecting, armor, wound_bonus = M.wound_bonus, bare_wound_bonus = M.bare_wound_bonus, sharpness = M.sharpness)
/mob/living/carbon/human/attack_slime(mob/living/simple_animal/slime/M)
- if(..()) //successful slime attack
- var/damage = rand(5, 25)
- var/wound_mod = -45 // 25^1.4=90, 90-45=45
- if(M.is_adult)
- damage = rand(10, 35)
- wound_mod = -90 // 35^1.4=145, 145-90=55
+ . = ..()
+ if(!.) // slime attack failed
+ return
+ var/damage = rand(5, 25)
+ var/wound_mod = -45 // 25^1.4=90, 90-45=45
+ if(M.is_adult)
+ damage = rand(10, 35)
+ wound_mod = -90 // 35^1.4=145, 145-90=55
- if(check_shields(M, damage, "the [M.name]"))
- return 0
+ if(check_shields(M, damage, "the [M.name]"))
+ return FALSE
- var/dam_zone = dismembering_strike(M, pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
- if(!dam_zone) //Dismemberment successful
- return 1
+ var/dam_zone = dismembering_strike(M, pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
+ if(!dam_zone) //Dismemberment successful
+ return TRUE
- var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
- if(!affecting)
- affecting = get_bodypart(BODY_ZONE_CHEST)
- var/armor_block = run_armor_check(affecting, MELEE)
- apply_damage(damage, BRUTE, affecting, armor_block, wound_bonus=wound_mod)
-
-/mob/living/carbon/human/mech_melee_attack(obj/mecha/M)
-
- if(M.occupant.a_intent == INTENT_HARM)
- if(HAS_TRAIT(M.occupant, TRAIT_PACIFISM))
- to_chat(M.occupant, "You don't want to harm other living beings!")
- return
- M.do_attack_animation(src)
- if(M.damtype == BRUTE)
- step_away(src,M,15)
- var/obj/item/bodypart/temp = get_bodypart(pick(BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_HEAD))
- if(temp)
- var/update = 0
- var/dmg = rand(M.force/2, M.force)
- switch(M.damtype)
- if(BRUTE)
- if(M.force > 35) // durand and other heavy mechas
- Unconscious(20)
- else if(M.force > 20 && !IsKnockdown()) // lightweight mechas like gygax
- Knockdown(40)
- update |= temp.receive_damage(dmg, 0)
- playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
- if(BURN)
- update |= temp.receive_damage(0, dmg)
- playsound(src, 'sound/items/welder.ogg', 50, TRUE)
- if(TOX)
- M.mech_toxin_damage(src)
- else
- return
- if(update)
- update_damage_overlays()
- updatehealth()
-
- visible_message("[M.name] hits [src]!", \
- "[M.name] hits you!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, M)
- to_chat(M, "You hit [src]!")
- log_combat(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
-
- else
- ..()
+ var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
+ if(!affecting)
+ affecting = get_bodypart(BODY_ZONE_CHEST)
+ var/armor_block = run_armor_check(affecting, MELEE)
+ apply_damage(damage, BRUTE, affecting, armor_block, wound_bonus=wound_mod)
/mob/living/carbon/human/ex_act(severity, target, origin)
diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm
index 9ae1c576ae9..3c197bb32f5 100644
--- a/code/modules/mob/living/carbon/human/human_defines.dm
+++ b/code/modules/mob/living/carbon/human/human_defines.dm
@@ -9,7 +9,7 @@
possible_a_intents = list(INTENT_HELP, INTENT_DISARM, INTENT_GRAB, INTENT_HARM)
pressure_resistance = 25
can_buckle = TRUE
- buckle_lying = FALSE
+ buckle_lying = 0
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
can_be_shoved_into = TRUE
diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm
index a5a6f432f80..5948b7fa931 100644
--- a/code/modules/mob/living/carbon/human/human_movement.dm
+++ b/code/modules/mob/living/carbon/human/human_movement.dm
@@ -11,14 +11,14 @@
/mob/living/carbon/human/slip(knockdown_amount, obj/O, lube, paralyze, forcedrop)
if(HAS_TRAIT(src, TRAIT_NOSLIPALL))
- return 0
+ return FALSE
if (!(lube & GALOSHES_DONT_HELP))
if(HAS_TRAIT(src, TRAIT_NOSLIPWATER))
- return 0
+ return FALSE
if(shoes && istype(shoes, /obj/item/clothing))
var/obj/item/clothing/CS = shoes
if (CS.clothing_flags & NOSLIP)
- return 0
+ return FALSE
if (lube & SLIDE_ICE)
if(shoes && istype(shoes, /obj/item/clothing))
var/obj/item/clothing/CS = shoes
diff --git a/code/modules/mob/living/carbon/human/human_say.dm b/code/modules/mob/living/carbon/human/human_say.dm
index 2ff1204844a..8d54ed84e92 100644
--- a/code/modules/mob/living/carbon/human/human_say.dm
+++ b/code/modules/mob/living/carbon/human/human_say.dm
@@ -60,8 +60,8 @@
/mob/living/carbon/human/radio(message, list/message_mods = list(), list/spans, language) //Poly has a copy of this, lazy bastard
. = ..()
- if(. != FALSE)
- return .
+ if(.)
+ return
if(message_mods[MODE_HEADSET])
if(ears)
@@ -76,7 +76,7 @@
ears.talk_into(src, message, message_mods[RADIO_EXTENSION], spans, language, message_mods)
return ITALICS | REDUCE_RANGE
- return 0
+ return FALSE
/mob/living/carbon/human/get_alt_name()
if(name != GetVoice())
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 70bf9cce8fa..bc9a69097ca 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -19,14 +19,13 @@
#define THERMAL_PROTECTION_HAND_RIGHT 0.025
/mob/living/carbon/human/Life()
- set invisibility = 0
if (notransform)
return
. = ..()
if (QDELETED(src))
- return 0
+ return FALSE
if(!IS_IN_STASIS(src))
if(.) //not dead
@@ -49,7 +48,7 @@
name = get_visible_name()
if(stat != DEAD)
- return 1
+ return TRUE
/mob/living/carbon/human/calculate_affecting_pressure(pressure)
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index 1a235723b76..9abdbf353eb 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -240,20 +240,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
/datum/species/proc/copy_properties_from(datum/species/old_species)
return
-/**
- * Checks if this carbon is allowed to be a certain job or rank.
- *
- * Override this locally if you want to define when this species qualifies for what rank if human authority is enforced.
- * Arguments:
- * * rank - Rank to be tested.
- * * features - Features of a species that factors into rank qualifications, like a human with cat ears being unable to join command positions.
- */
-/datum/species/proc/qualifies_for_rank(rank, list/features)
- if(rank in GLOB.command_positions)
- return 0
- return 1
-
-
/** regenerate_organs
* Corrects organs in a carbon, removing ones it doesn't need and adding ones it does
*
@@ -1185,7 +1171,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.throw_alert("nutrition", /obj/screen/alert/starving)
/datum/species/proc/update_health_hud(mob/living/carbon/human/H)
- return 0
+ return FALSE
/datum/species/proc/handle_mutations_and_radiation(mob/living/carbon/human/H)
if(HAS_TRAIT(H, TRAIT_RADIMMUNE))
@@ -1382,7 +1368,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.visible_message("[M] attempts to touch [H]!", \
"[M] attempts to touch you!", "You hear a swoosh!", COMBAT_MESSAGE_RANGE, M)
to_chat(M, "You attempt to touch [H]!")
- return 0
+ return
SEND_SIGNAL(M, COMSIG_MOB_ATTACK_HAND, M, H, attacker_style)
switch(M.a_intent)
if("help")
@@ -1401,11 +1387,11 @@ GLOBAL_LIST_EMPTY(roundstart_races)
// Allows you to put in item-specific reactions based on species
if(user != H)
if(H.check_shields(I, I.force, "the [I.name]", MELEE_ATTACK, I.armour_penetration))
- return 0
+ return FALSE
if(H.check_block())
H.visible_message("[H] blocks [I]!", \
"You block [I]!")
- return 0
+ return FALSE
var/hit_area
if(!affecting) //Something went wrong. Maybe the limb is missing?
@@ -1428,14 +1414,14 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.send_item_attack_message(I, user, hit_area, affecting)
if(!I.force)
- return 0 //item force is zero
+ return FALSE //item force is zero
- var/bloody = 0
+ var/bloody = FALSE
if(((I.damtype == BRUTE) && I.force && prob(25 + (I.force * 2))))
if(affecting.status == BODYPART_ORGANIC)
I.add_mob_blood(H) //Make the weapon bloody, not the person.
if(prob(I.force * 2)) //blood spatter!
- bloody = 1
+ bloody = TRUE
var/turf/location = H.loc
if(istype(location))
H.add_splatter_floor(location)
diff --git a/code/modules/mob/living/carbon/human/species_types/felinid.dm b/code/modules/mob/living/carbon/human/species_types/felinid.dm
index 39a014c6670..15a76493df0 100644
--- a/code/modules/mob/living/carbon/human/species_types/felinid.dm
+++ b/code/modules/mob/living/carbon/human/species_types/felinid.dm
@@ -15,9 +15,6 @@
var/original_felinid = TRUE //set to false for felinids created by mass-purrbation
payday_modifier = 0.75
-/datum/species/human/felinid/qualifies_for_rank(rank, list/features)
- return TRUE
-
//Curiosity killed the cat's wagging tail.
/datum/species/human/felinid/spec_death(gibbed, mob/living/carbon/human/H)
if(H)
diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm
index 339e50de207..b1d3c9a5951 100644
--- a/code/modules/mob/living/carbon/human/species_types/golems.dm
+++ b/code/modules/mob/living/carbon/human/species_types/golems.dm
@@ -471,10 +471,12 @@
var/last_teleport = 0
/datum/action/innate/unstable_teleport/IsAvailable()
- if(..())
- if(world.time > last_teleport + cooldown)
- return 1
- return 0
+ . = ..()
+ if(!.)
+ return
+ if(world.time > last_teleport + cooldown)
+ return TRUE
+ return FALSE
/datum/action/innate/unstable_teleport/Activate()
var/mob/living/carbon/human/H = owner
diff --git a/code/modules/mob/living/carbon/human/species_types/humans.dm b/code/modules/mob/living/carbon/human/species_types/humans.dm
index 2c80700c589..fce8d234aa4 100644
--- a/code/modules/mob/living/carbon/human/species_types/humans.dm
+++ b/code/modules/mob/living/carbon/human/species_types/humans.dm
@@ -10,6 +10,3 @@
liked_food = JUNKFOOD | FRIED
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | ERT_SPAWN | RACE_SWAP | SLIME_EXTRACT
payday_modifier = 1
-
-/datum/species/human/qualifies_for_rank(rank, list/features)
- return TRUE //Pure humans are always allowed in all roles.
diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
index e51f0a1658e..1f4f8ca1f66 100644
--- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
@@ -73,14 +73,15 @@
background_icon_state = "bg_alien"
/datum/action/innate/regenerate_limbs/IsAvailable()
- if(..())
- var/mob/living/carbon/human/H = owner
- var/list/limbs_to_heal = H.get_missing_limbs()
- if(limbs_to_heal.len < 1)
- return 0
- if(H.blood_volume >= BLOOD_VOLUME_OKAY+40)
- return 1
- return 0
+ . = ..()
+ if(!.)
+ return
+ var/mob/living/carbon/human/H = owner
+ var/list/limbs_to_heal = H.get_missing_limbs()
+ if(limbs_to_heal.len < 1)
+ return FALSE
+ if(H.blood_volume >= BLOOD_VOLUME_OKAY+40)
+ return TRUE
/datum/action/innate/regenerate_limbs/Activate()
var/mob/living/carbon/human/H = owner
@@ -182,11 +183,13 @@
background_icon_state = "bg_alien"
/datum/action/innate/split_body/IsAvailable()
- if(..())
- var/mob/living/carbon/human/H = owner
- if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT)
- return 1
- return 0
+ . = ..()
+ if(!.)
+ return
+ var/mob/living/carbon/human/H = owner
+ if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT)
+ return TRUE
+ return FALSE
/datum/action/innate/split_body/Activate()
var/mob/living/carbon/human/H = owner
diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
index bea6545a86c..b70c3b6c90c 100644
--- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
+++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
@@ -158,7 +158,6 @@
H.equipOutfit(O, visualsOnly)
H.internal = H.get_item_for_held_index(2)
H.update_internals_hud_icon(1)
- return 0
/datum/species/plasmaman/random_name(gender,unique,lastname)
if(unique)
diff --git a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
index e4aacf35790..32eed98edad 100644
--- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
@@ -216,13 +216,13 @@
disintegrate(I, I)
else if(ismecha(AM))
- var/obj/mecha/M = AM
- if(M.haslights)
+ var/obj/vehicle/sealed/mecha/M = AM
+ if(M.mecha_flags & HAS_LIGHTS)
M.visible_message("[M]'s lights burn out!")
- M.haslights = FALSE
- M.set_light(-M.lights_power)
- if(M.occupant)
- M.lights_action.Remove(M.occupant)
+ M.mecha_flags &= ~HAS_LIGHTS
+ M.set_light_on(FALSE)
+ for(var/occupant in M.occupants)
+ M.remove_action_type_from_mob(/datum/action/vehicle/sealed/mecha/mech_toggle_lights, occupant)
for(var/obj/item/O in AM.GetAllContents())
if(O.light_range && O.light_power)
disintegrate(O, M)
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index 23677909bb3..82fee6cbabb 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -1,5 +1,4 @@
/mob/living/carbon/Life()
- set invisibility = 0
if(notransform)
return
@@ -137,9 +136,9 @@
//Third link in a breath chain, calls handle_breath_temperature()
/mob/living/carbon/proc/check_breath(datum/gas_mixture/breath)
if(status_flags & GODMODE)
- return
+ return FALSE
if(HAS_TRAIT(src, TRAIT_NOBREATH))
- return
+ return FALSE
var/obj/item/organ/lungs = getorganslot(ORGAN_SLOT_LUNGS)
if(!lungs)
@@ -148,12 +147,12 @@
//CRIT
if(!breath || (breath.total_moles() == 0) || !lungs)
if(reagents.has_reagent(/datum/reagent/medicine/epinephrine, needs_metabolizing = TRUE) && lungs)
- return
+ return FALSE
adjustOxyLoss(1)
failed_last_breath = 1
throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
- return 0
+ return FALSE
var/safe_oxy_min = 16
var/safe_co2_max = 10
@@ -305,7 +304,7 @@
//BREATH TEMPERATURE
handle_breath_temperature(breath)
- return 1
+ return TRUE
//Fourth and final link in a breath chain
/mob/living/carbon/proc/handle_breath_temperature(datum/gas_mixture/breath)
diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm
index f31bbd45cf4..cafc5ab2d5a 100644
--- a/code/modules/mob/living/carbon/monkey/combat.dm
+++ b/code/modules/mob/living/carbon/monkey/combat.dm
@@ -27,7 +27,7 @@
// taken from /mob/living/carbon/human/interactive/
/mob/living/carbon/monkey/proc/walk2derpless(target)
if(!target || IsStandingStill())
- return 0
+ return FALSE
if(myPath.len <= 0)
myPath = get_path_to(src, get_turf(target), /turf/proc/Distance, MAX_RANGE_FIND + 1, 250,1)
@@ -39,26 +39,26 @@
if(myPath.len >= 1)
walk_to(src,myPath[1],0,5)
myPath -= myPath[1]
- return 1
+ return TRUE
// failed to path correctly so just try to head straight for a bit
walk_to(src,get_turf(target),0,5)
sleep(1)
walk_to(src,0)
- return 0
+ return FALSE
// taken from /mob/living/carbon/human/interactive/
/mob/living/carbon/monkey/proc/IsDeadOrIncap(checkDead = TRUE)
if(!(mobility_flags & MOBILITY_FLAGS_INTERACTION))
- return 1
+ return TRUE
if(health <= 0 && checkDead)
- return 1
+ return TRUE
if(IsStun() || IsParalyzed())
- return 1
+ return TRUE
if(stat)
- return 1
- return 0
+ return TRUE
+ return FALSE
/mob/living/carbon/monkey/proc/battle_screech()
if(next_battle_screech < world.time)
diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm
index f156aa27f37..a52fa0bb75a 100644
--- a/code/modules/mob/living/carbon/monkey/life.dm
+++ b/code/modules/mob/living/carbon/monkey/life.dm
@@ -4,8 +4,6 @@
/mob/living/carbon/monkey/Life()
- set invisibility = 0
-
if (notransform)
return
diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm
index 052a94f2897..7cce89593b4 100644
--- a/code/modules/mob/living/life.dm
+++ b/code/modules/mob/living/life.dm
@@ -3,7 +3,6 @@
/mob/living/proc/Life(seconds, times_fired)
set waitfor = FALSE
- set invisibility = 0
if((movement_type & FLYING) && !(movement_type & FLOATING)) //TODO: Better floating
float(on = TRUE)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 48cb75d14a2..644a6a6de44 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -140,7 +140,7 @@
//switch our position with M
if(loc && !loc.Adjacent(M.loc))
return TRUE
- now_pushing = 1
+ now_pushing = TRUE
var/oldloc = loc
var/oldMloc = M.loc
@@ -160,7 +160,7 @@
if(!M_passmob)
M.pass_flags &= ~PASSMOB
- now_pushing = 0
+ now_pushing = FALSE
if(!move_failed)
return TRUE
@@ -1132,7 +1132,7 @@
/mob/living/proc/ExtinguishMob()
if(on_fire)
- on_fire = 0
+ on_fire = FALSE
fire_stacks = 0
for(var/obj/effect/dummy/lighting_obj/moblight/fire/F in src)
qdel(F)
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index 68981a88f57..528ae40753e 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -98,39 +98,6 @@
playsound(loc, 'sound/weapons/genhit.ogg', 50, TRUE, -1) //Item sounds are handled in the item itself
return ..()
-
-/mob/living/mech_melee_attack(obj/mecha/M)
- if(M.occupant.a_intent == INTENT_HARM)
- if(HAS_TRAIT(M.occupant, TRAIT_PACIFISM))
- to_chat(M.occupant, "You don't want to harm other living beings!")
- return
- M.do_attack_animation(src)
- if(M.damtype == BRUTE)
- step_away(src,M,15)
- switch(M.damtype)
- if(BRUTE)
- Unconscious(20)
- take_overall_damage(rand(M.force/2, M.force))
- playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
- if(BURN)
- take_overall_damage(0, rand(M.force/2, M.force))
- playsound(src, 'sound/items/welder.ogg', 50, TRUE)
- if(TOX)
- M.mech_toxin_damage(src)
- else
- return
- updatehealth()
- visible_message("[M.name] hits [src]!", \
- "[M.name] hits you!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, M)
- to_chat(M, "You hit [src]!")
- log_combat(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
- else
- step_away(src,M)
- log_combat(M.occupant, src, "pushed", M)
- visible_message("[M] pushes [src] out of the way.", \
- "[M] pushes you out of the way.", "You hear aggressive shuffling!", 5, M)
- to_chat(M, "You push [src] out of the way.")
-
/mob/living/fire_act()
adjust_fire_stacks(3)
IgniteMob()
@@ -174,12 +141,12 @@
if(GRAB_NECK)
log_combat(user, src, "attempted to strangle", addition="kill grab")
if(!do_mob(user, src, grab_upgrade_time))
- return 0
+ return FALSE
if(!user.pulling || user.pulling != src || user.grab_state != old_grab_state)
- return 0
+ return FALSE
if(user.a_intent != INTENT_GRAB)
to_chat(user, "You must be on grab intent to upgrade your grab further!")
- return 0
+ return FALSE
user.setGrabState(user.grab_state + 1)
switch(user.grab_state)
if(GRAB_AGGRESSIVE)
@@ -213,7 +180,7 @@
if(!buckled && !density)
Move(user.loc)
user.set_pull_offsets(src, grab_state)
- return 1
+ return TRUE
/mob/living/attack_slime(mob/living/simple_animal/slime/M)
@@ -425,7 +392,7 @@
//called when the mob receives a loud bang
/mob/living/proc/soundbang_act()
- return 0
+ return FALSE
//to damage the clothes worn by a mob
/mob/living/proc/damage_clothes(damage_amount, damage_type = BRUTE, damage_flag = 0, def_zone)
diff --git a/code/modules/mob/living/logout.dm b/code/modules/mob/living/logout.dm
index 12dd07ae98a..ca5296cdffc 100644
--- a/code/modules/mob/living/logout.dm
+++ b/code/modules/mob/living/logout.dm
@@ -2,5 +2,5 @@
update_z(null)
..()
if(!key && mind) //key and mind have become separated.
- mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
+ mind.active = FALSE //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
med_hud_set_status()
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 5dfdc397cae..28cdee0c2fa 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -40,7 +40,7 @@
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list(), "Burglar"=list())
var/viewalerts = 0
var/icon/holo_icon//Default is assigned when AI is created.
- var/obj/mecha/controlled_mech //For controlled_mech a mech, to determine whether to relaymove or use the AI eye.
+ var/obj/vehicle/sealed/mecha/controlled_mech //For controlled_mech a mech, to determine whether to relaymove or use the AI eye.
var/radio_enabled = TRUE //Determins if a carded AI can speak with its built in radio or not.
radiomod = ";" //AIs will, by default, state their laws on the internal radio.
var/obj/item/multitool/aiMulti
@@ -422,7 +422,7 @@
to_chat(src, "Target is not on or near any active cameras on the station.")
return
if (href_list["ai_take_control"]) //Mech domination
- var/obj/mecha/M = locate(href_list["ai_take_control"]) in GLOB.mechas_list
+ var/obj/vehicle/sealed/mecha/M = locate(href_list["ai_take_control"]) in GLOB.mechas_list
if (!M)
return
@@ -789,7 +789,7 @@
to_chat(user, "Transfer successful: [name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory.")
/mob/living/silicon/ai/can_buckle()
- return 0
+ return FALSE
/mob/living/silicon/ai/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, ignore_stasis = FALSE)
if(aiRestorePowerRoutine)
diff --git a/code/modules/mob/living/silicon/ai/ai_defense.dm b/code/modules/mob/living/silicon/ai/ai_defense.dm
index 1714bc5f86d..2c53448f096 100644
--- a/code/modules/mob/living/silicon/ai/ai_defense.dm
+++ b/code/modules/mob/living/silicon/ai/ai_defense.dm
@@ -24,8 +24,8 @@
if (stat != DEAD)
adjustBruteLoss(60)
updatehealth()
- return 1
- return 0
+ return TRUE
+ return FALSE
/mob/living/silicon/ai/emp_act(severity)
. = ..()
diff --git a/code/modules/mob/living/silicon/ai/ai_say.dm b/code/modules/mob/living/silicon/ai/ai_say.dm
index 82444a8e4ed..1b1f4e400b4 100644
--- a/code/modules/mob/living/silicon/ai/ai_say.dm
+++ b/code/modules/mob/living/silicon/ai/ai_say.dm
@@ -148,8 +148,8 @@
SEND_SOUND(M, voice)
else
SEND_SOUND(only_listener, voice)
- return 1
- return 0
+ return TRUE
+ return FALSE
#undef VOX_DELAY
#endif
diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm
index 4cc0fb92c54..a54f8259252 100644
--- a/code/modules/mob/living/silicon/ai/freelook/eye.dm
+++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm
@@ -114,7 +114,7 @@
return TRUE
/mob/camera/ai_eye/Move()
- return 0
+ return
/mob/camera/ai_eye/proc/GetViewerClient()
if(ai)
diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm
index cf847de7146..c40dfd67fd5 100644
--- a/code/modules/mob/living/silicon/ai/life.dm
+++ b/code/modules/mob/living/silicon/ai/life.dm
@@ -57,7 +57,7 @@
if(NONE)
return FALSE
if(POWER_REQ_ALL)
- return !T || !A || ((!A.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
+ return !T || !A || ((!A.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/vehicle/sealed/mecha)))
/mob/living/silicon/ai/updatehealth()
if(status_flags & GODMODE)
diff --git a/code/modules/mob/living/silicon/pai/personality.dm b/code/modules/mob/living/silicon/pai/personality.dm
index 35d4f2d960f..acf766c3429 100644
--- a/code/modules/mob/living/silicon/pai/personality.dm
+++ b/code/modules/mob/living/silicon/pai/personality.dm
@@ -12,7 +12,7 @@
/datum/pai_candidate/proc/savefile_save(mob/user)
if(IsGuestKey(user.key))
- return 0
+ return FALSE
var/savefile/F = new /savefile(src.savefile_path(user))
@@ -24,7 +24,7 @@
WRITE_FILE(F["version"], 1)
- return 1
+ return TRUE
// loads the savefile corresponding to the mob's ckey
// if silent=true, report incompatible savefiles
diff --git a/code/modules/mob/living/silicon/robot/laws.dm b/code/modules/mob/living/silicon/robot/laws.dm
index b4362d0137a..cd9bbf37920 100644
--- a/code/modules/mob/living/silicon/robot/laws.dm
+++ b/code/modules/mob/living/silicon/robot/laws.dm
@@ -11,7 +11,7 @@
return
..()
-/mob/living/silicon/robot/show_laws(everyone = 0)
+/mob/living/silicon/robot/show_laws(everyone = FALSE)
laws_sanity_check()
var/who
@@ -29,7 +29,7 @@
to_chat(src, "Laws synced with AI, be sure to note any changes.")
else
to_chat(src, "No AI selected to sync laws with, disabling lawsync protocol.")
- lawupdate = 0
+ lawupdate = FALSE
to_chat(who, "Obey these laws:")
laws.show_laws(who)
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index d51a332655c..8cf67247ba0 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -1,5 +1,4 @@
/mob/living/silicon/robot/Life()
- set invisibility = 0
if (src.notransform)
return
@@ -11,7 +10,7 @@
if(stat != DEAD)
if(low_power_mode)
if(cell && cell.charge)
- low_power_mode = 0
+ low_power_mode = FALSE
update_headlamp()
else if(stat == CONSCIOUS)
use_power()
@@ -24,7 +23,7 @@
cell.use(amt) //Usage table: 1/tick if off/lowest setting, 4 = 4/tick, 6 = 8/tick, 8 = 12/tick, 10 = 16/tick
else
uneq_all()
- low_power_mode = 1
+ low_power_mode = TRUE
update_headlamp()
diag_hud_set_borgcell()
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 36225bdedf0..58b4ddf8656 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -53,10 +53,10 @@
var/mob/living/silicon/ai/connected_ai = null
var/obj/item/stock_parts/cell/cell = /obj/item/stock_parts/cell/high ///If this is a path, this gets created as an object in Initialize.
- var/opened = 0
+ var/opened = FALSE
var/emagged = FALSE
var/emag_cooldown = 0
- var/wiresexposed = 0
+ var/wiresexposed = FALSE
/// Random serial number generated for each cyborg upon its initialization
var/ident = 0
@@ -74,7 +74,7 @@
var/datum/effect_system/spark_spread/spark_system // So they can initialize sparks whenever/N
var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default
- var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
+ var/scrambledcodes = FALSE // Used to determine if a borg shows up on the robotics console. Setting to TRUE hides them.
var/lockcharge //Boolean of whether the borg is locked down or not
var/toner = 0
@@ -94,7 +94,7 @@
var/hat_offset = -3
can_buckle = TRUE
- buckle_lying = FALSE
+ buckle_lying = 0
var/static/list/can_ride_typecache = typecacheof(/mob/living/carbon/human)
/mob/living/silicon/robot/get_cell()
@@ -181,7 +181,7 @@
stack_trace("Borg MMI lacked a brainmob")
mmi = null
if(connected_ai)
- connected_ai.connected_robots -= src
+ set_connected_ai(null)
if(shell)
GLOB.available_ai_shells -= src
else
@@ -324,13 +324,13 @@
. += "Master AI: [connected_ai.name]"
/mob/living/silicon/robot/restrained(ignore_grab)
- . = 0
+ return
/mob/living/silicon/robot/triggerAlarm(class, area/A, O, obj/alarmsource)
if(alarmsource.z != z)
return
if(stat == DEAD)
- return 1
+ return TRUE
var/list/L = alarms[class]
for (var/I in L)
if (I == A.name)
@@ -338,7 +338,7 @@
var/list/sources = alarm[3]
if (!(alarmsource in sources))
sources += alarmsource
- return 1
+ return TRUE
var/obj/machinery/camera/C = null
var/list/CL = null
if (O && istype(O, /list))
@@ -349,11 +349,11 @@
C = O
L[A.name] = list(A, (C) ? C : O, list(alarmsource))
queueAlarm(text("--- [class] alarm detected in [A.name]!"), class)
- return 1
+ return TRUE
/mob/living/silicon/robot/cancelAlarm(class, area/A, obj/origin)
var/list/L = alarms[class]
- var/cleared = 0
+ var/cleared = FALSE
for (var/I in L)
if (I == A.name)
var/list/alarm = L[I]
@@ -361,7 +361,7 @@
if (origin in srcs)
srcs -= origin
if (srcs.len == 0)
- cleared = 1
+ cleared = TRUE
L -= I
if (cleared)
queueAlarm("--- [class] alarm in [A.name] has been cleared.", class, 0)
@@ -392,36 +392,36 @@
/mob/living/silicon/robot/proc/allowed(mob/M)
//check if it doesn't require any access at all
if(check_access(null))
- return 1
+ return TRUE
if(ishuman(M))
var/mob/living/carbon/human/H = M
//if they are holding or wearing a card that has access, that works
if(check_access(H.get_active_held_item()) || check_access(H.wear_id))
- return 1
+ return TRUE
else if(ismonkey(M))
var/mob/living/carbon/monkey/george = M
//they can only hold things :(
if(isitem(george.get_active_held_item()))
return check_access(george.get_active_held_item())
- return 0
+ return FALSE
/mob/living/silicon/robot/proc/check_access(obj/item/card/id/I)
if(!istype(req_access, /list)) //something's very wrong
- return 1
+ return TRUE
var/list/L = req_access
if(!L.len) //no requirements
- return 1
+ return TRUE
if(!istype(I, /obj/item/card/id) && isitem(I))
I = I.GetID()
if(!I || !I.access) //not ID or no access
- return 0
+ return FALSE
for(var/req in req_access)
if(!(req in I.access)) //doesn't have this access
- return 0
- return 1
+ return FALSE
+ return TRUE
/mob/living/silicon/robot/regenerate_icons()
return update_icons()
@@ -461,9 +461,7 @@
gib()
/mob/living/silicon/robot/proc/UnlinkSelf()
- if(src.connected_ai)
- connected_ai.connected_robots -= src
- src.connected_ai = null
+ set_connected_ai(null)
lawupdate = FALSE
set_lockcharge(FALSE)
scrambledcodes = TRUE
@@ -582,7 +580,7 @@
robot_suit.r_leg = null
new /obj/item/stack/cable_coil(T, robot_suit.chest.wired)
robot_suit.chest.forceMove(T)
- robot_suit.chest.wired = 0
+ robot_suit.chest.wired = FALSE
robot_suit.chest = null
robot_suit.l_arm.forceMove(T)
robot_suit.l_arm = null
@@ -956,7 +954,7 @@
builtInCamera.c_tag = real_name //update the camera name too
mainframe = AI
deployed = TRUE
- connected_ai = mainframe
+ set_connected_ai(mainframe)
mainframe.connected_robots |= src
lawupdate = TRUE
lawsync()
@@ -1049,7 +1047,7 @@
else
M.visible_message("[M] can't climb onto [src] because [M.p_their()] hands are full!")
return
- . = ..(M, force, check_loc)
+ return ..()
/mob/living/silicon/robot/unbuckle_mob(mob/user, force=FALSE)
if(iscarbon(user))
@@ -1057,7 +1055,7 @@
if(istype(riding_datum))
riding_datum.unequip_buckle_inhands(user)
riding_datum.restore_position(user)
- . = ..(user)
+ return ..()
/mob/living/silicon/robot/resist()
. = ..()
@@ -1069,11 +1067,10 @@
/mob/living/silicon/robot/proc/TryConnectToAI()
- connected_ai = select_active_ai_with_fewest_borgs(z)
+ set_connected_ai(select_active_ai_with_fewest_borgs(z))
if(connected_ai)
- connected_ai.connected_robots += src
lawsync()
- lawupdate = 1
+ lawupdate = TRUE
return TRUE
picturesync()
return FALSE
@@ -1092,3 +1089,14 @@
cell.charge = min(cell.charge + amount, cell.maxcharge)
if(repairs)
heal_bodypart_damage(repairs, repairs - 1)
+
+/mob/living/silicon/robot/proc/set_connected_ai(new_ai)
+ if(connected_ai == new_ai)
+ return
+ . = connected_ai
+ connected_ai = new_ai
+ if(.)
+ var/mob/living/silicon/ai/old_ai = .
+ old_ai.connected_robots -= src
+ if(connected_ai)
+ connected_ai.connected_robots |= src
diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm
index bc872ba0608..37dbb56358e 100644
--- a/code/modules/mob/living/silicon/robot/robot_defense.dm
+++ b/code/modules/mob/living/silicon/robot/robot_defense.dm
@@ -42,14 +42,14 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
if(W.tool_behaviour == TOOL_CROWBAR) // crowbar means open or close the cover
if(opened)
to_chat(user, "You close the cover.")
- opened = 0
+ opened = FALSE
update_icons()
else
if(locked)
to_chat(user, "The cover is locked and cannot be opened!")
else
to_chat(user, "You open the cover.")
- opened = 1
+ opened = TRUE
update_icons()
return
@@ -340,8 +340,8 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
SetEmagged(1)
SetStun(60) //Borgs were getting into trouble because they would attack the emagger before the new laws were shown
- lawupdate = 0
- connected_ai = null
+ lawupdate = FALSE
+ set_connected_ai(null)
message_admins("[ADMIN_LOOKUPFLW(user)] emagged cyborg [ADMIN_LOOKUPFLW(src)]. Laws overridden.")
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
var/time = time2text(world.realtime,"hh:mm:ss")
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index de8ea801b82..b7fd16ea800 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -371,12 +371,12 @@
to_chat(src, "Automatic announcements [Autochan == "None" ? "will not use the radio." : "set to [Autochan]."]")
/mob/living/silicon/put_in_hand_check() // This check is for borgs being able to receive items, not put them in others' hands.
- return 0
+ return FALSE
// The src mob is trying to place an item on someone
// But the src mob is a silicon!! Disable.
/mob/living/silicon/stripPanelEquip(obj/item/what, mob/who, slot)
- return 0
+ return FALSE
/mob/living/silicon/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) //Secbots won't hunt silicon units
diff --git a/code/modules/mob/living/silicon/silicon_say.dm b/code/modules/mob/living/silicon/silicon_say.dm
index 48062a69f53..f147d28e7f6 100644
--- a/code/modules/mob/living/silicon/silicon_say.dm
+++ b/code/modules/mob/living/silicon/silicon_say.dm
@@ -24,15 +24,15 @@
to_chat(M, "[link] [rendered]")
/mob/living/silicon/binarycheck()
- return 1
+ return TRUE
/mob/living/silicon/lingcheck()
- return 0 //Borged or AI'd lings can't speak on the ling channel.
+ return FALSE //Borged or AI'd lings can't speak on the ling channel.
/mob/living/silicon/radio(message, list/message_mods = list(), list/spans, language)
. = ..()
- if(. != 0)
- return .
+ if(.)
+ return
if(message_mods[MODE_HEADSET])
if(radio)
radio.talk_into(src, message, , spans, language, message_mods)
@@ -42,4 +42,4 @@
radio.talk_into(src, message, message_mods[RADIO_EXTENSION], spans, language, message_mods)
return ITALICS | REDUCE_RANGE
- return 0
+ return FALSE
diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index 9beae1714f7..bcfdd6fe341 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -404,7 +404,7 @@
/mob/living/simple_animal/bot/radio(message, list/message_mods = list(), list/spans, language)
. = ..()
- if(. != 0)
+ if(.)
return
if(message_mods[MODE_HEADSET])
@@ -693,7 +693,7 @@ Pass a positive integer as an argument to override a bot's default speed.
patrol_target = nearest_beacon_loc
destination = next_destination
else
- auto_patrol = 0
+ auto_patrol = FALSE
mode = BOT_IDLE
speak("Disengaging patrol mode.")
@@ -732,11 +732,11 @@ Pass a positive integer as an argument to override a bot's default speed.
// process control input
switch(command)
if("patroloff")
- bot_reset() //HOLD IT!!
- auto_patrol = 0
+ bot_reset() //HOLD IT!! //OBJECTION!!
+ auto_patrol = FALSE
if("patrolon")
- auto_patrol = 1
+ auto_patrol = TRUE
if("summon")
bot_reset()
@@ -751,7 +751,7 @@ Pass a positive integer as an argument to override a bot's default speed.
ejectpairemote(user)
return
-//
+
/mob/living/simple_animal/bot/proc/bot_control_message(command, user)
switch(command)
if("patroloff")
@@ -831,7 +831,7 @@ Pass a positive integer as an argument to override a bot's default speed.
dat = get_controls(M)
var/datum/browser/popup = new(M,window_id,window_name,350,600)
popup.set_content(dat)
- popup.open(use_onclose = 0)
+ popup.open(use_onclose = FALSE)
onclose(M,window_id,ref=src)
return
diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm
index cf5ce1f77b6..dee1fa482c9 100644
--- a/code/modules/mob/living/simple_animal/bot/construction.dm
+++ b/code/modules/mob/living/simple_animal/bot/construction.dm
@@ -287,7 +287,7 @@
to_chat(user, "You add the [I] to [src]! Honk!")
var/mob/living/simple_animal/bot/honkbot/S = new(drop_location())
S.name = created_name
- S.spam_flag = TRUE // only long enough to hear the first ping.
+ S.limiting_spam = TRUE // only long enough to hear the first ping.
addtimer(CALLBACK (S, .mob/living/simple_animal/bot/honkbot/proc/react_ping), 5)
S.bikehorn = I.type
qdel(I)
diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm
index 41d78292fdf..6e4b6dba89d 100644
--- a/code/modules/mob/living/simple_animal/bot/honkbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm
@@ -21,7 +21,7 @@
path_image_color = "#FF69B4"
var/honksound = 'sound/items/bikehorn.ogg' //customizable sound
- var/spam_flag = FALSE
+ var/limiting_spam = FALSE
var/cooldowntime = 30
var/cooldowntimehorn = 10
var/mob/living/carbon/target
@@ -45,8 +45,8 @@
access_card.access += J.get_access()
prev_access = access_card.access
-/mob/living/simple_animal/bot/honkbot/proc/spam_flag_false() //used for addtimer
- spam_flag = FALSE
+/mob/living/simple_animal/bot/honkbot/proc/limiting_spam_false() //used for addtimer
+ limiting_spam = FALSE
/mob/living/simple_animal/bot/honkbot/proc/sensor_blink()
icon_state = "honkbot-c"
@@ -55,9 +55,9 @@
//honkbots react with sounds.
/mob/living/simple_animal/bot/honkbot/proc/react_ping()
playsound(src, 'sound/machines/ping.ogg', 50, TRUE, -1) //the first sound upon creation!
- spam_flag = TRUE
+ limiting_spam = TRUE
sensor_blink()
- addtimer(CALLBACK(src, .proc/spam_flag_false), 18) // calibrates before starting the honk
+ addtimer(CALLBACK(src, .proc/limiting_spam_false), 18) // calibrates before starting the honk
/mob/living/simple_animal/bot/honkbot/proc/react_buzz()
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, TRUE, -1)
@@ -70,7 +70,7 @@
anchored = FALSE
walk_to(src,0)
last_found = world.time
- spam_flag = FALSE
+ limiting_spam = FALSE
/mob/living/simple_animal/bot/honkbot/set_custom_texts()
@@ -151,7 +151,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
if(!C.IsParalyzed() || arrest_type)
stun_attack(A)
..()
- else if (!spam_flag) //honking at the ground
+ else if (!limiting_spam) //honking at the ground
bike_horn(A)
@@ -166,31 +166,31 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
/mob/living/simple_animal/bot/honkbot/proc/bike_horn() //use bike_horn
if (emagged <= 1)
- if (!spam_flag)
+ if (!limiting_spam)
playsound(src, honksound, 50, TRUE, -1)
- spam_flag = TRUE //prevent spam
+ limiting_spam = TRUE //prevent spam
sensor_blink()
- addtimer(CALLBACK(src, .proc/spam_flag_false), cooldowntimehorn)
+ addtimer(CALLBACK(src, .proc/limiting_spam_false), cooldowntimehorn)
else if (emagged == 2) //emagged honkbots will spam short and memorable sounds.
- if (!spam_flag)
+ if (!limiting_spam)
playsound(src, "honkbot_e", 50, FALSE)
- spam_flag = TRUE // prevent spam
+ limiting_spam = TRUE // prevent spam
icon_state = "honkbot-e"
addtimer(CALLBACK(src, /atom/.proc/update_icon), 30, TIMER_OVERRIDE|TIMER_UNIQUE)
- addtimer(CALLBACK(src, .proc/spam_flag_false), cooldowntimehorn)
+ addtimer(CALLBACK(src, .proc/limiting_spam_false), cooldowntimehorn)
/mob/living/simple_animal/bot/honkbot/proc/honk_attack(mob/living/carbon/C) // horn attack
- if(!spam_flag)
+ if(!limiting_spam)
playsound(loc, honksound, 50, TRUE, -1)
- spam_flag = TRUE // prevent spam
+ limiting_spam = TRUE // prevent spam
sensor_blink()
- addtimer(CALLBACK(src, .proc/spam_flag_false), cooldowntimehorn)
+ addtimer(CALLBACK(src, .proc/limiting_spam_false), cooldowntimehorn)
/mob/living/simple_animal/bot/honkbot/proc/stun_attack(mob/living/carbon/C) // airhorn stun
- if(!spam_flag)
+ if(!limiting_spam)
playsound(src, 'sound/items/AirHorn.ogg', 100, TRUE, -1) //HEEEEEEEEEEEENK!!
sensor_blink()
- if(spam_flag == 0)
+ if(limiting_spam == 0)
if(ishuman(C))
C.stuttering = 20
var/obj/item/organ/ears/ears = C.getorganslot(ORGAN_SLOT_EARS)
@@ -200,7 +200,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
C.Paralyze(60)
var/mob/living/carbon/human/H = C
if(client) //prevent spam from players..
- spam_flag = TRUE
+ limiting_spam = TRUE
if (emagged <= 1) //HONK once, then leave
var/judgement_criteria = judgement_criteria()
threatlevel = H.assess_threat(judgement_criteria)
@@ -208,7 +208,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
target = oldtarget_name
else // you really don't want to hit an emagged honkbot
threatlevel = 6 // will never let you go
- addtimer(CALLBACK(src, .proc/spam_flag_false), cooldowntime)
+ addtimer(CALLBACK(src, .proc/limiting_spam_false), cooldowntime)
log_combat(src,C,"honked")
@@ -217,7 +217,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
else
C.stuttering = 20
C.Paralyze(80)
- addtimer(CALLBACK(src, .proc/spam_flag_false), cooldowntime)
+ addtimer(CALLBACK(src, .proc/limiting_spam_false), cooldowntime)
/mob/living/simple_animal/bot/honkbot/handle_automated_action()
@@ -303,14 +303,14 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
if(threatlevel <= 3)
if(C in view(4,src)) //keep the range short for patrolling
- if(!spam_flag)
+ if(!limiting_spam)
bike_horn()
else if(threatlevel >= 10)
bike_horn() //just spam the shit outta this
else if(threatlevel >= 4)
- if(!spam_flag)
+ if(!limiting_spam)
target = C
oldtarget_name = C.name
bike_horn()
diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm
index 4972a860dbf..390db50ed38 100644
--- a/code/modules/mob/living/simple_animal/constructs.dm
+++ b/code/modules/mob/living/simple_animal/constructs.dm
@@ -281,17 +281,15 @@
if(isconstruct(A)) //is it a construct?
var/mob/living/simple_animal/hostile/construct/C = A
if(C.health < C.maxHealth) //is it hurt? let's go heal it if it is
- return 1
- else
- return 0
- else
- return 0
+ return TRUE
+ return FALSE
/mob/living/simple_animal/hostile/construct/artificer/CanAttack(atom/the_target)
if(see_invisible < the_target.invisibility)//Target's invisible to us, forget it
- return 0
+ return FALSE
if(Found(the_target) || ..()) //If we Found it or Can_Attack it normally, we Can_Attack it as long as it wasn't invisible
- return 1 //as a note this shouldn't be added to base hostile mobs because it'll mess up retaliate hostile mobs
+ return TRUE //as a note this shouldn't be added to base hostile mobs because it'll mess up retaliate hostile mobs
+ return FALSE
/mob/living/simple_animal/hostile/construct/artificer/MoveToTarget(list/possible_targets)
..()
@@ -299,7 +297,7 @@
var/mob/living/L = target
if(isconstruct(L) && L.health >= L.maxHealth) //is this target an unhurt construct? stop trying to heal it
LoseTarget()
- return 0
+ return
if(L.health <= melee_damage_lower+melee_damage_upper) //ey bucko you're hurt as fuck let's go hit you
retreat_distance = null
minimum_distance = 1
diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm
index 8c74ec337fc..4543568889a 100644
--- a/code/modules/mob/living/simple_animal/friendly/dog.dm
+++ b/code/modules/mob/living/simple_animal/friendly/dog.dm
@@ -38,16 +38,16 @@
turns_since_scan = 0
if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc) ))
movement_target = null
- stop_automated_movement = 0
+ stop_automated_movement = FALSE
if( !movement_target || !(movement_target.loc in oview(src, 3)) )
movement_target = null
- stop_automated_movement = 0
+ stop_automated_movement = FALSE
for(var/obj/item/reagent_containers/food/snacks/S in oview(src,3))
if(isturf(S.loc) || ishuman(S.loc))
movement_target = S
break
if(movement_target)
- stop_automated_movement = 1
+ stop_automated_movement = TRUE
step_to(src,movement_target,1)
sleep(3)
step_to(src,movement_target,1)
@@ -359,7 +359,7 @@
if(user && !user.temporarilyRemoveItemFromInventory(item_to_add))
to_chat(user, "\The [item_to_add] is stuck to your hand, you cannot put it on [src]'s head!")
- return 0
+ return
var/valid = FALSE
if(ispath(item_to_add.dog_fashion, /datum/dog_fashion/head))
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
index 06545473b0b..3738354f54e 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
@@ -308,7 +308,7 @@
return ..()
/mob/living/simple_animal/drone/mob_negates_gravity()
- return 1
+ return TRUE
/mob/living/simple_animal/drone/mob_has_gravity()
return ..() || mob_negates_gravity()
@@ -318,7 +318,7 @@
/mob/living/simple_animal/drone/bee_friendly()
// Why would bees pay attention to drones?
- return 1
+ return TRUE
/mob/living/simple_animal/drone/electrocute_act(shock_damage, source, siemens_coeff, flags = NONE)
- return 0 //So they don't die trying to fix wiring
+ return FALSE //So they don't die trying to fix wiring
diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
index f78ad951e6f..f96b894be1e 100644
--- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
+++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
@@ -170,7 +170,7 @@
/mob/living/simple_animal/cow/tamed()
. = ..()
can_buckle = TRUE
- buckle_lying = FALSE
+ buckle_lying = 0
var/datum/component/riding/D = LoadComponent(/datum/component/riding)
D.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 8), TEXT_SOUTH = list(0, 8), TEXT_EAST = list(-2, 8), TEXT_WEST = list(2, 8)))
D.set_vehicle_dir_layer(SOUTH, ABOVE_MOB_LAYER)
diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm
index 19633468a30..9a5e7c94186 100644
--- a/code/modules/mob/living/simple_animal/hostile/bear.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bear.dm
@@ -60,7 +60,7 @@
. = ..()
if(!rideable && mind)
can_buckle = TRUE
- buckle_lying = FALSE
+ buckle_lying = 0
var/datum/component/riding/D = LoadComponent(/datum/component/riding)
D.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(1, 8), TEXT_SOUTH = list(1, 8), TEXT_EAST = list(-3, 6), TEXT_WEST = list(3, 6)))
D.set_vehicle_dir_layer(SOUTH, ABOVE_MOB_LAYER)
diff --git a/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm b/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm
index 441c3062431..0fc0b43596c 100644
--- a/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm
@@ -54,21 +54,22 @@
/datum/action/boss/Trigger()
. = ..()
- if(.)
- if(!istype(boss, boss_type))
- return 0
- if(!boss.atb)
- return 0
- if(boss.atb.points < boss_cost)
- return 0
- if(!boss.client)
- if(needs_target && !boss.target)
- return 0
- if(boss)
- if(say_when_triggered)
- boss.say(say_when_triggered, forced = "boss action")
- if(!boss.atb.spend(boss_cost))
- return 0
+ if(!.)
+ return
+ if(!istype(boss, boss_type))
+ return
+ if(!boss.atb)
+ return
+ if(boss.atb.points < boss_cost)
+ return
+ if(!boss.client)
+ if(needs_target && !boss.target)
+ return
+ if(boss)
+ if(say_when_triggered)
+ boss.say(say_when_triggered, forced = "boss action")
+ if(!boss.atb.spend(boss_cost))
+ return
//Example:
/*
diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm
index ff5f58e3911..94df42c353d 100644
--- a/code/modules/mob/living/simple_animal/hostile/carp.dm
+++ b/code/modules/mob/living/simple_animal/hostile/carp.dm
@@ -146,7 +146,7 @@
/mob/living/simple_animal/hostile/carp/tamed()
. = ..()
can_buckle = TRUE
- buckle_lying = FALSE
+ buckle_lying = 0
var/datum/component/riding/D = LoadComponent(/datum/component/riding)
D.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 13), TEXT_SOUTH = list(0, 15), TEXT_EAST = list(-2, 12), TEXT_WEST = list(2, 12)))
D.set_vehicle_dir_layer(SOUTH, ABOVE_MOB_LAYER)
@@ -218,7 +218,7 @@
heal_overall_damage(4)
if(!rideable && src.mind)
can_buckle = TRUE
- buckle_lying = FALSE
+ buckle_lying = 0
var/datum/component/riding/D = LoadComponent(/datum/component/riding)
D.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(1, 8), TEXT_SOUTH = list(1, 8), TEXT_EAST = list(-3, 6), TEXT_WEST = list(3, 6)))
D.set_vehicle_dir_offsets(SOUTH, pixel_x, 0)
diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
index 5a7290c7783..e48862f9e8f 100644
--- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
+++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
@@ -90,17 +90,17 @@
/mob/living/simple_animal/hostile/poison/giant_spider/proc/humanize_spider(mob/user)
if(key || !playable_spider || stat)//Someone is in it, it's dead, or the fun police are shutting it down
- return 0
+ return FALSE
var/spider_ask = alert("Become a spider?", "Are you australian?", "Yes", "No")
if(spider_ask == "No" || !src || QDELETED(src))
- return 1
+ return TRUE
if(key)
to_chat(user, "Someone else already took this spider!")
- return 1
+ return TRUE
key = user.key
if(directive)
log_game("[key_name(src)] took control of [name] with the objective: '[directive]'.")
- return 1
+ return TRUE
//nursemaids - these create webs and eggs
/mob/living/simple_animal/hostile/poison/giant_spider/nurse
@@ -244,15 +244,16 @@
gold_core_spawnable = NO_SPAWN
/mob/living/simple_animal/hostile/poison/giant_spider/handle_automated_action()
- if(!..()) //AIStatus is off
- return 0
+ . = ..()
+ if(!.)//AIStatus is off
+ return FALSE
if(AIStatus == AI_IDLE)
//1% chance to skitter madly away
if(!busy && prob(1))
stop_automated_movement = TRUE
Goto(pick(urange(20, src, 1)), move_to_delay)
addtimer(CALLBACK(src, .proc/do_action), 5 SECONDS)
- return 1
+ return TRUE
/mob/living/simple_animal/hostile/poison/giant_spider/proc/do_action()
stop_automated_movement = FALSE
@@ -449,13 +450,14 @@
button_icon_state = "lay_eggs"
/datum/action/innate/spider/lay_eggs/IsAvailable()
- if(..())
- if(!istype(owner, /mob/living/simple_animal/hostile/poison/giant_spider/nurse))
- return 0
- var/mob/living/simple_animal/hostile/poison/giant_spider/nurse/S = owner
- if(S.fed)
- return 1
- return 0
+ . = ..()
+ if(!.)
+ return
+ if(!istype(owner, /mob/living/simple_animal/hostile/poison/giant_spider/nurse))
+ return FALSE
+ var/mob/living/simple_animal/hostile/poison/giant_spider/nurse/S = owner
+ if(S.fed)
+ return TRUE
/datum/action/innate/spider/lay_eggs/Activate()
if(!istype(owner, /mob/living/simple_animal/hostile/poison/giant_spider/nurse))
diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm
index 52c99698d15..5ccaa30e8c8 100644
--- a/code/modules/mob/living/simple_animal/hostile/hostile.dm
+++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm
@@ -68,11 +68,10 @@
. = ..()
if(!.) //dead
walk(src, 0) //stops walking
- return 0
/mob/living/simple_animal/hostile/handle_automated_action()
if(AIStatus == AI_OFF)
- return 0
+ return FALSE
var/list/possible_targets = ListTargets() //we look around for potential targets and make it a list for later use.
if(environment_smash)
@@ -132,7 +131,7 @@
if(!search_objects)
. = hearers(vision_range, targets_from) - src //Remove self, so we don't suicide
- var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha))
+ var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/vehicle/sealed/mecha))
for(var/HM in typecache_filter_list(range(vision_range, targets_from), hostile_machines))
if(can_see(targets_from, HM, vision_range))
@@ -216,9 +215,9 @@
return TRUE
if(ismecha(the_target))
- var/obj/mecha/M = the_target
- if(M.occupant)//Just so we don't attack empty mechs
- if(CanAttack(M.occupant))
+ var/obj/vehicle/sealed/mecha/M = the_target
+ for(var/occupant in M.occupants)
+ if(CanAttack(occupant))
return TRUE
if(istype(the_target, /obj/machinery/porta_turret))
@@ -562,7 +561,7 @@
toggle_ai(AI_ON)
/mob/living/simple_animal/hostile/proc/ListTargetsLazy(_Z)//Step 1, find out what we can see
- var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha))
+ var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/vehicle/sealed/mecha))
. = list()
for (var/I in SSmobs.clients_by_zlevel[_Z])
var/mob/M = I
diff --git a/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm b/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm
index b842bddf20c..f737c7eed4a 100644
--- a/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm
@@ -25,8 +25,8 @@
search_objects = 0
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
- var/spawn_mecha_type = /obj/mecha/combat/marauder/mauler/loaded
- var/obj/mecha/mecha //Ref to pilot's mecha instance
+ var/spawn_mecha_type = /obj/vehicle/sealed/mecha/combat/marauder/mauler/loaded
+ var/obj/vehicle/sealed/mecha/mecha //Ref to pilot's mecha instance
var/required_mecha_charge = 7500 //If the pilot doesn't have a mecha, what charge does a potential Grand Theft Mecha need? (Defaults to half a battery)
var/mecha_charge_evacuate = 50 //Amount of charge at which the pilot tries to abandon the mecha
@@ -42,7 +42,7 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/no_mech/Initialize()
. = ..()
- wanted_objects = typecacheof(/obj/mecha/combat, TRUE)
+ wanted_objects = typecacheof(/obj/vehicle/sealed/mecha/combat, TRUE)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/nanotrasen //nanotrasen are syndies! no it's just a weird path.
name = "\improper Nanotrasen Mecha Pilot"
@@ -50,7 +50,7 @@
icon_living = "nanotrasen"
icon_state = "nanotrasen"
faction = list("nanotrasen")
- spawn_mecha_type = /obj/mecha/combat/marauder/loaded
+ spawn_mecha_type = /obj/vehicle/sealed/mecha/combat/marauder/loaded
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/no_mech/nanotrasen
name = "\improper Nanotrasen Mecha Pilot"
@@ -63,12 +63,12 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/Initialize()
. = ..()
if(spawn_mecha_type)
- var/obj/mecha/M = new spawn_mecha_type (get_turf(src))
+ var/obj/vehicle/sealed/mecha/M = new spawn_mecha_type (get_turf(src))
if(istype(M))
enter_mecha(M)
-/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/enter_mecha(obj/mecha/M)
+/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/enter_mecha(obj/vehicle/sealed/mecha/M)
if(!M)
return 0
target = null //Target was our mecha, so null it out
@@ -89,11 +89,11 @@
ranged = 0
wanted_objects = list()
search_objects = 0
- if(mecha && mecha.lights_action) //an AI mecha is an EVIL EVIL thing, so let's not hide them in the dark
- mecha.lights_action.Activate()
+ if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_defense_mode) && !mecha.defense_mode)
+ var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_defense_mode]
+ action.Trigger(TRUE)
-
-/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/exit_mecha(obj/mecha/M)
+/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/exit_mecha(obj/vehicle/sealed/mecha/M)
if(!M)
return 0
@@ -102,9 +102,9 @@
targets_from = src
//Find a new mecha
- wanted_objects = typecacheof(/obj/mecha/combat, TRUE)
+ wanted_objects = typecacheof(/obj/vehicle/sealed/mecha/combat, TRUE)
var/search_aggressiveness = 2
- for(var/obj/mecha/combat/C in range(vision_range,src))
+ for(var/obj/vehicle/sealed/mecha/combat/C in range(vision_range,src))
if(is_valid_mecha(C))
target = C
search_aggressiveness = 3 //We can see a mech? RUN FOR IT, IGNORE MOBS!
@@ -116,23 +116,23 @@
walk(M,0)//end any lingering movement loops, to prevent the haunted mecha bug
//Checks if a mecha is valid for theft
-/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/is_valid_mecha(obj/mecha/M)
+/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/is_valid_mecha(obj/vehicle/sealed/mecha/M)
if(!M)
- return 0
- if(M.occupant)
- return 0
+ return FALSE
+ if(LAZYLEN(M.occupants))
+ return FALSE
if(!M.has_charge(required_mecha_charge))
- return 0
+ return FALSE
if(M.obj_integrity < M.max_integrity*0.5)
- return 0
- return 1
+ return FALSE
+ return TRUE
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/mecha_face_target(atom/A)
if(mecha)
var/dirto = get_dir(mecha,A)
if(mecha.dir != dirto) //checking, because otherwise the mecha makes too many turn noises
- mecha.mechturn(dirto)
+ mecha.vehicle_move(dirto, TRUE)
@@ -163,8 +163,7 @@
var/list/possible_weapons = get_mecha_equip_by_flag(MECHA_RANGED)
if(possible_weapons.len)
var/obj/item/mecha_parts/mecha_equipment/ME = pick(possible_weapons) //so we don't favor mecha.equipment[1] forever
- if(ME.action(A))
- ME.start_cooldown()
+ if(ME.action(src,A))
return
else
@@ -177,16 +176,15 @@
if(possible_weapons.len)
var/obj/item/mecha_parts/mecha_equipment/ME = pick(possible_weapons)
mecha_face_target(target)
- if(ME.action(target))
- ME.start_cooldown()
+ if(ME.action(src,target))
return
- if(mecha.melee_can_hit)
+ if(!TIMER_COOLDOWN_CHECK(mecha, COOLDOWN_MECHA_MELEE_ATTACK))
mecha_face_target(target)
- target.mech_melee_attack(mecha)
+ target.mech_melee_attack(mecha, src)
else
if(ismecha(target))
- var/obj/mecha/M = target
+ var/obj/vehicle/sealed/mecha/M = target
if(is_valid_mecha(M))
enter_mecha(M)
return
@@ -199,49 +197,54 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/handle_automated_action()
- if(..())
- if(!mecha)
- for(var/obj/mecha/combat/C in range(src,vision_range))
- if(is_valid_mecha(C))
- target = C //Let's nab it!
- minimum_distance = 1
- ranged = 0
- break
- if(mecha)
- var/list/L = PossibleThreats()
- var/threat_count = L.len
+ . = ..()
+ if(!.)
+ return
+ if(!mecha)
+ for(var/obj/vehicle/sealed/mecha/combat/mecha_in_range in range(src,vision_range))
+ if(is_valid_mecha(mecha_in_range))
+ target = mecha_in_range //Let's nab it!
+ minimum_distance = 1
+ ranged = 0
+ break
+ if(mecha)
+ var/list/L = PossibleThreats()
+ var/threat_count = L.len
- //Low Charge - Eject
- if(!mecha.has_charge(mecha_charge_evacuate))
- exit_mecha(mecha)
- return
+ //Low Charge - Eject
+ if(!mecha.has_charge(mecha_charge_evacuate))
+ exit_mecha(mecha)
+ return
//Too Much Damage - Eject
- if(mecha.obj_integrity < mecha.max_integrity*0.1)
- exit_mecha(mecha)
- return
+ if(mecha.obj_integrity < mecha.max_integrity*0.1)
+ exit_mecha(mecha)
+ return
- //Smoke if there's too many targets - Smoke Power
- if(threat_count >= threat_use_mecha_smoke && prob(smoke_chance))
- if(mecha.smoke_action && mecha.smoke_action.owner && mecha.smoke)
- mecha.smoke_action.Activate()
+ //Smoke if there's too many targets - Smoke Power
+ if(threat_count >= threat_use_mecha_smoke && prob(smoke_chance))
+ if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_smoke) && !mecha.smoke_charges)
+ var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_smoke]
+ action.Trigger()
- //Heavy damage - Defense Power or Retreat
- if(mecha.obj_integrity < mecha.max_integrity*0.25)
- if(prob(defense_mode_chance))
- if(mecha.defense_action && mecha.defense_action.owner && !mecha.defense_mode)
- mecha.leg_overload_mode = 0
- mecha.defense_action.Activate(TRUE)
- addtimer(CALLBACK(mecha.defense_action, /datum/action/innate/mecha/mech_defense_mode.proc/Activate, FALSE), 100) //10 seconds of defense, then toggle off
+ //Heavy damage - Defense Power or Retreat
+ if(mecha.obj_integrity < mecha.max_integrity*0.25)
+ if(prob(defense_mode_chance))
+ if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_defense_mode) && !mecha.defense_mode)
+ var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_defense_mode]
+ action.Trigger(TRUE)
+ addtimer(CALLBACK(action, /datum/action/vehicle/sealed/mecha/mech_defense_mode.proc/Trigger, FALSE), 100) //10 seconds of defense, then toggle off
- else if(prob(retreat_chance))
- //Speed boost if possible
- if(mecha.overload_action && mecha.overload_action.owner && !mecha.leg_overload_mode)
- mecha.overload_action.Activate(TRUE)
- addtimer(CALLBACK(mecha.overload_action, /datum/action/innate/mecha/mech_defense_mode.proc/Activate, FALSE), 100) //10 seconds of speeeeed, then toggle off
+ else if(prob(retreat_chance))
+ //Speed boost if possible
+ if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_overload_mode) && !mecha.leg_overload_mode)
+ var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_overload_mode]
+ mecha.leg_overload_mode = FALSE
+ action.Trigger(TRUE)
+ addtimer(CALLBACK(action, /datum/action/vehicle/sealed/mecha/mech_overload_mode.proc/Trigger, FALSE), 100) //10 seconds of speeeeed, then toggle off
- retreat_distance = 50
- addtimer(VARSET_CALLBACK(src, retreat_distance, 0), 10 SECONDS)
+ retreat_distance = 50
+ addtimer(VARSET_CALLBACK(src, retreat_distance, 0), 10 SECONDS)
@@ -260,17 +263,17 @@
//~simple animals~
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/CanAttack(atom/the_target)
if(ismecha(the_target))
- var/obj/mecha/M = the_target
+ var/obj/vehicle/sealed/mecha/M = the_target
if(mecha)
- if(M == mecha || !CanAttack(M.occupant))
- return 0
+ if(M == mecha) //Dont kill yourself
+ return FALSE
else //we're not in a mecha, so we check if we can steal it instead.
if(is_valid_mecha(M))
- return 1
- else if (M.occupant && CanAttack(M.occupant))
- return 1
- else
- return 0
+ return TRUE
+ for(var/occupant in M.occupants)
+ if(CanAttack(occupant))
+ return TRUE
+ return FALSE
. = ..()
@@ -289,6 +292,6 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/Goto(target, delay, minimum_distance)
if(mecha)
- walk_to(mecha, target, minimum_distance, mecha.step_in)
+ walk_to(mecha, target, minimum_distance, mecha.movedelay)
else
..()
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm
index ce66bb1e7f8..32d4db1ed3c 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm
@@ -215,13 +215,13 @@ Difficulty: Medium
if(L.client)
empty += pick(((RANGE_TURFS(2, L) - RANGE_TURFS(1, L)) & turfs) - empty) // picks a turf within 2 of the creature not outside or in the shield
any_attack = 1
- for(var/obj/mecha/M in T.contents)
+ for(var/obj/vehicle/sealed/mecha/M in T.contents)
empty += pick(((RANGE_TURFS(2, M) - RANGE_TURFS(1, M)) & turfs) - empty)
any_attack = 1
if(!any_attack)
for(var/obj/effect/temp_visual/drakewall/D in drakewalls)
qdel(D)
- return 0 // nothing to attack in the arena time for enraged attack if we still have a target
+ return FALSE // nothing to attack in the arena time for enraged attack if we still have a target
for(var/turf/T in turfs)
if(!(T in empty))
new /obj/effect/temp_visual/lava_warning(T)
@@ -229,7 +229,7 @@ Difficulty: Medium
new /obj/effect/temp_visual/lava_safe(T)
amount--
SLEEP_CHECK_DEATH(24)
- return 1 // attack finished completely
+ return TRUE // attack finished completely
/mob/living/simple_animal/hostile/megafauna/dragon/proc/arena_escape_enrage() // you ran somehow / teleported away from my arena attack now i'm mad fucker
SLEEP_CHECK_DEATH(0)
@@ -285,7 +285,7 @@ Difficulty: Medium
to_chat(L, "You're hit by [source]'s fire breath!")
// deals damage to mechs
- for(var/obj/mecha/M in T.contents)
+ for(var/obj/vehicle/sealed/mecha/M in T.contents)
if(M in hit_list)
continue
hit_list += M
@@ -372,7 +372,7 @@ Difficulty: Medium
var/throwtarget = get_edge_target_turf(src, throw_dir)
L.throw_at(throwtarget, 3)
visible_message("[L] is thrown clear of [src]!")
- for(var/obj/mecha/M in orange(1, src))
+ for(var/obj/vehicle/sealed/mecha/M in orange(1, src))
M.take_damage(75, BRUTE, MELEE, 1)
for(var/mob/M in range(7, src))
@@ -444,7 +444,7 @@ Difficulty: Medium
to_chat(L, "You fall directly into the pool of lava!")
// deals damage to mechs
- for(var/obj/mecha/M in T.contents)
+ for(var/obj/vehicle/sealed/mecha/M in T.contents)
M.take_damage(45, BRUTE, MELEE, 1)
// changes turf to lava temporarily
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
index 2dcf01d4ca3..959c6de311a 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
@@ -694,14 +694,15 @@ Difficulty: Hard
L.adjustBruteLoss(damage)
if(caster)
log_combat(caster, L, "struck with a [name]")
- for(var/obj/mecha/M in T.contents - hit_things) //also damage mechs.
+ for(var/obj/vehicle/sealed/mecha/M in T.contents - hit_things) //also damage mechs.
hit_things += M
- if(M.occupant)
- if(friendly_fire_check && caster && caster.faction_check_mob(M.occupant))
+ for(var/O in M.occupants)
+ var/mob/living/occupant = O
+ if(friendly_fire_check && caster && caster.faction_check_mob(occupant))
continue
- to_chat(M.occupant, "Your [M.name] is struck by a [name]!")
- playsound(M,'sound/weapons/sear.ogg', 50, TRUE, -4)
- M.take_damage(damage, BURN, 0, 0)
+ to_chat(occupant, "Your [M.name] is struck by a [name]!")
+ playsound(M,'sound/weapons/sear.ogg', 50, TRUE, -4)
+ M.take_damage(damage, BURN, 0, 0)
/obj/effect/temp_visual/hierophant/blast/visual
icon_state = "hierophant_blast"
diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm
index b786de7022f..a976a6c38d5 100644
--- a/code/modules/mob/living/simple_animal/hostile/mimic.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm
@@ -135,8 +135,8 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
/mob/living/simple_animal/hostile/mimic/copy/proc/CheckObject(obj/O)
if((isitem(O) || isstructure(O)) && !is_type_in_list(O, GLOB.protected_objects))
- return 1
- return 0
+ return TRUE
+ return FALSE
/mob/living/simple_animal/hostile/mimic/copy/proc/CopyObject(obj/O, mob/living/user, destroy_original = 0)
if(destroy_original || CheckObject(O))
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
index dce179b1b4a..f82217c109c 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
@@ -52,8 +52,8 @@
if(ismineralturf(target))
var/turf/closed/mineral/M = target
M.gets_drilled()
- if(istype(target, /obj/mecha))
- var/obj/mecha/M = target
+ if(istype(target, /obj/vehicle/sealed/mecha))
+ var/obj/vehicle/sealed/mecha/M = target
M.take_damage(50, BRUTE, MELEE, 1)
//Elites can't talk (normally)!
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm
index bf479c56e56..1277f2d75e9 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm
@@ -114,7 +114,7 @@
qdel(O)
saddled = TRUE
can_buckle = TRUE
- buckle_lying = FALSE
+ buckle_lying = 0
add_overlay("goliath_saddled")
var/datum/component/riding/D = LoadComponent(/datum/component/riding)
D.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 8), TEXT_SOUTH = list(0, 8), TEXT_EAST = list(-2, 8), TEXT_WEST = list(2, 8)))
diff --git a/code/modules/mob/living/simple_animal/hostile/netherworld.dm b/code/modules/mob/living/simple_animal/hostile/netherworld.dm
index 6605bf613ff..209eebe5bc4 100644
--- a/code/modules/mob/living/simple_animal/hostile/netherworld.dm
+++ b/code/modules/mob/living/simple_animal/hostile/netherworld.dm
@@ -98,10 +98,11 @@
if(M.client && CanAttack(M) && !M.has_unlimited_silicon_privilege)
if(!M.is_blind())
return M
- for(var/obj/mecha/M in view(world.view + 1, check)) //assuming if you can see them they can see you
- if(M.occupant && M.occupant.client)
- if(!M.occupant.is_blind())
- return M.occupant
+ for(var/obj/vehicle/sealed/mecha/M in view(world.view + 1, check)) //assuming if you can see them they can see you
+ for(var/O in M.occupants)
+ var/mob/mechamob = O
+ if(mechamob.client && !mechamob.is_blind())
+ return mechamob
return null
/mob/living/simple_animal/hostile/netherworld/migo
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm
index 63a796a8095..9d24b03bdeb 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm
@@ -9,8 +9,8 @@
else
enemies -= L
else if(ismecha(A))
- var/obj/mecha/M = A
- if(M.occupant)
+ var/obj/vehicle/sealed/mecha/M = A
+ if(LAZYLEN(M.occupants))
return A
/mob/living/simple_animal/hostile/retaliate/ListTargets()
@@ -31,15 +31,14 @@
if(faction_check_mob(M) && attack_same || !faction_check_mob(M))
enemies |= M
else if(ismecha(A))
- var/obj/mecha/M = A
- if(M.occupant)
+ var/obj/vehicle/sealed/mecha/M = A
+ if(LAZYLEN(M.occupants))
enemies |= M
- enemies |= M.occupant
+ enemies |= M.occupants
for(var/mob/living/simple_animal/hostile/retaliate/H in around)
if(faction_check_mob(H) && !attack_same && !H.attack_same)
H.enemies |= enemies
- return 0
/mob/living/simple_animal/hostile/retaliate/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
. = ..()
diff --git a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
index c963ed0d717..61fed648467 100644
--- a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
+++ b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
@@ -128,8 +128,8 @@
adjustHealth(-L.maxHealth * 0.5)
return
. = ..()
- if(istype(target, /obj/mecha))
- var/obj/mecha/M = target
+ if(istype(target, /obj/vehicle/sealed/mecha))
+ var/obj/vehicle/sealed/mecha/M = target
M.take_damage(50, BRUTE, MELEE, 1)
/mob/living/simple_animal/hostile/space_dragon/Move()
@@ -221,7 +221,7 @@
L.adjustFireLoss(30)
to_chat(L, "You're hit by [src]'s fire breath!")
// deals damage to mechs
- for(var/obj/mecha/M in T.contents)
+ for(var/obj/vehicle/sealed/mecha/M in T.contents)
if(M in hit_list)
continue
hit_list += M
diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm
index 7d2ff1ad648..722ebf0e5ff 100644
--- a/code/modules/mob/living/simple_animal/hostile/statue.dm
+++ b/code/modules/mob/living/simple_animal/hostile/statue.dm
@@ -79,7 +79,7 @@
if(can_be_seen(NewLoc))
if(client)
to_chat(src, "You cannot move, there are eyes on you!")
- return 0
+ return
return ..()
/mob/living/simple_animal/hostile/statue/Life()
@@ -134,16 +134,17 @@
if(M.client && CanAttack(M) && !M.has_unlimited_silicon_privilege)
if(!M.is_blind())
return M
- for(var/obj/mecha/M in view(world.view + 1, check)) //assuming if you can see them they can see you
- if(M.occupant && M.occupant.client)
- if(!M.occupant.is_blind())
- return M.occupant
+ for(var/obj/vehicle/sealed/mecha/M in view(world.view + 1, check)) //assuming if you can see them they can see you
+ for(var/O in M.occupants)
+ var/mob/mechamob = O
+ if(mechamob.client && !mechamob.is_blind())
+ return mechamob
return null
// Cannot talk
/mob/living/simple_animal/hostile/statue/say(message, bubble_type, list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
- return 0
+ return
// Turn to dust when gibbed
@@ -157,7 +158,7 @@
if(isliving(the_target))
var/mob/living/L = the_target
if(!L.client && !L.ckey)
- return 0
+ return FALSE
return ..()
// Don't attack your creator if there is one
diff --git a/code/modules/mob/living/simple_animal/hostile/vatbeast.dm b/code/modules/mob/living/simple_animal/hostile/vatbeast.dm
index 4ec6f63cd21..68b953acfa6 100644
--- a/code/modules/mob/living/simple_animal/hostile/vatbeast.dm
+++ b/code/modules/mob/living/simple_animal/hostile/vatbeast.dm
@@ -39,7 +39,7 @@
/mob/living/simple_animal/hostile/vatbeast/tamed()
. = ..()
can_buckle = TRUE
- buckle_lying = FALSE
+ buckle_lying = 0
var/datum/component/riding/riding = LoadComponent(/datum/component/riding)
riding.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 15), TEXT_SOUTH = list(0, 15), TEXT_EAST = list(-10, 15), TEXT_WEST = list(10, 15)))
riding.set_vehicle_dir_layer(SOUTH, ABOVE_MOB_LAYER)
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index 940faac7909..310125df08a 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -159,8 +159,8 @@
/mob/living/simple_animal/parrot/radio(message, list/message_mods = list(), list/spans, language) //literally copied from human/radio(), but there's no other way to do this. at least it's better than it used to be.
. = ..()
- if(. != 0)
- return .
+ if(.)
+ return
if(message_mods[MODE_HEADSET])
if(ears)
@@ -175,7 +175,7 @@
ears.talk_into(src, message, message_mods[RADIO_EXTENSION], spans, language, message_mods)
return ITALICS | REDUCE_RANGE
- return 0
+ return FALSE
/*
* Inventory
@@ -605,12 +605,12 @@
parrot_state = PARROT_WANDER
parrot_stuck = 0
parrot_lastmove = null
- return 1
+ return TRUE
else
parrot_lastmove = null
else
parrot_lastmove = src.loc
- return 0
+ return FALSE
/mob/living/simple_animal/parrot/proc/search_for_item()
var/item
@@ -634,8 +634,6 @@
continue
return item
- return null
-
/mob/living/simple_animal/parrot/proc/search_for_perch()
for(var/obj/O in view(src))
for(var/path in desired_perches)
diff --git a/code/modules/mob/living/simple_animal/shade.dm b/code/modules/mob/living/simple_animal/shade.dm
index aaf7411d632..abed275d97f 100644
--- a/code/modules/mob/living/simple_animal/shade.dm
+++ b/code/modules/mob/living/simple_animal/shade.dm
@@ -44,7 +44,7 @@
/mob/living/simple_animal/shade/canSuicide()
if(istype(loc, /obj/item/soulstone)) //do not suicide inside the soulstone
- return 0
+ return FALSE
return ..()
/mob/living/simple_animal/shade/attack_animal(mob/living/simple_animal/M)
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index 84fa8932571..9bc311d65fd 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -450,8 +450,8 @@
if(L.stat != CONSCIOUS)
return FALSE
if (ismecha(the_target))
- var/obj/mecha/M = the_target
- if (M.occupant)
+ var/obj/vehicle/sealed/mecha/M = the_target
+ if(LAZYLEN(M.occupants))
return FALSE
return TRUE
diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm
index acb6fcc957b..539787a6827 100644
--- a/code/modules/mob/living/simple_animal/slime/life.dm
+++ b/code/modules/mob/living/simple_animal/slime/life.dm
@@ -8,7 +8,6 @@
/mob/living/simple_animal/slime/Life()
- set invisibility = 0
if (notransform)
return
if(..())
@@ -614,11 +613,11 @@
/mob/living/simple_animal/slime/proc/will_hunt(hunger = -1) // Check for being stopped from feeding and chasing
if (docile)
- return 0
+ return FALSE
if (hunger == 2 || rabid || attacked)
- return 1
+ return TRUE
if (Leader)
- return 0
+ return FALSE
if (holding_still)
- return 0
- return 1
+ return FALSE
+ return TRUE
diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm
index f1caf2e4f4a..2c8fbe447ae 100644
--- a/code/modules/mob/living/simple_animal/slime/powers.dm
+++ b/code/modules/mob/living/simple_animal/slime/powers.dm
@@ -12,20 +12,22 @@
var/needs_growth = NO_GROWTH_NEEDED
/datum/action/innate/slime/IsAvailable()
- if(..())
- var/mob/living/simple_animal/slime/S = owner
- if(needs_growth == GROWTH_NEEDED)
- if(S.amount_grown >= SLIME_EVOLUTION_THRESHOLD)
- return 1
- return 0
- return 1
+ . = ..()
+ if(!.)
+ return
+ var/mob/living/simple_animal/slime/S = owner
+ if(needs_growth == GROWTH_NEEDED)
+ if(S.amount_grown >= SLIME_EVOLUTION_THRESHOLD)
+ return TRUE
+ return FALSE
+ return TRUE
/mob/living/simple_animal/slime/verb/Feed()
set category = "Slime"
set desc = "This will let you feed on any valid creature in the surrounding area. This should also be used to halt the feeding process."
if(stat)
- return 0
+ return FALSE
var/list/choices = list()
for(var/mob/living/C in view(1,src))
@@ -34,10 +36,11 @@
var/mob/living/M = input(src,"Who do you wish to feed on?") in null|sortNames(choices)
if(!M)
- return 0
+ return FALSE
if(CanFeedon(M))
Feedon(M)
- return 1
+ return TRUE
+ return FALSE
/datum/action/innate/slime/feed
name = "Feed"
diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm
index 97fba146527..bb0546606ad 100644
--- a/code/modules/mob/living/simple_animal/slime/slime.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime.dm
@@ -479,10 +479,10 @@
docile = 1
/mob/living/simple_animal/slime/can_unbuckle()
- return 0
+ return FALSE
/mob/living/simple_animal/slime/can_buckle()
- return 0
+ return FALSE
/mob/living/simple_animal/slime/get_mob_buckling_height(mob/seat)
if(..())
diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm
index 5dc389c5d93..c11605297f5 100644
--- a/code/modules/mob/login.dm
+++ b/code/modules/mob/login.dm
@@ -74,7 +74,10 @@
update_client_colour()
update_mouse_pointer()
if(client)
- client.change_view(getScreenSize(client.prefs.widescreenpref)) // Resets the client.view in case it was changed.
+ if(client.view_size)
+ client.view_size.resetToDefault() // Resets the client.view in case it was changed.
+ else
+ client.change_view(getScreenSize(client.prefs.widescreenpref))
if(client.player_details.player_actions.len)
for(var/datum/action/A in client.player_details.player_actions)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 225d84a7222..503c9693c50 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -109,10 +109,10 @@
*/
/mob/proc/Cell()
set category = "Admin"
- set hidden = 1
+ set hidden = TRUE
if(!loc)
- return 0
+ return
var/datum/gas_mixture/environment = loc.return_air()
@@ -302,7 +302,7 @@
if(istype(W))
if(equip_to_slot_if_possible(W, slot,0,0,0))
- return 1
+ return TRUE
if(!W)
// Activate the item
@@ -310,7 +310,7 @@
if(istype(I))
I.attack_hand(src)
- return 0
+ return FALSE
/**
* Try to equip an item to a slot on the mob
@@ -369,7 +369,7 @@
*/
/mob/proc/equip_to_appropriate_slot(obj/item/W, swap=FALSE)
if(!istype(W))
- return 0
+ return FALSE
var/slot_priority = W.slot_equipment_priority
if(!slot_priority)
@@ -386,9 +386,9 @@
for(var/slot in slot_priority)
if(equip_to_slot_if_possible(W, slot, FALSE, TRUE, TRUE, FALSE, FALSE, swap)) //qdel_on_fail = FALSE; disable_warning = TRUE; redraw_mob = TRUE;
- return 1
+ return TRUE
- return 0
+ return FALSE
/**
* Reset the attached clients perspective (viewpoint)
*
@@ -801,7 +801,7 @@
///Is the mob muzzled (default false)
/mob/proc/is_muzzled()
- return 0
+ return FALSE
/// Adds this list to the output to the stat browser
/mob/proc/get_status_tab_items()
@@ -1008,11 +1008,11 @@
///can the mob be buckled to something by default?
/mob/proc/can_buckle()
- return 1
+ return TRUE
///can the mob be unbuckled from something by default?
/mob/proc/can_unbuckle()
- return 1
+ return TRUE
///Can the mob interact() with an atom?
/mob/proc/can_interact_with(atom/A)
@@ -1072,7 +1072,7 @@
/mob/proc/fully_replace_character_name(oldname,newname)
log_message("[src] name changed from [oldname] to [newname]", LOG_OWNERSHIP)
if(!newname)
- return 0
+ return FALSE
log_played_names(ckey,newname)
@@ -1095,7 +1095,7 @@
// Only update if this player is a target
if(obj.target && obj.target.current && obj.target.current.real_name == name)
obj.update_explanation_text()
- return 1
+ return TRUE
///Updates GLOB.data_core records with new name , see mob/living/carbon/human
/mob/proc/replace_records_name(oldname,newname)
@@ -1152,7 +1152,7 @@
return
client.mouse_pointer_icon = initial(client.mouse_pointer_icon)
if (ismecha(loc))
- var/obj/mecha/M = loc
+ var/obj/vehicle/sealed/mecha/M = loc
if(M.mouse_pointer)
client.mouse_pointer_icon = M.mouse_pointer
else if (istype(loc, /obj/vehicle/sealed))
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index e313038db6c..51220436520 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -45,9 +45,9 @@
/proc/above_neck(zone)
var/list/zones = list(BODY_ZONE_HEAD, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_PRECISE_EYES)
if(zones.Find(zone))
- return 1
+ return TRUE
else
- return 0
+ return FALSE
/**
* Convert random parts of a passed in message to stars
diff --git a/code/modules/mob/mob_say.dm b/code/modules/mob/mob_say.dm
index aacc44e60db..56749f30378 100644
--- a/code/modules/mob/mob_say.dm
+++ b/code/modules/mob/mob_say.dm
@@ -93,7 +93,7 @@
///Check if the mob has a hivemind channel
/mob/proc/hivecheck()
- return 0
+ return FALSE
///Check if the mob has a ling hivemind
/mob/proc/lingcheck()
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index b45e8617199..4c5dae12b60 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -619,34 +619,34 @@
//Bad mobs! - Remember to add a comment explaining what's wrong with the mob
if(!MP)
- return 0 //Sanity, this should never happen.
+ return FALSE //Sanity, this should never happen.
if(ispath(MP, /mob/living/simple_animal/hostile/construct))
- return 0 //Verbs do not appear for players.
+ return FALSE //Verbs do not appear for players.
//Good mobs!
if(ispath(MP, /mob/living/simple_animal/pet/cat))
- return 1
+ return TRUE
if(ispath(MP, /mob/living/simple_animal/pet/dog/corgi))
- return 1
+ return TRUE
if(ispath(MP, /mob/living/simple_animal/crab))
- return 1
+ return TRUE
if(ispath(MP, /mob/living/simple_animal/hostile/carp))
- return 1
+ return TRUE
if(ispath(MP, /mob/living/simple_animal/hostile/mushroom))
- return 1
+ return TRUE
if(ispath(MP, /mob/living/simple_animal/shade))
- return 1
+ return TRUE
if(ispath(MP, /mob/living/simple_animal/hostile/killertomato))
- return 1
+ return TRUE
if(ispath(MP, /mob/living/simple_animal/mouse))
- return 1 //It is impossible to pull up the player panel for mice (Fixed! - Nodrak)
+ return TRUE
if(ispath(MP, /mob/living/simple_animal/hostile/bear))
- return 1 //Bears will auto-attack mobs, even if they're player controlled (Fixed! - Nodrak)
+ return TRUE
if(ispath(MP, /mob/living/simple_animal/parrot))
- return 1 //Parrots are no longer unfinished! -Nodrak
+ return TRUE //Parrots are no longer unfinished! -Nodrak
//Not in here? Must be untested!
- return 0
+ return FALSE
#undef TRANSFORMATION_DURATION
diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm
index bb33a23039a..5a5de49845c 100644
--- a/code/modules/modular_computers/computers/item/computer.dm
+++ b/code/modules/modular_computers/computers/item/computer.dm
@@ -222,11 +222,11 @@
/obj/item/modular_computer/process()
if(!enabled) // The computer is turned off
last_power_usage = 0
- return 0
+ return
if(obj_integrity <= integrity_failure * max_integrity)
shutdown_computer()
- return 0
+ return
if(active_program && active_program.requires_ntnet && !get_ntnet_status(active_program.requires_ntnet_feature))
active_program.event_networkfailure(0) // Active program requires NTNet to run but we've just lost connection. Crash.
diff --git a/code/modules/modular_computers/computers/item/computer_ui.dm b/code/modules/modular_computers/computers/item/computer_ui.dm
index 80c0811d665..f891ef4099a 100644
--- a/code/modules/modular_computers/computers/item/computer_ui.dm
+++ b/code/modules/modular_computers/computers/item/computer_ui.dm
@@ -7,17 +7,17 @@
if(!enabled)
if(ui)
ui.close()
- return 0
+ return
if(!use_power())
if(ui)
ui.close()
- return 0
+ return
// Robots don't really need to see the screen, their wireless connection works as long as computer is on.
if(!screen_on && !issilicon(user))
if(ui)
ui.close()
- return 0
+ return
// If we have an active program switch to it now.
if(active_program)
@@ -74,9 +74,9 @@
data["programs"] = list()
var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD]
for(var/datum/computer_file/program/P in hard_drive.stored_files)
- var/running = 0
+ var/running = FALSE
if(P in idle_threads)
- running = 1
+ running = TRUE
data["programs"] += list(list("name" = P.filename, "desc" = P.filedesc, "running" = running))
diff --git a/code/modules/modular_computers/computers/item/laptop.dm b/code/modules/modular_computers/computers/item/laptop.dm
index 73007c1a9cf..a5d2a7ed170 100644
--- a/code/modules/modular_computers/computers/item/laptop.dm
+++ b/code/modules/modular_computers/computers/item/laptop.dm
@@ -17,7 +17,7 @@
// No running around with open laptops in hands.
item_flags = SLOWS_WHILE_IN_HAND
- screen_on = 0 // Starts closed
+ screen_on = FALSE // Starts closed
var/start_open = TRUE // unless this var is set to 1
var/icon_state_closed = "laptop-closed"
var/w_class_open = WEIGHT_CLASS_BULKY
diff --git a/code/modules/modular_computers/computers/item/processor.dm b/code/modules/modular_computers/computers/item/processor.dm
index 0d7b567877f..a8e4a8a6545 100644
--- a/code/modules/modular_computers/computers/item/processor.dm
+++ b/code/modules/modular_computers/computers/item/processor.dm
@@ -43,13 +43,6 @@
/obj/item/modular_computer/processor/relay_qdel()
qdel(machinery_computer)
-// This thing is not meant to be used on it's own, get topic data from our machinery owner.
-//obj/item/modular_computer/processor/canUseTopic(atom/movable/M, be_close=FALSE, no_dexterity=FALSE, no_tk=FALSE)
-// if(!machinery_computer)
-// return 0
-
-// return machinery_computer.canUseTopic(user, state)
-
/obj/item/modular_computer/processor/shutdown_computer()
if(!machinery_computer)
return
diff --git a/code/modules/modular_computers/file_system/program.dm b/code/modules/modular_computers/file_system/program.dm
index f65f0e36f68..d16d6f8a250 100644
--- a/code/modules/modular_computers/file_system/program.dm
+++ b/code/modules/modular_computers/file_system/program.dm
@@ -68,8 +68,8 @@
if(!(hardware_flag & usage_flags))
if(loud && computer && user)
to_chat(user, "\The [computer] flashes a \"Hardware Error - Incompatible software\" warning.")
- return 0
- return 1
+ return FALSE
+ return TRUE
/datum/computer_file/program/proc/get_signal(specific_action = 0)
if(computer)
@@ -78,7 +78,7 @@
// Called by Process() on device that runs us, once every tick.
/datum/computer_file/program/proc/process_tick()
- return 1
+ return TRUE
/**
*Check if the user can run program. Only humans can operate computer. Automatically called in run_program()
@@ -147,8 +147,8 @@
ID = card_holder.GetID()
generate_network_log("Connection opened -- Program ID: [filename] User:[ID?"[ID.registered_name]":"None"]")
program_state = PROGRAM_STATE_ACTIVE
- return 1
- return 0
+ return TRUE
+ return FALSE
/**
*
diff --git a/code/modules/modular_computers/file_system/programs/ntdownloader.dm b/code/modules/modular_computers/file_system/programs/ntdownloader.dm
index 8fbcfd0b01b..c368b6408cb 100644
--- a/code/modules/modular_computers/file_system/programs/ntdownloader.dm
+++ b/code/modules/modular_computers/file_system/programs/ntdownloader.dm
@@ -13,8 +13,8 @@
tgui_id = "NtosNetDownloader"
var/datum/computer_file/program/downloaded_file = null
- var/hacked_download = 0
- var/download_completion = 0 //GQ of downloaded data.
+ var/hacked_download = FALSE
+ var/download_completion = FALSE //GQ of downloaded data.
var/download_netspeed = 0
var/downloaderror = ""
var/obj/item/modular_computer/my_computer = null
@@ -36,33 +36,33 @@
/datum/computer_file/program/ntnetdownload/proc/begin_file_download(filename)
if(downloaded_file)
- return 0
+ return FALSE
var/datum/computer_file/program/PRG = SSnetworks.station_network.find_ntnet_file_by_name(filename)
if(!PRG || !istype(PRG))
- return 0
+ return FALSE
// Attempting to download antag only program, but without having emagged/syndicate computer. No.
if(PRG.available_on_syndinet && !emagged)
- return 0
+ return FALSE
var/obj/item/computer_hardware/hard_drive/hard_drive = computer.all_components[MC_HDD]
if(!computer || !hard_drive || !hard_drive.can_store_file(PRG))
- return 0
+ return FALSE
ui_header = "downloader_running.gif"
if(PRG in main_repo)
generate_network_log("Began downloading file [PRG.filename].[PRG.filetype] from NTNet Software Repository.")
- hacked_download = 0
+ hacked_download = FALSE
else if(PRG in antag_repo)
generate_network_log("Began downloading file **ENCRYPTED**.[PRG.filetype] from unspecified server.")
- hacked_download = 1
+ hacked_download = TRUE
else
generate_network_log("Began downloading file [PRG.filename].[PRG.filetype] from unspecified server.")
- hacked_download = 0
+ hacked_download = FALSE
downloaded_file = PRG.clone()
@@ -71,7 +71,7 @@
return
generate_network_log("Aborted download of file [hacked_download ? "**ENCRYPTED**" : "[downloaded_file.filename].[downloaded_file.filetype]"].")
downloaded_file = null
- download_completion = 0
+ download_completion = FALSE
ui_header = "downloader_finished.gif"
/datum/computer_file/program/ntnetdownload/proc/complete_file_download()
@@ -83,7 +83,7 @@
// The download failed
downloaderror = "I/O ERROR - Unable to save file. Check whether you have enough free space on your hard drive and whether your hard drive is properly connected. If the issue persists contact your system administrator for assistance."
downloaded_file = null
- download_completion = 0
+ download_completion = FALSE
ui_header = "downloader_finished.gif"
/datum/computer_file/program/ntnetdownload/process_tick()
@@ -105,20 +105,20 @@
/datum/computer_file/program/ntnetdownload/ui_act(action, params)
if(..())
- return 1
+ return TRUE
switch(action)
if("PRG_downloadfile")
if(!downloaded_file)
begin_file_download(params["filename"])
- return 1
+ return TRUE
if("PRG_reseterror")
if(downloaderror)
- download_completion = 0
- download_netspeed = 0
+ download_completion = FALSE
+ download_netspeed = FALSE
downloaded_file = null
downloaderror = ""
- return 1
- return 0
+ return TRUE
+ return FALSE
/datum/computer_file/program/ntnetdownload/ui_data(mob/user)
my_computer = computer
@@ -186,7 +186,7 @@
/datum/computer_file/program/ntnetdownload/kill_program(forced)
abort_file_download()
- return ..(forced)
+ return ..()
////////////////////////
//Syndicate Downloader//
@@ -199,7 +199,7 @@
filedesc = "Software Download Tool"
program_icon_state = "generic"
extended_desc = "This program allows downloads of software from shared Syndicate repositories"
- requires_ntnet = 0
+ requires_ntnet = FALSE
ui_header = "downloader_finished.gif"
tgui_id = "NtosNetDownloader"
emagged = TRUE
diff --git a/code/modules/modular_computers/hardware/hard_drive.dm b/code/modules/modular_computers/hardware/hard_drive.dm
index e5c133de200..857eed5f1bb 100644
--- a/code/modules/modular_computers/hardware/hard_drive.dm
+++ b/code/modules/modular_computers/hardware/hard_drive.dm
@@ -31,43 +31,43 @@
// Use this proc to add file to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks.
/obj/item/computer_hardware/hard_drive/proc/store_file(datum/computer_file/F)
if(!F || !istype(F))
- return 0
+ return FALSE
if(!can_store_file(F))
- return 0
+ return FALSE
if(!check_functionality())
- return 0
+ return FALSE
if(!stored_files)
- return 0
+ return FALSE
// This file is already stored. Don't store it again.
if(F in stored_files)
- return 0
+ return FALSE
F.holder = src
stored_files.Add(F)
recalculate_size()
- return 1
+ return TRUE
// Use this proc to remove file from the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks.
/obj/item/computer_hardware/hard_drive/proc/remove_file(datum/computer_file/F)
if(!F || !istype(F))
- return 0
+ return FALSE
if(!stored_files)
- return 0
+ return FALSE
if(!check_functionality())
- return 0
+ return FALSE
if(F in stored_files)
stored_files -= F
recalculate_size()
- return 1
+ return TRUE
else
- return 0
+ return FALSE
// Loops through all stored files and recalculates used_capacity of this drive
/obj/item/computer_hardware/hard_drive/proc/recalculate_size()
@@ -80,24 +80,24 @@
// Checks whether file can be stored on the hard drive. We can only store unique files, so this checks whether we wouldn't get a duplicity by adding a file.
/obj/item/computer_hardware/hard_drive/proc/can_store_file(datum/computer_file/F)
if(!F || !istype(F))
- return 0
+ return FALSE
if(F in stored_files)
- return 0
+ return FALSE
var/name = F.filename + "." + F.filetype
for(var/datum/computer_file/file in stored_files)
if((file.filename + "." + file.filetype) == name)
- return 0
+ return FALSE
// In the unlikely event someone manages to create that many files.
// BYOND is acting weird with numbers above 999 in loops (infinite loop prevention)
if(stored_files.len >= 999)
- return 0
+ return FALSE
if((used_capacity + F.size) > max_capacity)
- return 0
+ return FALSE
else
- return 1
+ return TRUE
// Tries to find the file by filename. Returns null on failure
diff --git a/code/modules/modular_computers/hardware/portable_disk.dm b/code/modules/modular_computers/hardware/portable_disk.dm
index 89b0382e866..f1c565188f9 100644
--- a/code/modules/modular_computers/hardware/portable_disk.dm
+++ b/code/modules/modular_computers/hardware/portable_disk.dm
@@ -4,7 +4,7 @@
power_usage = 10
icon_state = "datadisk6"
w_class = WEIGHT_CLASS_TINY
- critical = 0
+ critical = FALSE
max_capacity = 16
device_type = MC_SDD
diff --git a/code/modules/modular_computers/hardware/recharger.dm b/code/modules/modular_computers/hardware/recharger.dm
index b58ea929780..38e406bc5bb 100644
--- a/code/modules/modular_computers/hardware/recharger.dm
+++ b/code/modules/modular_computers/hardware/recharger.dm
@@ -6,8 +6,8 @@
/obj/item/computer_hardware/recharger/proc/use_power(amount, charging=0)
if(charging)
- return 1
- return 0
+ return TRUE
+ return FALSE
/obj/item/computer_hardware/recharger/process()
..()
@@ -34,17 +34,17 @@
var/obj/machinery/M = holder.physical
if(M.powered())
M.use_power(amount)
- return 1
+ return TRUE
else
var/area/A = get_area(src)
if(!istype(A))
- return 0
+ return FALSE
if(A.powered(AREA_USAGE_EQUIP))
A.use_power(amount, AREA_USAGE_EQUIP)
- return 1
- return 0
+ return TRUE
+ return FALSE
/obj/item/computer_hardware/recharger/wired
name = "wired power connector"
@@ -56,26 +56,25 @@
if(ismachinery(M.physical) && M.physical.anchored)
return ..()
to_chat(user, "\The [src] is incompatible with portable computers!")
- return 0
+ return FALSE
/obj/item/computer_hardware/recharger/wired/use_power(amount, charging=0)
if(ismachinery(holder.physical) && holder.physical.anchored)
var/obj/machinery/M = holder.physical
var/turf/T = M.loc
if(!T || !istype(T))
- return 0
+ return FALSE
var/obj/structure/cable/C = T.get_cable_node()
if(!C || !C.powernet)
- return 0
+ return FALSE
var/power_in_net = C.powernet.avail-C.powernet.load
if(power_in_net && power_in_net > amount)
C.powernet.load += amount
- return 1
-
- return 0
+ return TRUE
+ return FALSE
diff --git a/code/modules/ninja/ninja_event.dm b/code/modules/ninja/ninja_event.dm
index c60d6b93fd3..beec8aa88c6 100644
--- a/code/modules/ninja/ninja_event.dm
+++ b/code/modules/ninja/ninja_event.dm
@@ -59,7 +59,7 @@ Contents:
var/datum/mind/Mind = new /datum/mind(key)
Mind.assigned_role = ROLE_NINJA
Mind.special_role = ROLE_NINJA
- Mind.active = 1
+ Mind.active = TRUE
//spawn the ninja and assign the candidate
var/mob/living/carbon/human/Ninja = create_space_ninja(spawn_loc)
diff --git a/code/modules/ninja/suit/gloves.dm b/code/modules/ninja/suit/gloves.dm
index 652b3f54d7d..839bdcfb0e8 100644
--- a/code/modules/ninja/suit/gloves.dm
+++ b/code/modules/ninja/suit/gloves.dm
@@ -32,8 +32,8 @@
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
strip_delay = 120
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
- var/draining = 0
- var/candrain = 0
+ var/draining = FALSE
+ var/candrain = FALSE
var/mindrain = 200
var/maxdrain = 400
diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm
index 333061814df..629b2f1d674 100644
--- a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm
+++ b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm
@@ -5,7 +5,7 @@
var/mob/living/carbon/C = input("Select who to capture:","Capture who?",null) as null|mob in sortNames(oview(H))
if(QDELETED(C)||!(C in oview(H)))
- return 0
+ return
if(!C.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame.
to_chat(H, "[C.p_they(TRUE)] will bring no honor to your Clan!")
diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_stealth.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_stealth.dm
index 1c3fbd81470..4d9b97d8cf8 100644
--- a/code/modules/ninja/suit/n_suit_verbs/ninja_stealth.dm
+++ b/code/modules/ninja/suit/n_suit_verbs/ninja_stealth.dm
@@ -26,14 +26,14 @@ Contents:
/obj/item/clothing/suit/space/space_ninja/proc/cancel_stealth()
var/mob/living/carbon/human/U = affecting
if(!U)
- return 0
+ return FALSE
if(stealth)
stealth = !stealth
animate(U, alpha = 255, time = 15)
U.visible_message("[U.name] appears from thin air!", \
"You are now visible.")
- return 1
- return 0
+ return TRUE
+ return FALSE
/obj/item/clothing/suit/space/space_ninja/proc/stealth()
diff --git a/code/modules/ninja/suit/ninjaDrainAct.dm b/code/modules/ninja/suit/ninjaDrainAct.dm
index 376e07aecfc..189f70a71c9 100644
--- a/code/modules/ninja/suit/ninjaDrainAct.dm
+++ b/code/modules/ninja/suit/ninjaDrainAct.dm
@@ -190,7 +190,7 @@ They *could* go in their appropriate files, but this is supposed to be modular
S.spark_system.start()
//MECH//
-/obj/mecha/ninjadrain_act(obj/item/clothing/suit/space/space_ninja/S, mob/living/carbon/human/H, obj/item/clothing/gloves/space_ninja/G)
+/obj/vehicle/sealed/mecha/ninjadrain_act(obj/item/clothing/suit/space/space_ninja/S, mob/living/carbon/human/H, obj/item/clothing/gloves/space_ninja/G)
if(!S || !H || !G)
return INVALID_DRAIN
@@ -198,7 +198,7 @@ They *could* go in their appropriate files, but this is supposed to be modular
var/drain = 0 //Drain amount
. = 0
- occupant_message("Warning: Unauthorized access through sub-route 4, block H, detected.")
+ to_chat(occupants, "[icon2html(src, occupants)]Warning: Unauthorized access through sub-route 4, block H, detected.")
if(get_charge())
while(G.candrain && cell.charge > 0 && !maxcapacity)
drain = rand(G.mindrain,G.maxdrain)
diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm
index 44d1d48acb1..f68b30b1081 100644
--- a/code/modules/paperwork/contract.dm
+++ b/code/modules/paperwork/contract.dm
@@ -189,31 +189,30 @@
/obj/item/paper/contract/infernal/proc/attempt_signature(mob/living/carbon/human/user, blood = 0)
if(!user.IsAdvancedToolUser() || !user.is_literate())
to_chat(user, "You don't know how to read or write!")
- return 0
+ return FALSE
if(user.mind != target)
to_chat(user, "Your signature simply slides off the sheet, it seems this contract is not meant for you to sign!")
- return 0
+ return FALSE
if(user.mind.soulOwner == owner)
to_chat(user, "This devil already owns your soul, you may not sell it to [owner.p_them()] again!")
- return 0
+ return FALSE
if(signed)
to_chat(user, "This contract has already been signed! It may not be signed again.")
- return 0
+ return FALSE
if(!user.mind.hasSoul)
to_chat(user, "You do not possess a soul.")
- return 0
+ return FALSE
if(HAS_TRAIT(user, TRAIT_DUMB))
to_chat(user, "You quickly scrawl 'your name' on the contract.")
signIncorrectly()
- return 0
+ return FALSE
if (contractType == CONTRACT_REVIVE)
to_chat(user, "You are already alive, this contract would do nothing.")
- return 0
- else
- to_chat(user, "You quickly scrawl your name on the contract.")
- if(fulfillContract(target.current, blood)<=0)
- to_chat(user, "But it seemed to have no effect, perhaps even Hell itself cannot grant this boon?")
- return 1
+ return FALSE
+ to_chat(user, "You quickly scrawl your name on the contract.")
+ if(!fulfillContract(target.current, blood))
+ to_chat(user, "But it seemed to have no effect, perhaps even Hell itself cannot grant this boon?")
+ return TRUE
@@ -221,7 +220,7 @@
if (target == M.mind && M.stat == DEAD && M.mind.soulOwner == M.mind)
if (cooldown)
to_chat(user, "Give [M] a chance to think through the contract, don't rush [M.p_them()]!")
- return 0
+ return
cooldown = TRUE
var/mob/living/carbon/human/H = M
var/mob/dead/observer/ghost = H.get_ghost()
@@ -265,12 +264,12 @@
return TRUE
/obj/item/paper/contract/infernal/proc/signIncorrectly(mob/living/carbon/human/user = target.current, blood = FALSE)
- signed = 1
+ signed = TRUE
update_text("your name", blood)
/obj/item/paper/contract/infernal/power/fulfillContract(mob/living/carbon/human/user = target.current, blood = FALSE)
if(!user.dna)
- return -1
+ return FALSE
user.dna.add_mutation(HULK)
var/obj/item/organ/regenerative_core/organ = new /obj/item/organ/regenerative_core
organ.Insert(user)
@@ -278,7 +277,7 @@
/obj/item/paper/contract/infernal/wealth/fulfillContract(mob/living/carbon/human/user = target.current, blood = 0)
if(!istype(user) || !user.mind) // How in the hell could that happen?
- return -1
+ return FALSE
user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/summon_wealth(null))
return ..()
@@ -318,20 +317,20 @@
/obj/item/paper/contract/infernal/magic/fulfillContract(mob/living/carbon/human/user = target.current, blood = 0)
if(!istype(user) || !user.mind)
- return -1
+ return FALSE
user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/conjure_item/spellpacket/robeless(null))
user.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(null))
return ..()
/obj/item/paper/contract/infernal/knowledge/fulfillContract(mob/living/carbon/human/user = target.current, blood = 0)
if(!istype(user) || !user.mind)
- return -1
+ return FALSE
user.dna.add_mutation(XRAY)
user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/view_range(null))
return ..()
/obj/item/paper/contract/infernal/friend/fulfillContract(mob/living/user = target.current, blood = 0)
if(!istype(user) || !user.mind)
- return -1
+ return FALSE
user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/summon_friend(null))
return ..()
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index fea40b36e16..b6ea91f292b 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -65,7 +65,7 @@
var/start_charge = 90 // initial cell charge %
var/cell_type = /obj/item/stock_parts/cell/upgraded //Base cell has 2500 capacity. Enter the path of a different cell you want to use. cell determines charge rates, max capacity, ect. These can also be changed with other APC vars, but isn't recommended to minimize the risk of accidental usage of dirty editted APCs
var/opened = APC_COVER_CLOSED
- var/shorted = 0
+ var/shorted = FALSE
var/lighting = 3
var/equipment = 3
var/environ = 3
@@ -75,7 +75,7 @@
var/chargecount = 0
var/locked = TRUE
var/coverlocked = TRUE
- var/aidisabled = 0
+ var/aidisabled = FALSE
var/tdir = null
var/obj/machinery/power/terminal/terminal = null
var/lastused_light = 0
@@ -83,8 +83,8 @@
var/lastused_environ = 0
var/lastused_total = 0
var/main_status = 0
- powernet = 0 // set so that APCs aren't found as powernet nodes //Hackish, Horrible, was like this before I changed it :(
- var/malfhack = 0 //New var for my changes to AI malf. --NeoFite
+ powernet = FALSE // set so that APCs aren't found as powernet nodes //Hackish, Horrible, was like this before I changed it :(
+ var/malfhack = FALSE //New var for my changes to AI malf. --NeoFite
var/mob/living/silicon/ai/malfai = null //See above --NeoFite
var/has_electronics = APC_ELECTRONICS_MISSING // 0 - none, 1 - plugged in, 2 - secured by screwdriver
var/overload = 1 //used for the Blackout malf module
@@ -94,7 +94,7 @@
var/longtermpower = 10
var/auto_name = FALSE
var/failure_timer = 0
- var/force_update = 0
+ var/force_update = FALSE
var/emergency_lights = FALSE
var/nightshift_lights = FALSE
var/last_nightshift_switch = 0
@@ -1027,7 +1027,7 @@
L.no_emergency = emergency_lights
INVOKE_ASYNC(L, /obj/machinery/light/.proc/update, FALSE)
CHECK_TICK
- return 1
+ return TRUE
/obj/machinery/power/apc/proc/toggle_breaker(mob/user)
if(!is_operational || failure_timer)
@@ -1182,7 +1182,7 @@
update()
queue_icon_update()
failure_timer--
- force_update = 1
+ force_update = TRUE
return
lastused_light = area.power_usage[AREA_USAGE_LIGHT] + area.power_usage[AREA_USAGE_STATIC_LIGHT]
@@ -1400,22 +1400,22 @@
/obj/machinery/power/apc/proc/shock(mob/user, prb)
if(!prob(prb))
- return 0
+ return FALSE
do_sparks(5, TRUE, src)
if(isalien(user))
- return 0
+ return FALSE
if(electrocute_mob(user, src, src, 1, TRUE))
- return 1
+ return TRUE
else
- return 0
+ return FALSE
/obj/machinery/power/apc/proc/setsubsystem(val)
if(cell && cell.charge > 0)
return (val==1) ? 0 : val
else if(val == 3)
- return 1
+ return TRUE
else
- return 0
+ return FALSE
/obj/machinery/power/apc/proc/energy_fail(duration)
diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm
index 9e041b82a2b..4ad1ee6a277 100644
--- a/code/modules/power/cell.dm
+++ b/code/modules/power/cell.dm
@@ -73,13 +73,13 @@
/obj/item/stock_parts/cell/use(amount)
if(rigged && amount > 0)
explode()
- return 0
+ return FALSE
if(charge < amount)
- return 0
+ return FALSE
charge = (charge - amount)
if(!istype(loc, /obj/machinery/power/apc))
SSblackbox.record_feedback("tally", "cell_used", 1, type)
- return 1
+ return TRUE
// recharge the cell
/obj/item/stock_parts/cell/proc/give(amount)
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index c157f04e36d..b923b4b1c90 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -605,10 +605,10 @@
/obj/machinery/light/proc/flicker(amount = rand(10, 20))
- set waitfor = 0
+ set waitfor = FALSE
if(flickering)
return
- flickering = 1
+ flickering = TRUE
if(on && status == LIGHT_OK)
for(var/i = 0; i < amount; i++)
if(status != LIGHT_OK)
@@ -618,7 +618,7 @@
sleep(rand(5, 15))
on = (status == LIGHT_OK)
update(0)
- flickering = 0
+ flickering = FALSE
// ai attack - make lights flicker, because why not
@@ -759,7 +759,7 @@
// called when area power state changes
/obj/machinery/light/power_change()
- SHOULD_CALL_PARENT(0)
+ SHOULD_CALL_PARENT(FALSE)
var/area/A = get_area(src)
seton(A.lightswitch && A.power_light)
diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm
index a1bf54d61ee..fdfb77b09d9 100644
--- a/code/modules/power/power.dm
+++ b/code/modules/power/power.dm
@@ -119,7 +119,7 @@
*/
/obj/machinery/proc/power_change()
SIGNAL_HANDLER
- SHOULD_CALL_PARENT(1)
+ SHOULD_CALL_PARENT(TRUE)
if(machine_stat & BROKEN)
return
diff --git a/code/modules/power/rtg.dm b/code/modules/power/rtg.dm
index 7cd87179201..9eff3ce3f8e 100644
--- a/code/modules/power/rtg.dm
+++ b/code/modules/power/rtg.dm
@@ -12,7 +12,7 @@
// You can buckle someone to RTG, then open its panel. Fun stuff.
can_buckle = TRUE
- buckle_lying = FALSE
+ buckle_lying = 0
buckle_requires_restraints = TRUE
var/power_gen = 1000 // Enough to power a single APC. 4000 output with T4 capacitor.
diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm
index 6e64e1af6b1..836a507b413 100644
--- a/code/modules/power/singularity/field_generator.dm
+++ b/code/modules/power/singularity/field_generator.dm
@@ -158,9 +158,9 @@ field_generator power level display
/obj/machinery/field/generator/blob_act(obj/structure/blob/B)
if(active)
- return 0
+ return FALSE
else
- ..()
+ return ..()
/obj/machinery/field/generator/bullet_act(obj/projectile/Proj)
if(Proj.flag != BULLET)
@@ -221,25 +221,25 @@ field_generator power level display
if(draw_power(round(power_draw/2,1)))
check_power_level()
- return 1
+ return TRUE
else
visible_message("The [name] shuts down!", "You hear something shutting down.")
turn_off()
investigate_log("ran out of power and deactivated", INVESTIGATE_SINGULO)
power = 0
check_power_level()
- return 0
+ return FALSE
//This could likely be better, it tends to start loopin if you have a complex generator loop setup. Still works well enough to run the engine fields will likely recode the field gens and fields sometime -Mport
/obj/machinery/field/generator/proc/draw_power(draw = 0, failsafe = FALSE, obj/machinery/field/generator/G = null, obj/machinery/field/generator/last = null)
if((G && (G == src)) || (failsafe >= 8))//Loopin, set fail
- return 0
+ return FALSE
else
failsafe++
if(power >= draw)//We have enough power
power -= draw
- return 1
+ return TRUE
else//Need more power
draw -= power
@@ -250,14 +250,14 @@ field_generator power level display
continue
if(G)//Another gen is askin for power and we dont have it
if(FG.draw_power(draw,failsafe,G,src))//Can you take the load
- return 1
+ return TRUE
else
- return 0
+ return FALSE
else//We are askin another for power
if(FG.draw_power(draw,failsafe,src,src))
- return 1
+ return TRUE
else
- return 0
+ return FALSE
/obj/machinery/field/generator/proc/start_fields()
@@ -276,22 +276,22 @@ field_generator power level display
/obj/machinery/field/generator/proc/setup_field(NSEW)
var/turf/T = loc
if(!istype(T))
- return 0
+ return FALSE
var/obj/machinery/field/generator/G = null
var/steps = 0
if(!NSEW)//Make sure its ran right
- return 0
+ return FALSE
for(var/dist in 0 to 7) // checks out to 8 tiles away for another generator
T = get_step(T, NSEW)
if(T.density)//We cant shoot a field though this
- return 0
+ return FALSE
G = locate(/obj/machinery/field/generator) in T
if(G)
steps -= 1
if(!G.active)
- return 0
+ return FALSE
break
for(var/TC in T.contents)
@@ -299,12 +299,12 @@ field_generator power level display
if(ismob(A))
continue
if(A.density)
- return 0
+ return FALSE
steps++
if(!G)
- return 0
+ return FALSE
T = loc
for(var/dist in 0 to steps) // creates each field tile
diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm
index f5e3bbc1417..2a191cff009 100644
--- a/code/modules/power/singularity/generator.dm
+++ b/code/modules/power/singularity/generator.dm
@@ -11,7 +11,7 @@
// You can buckle someone to the singularity generator, then start the engine. Fun!
can_buckle = TRUE
- buckle_lying = FALSE
+ buckle_lying = 0
buckle_requires_restraints = TRUE
var/energy = 0
diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm
index d73c0e63e6f..4c0cf0af3ef 100644
--- a/code/modules/power/singularity/singularity.dm
+++ b/code/modules/power/singularity/singularity.dm
@@ -70,7 +70,7 @@
return ..()
else
last_failed_movement = direct
- return 0
+ return FALSE
/obj/singularity/attack_hand(mob/user)
consume(user)
@@ -87,10 +87,10 @@
/obj/singularity/attackby(obj/item/W, mob/user, params)
consume(user)
- return 1
+ return TRUE
/obj/singularity/Process_Spacemove() //The singularity stops drifting for no man!
- return 0
+ return FALSE
/obj/singularity/blob_act(obj/structure/blob/B)
return
@@ -252,18 +252,18 @@
dissipate = 0
if(current_size == allowed_size)
investigate_log("grew to size [current_size]", INVESTIGATE_SINGULO)
- return 1
+ return TRUE
else if(current_size < (--temp_allowed_size))
expand(temp_allowed_size)
else
- return 0
+ return FALSE
/obj/singularity/proc/check_energy()
if(energy <= 0)
investigate_log("collapsed.", INVESTIGATE_SINGULO)
qdel(src)
- return 0
+ return FALSE
switch(energy)//Some of these numbers might need to be changed up later -Mport
if(1 to 199)
allowed_size = STAGE_ONE
@@ -280,7 +280,7 @@
allowed_size = STAGE_FIVE
if(current_size != allowed_size)
expand()
- return 1
+ return TRUE
/obj/singularity/proc/eat()
@@ -316,7 +316,7 @@
/obj/singularity/proc/move(force_move = 0)
if(!move_self)
- return 0
+ return FALSE
var/drifting_dir = pick(GLOB.alldirs - last_failed_movement)
@@ -337,11 +337,11 @@
if(step(src, i)) //Move in each direction.
if(check_cardinals_range(steps, FALSE)) //New location passes, return true.
return TRUE
- . = !.
+ return !.
/obj/singularity/proc/check_turfs_in(direction = 0, step = 0)
if(!direction)
- return 0
+ return FALSE
var/steps = 0
if(!step)
switch(current_size)
@@ -362,7 +362,7 @@
for(var/i = 1 to steps)
T = get_step(T,direction)
if(!isturf(T))
- return 0
+ return FALSE
turfs.Add(T)
var/dir2 = 0
var/dir3 = 0
@@ -377,35 +377,35 @@
for(var/j = 1 to steps-1)
T2 = get_step(T2,dir2)
if(!isturf(T2))
- return 0
+ return FALSE
turfs.Add(T2)
for(var/k = 1 to steps-1)
T = get_step(T,dir3)
if(!isturf(T))
- return 0
+ return FALSE
turfs.Add(T)
for(var/turf/T3 in turfs)
if(isnull(T3))
continue
if(!can_move(T3))
- return 0
- return 1
+ return FALSE
+ return TRUE
/obj/singularity/proc/can_move(turf/T)
if(!T)
- return 0
+ return FALSE
if((locate(/obj/machinery/field/containment) in T)||(locate(/obj/machinery/shieldwall) in T))
- return 0
+ return FALSE
else if(locate(/obj/machinery/field/generator) in T)
var/obj/machinery/field/generator/G = locate(/obj/machinery/field/generator) in T
if(G && G.active)
- return 0
+ return FALSE
else if(locate(/obj/machinery/power/shieldwallgen) in T)
var/obj/machinery/power/shieldwallgen/S = locate(/obj/machinery/power/shieldwallgen) in T
if(S && S.active)
- return 0
- return 1
+ return FALSE
+ return TRUE
/obj/singularity/proc/event()
@@ -417,11 +417,11 @@
mezzer()
if(3,4) //Sets all nearby mobs on fire
if(current_size < STAGE_SIX)
- return 0
+ return FALSE
combust_mobs()
else
- return 0
- return 1
+ return FALSE
+ return TRUE
/obj/singularity/proc/combust_mobs()
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index 48e39202a14..aea8321db0c 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -15,12 +15,16 @@
var/id
var/obscured = FALSE
- var/sunfrac = 0 //[0-1] measure of obscuration -- multipllier against power generation
- var/azimuth_current = 0 //[0-360) degrees, which direction are we facing?
+ ///[0-1] measure of obscuration -- multipllier against power generation
+ var/sunfrac = 0
+ ///[0-360) degrees, which direction are we facing?
+ var/azimuth_current = 0
var/azimuth_target = 0 //same but what way we're going to face next time we turn
var/obj/machinery/power/solar_control/control
- var/needs_to_turn = TRUE //do we need to turn next tick?
- var/needs_to_update_solar_exposure = TRUE //do we need to call update_solar_exposure() next tick?
+ ///do we need to turn next tick?
+ var/needs_to_turn = TRUE
+ ///do we need to call update_solar_exposure() next tick?
+ var/needs_to_update_solar_exposure = TRUE
var/obj/effect/overlay/panel
/obj/machinery/power/solar/Initialize(mapload, obj/item/solar_assembly/S)
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index 663f8301628..72844c53e52 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -14,12 +14,12 @@
#define PLASMA_HEAT_PENALTY 15 // Higher == Bigger heat and waste penalty from having the crystal surrounded by this gas. Negative numbers reduce penalty.
#define OXYGEN_HEAT_PENALTY 1
-#define PLUOXIUM_HEAT_PENALTY -1
+#define PLUOXIUM_HEAT_PENALTY 3
#define TRITIUM_HEAT_PENALTY 10
#define CO2_HEAT_PENALTY 0.1
#define NITROGEN_HEAT_PENALTY -1.5
#define BZ_HEAT_PENALTY 5
-#define H2O_HEAT_PENALTY 8
+#define H2O_HEAT_PENALTY 12 //This'll get made slowly over time, I want my spice rock spicy god damnit
#define FREON_HEAT_PENALTY -10 //very good heat absorbtion and less plasma and o2 generation
#define HYDROGEN_HEAT_PENALTY 10 // similar heat penalty as tritium (dangerous)
#define HEALIUM_HEAT_PENALTY 4
@@ -42,7 +42,6 @@
#define BZ_RADIOACTIVITY_MODIFIER 5 //Improves the effect of transmit modifiers
#define N2O_HEAT_RESISTANCE 6 //Higher == Gas makes the crystal more resistant against heat damage.
-#define PLUOXIUM_HEAT_RESISTANCE 3
#define HYDROGEN_HEAT_RESISTANCE 2 // just a bit of heat resistance to spice it up
#define PROTO_NITRATE_HEAT_RESISTANCE 5
@@ -219,7 +218,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
///The list of gases mapped against their heat resistance. We use it to moderate heat damage.
var/list/gas_resist = list(
/datum/gas/nitrous_oxide = N2O_HEAT_RESISTANCE,
- /datum/gas/pluoxium = PLUOXIUM_HEAT_RESISTANCE,
/datum/gas/hydrogen = HYDROGEN_HEAT_RESISTANCE,
/datum/gas/proto_nitrate = PROTO_NITRATE_HEAT_RESISTANCE,
)
@@ -561,7 +559,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
removed.assert_gas(gasID)
//calculating gas related values
- //Wanna know a secret? See that max() to zero? it's used for error checking. If we get a mol count in the negative, we'll get a divide by zero error
+ //Wanna know a secret? See that max() to zero? it's used for error checking. If we get a mol count in the negative, we'll get a divide by zero error //Old me, you're insane
combined_gas = max(removed.total_moles(), 0)
//This is more error prevention, according to all known laws of atmos, gas_mix.remove() should never make negative mol values.
@@ -572,20 +570,16 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
//Prevents huge bursts of gas/heat when a large amount of something is introduced
//They range between 0 and 1
for(var/gasID in gases_we_care_about)
- gas_comp[gasID] += clamp(max(removed.gases[gasID][MOLES]/combined_gas, 0) - gas_comp[gasID], -1, gas_change_rate)
+ gas_comp[gasID] = clamp(removed.gases[gasID][MOLES] / combined_gas, 0, 1)
var/list/heat_mod = gases_we_care_about.Copy()
var/list/transit_mod = gases_we_care_about.Copy()
var/list/resistance_mod = gases_we_care_about.Copy()
//We're concerned about pluoxium being too easy to abuse at low percents, so we make sure there's a substantial amount.
- var/pluoxiumbonus = (gas_comp[/datum/gas/pluoxium] >= 0.15) //makes pluoxium only work at 15%+
var/h2obonus = 1 - (gas_comp[/datum/gas/water_vapor] * 0.25)//At max this value should be 0.75
var/freonbonus = (gas_comp[/datum/gas/freon] <= 0.03) //Let's just yeet power output if this shit is high
- heat_mod[/datum/gas/pluoxium] = pluoxiumbonus
- transit_mod[/datum/gas/pluoxium] = pluoxiumbonus
- resistance_mod[/datum/gas/pluoxium] = pluoxiumbonus
//No less then zero, and no greater then one, we use this to do explosions and heat to power transfer
//Be very careful with modifing this var by large amounts, and for the love of god do not push it past 1
@@ -598,7 +592,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
dynamic_heat_modifier = 0
for(var/gasID in gas_heat)
dynamic_heat_modifier += gas_comp[gasID] * gas_heat[gasID] * (isnull(heat_mod[gasID]) ? 1 : heat_mod[gasID])
- dynamic_heat_modifier *= h2obonus
dynamic_heat_modifier = max(dynamic_heat_modifier, 0.5)
//Value between 1 and 10. Effects the damage heat does to the crystal
@@ -1205,6 +1198,14 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
targets_hit = targets_hit.Copy() //Pass by ref begone
supermatter_zap(target, new_range, zap_str, zap_flags, targets_hit)
+/obj/machinery/power/supermatter_crystal/proc/destabilize(portal_numbers)
+ var/turf/turf_loc = get_turf(src)
+ if(!turf_loc)
+ return
+ explosion(turf_loc,0,round(portal_numbers/5),round(portal_numbers),1,1,1)
+ . = new/obj/machinery/destabilized_crystal(turf_loc)
+ qdel(src)
+
/obj/overlay/psy
icon = 'icons/obj/supermatter.dmi'
icon_state = "psy"
diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm
index 5ec1b412ea2..74502cfe07c 100644
--- a/code/modules/power/tesla/coil.dm
+++ b/code/modules/power/tesla/coil.dm
@@ -8,7 +8,7 @@
// Executing a traitor caught releasing tesla was never this fun!
can_buckle = TRUE
- buckle_lying = FALSE
+ buckle_lying = 0
buckle_requires_restraints = TRUE
circuit = /obj/item/circuitboard/machine/tesla_coil
@@ -109,7 +109,7 @@
density = TRUE
can_buckle = TRUE
- buckle_lying = FALSE
+ buckle_lying = 0
buckle_requires_restraints = TRUE
/obj/machinery/power/grounding_rod/default_unfasten_wrench(mob/user, obj/item/I, time = 20)
diff --git a/code/modules/procedural_mapping/mapGenerator.dm b/code/modules/procedural_mapping/mapGenerator.dm
index 5b70fee96f7..9e6767dc642 100644
--- a/code/modules/procedural_mapping/mapGenerator.dm
+++ b/code/modules/procedural_mapping/mapGenerator.dm
@@ -89,17 +89,16 @@
//Checks for and Rejects bad region coordinates
//Returns 1/0
/datum/map_generator/proc/checkRegion(turf/Start, turf/End)
- . = 1
-
if(!Start || !End)
- return 0 //Just bail
+ return FALSE //Just bail
if(Start.x > world.maxx || End.x > world.maxx)
- . = 0
+ return FALSE
if(Start.y > world.maxy || End.y > world.maxy)
- . = 0
+ return FALSE
if(Start.z > world.maxz || End.z > world.maxz)
- . = 0
+ return FALSE
+ return TRUE
//Requests the mapGeneratorModule(s) to (re)generate
@@ -153,10 +152,10 @@
return
var/endInput = input(usr,"End turf of Map (X;Y;Z)", "Map Gen Settings", "[world.maxx];[world.maxy];[mob ? mob.z : 1]") as text|null
-
+
if (isnull(endInput))
return
-
+
//maxx maxy and current z so that if you fuck up, you only fuck up one entire z level instead of the entire universe
if(!startInput || !endInput)
to_chat(src, "Missing Input")
diff --git a/code/modules/procedural_mapping/mapGeneratorModule.dm b/code/modules/procedural_mapping/mapGeneratorModule.dm
index 412a439a0ab..d5742fdb85a 100644
--- a/code/modules/procedural_mapping/mapGeneratorModule.dm
+++ b/code/modules/procedural_mapping/mapGeneratorModule.dm
@@ -105,17 +105,16 @@
//Checks and Rejects dense turfs
/datum/map_generator_module/proc/checkPlaceAtom(turf/T)
- . = 1
if(!T)
- return 0
+ return FALSE
if(T.density)
- . = 0
+ return FALSE
for(var/atom/A in T)
if(A.density)
- . = 0
- break
+ return FALSE
if(!allowAtomsOnSpace && (isspaceturf(T)))
- . = 0
+ return FALSE
+ return TRUE
///////////////////////////////////////////////////////////
diff --git a/code/modules/projectiles/boxes_magazines/internal/revolver.dm b/code/modules/projectiles/boxes_magazines/internal/revolver.dm
index 982d22493fc..62d6731f219 100644
--- a/code/modules/projectiles/boxes_magazines/internal/revolver.dm
+++ b/code/modules/projectiles/boxes_magazines/internal/revolver.dm
@@ -15,7 +15,7 @@
ammo_type = /obj/item/ammo_casing/a357
caliber = "357"
max_ammo = 6
- multiload = 0
+ multiload = FALSE
/obj/item/ammo_box/magazine/internal/rus357/Initialize()
stored_ammo += new ammo_type(src)
diff --git a/code/modules/projectiles/boxes_magazines/internal/rifle.dm b/code/modules/projectiles/boxes_magazines/internal/rifle.dm
index a7469284a5c..d4df54f75c5 100644
--- a/code/modules/projectiles/boxes_magazines/internal/rifle.dm
+++ b/code/modules/projectiles/boxes_magazines/internal/rifle.dm
@@ -4,7 +4,7 @@
ammo_type = /obj/item/ammo_casing/a762
caliber = "a762"
max_ammo = 5
- multiload = 1
+ multiload = TRUE
/obj/item/ammo_box/magazine/internal/boltaction/enchanted
max_ammo = 1
diff --git a/code/modules/projectiles/boxes_magazines/internal/shotgun.dm b/code/modules/projectiles/boxes_magazines/internal/shotgun.dm
index a8dabe744fd..2f215e7d6be 100644
--- a/code/modules/projectiles/boxes_magazines/internal/shotgun.dm
+++ b/code/modules/projectiles/boxes_magazines/internal/shotgun.dm
@@ -3,7 +3,7 @@
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
caliber = "shotgun"
max_ammo = 4
- multiload = 0
+ multiload = FALSE
/obj/item/ammo_box/magazine/internal/shot/tube
name = "dual feed shotgun internal tube"
@@ -17,7 +17,7 @@
name = "combat shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
max_ammo = 6
-
+
/obj/item/ammo_box/magazine/internal/shot/dual
name = "double-barrel shotgun internal magazine"
max_ammo = 2
diff --git a/code/modules/projectiles/guns/ballistic/laser_gatling.dm b/code/modules/projectiles/guns/ballistic/laser_gatling.dm
index 9d06483d06f..e383c692da1 100644
--- a/code/modules/projectiles/guns/ballistic/laser_gatling.dm
+++ b/code/modules/projectiles/guns/ballistic/laser_gatling.dm
@@ -12,7 +12,7 @@
slot_flags = ITEM_SLOT_BACK
w_class = WEIGHT_CLASS_HUGE
var/obj/item/gun/ballistic/minigun/gun
- var/armed = 0 //whether the gun is attached, 0 is attached, 1 is the gun is wielded.
+ var/armed = FALSE //whether the gun is attached, FALSE is attached, TRUE is the gun is wielded.
var/overheat = 0
var/overheat_max = 40
var/heat_diffusion = 1
@@ -34,9 +34,9 @@
if(src.loc == user)
if(!armed)
if(user.get_item_by_slot(ITEM_SLOT_BACK) == src)
- armed = 1
+ armed = TRUE
if(!user.put_in_hands(gun))
- armed = 0
+ armed = FALSE
to_chat(user, "You need a free hand to hold the gun!")
return
update_icon()
@@ -84,7 +84,7 @@
if(!gun)
gun = new(src)
gun.forceMove(src)
- armed = 0
+ armed = FALSE
if(user)
to_chat(user, "You attach the [gun.name] to the [name].")
else
@@ -127,7 +127,7 @@
return
/obj/item/gun/ballistic/minigun/dropped(mob/user)
- SHOULD_CALL_PARENT(0)
+ SHOULD_CALL_PARENT(FALSE)
if(ammo_pack)
ammo_pack.attach_gun(user)
else
diff --git a/code/modules/projectiles/guns/ballistic/pistol.dm b/code/modules/projectiles/guns/ballistic/pistol.dm
index 07c8699cf3e..6c981212cbb 100644
--- a/code/modules/projectiles/guns/ballistic/pistol.dm
+++ b/code/modules/projectiles/guns/ballistic/pistol.dm
@@ -87,7 +87,7 @@
icon_state = "flatgun"
/obj/item/gun/ballistic/automatic/pistol/stickman/pickup(mob/living/user)
- SHOULD_CALL_PARENT(0)
+ SHOULD_CALL_PARENT(FALSE)
to_chat(user, "As you try to pick up [src], it slips out of your grip..")
if(prob(50))
to_chat(user, "..and vanishes from your vision! Where the hell did it go?")
diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm
index 8b25b0a64a3..7c0eef63b7e 100644
--- a/code/modules/projectiles/guns/ballistic/revolver.dm
+++ b/code/modules/projectiles/guns/ballistic/revolver.dm
@@ -91,7 +91,7 @@
"The Peacemaker" = "detective_peacemaker",
"Black Panther" = "detective_panther"
)
-
+
/// Used to avoid some redundancy on a revolver loaded with 357 regarding misfiring while being wrenched.
var/skip_357_missfire_check = FALSE
@@ -250,7 +250,7 @@
user.visible_message("[user.name]'s soul is captured by \the [src]!", "You've lost the gamble! Your soul is forfeit!")
/obj/item/gun/ballistic/revolver/reverse //Fires directly at its user... unless the user is a clown, of course.
- clumsy_check = 0
+ clumsy_check = FALSE
/obj/item/gun/ballistic/revolver/reverse/can_trigger_gun(mob/living/user)
if((HAS_TRAIT(user, TRAIT_CLUMSY)) || (user.mind && user.mind.assigned_role == "Clown"))
diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm
index d19f3b534f2..4f77d37f687 100644
--- a/code/modules/projectiles/guns/ballistic/shotgun.dm
+++ b/code/modules/projectiles/guns/ballistic/shotgun.dm
@@ -227,7 +227,7 @@
. = ..()
if(. && slung) //sawing off the gun removes the sling
new /obj/item/stack/cable_coil(get_turf(src), 10)
- slung = 0
+ slung = FALSE
update_icon()
lefthand_file = 'icons/mob/inhands/weapons/64x_guns_left.dmi'
righthand_file = 'icons/mob/inhands/weapons/64x_guns_right.dmi'
diff --git a/code/modules/projectiles/guns/ballistic/toy.dm b/code/modules/projectiles/guns/ballistic/toy.dm
index feb29e8cf70..ffdad6d584c 100644
--- a/code/modules/projectiles/guns/ballistic/toy.dm
+++ b/code/modules/projectiles/guns/ballistic/toy.dm
@@ -10,7 +10,7 @@
throwforce = 0
burst_size = 3
can_suppress = TRUE
- clumsy_check = 0
+ clumsy_check = FALSE
item_flags = NONE
casing_ejector = FALSE
diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm
index f383c07789a..397f8b8c51c 100644
--- a/code/modules/projectiles/guns/energy/laser.dm
+++ b/code/modules/projectiles/guns/energy/laser.dm
@@ -13,7 +13,7 @@
name = "practice laser gun"
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
ammo_type = list(/obj/item/ammo_casing/energy/laser/practice)
- clumsy_check = 0
+ clumsy_check = FALSE
item_flags = NONE
/obj/item/gun/energy/laser/retro
diff --git a/code/modules/projectiles/guns/misc/medbeam.dm b/code/modules/projectiles/guns/misc/medbeam.dm
index 0e9658bcba5..ef7bef4b209 100644
--- a/code/modules/projectiles/guns/misc/medbeam.dm
+++ b/code/modules/projectiles/guns/misc/medbeam.dm
@@ -10,7 +10,7 @@
var/last_check = 0
var/check_delay = 10 //Check los as often as possible, max resolution is SSobj tick though
var/max_range = 8
- var/active = 0
+ var/active = FALSE
var/datum/beam/current_beam = null
var/mounted = 0 //Denotes if this is a handheld or mounted version
@@ -37,7 +37,7 @@
if(active)
qdel(current_beam)
current_beam = null
- active = 0
+ active = FALSE
on_beam_release(current_target)
current_target = null
@@ -87,7 +87,7 @@
if(mounted)
user_turf = get_turf(user)
else if(!istype(user_turf))
- return 0
+ return FALSE
var/obj/dummy = new(user_turf)
dummy.pass_flags |= PASSTABLE|PASSGLASS|PASSGRILLE //Grille/Glass so it can be used through common windows
for(var/turf/turf in getline(user_turf,target))
@@ -95,18 +95,18 @@
continue //Mechs are dense and thus fail the check
if(turf.density)
qdel(dummy)
- return 0
+ return FALSE
for(var/atom/movable/AM in turf)
if(!AM.CanPass(dummy,turf,1))
qdel(dummy)
- return 0
+ return FALSE
for(var/obj/effect/ebeam/medical/B in turf)// Don't cross the str-beams!
if(B.owner.origin != current_beam.origin)
explosion(B.loc,0,3,5,8)
qdel(dummy)
- return 0
+ return FALSE
qdel(dummy)
- return 1
+ return TRUE
/obj/item/gun/medbeam/proc/on_beam_hit(mob/living/target)
return
@@ -128,7 +128,7 @@
//////////////////////////////Mech Version///////////////////////////////
/obj/item/gun/medbeam/mech
- mounted = 1
+ mounted = TRUE
/obj/item/gun/medbeam/mech/Initialize()
. = ..()
diff --git a/code/modules/projectiles/guns/misc/syringe_gun.dm b/code/modules/projectiles/guns/misc/syringe_gun.dm
index 2503b01d969..56b846034b3 100644
--- a/code/modules/projectiles/guns/misc/syringe_gun.dm
+++ b/code/modules/projectiles/guns/misc/syringe_gun.dm
@@ -8,7 +8,7 @@
throw_range = 7
force = 4
custom_materials = list(/datum/material/iron=2000)
- clumsy_check = 0
+ clumsy_check = FALSE
fire_sound = 'sound/items/syringeproj.ogg'
var/load_sound = 'sound/weapons/gun/shotgun/insert_shell.ogg'
var/list/syringes = list()
@@ -44,7 +44,7 @@
/obj/item/gun/syringe/attack_self(mob/living/user)
if(!syringes.len)
to_chat(user, "[src] is empty!")
- return 0
+ return FALSE
var/obj/item/reagent_containers/syringe/S = syringes[syringes.len]
diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm
index e0fe135ddab..1876763e2c2 100644
--- a/code/modules/projectiles/pins.dm
+++ b/code/modules/projectiles/pins.dm
@@ -10,9 +10,9 @@
attack_verb_continuous = list("pokes")
attack_verb_simple = list("poke")
var/fail_message = "INVALID USER."
- var/selfdestruct = 0 // Explode when user check is failed.
- var/force_replace = 0 // Can forcefully replace other pins.
- var/pin_removeable = 0 // Can be replaced by any pin.
+ var/selfdestruct = FALSE // Explode when user check is failed.
+ var/force_replace = FALSE // Can forcefully replace other pins.
+ var/pin_removeable = FALSE // Can be replaced by any pin.
var/obj/item/gun/gun
/obj/item/firing_pin/New(newloc)
diff --git a/code/modules/projectiles/projectile/special/rocket.dm b/code/modules/projectiles/projectile/special/rocket.dm
index 577a87fc8f0..defd84f1b40 100644
--- a/code/modules/projectiles/projectile/special/rocket.dm
+++ b/code/modules/projectiles/projectile/special/rocket.dm
@@ -24,7 +24,7 @@
explosion(target, -1, 1, 3, 1, 0, flame_range = 4)
if(ismecha(target))
- var/obj/mecha/M = target
+ var/obj/vehicle/sealed/mecha/M = target
M.take_damage(anti_armour_damage)
if(issilicon(target))
var/mob/living/silicon/S = target
@@ -56,7 +56,7 @@
embedding = null
var/sturdy = list(
/turf/closed,
- /obj/mecha,
+ /obj/vehicle/sealed/mecha,
/obj/machinery/door/,
/obj/machinery/door/poddoor/shutters
)
diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm
index 07793fe5c48..ef4a424ee20 100644
--- a/code/modules/reagents/chemistry/holder.dm
+++ b/code/modules/reagents/chemistry/holder.dm
@@ -371,7 +371,7 @@
if(can_overdose)
if(R.overdose_threshold)
if(R.volume >= R.overdose_threshold && !R.overdosed)
- R.overdosed = 1
+ R.overdosed = TRUE
need_mob_update += R.overdose_start(C)
log_game("[key_name(C)] has started overdosing on [R.name] at [R.volume] units.")
if(R.addiction_threshold)
@@ -582,7 +582,6 @@
while(reaction_occurred)
update_total()
- return 0
/// Remove every reagent except this one
/datum/reagents/proc/isolate_reagent(reagent)
@@ -625,7 +624,6 @@
else
total_volume += R.volume
- return 0
/// Removes all reagents
/datum/reagents/proc/clear_reagents()
@@ -635,7 +633,6 @@
del_reagent(R.type)
if(my_atom)
my_atom.on_reagent_change(CLEAR_REAGENTS)
- return 0
/**
* Applies the relevant expose_ proc for every reagent in this holder
@@ -817,17 +814,14 @@ Needs matabolizing takes into consideration if the chemical is matabolizing when
if (R.type == reagent)
if(!amount)
if(needs_metabolizing && !R.metabolizing)
- return 0
+ return FALSE
return R
else
if(round(R.volume, CHEMICAL_QUANTISATION_LEVEL) >= amount)
if(needs_metabolizing && !R.metabolizing)
- return 0
+ return FALSE
return R
- else
- return 0
-
- return 0
+ return FALSE
/// Get the amount of this reagent
/datum/reagents/proc/get_reagent_amount(reagent)
@@ -836,7 +830,6 @@ Needs matabolizing takes into consideration if the chemical is matabolizing when
var/datum/reagent/R = _reagent
if (R.type == reagent)
return round(R.volume, CHEMICAL_QUANTISATION_LEVEL)
-
return 0
/// Get a comma separated string of every reagent name in this holder
diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm
index 3f25609be11..7f722b9eae1 100644
--- a/code/modules/reagents/chemistry/reagents.dm
+++ b/code/modules/reagents/chemistry/reagents.dm
@@ -61,7 +61,7 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
/// increases as addiction gets worse
var/addiction_stage = 0
/// You fucked up and this is now triggering its overdose effects, purge that shit quick.
- var/overdosed = 0
+ var/overdosed = FALSE
///if false stops metab in liverless mobs
var/self_consuming = FALSE
///affects how far it travels when sprayed
@@ -96,14 +96,14 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
/// Applies this reagent to a [/mob/living]
/datum/reagent/proc/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message = 1, touch_protection = 0)
if(!istype(M))
- return 0
+ return FALSE
if(methods & VAPOR) //smoke, foam, spray
if(M.reagents)
var/modifier = clamp((1 - touch_protection), 0, 1)
var/amount = round(reac_volume*modifier, 0.1)
if(amount >= 0.5)
M.reagents.add_reagent(type, amount)
- return 1
+ return TRUE
/// Applies this reagent to an [/obj]
/datum/reagent/proc/expose_obj(obj/O, volume)
diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm
index 3afae78b534..295a1da9dcf 100644
--- a/code/modules/reagents/reagent_containers.dm
+++ b/code/modules/reagents/reagent_containers.dm
@@ -50,7 +50,7 @@
/obj/item/reagent_containers/proc/canconsume(mob/eater, mob/user)
if(!iscarbon(eater))
- return 0
+ return FALSE
var/mob/living/carbon/C = eater
var/covered = ""
if(C.is_mouth_covered(head_only = 1))
@@ -60,8 +60,8 @@
if(covered)
var/who = (isnull(user) || eater == user) ? "your" : "[eater.p_their()]"
to_chat(user, "You have to remove [who] [covered] first!")
- return 0
- return 1
+ return FALSE
+ return TRUE
/*
* On accidental consumption, transfer a portion of the reagents to the eater and the item it's in, then continue to the base proc (to deal with shattering glass containers)
diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm
index 4a9d8b9765b..e6290be99eb 100644
--- a/code/modules/reagents/reagent_containers/hypospray.dm
+++ b/code/modules/reagents/reagent_containers/hypospray.dm
@@ -12,7 +12,7 @@
resistance_flags = ACID_PROOF
reagent_flags = OPENCONTAINER
slot_flags = ITEM_SLOT_BELT
- var/ignore_flags = 0
+ var/ignore_flags = NONE
var/infinite = FALSE
/obj/item/reagent_containers/hypospray/attack_paw(mob/user)
diff --git a/code/modules/reagents/reagent_containers/patch.dm b/code/modules/reagents/reagent_containers/patch.dm
index 0642313f5b5..d04dd3ad0d6 100644
--- a/code/modules/reagents/reagent_containers/patch.dm
+++ b/code/modules/reagents/reagent_containers/patch.dm
@@ -24,8 +24,8 @@
/obj/item/reagent_containers/pill/patch/canconsume(mob/eater, mob/user)
if(!iscarbon(eater))
- return 0
- return 1 // Masks were stopping people from "eating" patches. Thanks, inheritance.
+ return FALSE
+ return TRUE // Masks were stopping people from "eating" patches. Thanks, inheritance.
/obj/item/reagent_containers/pill/patch/libital
name = "libital patch (brute)"
diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm
index f3b97ea39db..9a034485da7 100644
--- a/code/modules/recycling/disposal/bin.dm
+++ b/code/modules/recycling/disposal/bin.dm
@@ -491,7 +491,7 @@
/obj/effect/CanEnterDisposals()
return
-/obj/mecha/CanEnterDisposals()
+/obj/vehicle/sealed/mecha/CanEnterDisposals()
return
/obj/machinery/disposal/bin/newHolderDestination(obj/structure/disposalholder/H)
diff --git a/code/modules/research/designs/stock_parts_designs.dm b/code/modules/research/designs/stock_parts_designs.dm
index ad9c51e8b14..699f0ac5035 100644
--- a/code/modules/research/designs/stock_parts_designs.dm
+++ b/code/modules/research/designs/stock_parts_designs.dm
@@ -370,3 +370,13 @@
materials = list(/datum/material/iron=50, /datum/material/glass=10)
build_path = /obj/item/stock_parts/card_reader
category = list("Stock Parts")
+
+/datum/design/water_recycler
+ name = "Water Recycler"
+ desc = "A small hydrostatic reclaimer, it takes moisture out of the air and returns it back to the source."
+ id = "w-recycler"
+ build_type = PROTOLATHE | AUTOLATHE
+ materials = list(/datum/material/plastic = 200, /datum/material/iron = 50)
+ build_path = /obj/item/stock_parts/water_recycler
+ category = list("Stock Parts")
+ departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_MEDICAL
diff --git a/code/modules/research/designs/tool_designs.dm b/code/modules/research/designs/tool_designs.dm
index 9c9a7240658..1b0a48167c9 100644
--- a/code/modules/research/designs/tool_designs.dm
+++ b/code/modules/research/designs/tool_designs.dm
@@ -113,6 +113,16 @@
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
+/datum/design/crystal_stabilizer
+ name = "Supermatter Matrix Stabilizer"
+ desc = "A tool that is used to restore the stability of the Crystal Matrix by injecting it with the anomaly liquid"
+ id = "crystal_stabilizer"
+ build_path = /obj/item/crystal_stabilizer
+ build_type = PROTOLATHE
+ materials = list(/datum/material/iron = 3000, /datum/material/glass = 4500, /datum/material/silver = 2500)
+ category = list("Tool Designs")
+ departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
+
/datum/design/plumbing_rcd_sci
name = "Research Plumbing Constructor"
id = "plumbing_rcd_sci"
diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm
index 072a4107958..9423cabdef2 100644
--- a/code/modules/research/techweb/all_nodes.dm
+++ b/code/modules/research/techweb/all_nodes.dm
@@ -56,7 +56,7 @@
starting_node = TRUE
display_name = "Basic Medical Equipment"
description = "Basic medical tools and equipment."
- design_ids = list("cybernetic_liver", "cybernetic_heart", "cybernetic_lungs","cybernetic_stomach", "scalpel", "circular_saw", "bonesetter", "surgicaldrill", "retractor", "cautery", "hemostat", "stethoscope",
+ design_ids = list("cybernetic_liver", "cybernetic_heart", "cybernetic_lungs","cybernetic_stomach", "scalpel", "circular_saw", "bonesetter", "surgicaldrill", "retractor", "cautery", "hemostat", "stethoscope",
"surgical_drapes", "syringe", "plumbing_rcd", "beaker", "large_beaker", "xlarge_beaker", "dropper", "defibmountdefault", "surgical_tape", "portable_chem_mixer")
/////////////////////////Biotech/////////////////////////
@@ -134,7 +134,7 @@
display_name = "Industrial Engineering"
description = "A refresher course on modern engineering technology."
prereq_ids = list("base")
- design_ids = list("solarcontrol", "recharger", "powermonitor", "rped", "pacman", "adv_capacitor", "adv_scanning", "emitter", "high_cell", "adv_matter_bin", "scanner_gate",
+ design_ids = list("solarcontrol", "recharger", "powermonitor", "rped", "pacman", "adv_capacitor", "adv_scanning", "w-recycler" , "emitter", "high_cell", "adv_matter_bin", "scanner_gate",
"atmosalerts", "atmos_control", "recycler", "autolathe", "high_micro_laser", "nano_mani", "mesons", "welding_goggles", "thermomachine", "rad_collector", "tesla_coil", "grounding_rod",
"apc_control", "cell_charger", "power control", "airlock_board", "firelock_board", "airalarm_electronics", "firealarm_electronics", "cell_charger", "stack_console", "stack_machine",
"oxygen_tank", "plasma_tank", "emergency_oxygen", "emergency_oxygen_engi", "plasmaman_tank_belt", "electrolyzer", "adv_electrolite")
@@ -153,7 +153,7 @@
display_name = "Anomaly Research"
description = "Unlock the potential of the mysterious anomalies that appear on station."
prereq_ids = list("adv_engi", "practical_bluespace")
- design_ids = list("reactive_armour", "anomaly_neutralizer")
+ design_ids = list("reactive_armour", "anomaly_neutralizer", "crystal_stabilizer")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000)
/datum/techweb_node/high_efficiency
diff --git a/code/modules/research/xenobiology/crossbreeding/_weapons.dm b/code/modules/research/xenobiology/crossbreeding/_weapons.dm
index 0c09186a29a..e67a36b326c 100644
--- a/code/modules/research/xenobiology/crossbreeding/_weapons.dm
+++ b/code/modules/research/xenobiology/crossbreeding/_weapons.dm
@@ -100,7 +100,7 @@ Slimecrossing Weapons
/obj/item/gun/magic/bloodchill/process()
charge_tick++
if(charge_tick < recharge_rate || charges >= max_charges)
- return 0
+ return FALSE
charge_tick = 0
var/mob/living/M = loc
if(istype(M) && M.blood_volume >= 20)
@@ -108,7 +108,7 @@ Slimecrossing Weapons
M.blood_volume -= 20
if(charges == 1)
recharge_newshot()
- return 1
+ return TRUE
/obj/item/ammo_casing/magic/bloodchill
projectile_type = /obj/projectile/magic/bloodchill
diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm
index 4bb11af9000..43ec37a5d4f 100644
--- a/code/modules/research/xenobiology/xenobiology.dm
+++ b/code/modules/research/xenobiology/xenobiology.dm
@@ -56,7 +56,7 @@
*/
/obj/item/slime_extract/proc/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
to_chat(user, "Nothing happened... This slime extract cannot be activated this way.")
- return 0
+ return FALSE
/**
* Core-crossing: Feeding adult slimes extracts to obtain a much more powerful, single extract.
diff --git a/code/modules/security_levels/keycard_authentication.dm b/code/modules/security_levels/keycard_authentication.dm
index bd424474a98..1c17412d270 100644
--- a/code/modules/security_levels/keycard_authentication.dm
+++ b/code/modules/security_levels/keycard_authentication.dm
@@ -20,7 +20,7 @@ GLOBAL_DATUM_INIT(keycard_events, /datum/events, new)
var/event = ""
var/obj/machinery/keycard_auth/event_source
var/mob/triggerer = null
- var/waiting = 0
+ var/waiting = FALSE
/obj/machinery/keycard_auth/Initialize()
. = ..()
@@ -82,14 +82,14 @@ GLOBAL_DATUM_INIT(keycard_events, /datum/events, new)
/obj/machinery/keycard_auth/proc/sendEvent(event_type)
triggerer = usr
event = event_type
- waiting = 1
+ waiting = TRUE
GLOB.keycard_events.fireEvent("triggerEvent", src)
addtimer(CALLBACK(src, .proc/eventSent), 20)
/obj/machinery/keycard_auth/proc/eventSent()
triggerer = null
event = ""
- waiting = 0
+ waiting = FALSE
/obj/machinery/keycard_auth/proc/triggerEvent(source)
icon_state = "auth_on"
diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm
index bd22f7ec20b..f1773c166ae 100644
--- a/code/modules/shuttle/supply.dm
+++ b/code/modules/shuttle/supply.dm
@@ -206,7 +206,7 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list(
continue
if(bounty_ship_item_and_contents(AM, dry_run = FALSE))
matched_bounty = TRUE
- if(!AM.anchored || istype(AM, /obj/mecha))
+ if(!AM.anchored || istype(AM, /obj/vehicle/sealed/mecha))
export_item_and_contents(AM, export_categories , dry_run = FALSE, external_report = ex)
if(ex.exported_atoms)
diff --git a/code/modules/shuttle/white_ship.dm b/code/modules/shuttle/white_ship.dm
index 66146edea1e..4477489aaad 100644
--- a/code/modules/shuttle/white_ship.dm
+++ b/code/modules/shuttle/white_ship.dm
@@ -51,6 +51,6 @@
/obj/effect/spawner/lootdrop/whiteship_cere_ripley
name = "25% mech 75% wreckage ripley spawner"
- loot = list(/obj/mecha/working/ripley/mining = 1,
+ loot = list(/obj/vehicle/sealed/mecha/working/ripley/mining = 1,
/obj/structure/mecha_wreckage/ripley = 5)
lootdoubles = FALSE
diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm
index be258176dcf..2880d3cd9df 100644
--- a/code/modules/spells/spell.dm
+++ b/code/modules/spells/spell.dm
@@ -506,8 +506,8 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
/obj/effect/proc_holder/spell/proc/can_be_cast_by(mob/caster)
if((human_req || clothes_req) && !ishuman(caster))
- return 0
- return 1
+ return FALSE
+ return TRUE
/obj/effect/proc_holder/spell/targeted/proc/los_check(mob/A,mob/B)
//Checks for obstacles from A to B
@@ -517,9 +517,9 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
for(var/atom/movable/AM in turf)
if(!AM.CanPass(dummy,turf,1))
qdel(dummy)
- return 0
+ return FALSE
qdel(dummy)
- return 1
+ return TRUE
/obj/effect/proc_holder/spell/proc/can_cast(mob/user = usr)
if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.mob_spell_list))
diff --git a/code/modules/surgery/cavity_implant.dm b/code/modules/surgery/cavity_implant.dm
index e81dea83bb8..a65297a5f98 100644
--- a/code/modules/surgery/cavity_implant.dm
+++ b/code/modules/surgery/cavity_implant.dm
@@ -36,7 +36,7 @@
if(tool)
if(IC || tool.w_class > WEIGHT_CLASS_NORMAL || HAS_TRAIT(tool, TRAIT_NODROP) || istype(tool, /obj/item/organ))
to_chat(user, "You can't seem to fit [tool] in [target]'s [target_zone]!")
- return 0
+ return FALSE
else
display_results(user, target, "You stuff [tool] into [target]'s [target_zone].",
"[user] stuffs [tool] into [target]'s [target_zone]!",
@@ -54,4 +54,4 @@
return ..()
else
to_chat(user, "You don't find anything in [target]'s [target_zone].")
- return 0
+ return FALSE
diff --git a/code/modules/surgery/organ_manipulation.dm b/code/modules/surgery/organ_manipulation.dm
index 47820c366a6..829a74b6225 100644
--- a/code/modules/surgery/organ_manipulation.dm
+++ b/code/modules/surgery/organ_manipulation.dm
@@ -153,4 +153,4 @@
display_results(user, target, "You can't extract anything from [target]'s [parse_zone(target_zone)]!",
"[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!",
"[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!")
- return 0
+ return FALSE
diff --git a/code/modules/surgery/organs/augments_chest.dm b/code/modules/surgery/organs/augments_chest.dm
index b7edd798ca8..f2f2b1ec6ed 100644
--- a/code/modules/surgery/organs/augments_chest.dm
+++ b/code/modules/surgery/organs/augments_chest.dm
@@ -149,7 +149,7 @@
if((organ_flags & ORGAN_FAILING))
if(!silent)
to_chat(owner, "Your thrusters set seems to be broken!")
- return 0
+ return FALSE
if(allow_thrust(0.01))
on = TRUE
ion_trail.start()
diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm
index fb4f80f0d1c..cadd8e2d982 100644
--- a/code/modules/surgery/organs/organ_internal.dm
+++ b/code/modules/surgery/organs/organ_internal.dm
@@ -35,13 +35,13 @@
if(organ_flags & ORGAN_EDIBLE)
AddComponent(/datum/component/edible, food_reagents, null, RAW | MEAT | GROSS, null, 10, null, null, null, CALLBACK(src, .proc/OnEatFrom))
-/obj/item/organ/proc/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
+/obj/item/organ/proc/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
if(!iscarbon(M) || owner == M)
return
var/obj/item/organ/replaced = M.getorganslot(slot)
if(replaced)
- replaced.Remove(M, special = 1)
+ replaced.Remove(M, special = TRUE)
if(drop_if_replaced)
replaced.forceMove(get_turf(M))
else
diff --git a/code/modules/surgery/prosthetic_replacement.dm b/code/modules/surgery/prosthetic_replacement.dm
index 97c1e983db4..951ad2fae1d 100644
--- a/code/modules/surgery/prosthetic_replacement.dm
+++ b/code/modules/surgery/prosthetic_replacement.dm
@@ -8,10 +8,11 @@
/datum/surgery/prosthetic_replacement/can_start(mob/user, mob/living/carbon/target)
if(!iscarbon(target))
- return 0
+ return FALSE
var/mob/living/carbon/C = target
if(!C.get_bodypart(user.zone_selected)) //can only start if limb is missing
- return 1
+ return TRUE
+ return FALSE
diff --git a/code/modules/surgery/surgery_helpers.dm b/code/modules/surgery/surgery_helpers.dm
index 71106d66ddc..881dd89e0ff 100644
--- a/code/modules/surgery/surgery_helpers.dm
+++ b/code/modules/surgery/surgery_helpers.dm
@@ -32,42 +32,42 @@
switch(location)
if(BODY_ZONE_HEAD)
if(covered_locations & HEAD)
- return 0
+ return FALSE
if(BODY_ZONE_PRECISE_EYES)
if(covered_locations & HEAD || face_covered & HIDEEYES || eyesmouth_covered & GLASSESCOVERSEYES)
- return 0
+ return FALSE
if(BODY_ZONE_PRECISE_MOUTH)
if(covered_locations & HEAD || face_covered & HIDEFACE || eyesmouth_covered & MASKCOVERSMOUTH || eyesmouth_covered & HEADCOVERSMOUTH)
- return 0
+ return FALSE
if(BODY_ZONE_CHEST)
if(covered_locations & CHEST)
- return 0
+ return FALSE
if(BODY_ZONE_PRECISE_GROIN)
if(covered_locations & GROIN)
- return 0
+ return FALSE
if(BODY_ZONE_L_ARM)
if(covered_locations & ARM_LEFT)
- return 0
+ return FALSE
if(BODY_ZONE_R_ARM)
if(covered_locations & ARM_RIGHT)
- return 0
+ return FALSE
if(BODY_ZONE_L_LEG)
if(covered_locations & LEG_LEFT)
- return 0
+ return FALSE
if(BODY_ZONE_R_LEG)
if(covered_locations & LEG_RIGHT)
- return 0
+ return FALSE
if(BODY_ZONE_PRECISE_L_HAND)
if(covered_locations & HAND_LEFT)
- return 0
+ return FALSE
if(BODY_ZONE_PRECISE_R_HAND)
if(covered_locations & HAND_RIGHT)
- return 0
+ return FALSE
if(BODY_ZONE_PRECISE_L_FOOT)
if(covered_locations & FOOT_LEFT)
- return 0
+ return FALSE
if(BODY_ZONE_PRECISE_R_FOOT)
if(covered_locations & FOOT_RIGHT)
- return 0
+ return FALSE
- return 1
+ return TRUE
diff --git a/code/modules/swarmers/swarmer_objs.dm b/code/modules/swarmers/swarmer_objs.dm
index ee56aff87f8..a7a657c1620 100644
--- a/code/modules/swarmers/swarmer_objs.dm
+++ b/code/modules/swarmers/swarmer_objs.dm
@@ -16,7 +16,7 @@
. = ..()
set_light(glow_range)
-/obj/structure/swarmer/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = NONE)
+/obj/structure/swarmer/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
playsound(src, 'sound/weapons/egloves.ogg', 80, TRUE)
diff --git a/code/modules/tgs/v5/api.dm b/code/modules/tgs/v5/api.dm
index 3cd47ec1a6c..524ca1a3c3a 100644
--- a/code/modules/tgs/v5/api.dm
+++ b/code/modules/tgs/v5/api.dm
@@ -15,8 +15,10 @@
var/datum/tgs_revision_information/revision
var/list/chat_channels
+ var/initialized = FALSE
+
/datum/tgs_api/v5/ApiVersion()
- return new /datum/tgs_version("5.2.3")
+ return new /datum/tgs_version("5.2.4")
/datum/tgs_api/v5/OnWorldNew(minimum_required_security_level)
server_port = world.params[DMAPI5_PARAM_SERVER_PORT]
@@ -79,6 +81,7 @@
chat_channels = list()
DecodeChannels(runtime_information)
+ initialized = TRUE
return TRUE
/datum/tgs_api/v5/proc/RequireInitialBridgeResponse()
@@ -95,10 +98,13 @@
return json_encode(response)
/datum/tgs_api/v5/OnTopic(T)
+ if(!initialized)
+ return FALSE //continue world/Topic
+
var/list/params = params2list(T)
var/json = params[DMAPI5_TOPIC_DATA]
if(!json)
- return FALSE //continue world/Topic
+ return FALSE
var/list/topic_parameters = json_decode(json)
if(!topic_parameters)
diff --git a/code/modules/tooltip/tooltip.dm b/code/modules/tooltip/tooltip.dm
index ab7dc917395..d06131801de 100644
--- a/code/modules/tooltip/tooltip.dm
+++ b/code/modules/tooltip/tooltip.dm
@@ -51,7 +51,7 @@ Notes:
/datum/tooltip/proc/show(atom/movable/thing, params = null, title = null, content = null, theme = "default", special = "none")
if (!thing || !params || (!title && !content) || !owner || !isnum(world.icon_size))
- return 0
+ return FALSE
if (!init)
//Initialize some vars
init = 1
@@ -83,7 +83,7 @@ Notes:
if (queueHide)
hide()
- return 1
+ return TRUE
/datum/tooltip/proc/hide()
diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm
index b9dbc374ce4..4d15bcf0d32 100644
--- a/code/modules/uplink/uplink_items.dm
+++ b/code/modules/uplink/uplink_items.dm
@@ -1148,13 +1148,13 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
name = "Dark Gygax Exosuit"
desc = "A lightweight exosuit, painted in a dark scheme. Its speed and equipment selection make it excellent \
for hit-and-run style attacks. Features an incendiary carbine, flash bang launcher, teleporter, ion thrusters and a Tesla energy array."
- item = /obj/mecha/combat/gygax/dark/loaded
+ item = /obj/vehicle/sealed/mecha/combat/gygax/dark/loaded
cost = 80
/datum/uplink_item/support/honker
name = "Dark H.O.N.K."
desc = "A clown combat mech equipped with bombanana peel and tearstache grenade launchers, as well as the ubiquitous HoNkER BlAsT 5000."
- item = /obj/mecha/combat/honker/dark/loaded
+ item = /obj/vehicle/sealed/mecha/combat/honker/dark/loaded
cost = 80
include_modes = list(/datum/game_mode/nuclear/clown_ops)
@@ -1162,7 +1162,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
name = "Mauler Exosuit"
desc = "A massive and incredibly deadly military-grade exosuit. Features long-range targeting, thrust vectoring \
and deployable smoke. Comes equipped with an LMG, scattershot carbine, missile rack, an antiprojectile armor booster and a Tesla energy array."
- item = /obj/mecha/combat/marauder/mauler/loaded
+ item = /obj/vehicle/sealed/mecha/combat/marauder/mauler/loaded
cost = 140
// Stealth Items
diff --git a/code/modules/vehicles/_vehicle.dm b/code/modules/vehicles/_vehicle.dm
index 2c54bf605cc..293a9567540 100644
--- a/code/modules/vehicles/_vehicle.dm
+++ b/code/modules/vehicles/_vehicle.dm
@@ -7,6 +7,7 @@
armor = list(MELEE = 30, BULLET = 30, LASER = 30, ENERGY = 0, BOMB = 30, BIO = 0, RAD = 0, FIRE = 60, ACID = 60)
density = TRUE
anchored = FALSE
+ COOLDOWN_DECLARE(cooldown_vehicle_move)
var/list/mob/occupants //mob = bitflags of their control level.
var/max_occupants = 1
var/max_drivers = 1
@@ -124,9 +125,9 @@
return TRUE
/obj/vehicle/proc/vehicle_move(direction)
- if(lastmove + movedelay > world.time)
+ if(!COOLDOWN_FINISHED(src, cooldown_vehicle_move))
return FALSE
- lastmove = world.time
+ COOLDOWN_START(src, cooldown_vehicle_move, movedelay)
if(trailer)
var/dir_to_move = get_dir(trailer.loc, loc)
var/did_move = step(src, direction)
diff --git a/code/game/mecha/mecha.dm b/code/modules/vehicles/mecha/_mecha.dm
similarity index 50%
rename from code/game/mecha/mecha.dm
rename to code/modules/vehicles/mecha/_mecha.dm
index 1eda8681fe7..34bebd2bb27 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/modules/vehicles/mecha/_mecha.dm
@@ -1,137 +1,183 @@
-/obj/mecha
+//////////////////WELCOME TO MECHA.DM, ENJOY YOUR STAY\\\\\\\\\\\\\\\\\
+
+/**
+ * Mechs are now (finally) vehicles, this means you can make them multicrew
+ * They can also grant select ability buttons based on occupant bitflags
+ *
+ * Movement is handled through vehicle_move() which is called by relaymove
+ * Clicking is done by way of signals registering to the entering mob
+ * NOTE: MMIS are NOT mobs but instead contain a brain that is, so you need special checks
+ * AI also has special checks becaus it gets in and out of the mech differently
+ * Always call remove_occupant(mob) when leaving the mech so the mob is removed properly
+ *
+ * For multi-crew, you need to set how the occupants recieve ability bitflags corresponding to their status on the vehicle(i.e: driver, gunner etc)
+ * Abilities can then be set to only apply for certain bitflags and are assigned as such automatically
+ *
+ * Clicks are wither translated into mech_melee_attack (see mech_melee_attack.dm)
+ * Or are used to call action() on equipped gear
+ * Cooldown for gear is on the mech because exploits
+ */
+/obj/vehicle/sealed/mecha
name = "mecha"
desc = "Exosuit"
icon = 'icons/mecha/mecha.dmi'
- density = TRUE //Dense. To raise the heat.
- move_force = MOVE_FORCE_VERY_STRONG
- move_resist = MOVE_FORCE_EXTREMELY_STRONG
resistance_flags = FIRE_PROOF | ACID_PROOF
- layer = BELOW_MOB_LAYER//icon draw layer
- infra_luminosity = 15 //byond implementation is bugged.
- force = 5
flags_1 = HEAR_1
+ max_integrity = 300
+ armor = list(MELEE = 20, BULLET = 10, LASER = 0, ENERGY = 0, BOMB = 10, BIO = 0, RAD = 0, FIRE = 100, ACID = 100)
+ movedelay = 1 SECONDS
+ anchored = TRUE
+ emulate_door_bumps = TRUE
+ COOLDOWN_DECLARE(mecha_bump_smash)
light_system = MOVABLE_LIGHT
light_on = FALSE
- var/ruin_mecha = FALSE //if the mecha starts on a ruin, don't automatically give it a tracking beacon to prevent metagaming.
- var/can_move = 0 //time of next allowed movement
- var/mob/living/carbon/occupant = null
- var/step_in = 10 //make a step in step_in/10 sec.
- var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South.
- var/normal_step_energy_drain = 10 //How much energy the mech will consume each time it moves. This variable is a backup for when leg actuators affect the energy drain.
+ ///What direction will the mech face when entered/powered on? Defaults to South.
+ var/dir_in = SOUTH
+ ///How much energy the mech will consume each time it moves. This variable is a backup for when leg actuators affect the energy drain.
+ var/normal_step_energy_drain = 10
+ ///How much energy the mech will consume each time it moves. this is the current active energy consumed
var/step_energy_drain = 10
+ ///How much energy we drain each time we mechpunch someone
var/melee_energy_drain = 15
+ ///The minimum amount of energy charge consumed by leg overload
var/overload_step_energy_drain_min = 100
- max_integrity = 300 //max_integrity is base health
- var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act.
- armor = list(MELEE = 20, BULLET = 10, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 100)
+ ///chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act.
+ var/deflect_chance = 10
+ ///Modifiers for directional armor
var/list/facing_modifiers = list(MECHA_FRONT_ARMOUR = 1.5, MECHA_SIDE_ARMOUR = 1, MECHA_BACK_ARMOUR = 0.5)
- var/equipment_disabled = 0 //disabled due to EMP
+ ///if we cant use our equipment(such as due to EMP)
+ var/equipment_disabled = FALSE
/// Keeps track of the mech's cell
var/obj/item/stock_parts/cell/cell
/// Keeps track of the mech's scanning module
var/obj/item/stock_parts/scanning_module/scanmod
/// Keeps track of the mech's capacitor
var/obj/item/stock_parts/capacitor/capacitor
+ ///Whether the mechs maintenance protocols are on or off
var/construction_state = MECHA_LOCKED
- var/last_message = 0
- var/add_req_access = 1
- var/maint_access = 0
- var/dna_lock //dna-locking the mech
- var/list/proc_res = list() //stores proc owners, like proc_res["functionname"] = owner reference
+ ///Contains flags for the mecha
+ var/mecha_flags = ADDING_ACCESS_POSSIBLE | CANSTRAFE | IS_ENCLOSED | HAS_LIGHTS
+ ///Stores the DNA enzymes of a carbon so tht only they can access the mech
+ var/dna_lock
+ ///Spark effects are handled by this datum
var/datum/effect_system/spark_spread/spark_system = new
- var/lights = FALSE
+ ///How powerful our lights are
var/lights_power = 6
- var/last_user_hud = 1 // used to show/hide the mecha hud while preserving previous preference
- var/completely_disabled = FALSE //stops the mech from doing anything
+ ///Just stop the mech from doing anything
+ var/completely_disabled = FALSE
+ ///Whether this mech is allowed to move diagonally
+ var/allow_diagonal_movement = FALSE
+ ///Whether or not the mech destroys walls by running into it.
+ var/bumpsmash = FALSE
- var/bumpsmash = 0 //Whether or not the mech destroys walls by running into it.
- //inner atmos
- var/use_internal_tank = 0
+ ///////////ATMOS
+ ///Whether we are currrently drawing from the internal tank
+ var/use_internal_tank = FALSE
+ ///The setting of the valve on the internal tank
var/internal_tank_valve = ONE_ATMOSPHERE
+ ///The internal air tank obj of the mech
var/obj/machinery/portable_atmospherics/canister/internal_tank
+ ///Internal air mix datum
var/datum/gas_mixture/cabin_air
- var/obj/machinery/atmospherics/components/unary/portables_connector/connected_port = null
+ ///The connected air port, if we have one
+ var/obj/machinery/atmospherics/components/unary/portables_connector/connected_port
+ ///Special version of the radio, which is unsellable
var/obj/item/radio/mech/radio
var/list/trackers = list()
var/max_temperature = 25000
- var/internal_damage_threshold = 50 //health percentage below which internal damage is possible
- var/internal_damage = 0 //contains bitflags
+ ///health percentage below which internal damage is possible
+ var/internal_damage_threshold = 50
+ ///Bitflags for internal damage
+ var/internal_damage = NONE
- var/list/operation_req_access = list()//required access level for mecha operation
- var/list/internals_req_access = list(ACCESS_MECH_ENGINE, ACCESS_MECH_SCIENCE)//REQUIRED ACCESS LEVEL TO OPEN CELL COMPARTMENT
+ ///required access level for mecha operation
+ var/list/operation_req_access = list()
+ ///required access to change internal components
+ var/list/internals_req_access = list(ACCESS_MECH_ENGINE, ACCESS_MECH_SCIENCE)
+ ///Typepath for the wreckage it spawns when destroyed
var/wreckage
var/list/equipment = new
+ ///Current active equipment
var/obj/item/mecha_parts/mecha_equipment/selected
+ ///Maximum amount of equipment we can have
var/max_equip = 3
- var/step_silent = FALSE //Used for disabling mech step sounds while using thrusters or pushing off lockers
+ ///Whether our steps are silent, for example in zero-G
+ var/step_silent = FALSE
+ ///Sound played when the mech moves
var/stepsound = 'sound/mecha/mechstep.ogg'
+ ///Sound played when the mech walks
var/turnsound = 'sound/mecha/mechturn.ogg'
+ ///Cooldown duration between melee punches
var/melee_cooldown = 10
- var/melee_can_hit = 1
- var/silicon_pilot = FALSE //set to true if an AI or MMI is piloting.
+ ///TIme taken to leave the mech
+ var/exit_delay = 2 SECONDS
+ ///Time you get slept for if you get forcible ejected by the mech exploding
+ var/destruction_sleep_duration = 2 SECONDS
+ ///Whether outside viewers can see the pilot inside
+ var/enclosed = TRUE
+ ///In case theres a different iconstate for AI/MMI pilot(currently only used for ripley)
+ var/silicon_icon_state = null
+ ///Currently ejecting, and unable to do things
+ var/is_currently_ejecting = FALSE
- var/enter_delay = 40 //Time taken to enter the mech
- var/exit_delay = 20 //Time to exit mech
- var/destruction_sleep_duration = 20 //Time that mech pilot is put to sleep for if mech is destroyed
- var/enclosed = TRUE //Set to false for open-cockpit mechs
- var/silicon_icon_state = null //if the mech has a different icon when piloted by an AI or MMI
- var/is_currently_ejecting = FALSE //Mech cannot use equiptment when true, set to true if pilot is trying to exit mech
+ var/datum/effect_system/smoke_spread/smoke_system = new
- //Action datums
- var/datum/action/innate/mecha/mech_eject/eject_action = new
- var/datum/action/innate/mecha/mech_toggle_internals/internals_action = new
- var/datum/action/innate/mecha/mech_cycle_equip/cycle_action = new
- var/datum/action/innate/mecha/mech_toggle_lights/lights_action = new
- var/datum/action/innate/mecha/mech_view_stats/stats_action = new
- var/datum/action/innate/mecha/mech_defense_mode/defense_action = new
- var/datum/action/innate/mecha/mech_overload_mode/overload_action = new
- var/datum/effect_system/smoke_spread/smoke_system = new //not an action, but trigged by one
- var/datum/action/innate/mecha/mech_smoke/smoke_action = new
- var/datum/action/innate/mecha/mech_zoom/zoom_action = new
- var/datum/action/innate/mecha/mech_switch_damtype/switch_damtype_action = new
- var/datum/action/innate/mecha/mech_toggle_phasing/phasing_action = new
- var/datum/action/innate/mecha/strafe/strafing_action = new
-
- //Action vars
+ ////Action vars
+ ///Ref to any active thrusters we might have
var/obj/item/mecha_parts/mecha_equipment/thrusters/active_thrusters
+
+ ///Bool for energy shield on/off
var/defense_mode = FALSE
+
+ ///Bool for leg overload on/off
var/leg_overload_mode = FALSE
+ ///Energy use modifier for leg overload
var/leg_overload_coeff = 100
+
+ //Bool for zoom on/off
var/zoom_mode = FALSE
- var/smoke = 5
- var/smoke_ready = 1
- var/smoke_cooldown = 100
+
+ ///Remaining smoke charges
+ var/smoke_charges = 5
+ ///Cooldown between using smoke
+ var/smoke_cooldown = 10 SECONDS
+
+ ///Bool for if the mech is currently phasing
var/phasing = FALSE
+ ///Power we use every time we phaze through something
var/phasing_energy_drain = 200
- var/phase_state = "" //icon_state when phasing
- var/strafe = FALSE //If we are strafing
- var/canstrafe = TRUE //if we can turn on strafing
- var/haslights = TRUE //if we can turn on lights
+ ///icon_state for flick() when phazing
+ var/phase_state = ""
- var/nextsmash = 0
- var/smashcooldown = 3 //deciseconds
+ ///Wether we are strafing
+ var/strafe = FALSE
+
+ ///Cooldown length between bumpsmashes
+ var/smashcooldown = 3
+
+ ///Bool for whether this mech can only be used on lavaland
+ var/lavaland_only = FALSE
- var/occupant_sight_flags = 0 //sight flags to give to the occupant (e.g. mech mining scanner gives meson-like vision)
- var/mouse_pointer
hud_possible = list (DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_TRACK_HUD)
/obj/item/radio/mech //this has to go somewhere
-/obj/mecha/Initialize()
+/obj/vehicle/sealed/mecha/Initialize()
. = ..()
- icon_state += "-open"
add_radio()
add_cabin()
- if (enclosed)
+ if(enclosed)
add_airtank()
+ RegisterSignal(src, COMSIG_MOVABLE_PRE_MOVE , .proc/disconnect_air)
+ RegisterSignal(src, COMSIG_MOVABLE_MOVED, .proc/play_stepsound)
spark_system.set_up(2, 0, src)
spark_system.attach(src)
smoke_system.set_up(3, src)
@@ -149,77 +195,75 @@
diag_hud_set_mechhealth()
diag_hud_set_mechcell()
diag_hud_set_mechstat()
+ update_icon()
-/obj/mecha/update_icon_state()
- if(silicon_pilot && silicon_icon_state)
- icon_state = silicon_icon_state
-
-/obj/mecha/get_cell()
- return cell
-
-/obj/mecha/rust_heretic_act()
- take_damage(500, BRUTE)
-
-/obj/mecha/Destroy()
- if(occupant)
- occupant.SetSleeping(destruction_sleep_duration)
- go_out()
- var/mob/living/silicon/ai/AI
- for(var/mob/M in src) //Let's just be ultra sure
- if(isAI(M))
- occupant = null
- AI = M //AIs are loaded into the mech computer itself. When the mech dies, so does the AI. They can be recovered with an AI card from the wreck.
+/obj/vehicle/sealed/mecha/Destroy()
+ for(var/M in occupants)
+ var/mob/living/occupant = M
+ if(isAI(occupant))
+ occupant.gib() //No wreck, no AI to recover
else
- M.forceMove(loc)
- for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
- E.detach(loc)
- qdel(E)
+ occupant.forceMove(loc)
+ occupant.SetSleeping(destruction_sleep_duration)
+ if(LAZYLEN(equipment))
+ for(var/E in equipment)
+ var/obj/item/mecha_parts/mecha_equipment/equip = E
+ equip.detach(loc)
+ qdel(equip)
if(cell)
- qdel(cell)
+ QDEL_NULL(cell)
if(scanmod)
- qdel(scanmod)
+ QDEL_NULL(scanmod)
if(capacitor)
- qdel(capacitor)
+ QDEL_NULL(capacitor)
if(internal_tank)
- qdel(internal_tank)
- if(AI)
- AI.gib() //No wreck, no AI to recover
+ QDEL_NULL(internal_tank)
STOP_PROCESSING(SSobj, src)
GLOB.poi_list.Remove(src)
- equipment.Cut()
- cell = null
- scanmod = null
- capacitor = null
- internal_tank = null
+ LAZYCLEARLIST(equipment)
if(loc)
loc.assume_air(cabin_air)
air_update_turf()
else
qdel(cabin_air)
cabin_air = null
- qdel(spark_system)
- spark_system = null
- qdel(smoke_system)
- smoke_system = null
+ QDEL_NULL(spark_system)
+ QDEL_NULL(smoke_system)
GLOB.mechas_list -= src //global mech list
return ..()
-/obj/mecha/proc/restore_equipment()
- equipment_disabled = 0
- if(occupant)
- SEND_SOUND(occupant, sound('sound/items/timer.ogg', volume=50))
- to_chat(occupant, "Equipment control unit has been rebooted successfully.")
- occupant.update_mouse_pointer()
+/obj/vehicle/sealed/mecha/update_icon_state()
+ if((mecha_flags & SILICON_PILOT) && silicon_icon_state)
+ icon_state = silicon_icon_state
+ else if(LAZYLEN(occupants))
+ icon_state = initial(icon_state)
+ else
+ icon_state = initial(icon_state)+ "-open"
-/obj/mecha/CheckParts(list/parts_list)
+
+/obj/vehicle/sealed/mecha/get_cell()
+ return cell
+
+/obj/vehicle/sealed/mecha/rust_heretic_act()
+ take_damage(500, BRUTE)
+
+/obj/vehicle/sealed/mecha/proc/restore_equipment()
+ equipment_disabled = FALSE
+ for(var/occupant in occupants)
+ var/mob/mob_occupant
+ SEND_SOUND(mob_occupant, sound('sound/items/timer.ogg', volume=50))
+ to_chat(mob_occupant, "Equipment control unit has been rebooted successfully.")
+ mob_occupant.update_mouse_pointer()
+
+/obj/vehicle/sealed/mecha/CheckParts(list/parts_list)
..()
cell = locate(/obj/item/stock_parts/cell) in contents
scanmod = locate(/obj/item/stock_parts/scanning_module) in contents
capacitor = locate(/obj/item/stock_parts/capacitor) in contents
update_part_values()
-/obj/mecha/proc/update_part_values() ///Updates the values given by scanning module and capacitor tier, called when a part is removed or inserted.
+/obj/vehicle/sealed/mecha/proc/update_part_values() ///Updates the values given by scanning module and capacitor tier, called when a part is removed or inserted.
if(scanmod)
normal_step_energy_drain = 20 - (5 * scanmod.rating) //10 is normal, so on lowest part its worse, on second its ok and on higher its real good up to 0 on best
step_energy_drain = normal_step_energy_drain
@@ -236,12 +280,12 @@
////// Helpers /////////
////////////////////////
-/obj/mecha/proc/add_airtank()
+/obj/vehicle/sealed/mecha/proc/add_airtank()
internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src)
return internal_tank
///Adds a cell, for use in Map-spawned mechs, Nuke Ops mechs, and admin-spawned mechs. Mechs built by hand will replace this.
-/obj/mecha/proc/add_cell(obj/item/stock_parts/cell/C=null)
+/obj/vehicle/sealed/mecha/proc/add_cell(obj/item/stock_parts/cell/C=null)
QDEL_NULL(cell)
if(C)
C.forceMove(src)
@@ -250,7 +294,7 @@
cell = new /obj/item/stock_parts/cell/high/plus(src)
///Adds a scanning module, for use in Map-spawned mechs, Nuke Ops mechs, and admin-spawned mechs. Mechs built by hand will replace this.
-/obj/mecha/proc/add_scanmod(obj/item/stock_parts/scanning_module/sm=null)
+/obj/vehicle/sealed/mecha/proc/add_scanmod(obj/item/stock_parts/scanning_module/sm=null)
QDEL_NULL(scanmod)
if(sm)
sm.forceMove(src)
@@ -259,7 +303,7 @@
scanmod = new /obj/item/stock_parts/scanning_module(src)
///Adds a capacitor, for use in Map-spawned mechs, Nuke Ops mechs, and admin-spawned mechs. Mechs built by hand will replace this.
-/obj/mecha/proc/add_capacitor(obj/item/stock_parts/capacitor/cap=null)
+/obj/vehicle/sealed/mecha/proc/add_capacitor(obj/item/stock_parts/capacitor/cap=null)
QDEL_NULL(capacitor)
if(cap)
cap.forceMove(src)
@@ -267,7 +311,7 @@
else
capacitor = new /obj/item/stock_parts/capacitor(src)
-/obj/mecha/proc/add_cabin()
+/obj/vehicle/sealed/mecha/proc/add_cabin()
cabin_air = new
cabin_air.temperature = T20C
cabin_air.volume = 200
@@ -276,24 +320,22 @@
cabin_air.gases[/datum/gas/nitrogen][MOLES] = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
return cabin_air
-/obj/mecha/proc/add_radio()
+/obj/vehicle/sealed/mecha/proc/add_radio()
radio = new(src)
radio.name = "[src] radio"
radio.icon = icon
radio.icon_state = icon_state
radio.subspace_transmission = TRUE
-/obj/mecha/proc/can_use(mob/user)
- if(user != occupant)
- return 0
- if(user && ismob(user))
+/obj/vehicle/sealed/mecha/proc/can_use(mob/user)
+ if(istype(user) && is_occupant(user))
if(!user.incapacitated())
- return 1
- return 0
+ return TRUE
+ return FALSE
////////////////////////////////////////////////////////////////////////////////
-/obj/mecha/examine(mob/user)
+/obj/vehicle/sealed/mecha/examine(mob/user)
. = ..()
var/integrity = obj_integrity*100/max_integrity
switch(integrity)
@@ -315,10 +357,11 @@
for(var/obj/item/mecha_parts/mecha_equipment/ME in visible_equipment)
. += "[icon2html(ME, user)] \A [ME]."
if(!enclosed)
- if(silicon_pilot)
+ if(mecha_flags & SILICON_PILOT)
. += "[src] appears to be piloting itself..."
- else if(occupant && occupant != user) //!silicon_pilot implied
- . += "You can see [occupant] inside."
+ else
+ for(var/occupante in occupants)
+ . += "You can see [occupante] inside."
if(ishuman(user))
var/mob/living/carbon/human/H = user
for(var/O in H.held_items)
@@ -327,7 +370,7 @@
break //in case user is holding two guns
//processing internal damage, temperature, air regulation, alert updates, lights power use.
-/obj/mecha/process()
+/obj/vehicle/sealed/mecha/process()
var/internal_temp_regulation = 1
if(internal_damage)
@@ -394,103 +437,101 @@
else //just delete the cabin gas, we're in space or some shit
qdel(removed)
- if(occupant)
- if(cell)
- var/cellcharge = cell.charge/cell.maxcharge
- switch(cellcharge)
- if(0.75 to INFINITY)
- occupant.clear_alert("charge")
- if(0.5 to 0.75)
- occupant.throw_alert("charge", /obj/screen/alert/lowcell, 1)
- if(0.25 to 0.5)
- occupant.throw_alert("charge", /obj/screen/alert/lowcell, 2)
- if(0.01 to 0.25)
- occupant.throw_alert("charge", /obj/screen/alert/lowcell, 3)
+ if(occupants)
+ for(var/i in occupants)
+ var/mob/living/occupant = i
+ if(cell)
+ var/cellcharge = cell.charge/cell.maxcharge
+ switch(cellcharge)
+ if(0.75 to INFINITY)
+ occupant.clear_alert("charge")
+ if(0.5 to 0.75)
+ occupant.throw_alert("charge", /obj/screen/alert/lowcell, 1)
+ if(0.25 to 0.5)
+ occupant.throw_alert("charge", /obj/screen/alert/lowcell, 2)
+ if(0.01 to 0.25)
+ occupant.throw_alert("charge", /obj/screen/alert/lowcell, 3)
+ else
+ occupant.throw_alert("charge", /obj/screen/alert/emptycell)
+
+ var/integrity = obj_integrity/max_integrity*100
+ switch(integrity)
+ if(30 to 45)
+ occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 1)
+ if(15 to 35)
+ occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 2)
+ if(-INFINITY to 15)
+ occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 3)
else
- occupant.throw_alert("charge", /obj/screen/alert/emptycell)
+ occupant.clear_alert("mech damage")
+ var/atom/checking = occupant.loc
+ // recursive check to handle all cases regarding very nested occupants,
+ // such as brainmob inside brainitem inside MMI inside mecha
+ while(!isnull(checking))
+ if(isturf(checking))
+ // hit a turf before hitting the mecha, seems like they have been moved out
+ occupant.clear_alert("charge")
+ occupant.clear_alert("mech damage")
+ occupant = null
+ break
+ else if (checking == src)
+ break // all good
+ checking = checking.loc
- var/integrity = obj_integrity/max_integrity*100
- switch(integrity)
- if(30 to 45)
- occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 1)
- if(15 to 35)
- occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 2)
- if(-INFINITY to 15)
- occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 3)
- else
- occupant.clear_alert("mech damage")
- var/atom/checking = occupant.loc
- // recursive check to handle all cases regarding very nested occupants,
- // such as brainmob inside brainitem inside MMI inside mecha
- while (!isnull(checking))
- if (isturf(checking))
- // hit a turf before hitting the mecha, seems like they have
- // been moved out
- occupant.clear_alert("charge")
- occupant.clear_alert("mech damage")
- RemoveActions(occupant, human_occupant=1)
- occupant = null
- break
- else if (checking == src)
- break // all good
- checking = checking.loc
-
- if(lights)
+ if(mecha_flags & LIGHTS_ON)
var/lights_energy_drain = 2
use_power(lights_energy_drain)
- if(!enclosed && occupant?.incapacitated()) //no sides mean it's easy to just sorta fall out if you're incapacitated.
- visible_message("[occupant] tumbles out of the cockpit!")
- go_out() //Maybe we should install seat belts?
+ for(var/b in occupants)
+ var/mob/living/occupant = b
+ if(!enclosed && occupant?.incapacitated()) //no sides mean it's easy to just sorta fall out if you're incapacitated.
+ visible_message("[occupant] tumbles out of the cockpit!")
+ mob_exit(occupant) //bye bye
//Diagnostic HUD updates
diag_hud_set_mechhealth()
diag_hud_set_mechcell()
diag_hud_set_mechstat()
-/obj/mecha/fire_act() //Check if we should ignite the pilot of an open-canopy mech
+/obj/vehicle/sealed/mecha/fire_act() //Check if we should ignite the pilot of an open-canopy mech
. = ..()
- if (occupant && !enclosed && !silicon_pilot)
- if (occupant.fire_stacks < 5)
- occupant.fire_stacks += 1
- occupant.IgniteMob()
+ if(LAZYLEN(occupants) && !enclosed && !(mecha_flags & SILICON_PILOT))
+ for(var/M in occupants)
+ var/mob/living/cookedalive = M
+ if(cookedalive.fire_stacks < 5)
+ cookedalive.fire_stacks += 1
+ cookedalive.IgniteMob()
-/obj/mecha/proc/drop_item()//Derpfix, but may be useful in future for engineering exosuits.
- return
-
-/obj/mecha/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, list/message_mods = list())
- . = ..()
- if(speaker == occupant)
- if(radio?.broadcasting)
- radio.talk_into(speaker, text, , spans, message_language, message_mods)
- //flick speech bubble
- var/list/speech_bubble_recipients = list()
- for(var/mob/M in get_hearers_in_view(7,src))
- if(M.client)
- speech_bubble_recipients.Add(M.client)
- INVOKE_ASYNC(GLOBAL_PROC, /proc/flick_overlay, image('icons/mob/talk.dmi', src, "machine[say_test(raw_message)]",MOB_LAYER+1), speech_bubble_recipients, 30)
+/obj/vehicle/sealed/mecha/proc/display_speech_bubble(datum/source, list/speech_args)
+ SIGNAL_HANDLER
+ var/list/speech_bubble_recipients = get_hearers_in_view(7,src)
+ for(var/mob/M in speech_bubble_recipients)
+ if(M.client)
+ speech_bubble_recipients.Add(M.client)
+ INVOKE_ASYNC(GLOBAL_PROC, /proc/flick_overlay, image('icons/mob/talk.dmi', src, "machine[say_test(speech_args[SPEECH_MESSAGE])]",MOB_LAYER+1), speech_bubble_recipients, 30)
////////////////////////////
///// Action processing ////
////////////////////////////
-
-/obj/mecha/proc/click_action(atom/target,mob/user,params)
- if(!occupant || occupant != user )
- return
+/obj/vehicle/sealed/mecha/proc/on_mouseclick(mob/user, atom/target, params)
+ SIGNAL_HANDLER
if(!locate(/turf) in list(target,target.loc)) // Prevents inventory from being drilled
return
if(completely_disabled)
return
if(is_currently_ejecting)
return
+ var/list/mouse_control = params2list(params)
+ if(isAI(user) && !mouse_control["middle"])//AIs use MMB
+ return
if(phasing)
- occupant_message("Unable to interact with objects while phasing.")
+ to_chat(occupants, "[icon2html(src, occupants)]Unable to interact with objects while phasing.")
return
if(user.incapacitated())
return
if(construction_state)
- occupant_message("Maintenance protocols in effect.")
+ to_chat(occupants, "[icon2html(src, occupants)]Maintenance protocols in effect.")
return
if(!get_charge())
return
@@ -500,39 +541,32 @@
if(dir_to_target && !(dir_to_target & dir))//wrong direction
return
if(internal_damage & MECHA_INT_CONTROL_LOST)
- if (!target)
- return
target = pick(view(3,target))
-
+ if(!target)
+ return
var/mob/living/L = user
- if(!Adjacent(target))
- if(selected && selected.is_ranged())
+ if(selected)
+ if(!Adjacent(target) && (selected.range & MECHA_RANGED))
if(HAS_TRAIT(L, TRAIT_PACIFISM) && selected.harmful)
- to_chat(user, "You don't want to harm other living beings!")
+ to_chat(L, "You don't want to harm other living beings!")
return
- if(selected.action(target,params))
- selected.start_cooldown()
- else if(selected && selected.is_melee())
- if(isliving(target) && selected.harmful && HAS_TRAIT(L, TRAIT_PACIFISM))
- to_chat(user, "You don't want to harm other living beings!")
+ selected.action(user, target, params)
return
- if(selected.action(target,params))
- selected.start_cooldown()
- else
- if(internal_damage & MECHA_INT_CONTROL_LOST)
- var/list/possible_targets = oview(1,src)
- if (!length(possible_targets))
+ if((selected.range & MECHA_MELEE) && Adjacent(target))
+ if(isliving(target) && selected.harmful && HAS_TRAIT(L, TRAIT_PACIFISM))
+ to_chat(L, "You don't want to harm other living beings!")
return
- target = pick(possible_targets)
- if(!melee_can_hit || !istype(target, /atom))
+ selected.action(user, target, params)
return
- target.mech_melee_attack(src)
- melee_can_hit = FALSE
- addtimer(VARSET_CALLBACK(src, melee_can_hit, TRUE), melee_cooldown)
-
-
-/obj/mecha/proc/range_action(atom/target)
- return
+ if(TIMER_COOLDOWN_CHECK(src, COOLDOWN_MECHA_MELEE_ATTACK) || !istype(target, /atom) || !Adjacent(target))
+ return
+ if(internal_damage & MECHA_INT_CONTROL_LOST)
+ var/list/possible_targets = oview(1,src)
+ if(!length(possible_targets))
+ return
+ target = pick(possible_targets)
+ target.mech_melee_attack(src, user)
+ TIMER_COOLDOWN_START(src, COOLDOWN_MECHA_MELEE_ATTACK, melee_cooldown)
//////////////////////////////////
@@ -540,17 +574,18 @@
//////////////////////////////////
///Plays the mech step sound effect. Split from movement procs so that other mechs (HONK) can override this one specific part.
-/obj/mecha/proc/play_stepsound()
+/obj/vehicle/sealed/mecha/proc/play_stepsound()
+ SIGNAL_HANDLER
if(stepsound)
playsound(src,stepsound,40,1)
-/obj/mecha/Move(atom/newloc, direct)
- . = ..()
- if (internal_tank?.disconnect()) // Something moved us and broke connection
- occupant_message("Air port connection has been severed!")
+/obj/vehicle/sealed/mecha/proc/disconnect_air()
+ SIGNAL_HANDLER
+ if(internal_tank.disconnect()) // Something moved us and broke connection
+ to_chat(occupants, "[icon2html(src, occupants)]Air port connection has been severed!")
log_message("Lost connection to gas port.", LOG_MECHA)
-/obj/mecha/Process_Spacemove(movement_dir = 0)
+/obj/vehicle/sealed/mecha/Process_Spacemove(movement_dir = 0)
. = ..()
if(.)
return TRUE
@@ -560,124 +595,105 @@
if(istype(backup) && movement_dir && !backup.anchored)
if(backup.newtonian_move(turn(movement_dir, 180)))
step_silent = TRUE
- if(occupant)
- to_chat(occupant, "You push off [backup] to propel yourself.")
+ if(return_drivers())
+ to_chat(occupants, "[icon2html(src, occupants)]The [src] push off [backup] to propel yourself.")
return TRUE
- if(can_move <= world.time && active_thrusters && movement_dir && active_thrusters.thrust(movement_dir))
+ if(movedelay <= world.time && active_thrusters && movement_dir && active_thrusters.thrust(movement_dir))
step_silent = TRUE
return TRUE
return FALSE
-/obj/mecha/relaymove(mob/living/user, direction)
+/obj/vehicle/sealed/mecha/vehicle_move(direction, forcerotate = FALSE)
+ if(!COOLDOWN_FINISHED(src, cooldown_vehicle_move))
+ return FALSE
+ COOLDOWN_START(src, cooldown_vehicle_move, movedelay)
if(completely_disabled)
- return
+ return FALSE
if(!direction)
- return
- if(user != occupant) //While not "realistic", this piece is player friendly.
- user.forceMove(get_turf(src))
- to_chat(user, "You climb out from [src].")
- return 0
+ return FALSE
if(internal_tank?.connected_port)
- if(world.time - last_message > 20)
- occupant_message("Unable to move while connected to the air system port!")
- last_message = world.time
- return 0
+ if(TIMER_COOLDOWN_CHECK(src, COOLDOWN_MECHA_MESSAGE))
+ to_chat(occupants, "[icon2html(src, occupants)]Unable to move while connected to the air system port!")
+ TIMER_COOLDOWN_START(src, COOLDOWN_MECHA_MESSAGE, 2 SECONDS)
+ return FALSE
if(construction_state)
- if(world.time - last_message > 20)
- occupant_message("Maintenance protocols in effect.")
- last_message = world.time
- return
- return domove(direction)
+ if(TIMER_COOLDOWN_CHECK(src, COOLDOWN_MECHA_MESSAGE))
+ to_chat(occupants, "[icon2html(src, occupants)]Maintenance protocols in effect.")
+ TIMER_COOLDOWN_START(src, COOLDOWN_MECHA_MESSAGE, 2 SECONDS)
+ return FALSE
-/obj/mecha/proc/domove(direction)
- if(can_move >= world.time)
- return 0
if(!Process_Spacemove(direction))
- return 0
+ return FALSE
if(!has_charge(step_energy_drain))
- return 0
+ return FALSE
if(zoom_mode)
- if(world.time - last_message > 20)
- occupant_message("Unable to move while in zoom mode!")
- last_message = world.time
- return 0
+ to_chat(occupants, "[icon2html(src, occupants)]Unable to move while in zoom mode!")
+ return FALSE
if(!cell)
- if(world.time - last_message > 20)
- occupant_message("Missing power cell.")
- last_message = world.time
- return 0
+ to_chat(occupants, "[icon2html(src, occupants)]Missing power cell.")
+ return FALSE
if(!scanmod || !capacitor)
- if(world.time - last_message > 20)
- occupant_message("Missing [scanmod? "capacitor" : "scanning module"].")
- last_message = world.time
- return 0
+ to_chat(occupants, "[icon2html(src, occupants)]Missing [scanmod? "capacitor" : "scanning module"].")
+ return FALSE
+ if(lavaland_only && is_mining_level(z))
+ to_chat(occupants, "[icon2html(src, occupants)]Invalid Environment.")
+ return FALSE
+
+ var/olddir = dir
- var/move_result = 0
- var/oldloc = loc
if(internal_damage & MECHA_INT_CONTROL_LOST)
- set_glide_size(DELAY_TO_GLIDE_SIZE(step_in))
- move_result = mechsteprand()
- else if(dir != direction && (!strafe || occupant.client.keys_held["Alt"]))
- move_result = mechturn(direction)
- else
- set_glide_size(DELAY_TO_GLIDE_SIZE(step_in))
- move_result = mechstep(direction)
- if(move_result || loc != oldloc)// halfway done diagonal move still returns false
- use_power(step_energy_drain)
- can_move = world.time + step_in
- return 1
- return 0
+ direction = pick(GLOB.alldirs)
-/obj/mecha/proc/mechturn(direction)
- setDir(direction)
- if(turnsound)
- playsound(src,turnsound,40,TRUE)
- return 1
+ //only mechs with diagonal movement may move diagonally
+ if(!allow_diagonal_movement && ISDIAGONALDIR(direction))
+ return TRUE
+
+ //if we're not facing the way we're going rotate us
+ if(dir != direction && !strafe || forcerotate)
+ setDir(direction)
+ if(turnsound)
+ playsound(src,turnsound,40,TRUE)
+ return TRUE
+
+ set_glide_size(DELAY_TO_GLIDE_SIZE(movedelay))
+ //Otherwise just walk normally
+ . = step(src,direction, dir)
-/obj/mecha/proc/mechstep(direction)
- var/current_dir = dir
- . = step(src,direction)
if(strafe)
- setDir(current_dir)
- if(. && !step_silent)
- play_stepsound()
- step_silent = FALSE
+ for(var/D in return_drivers())
+ var/mob/driver = D
+ if(driver.client?.keys_held["Alt"])
+ return
+ setDir(olddir)
-/obj/mecha/proc/mechsteprand()
- . = step_rand(src)
- if(. && !step_silent)
- play_stepsound()
- step_silent = FALSE
-/obj/mecha/Bump(atom/obstacle)
+/obj/vehicle/sealed/mecha/Bump(atom/obstacle)
if(phasing && get_charge() >= phasing_energy_drain && !throwing)
- if(!can_move)
- return
- can_move = 0
if(phase_state)
flick(phase_state, src)
- forceMove(get_step(src,dir))
+ forceMove(get_step(src,dir))//This is jank I hate it thanks, this should be done thrugh move not this dumb shit
use_power(phasing_energy_drain)
- addtimer(VARSET_CALLBACK(src, can_move, TRUE), step_in*3)
- else
- if(..()) //mech was thrown
- return
- if(bumpsmash && occupant) //Need a pilot to push the PUNCH button.
- if(nextsmash < world.time)
- obstacle.mech_melee_attack(src)
- nextsmash = world.time + smashcooldown
- if(!obstacle || obstacle.CanPass(src,get_step(src,dir)))
- step(src,dir)
- if(isobj(obstacle))
- var/obj/O = obstacle
- if(!O.anchored && O.move_resist <= move_force)
- step(obstacle, dir)
- else if(ismob(obstacle))
- var/mob/M = obstacle
- if(M.move_resist <= move_force)
- step(obstacle, dir)
+ addtimer(VARSET_CALLBACK(src, movedelay, TRUE), movedelay*3)
+ return
+ . = ..()
+ if(.) //mech was thrown/door/whatever
+ return
+ if(bumpsmash) //Need a pilot to push the PUNCH button.
+ if(COOLDOWN_FINISHED(src, mecha_bump_smash))
+ obstacle.mech_melee_attack(src)
+ COOLDOWN_START(src, mecha_bump_smash, smashcooldown)
+ if(!obstacle || obstacle.CanPass(src,get_step(src,dir)))
+ step(src,dir)
+ if(isobj(obstacle))
+ var/obj/obj_obstacle = obstacle
+ if(!obj_obstacle.anchored && obj_obstacle.move_resist <= move_force)
+ step(obstacle, dir)
+ else if(ismob(obstacle))
+ var/mob/mob_obstacle = obstacle
+ if(mob_obstacle.move_resist <= move_force)
+ step(obstacle, dir)
@@ -687,7 +703,7 @@
//////// Internal damage ////////
///////////////////////////////////
-/obj/mecha/proc/check_for_internal_damage(list/possible_int_damage,ignore_threshold=null)
+/obj/vehicle/sealed/mecha/proc/check_for_internal_damage(list/possible_int_damage,ignore_threshold=null)
if(!islist(possible_int_damage) || !length(possible_int_damage))
return
if(prob(20))
@@ -701,25 +717,25 @@
setInternalDamage(int_dam_flag)
if(prob(5))
if(ignore_threshold || obj_integrity*100/max_integrity < internal_damage_threshold)
- if (length(equipment))
+ if(LAZYLEN(equipment))
var/obj/item/mecha_parts/mecha_equipment/ME = pick(equipment)
qdel(ME)
-/obj/mecha/proc/setInternalDamage(int_dam_flag)
+/obj/vehicle/sealed/mecha/proc/setInternalDamage(int_dam_flag)
internal_damage |= int_dam_flag
log_message("Internal damage of type [int_dam_flag].", LOG_MECHA)
- SEND_SOUND(occupant, sound('sound/machines/warning-buzzer.ogg',wait=0))
+ SEND_SOUND(occupants, sound('sound/machines/warning-buzzer.ogg',wait=0))
diag_hud_set_mechstat()
-/obj/mecha/proc/clearInternalDamage(int_dam_flag)
+/obj/vehicle/sealed/mecha/proc/clearInternalDamage(int_dam_flag)
if(internal_damage & int_dam_flag)
switch(int_dam_flag)
if(MECHA_INT_TEMP_CONTROL)
- occupant_message("Life support system reactivated.")
+ to_chat(occupants, "[icon2html(src, occupants)]Life support system reactivated.")
if(MECHA_INT_FIRE)
- occupant_message("Internal fire extinguished.")
+ to_chat(occupants, "[icon2html(src, occupants)]Internal fire extinguished.")
if(MECHA_INT_TANK_BREACH)
- occupant_message("Damaged internal tank has been sealed.")
+ to_chat(occupants, "[icon2html(src, occupants)]Damaged internal tank has been sealed.")
internal_damage &= ~int_dam_flag
diag_hud_set_mechstat()
@@ -727,7 +743,7 @@
//////////// AI piloting ////////////
/////////////////////////////////////
-/obj/mecha/attack_ai(mob/living/silicon/ai/user)
+/obj/vehicle/sealed/mecha/attack_ai(mob/living/silicon/ai/user)
if(!isAI(user))
return
//Allows the Malf to scan a mech's status and loadout, helping it to decide if it is a worthy chariot.
@@ -741,7 +757,7 @@
to_chat(user, "ASSUME DIRECT CONTROL?
")
else
examine(user)
- if(occupant)
+ if(length(return_drivers()) > 0)
to_chat(user, "This exosuit has a pilot and cannot be controlled.")
return
var/can_control_mech = 0
@@ -754,42 +770,40 @@
return
to_chat(user, "Take control of exosuit?
")
-/obj/mecha/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
+/obj/vehicle/sealed/mecha/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
if(!..())
return
- //Transfer from core or card to mech. Proc is called by mech.
+ //Transfer from core or card to mech. Proc is called by mech.
switch(interaction)
if(AI_TRANS_TO_CARD) //Upload AI from mech to AI card.
if(!construction_state) //Mech must be in maint mode to allow carding.
to_chat(user, "[name] must have maintenance protocols active in order to allow a transfer.")
return
- AI = occupant
- if(!AI || !isAI(occupant)) //Mech does not have an AI for a pilot
+ if(!locate(AI) in occupants) //Mech does not have an AI for a pilot
to_chat(user, "No AI detected in the [name] onboard computer.")
return
+ for(var/mob/living/silicon/ai in occupants)
AI.ai_restore_power()//So the AI initially has power.
AI.control_disabled = TRUE
AI.radio_enabled = FALSE
AI.disconnect_shell()
- RemoveActions(AI, TRUE)
- occupant = null
- silicon_pilot = FALSE
+ remove_occupant(AI)
+ mecha_flags &= ~SILICON_PILOT
AI.forceMove(card)
card.AI = AI
AI.controlled_mech = null
AI.remote_control = null
- icon_state = initial(icon_state)+"-open"
to_chat(AI, "You have been downloaded to a mobile storage device. Wireless connection offline.")
to_chat(user, "Transfer successful: [AI.name] ([rand(1000,9999)].exe) removed from [name] and stored within local memory.")
if(AI_MECH_HACK) //Called by AIs on the mech
AI.linked_core = new /obj/structure/ai_core/deactivated(AI.loc)
if(AI.can_dominate_mechs)
- if(occupant) //Oh, I am sorry, were you using that?
- to_chat(AI, "Pilot detected! Forced ejection initiated!")
- to_chat(occupant, "You have been forcibly ejected!")
- go_out(1) //IT IS MINE, NOW. SUCK IT, RD!
+ if(LAZYLEN(occupants)) //Oh, I am sorry, were you using that?
+ to_chat(AI, "Occupants detected! Forced ejection initiated!")
+ to_chat(occupants, "You have been forcibly ejected!")
+ ejectall() //IT IS MINE, NOW. SUCK IT, RD!
ai_enter_mech(AI, interaction)
if(AI_TRANS_FROM_CARD) //Using an AI card to upload to a mech.
@@ -802,8 +816,8 @@
if(AI.stat || !AI.client)
to_chat(user, "[AI.name] is currently unresponsive, and cannot be uploaded.")
return
- if(occupant || dna_lock) //Normal AIs cannot steal mechs!
- to_chat(user, "Access denied. [name] is [occupant ? "currently occupied" : "secured with a DNA lock"].")
+ if((LAZYLEN(occupants) >= max_occupants) || dna_lock) //Normal AIs cannot steal mechs!
+ to_chat(user, "Access denied. [name] is [LAZYLEN(occupants) >= max_occupants ? "currently fully occupied" : "secured with a DNA lock"].")
return
AI.control_disabled = FALSE
AI.radio_enabled = TRUE
@@ -812,171 +826,160 @@
ai_enter_mech(AI, interaction)
//Hack and From Card interactions share some code, so leave that here for both to use.
-/obj/mecha/proc/ai_enter_mech(mob/living/silicon/ai/AI, interaction)
+/obj/vehicle/sealed/mecha/proc/ai_enter_mech(mob/living/silicon/ai/AI, interaction)
AI.ai_restore_power()
- AI.forceMove(src)
- occupant = AI
- silicon_pilot = TRUE
- icon_state = initial(icon_state)
- update_icon()
- playsound(src, 'sound/machines/windowdoor.ogg', 50, TRUE)
- if(!internal_damage)
- SEND_SOUND(occupant, sound('sound/mecha/nominal.ogg',volume=50))
+ mecha_flags |= SILICON_PILOT
+ moved_inside(AI)
AI.cancel_camera()
AI.controlled_mech = src
AI.remote_control = src
AI.mobility_flags = ALL //Much easier than adding AI checks! Be sure to set this back to 0 if you decide to allow an AI to leave a mech somehow.
- AI.can_shunt = 0 //ONE AI ENTERS. NO AI LEAVES.
+ if(interaction == AI_MECH_HACK)
+ AI.can_shunt = FALSE //ONE AI ENTERS. NO AI LEAVES.
to_chat(AI, AI.can_dominate_mechs ? "Takeover of [name] complete! You are now loaded onto the onboard computer. Do not attempt to leave the station sector!" :\
"You have been uploaded to a mech's onboard computer.")
to_chat(AI, "Use Middle-Mouse to activate mech functions and equipment. Click normally for AI interactions.")
- if(interaction == AI_TRANS_FROM_CARD)
- GrantActions(AI, FALSE) //No eject/return to core action for AI uploaded by card
- else
- GrantActions(AI, !AI.can_dominate_mechs)
-//An actual AI (simple_animal mecha pilot) entering the mech
-/obj/mecha/proc/aimob_enter_mech(mob/living/simple_animal/hostile/syndicate/mecha_pilot/pilot_mob)
+///Handles an actual AI (simple_animal mecha pilot) entering the mech
+/obj/vehicle/sealed/mecha/proc/aimob_enter_mech(mob/living/simple_animal/hostile/syndicate/mecha_pilot/pilot_mob)
if(pilot_mob && pilot_mob.Adjacent(src))
- if(occupant)
+ if(occupants)
return
- icon_state = initial(icon_state)
- occupant = pilot_mob
+ LAZYADD(occupants, src)
pilot_mob.mecha = src
pilot_mob.forceMove(src)
- GrantActions(pilot_mob)//needed for checks, and incase a badmin puts somebody in the mob
+ update_icon()
-/obj/mecha/proc/aimob_exit_mech(mob/living/simple_animal/hostile/syndicate/mecha_pilot/pilot_mob)
- if(occupant == pilot_mob)
- occupant = null
+///Handles an actual AI (simple_animal mecha pilot) exiting the mech
+/obj/vehicle/sealed/mecha/proc/aimob_exit_mech(mob/living/simple_animal/hostile/syndicate/mecha_pilot/pilot_mob)
+ LAZYREMOVE(occupants, pilot_mob)
if(pilot_mob.mecha == src)
pilot_mob.mecha = null
- icon_state = "[initial(icon_state)]-open"
pilot_mob.forceMove(get_turf(src))
- RemoveActions(pilot_mob)
+ update_icon()
/////////////////////////////////////
//////// Atmospheric stuff ////////
/////////////////////////////////////
-/obj/mecha/remove_air(amount)
+/obj/vehicle/sealed/mecha/remove_air(amount)
if(use_internal_tank)
return cabin_air.remove(amount)
return ..()
-/obj/mecha/return_air()
+/obj/vehicle/sealed/mecha/return_air()
if(use_internal_tank)
return cabin_air
return ..()
-/obj/mecha/return_analyzable_air()
+/obj/vehicle/sealed/mecha/return_analyzable_air()
return cabin_air
-/obj/mecha/proc/return_pressure()
+/obj/vehicle/sealed/mecha/proc/return_pressure()
var/datum/gas_mixture/t_air = return_air()
if(t_air)
- . = t_air.return_pressure()
+ return t_air.return_pressure()
-/obj/mecha/return_temperature()
+/obj/vehicle/sealed/mecha/return_temperature()
var/datum/gas_mixture/t_air = return_air()
if(t_air)
- . = t_air.return_temperature()
+ return t_air.return_temperature()
-/obj/mecha/MouseDrop_T(mob/M, mob/user)
- if((user != M) || user.incapacitated() || !Adjacent(user))
+/obj/vehicle/sealed/mecha/mob_try_enter(mob/M)
+ if(!ishuman(M)) // no silicons or drones in mechas.
return
- if(!ishuman(user)) // no silicons or drones in mechas.
+ if(HAS_TRAIT(M, TRAIT_PRIMITIVE)) //no lavalizards either.
+ to_chat(M, "The knowledge to use this device eludes you!")
return
- if(HAS_TRAIT(user, TRAIT_PRIMITIVE)) //no lavalizards either.
- to_chat(user, "The knowledge to use this device eludes you!")
- return
- log_message("[user] tries to move in.", LOG_MECHA)
- if (occupant)
- to_chat(usr, "The [name] is already occupied!")
- log_message("Permission denied (Occupied).", LOG_MECHA)
- return
- if(dna_lock)
- var/passed = FALSE
- if(user.has_dna())
- var/mob/living/carbon/C = user
- if(C.dna.unique_enzymes==dna_lock)
- passed = TRUE
- if (!passed)
- to_chat(user, "Access denied. [name] is secured with a DNA lock.")
+ log_message("[M] tries to move into [src].", LOG_MECHA)
+ if(dna_lock && M.has_dna())
+ var/mob/living/carbon/entering_carbon = M
+ if(entering_carbon.dna.unique_enzymes != dna_lock)
+ to_chat(M, "Access denied. [name] is secured with a DNA lock.")
log_message("Permission denied (DNA LOCK).", LOG_MECHA)
return
- if(!operation_allowed(user))
- to_chat(user, "Access denied. Insufficient operation keycodes.")
+ if(!operation_allowed(M))
+ to_chat(M, "Access denied. Insufficient operation keycodes.")
log_message("Permission denied (No keycode).", LOG_MECHA)
return
- if(user.buckled)
- to_chat(user, "You are currently buckled and cannot move.")
+ if(M.buckled)
+ to_chat(M, "You are currently buckled and cannot move.")
log_message("Permission denied (Buckled).", LOG_MECHA)
return
- if(user.has_buckled_mobs()) //mob attached to us
- to_chat(user, "You can't enter the exosuit with other creatures attached to you!")
+ if(M.has_buckled_mobs()) //mob attached to us
+ to_chat(M, "You can't enter the exosuit with other creatures attached to you!")
log_message("Permission denied (Attached mobs).", LOG_MECHA)
return
- visible_message("[user] starts to climb into [name].")
+ visible_message("[M] starts to climb into [name].")
- if(do_after(user, enter_delay, target = src))
+ if(do_after(M, enter_delay, target = src))
if(obj_integrity <= 0)
- to_chat(user, "You cannot get in the [name], it has been destroyed!")
- else if(occupant)
- to_chat(user, "[occupant] was faster! Try better next time, loser.")
- else if(user.buckled)
- to_chat(user, "You can't enter the exosuit while buckled.")
- else if(user.has_buckled_mobs())
- to_chat(user, "You can't enter the exosuit with other creatures attached to you!")
+ to_chat(M, "You cannot get in the [name], it has been destroyed!")
+ else if(LAZYLEN(occupants) >= max_occupants)
+ to_chat(M, "[occupants[occupants.len]] was faster! Try better next time, loser.")//get the last one that hopped in
+ else if(M.buckled)
+ to_chat(M, "You can't enter the exosuit while buckled.")
+ else if(M.has_buckled_mobs())
+ to_chat(M, "You can't enter the exosuit with other creatures attached to you!")
else
- moved_inside(user)
+ moved_inside(M)
+ return ..()
else
- to_chat(user, "You stop entering the exosuit!")
+ to_chat(M, "You stop entering the exosuit!")
-/obj/mecha/proc/moved_inside(mob/living/carbon/human/H)
- . = FALSE
- if(H && H.client && (H in range(1)))
- occupant = H
- H.forceMove(src)
- H.update_mouse_pointer()
- add_fingerprint(H)
- GrantActions(H, human_occupant=1)
- forceMove(loc)
- log_message("[H] moved in as pilot.", LOG_MECHA)
- icon_state = initial(icon_state)
- setDir(dir_in)
- playsound(src, 'sound/machines/windowdoor.ogg', 50, TRUE)
- if(!internal_damage)
- SEND_SOUND(occupant, sound('sound/mecha/nominal.ogg',volume=50))
- return TRUE
-/obj/mecha/proc/mmi_move_inside(obj/item/mmi/M, mob/user)
+/obj/vehicle/sealed/mecha/generate_actions()
+ initialize_passenger_action_type(/datum/action/vehicle/sealed/mecha/mech_eject)
+ initialize_passenger_action_type(/datum/action/vehicle/sealed/mecha/mech_toggle_internals)
+ initialize_passenger_action_type(/datum/action/vehicle/sealed/mecha/mech_cycle_equip)
+ initialize_passenger_action_type(/datum/action/vehicle/sealed/mecha/mech_toggle_lights)
+ initialize_passenger_action_type(/datum/action/vehicle/sealed/mecha/mech_view_stats)
+ initialize_passenger_action_type(/datum/action/vehicle/sealed/mecha/strafe)
+
+/obj/vehicle/sealed/mecha/proc/moved_inside(mob/living/H)
. = FALSE
- if(!M.brain_check(user))
+ if(!(H?.client))
return
+ if(ishuman(H) && !Adjacent(H))
+ return
+ add_occupant(H)
+ H.forceMove(src)
+ H.update_mouse_pointer()
+ add_fingerprint(H)
+ log_message("[H] moved in as pilot.", LOG_MECHA)
+ setDir(dir_in)
+ playsound(src, 'sound/machines/windowdoor.ogg', 50, TRUE)
+ if(!internal_damage)
+ SEND_SOUND(H, sound('sound/mecha/nominal.ogg',volume=50))
+ return TRUE
+
+/obj/vehicle/sealed/mecha/proc/mmi_move_inside(obj/item/mmi/M, mob/user)
+ if(!M.brain_check(user))
+ return FALSE
var/mob/living/brain/B = M.brainmob
- if(occupant)
- to_chat(user, "Occupant detected!")
- return
+ if(LAZYLEN(occupants) >= max_occupants)
+ to_chat(user, "It's full!")
+ return FALSE
if(dna_lock && (!B.stored_dna || (dna_lock != B.stored_dna.unique_enzymes)))
to_chat(user, "Access denied. [name] is secured with a DNA lock.")
- return
+ return FALSE
visible_message("[user] starts to insert an MMI into [name].")
if(do_after(user, 40, target = src))
- if(!occupant)
+ if(LAZYLEN(occupants) < max_occupants)
return mmi_moved_inside(M, user)
else
- to_chat(user, "Occupant detected!")
+ to_chat(user, "Maximum occupants detected!")
else
to_chat(user, "You stop inserting the MMI.")
+ return FALSE
-/obj/mecha/proc/mmi_moved_inside(obj/item/mmi/M, mob/user)
+/obj/vehicle/sealed/mecha/proc/mmi_moved_inside(obj/item/mmi/M, mob/user)
if(!(Adjacent(M) && Adjacent(user)))
return FALSE
if(!M.brain_check(user))
@@ -988,69 +991,53 @@
return FALSE
M.mecha = src
- occupant = B
- silicon_pilot = TRUE
- B.forceMove(src) //should allow relaymove
+ add_occupant(B)//Note this forcemoves the brain into the mech to allow relaymove
+ mecha_flags |= SILICON_PILOT
B.reset_perspective(src)
B.remote_control = src
B.update_mobility()
B.update_mouse_pointer()
- icon_state = initial(icon_state)
update_icon()
setDir(dir_in)
log_message("[M] moved in as pilot.", LOG_MECHA)
if(!internal_damage)
- SEND_SOUND(occupant, sound('sound/mecha/nominal.ogg',volume=50))
- GrantActions(B)
+ SEND_SOUND(M, sound('sound/mecha/nominal.ogg',volume=50))
log_game("[key_name(user)] has put the MMI/posibrain of [key_name(B)] into [src] at [AREACOORD(src)]")
return TRUE
-/obj/mecha/container_resist_act(mob/living/user)
+/obj/vehicle/sealed/mecha/container_resist_act(mob/living/user)
+ if(isAI(user))
+ var/mob/living/silicon/ai/AI = user
+ if(!AI.can_shunt)
+ to_chat(AI, "You can't leave a mech after dominating it!.")
+ return FALSE
+ to_chat(user, "You begin the ejection procedure. Equipment is disabled during this process. Hold still to finish ejecting.")
is_currently_ejecting = TRUE
- to_chat(occupant, "You begin the ejection procedure. Equipment is disabled during this process. Hold still to finish ejecting.")
- if(do_after(occupant, has_gravity() ? exit_delay : 0 , target = src))
- to_chat(occupant, "You exit the mech.")
- go_out()
+ if(do_after(user, has_gravity() ? exit_delay : 0 , target = src))
+ to_chat(user, "You exit the mech.")
+ mob_exit(user, TRUE)
else
- to_chat(occupant, "You stop exiting the mech. Weapons are enabled again.")
+ to_chat(user, "You stop exiting the mech. Weapons are enabled again.")
is_currently_ejecting = FALSE
-/obj/mecha/Exited(atom/movable/M, atom/newloc)
- if(occupant && occupant == M) // The occupant exited the mech without calling go_out()
- go_out(TRUE, newloc)
+/obj/vehicle/sealed/mecha/proc/ejectall()
+ for(var/ejectee in occupants)
+ mob_exit(ejectee, TRUE, TRUE)
- if(cell && cell == M)
- cell = null
- return
- if(scanmod && scanmod == M)
- scanmod = null
- update_part_values()
- return
- if(capacitor && capacitor == M)
- armor = armor.modifyRating(energy = (capacitor.rating * -5)) //lose the energy armor if we lose this cap
- capacitor = null
- update_part_values()
-
-/obj/mecha/proc/go_out(forced, atom/newloc = loc)
- if(!occupant)
- return
+/obj/vehicle/sealed/mecha/mob_exit(mob/M, silent, forced)
+ var/newloc = get_turf(src)
var/atom/movable/mob_container
- occupant.clear_alert("charge")
- occupant.clear_alert("mech damage")
- if(ishuman(occupant))
- mob_container = occupant
- RemoveActions(occupant, human_occupant=1)
- else if(isbrain(occupant))
- var/mob/living/brain/brain = occupant
- RemoveActions(brain)
+ if(ishuman(M))
+ mob_container = M
+ else if(isbrain(M))
+ var/mob/living/brain/brain = M
mob_container = brain.container
- else if(isAI(occupant))
- var/mob/living/silicon/ai/AI = occupant
+ else if(isAI(M))
+ var/mob/living/silicon/ai/AI = M
if(forced)//This should only happen if there are multiple AIs in a round, and at least one is Malf.
- RemoveActions(occupant)
- occupant.gib() //If one Malf decides to steal a mech from another AI (even other Malfs!), they are destroyed, as they have nowhere to go when replaced.
- occupant = null
- silicon_pilot = FALSE
+ AI.gib() //If one Malf decides to steal a mech from another AI (even other Malfs!), they are destroyed, as they have nowhere to go when replaced.
+ AI = null
+ mecha_flags &= ~SILICON_PILOT
return
else
if(!AI.linked_core)
@@ -1060,15 +1047,13 @@
to_chat(AI, "Returning to core...")
AI.controlled_mech = null
AI.remote_control = null
- RemoveActions(occupant, 1)
mob_container = AI
newloc = get_turf(AI.linked_core)
qdel(AI.linked_core)
else
- return
- var/mob/living/L = occupant
- occupant = null //we need it null when forceMove calls Exited().
- silicon_pilot = FALSE
+ return ..()
+ var/mob/living/L = M
+ mecha_flags &= ~SILICON_PILOT
if(mob_container.forceMove(newloc))//ejecting mob container
log_message("[mob_container] moved out.", LOG_MECHA)
L << browse(null, "window=exosuit")
@@ -1078,53 +1063,65 @@
if(mmi.brainmob)
L.forceMove(mmi)
L.reset_perspective()
+ remove_occupant(L)
mmi.mecha = null
mmi.update_icon()
L.mobility_flags = NONE
- icon_state = initial(icon_state)+"-open"
+ update_icon()
setDir(dir_in)
+ return ..()
- if(L && L.client)
- L.update_mouse_pointer()
- L.client.view_size.resetToDefault()
+
+/obj/vehicle/sealed/mecha/add_occupant(mob/M, control_flags)
+ RegisterSignal(M, COMSIG_MOB_DEATH, .proc/mob_exit)
+ RegisterSignal(M, COMSIG_MOB_CLICKON, .proc/on_mouseclick)
+ RegisterSignal(M, COMSIG_MOB_SAY, .proc/display_speech_bubble)
+ update_icon()
+ return ..()
+
+/obj/vehicle/sealed/mecha/remove_occupant(mob/M)
+ UnregisterSignal(M, COMSIG_MOB_DEATH)
+ UnregisterSignal(M, COMSIG_MOB_CLICKON)
+ UnregisterSignal(M, COMSIG_MOB_SAY)
+ update_icon()
+ M.clear_alert("charge")
+ M.clear_alert("mech damage")
+ if(M.client)
+ M.update_mouse_pointer()
+ M.client.view_size.resetToDefault()
zoom_mode = 0
+ return ..()
/////////////////////////
////// Access stuff /////
/////////////////////////
-/obj/mecha/proc/operation_allowed(mob/M)
+/obj/vehicle/sealed/mecha/proc/operation_allowed(mob/M)
req_access = operation_req_access
req_one_access = list()
return allowed(M)
-/obj/mecha/proc/internals_access_allowed(mob/M)
+/obj/vehicle/sealed/mecha/proc/internals_access_allowed(mob/M)
req_one_access = internals_req_access
req_access = list()
return allowed(M)
-
-
////////////////////////////////
/////// Messages and Log ///////
////////////////////////////////
-/obj/mecha/proc/occupant_message(message as text)
- if(message)
- if(occupant && occupant.client)
- to_chat(occupant, "[icon2html(src, occupant)] [message]")
-
GLOBAL_VAR_INIT(year, time2text(world.realtime,"YYYY"))
GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013???
+//why is this in mecha
///////////////////////
///// Power stuff /////
///////////////////////
-/obj/mecha/proc/has_charge(amount)
+/obj/vehicle/sealed/mecha/proc/has_charge(amount)
return (get_charge()>=amount)
-/obj/mecha/proc/get_charge()
+/obj/vehicle/sealed/mecha/proc/get_charge()
for(var/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/R in equipment)
var/relay_charge = R.get_charge()
if(relay_charge)
@@ -1132,27 +1129,22 @@ GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013???
if(cell)
return max(0, cell.charge)
-/obj/mecha/proc/use_power(amount)
+/obj/vehicle/sealed/mecha/proc/use_power(amount)
if(get_charge() && cell.use(amount))
- return 1
- return 0
+ return TRUE
+ return FALSE
-/obj/mecha/proc/give_power(amount)
+/obj/vehicle/sealed/mecha/proc/give_power(amount)
if(!isnull(get_charge()))
cell.give(amount)
- return 1
- return 0
-
-/obj/mecha/update_remote_sight(mob/living/user)
- if(occupant_sight_flags)
- if(user == occupant)
- user.sight |= occupant_sight_flags
+ return TRUE
+ return FALSE
///////////////////////
////// Ammo stuff /////
///////////////////////
-/obj/mecha/proc/ammo_resupply(obj/item/mecha_ammo/A, mob/user,fail_chat_override = FALSE)
+/obj/vehicle/sealed/mecha/proc/ammo_resupply(obj/item/mecha_ammo/A, mob/user,fail_chat_override = FALSE)
if(!A.rounds)
if(!fail_chat_override)
to_chat(user, "This box of ammo is empty!")
diff --git a/code/game/mecha/combat/combat.dm b/code/modules/vehicles/mecha/combat/combat.dm
similarity index 75%
rename from code/game/mecha/combat/combat.dm
rename to code/modules/vehicles/mecha/combat/combat.dm
index d0e8a62cc65..4f964017958 100644
--- a/code/game/mecha/combat/combat.dm
+++ b/code/modules/vehicles/mecha/combat/combat.dm
@@ -1,4 +1,4 @@
-/obj/mecha/combat
+/obj/vehicle/sealed/mecha/combat
force = 30
internals_req_access = list(ACCESS_MECH_SCIENCE, ACCESS_MECH_SECURITY)
internal_damage_threshold = 50
@@ -7,11 +7,12 @@
destruction_sleep_duration = 40
exit_delay = 40
-/obj/mecha/combat/restore_equipment()
+/obj/vehicle/sealed/mecha/combat/restore_equipment()
mouse_pointer = 'icons/effects/mouse_pointers/mecha_mouse.dmi'
. = ..()
-/obj/mecha/combat/proc/max_ammo() //Max the ammo stored for Nuke Ops mechs, or anyone else that calls this
+
+/obj/vehicle/sealed/mecha/combat/proc/max_ammo() //Max the ammo stored for Nuke Ops mechs, or anyone else that calls this
for(var/obj/item/I in equipment)
if(istype(I, /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/))
var/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/gun = I
diff --git a/code/game/mecha/combat/durand.dm b/code/modules/vehicles/mecha/combat/durand.dm
similarity index 57%
rename from code/game/mecha/combat/durand.dm
rename to code/modules/vehicles/mecha/combat/durand.dm
index 1e40ba99bc0..576b5bacd0b 100644
--- a/code/game/mecha/combat/durand.dm
+++ b/code/modules/vehicles/mecha/combat/durand.dm
@@ -1,81 +1,80 @@
-/obj/mecha/combat/durand
+/obj/vehicle/sealed/mecha/combat/durand
desc = "An aging combat exosuit utilized by the Nanotrasen corporation. Originally developed to combat hostile alien lifeforms."
name = "\improper Durand"
icon_state = "durand"
- step_in = 4
+ movedelay = 4
dir_in = 1 //Facing North.
max_integrity = 400
deflect_chance = 20
armor = list(MELEE = 40, BULLET = 35, LASER = 15, ENERGY = 10, BOMB = 20, BIO = 0, RAD = 50, FIRE = 100, ACID = 100)
max_temperature = 30000
- infra_luminosity = 8
force = 40
wreckage = /obj/structure/mecha_wreckage/durand
var/obj/durand_shield/shield
-/obj/mecha/combat/durand/Initialize()
+/obj/vehicle/sealed/mecha/combat/durand/Initialize()
. = ..()
shield = new /obj/durand_shield(loc, src, layer, dir)
- RegisterSignal(src, COMSIG_MECHA_ACTION_ACTIVATE, .proc/relay)
+ RegisterSignal(src, COMSIG_MECHA_ACTION_TRIGGER, .proc/relay)
RegisterSignal(src, COMSIG_PROJECTILE_PREHIT, .proc/prehit)
-/obj/mecha/combat/durand/Destroy()
+/obj/vehicle/sealed/mecha/combat/durand/Destroy()
if(shield)
QDEL_NULL(shield)
return ..()
-/obj/mecha/combat/durand/GrantActions(mob/living/user, human_occupant = 0)
- ..()
- defense_action.Grant(user, src)
-
-/obj/mecha/combat/durand/RemoveActions(mob/living/user, human_occupant = 0)
- ..()
- defense_action.Remove(user)
-
-/obj/mecha/combat/durand/process()
+/obj/vehicle/sealed/mecha/combat/durand/generate_actions()
. = ..()
- if(defense_mode && !use_power(100))
- defense_action.Activate(forced_state = TRUE)
+ initialize_passenger_action_type(/datum/action/vehicle/sealed/mecha/mech_defense_mode)
-/obj/mecha/combat/durand/domove(direction)
+/obj/vehicle/sealed/mecha/combat/durand/process()
+ . = ..()
+ if(defense_mode && !use_power(100)) //Defence mode can only be on with a occupant so we check if one of them can toggle it and toggle
+ for(var/O in occupants)
+ var/mob/living/occupant = O
+ var/datum/action/action = LAZYACCESSASSOC(occupant_actions, occupant, /datum/action/vehicle/sealed/mecha/mech_defense_mode)
+ if(action)
+ action.Trigger()
+ break
+
+/obj/vehicle/sealed/mecha/combat/durand/Move(direction)
. = ..()
if(shield)
shield.forceMove(loc)
shield.setDir(dir)
-/obj/mecha/combat/durand/forceMove(turf/T)
+/obj/vehicle/sealed/mecha/combat/durand/forceMove(turf/T)
. = ..()
shield.forceMove(T)
-/obj/mecha/combat/durand/go_out(forced, atom/newloc = loc)
+/obj/vehicle/sealed/mecha/combat/durand/mob_exit(mob/M, silent, randomstep, forced)
if(defense_mode)
- defense_action.Activate(forced_state = TRUE)
- . = ..()
+ var/datum/action/action = LAZYACCESSASSOC(occupant_actions, M, /datum/action/vehicle/sealed/mecha/mech_defense_mode)
+ if(action)
+ action.Trigger(FALSE)
+ return ..()
///Relays the signal from the action button to the shield, and creates a new shield if the old one is MIA.
-/obj/mecha/combat/durand/proc/relay(datum/source, list/signal_args)
+/obj/vehicle/sealed/mecha/combat/durand/proc/relay(datum/source, mob/owner, list/signal_args)
SIGNAL_HANDLER
-
if(!shield) //if the shield somehow got deleted
stack_trace("Durand triggered relay without a shield")
shield = new /obj/durand_shield(loc, src, layer)
shield.setDir(dir)
- SEND_SIGNAL(shield, COMSIG_MECHA_ACTION_ACTIVATE, source, signal_args)
+ SEND_SIGNAL(shield, COMSIG_MECHA_ACTION_TRIGGER, owner, signal_args)
//Redirects projectiles to the shield if defense_check decides they should be blocked and returns true.
-/obj/mecha/combat/durand/proc/prehit(obj/projectile/source, list/signal_args)
- SIGNAL_HANDLER
-
+/obj/vehicle/sealed/mecha/combat/durand/proc/prehit(obj/projectile/source, list/signal_args)
if(defense_check(source.loc) && shield)
signal_args[2] = shield
/**Checks if defense mode is enabled, and if the attacker is standing in an area covered by the shield.
Expects a turf. Returns true if the attack should be blocked, false if not.*/
-/obj/mecha/combat/durand/proc/defense_check(turf/aloc)
+/obj/vehicle/sealed/mecha/combat/durand/proc/defense_check(turf/aloc)
if (!defense_mode || !shield || shield.switching)
return FALSE
. = FALSE
@@ -94,14 +93,14 @@ Expects a turf. Returns true if the attack should be blocked, false if not.*/
. = TRUE
return
-/obj/mecha/combat/durand/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, armor_penetration = 0)
+/obj/vehicle/sealed/mecha/combat/durand/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, armor_penetration = 0)
if(defense_check(user.loc))
log_message("Attack absorbed by defense field. Attacker - [user].", LOG_MECHA, color="orange")
shield.attack_generic(user, damage_amount, damage_type, damage_flag, sound_effect, armor_penetration)
else
. = ..()
-/obj/mecha/combat/durand/blob_act(obj/structure/blob/B)
+/obj/vehicle/sealed/mecha/combat/durand/blob_act(obj/structure/blob/B)
if(defense_check(B.loc))
log_message("Attack by blob. Attacker - [B].", LOG_MECHA, color="red")
log_message("Attack absorbed by defense field.", LOG_MECHA, color="orange")
@@ -109,14 +108,14 @@ Expects a turf. Returns true if the attack should be blocked, false if not.*/
else
. = ..()
-/obj/mecha/combat/durand/attackby(obj/item/W as obj, mob/user as mob, params)
+/obj/vehicle/sealed/mecha/combat/durand/attackby(obj/item/W as obj, mob/user as mob, params)
if(defense_check(user.loc))
log_message("Attack absorbed by defense field. Attacker - [user], with [W]", LOG_MECHA, color="orange")
shield.attackby(W, user, params)
else
. = ..()
-/obj/mecha/combat/durand/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
+/obj/vehicle/sealed/mecha/combat/durand/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if(defense_check(AM.loc))
log_message("Impact with [AM] absorbed by defense field.", LOG_MECHA, color="orange")
shield.hitby(AM, skipcatch, hitpush, blocked, throwingdatum)
@@ -147,8 +146,11 @@ own integrity back to max. Shield is automatically dropped if we run out of powe
light_power = 5
light_color = LIGHT_COLOR_ELECTRIC_CYAN
light_on = FALSE
- var/obj/mecha/combat/durand/chassis ///Our link back to the durand
- var/switching = FALSE ///To keep track of things during the animation
+ ///Our link back to the durand
+ var/obj/vehicle/sealed/mecha/combat/durand/chassis
+ ///To keep track of things during the animation
+ var/switching = FALSE
+ var/currentuser
/obj/durand_shield/Initialize(mapload, _chassis, _layer, _dir)
@@ -156,7 +158,7 @@ own integrity back to max. Shield is automatically dropped if we run out of powe
chassis = _chassis
layer = _layer
setDir(_dir)
- RegisterSignal(src, COMSIG_MECHA_ACTION_ACTIVATE, .proc/activate)
+ RegisterSignal(src, COMSIG_MECHA_ACTION_TRIGGER, .proc/activate)
/obj/durand_shield/Destroy()
@@ -165,29 +167,36 @@ own integrity back to max. Shield is automatically dropped if we run out of powe
chassis = null
return ..()
-/**Handles activating and deactivating the shield. This proc is called by a signal sent from the mech's action button
-and relayed by the mech itself. The "forced" variabe, signal_args[1], will skip the to-pilot text and is meant for when
-the shield is disabled by means other than the action button (like running out of power)*/
-
-/obj/durand_shield/proc/activate(datum/source, datum/action/innate/mecha/mech_defense_mode/button, list/signal_args)
+/**
+ *Handles activating and deactivating the shield. This proc is called by a signal sent from the mech's action button
+ *and relayed by the mech itself. The "forced" variabe, signal_args[1], will skip the to-pilot text and is meant for when
+ *the shield is disabled by means other than the action button (like running out of power)
+ * Arguments:
+ * * source: the shield
+ * * owner: mob that activated the shield
+ * * signal_args: whether it's forced
+ */
+/obj/durand_shield/proc/activate(datum/source, mob/owner, list/signal_args)
SIGNAL_HANDLER
-
- if(!chassis || !chassis.occupant)
+ currentuser = owner
+ if(!chassis?.occupants)
return
if(switching && !signal_args[1])
return
if(!chassis.defense_mode && (!chassis.cell || chassis.cell.charge < 100)) //If it's off, and we have less than 100 units of power
- chassis.occupant_message("Insufficient power; cannot activate defense mode.")
+ to_chat(currentuser, "[icon2html(src, currentuser)]Insufficient power; cannot activate defense mode.")
return
switching = TRUE
chassis.defense_mode = !chassis.defense_mode
- chassis.defense_action.button_icon_state = "mech_defense_mode_[chassis.defense_mode ? "on" : "off"]" //This is backwards because we haven't changed the var yet
if(!signal_args[1])
- chassis.occupant_message("Defense mode [chassis.defense_mode?"enabled":"disabled"].")
+ to_chat(currentuser, "[icon2html(src, currentuser)]Defense mode [chassis.defense_mode?"enabled":"disabled"].")
chassis.log_message("User has toggled defense mode -- now [chassis.defense_mode?"enabled":"disabled"].", LOG_MECHA)
else
chassis.log_message("defense mode state changed -- now [chassis.defense_mode?"enabled":"disabled"].", LOG_MECHA)
- chassis.defense_action.UpdateButtonIcon()
+ for(var/occupant in chassis.occupants)
+ var/datum/action/button = chassis.occupant_actions[occupant][/datum/action/vehicle/sealed/mecha/mech_defense_mode]
+ button.button_icon_state = "mech_defense_mode_[chassis.defense_mode ? "on" : "off"]"
+ button.UpdateButtonIcon()
set_light_on(chassis.defense_mode)
@@ -195,19 +204,20 @@ the shield is disabled by means other than the action button (like running out o
invisibility = 0
flick("shield_raise", src)
playsound(src, 'sound/mecha/mech_shield_raise.ogg', 50, FALSE)
- addtimer(CALLBACK(src, .proc/shield_icon_enable), 3)
+ set_light(l_range = MINIMUM_USEFUL_LIGHT_RANGE , l_power = 5, l_color = "#00FFFF")
+ icon_state = "shield"
+ RegisterSignal(chassis, COMSIG_ATOM_DIR_CHANGE, .proc/resetdir)
else
flick("shield_drop", src)
playsound(src, 'sound/mecha/mech_shield_drop.ogg', 50, FALSE)
- addtimer(CALLBACK(src, .proc/shield_icon_reset), 5)
+ set_light(0)
+ icon_state = "shield_null"
+ invisibility = INVISIBILITY_MAXIMUM //no showing on right-click
+ UnregisterSignal(chassis, COMSIG_ATOM_DIR_CHANGE)
switching = FALSE
-/obj/durand_shield/proc/shield_icon_enable()
- icon_state = "shield"
-
-/obj/durand_shield/proc/shield_icon_reset()
- icon_state = "shield_null"
- invisibility = INVISIBILITY_MAXIMUM //no showing on right-click
+/obj/durand_shield/proc/resetdir(datum/source, olddir, newdir)
+ setDir(newdir)
/obj/durand_shield/take_damage()
if(!chassis)
@@ -219,7 +229,10 @@ the shield is disabled by means other than the action button (like running out o
flick("shield_impact", src)
if(!chassis.use_power((max_integrity - obj_integrity) * 100))
chassis.cell?.charge = 0
- chassis.defense_action.Activate(forced_state = TRUE)
+ for(var/O in chassis.occupants)
+ var/mob/living/occupant = O
+ var/datum/action/action = LAZYACCESSASSOC(chassis.occupant_actions, occupant, /datum/action/vehicle/sealed/mecha/mech_defense_mode)
+ action.Trigger(FALSE)
obj_integrity = 10000
/obj/durand_shield/play_attack_sound()
diff --git a/code/game/mecha/combat/gygax.dm b/code/modules/vehicles/mecha/combat/gygax.dm
similarity index 73%
rename from code/game/mecha/combat/gygax.dm
rename to code/modules/vehicles/mecha/combat/gygax.dm
index b9ea3287ae4..a90b7763741 100644
--- a/code/game/mecha/combat/gygax.dm
+++ b/code/modules/vehicles/mecha/combat/gygax.dm
@@ -1,27 +1,22 @@
-/obj/mecha/combat/gygax
+/obj/vehicle/sealed/mecha/combat/gygax
desc = "A lightweight, security exosuit. Popular among private and corporate security."
name = "\improper Gygax"
icon_state = "gygax"
- step_in = 3
+ allow_diagonal_movement = TRUE
+ movedelay = 3
dir_in = 1 //Facing North.
max_integrity = 250
deflect_chance = 5
armor = list(MELEE = 25, BULLET = 20, LASER = 30, ENERGY = 15, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 100)
max_temperature = 25000
leg_overload_coeff = 80
- infra_luminosity = 6
force = 25
wreckage = /obj/structure/mecha_wreckage/gygax
internal_damage_threshold = 35
max_equip = 3
step_energy_drain = 3
-/obj/mecha/combat/gygax/mechturn(direction)
- . = ..()
- if(!strafe && !occupant.client.keys_held["Alt"])
- mechstep(direction) //agile mechs get to move and turn in the same step
-
-/obj/mecha/combat/gygax/dark
+/obj/vehicle/sealed/mecha/combat/gygax/dark
desc = "A lightweight exosuit, painted in a dark scheme. This model appears to have some modifications."
name = "\improper Dark Gygax"
icon_state = "darkgygax"
@@ -37,7 +32,7 @@
max_equip = 5
destruction_sleep_duration = 20
-/obj/mecha/combat/gygax/dark/loaded/Initialize()
+/obj/vehicle/sealed/mecha/combat/gygax/dark/loaded/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/thrusters/ion(src)
ME.attach(src)
@@ -51,7 +46,7 @@
ME.attach(src)
max_ammo()
-/obj/mecha/combat/gygax/dark/add_cell(obj/item/stock_parts/cell/C=null)
+/obj/vehicle/sealed/mecha/combat/gygax/dark/add_cell(obj/item/stock_parts/cell/C=null)
if(C)
C.forceMove(src)
cell = C
@@ -59,11 +54,6 @@
cell = new /obj/item/stock_parts/cell/bluespace(src)
-/obj/mecha/combat/gygax/GrantActions(mob/living/user, human_occupant = 0)
- ..()
- overload_action.Grant(user, src)
-
-
-/obj/mecha/combat/gygax/RemoveActions(mob/living/user, human_occupant = 0)
- ..()
- overload_action.Remove(user)
+/obj/vehicle/sealed/mecha/combat/gygax/generate_actions()
+ . = ..()
+ initialize_passenger_action_type(/datum/action/vehicle/sealed/mecha/mech_overload_mode)
diff --git a/code/game/mecha/combat/honker.dm b/code/modules/vehicles/mecha/combat/honker.dm
similarity index 91%
rename from code/game/mecha/combat/honker.dm
rename to code/modules/vehicles/mecha/combat/honker.dm
index f2fa0e6c569..da96bb2b949 100644
--- a/code/game/mecha/combat/honker.dm
+++ b/code/modules/vehicles/mecha/combat/honker.dm
@@ -1,22 +1,21 @@
-/obj/mecha/combat/honker
+/obj/vehicle/sealed/mecha/combat/honker
desc = "Produced by \"Tyranny of Honk, INC\", this exosuit is designed as heavy clown-support. Used to spread the fun and joy of life. HONK!"
name = "\improper H.O.N.K"
icon_state = "honker"
- step_in = 3
+ movedelay = 3
max_integrity = 140
deflect_chance = 60
internal_damage_threshold = 60
armor = list(MELEE = -20, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 100)
max_temperature = 25000
- infra_luminosity = 5
operation_req_access = list(ACCESS_THEATRE)
internals_req_access = list(ACCESS_MECH_SCIENCE, ACCESS_THEATRE)
wreckage = /obj/structure/mecha_wreckage/honker
- add_req_access = 0
+ mecha_flags = CANSTRAFE | IS_ENCLOSED | HAS_LIGHTS
max_equip = 3
var/squeak = TRUE
-/obj/mecha/combat/honker/get_stats_part()
+/obj/vehicle/sealed/mecha/combat/honker/get_stats_part(mob/user)
var/integrity = obj_integrity/max_integrity*100
var/cell_charge = get_charge()
var/datum/gas_mixture/int_tank_air = internal_tank.return_air()
@@ -35,12 +34,12 @@
AirHONK temperature: [tank_temperature]°K|[tank_temperature - T0C]°C
HONK pressure: [cabin_pressure>WARNING_HIGH_PRESSURE ? "[cabin_pressure]": cabin_pressure]kPa
HONK temperature: [return_temperature()]°K|[return_temperature() - T0C]°C
- Lights: [lights?"on":"off"]
+ Lights: [(mecha_flags & LIGHTS_ON)?"on":"off"]
[dna_lock?"DNA-locked:
[dna_lock] \[Reset\]
":null]
"}
return output
-/obj/mecha/combat/honker/get_stats_html()
+/obj/vehicle/sealed/mecha/combat/honker/get_stats_html(mob/user)
var/output = {"
@@ -83,7 +82,7 @@
- [src.get_stats_part()]
+ [src.get_stats_part(user)]
[src.get_equipment_list()]
@@ -97,7 +96,7 @@
"}
return output
-/obj/mecha/combat/honker/get_commands()
+/obj/vehicle/sealed/mecha/combat/honker/get_commands()
var/output = {"
@@ -121,8 +120,8 @@
return output
-/obj/mecha/combat/honker/get_equipment_list()
- if(!equipment.len)
+/obj/vehicle/sealed/mecha/combat/honker/get_equipment_list()
+ if(!LAZYLEN(equipment))
return
var/output = "
Honk-ON-Systems:"
for(var/obj/item/mecha_parts/mecha_equipment/MT in equipment)
@@ -130,12 +129,12 @@
output += "
"
return output
-/obj/mecha/combat/honker/play_stepsound()
+/obj/vehicle/sealed/mecha/combat/honker/play_stepsound()
if(squeak)
playsound(src, "clownstep", 70, 1)
squeak = !squeak
-/obj/mecha/combat/honker/Topic(href, href_list)
+/obj/vehicle/sealed/mecha/combat/honker/Topic(href, href_list)
..()
if (href_list["play_sound"])
switch(href_list["play_sound"])
diff --git a/code/game/mecha/combat/marauder.dm b/code/modules/vehicles/mecha/combat/marauder.dm
similarity index 81%
rename from code/game/mecha/combat/marauder.dm
rename to code/modules/vehicles/mecha/combat/marauder.dm
index d89573a843c..d595509d2eb 100644
--- a/code/game/mecha/combat/marauder.dm
+++ b/code/modules/vehicles/mecha/combat/marauder.dm
@@ -1,34 +1,28 @@
-/obj/mecha/combat/marauder
+/obj/vehicle/sealed/mecha/combat/marauder
desc = "Heavy-duty, combat exosuit, developed after the Durand model. Rarely found among civilian populations."
name = "\improper Marauder"
icon_state = "marauder"
- step_in = 5
+ movedelay = 5
max_integrity = 500
deflect_chance = 25
armor = list(MELEE = 50, BULLET = 55, LASER = 40, ENERGY = 30, BOMB = 30, BIO = 0, RAD = 60, FIRE = 100, ACID = 100)
max_temperature = 60000
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
- infra_luminosity = 3
operation_req_access = list(ACCESS_CENT_SPECOPS)
internals_req_access = list(ACCESS_CENT_SPECOPS)
wreckage = /obj/structure/mecha_wreckage/marauder
- add_req_access = 0
+ mecha_flags = CANSTRAFE | IS_ENCLOSED | HAS_LIGHTS
internal_damage_threshold = 25
force = 45
max_equip = 5
- bumpsmash = 1
+ bumpsmash = TRUE
-/obj/mecha/combat/marauder/GrantActions(mob/living/user, human_occupant = 0)
- ..()
- smoke_action.Grant(user, src)
- zoom_action.Grant(user, src)
+/obj/vehicle/sealed/mecha/combat/marauder/generate_actions()
+ . = ..()
+ initialize_passenger_action_type(/datum/action/vehicle/sealed/mecha/mech_smoke)
+ initialize_passenger_action_type(/datum/action/vehicle/sealed/mecha/mech_zoom)
-/obj/mecha/combat/marauder/RemoveActions(mob/living/user, human_occupant = 0)
- ..()
- smoke_action.Remove(user)
- zoom_action.Remove(user)
-
-/obj/mecha/combat/marauder/loaded/Initialize()
+/obj/vehicle/sealed/mecha/combat/marauder/loaded/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/thrusters/ion(src)
ME.attach(src)
@@ -42,20 +36,20 @@
ME.attach(src)
max_ammo()
-/obj/mecha/combat/marauder/seraph
+/obj/vehicle/sealed/mecha/combat/marauder/seraph
desc = "Heavy-duty, command-type exosuit. This is a custom model, utilized only by high-ranking military personnel."
name = "\improper Seraph"
icon_state = "seraph"
operation_req_access = list(ACCESS_CENT_SPECOPS)
internals_req_access = list(ACCESS_CENT_SPECOPS)
- step_in = 3
+ movedelay = 3
max_integrity = 550
wreckage = /obj/structure/mecha_wreckage/seraph
internal_damage_threshold = 20
force = 55
max_equip = 6
-/obj/mecha/combat/marauder/seraph/Initialize()
+/obj/vehicle/sealed/mecha/combat/marauder/seraph/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/thrusters/ion(src)
ME.attach(src)
@@ -71,7 +65,7 @@
ME.attach(src)
max_ammo()
-/obj/mecha/combat/marauder/mauler
+/obj/vehicle/sealed/mecha/combat/marauder/mauler
desc = "Heavy-duty, combat exosuit, developed off of the existing Marauder model."
name = "\improper Mauler"
icon_state = "mauler"
@@ -81,12 +75,12 @@
max_equip = 6
destruction_sleep_duration = 20
-/obj/mecha/combat/marauder/mauler/Initialize()
+/obj/vehicle/sealed/mecha/combat/marauder/mauler/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/thrusters/ion(src)
ME.attach(src)
-/obj/mecha/combat/marauder/mauler/loaded/Initialize()
+/obj/vehicle/sealed/mecha/combat/marauder/mauler/loaded/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg(src)
ME.attach(src)
diff --git a/code/game/mecha/combat/phazon.dm b/code/modules/vehicles/mecha/combat/phazon.dm
similarity index 60%
rename from code/game/mecha/combat/phazon.dm
rename to code/modules/vehicles/mecha/combat/phazon.dm
index 84c24c80839..c964b17e362 100644
--- a/code/game/mecha/combat/phazon.dm
+++ b/code/modules/vehicles/mecha/combat/phazon.dm
@@ -1,30 +1,21 @@
-/obj/mecha/combat/phazon
+/obj/vehicle/sealed/mecha/combat/phazon
desc = "This is a Phazon exosuit. The pinnacle of scientific research and pride of Nanotrasen, it uses cutting edge bluespace technology and expensive materials."
name = "\improper Phazon"
icon_state = "phazon"
- step_in = 2
+ movedelay = 2
dir_in = 2 //Facing South.
step_energy_drain = 3
max_integrity = 200
deflect_chance = 30
armor = list(MELEE = 30, BULLET = 30, LASER = 30, ENERGY = 30, BOMB = 30, BIO = 0, RAD = 50, FIRE = 100, ACID = 100)
max_temperature = 25000
- infra_luminosity = 3
wreckage = /obj/structure/mecha_wreckage/phazon
- add_req_access = 1
internal_damage_threshold = 25
force = 15
max_equip = 3
phase_state = "phazon-phase"
-/obj/mecha/combat/phazon/GrantActions(mob/living/user, human_occupant = 0)
- ..()
- switch_damtype_action.Grant(user, src)
- phasing_action.Grant(user, src)
-
-
-/obj/mecha/combat/phazon/RemoveActions(mob/living/user, human_occupant = 0)
- ..()
- switch_damtype_action.Remove(user)
- phasing_action.Remove(user)
-
+/obj/vehicle/sealed/mecha/combat/phazon/generate_actions()
+ . = ..()
+ initialize_passenger_action_type(/datum/action/vehicle/sealed/mecha/mech_toggle_phasing)
+ initialize_passenger_action_type(/datum/action/vehicle/sealed/mecha/mech_switch_damtype)
diff --git a/code/game/mecha/combat/reticence.dm b/code/modules/vehicles/mecha/combat/reticence.dm
similarity index 83%
rename from code/game/mecha/combat/reticence.dm
rename to code/modules/vehicles/mecha/combat/reticence.dm
index b5411991f65..9d2698c1a03 100644
--- a/code/game/mecha/combat/reticence.dm
+++ b/code/modules/vehicles/mecha/combat/reticence.dm
@@ -1,8 +1,8 @@
-/obj/mecha/combat/reticence
+/obj/vehicle/sealed/mecha/combat/reticence
desc = "A silent, fast, and nigh-invisible miming exosuit. Popular among mimes and mime assassins."
name = "\improper reticence"
icon_state = "reticence"
- step_in = 2
+ movedelay = 2
dir_in = 1 //Facing North.
max_integrity = 100
deflect_chance = 3
@@ -11,7 +11,7 @@
wreckage = /obj/structure/mecha_wreckage/reticence
operation_req_access = list(ACCESS_THEATRE)
internals_req_access = list(ACCESS_MECH_SCIENCE, ACCESS_THEATRE)
- add_req_access = 0
+ mecha_flags = CANSTRAFE | IS_ENCLOSED | HAS_LIGHTS
internal_damage_threshold = 25
max_equip = 2
step_energy_drain = 3
@@ -19,8 +19,7 @@
stepsound = null
turnsound = null
-
-/obj/mecha/combat/reticence/loaded/Initialize()
+/obj/vehicle/sealed/mecha/combat/reticence/loaded/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced
ME.attach(src)
diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/modules/vehicles/mecha/equipment/mecha_equipment.dm
similarity index 64%
rename from code/game/mecha/equipment/mecha_equipment.dm
rename to code/modules/vehicles/mecha/equipment/mecha_equipment.dm
index 67df4e24b6d..617b82603a8 100644
--- a/code/game/mecha/equipment/mecha_equipment.dm
+++ b/code/modules/vehicles/mecha/equipment/mecha_equipment.dm
@@ -7,10 +7,10 @@
icon_state = "mecha_equip"
force = 5
max_integrity = 300
- var/equip_cooldown = 0 // cooldown after use
- var/equip_ready = 1 //whether the equipment is ready for use. (or deactivated/activated for static stuff)
+ var/equip_cooldown = 0
+ var/equip_ready = TRUE //whether the equipment is ready for use. (or deactivated/activated for static stuff)
var/energy_drain = 0
- var/obj/mecha/chassis = null
+ var/obj/vehicle/sealed/mecha/chassis = null
///Bitflag. Determines the range of the equipment.
var/range = MECHA_MELEE
/// Bitflag. Used by exosuit fabricator to assign sub-categories based on which exosuits can equip this.
@@ -23,33 +23,33 @@
/obj/item/mecha_parts/mecha_equipment/proc/update_chassis_page()
if(chassis)
- send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list())
- send_byjax(chassis.occupant,"exosuit.browser","equipment_menu",chassis.get_equipment_menu(),"dropdowns")
- return 1
+ send_byjax(chassis.occupants,"exosuit.browser","eq_list",chassis.get_equipment_list())
+ send_byjax(chassis.occupants,"exosuit.browser","equipment_menu",chassis.get_equipment_menu(),"dropdowns")
+ return TRUE
return
/obj/item/mecha_parts/mecha_equipment/proc/update_equip_info()
if(chassis)
- send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",get_equip_info())
- return 1
+ send_byjax(chassis.occupants,"exosuit.browser","[REF(src)]",get_equip_info())
+ return TRUE
return
/obj/item/mecha_parts/mecha_equipment/Destroy()
if(chassis)
- chassis.equipment -= src
+ LAZYREMOVE(chassis.equipment, src)
if(chassis.selected == src)
chassis.selected = null
- src.update_chassis_page()
+ update_chassis_page()
log_message("[src] is destroyed.", LOG_MECHA)
- if(chassis.occupant)
- chassis.occupant_message("
[src] is destroyed!")
- chassis.occupant.playsound_local(chassis, destroy_sound, 50)
+ if(chassis.occupants)
+ to_chat(chassis.occupants, "[icon2html(src, chassis.occupants)]
[src] is destroyed!")
+ playsound(chassis, destroy_sound, 50)
if(!detachable) //If we're a built-in nondetachable equipment, let's lock up the slot that we were in.
chassis.max_equip--
chassis = null
return ..()
-/obj/item/mecha_parts/mecha_equipment/try_attach_part(mob/user, obj/mecha/M)
+/obj/item/mecha_parts/mecha_equipment/try_attach_part(mob/user, obj/vehicle/sealed/mecha/M)
if(can_attach(M))
if(!user.temporarilyRemoveItemFromInventory(src))
return FALSE
@@ -72,62 +72,53 @@
return txt
-/obj/item/mecha_parts/mecha_equipment/proc/is_ranged()//add a distance restricted equipment. Why not?
- return range&MECHA_RANGED
-
-/obj/item/mecha_parts/mecha_equipment/proc/is_melee()
- return range&MECHA_MELEE
-
-
/obj/item/mecha_parts/mecha_equipment/proc/action_checks(atom/target)
if(!target)
- return 0
+ return FALSE
if(!chassis)
- return 0
+ return FALSE
if(!equip_ready)
- return 0
+ return FALSE
if(energy_drain && !chassis.has_charge(energy_drain))
- return 0
+ return FALSE
if(chassis.is_currently_ejecting)
- return 0
+ return FALSE
if(chassis.equipment_disabled)
- to_chat(chassis.occupant, "
Error -- Equipment control unit is unresponsive.")
- return 0
- return 1
+ to_chat(chassis.occupants, "
Error -- Equipment control unit is unresponsive.")
+ return FALSE
+ if(TIMER_COOLDOWN_CHECK(chassis, COOLDOWN_MECHA_EQUIPMENT))
+ return FALSE
+ return TRUE
-/obj/item/mecha_parts/mecha_equipment/proc/action(atom/target)
- return 0
-
-/obj/item/mecha_parts/mecha_equipment/proc/start_cooldown()
- set_ready_state(0)
+/obj/item/mecha_parts/mecha_equipment/proc/action(mob/source, atom/target, params)
+ TIMER_COOLDOWN_START(chassis, COOLDOWN_MECHA_EQUIPMENT, equip_cooldown)//Cooldown is on the MECH so people dont bypass it by switching equipment
+ send_byjax(chassis.occupants,"exosuit.browser","[REF(src)]",src.get_equip_info())
chassis.use_power(energy_drain)
- addtimer(CALLBACK(src, .proc/set_ready_state, 1), equip_cooldown)
+ return TRUE
-/obj/item/mecha_parts/mecha_equipment/proc/do_after_cooldown(atom/target)
+/obj/item/mecha_parts/mecha_equipment/proc/do_after_cooldown(atom/target, mob/user)
if(!chassis)
return
var/C = chassis.loc
- set_ready_state(0)
chassis.use_power(energy_drain)
- . = do_after(chassis.occupant, equip_cooldown, target=target)
- set_ready_state(1)
+ . = do_after(user, equip_cooldown, target=target)
if(!chassis || chassis.loc != C || src != chassis.selected || !(get_dir(chassis, target)&chassis.dir))
- return 0
+ return FALSE
-/obj/item/mecha_parts/mecha_equipment/proc/do_after_mecha(atom/target, delay)
+/obj/item/mecha_parts/mecha_equipment/proc/do_after_mecha(atom/target, mob/user, delay)
if(!chassis)
return
var/C = chassis.loc
- . = do_after(chassis.occupant, delay, target=target)
+ . = do_after(user, delay, target=target)
if(!chassis || chassis.loc != C || src != chassis.selected || !(get_dir(chassis, target)&chassis.dir))
- return 0
+ return FALSE
-/obj/item/mecha_parts/mecha_equipment/proc/can_attach(obj/mecha/M)
- if(M.equipment.len
You start putting [target] into [src]...")
+ to_chat(source, "[icon2html(src, source)]You start putting [target] into [src]...")
chassis.visible_message("[chassis] starts putting [target] into \the [src].")
- if(do_after_cooldown(target))
- if(!patient_insertion_check(target))
+ if(do_after(source, equip_cooldown, target=target))
+ if(!chassis || src != chassis.selected || !(get_dir(chassis, target)&chassis.dir))
+ return
+ if(!patient_insertion_check(target, source))
return
target.forceMove(src)
patient = target
START_PROCESSING(SSobj, src)
update_equip_info()
- occupant_message("[target] successfully loaded into [src]. Life support functions engaged.")
+ to_chat(source, "[icon2html(src, source)][target] successfully loaded into [src]. Life support functions engaged.")
chassis.visible_message("[chassis] loads [target] into [src].")
log_message("[target] loaded. Life support functions engaged.", LOG_MECHA)
+ return ..()
-/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/patient_insertion_check(mob/living/carbon/target)
+/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/patient_insertion_check(mob/living/carbon/target, mob/user)
if(target.buckled)
- occupant_message("[target] will not fit into the sleeper because [target.p_theyre()] buckled to [target.buckled]!")
+ to_chat(user, "[icon2html(src, user)][target] will not fit into the sleeper because [target.p_theyre()] buckled to [target.buckled]!")
return
if(target.has_buckled_mobs())
- occupant_message("[target] will not fit into the sleeper because of the creatures attached to it!")
+ to_chat(user, "[icon2html(src, user)][target] will not fit into the sleeper because of the creatures attached to it!")
return
if(patient)
- occupant_message("The sleeper is already occupied!")
+ to_chat(user, "[icon2html(src, user)]The sleeper is already occupied!")
return
- return 1
+ return TRUE
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/go_out()
if(!patient)
return
patient.forceMove(get_turf(src))
- occupant_message("[patient] ejected. Life support functions disabled.")
+ to_chat(chassis.occupants, "[icon2html(src, chassis.occupants)][patient] ejected. Life support functions disabled.")
log_message("[patient] ejected. Life support functions disabled.", LOG_MECHA)
STOP_PROCESSING(SSobj, src)
patient = null
@@ -93,7 +95,7 @@
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/detach()
if(patient)
- occupant_message("Unable to detach [src] - equipment occupied!")
+ to_chat(chassis.occupants, "[icon2html(src, chassis.occupants)]Unable to detach [src] - equipment occupied!")
return
STOP_PROCESSING(SSobj, src)
return ..()
@@ -107,17 +109,21 @@
return "[output] [temp]"
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/Topic(href,href_list)
- ..()
+ . = ..()
+ if(.)
+ return
+ if(!(usr in chassis.occupants))
+ return
if(href_list["eject"])
go_out()
if(href_list["view_stats"])
- chassis.occupant << browse(get_patient_stats(),"window=msleeper")
- onclose(chassis.occupant, "msleeper")
+ usr << browse(get_patient_stats(),"window=msleeper")
+ onclose(usr, "msleeper")
return
if(href_list["inject"])
var/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/SG = locate() in chassis
var/datum/reagent/R = locate(href_list["inject"]) in SG.reagents.reagent_list
- if (istype(R))
+ if(istype(R))
inject_reagent(R, SG)
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/get_patient_stats()
@@ -194,9 +200,9 @@
return 0
var/to_inject = min(R.volume, inject_amount)
if(to_inject && patient.reagents.get_reagent_amount(R.type) + to_inject <= inject_amount*2)
- occupant_message("Injecting [patient] with [to_inject] units of [R.name].")
+ to_chat(chassis.occupants, "[icon2html(src, chassis.occupants)]Injecting [patient] with [to_inject] units of [R.name].")
log_message("Injecting [patient] with [to_inject] units of [R.name].", LOG_MECHA)
- log_combat(chassis.occupant, patient, "injected", "[name] ([R] - [to_inject] units)")
+ log_combat(chassis.occupants, patient, "injected", "[name] ([R] - [to_inject] units)")
SG.reagents.trans_id_to(patient,R.type,to_inject)
update_equip_info()
return
@@ -204,9 +210,9 @@
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/update_equip_info()
if(..())
if(patient)
- send_byjax(chassis.occupant,"msleeper.browser","lossinfo",get_patient_dam())
- send_byjax(chassis.occupant,"msleeper.browser","reagents",get_patient_reagents())
- send_byjax(chassis.occupant,"msleeper.browser","injectwith",get_available_reagents())
+ send_byjax(chassis.occupants,"msleeper.browser","lossinfo",get_patient_dam())
+ send_byjax(chassis.occupants,"msleeper.browser","reagents",get_patient_reagents())
+ send_byjax(chassis.occupants,"msleeper.browser","injectwith",get_available_reagents())
return 1
return
@@ -217,9 +223,8 @@
if(..())
return
if(!chassis.has_charge(energy_drain))
- set_ready_state(1)
log_message("Deactivated.", LOG_MECHA)
- occupant_message("[src] deactivated - no power.")
+ to_chat(chassis.occupants, "[icon2html(src, chassis.occupants)][src] deactivated - no power.")
STOP_PROCESSING(SSobj, src)
return
var/mob/living/carbon/M = patient
@@ -274,7 +279,7 @@
STOP_PROCESSING(SSobj, src)
return ..()
-/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/can_attach(obj/mecha/medical/M)
+/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/can_attach(obj/vehicle/sealed/mecha/medical/M)
if(..())
if(istype(M))
return 1
@@ -285,38 +290,36 @@
if(output)
return "[output] \[[mode? "Analyze" : "Launch"]\]
\[Syringes: [syringes.len]/[max_syringes] | Reagents: [reagents.total_volume]/[reagents.maximum_volume]\]
Reagents list"
-/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/action(atom/movable/target)
+/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/action(mob/source, atom/movable/target, params)
if(!action_checks(target))
return
if(istype(target, /obj/item/reagent_containers/syringe))
return load_syringe(target)
if(istype(target, /obj/item/storage))//Loads syringes from boxes
for(var/obj/item/reagent_containers/syringe/S in target.contents)
- load_syringe(S)
+ load_syringe(S, source)
return
if(mode)
- return analyze_reagents(target)
+ return analyze_reagents(target, source)
if(!syringes.len)
- occupant_message("No syringes loaded.")
+ to_chat(source, "[icon2html(src, source)]No syringes loaded.")
return
if(reagents.total_volume<=0)
- occupant_message("No available reagents to load syringe with.")
+ to_chat(source, "[icon2html(src, source)]No available reagents to load syringe with.")
return
- if(HAS_TRAIT(chassis.occupant, TRAIT_PACIFISM))
- occupant_message("The [src] is lethally chambered! You don't want to risk harming anyone...")
+ if(HAS_TRAIT(source, TRAIT_PACIFISM))
+ to_chat(source, "The [src] is lethally chambered! You don't want to risk harming anyone...")
return
var/turf/trg = get_turf(target)
var/obj/item/reagent_containers/syringe/mechsyringe = syringes[1]
mechsyringe.forceMove(get_turf(chassis))
- reagents.trans_to(mechsyringe, min(mechsyringe.volume, reagents.total_volume), transfered_by = chassis.occupant)
+ reagents.trans_to(mechsyringe, min(mechsyringe.volume, reagents.total_volume), transfered_by = source)
syringes -= mechsyringe
mechsyringe.icon = 'icons/obj/chemical.dmi'
mechsyringe.icon_state = "syringeproj"
playsound(chassis, 'sound/items/syringeproj.ogg', 50, TRUE)
- log_message("Launched [mechsyringe] from [src], targeting [target].", LOG_MECHA)
- var/mob/originaloccupant = chassis.occupant
- spawn(0)
- src = null //if src is deleted, still process the syringe
+ log_message("Launched [mechsyringe] from [src] by [source], targeting [target].", LOG_MECHA)
+ spawn(0) //This code is trash and whoever wrote it should feel bad
for(var/i=0, i<6, i++)
if(!mechsyringe)
break
@@ -334,9 +337,9 @@
R += "[A.name] ([num2text(A.volume)]"
mechsyringe.icon_state = initial(mechsyringe.icon_state)
mechsyringe.icon = initial(mechsyringe.icon)
- mechsyringe.reagents.trans_to(M, mechsyringe.reagents.total_volume, transfered_by = originaloccupant, methods = INJECT)
+ mechsyringe.reagents.trans_to(M, mechsyringe.reagents.total_volume, transfered_by = source, methods = INJECT)
M.take_bodypart_damage(2)
- log_combat(originaloccupant, M, "shot", "syringegun")
+ log_combat(source, M, "shot", "syringegun")
break
else if(mechsyringe.loc == trg)
mechsyringe.icon_state = initial(mechsyringe.icon_state)
@@ -349,7 +352,7 @@
mechsyringe.update_icon()
break
sleep(1)
- return 1
+ return ..()
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Topic(href,href_list)
@@ -373,12 +376,14 @@
if(processed_reagents.len)
message += " added to production"
START_PROCESSING(SSobj, src)
- occupant_message(message)
- occupant_message("Reagent processing started.")
+ to_chat(usr, message)
+ to_chat(usr, "[icon2html(src, usr)]Reagent processing started.")
log_message("Reagent processing started.", LOG_MECHA)
return
if (href_list["show_reagents"])
- chassis.occupant << browse(get_reagents_page(),"window=msyringegun")
+ if(!(usr in chassis.occupants))
+ return
+ usr << browse(get_reagents_page(),"window=msyringegun")
if (href_list["purge_reagent"])
var/reagent = href_list["purge_reagent"]
if(reagent)
@@ -447,55 +452,55 @@
output += "Total: [round(reagents.total_volume,0.001)]/[reagents.maximum_volume] - Purge All"
return output || "None"
-/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/load_syringe(obj/item/reagent_containers/syringe/S)
+/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/load_syringe(obj/item/reagent_containers/syringe/S, mob/user)
if(syringes.len= 2)
- occupant_message("The syringe is too far away!")
+ to_chat(user, "[icon2html(src, user)]The syringe is too far away!")
return 0
for(var/obj/structure/D in S.loc)//Basic level check for structures in the way (Like grilles and windows)
if(!(D.CanPass(S,src.loc)))
- occupant_message("Unable to load syringe!")
+ to_chat(user, "[icon2html(src, user)]Unable to load syringe!")
return 0
for(var/obj/machinery/door/D in S.loc)//Checks for doors
if(!(D.CanPass(S,src.loc)))
- occupant_message("Unable to load syringe!")
+ to_chat(user, "[icon2html(src, user)]Unable to load syringe!")
return 0
- S.reagents.trans_to(src, S.reagents.total_volume, transfered_by = chassis.occupant)
+ S.reagents.trans_to(src, S.reagents.total_volume, transfered_by = user)
S.forceMove(src)
syringes += S
- occupant_message("Syringe loaded.")
+ to_chat(user, "[icon2html(src, user)]Syringe loaded.")
update_equip_info()
return 1
- occupant_message("[src]'s syringe chamber is full!")
+ to_chat(user, "[icon2html(src, user)][src]'s syringe chamber is full!")
return 0
-/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/analyze_reagents(atom/A)
+/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/analyze_reagents(atom/A, mob/user)
if(get_dist(src,A) >= 4)
- occupant_message("The object is too far away!")
- return 0
+ to_chat(user, "[icon2html(src, user)]The object is too far away!")
+ return FALSE
if(!A.reagents || ismob(A))
- occupant_message("No reagent info gained from [A].")
- return 0
- occupant_message("Analyzing reagents...")
+ to_chat(user, "[icon2html(src, user)]No reagent info gained from [A].")
+ return FALSE
+ to_chat(user, "[icon2html(src, user)]Analyzing reagents...")
for(var/datum/reagent/R in A.reagents.reagent_list)
if(R.can_synth && add_known_reagent(R.type,R.name))
- occupant_message("Reagent analyzed, identified as [R.name] and added to database.")
- send_byjax(chassis.occupant,"msyringegun.browser","reagents_form",get_reagents_form())
- occupant_message("Analysis complete.")
- return 1
+ to_chat(user, "[icon2html(src, user)]Reagent analyzed, identified as [R.name] and added to database.")
+ send_byjax(chassis.occupants,"msyringegun.browser","reagents_form",get_reagents_form())
+ to_chat(user, "[icon2html(src, user)]Analysis complete.")
+ return TRUE
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/add_known_reagent(r_id,r_name)
if(!(r_id in known_reagents))
known_reagents += r_id
known_reagents[r_id] = r_name
- return 1
- return 0
+ return TRUE
+ return FALSE
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/update_equip_info()
if(..())
- send_byjax(chassis.occupant,"msyringegun.browser","reagents",get_current_reagents())
- send_byjax(chassis.occupant,"msyringegun.browser","reagents_form",get_reagents_form())
- return 1
+ send_byjax(chassis.occupants,"msyringegun.browser","reagents",get_current_reagents())
+ send_byjax(chassis.occupants,"msyringegun.browser","reagents_form",get_reagents_form())
+ return TRUE
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/on_reagent_change(changetype)
..()
@@ -506,7 +511,7 @@
if(..())
return
if(!processed_reagents.len || reagents.total_volume >= reagents.maximum_volume || !chassis.has_charge(energy_drain))
- occupant_message("Reagent processing stopped.")
+ to_chat(chassis.occupants, "[icon2html(src, chassis.occupants)]Reagent processing stopped.")
log_message("Reagent processing stopped.", LOG_MECHA)
STOP_PROCESSING(SSobj, src)
return
@@ -542,7 +547,7 @@
return
medigun.process()
-/obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam/action(atom/target)
+/obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam/action(mob/source, atom/movable/target, params)
medigun.process_fire(target, loc)
diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/modules/vehicles/mecha/equipment/tools/mining_tools.dm
similarity index 78%
rename from code/game/mecha/equipment/tools/mining_tools.dm
rename to code/modules/vehicles/mecha/equipment/tools/mining_tools.dm
index 941ca65d72e..ef856fe5434 100644
--- a/code/game/mecha/equipment/tools/mining_tools.dm
+++ b/code/modules/vehicles/mecha/equipment/tools/mining_tools.dm
@@ -13,6 +13,7 @@
energy_drain = 10
force = 15
harmful = TRUE
+ range = MECHA_MELEE
tool_behaviour = TOOL_DRILL
toolspeed = 0.9
var/drill_delay = 7
@@ -23,7 +24,7 @@
. = ..()
AddComponent(/datum/component/butchering, 50, 100, null, null, TRUE)
-/obj/item/mecha_parts/mecha_equipment/drill/action(atom/target)
+/obj/item/mecha_parts/mecha_equipment/drill/action(mob/source, atom/target, params)
if(!action_checks(target))
return
if(isspaceturf(target))
@@ -36,48 +37,45 @@
"[chassis] starts to drill [target]...", \
"You hear drilling.")
- if(do_after_cooldown(target))
- set_ready_state(FALSE)
+ if(do_after_cooldown(target, source))
log_message("Started drilling [target]", LOG_MECHA)
if(isturf(target))
var/turf/T = target
- T.drill_act(src)
- set_ready_state(TRUE)
+ T.drill_act(src, source)
return
- while(do_after_mecha(target, drill_delay))
+ while(do_after_mecha(target, source, drill_delay))
if(isliving(target))
- drill_mob(target, chassis.occupant)
+ drill_mob(target, source)
playsound(src,'sound/weapons/drill.ogg',40,TRUE)
else if(isobj(target))
var/obj/O = target
O.take_damage(15, BRUTE, 0, FALSE, get_dir(chassis, target))
playsound(src,'sound/weapons/drill.ogg',40,TRUE)
else
- set_ready_state(TRUE)
return
- set_ready_state(TRUE)
+ return ..()
-/turf/proc/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
+/turf/proc/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill, mob/user)
return
-/turf/closed/wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
- if(drill.do_after_mecha(src, 60 / drill.drill_level))
+/turf/closed/wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill, mob/user)
+ if(drill.do_after_mecha(src, user, 60 / drill.drill_level))
drill.log_message("Drilled through [src]", LOG_MECHA)
dismantle_wall(TRUE, FALSE)
-/turf/closed/wall/r_wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
+/turf/closed/wall/r_wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill, mob/user)
if(drill.drill_level >= DRILL_HARDENED)
- if(drill.do_after_mecha(src, 120 / drill.drill_level))
+ if(drill.do_after_mecha(src, user, 120 / drill.drill_level))
drill.log_message("Drilled through [src]", LOG_MECHA)
dismantle_wall(TRUE, FALSE)
else
- drill.occupant_message("[src] is too durable to drill through.")
+ to_chat(user, "[icon2html(src, user)][src] is too durable to drill through.")
-/turf/closed/mineral/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
+/turf/closed/mineral/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill, mob/user)
for(var/turf/closed/mineral/M in range(drill.chassis,1))
if(get_dir(drill.chassis,M)&drill.chassis.dir)
M.gets_drilled()
- drill.log_message("Drilled through [src]", LOG_MECHA)
+ drill.log_message("[user] drilled through [src]", LOG_MECHA)
drill.move_ores()
/turf/open/floor/plating/asteroid/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
@@ -89,17 +87,17 @@
/obj/item/mecha_parts/mecha_equipment/drill/proc/move_ores()
- if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in chassis.equipment && istype(chassis, /obj/mecha/working/ripley))
- var/obj/mecha/working/ripley/R = chassis //we could assume that it's a ripley because it has a clamp, but that's ~unsafe~ and ~bad practice~
+ if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in chassis.equipment && istype(chassis, /obj/vehicle/sealed/mecha/working/ripley))
+ var/obj/vehicle/sealed/mecha/working/ripley/R = chassis //we could assume that it's a ripley because it has a clamp, but that's ~unsafe~ and ~bad practice~
R.collect_ore()
-/obj/item/mecha_parts/mecha_equipment/drill/can_attach(obj/mecha/M as obj)
+/obj/item/mecha_parts/mecha_equipment/drill/can_attach(obj/vehicle/sealed/mecha/M as obj)
if(..())
- if(istype(M, /obj/mecha/working) || istype(M, /obj/mecha/combat))
- return 1
- return 0
+ if(istype(M, /obj/vehicle/sealed/mecha/working) || istype(M, /obj/vehicle/sealed/mecha/combat))
+ return TRUE
+ return FALSE
-/obj/item/mecha_parts/mecha_equipment/drill/attach(obj/mecha/M)
+/obj/item/mecha_parts/mecha_equipment/drill/attach(obj/vehicle/sealed/mecha/M)
..()
var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering)
butchering.butchering_enabled = TRUE
@@ -160,9 +158,9 @@
. = ..()
START_PROCESSING(SSfastprocess, src)
-/obj/item/mecha_parts/mecha_equipment/mining_scanner/can_attach(obj/mecha/M as obj)
+/obj/item/mecha_parts/mecha_equipment/mining_scanner/can_attach(obj/vehicle/sealed/mecha/M as obj)
if(..())
- if(istype(M, /obj/mecha/working))
+ if(istype(M, /obj/vehicle/sealed/mecha/working))
return TRUE
return FALSE
@@ -170,9 +168,9 @@
if(!loc)
STOP_PROCESSING(SSfastprocess, src)
qdel(src)
- if(istype(loc, /obj/mecha/working) && scanning_time <= world.time)
- var/obj/mecha/working/mecha = loc
- if(!mecha.occupant)
+ if(istype(loc, /obj/vehicle/sealed/mecha/working) && scanning_time <= world.time)
+ var/obj/vehicle/sealed/mecha/working/mecha = loc
+ if(!mecha.occupants)
return
scanning_time = world.time + equip_cooldown
mineral_scan_pulse(get_turf(src))
diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/modules/vehicles/mecha/equipment/tools/other_tools.dm
similarity index 84%
rename from code/game/mecha/equipment/tools/other_tools.dm
rename to code/modules/vehicles/mecha/equipment/tools/other_tools.dm
index dde9a408d00..af1af168047 100644
--- a/code/game/mecha/equipment/tools/other_tools.dm
+++ b/code/modules/vehicles/mecha/equipment/tools/other_tools.dm
@@ -13,13 +13,13 @@
range = MECHA_RANGED
var/teleport_range = 7
-/obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target)
+/obj/item/mecha_parts/mecha_equipment/teleporter/action(mob/source, atom/target, params)
if(!action_checks(target) || is_centcom_level(loc.z))
return
var/turf/T = get_turf(target)
if(T && (loc.z == T.z) && (get_dist(loc, T) <= teleport_range))
do_teleport(chassis, T, 4, channel = TELEPORT_CHANNEL_BLUESPACE)
- return 1
+ return ..()
@@ -34,7 +34,7 @@
range = MECHA_RANGED
-/obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(atom/target)
+/obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(mob/source, atom/target, params)
if(!action_checks(target) || is_centcom_level(loc.z))
return
var/list/theareas = get_areas_in_range(100, chassis)
@@ -45,10 +45,10 @@
var/turf/pos = get_turf(src)
for(var/turf/T in get_area_turfs(thearea.type))
if(!T.density && pos.z == T.z)
- var/clear = 1
+ var/clear = TRUE
for(var/obj/O in T)
if(O.density)
- clear = 0
+ clear = FALSE
break
if(clear)
L+=T
@@ -59,11 +59,11 @@
return
var/list/obj/effect/portal/created = create_portal_pair(get_turf(src), target_turf, 300, 1, /obj/effect/portal/anom)
var/turf/T = get_turf(target)
- message_admins("[ADMIN_LOOKUPFLW(chassis.occupant)] used a Wormhole Generator in [ADMIN_VERBOSEJMP(T)]")
- log_game("[key_name(chassis.occupant)] used a Wormhole Generator in [AREACOORD(T)]")
+ message_admins("[ADMIN_LOOKUPFLW(source)] used a Wormhole Generator in [ADMIN_VERBOSEJMP(T)]")
+ log_game("[key_name(source)] used a Wormhole Generator in [AREACOORD(T)]")
src = null
QDEL_LIST_IN(created, rand(150,300))
- return 1
+ return ..()
/////////////////////////////////////// GRAVITATIONAL CATAPULT ///////////////////////////////////////////
@@ -79,36 +79,36 @@
var/mode = 1 //1 - gravsling 2 - gravpush
-/obj/item/mecha_parts/mecha_equipment/gravcatapult/action(atom/movable/target)
+/obj/item/mecha_parts/mecha_equipment/gravcatapult/action(mob/source, atom/movable/target, params)
if(!action_checks(target))
return
switch(mode)
if(1)
if(!locked)
if(!istype(target) || target.anchored || target.move_resist >= MOVE_FORCE_EXTREMELY_STRONG)
- occupant_message("Unable to lock on [target]!")
+ to_chat(source, "[icon2html(src, source)]Unable to lock on [target]!")
return
if(ismob(target))
var/mob/M = target
if(M.mob_negates_gravity())
- occupant_message("Unable to lock on [target]!")
+ to_chat(source, "[icon2html(src, source)]Unable to lock on [target]!")
return
locked = target
- occupant_message("Locked on [target].")
- send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
+ to_chat(source, "[icon2html(src, source)]Locked on [target].")
+ send_byjax(source,"exosuit.browser","[REF(src)]",src.get_equip_info())
else if(target!=locked)
if(locked in view(chassis))
var/turf/targ = get_turf(target)
var/turf/orig = get_turf(locked)
locked.throw_at(target, 14, 1.5)
locked = null
- send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
- log_game("[key_name(chassis.occupant)] used a Gravitational Catapult to throw [locked] (From [AREACOORD(orig)]) at [target] ([AREACOORD(targ)]).")
- return TRUE
+ send_byjax(source,"exosuit.browser","[REF(src)]",src.get_equip_info())
+ log_game("[key_name(source)] used a Gravitational Catapult to throw [locked] (From [AREACOORD(orig)]) at [target] ([AREACOORD(targ)]).")
+ return ..()
else
locked = null
- occupant_message("Lock on [locked] disengaged.")
- send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
+ to_chat(source, "[icon2html(src, source)]Lock on [locked] disengaged.")
+ send_byjax(source,"exosuit.browser","[REF(src)]",src.get_equip_info())
if(2)
var/list/atoms = list()
if(isturf(target))
@@ -125,8 +125,8 @@
INVOKE_ASYNC(src, .proc/do_scatter, A, target)
var/turf/T = get_turf(target)
- log_game("[key_name(chassis.occupant)] used a Gravitational Catapult repulse wave on [AREACOORD(T)]")
- return TRUE
+ log_game("[key_name(source)] used a Gravitational Catapult repulse wave on [AREACOORD(T)]")
+ return ..()
/obj/item/mecha_parts/mecha_equipment/gravcatapult/proc/do_scatter(atom/movable/A, atom/movable/target)
var/iter = 5-get_dist(A,target)
@@ -141,7 +141,7 @@
..()
if(href_list["mode"])
mode = text2num(href_list["mode"])
- send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
+ send_byjax(chassis.occupants,"exosuit.browser","[REF(src)]",src.get_equip_info())
return
@@ -162,9 +162,10 @@
selectable = 0
/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/proc/attack_react()
- if(action_checks(src))
- start_cooldown()
- return 1
+ if(energy_drain && !chassis.has_charge(energy_drain))
+ return FALSE
+ TIMER_COOLDOWN_START(src, COOLDOWN_MECHA_ARMOR, equip_cooldown)
+ return TRUE
@@ -180,9 +181,10 @@
selectable = 0
/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/proc/projectile_react()
- if(action_checks(src))
- start_cooldown()
- return 1
+ if(energy_drain && !chassis.has_charge(energy_drain))
+ return FALSE
+ TIMER_COOLDOWN_START(src, COOLDOWN_MECHA_ARMOR, equip_cooldown)
+ return TRUE
////////////////////////////////// REPAIR DROID //////////////////////////////////////////////////
@@ -205,7 +207,7 @@
chassis.cut_overlay(droid_overlay)
return ..()
-/obj/item/mecha_parts/mecha_equipment/repair_droid/attach(obj/mecha/M as obj)
+/obj/item/mecha_parts/mecha_equipment/repair_droid/attach(obj/vehicle/sealed/mecha/M)
..()
droid_overlay = new(src.icon, icon_state = "repair_droid")
M.add_overlay(droid_overlay)
@@ -229,20 +231,17 @@
START_PROCESSING(SSobj, src)
droid_overlay = new(src.icon, icon_state = "repair_droid_a")
log_message("Activated.", LOG_MECHA)
- set_ready_state(0)
else
STOP_PROCESSING(SSobj, src)
droid_overlay = new(src.icon, icon_state = "repair_droid")
log_message("Deactivated.", LOG_MECHA)
- set_ready_state(1)
chassis.add_overlay(droid_overlay)
- send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
+ send_byjax(chassis.occupants,"exosuit.browser", "[REF(src)]", get_equip_info())
/obj/item/mecha_parts/mecha_equipment/repair_droid/process()
if(!chassis)
STOP_PROCESSING(SSobj, src)
- set_ready_state(1)
return
var/h_boost = health_boost
var/repaired = 0
@@ -260,10 +259,8 @@
if(repaired)
if(!chassis.use_power(energy_drain))
STOP_PROCESSING(SSobj, src)
- set_ready_state(1)
else //no repair needed, we turn off
STOP_PROCESSING(SSobj, src)
- set_ready_state(1)
chassis.cut_overlay(droid_overlay)
droid_overlay = new(src.icon, icon_state = "repair_droid")
chassis.add_overlay(droid_overlay)
@@ -315,11 +312,9 @@
if(href_list["toggle_relay"])
if(equip_ready) //inactive
START_PROCESSING(SSobj, src)
- set_ready_state(0)
log_message("Activated.", LOG_MECHA)
else
STOP_PROCESSING(SSobj, src)
- set_ready_state(1)
log_message("Deactivated.", LOG_MECHA)
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/get_equip_info()
@@ -331,13 +326,11 @@
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/process()
if(!chassis || chassis.internal_damage & MECHA_INT_SHORT_CIRCUIT)
STOP_PROCESSING(SSobj, src)
- set_ready_state(1)
return
var/cur_charge = chassis.get_charge()
if(isnull(cur_charge) || !chassis.cell)
STOP_PROCESSING(SSobj, src)
- set_ready_state(1)
- occupant_message("No power cell detected.")
+ to_chat(chassis.occupants, "[icon2html(src, chassis.occupants)]No power cell detected.")
return
if(cur_charge < chassis.cell.maxcharge)
var/area/A = get_area(chassis)
@@ -389,11 +382,9 @@
..()
if(href_list["toggle"])
if(equip_ready) //inactive
- set_ready_state(0)
START_PROCESSING(SSobj, src)
log_message("Activated.", LOG_MECHA)
else
- set_ready_state(1)
STOP_PROCESSING(SSobj, src)
log_message("Deactivated.", LOG_MECHA)
@@ -402,26 +393,26 @@
if(output)
return "[output] \[[fuel]: [round(fuel.amount*MINERAL_MATERIAL_AMOUNT,0.1)] cm3\] - [equip_ready?"A":"Dea"]ctivate"
-/obj/item/mecha_parts/mecha_equipment/generator/action(target)
+/obj/item/mecha_parts/mecha_equipment/generator/action(mob/source, atom/movable/target, params)
if(chassis)
- var/result = load_fuel(target)
- if(result)
- send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
+ if(load_fuel(target, source))
+ send_byjax(chassis.occupants,"exosuit.browser","[REF(src)]",src.get_equip_info())
+ return ..()
-/obj/item/mecha_parts/mecha_equipment/generator/proc/load_fuel(obj/item/stack/sheet/P)
+/obj/item/mecha_parts/mecha_equipment/generator/proc/load_fuel(obj/item/stack/sheet/P, mob/user)
if(P.type == fuel.type && P.amount > 0)
var/to_load = max(max_fuel - fuel.amount*MINERAL_MATERIAL_AMOUNT,0)
if(to_load)
var/units = min(max(round(to_load / MINERAL_MATERIAL_AMOUNT),1),P.amount)
fuel.amount += units
P.use(units)
- occupant_message("[units] unit\s of [fuel] successfully loaded.")
+ to_chat(user, "[icon2html(src, user)][units] unit\s of [fuel] successfully loaded.")
return units
else
- occupant_message("Unit is full.")
+ to_chat(user, "[icon2html(src, user)]Unit is full.")
return 0
else
- occupant_message("[fuel] traces in target minimal! [P] cannot be used as fuel.")
+ to_chat(user, "[icon2html(src, user)][fuel] traces in target minimal! [P] cannot be used as fuel.")
return
/obj/item/mecha_parts/mecha_equipment/generator/attackby(weapon,mob/user, params)
@@ -430,17 +421,14 @@
/obj/item/mecha_parts/mecha_equipment/generator/process()
if(!chassis)
STOP_PROCESSING(SSobj, src)
- set_ready_state(1)
return
if(fuel.amount<=0)
STOP_PROCESSING(SSobj, src)
log_message("Deactivated - no fuel.", LOG_MECHA)
- set_ready_state(1)
return
var/cur_charge = chassis.get_charge()
if(isnull(cur_charge))
- set_ready_state(1)
- occupant_message("No power cell detected.")
+ to_chat(chassis.occupants, "[icon2html(src, chassis.occupants)]No power cell detected.")
log_message("Deactivated.", LOG_MECHA)
STOP_PROCESSING(SSobj, src)
return
@@ -450,7 +438,7 @@
chassis.give_power(power_per_cycle)
fuel.amount -= min(use_fuel/MINERAL_MATERIAL_AMOUNT,fuel.amount)
update_equip_info()
- return 1
+ return TRUE
/obj/item/mecha_parts/mecha_equipment/generator/nuclear
@@ -480,14 +468,14 @@
selectable = FALSE
var/effect_type = /obj/effect/particle_effect/sparks
-/obj/item/mecha_parts/mecha_equipment/thrusters/try_attach_part(mob/user, obj/mecha/M)
+/obj/item/mecha_parts/mecha_equipment/thrusters/try_attach_part(mob/user, obj/vehicle/sealed/mecha/M)
for(var/obj/item/I in M.equipment)
if(istype(I, src))
to_chat(user, "[M] already has this thruster package!")
return FALSE
. = ..()
-/obj/item/mecha_parts/mecha_equipment/thrusters/attach(obj/mecha/M)
+/obj/item/mecha_parts/mecha_equipment/thrusters/attach(obj/vehicle/sealed/mecha/M)
M.active_thrusters = src //Enable by default
. = ..()
@@ -518,13 +506,13 @@
if (chassis.active_thrusters == src)
return
chassis.active_thrusters = src
- occupant_message("[src] enabled.")
+ to_chat(chassis.occupants, "[icon2html(src, chassis.occupants)][src] enabled.")
/obj/item/mecha_parts/mecha_equipment/thrusters/proc/disable()
if(chassis.active_thrusters != src)
return
chassis.active_thrusters = null
- occupant_message("[src] disabled.")
+ to_chat(chassis.occupants, "[icon2html(src, chassis.occupants)][src] disabled.")
/obj/item/mecha_parts/mecha_equipment/thrusters/get_equip_info()
return "[..()] \[Enable|Disable\]"
@@ -548,7 +536,7 @@
effect_type = /obj/effect/particle_effect/smoke
var/move_cost = 20 //moles per step
-/obj/item/mecha_parts/mecha_equipment/thrusters/gas/try_attach_part(mob/user, obj/mecha/M)
+/obj/item/mecha_parts/mecha_equipment/thrusters/gas/try_attach_part(mob/user, obj/vehicle/sealed/mecha/M)
if(!M.internal_tank)
to_chat(user, "[M] does not have an internal tank and cannot support this upgrade!")
return FALSE
diff --git a/code/game/mecha/equipment/tools/weapon_bay.dm b/code/modules/vehicles/mecha/equipment/tools/weapon_bay.dm
similarity index 87%
rename from code/game/mecha/equipment/tools/weapon_bay.dm
rename to code/modules/vehicles/mecha/equipment/tools/weapon_bay.dm
index 5fe3e14880f..469d430328a 100644
--- a/code/game/mecha/equipment/tools/weapon_bay.dm
+++ b/code/modules/vehicles/mecha/equipment/tools/weapon_bay.dm
@@ -4,8 +4,8 @@
icon = 'icons/mecha/mecha_equipment.dmi'
icon_state = "mecha_weapon_bay"
-/obj/item/mecha_parts/concealed_weapon_bay/try_attach_part(mob/user, obj/mecha/M)
- if(istype(M, /obj/mecha/combat))
+/obj/item/mecha_parts/concealed_weapon_bay/try_attach_part(mob/user, obj/vehicle/sealed/mecha/M)
+ if(istype(M, /obj/vehicle/sealed/mecha/combat))
to_chat(user, "[M] can already hold weapons!")
return
if(locate(/obj/item/mecha_parts/concealed_weapon_bay) in M.contents)
diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/modules/vehicles/mecha/equipment/tools/work_tools.dm
similarity index 74%
rename from code/game/mecha/equipment/tools/work_tools.dm
rename to code/modules/vehicles/mecha/equipment/tools/work_tools.dm
index b796085a2ef..361106a31a5 100644
--- a/code/game/mecha/equipment/tools/work_tools.dm
+++ b/code/modules/vehicles/mecha/equipment/tools/work_tools.dm
@@ -9,19 +9,20 @@
equip_cooldown = 15
energy_drain = 10
tool_behaviour = TOOL_RETRACTOR
+ range = MECHA_MELEE
toolspeed = 0.8
var/dam_force = 20
- var/obj/mecha/working/ripley/cargo_holder
+ var/obj/vehicle/sealed/mecha/working/ripley/cargo_holder
harmful = TRUE
mech_flags = EXOSUIT_MODULE_RIPLEY
-/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/can_attach(obj/mecha/working/ripley/M as obj)
+/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/can_attach(obj/vehicle/sealed/mecha/working/ripley/M)
if(..())
if(istype(M))
return 1
return 0
-/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/attach(obj/mecha/M as obj)
+/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/attach(obj/vehicle/sealed/mecha/M)
..()
cargo_holder = M
return
@@ -30,56 +31,56 @@
..()
cargo_holder = null
-/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/action(atom/target)
+/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/action(mob/source, atom/target, params)
if(!action_checks(target))
return
if(!cargo_holder)
return
if(ismecha(target))
- var/obj/mecha/M = target
+ var/obj/vehicle/sealed/mecha/M = target
var/have_ammo
for(var/obj/item/mecha_ammo/box in cargo_holder.cargo)
if(istype(box, /obj/item/mecha_ammo) && box.rounds)
have_ammo = TRUE
- if(M.ammo_resupply(box, chassis.occupant, TRUE))
+ if(M.ammo_resupply(box, source, TRUE))
return
if(have_ammo)
- to_chat(chassis.occupant, "No further supplies can be provided to [M].")
+ to_chat(source, "No further supplies can be provided to [M].")
else
- to_chat(chassis.occupant, "No providable supplies found in cargo hold")
+ to_chat(source, "No providable supplies found in cargo hold")
return
if(isobj(target))
var/obj/O = target
if(istype(O, /obj/machinery/door/firedoor))
var/obj/machinery/door/firedoor/D = O
- D.try_to_crowbar(src,chassis.occupant)
+ D.try_to_crowbar(src, source)
return
if(istype(O, /obj/machinery/door/airlock/))
var/obj/machinery/door/airlock/D = O
- D.try_to_crowbar(src,chassis.occupant)
+ D.try_to_crowbar(src, source)
return
if(!O.anchored)
if(cargo_holder.cargo.len < cargo_holder.cargo_capacity)
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
O.set_anchored(TRUE)
- if(do_after_cooldown(target))
+ if(do_after_cooldown(target, source))
cargo_holder.cargo += O
O.forceMove(chassis)
O.set_anchored(FALSE)
- occupant_message("[target] successfully loaded.")
+ to_chat(source, "[icon2html(src, source)][target] successfully loaded.")
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]", LOG_MECHA)
else
O.set_anchored(initial(O.anchored))
else
- occupant_message("Not enough room in cargo compartment!")
+ to_chat(source, "[icon2html(src, source)]Not enough room in cargo compartment!")
else
- occupant_message("[target] is firmly secured!")
+ to_chat(source, "[icon2html(src, source)][target] is firmly secured!")
else if(isliving(target))
var/mob/living/M = target
if(M.stat == DEAD)
return
- if(chassis.occupant.a_intent == INTENT_HARM)
+ if(source.a_intent == INTENT_HARM)
M.take_overall_damage(dam_force)
if(!M)
return
@@ -88,12 +89,12 @@
target.visible_message("[chassis] squeezes [target]!", \
"[chassis] squeezes you!",\
"You hear something crack.")
- log_combat(chassis.occupant, M, "attacked", "[name]", "(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
+ log_combat(source, M, "attacked", "[name]", "(INTENT: [uppertext(source.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
else
step_away(M,chassis)
- occupant_message("You push [target] out of the way.")
+ to_chat(source, "[icon2html(src, source)]You push [target] out of the way.")
chassis.visible_message("[chassis] pushes [target] out of the way.")
- return 1
+ return ..()
@@ -111,7 +112,7 @@
dam_force = 20
real_clamp = TRUE
-/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/action(atom/target)
+/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/action(mob/source, atom/target, params)
if(!action_checks(target))
return
if(!cargo_holder)
@@ -122,24 +123,24 @@
if(cargo_holder.cargo.len < cargo_holder.cargo_capacity)
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
O.set_anchored(TRUE)
- if(do_after_cooldown(target))
+ if(do_after_cooldown(target, source))
cargo_holder.cargo += O
O.forceMove(chassis)
O.set_anchored(FALSE)
- occupant_message("[target] successfully loaded.")
+ to_chat(source, "[icon2html(src, source)][target] successfully loaded.")
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]", LOG_MECHA)
else
O.set_anchored(initial(O.anchored))
else
- occupant_message("Not enough room in cargo compartment!")
+ to_chat(source, "[icon2html(src, source)]Not enough room in cargo compartment!")
else
- occupant_message("[target] is firmly secured!")
+ to_chat(source, "[icon2html(src, source)][target] is firmly secured!")
else if(isliving(target))
var/mob/living/M = target
if(M.stat == DEAD)
return
- if(chassis.occupant.a_intent == INTENT_HARM)
+ if(source.a_intent == INTENT_HARM)
if(real_clamp)
M.take_overall_damage(dam_force)
if(!M)
@@ -148,11 +149,11 @@
M.updatehealth()
target.visible_message("[chassis] destroys [target] in an unholy fury!", \
"[chassis] destroys you in an unholy fury!")
- log_combat(chassis.occupant, M, "attacked", "[name]", "(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
+ log_combat(source, M, "attacked", "[name]", "(INTENT: [uppertext(source.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
else
target.visible_message("[chassis] destroys [target] in an unholy fury!", \
"[chassis] destroys you in an unholy fury!")
- else if(chassis.occupant.a_intent == INTENT_DISARM)
+ else if(source.a_intent == INTENT_DISARM)
if(real_clamp)
var/mob/living/carbon/C = target
var/play_sound = FALSE
@@ -171,7 +172,7 @@
playsound(src, get_dismember_sound(), 80, TRUE)
target.visible_message("[chassis] rips [target]'s arms off!", \
"[chassis] rips your arms off!")
- log_combat(chassis.occupant, M, "dismembered of[limbs_gone],", "[name]", "(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
+ log_combat(source, M, "dismembered of[limbs_gone],", "[name]", "(INTENT: [uppertext(source.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
else
target.visible_message("[chassis] rips [target]'s arms off!", \
"[chassis] rips your arms off!")
@@ -179,7 +180,7 @@
step_away(M,chassis)
target.visible_message("[chassis] tosses [target] like a piece of paper!", \
"[chassis] tosses you like a piece of paper!")
- return 1
+ return ..()
@@ -197,14 +198,14 @@
create_reagents(1000)
reagents.add_reagent(/datum/reagent/water, 1000)
-/obj/item/mecha_parts/mecha_equipment/extinguisher/action(atom/target) //copypasted from extinguisher. TODO: Rewrite from scratch.
+/obj/item/mecha_parts/mecha_equipment/extinguisher/action(mob/source, atom/target, params) //copypasted from extinguisher. TODO: Rewrite from scratch.//Still todo
if(!action_checks(target) || get_dist(chassis, target)>3)
return
if(istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(chassis,target) <= 1)
var/obj/structure/reagent_dispensers/watertank/WT = target
WT.reagents.trans_to(src, 1000)
- occupant_message("Extinguisher refilled.")
+ to_chat(source, "[icon2html(src, source)]Extinguisher refilled.")
playsound(chassis, 'sound/effects/refill.ogg', 50, TRUE, -6)
else
if(reagents.total_volume > 0)
@@ -224,7 +225,7 @@
var/datum/reagents/R = new/datum/reagents(5)
W.reagents = R
R.my_atom = W
- reagents.trans_to(W,1, transfered_by = chassis.occupant)
+ reagents.trans_to(W,1, transfered_by = source)
for(var/b=0, b<4, b++)
if(!W)
return
@@ -238,12 +239,12 @@
if(W.loc == my_target)
break
sleep(2)
- return 1
+ return ..()
/obj/item/mecha_parts/mecha_equipment/extinguisher/get_equip_info()
return "[..()] \[[src.reagents.total_volume]\]"
-/obj/item/mecha_parts/mecha_equipment/extinguisher/can_attach(obj/mecha/working/M as obj)
+/obj/item/mecha_parts/mecha_equipment/extinguisher/can_attach(obj/vehicle/sealed/mecha/working/M as obj)
if(..())
if(istype(M))
return 1
@@ -269,7 +270,7 @@
GLOB.rcd_list -= src
return ..()
-/obj/item/mecha_parts/mecha_equipment/rcd/action(atom/target)
+/obj/item/mecha_parts/mecha_equipment/rcd/action(mob/source, atom/target, params)
if(istype(target, /turf/open/space/transit))//>implying these are ever made -Sieve
return
@@ -283,53 +284,49 @@
if(0)
if(iswallturf(target))
var/turf/closed/wall/W = target
- occupant_message("Deconstructing [W]...")
- if(do_after_cooldown(W))
+ to_chat(source, "[icon2html(src, source)]Deconstructing [W]...")
+ if(do_after_cooldown(W, source))
chassis.spark_system.start()
W.ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
playsound(W, 'sound/items/deconstruct.ogg', 50, TRUE)
else if(isfloorturf(target))
var/turf/open/floor/F = target
- occupant_message("Deconstructing [F]...")
- if(do_after_cooldown(target))
+ to_chat(source, "[icon2html(src, source)]Deconstructing [F]...")
+ if(do_after_cooldown(target, source))
chassis.spark_system.start()
F.ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
playsound(F, 'sound/items/deconstruct.ogg', 50, TRUE)
else if (istype(target, /obj/machinery/door/airlock))
- occupant_message("Deconstructing [target]...")
- if(do_after_cooldown(target))
+ to_chat(source, "[icon2html(src, source)]Deconstructing [target]...")
+ if(do_after_cooldown(target, source))
chassis.spark_system.start()
qdel(target)
playsound(target, 'sound/items/deconstruct.ogg', 50, TRUE)
if(1)
if(isspaceturf(target))
var/turf/open/space/S = target
- occupant_message("Building Floor...")
- if(do_after_cooldown(S))
+ to_chat(source, "[icon2html(src, source)]Building Floor...")
+ if(do_after_cooldown(S, source))
S.PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR)
playsound(S, 'sound/items/deconstruct.ogg', 50, TRUE)
chassis.spark_system.start()
else if(isfloorturf(target))
var/turf/open/floor/F = target
- occupant_message("Building Wall...")
- if(do_after_cooldown(F))
+ to_chat(source, "[icon2html(src, source)]Building Wall...")
+ if(do_after_cooldown(F, source))
F.PlaceOnTop(/turf/closed/wall)
playsound(F, 'sound/items/deconstruct.ogg', 50, TRUE)
chassis.spark_system.start()
if(2)
if(isfloorturf(target))
- occupant_message("Building Airlock...")
- if(do_after_cooldown(target))
+ to_chat(source, "[icon2html(src, source)]Building Airlock...")
+ if(do_after_cooldown(target, source))
chassis.spark_system.start()
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock(target)
T.autoclose = TRUE
playsound(target, 'sound/items/deconstruct.ogg', 50, TRUE)
playsound(target, 'sound/effects/sparks2.ogg', 50, TRUE)
-
-
-
-/obj/item/mecha_parts/mecha_equipment/rcd/do_after_cooldown(atom/target)
- . = ..()
+ return ..()
/obj/item/mecha_parts/mecha_equipment/rcd/Topic(href,href_list)
..()
@@ -337,13 +334,13 @@
mode = text2num(href_list["mode"])
switch(mode)
if(0)
- occupant_message("Switched RCD to Deconstruct.")
+ to_chat(chassis.occupants, "[icon2html(src, chassis.occupants)]Switched RCD to Deconstruct.")
energy_drain = initial(energy_drain)
if(1)
- occupant_message("Switched RCD to Construct.")
+ to_chat(chassis.occupants, "[icon2html(src, chassis.occupants)]Switched RCD to Construct.")
energy_drain = 2*initial(energy_drain)
if(2)
- occupant_message("Switched RCD to Construct Airlock.")
+ to_chat(chassis.occupants, "[icon2html(src, chassis.occupants)]Switched RCD to Construct Airlock.")
energy_drain = 2*initial(energy_drain)
return
@@ -357,17 +354,17 @@
icon_state = "ripleyupgrade"
mech_flags = EXOSUIT_MODULE_RIPLEY
-/obj/item/mecha_parts/mecha_equipment/ripleyupgrade/can_attach(obj/mecha/working/ripley/M)
- if(M.type != /obj/mecha/working/ripley)
+/obj/item/mecha_parts/mecha_equipment/ripleyupgrade/can_attach(obj/vehicle/sealed/mecha/working/ripley/M)
+ if(M.type != /obj/vehicle/sealed/mecha/working/ripley)
to_chat(loc, "This conversion kit can only be applied to APLU MK-I models.")
return FALSE
if(M.cargo.len)
to_chat(loc, "[M]'s cargo hold must be empty before this conversion kit can be applied.")
return FALSE
- if(!M.maint_access) //non-removable upgrade, so lets make sure the pilot or owner has their say.
+ if(!(M.mecha_flags & ADDING_MAINT_ACCESS_POSSIBLE)) //non-removable upgrade, so lets make sure the pilot or owner has their say.
to_chat(loc, "[M] must have maintenance protocols active in order to allow this conversion kit.")
return FALSE
- if(M.occupant) //We're actualy making a new mech and swapping things over, it might get weird if players are involved
+ if(LAZYLEN(M.occupants)) //We're actualy making a new mech and swapping things over, it might get weird if players are involved
to_chat(loc, "[M] must be unoccupied before this conversion kit can be applied.")
return FALSE
if(!M.cell) //Turns out things break if the cell is missing
@@ -375,8 +372,8 @@
return FALSE
return TRUE
-/obj/item/mecha_parts/mecha_equipment/ripleyupgrade/attach(obj/mecha/M)
- var/obj/mecha/working/ripley/mkii/N = new /obj/mecha/working/ripley/mkii(get_turf(M),1)
+/obj/item/mecha_parts/mecha_equipment/ripleyupgrade/attach(obj/vehicle/sealed/mecha/M)
+ var/obj/vehicle/sealed/mecha/working/ripley/mkii/N = new /obj/vehicle/sealed/mecha/working/ripley/mkii(get_turf(M),1)
if(!N)
return
QDEL_NULL(N.cell)
@@ -399,11 +396,10 @@
if(istype(E, /obj/item/mecha_parts/concealed_weapon_bay)) //why is the bay not just a variable change who did this
E.forceMove(N)
for(var/obj/item/mecha_parts/mecha_equipment/E in M.equipment) //Move the equipment over...
- E.detach()
+ E.detach(M)
E.attach(N)
- M.equipment -= E
N.dna_lock = M.dna_lock
- N.maint_access = M.maint_access
+ N.mecha_flags = M.mecha_flags
N.strafe = M.strafe
N.obj_integrity = M.obj_integrity //This is not a repair tool
if (M.name != "\improper APLU MK-I \"Ripley\"")
diff --git a/code/game/mecha/equipment/weapons/mecha_ammo.dm b/code/modules/vehicles/mecha/equipment/weapons/mecha_ammo.dm
similarity index 100%
rename from code/game/mecha/equipment/weapons/mecha_ammo.dm
rename to code/modules/vehicles/mecha/equipment/weapons/mecha_ammo.dm
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/modules/vehicles/mecha/equipment/weapons/weapons.dm
similarity index 83%
rename from code/game/mecha/equipment/weapons/weapons.dm
rename to code/modules/vehicles/mecha/equipment/weapons/weapons.dm
index 554dd2895f4..f9e2933a75a 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/modules/vehicles/mecha/equipment/weapons/weapons.dm
@@ -6,75 +6,56 @@
var/fire_sound
var/projectiles_per_shot = 1
var/variance = 0
- var/randomspread = 0 //use random spread for machineguns, instead of shotgun scatter
+ var/randomspread = FALSE //use random spread for machineguns, instead of shotgun scatter
var/projectile_delay = 0
var/firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect //the visual effect appearing when the weapon is fired.
var/kickback = TRUE //Will using this weapon in no grav push mecha back.
mech_flags = EXOSUIT_MODULE_COMBAT
-/obj/item/mecha_parts/mecha_equipment/weapon/can_attach(obj/mecha/M)
+/obj/item/mecha_parts/mecha_equipment/weapon/can_attach(obj/vehicle/sealed/mecha/M)
if(!..())
return FALSE
- if(istype(M, /obj/mecha/combat))
+ if(istype(M, /obj/vehicle/sealed/mecha/combat))
return TRUE
if((locate(/obj/item/mecha_parts/concealed_weapon_bay) in M.contents) && !(locate(/obj/item/mecha_parts/mecha_equipment/weapon) in M.equipment))
return TRUE
return FALSE
-/obj/item/mecha_parts/mecha_equipment/weapon/proc/get_shot_amount()
- return projectiles_per_shot
-
-/obj/item/mecha_parts/mecha_equipment/weapon/action(atom/target, params)
+/obj/item/mecha_parts/mecha_equipment/weapon/action(mob/source, atom/target, params)
if(!action_checks(target))
- return 0
-
- var/turf/curloc = get_turf(chassis)
- var/turf/targloc = get_turf(target)
- if (!targloc || !istype(targloc) || !curloc)
- return 0
- if (targloc == curloc)
- return 0
-
- set_ready_state(0)
- for(var/i=1 to get_shot_amount())
- var/obj/projectile/A = new projectile(curloc)
- A.firer = chassis.occupant
- A.original = target
- if(!A.suppressed && firing_effect_type)
- new firing_effect_type(get_turf(src), chassis.dir)
-
+ return FALSE
+ var/newtonian_target = turn(chassis.dir,180)
+ . = ..()//start the cooldown early because of sleeps
+ for(var/i in 1 to projectiles_per_shot)
+ if(energy_drain && !chassis.has_charge(energy_drain))//in case we run out of energy mid-burst, such as emp
+ break
var/spread = 0
if(variance)
if(randomspread)
spread = round((rand() - 0.5) * variance)
else
spread = round((i / projectiles_per_shot - 0.5) * variance)
- A.preparePixelProjectile(target, chassis.occupant, params, spread)
+
+ var/obj/projectile/A = new projectile(get_turf(src))
+ A.preparePixelProjectile(target, source, params, spread)
A.fire()
+ if(!A.suppressed && firing_effect_type)
+ new firing_effect_type(get_turf(src), chassis.dir)
playsound(chassis, fire_sound, 50, TRUE)
sleep(max(0, projectile_delay))
- if(kickback)
- chassis.newtonian_move(turn(chassis.dir,180))
+ if(kickback)
+ chassis.newtonian_move(newtonian_target)
chassis.log_message("Fired from [src.name], targeting [target].", LOG_MECHA)
- return 1
-
+ return ..()
//Base energy weapon type
/obj/item/mecha_parts/mecha_equipment/weapon/energy
name = "general energy weapon"
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy
-/obj/item/mecha_parts/mecha_equipment/weapon/energy/get_shot_amount()
- return min(round(chassis.cell.charge / energy_drain), projectiles_per_shot)
-
-/obj/item/mecha_parts/mecha_equipment/weapon/energy/start_cooldown()
- set_ready_state(0)
- chassis.use_power(energy_drain*get_shot_amount())
- addtimer(CALLBACK(src, .proc/set_ready_state, 1), equip_cooldown)
-
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
equip_cooldown = 8
name = "\improper CH-PS \"Immolator\" laser"
@@ -145,12 +126,12 @@
fire_sound = 'sound/weapons/plasma_cutter.ogg'
harmful = TRUE
-/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma/can_attach(obj/mecha/M)
+/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma/can_attach(obj/vehicle/sealed/mecha/M)
if(..()) //combat mech
- return 1
- else if(M.equipment.len < M.max_equip && istype(M))
- return 1
- return 0
+ return TRUE
+ else if(LAZYLEN(M.equipment) < M.max_equip)
+ return TRUE
+ return FALSE
/obj/item/mecha_parts/mecha_equipment/weapon/energy/taser
name = "\improper PBT \"Pacifier\" mounted taser"
@@ -172,17 +153,19 @@
kickback = FALSE
mech_flags = EXOSUIT_MODULE_HONK
-/obj/item/mecha_parts/mecha_equipment/weapon/honker/can_attach(obj/mecha/combat/honker/M)
- if(..())
- if(istype(M))
- return 1
- return 0
+/obj/item/mecha_parts/mecha_equipment/weapon/honker/can_attach(obj/vehicle/sealed/mecha/mecha)
+ . = ..()
+ if(!.)
+ return
+ if(!istype(mecha, /obj/vehicle/sealed/mecha/combat/honker))
+ return FALSE
-/obj/item/mecha_parts/mecha_equipment/weapon/honker/action(target, params)
+
+/obj/item/mecha_parts/mecha_equipment/weapon/honker/action(mob/source, atom/target, params)
if(!action_checks(target))
return
playsound(chassis, 'sound/items/airhorn.ogg', 100, TRUE)
- chassis.occupant_message("HONK")
+ to_chat(source, "[icon2html(src, source)]HONK")
for(var/mob/living/carbon/M in ohearers(6, chassis))
if(!M.can_hear())
continue
@@ -204,9 +187,9 @@
log_message("Honked from [src.name]. HONK!", LOG_MECHA)
var/turf/T = get_turf(src)
- message_admins("[ADMIN_LOOKUPFLW(chassis.occupant)] used a Mecha Honker in [ADMIN_VERBOSEJMP(T)]")
- log_game("[key_name(chassis.occupant)] used a Mecha Honker in [AREACOORD(T)]")
- return 1
+ message_admins("[ADMIN_LOOKUPFLW(source)] used a Mecha Honker in [ADMIN_VERBOSEJMP(T)]")
+ log_game("[key_name(source)] used a Mecha Honker in [AREACOORD(T)]")
+ return ..()
//Base ballistic weapon type
@@ -220,15 +203,12 @@
var/disabledreload //For weapons with no cache (like the rockets) which are reloaded by hand
var/ammo_type
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_shot_amount()
- return min(projectiles, projectiles_per_shot)
-
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/action_checks(target)
if(!..())
- return 0
+ return FALSE
if(projectiles <= 0)
- return 0
- return 1
+ return FALSE
+ return TRUE
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_equip_info()
return "[..()] \[[src.projectiles][projectiles_cache_max &&!projectile_energy_cost?"/[projectiles_cache]":""]\][!disabledreload &&(src.projectiles < initial(src.projectiles))?" - Rearm":null]"
@@ -254,7 +234,7 @@
projectiles = projectiles + projectiles_cache
projectiles_cache = 0
- send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
+ send_byjax(chassis.occupants,"exosuit.browser","[REF(src)]",src.get_equip_info())
log_message("Rearmed [src.name].", LOG_MECHA)
return TRUE
@@ -270,11 +250,11 @@
src.rearm()
return
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/action(atom/target)
+/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/action(mob/source, atom/target, params)
if(..())
- projectiles -= get_shot_amount()
- send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
- return 1
+ projectiles -= projectiles_per_shot
+ send_byjax(chassis.occupants,"exosuit.browser","[REF(src)]",src.get_equip_info())
+ return ..()
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
@@ -344,9 +324,6 @@
harmful = TRUE
ammo_type = "missiles_he"
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/spacecops
- projectiles = 420
-
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/breaching
name = "\improper BRM-6 missile rack"
desc = "A weapon for combat exosuits. Launches low-explosive breaching missiles designed to explode only when striking a sturdy target."
@@ -367,19 +344,19 @@
var/missile_range = 30
var/diags_first = FALSE
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/action(target)
+/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/action(mob/source, atom/target, params)
if(!action_checks(target))
return
var/obj/O = new projectile(chassis.loc)
playsound(chassis, fire_sound, 50, TRUE)
log_message("Launched a [O.name] from [name], targeting [target].", LOG_MECHA)
projectiles--
- proj_init(O)
- O.throw_at(target, missile_range, missile_speed, chassis.occupant, FALSE, diagonals_first = diags_first)
- return 1
+ proj_init(O, source)
+ O.throw_at(target, missile_range, missile_speed, source, FALSE, diagonals_first = diags_first)
+ return TRUE
//used for projectile initilisation (priming flashbang) and additional logging
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/proc/proj_init(obj/O)
+/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/proc/proj_init(obj/O, mob/user)
return
@@ -397,10 +374,10 @@
var/det_time = 20
ammo_type = "flashbang"
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/proj_init(obj/item/grenade/flashbang/F)
+/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/proj_init(obj/item/grenade/flashbang/F, mob/user)
var/turf/T = get_turf(src)
- message_admins("[ADMIN_LOOKUPFLW(chassis.occupant)] fired a [src] in [ADMIN_VERBOSEJMP(T)]")
- log_game("[key_name(chassis.occupant)] fired a [src] in [AREACOORD(T)]")
+ message_admins("[ADMIN_LOOKUPFLW(user)] fired a [F] in [ADMIN_VERBOSEJMP(T)]")
+ log_game("[key_name(user)] fired a [F] in [AREACOORD(T)]")
addtimer(CALLBACK(F, /obj/item/grenade/flashbang.proc/prime), det_time)
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/clusterbang //Because I am a heartless bastard -Sieve //Heartless? for making the poor man's honkblast? - Kaze
@@ -426,7 +403,7 @@
equip_cooldown = 20
mech_flags = EXOSUIT_MODULE_HONK
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/can_attach(obj/mecha/combat/honker/M)
+/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/can_attach(obj/vehicle/sealed/mecha/combat/honker/M)
if(..())
if(istype(M))
return 1
@@ -444,7 +421,7 @@
equip_cooldown = 10
mech_flags = EXOSUIT_MODULE_HONK
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar/can_attach(obj/mecha/combat/honker/M)
+/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar/can_attach(obj/vehicle/sealed/mecha/combat/honker/M)
if(..())
if(istype(M))
return 1
@@ -475,7 +452,7 @@
var/can_toggle_lethal = TRUE
mech_flags = EXOSUIT_MODULE_HONK
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove/can_attach(obj/mecha/combat/honker/M)
+/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove/can_attach(obj/vehicle/sealed/mecha/combat/honker/M)
if(..())
if(istype(M))
return 1
@@ -495,14 +472,14 @@
if(href_list["lethalPunch"])
harmful = !harmful
if(harmful)
- chassis?.occupant_message("Lethal Fisting Enabled.")
+ chassis?.to_chat(usr, "[icon2html(src, usr)]Lethal Fisting Enabled.")
else
- chassis?.occupant_message("Lethal Fisting Disabled.")
+ chassis?.to_chat(usr, "[icon2html(src, usr)]Lethal Fisting Disabled.")
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove/action(target)
+/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove/action(mob/source, atom/target, params)
. = ..()
if(.)
- chassis.occupant_message("HONK")
+ to_chat(usr, "[icon2html(src, usr)]HONK")
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove/proj_init(obj/item/punching_glove/PG)
if(!istype(PG))
diff --git a/code/game/mecha/mech_bay.dm b/code/modules/vehicles/mecha/mech_bay.dm
similarity index 97%
rename from code/game/mecha/mech_bay.dm
rename to code/modules/vehicles/mecha/mech_bay.dm
index 707ecda6177..8648de53fb8 100644
--- a/code/game/mecha/mech_bay.dm
+++ b/code/modules/vehicles/mecha/mech_bay.dm
@@ -19,7 +19,7 @@
icon = 'icons/mecha/mech_bay.dmi'
icon_state = "recharge_port"
circuit = /obj/item/circuitboard/machine/mech_recharger
- var/obj/mecha/recharging_mech
+ var/obj/vehicle/sealed/mecha/recharging_mech
var/obj/machinery/computer/mech_bay_power_console/recharge_console
var/max_charge = 50
var/on = FALSE
@@ -53,7 +53,7 @@
if(machine_stat & NOPOWER || !recharge_console)
return
if(!recharging_mech)
- recharging_mech = locate(/obj/mecha) in recharging_turf
+ recharging_mech = locate(/obj/vehicle/sealed/mecha) in recharging_turf
if(recharging_mech)
recharge_console.update_icon()
if(recharging_mech && recharging_mech.cell)
diff --git a/code/game/mecha/mech_fabricator.dm b/code/modules/vehicles/mecha/mech_fabricator.dm
similarity index 100%
rename from code/game/mecha/mech_fabricator.dm
rename to code/modules/vehicles/mecha/mech_fabricator.dm
diff --git a/code/modules/vehicles/mecha/mech_melee_attack.dm b/code/modules/vehicles/mecha/mech_melee_attack.dm
new file mode 100644
index 00000000000..fbbe472a9c2
--- /dev/null
+++ b/code/modules/vehicles/mecha/mech_melee_attack.dm
@@ -0,0 +1,117 @@
+///Called when a mech melee attacks an atom
+/atom/proc/mech_melee_attack(obj/vehicle/sealed/mecha/mecha_attacker)
+ return
+
+/turf/closed/wall/mech_melee_attack(obj/vehicle/sealed/mecha/mecha_attacker)
+ mecha_attacker.do_attack_animation(src)
+ switch(mecha_attacker.damtype)
+ if(BRUTE)
+ playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
+ mecha_attacker.visible_message("[mecha_attacker.name] hits [src]!", \
+ "You hit [src]!", null, COMBAT_MESSAGE_RANGE)
+ if(prob(hardness + mecha_attacker.force) && mecha_attacker.force > 20)
+ dismantle_wall(1)
+ playsound(src, 'sound/effects/meteorimpact.ogg', 100, TRUE)
+ else
+ add_dent(WALL_DENT_HIT)
+ if(BURN)
+ playsound(src, 'sound/items/welder.ogg', 100, TRUE)
+ if(TOX)
+ playsound(src, 'sound/effects/spray2.ogg', 100, TRUE)
+ return FALSE
+
+/obj/mech_melee_attack(obj/vehicle/sealed/mecha/mecha_attacker)
+ mecha_attacker.do_attack_animation(src)
+ var/play_soundeffect = 0
+ var/mech_damtype = mecha_attacker.damtype
+ if(mecha_attacker.selected)
+ mech_damtype = mecha_attacker.selected.damtype
+ play_soundeffect = 1
+ else
+ switch(mecha_attacker.damtype)
+ if(BRUTE)
+ playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
+ if(BURN)
+ playsound(src, 'sound/items/welder.ogg', 50, TRUE)
+ if(TOX)
+ playsound(src, 'sound/effects/spray2.ogg', 50, TRUE)
+ return 0
+ else
+ return 0
+ mecha_attacker.visible_message("[mecha_attacker.name] hits [src]!", "You hit [src]!", null, COMBAT_MESSAGE_RANGE)
+ return take_damage(mecha_attacker.force * 3, mech_damtype, "melee", play_soundeffect, get_dir(src, mecha_attacker)) // multiplied by 3 so we can hit objs hard but not be overpowered against mobs.
+
+/obj/structure/window/mech_melee_attack(obj/vehicle/sealed/mecha/mecha_attacker)
+ if(!can_be_reached())
+ return
+ return ..()
+
+/mob/living/mech_melee_attack(obj/vehicle/sealed/mecha/mecha_attacker, mob/user)
+ if(user.a_intent == INTENT_HARM)
+ if(HAS_TRAIT(user, TRAIT_PACIFISM))
+ to_chat(user, "You don't want to harm other living beings!")
+ return
+ mecha_attacker.do_attack_animation(src)
+ if(mecha_attacker.damtype == "brute")
+ step_away(src, mecha_attacker, 15)
+ switch(mecha_attacker.damtype)
+ if(BRUTE)
+ Unconscious(20)
+ take_overall_damage(rand(mecha_attacker.force/2, mecha_attacker.force))
+ playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
+ if(BURN)
+ take_overall_damage(0, rand(mecha_attacker.force * 0.5, mecha_attacker.force))
+ playsound(src, 'sound/items/welder.ogg', 50, TRUE)
+ if(TOX)
+ mecha_attacker.mech_toxin_damage(src)
+ else
+ return
+ updatehealth()
+ visible_message("[mecha_attacker.name] hits [src]!", \
+ "[mecha_attacker.name] hits you!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, mecha_attacker)
+ to_chat(mecha_attacker, "You hit [src]!")
+ log_combat(user, src, "attacked", mecha_attacker, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(mecha_attacker.damtype)])")
+ else
+ step_away(src, mecha_attacker)
+ log_combat(user, src, "pushed", mecha_attacker)
+ visible_message("[mecha_attacker] pushes [src] out of the way.", \
+ "[mecha_attacker] pushes you out of the way.", "You hear aggressive shuffling!", 5, list(mecha_attacker))
+ to_chat(mecha_attacker, "You push [src] out of the way.")
+
+/mob/living/carbon/human/mech_melee_attack(obj/vehicle/sealed/mecha/mecha_attacker, mob/user)
+ if(user.a_intent == INTENT_HARM)
+ if(HAS_TRAIT(user, TRAIT_PACIFISM))
+ to_chat(user, "You don't want to harm other living beings!")
+ return
+ mecha_attacker.do_attack_animation(src)
+ if(mecha_attacker.damtype == BRUTE)
+ step_away(src, mecha_attacker, 15)
+ var/obj/item/bodypart/temp = get_bodypart(pick(BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_HEAD))
+ if(temp)
+ var/update = 0
+ var/dmg = rand(mecha_attacker.force * 0.5, mecha_attacker.force)
+ switch(mecha_attacker.damtype)
+ if(BRUTE)
+ if(mecha_attacker.force > 35) // durand and other heavy mechas
+ Unconscious(20)
+ else if(mecha_attacker.force > 20 && !IsKnockdown()) // lightweight mechas like gygax
+ Knockdown(40)
+ update |= temp.receive_damage(dmg, 0)
+ playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
+ if(FIRE)
+ update |= temp.receive_damage(0, dmg)
+ playsound(src, 'sound/items/welder.ogg', 50, TRUE)
+ if(TOX)
+ mecha_attacker.mech_toxin_damage(src)
+ else
+ return
+ if(update)
+ update_damage_overlays()
+ updatehealth()
+
+ visible_message("[mecha_attacker.name] hits [src]!", \
+ "[mecha_attacker.name] hits you!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, list(mecha_attacker))
+ to_chat(mecha_attacker, "You hit [src]!")
+ log_combat(user, src, "attacked", mecha_attacker, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(mecha_attacker.damtype)])")
+ else
+ return ..()
diff --git a/code/modules/vehicles/mecha/mecha_actions.dm b/code/modules/vehicles/mecha/mecha_actions.dm
new file mode 100644
index 00000000000..003fbb4984b
--- /dev/null
+++ b/code/modules/vehicles/mecha/mecha_actions.dm
@@ -0,0 +1,238 @@
+//////////////////////MECHA ACTIONS\\\\\\\\\\\\\\\\\\\\\
+
+/obj/vehicle/sealed/mecha/generate_action_type()
+ . = ..()
+ if(istype(., /datum/action/vehicle/sealed/mecha))
+ var/datum/action/vehicle/sealed/mecha/mecha = .
+ mecha.chassis = src
+
+
+/datum/action/vehicle/sealed/mecha
+ icon_icon = 'icons/mob/actions/actions_mecha.dmi'
+ var/obj/vehicle/sealed/mecha/chassis
+
+/datum/action/vehicle/sealed/mecha/Destroy()
+ chassis = null
+ return ..()
+
+/datum/action/vehicle/sealed/mecha/mech_eject
+ name = "Eject From Mech"
+ button_icon_state = "mech_eject"
+
+/datum/action/vehicle/sealed/mecha/mech_eject/Trigger()
+ if(!owner)
+ return
+ if(!chassis || !(owner in chassis.occupants))
+ return
+ chassis.container_resist_act(owner)
+
+/datum/action/vehicle/sealed/mecha/mech_toggle_internals
+ name = "Toggle Internal Airtank Usage"
+ button_icon_state = "mech_internals_off"
+
+/datum/action/vehicle/sealed/mecha/mech_toggle_internals/Trigger()
+ if(!owner || !chassis || !(owner in chassis.occupants))
+ return
+ chassis.use_internal_tank = !chassis.use_internal_tank
+ button_icon_state = "mech_internals_[chassis.use_internal_tank ? "on" : "off"]"
+ to_chat(chassis.occupants, "[icon2html(chassis, owner)]Now taking air from [chassis.use_internal_tank?"internal airtank":"environment"].")
+ chassis.log_message("Now taking air from [chassis.use_internal_tank?"internal airtank":"environment"].", LOG_MECHA)
+ UpdateButtonIcon()
+
+/datum/action/vehicle/sealed/mecha/mech_cycle_equip
+ name = "Cycle Equipment"
+ button_icon_state = "mech_cycle_equip_off"
+
+/datum/action/vehicle/sealed/mecha/mech_cycle_equip/Trigger()
+ if(!owner || !chassis || !(owner in chassis.occupants))
+ return
+
+ var/list/available_equipment = list()
+ for(var/e in chassis.equipment)
+ var/obj/item/mecha_parts/mecha_equipment/equipment = e
+ if(equipment.selectable)
+ available_equipment += equipment
+
+ if(available_equipment.len == 0)
+ to_chat(owner, "[icon2html(chassis, owner)]No equipment available!")
+ return
+ if(!chassis.selected)
+ chassis.selected = available_equipment[1]
+ to_chat(owner, "[icon2html(chassis, owner)]You select [chassis.selected].")
+ send_byjax(chassis.occupants,"exosuit.browser","eq_list",chassis.get_equipment_list())
+ button_icon_state = "mech_cycle_equip_on"
+ UpdateButtonIcon()
+ return
+ var/number = 0
+ for(var/equipment in available_equipment)
+ number++
+ if(equipment != chassis.selected)
+ continue
+ if(available_equipment.len == number)
+ chassis.selected = null
+ to_chat(owner, "[icon2html(chassis, owner)]You switch to no equipment.")
+ button_icon_state = "mech_cycle_equip_off"
+ else
+ chassis.selected = available_equipment[number+1]
+ to_chat(owner, "[icon2html(chassis, owner)]You switch to [chassis.selected].")
+ button_icon_state = "mech_cycle_equip_on"
+ send_byjax(chassis.occupants,"exosuit.browser","eq_list",chassis.get_equipment_list())
+ UpdateButtonIcon()
+ return
+
+
+/datum/action/vehicle/sealed/mecha/mech_toggle_lights
+ name = "Toggle Lights"
+ button_icon_state = "mech_lights_off"
+
+/datum/action/vehicle/sealed/mecha/mech_toggle_lights/Trigger()
+ if(!owner || !chassis || !(owner in chassis.occupants))
+ return
+ if(!(chassis.mecha_flags & HAS_LIGHTS))
+ to_chat(owner, "This mechs lights are destroyed!")
+ return
+ chassis.mecha_flags ^= LIGHTS_ON
+ if(chassis.mecha_flags & LIGHTS_ON)
+ button_icon_state = "mech_lights_on"
+ else
+ button_icon_state = "mech_lights_off"
+ chassis.set_light_on(chassis.mecha_flags & LIGHTS_ON)
+ to_chat(owner, "[icon2html(chassis, owner)]Toggled lights [(chassis.mecha_flags & LIGHTS_ON)?"on":"off"].")
+ chassis.log_message("Toggled lights [(chassis.mecha_flags & LIGHTS_ON)?"on":"off"].", LOG_MECHA)
+ UpdateButtonIcon()
+
+/datum/action/vehicle/sealed/mecha/mech_view_stats
+ name = "View Stats"
+ button_icon_state = "mech_view_stats"
+
+/datum/action/vehicle/sealed/mecha/mech_view_stats/Trigger()
+ if(!owner || !chassis || !(owner in chassis.occupants))
+ return
+ var/datum/browser/popup = new(owner , "exosuit")
+ popup.set_content(chassis.get_stats_html(owner))
+ popup.open()
+
+
+/datum/action/vehicle/sealed/mecha/strafe
+ name = "Toggle Strafing. Disabled when Alt is held."
+ button_icon_state = "strafe"
+
+/datum/action/vehicle/sealed/mecha/strafe/Trigger()
+ if(!owner || !chassis || !(owner in chassis.occupants))
+ return
+
+ chassis.toggle_strafe()
+
+/obj/vehicle/sealed/mecha/AltClick(mob/living/user)
+ if((user in occupants) && user.canUseTopic(src))
+ toggle_strafe()
+
+/obj/vehicle/sealed/mecha/proc/toggle_strafe()
+ strafe = !strafe
+
+ to_chat(occupants, "[icon2html(src, occupants)]Toggled strafing mode [strafe?"on":"off"].")
+ log_message("Toggled strafing mode [strafe?"on":"off"].", LOG_MECHA)
+
+ for(var/occupant in occupants)
+ var/datum/action/action = LAZYACCESSASSOC(occupant_actions, occupant, /datum/action/vehicle/sealed/mecha/strafe)
+ action?.UpdateButtonIcon()
+
+//////////////////////////////////////// Specific Ability Actions ///////////////////////////////////////////////
+//Need to be granted by the mech type, Not default abilities.
+
+/datum/action/vehicle/sealed/mecha/mech_defense_mode
+ name = "Toggle an energy shield that blocks all attacks from the faced direction at a heavy power cost."
+ button_icon_state = "mech_defense_mode_off"
+
+/datum/action/vehicle/sealed/mecha/mech_defense_mode/Trigger(forced_state = FALSE)
+ SEND_SIGNAL(chassis, COMSIG_MECHA_ACTION_TRIGGER, owner, args) //Signal sent to the mech, to be handed to the shield. See durand.dm for more details
+
+/datum/action/vehicle/sealed/mecha/mech_overload_mode
+ name = "Toggle leg actuators overload"
+ button_icon_state = "mech_overload_off"
+
+/datum/action/vehicle/sealed/mecha/mech_overload_mode/Trigger(forced_state = null)
+ if(!owner || !chassis || !(owner in chassis.occupants))
+ return
+ if(!isnull(forced_state))
+ chassis.leg_overload_mode = forced_state
+ else
+ chassis.leg_overload_mode = !chassis.leg_overload_mode
+ button_icon_state = "mech_overload_[chassis.leg_overload_mode ? "on" : "off"]"
+ chassis.log_message("Toggled leg actuators overload.", LOG_MECHA)
+ if(!chassis.leg_overload_mode)
+ chassis.movedelay = min(1, round(chassis.movedelay * 0.5))
+ chassis.step_energy_drain = max(chassis.overload_step_energy_drain_min,chassis.step_energy_drain*chassis.leg_overload_coeff)
+ to_chat(owner, "[icon2html(chassis, owner)]You enable leg actuators overload.")
+ else
+ chassis.movedelay = initial(chassis.movedelay)
+ chassis.step_energy_drain = chassis.normal_step_energy_drain
+ to_chat(owner, "[icon2html(chassis, owner)]You disable leg actuators overload.")
+ UpdateButtonIcon()
+
+/datum/action/vehicle/sealed/mecha/mech_smoke
+ name = "Smoke"
+ button_icon_state = "mech_smoke"
+
+/datum/action/vehicle/sealed/mecha/mech_smoke/Trigger()
+ if(!owner || !chassis || !(owner in chassis.occupants))
+ return
+ if(!TIMER_COOLDOWN_CHECK(src, COOLDOWN_MECHA_SMOKE) && chassis.smoke_charges>0)
+ chassis.smoke_system.start()
+ chassis.smoke_charges--
+ TIMER_COOLDOWN_START(src, COOLDOWN_MECHA_SMOKE, chassis.smoke_cooldown)
+
+
+/datum/action/vehicle/sealed/mecha/mech_zoom
+ name = "Zoom"
+ button_icon_state = "mech_zoom_off"
+
+/datum/action/vehicle/sealed/mecha/mech_zoom/Trigger()
+ if(!owner || !chassis || !(owner in chassis.occupants))
+ return
+ if(owner.client)
+ chassis.zoom_mode = !chassis.zoom_mode
+ button_icon_state = "mech_zoom_[chassis.zoom_mode ? "on" : "off"]"
+ chassis.log_message("Toggled zoom mode.", LOG_MECHA)
+ to_chat(owner, "[icon2html(chassis, owner)]Zoom mode [chassis.zoom_mode?"en":"dis"]abled.")
+ if(chassis.zoom_mode)
+ owner.client.view_size.setTo(4.5)
+ SEND_SOUND(owner, sound('sound/mecha/imag_enh.ogg',volume=50))
+ else
+ owner.client.view_size.resetToDefault() //Let's not let this stack shall we?
+ UpdateButtonIcon()
+
+/datum/action/vehicle/sealed/mecha/mech_switch_damtype
+ name = "Reconfigure arm microtool arrays"
+ button_icon_state = "mech_damtype_brute"
+
+/datum/action/vehicle/sealed/mecha/mech_switch_damtype/Trigger()
+ if(!owner || !chassis || !(owner in chassis.occupants))
+ return
+ var/new_damtype
+ switch(chassis.damtype)
+ if("tox")
+ new_damtype = "brute"
+ to_chat(owner, "[icon2html(chassis, owner)]Your exosuit's hands form into fists.")
+ if("brute")
+ new_damtype = "fire"
+ to_chat(owner, "[icon2html(chassis, owner)]A torch tip extends from your exosuit's hand, glowing red.")
+ if("fire")
+ new_damtype = "tox"
+ to_chat(owner, "[icon2html(chassis, owner)]A bone-chillingly thick plasteel needle protracts from the exosuit's palm.")
+ chassis.damtype = new_damtype
+ button_icon_state = "mech_damtype_[new_damtype]"
+ playsound(chassis, 'sound/mecha/mechmove01.ogg', 50, TRUE)
+ UpdateButtonIcon()
+
+/datum/action/vehicle/sealed/mecha/mech_toggle_phasing
+ name = "Toggle Phasing"
+ button_icon_state = "mech_phasing_off"
+
+/datum/action/vehicle/sealed/mecha/mech_toggle_phasing/Trigger()
+ if(!owner || !chassis || !(owner in chassis.occupants))
+ return
+ chassis.phasing = !chassis.phasing
+ button_icon_state = "mech_phasing_[chassis.phasing ? "on" : "off"]"
+ to_chat(owner, "[icon2html(chassis, owner)]En":"#f00\">Dis"]abled phasing.")
+ UpdateButtonIcon()
diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/modules/vehicles/mecha/mecha_construction_paths.dm
similarity index 99%
rename from code/game/mecha/mecha_construction_paths.dm
rename to code/modules/vehicles/mecha/mecha_construction_paths.dm
index 63362080b60..348b2a8a7a7 100644
--- a/code/game/mecha/mecha_construction_paths.dm
+++ b/code/modules/vehicles/mecha/mecha_construction_paths.dm
@@ -28,7 +28,7 @@
if(!result)
return
// Remove default mech power cell, as we replace it with a new one.
- var/obj/mecha/M = new result(drop_location())
+ var/obj/vehicle/sealed/mecha/M = new result(drop_location())
QDEL_NULL(M.cell)
QDEL_NULL(M.scanmod)
QDEL_NULL(M.capacitor)
@@ -264,7 +264,7 @@
)
/datum/component/construction/mecha/ripley
- result = /obj/mecha/working/ripley
+ result = /obj/vehicle/sealed/mecha/working/ripley
base_icon = "ripley"
circuit_control = /obj/item/circuitboard/mecha/ripley/main
@@ -407,7 +407,7 @@
)
/datum/component/construction/mecha/gygax
- result = /obj/mecha/combat/gygax
+ result = /obj/vehicle/sealed/mecha/combat/gygax
base_icon = "gygax"
circuit_control = /obj/item/circuitboard/mecha/gygax/main
@@ -547,7 +547,7 @@
)
/datum/component/construction/mecha/clarke
- result = /obj/mecha/working/clarke
+ result = /obj/vehicle/sealed/mecha/working/clarke
base_icon = "clarke"
circuit_control = /obj/item/circuitboard/mecha/clarke/main
@@ -715,7 +715,7 @@
)
/datum/component/construction/mecha/honker
- result = /obj/mecha/combat/honker
+ result = /obj/vehicle/sealed/mecha/combat/honker
steps = list(
list(
"key" = /obj/item/bikehorn
@@ -829,7 +829,7 @@
)
/datum/component/construction/mecha/durand
- result = /obj/mecha/combat/durand
+ result = /obj/vehicle/sealed/mecha/combat/durand
base_icon = "durand"
circuit_control = /obj/item/circuitboard/mecha/durand/main
@@ -971,7 +971,7 @@
)
/datum/component/construction/mecha/phazon
- result = /obj/mecha/combat/phazon
+ result = /obj/vehicle/sealed/mecha/combat/phazon
base_icon = "phazon"
circuit_control = /obj/item/circuitboard/mecha/phazon/main
@@ -1216,7 +1216,7 @@
)
/datum/component/construction/mecha/odysseus
- result = /obj/mecha/medical/odysseus
+ result = /obj/vehicle/sealed/mecha/medical/odysseus
base_icon = "odysseus"
circuit_control = /obj/item/circuitboard/mecha/odysseus/main
diff --git a/code/game/mecha/mecha_control_console.dm b/code/modules/vehicles/mecha/mecha_control_console.dm
similarity index 85%
rename from code/game/mecha/mecha_control_console.dm
rename to code/modules/vehicles/mecha/mecha_control_console.dm
index 50d18c6fda7..346cd920031 100644
--- a/code/game/mecha/mecha_control_console.dm
+++ b/code/modules/vehicles/mecha/mecha_control_console.dm
@@ -16,27 +16,27 @@
var/list/data = list()
var/list/trackerlist = list()
- for(var/obj/mecha/MC in GLOB.mechas_list)
+ for(var/obj/vehicle/sealed/mecha/MC in GLOB.mechas_list)
trackerlist += MC.trackers
data["mechs"] = list()
for(var/obj/item/mecha_parts/mecha_tracking/MT in trackerlist)
if(!MT.chassis)
continue
- var/obj/mecha/M = MT.chassis
+ var/obj/vehicle/sealed/mecha/M = MT.chassis
var/list/mech_data = list(
name = M.name,
integrity = round((M.obj_integrity / M.max_integrity) * 100),
charge = M.cell ? round(M.cell.percent()) : null,
airtank = M.internal_tank ? M.return_pressure() : null,
- pilot = M.occupant,
+ pilot = M.return_drivers(),
location = get_area_name(M, TRUE),
active_equipment = M.selected,
emp_recharging = MT.recharging,
tracker_ref = REF(MT)
)
- if(istype(M, /obj/mecha/working/ripley))
- var/obj/mecha/working/ripley/RM = M
+ if(istype(M, /obj/vehicle/sealed/mecha/working/ripley))
+ var/obj/vehicle/sealed/mecha/working/ripley/RM = M
mech_data += list(
cargo_space = round((RM.cargo.len / RM.cargo_capacity) * 100)
)
@@ -55,20 +55,20 @@
if(!istype(MT))
return
var/message = stripped_input(usr, "Input message", "Transmit message")
- var/obj/mecha/M = MT.chassis
+ var/obj/vehicle/sealed/mecha/M = MT.chassis
if(trim(message) && M)
- M.occupant_message(message)
+ to_chat(M.occupants, message)
to_chat(usr, "Message sent.")
. = TRUE
if("shock")
var/obj/item/mecha_parts/mecha_tracking/MT = locate(params["tracker_ref"])
if(!istype(MT))
return
- var/obj/mecha/M = MT.chassis
+ var/obj/vehicle/sealed/mecha/M = MT.chassis
if(M)
MT.shock()
- log_game("[key_name(usr)] has activated remote EMP on exosuit [M], located at [loc_name(M)], which is currently [M.occupant? "being piloted by [key_name(M.occupant)]." : "without a pilot."] ")
- message_admins("[key_name_admin(usr)][ADMIN_FLW(usr)] has activated remote EMP on exosuit [M][ADMIN_JMP(M)], which is currently [M.occupant ? "being piloted by [key_name_admin(M.occupant)][ADMIN_FLW(M.occupant)]." : "without a pilot."] ")
+ log_game("[key_name(usr)] has activated remote EMP on exosuit [M], located at [loc_name(M)], which [M.occupants ? "has the occupants [M.occupants]." : "without a pilot."] ")
+ message_admins("[key_name_admin(usr)][ADMIN_FLW(usr)] has activated remote EMP on exosuit [M][ADMIN_JMP(M)], which is currently [M.occupants ? "occupied by [M.occupants][ADMIN_FLW(M)]." : "without a pilot."] ")
. = TRUE
/obj/item/mecha_parts/mecha_tracking
@@ -82,7 +82,7 @@
/// Cooldown variable for EMP pulsing
var/recharging = FALSE
/// The Mecha that this tracking beacon is attached to
- var/obj/mecha/chassis
+ var/obj/vehicle/sealed/mecha/chassis
/**
* Returns a html formatted string describing attached mech status
@@ -96,11 +96,11 @@
Integrity: [round((chassis.obj_integrity/chassis.max_integrity * 100), 0.01)]%
Cell Charge: [isnull(cell_charge) ? "Not Found":"[chassis.cell.percent()]%"]
Airtank: [chassis.internal_tank ? "[round(chassis.return_pressure(), 0.01)]" : "Not Equipped"] kPa
- Pilot: [chassis.occupant || "None"]
+ Pilot: [chassis.return_drivers() || "None"]
Location: [get_area_name(chassis, TRUE) || "Unknown"]
Active Equipment: [chassis.selected || "None"]"}
- if(istype(chassis, /obj/mecha/working/ripley))
- var/obj/mecha/working/ripley/RM = chassis
+ if(istype(chassis, /obj/vehicle/sealed/mecha/working/ripley))
+ var/obj/vehicle/sealed/mecha/working/ripley/RM = chassis
answer += "
Used Cargo Space: [round((RM.cargo.len / RM.cargo_capacity * 100), 0.01)]%"
return answer
@@ -117,7 +117,7 @@
chassis = null
return ..()
-/obj/item/mecha_parts/mecha_tracking/try_attach_part(mob/user, obj/mecha/M)
+/obj/item/mecha_parts/mecha_tracking/try_attach_part(mob/user, obj/vehicle/sealed/mecha/M)
if(!..())
return
M.trackers += src
diff --git a/code/game/mecha/mecha_defense.dm b/code/modules/vehicles/mecha/mecha_defense.dm
similarity index 77%
rename from code/game/mecha/mecha_defense.dm
rename to code/modules/vehicles/mecha/mecha_defense.dm
index 142647c45a5..04123fedac1 100644
--- a/code/game/mecha/mecha_defense.dm
+++ b/code/modules/vehicles/mecha/mecha_defense.dm
@@ -1,4 +1,4 @@
-/obj/mecha/proc/get_armour_facing(relative_dir)
+/obj/vehicle/sealed/mecha/proc/get_armour_facing(relative_dir)
switch(relative_dir)
if(180) // BACKSTAB!
return facing_modifiers[MECHA_BACK_ARMOUR]
@@ -6,7 +6,7 @@
return facing_modifiers[MECHA_FRONT_ARMOUR]
return facing_modifiers[MECHA_SIDE_ARMOUR] //if its not a front hit or back hit then assume its from the side
-/obj/mecha/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
+/obj/vehicle/sealed/mecha/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
. = ..()
if(. && obj_integrity > 0)
spark_system.start()
@@ -18,10 +18,10 @@
else
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT))
if(. >= 5 || prob(33))
- occupant_message("Taking damage!")
+ to_chat(occupants, "[icon2html(src, occupants)]Taking damage!")
log_message("Took [damage_amount] points of damage. Damage type: [damage_type]", LOG_MECHA)
-/obj/mecha/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
+/obj/vehicle/sealed/mecha/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
. = ..()
if(!damage_amount)
return 0
@@ -51,7 +51,7 @@
if(.)
. *= booster_damage_modifier
-/obj/mecha/attack_hand(mob/living/user)
+/obj/vehicle/sealed/mecha/attack_hand(mob/living/user)
. = ..()
if(.)
return
@@ -61,15 +61,15 @@
user.visible_message("[user] hits [name]. Nothing happens.", null, null, COMBAT_MESSAGE_RANGE)
log_message("Attack by hand/paw. Attacker - [user].", LOG_MECHA, color="red")
-/obj/mecha/attack_paw(mob/user as mob)
+/obj/vehicle/sealed/mecha/attack_paw(mob/user as mob)
return attack_hand(user)
-/obj/mecha/attack_alien(mob/living/user)
+/obj/vehicle/sealed/mecha/attack_alien(mob/living/user)
log_message("Attack by alien. Attacker - [user].", LOG_MECHA, color="red")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, TRUE)
attack_generic(user, 15, BRUTE, MELEE, 0)
-/obj/mecha/attack_animal(mob/living/simple_animal/user)
+/obj/vehicle/sealed/mecha/attack_animal(mob/living/simple_animal/user)
log_message("Attack by simple animal. Attacker - [user].", LOG_MECHA, color="red")
if(!user.melee_damage_upper && !user.obj_damage)
user.emote("custom", message = "[user.friendly_verb_continuous] [src].")
@@ -88,41 +88,43 @@
return 1
-/obj/mecha/hulk_damage()
+/obj/vehicle/sealed/mecha/hulk_damage()
return 15
-/obj/mecha/attack_hulk(mob/living/carbon/human/user)
+/obj/vehicle/sealed/mecha/attack_hulk(mob/living/carbon/human/user)
. = ..()
if(.)
log_message("Attack by hulk. Attacker - [user].", LOG_MECHA, color="red")
log_combat(user, src, "punched", "hulk powers")
-/obj/mecha/blob_act(obj/structure/blob/B)
+/obj/vehicle/sealed/mecha/blob_act(obj/structure/blob/B)
log_message("Attack by blob. Attacker - [B].", LOG_MECHA, color="red")
take_damage(30, BRUTE, MELEE, 0, get_dir(src, B))
-/obj/mecha/attack_tk()
+/obj/vehicle/sealed/mecha/attack_tk()
return
-/obj/mecha/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //wrapper
+/obj/vehicle/sealed/mecha/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //wrapper
log_message("Hit by [AM].", LOG_MECHA, color="red")
. = ..()
-/obj/mecha/bullet_act(obj/projectile/Proj) //wrapper
- if (!enclosed && occupant && !silicon_pilot && !Proj.force_hit && (Proj.def_zone == BODY_ZONE_HEAD || Proj.def_zone == BODY_ZONE_CHEST)) //allows bullets to hit the pilot of open-canopy mechs
- occupant.bullet_act(Proj) //If the sides are open, the occupant can be hit
+/obj/vehicle/sealed/mecha/bullet_act(obj/projectile/Proj) //wrapper
+ if(!enclosed && LAZYLEN(occupants) && !(mecha_flags & SILICON_PILOT) && !Proj.force_hit && (Proj.def_zone == BODY_ZONE_HEAD || Proj.def_zone == BODY_ZONE_CHEST)) //allows bullets to hit the pilot of open-canopy mechs
+ for(var/m in occupants)
+ var/mob/living/hitmob = m
+ hitmob.bullet_act(Proj) //If the sides are open, the occupant can be hit
return BULLET_ACT_HIT
log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).", LOG_MECHA, color="red")
. = ..()
-/obj/mecha/ex_act(severity, target)
+/obj/vehicle/sealed/mecha/ex_act(severity, target)
log_message("Affected by explosion of severity: [severity].", LOG_MECHA, color="red")
if(prob(deflect_chance))
severity++
log_message("Armor saved, changing severity to [severity]", LOG_MECHA)
. = ..()
-/obj/mecha/contents_explosion(severity, target)
+/obj/vehicle/sealed/mecha/contents_explosion(severity, target)
severity++
for(var/X in equipment)
var/obj/item/mecha_parts/mecha_equipment/ME = X
@@ -142,16 +144,17 @@
SSexplosions.med_mov_atom += MT
if(EXPLODE_LIGHT)
SSexplosions.low_mov_atom += MT
- if(occupant)
+ for(var/Z in occupants)
+ var/mob/living/occupant = Z
occupant.ex_act(severity,target)
-/obj/mecha/handle_atom_del(atom/A)
- if(A == occupant)
- occupant = null
+/obj/vehicle/sealed/mecha/handle_atom_del(atom/A)
+ if(A in occupants)
+ LAZYREMOVE(occupants, A)
icon_state = initial(icon_state)+"-open"
setDir(dir_in)
-/obj/mecha/emp_act(severity)
+/obj/vehicle/sealed/mecha/emp_act(severity)
. = ..()
if (. & EMP_PROTECT_SELF)
return
@@ -160,20 +163,22 @@
take_damage(30 / severity, BURN, ENERGY, 1)
log_message("EMP detected", LOG_MECHA, color="red")
- if(istype(src, /obj/mecha/combat))
+ if(istype(src, /obj/vehicle/sealed/mecha/combat))
mouse_pointer = 'icons/effects/mouse_pointers/mecha_mouse-disable.dmi'
- occupant?.update_mouse_pointer()
- if(!equipment_disabled && occupant) //prevent spamming this message with back-to-back EMPs
- to_chat(occupant, "Error -- Connection to equipment control unit has been lost.")
- addtimer(CALLBACK(src, /obj/mecha/proc/restore_equipment), 3 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
+ for(var/occus in occupants)
+ var/mob/living/occupant = occus
+ occupant.update_mouse_pointer()
+ if(!equipment_disabled && occupants) //prevent spamming this message with back-to-back EMPs
+ to_chat(occupants, "Error -- Connection to equipment control unit has been lost.")
+ addtimer(CALLBACK(src, /obj/vehicle/sealed/mecha/proc/restore_equipment), 3 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
equipment_disabled = 1
-/obj/mecha/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
+/obj/vehicle/sealed/mecha/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature>max_temperature)
log_message("Exposed to dangerous temperature.", LOG_MECHA, color="red")
take_damage(5, BURN, 0, 1)
-/obj/mecha/attackby(obj/item/W as obj, mob/user as mob, params)
+/obj/vehicle/sealed/mecha/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/mmi))
if(mmi_move_inside(W,user))
@@ -187,7 +192,7 @@
return
if(W.GetID())
- if(add_req_access || maint_access)
+ if((mecha_flags & ADDING_ACCESS_POSSIBLE) || (mecha_flags & ADDING_MAINT_ACCESS_POSSIBLE))
if(internals_access_allowed(user))
var/obj/item/card/id/id_card
if(istype(W, /obj/item/card/id))
@@ -261,7 +266,7 @@
log_message("Attacked by [W]. Attacker - [user]", LOG_MECHA)
return ..()
-/obj/mecha/wrench_act(mob/living/user, obj/item/I)
+/obj/vehicle/sealed/mecha/wrench_act(mob/living/user, obj/item/I)
..()
. = TRUE
if(construction_state == MECHA_SECURE_BOLTS)
@@ -272,7 +277,7 @@
construction_state = MECHA_SECURE_BOLTS
to_chat(user, "You tighten the securing bolts.")
-/obj/mecha/crowbar_act(mob/living/user, obj/item/I)
+/obj/vehicle/sealed/mecha/crowbar_act(mob/living/user, obj/item/I)
..()
. = TRUE
if(construction_state == MECHA_LOOSE_BOLTS)
@@ -283,7 +288,7 @@
construction_state = MECHA_LOOSE_BOLTS
to_chat(user, "You close the hatch to the power unit.")
-/obj/mecha/screwdriver_act(mob/living/user, obj/item/I)
+/obj/vehicle/sealed/mecha/screwdriver_act(mob/living/user, obj/item/I)
..()
. = TRUE
if(internal_damage & MECHA_INT_TEMP_CONTROL)
@@ -291,7 +296,7 @@
to_chat(user, "You repair the damaged temperature controller.")
return
-/obj/mecha/welder_act(mob/living/user, obj/item/W)
+/obj/vehicle/sealed/mecha/welder_act(mob/living/user, obj/item/W)
. = ..()
if(user.a_intent == INTENT_HARM)
return
@@ -312,7 +317,7 @@
return
to_chat(user, "The [name] is at full integrity!")
-/obj/mecha/proc/mech_toxin_damage(mob/living/target)
+/obj/vehicle/sealed/mecha/proc/mech_toxin_damage(mob/living/target)
playsound(src, 'sound/effects/spray2.ogg', 50, TRUE)
if(target.reagents)
if(target.reagents.get_reagent_amount(/datum/reagent/cryptobiolin) + force < force*2)
@@ -321,15 +326,15 @@
target.reagents.add_reagent(/datum/reagent/toxin, force/2.5)
-/obj/mecha/mech_melee_attack(obj/mecha/M)
+/obj/vehicle/sealed/mecha/mech_melee_attack(obj/vehicle/sealed/mecha/M, mob/user)
if(!has_charge(melee_energy_drain))
- return 0
+ return NONE
use_power(melee_energy_drain)
if(M.damtype == BRUTE || M.damtype == BURN)
- log_combat(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
+ log_combat(user, src, "attacked", M, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
. = ..()
-/obj/mecha/proc/full_repair(charge_cell)
+/obj/vehicle/sealed/mecha/proc/full_repair(charge_cell)
obj_integrity = max_integrity
if(cell && charge_cell)
cell.charge = cell.maxcharge
@@ -344,10 +349,10 @@
if(internal_damage & MECHA_INT_CONTROL_LOST)
clearInternalDamage(MECHA_INT_CONTROL_LOST)
-/obj/mecha/narsie_act()
+/obj/vehicle/sealed/mecha/narsie_act()
emp_act(EMP_HEAVY)
-/obj/mecha/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
+/obj/vehicle/sealed/mecha/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
if(!no_effect)
if(selected)
used_item = selected
@@ -359,12 +364,16 @@
visual_effect_icon = ATTACK_EFFECT_MECHTOXIN
..()
-/obj/mecha/obj_destruction()
+/obj/vehicle/sealed/mecha/obj_destruction()
if(wreckage)
var/mob/living/silicon/ai/AI
- if(isAI(occupant))
- AI = occupant
- occupant = null
+ for(var/crew in occupants)
+ if(isAI(crew))
+ if(AI)
+ var/mob/living/silicon/ai/unlucky_ais = crew
+ unlucky_ais.gib()
+ continue
+ AI = crew
var/obj/structure/mecha_wreckage/WR = new wreckage(loc, AI)
for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
if(E.salvageable && prob(30))
diff --git a/code/game/mecha/mecha_parts.dm b/code/modules/vehicles/mecha/mecha_parts.dm
similarity index 98%
rename from code/game/mecha/mecha_parts.dm
rename to code/modules/vehicles/mecha/mecha_parts.dm
index a79be7c6a0f..2b43fdae653 100644
--- a/code/game/mecha/mecha_parts.dm
+++ b/code/modules/vehicles/mecha/mecha_parts.dm
@@ -9,14 +9,14 @@
w_class = WEIGHT_CLASS_GIGANTIC
flags_1 = CONDUCT_1
-/obj/item/mecha_parts/proc/try_attach_part(mob/user, obj/mecha/M) //For attaching parts to a finished mech
+/obj/item/mecha_parts/proc/try_attach_part(mob/user, obj/vehicle/sealed/mecha/M) //For attaching parts to a finished mech
if(!user.transferItemToLoc(src, M))
to_chat(user, "\The [src] is stuck to your hand, you cannot put it in \the [M]!")
return FALSE
user.visible_message("[user] attaches [src] to [M].", "You attach [src] to [M].")
return TRUE
-/obj/item/mecha_parts/part/try_attach_part(mob/user, obj/mecha/M)
+/obj/item/mecha_parts/part/try_attach_part(mob/user, obj/vehicle/sealed/mecha/M)
return
/obj/item/mecha_parts/chassis
diff --git a/code/game/mecha/mecha_topic.dm b/code/modules/vehicles/mecha/mecha_topic.dm
similarity index 73%
rename from code/game/mecha/mecha_topic.dm
rename to code/modules/vehicles/mecha/mecha_topic.dm
index ef4a5edb83b..f614cc23425 100644
--- a/code/game/mecha/mecha_topic.dm
+++ b/code/modules/vehicles/mecha/mecha_topic.dm
@@ -3,7 +3,7 @@
///// Rendering stats window ///////
////////////////////////////////////
-/obj/mecha/proc/get_stats_html()
+/obj/vehicle/sealed/mecha/proc/get_stats_html(mob/user)
. = {"
@@ -36,7 +36,7 @@
- [get_stats_part()]
+ [get_stats_part(user)]
[get_equipment_list()]
@@ -52,7 +52,7 @@
"}
///Returns the status of the mech.
-/obj/mecha/proc/get_stats_part()
+/obj/vehicle/sealed/mecha/proc/get_stats_part(mob/user)
var/integrity = obj_integrity/max_integrity*100
var/cell_charge = get_charge()
var/datum/gas_mixture/int_tank_air = 0
@@ -74,20 +74,20 @@
Cabin pressure: [internal_tank?"[cabin_pressure>WARNING_HIGH_PRESSURE ? "
[cabin_pressure]": cabin_pressure]kPa":"N/A"]
Cabin temperature: [internal_tank?"[return_temperature()]°K|[return_temperature() - T0C]°C":"N/A"]
[dna_lock?"
DNA-locked: [dna_lock] \[
Reset\]
":""]
"}
- . += "[get_actions()]
"
+ . += "[get_actions(user)]
"
///Returns HTML for mech actions. Ideally, this proc would be empty for the base mecha. Segmented for easy refactoring.
-/obj/mecha/proc/get_actions()
+/obj/vehicle/sealed/mecha/proc/get_actions(mob/user)
. = ""
- . += "[defense_action.owner ? "
Defense Mode: [defense_mode ? "Enabled" : "Disabled"]
" : ""]"
- . += "[overload_action.owner ? "
Leg Actuators Overload: [leg_overload_mode ? "Enabled" : "Disabled"]
" : ""]"
- . += "[smoke_action.owner ? "
Smoke: [smoke]
" : ""]"
- . += "[zoom_action.owner ? "
Zoom: [zoom_mode ? "Enabled" : "Disabled"]
" : ""]"
- . += "[switch_damtype_action.owner ? "
Damtype: [damtype]
" : ""]"
- . += "[phasing_action.owner ? "
Phase Modulator: [phasing ? "Enabled" : "Disabled"]
" : ""]"
+ . += "[LAZYACCESSASSOC(occupant_actions, user, /datum/action/vehicle/sealed/mecha/mech_defense_mode) ? "
Defense Mode: [defense_mode ? "Enabled" : "Disabled"]
" : ""]"
+ . += "[LAZYACCESSASSOC(occupant_actions, user, /datum/action/vehicle/sealed/mecha/mech_overload_mode) ? "
Leg Actuators Overload: [leg_overload_mode ? "Enabled" : "Disabled"]
" : ""]"
+ . += "[LAZYACCESSASSOC(occupant_actions, user, /datum/action/vehicle/sealed/mecha/mech_smoke) ? "
Smoke Charges remaining: [smoke_charges]
" : ""]"
+ . += "[LAZYACCESSASSOC(occupant_actions, user, /datum/action/vehicle/sealed/mecha/mech_zoom) ? "
Zoom: [zoom_mode ? "Enabled" : "Disabled"]
" : ""]"
+ . += "[LAZYACCESSASSOC(occupant_actions, user, /datum/action/vehicle/sealed/mecha/mech_switch_damtype) ? "
Damtype: [damtype]
" : ""]"
+ . += "[LAZYACCESSASSOC(occupant_actions, user, /datum/action/vehicle/sealed/mecha/mech_toggle_phasing) ? "
Phase Modulator: [phasing ? "Enabled" : "Disabled"]
" : ""]"
///HTML for internal damage.
-/obj/mecha/proc/report_internal_damage()
+/obj/vehicle/sealed/mecha/proc/report_internal_damage()
. = ""
var/list/dam_reports = list(
"[MECHA_INT_FIRE]" = "
INTERNAL FIRE",
@@ -105,8 +105,8 @@
. += "
DANGEROUSLY HIGH CABIN PRESSURE"
///HTML for list of equipment.
-/obj/mecha/proc/get_equipment_list() //outputs mecha equipment list in html
- if(!equipment.len)
+/obj/vehicle/sealed/mecha/proc/get_equipment_list() //outputs mecha equipment list in html
+ if(!LAZYLEN(equipment))
return
. = "
Equipment:"
for(var/obj/item/mecha_parts/mecha_equipment/MT in equipment)
@@ -114,7 +114,7 @@
. += "
"
///HTML for commands.
-/obj/mecha/proc/get_commands()
+/obj/vehicle/sealed/mecha/proc/get_commands()
. = {"
@@ -137,8 +137,8 @@
"}
-/obj/mecha/proc/get_equipment_menu() //outputs mecha html equipment menu
+/obj/vehicle/sealed/mecha/proc/get_equipment_menu() //outputs mecha html equipment menu
. = {"
"}
- if(equipment.len)
- for(var/X in equipment)
- var/obj/item/mecha_parts/mecha_equipment/W = X
- . += "[W.name] [W.detachable?"
Detach":"\[Non-removable\]
"]"
- . += {"
Available equipment slots: [max_equip-equipment.len]
+ for(var/e in equipment)
+ var/obj/item/mecha_parts/mecha_equipment/equipment = e
+ . += "[equipment.name] [equipment.detachable ? "
Detach" : "\[Non-removable\]
"]"
+ . += {"
Available equipment slots: [max_equip-LAZYLEN(equipment)]
"}
-/obj/mecha/proc/output_access_dialog(obj/item/card/id/id_card, mob/user)
+/obj/vehicle/sealed/mecha/proc/output_access_dialog(obj/item/card/id/id_card, mob/user)
if(!id_card || !user)
return
. = {"
@@ -191,7 +190,7 @@
onclose(user, "exosuit_add_access")
-/obj/mecha/proc/output_maintenance_dialog(obj/item/card/id/id_card,mob/user)
+/obj/vehicle/sealed/mecha/proc/output_maintenance_dialog(obj/item/card/id/id_card,mob/user)
if(!id_card || !user)
return
. = {"
@@ -203,8 +202,8 @@
- [add_req_access?"
Edit operation keycodes":null]
- [maint_access?"
[(construction_state > MECHA_LOCKED) ? "Terminate" : "Initiate"] maintenance protocol":null]
+ [(mecha_flags & ADDING_ACCESS_POSSIBLE)?"
Edit operation keycodes":null]
+ [(mecha_flags & ADDING_MAINT_ACCESS_POSSIBLE)?"
[(construction_state > MECHA_LOCKED) ? "Terminate" : "Initiate"] maintenance protocol":null]
[(construction_state == MECHA_OPEN_HATCH) ?"--------------------":null]
[(construction_state == MECHA_OPEN_HATCH) ?"[cell?"
Drop power cell":"No cell installed"]":null]
[(construction_state == MECHA_OPEN_HATCH) ?"[scanmod?"
Drop scanning module":"No scanning module installed"]":null]
@@ -223,7 +222,7 @@
///// Topic /////
/////////////////
-/obj/mecha/Topic(href, href_list)
+/obj/vehicle/sealed/mecha/Topic(href, href_list)
..()
if(!usr)
@@ -244,13 +243,13 @@
return
if(href_list["req_access"])
- if(!add_req_access)
+ if(!(mecha_flags & ADDING_ACCESS_POSSIBLE))
return
output_access_dialog(id_card,usr)
return
if(href_list["maint_access"])
- if(!maint_access)
+ if(!(mecha_flags & ADDING_MAINT_ACCESS_POSSIBLE))
return
if(construction_state == MECHA_LOCKED)
construction_state = MECHA_SECURE_BOLTS
@@ -280,14 +279,14 @@
return
if(href_list["add_req_access"])
- if(!add_req_access)
+ if(!(mecha_flags & ADDING_ACCESS_POSSIBLE))
return
operation_req_access += text2num(href_list["add_req_access"])
output_access_dialog(id_card,usr)
return
if(href_list["del_req_access"])
- if(!add_req_access)
+ if(!(mecha_flags & ADDING_ACCESS_POSSIBLE))
return
operation_req_access -= text2num(href_list["del_req_access"])
output_access_dialog(id_card, usr)
@@ -296,7 +295,7 @@
//Here ID access stuff goes to die.
if(href_list["finish_req_access"])
- add_req_access = 0
+ mecha_flags &= ~ADDING_ACCESS_POSSIBLE
usr << browse(null,"window=exosuit_add_access")
return
@@ -310,7 +309,7 @@
return
//Start of all internal topic stuff.
- if(usr != occupant)
+ if(!locate(usr) in occupants)
return
if(href_list["update_content"])
@@ -323,7 +322,7 @@
if(!equip || !equip.selectable)
return
selected = equip
- occupant_message("
You switch to [equip].")
+ to_chat(occupants, "[icon2html(src, occupants)]
You switch to [equip].")
visible_message("
[src] raises [equip].")
send_byjax(usr, "exosuit.browser", "eq_list", get_equipment_list())
return
@@ -350,53 +349,54 @@
//Changes the exosuit name.
if(href_list["change_name"])
var/userinput = stripped_input(usr, "Choose a new exosuit name.", "Rename exosuit", "", MAX_NAME_LEN)
- if(!userinput || usr != occupant || usr.incapacitated())
+ if(!userinput || !locate(usr) in occupants || usr.incapacitated())
return
name = userinput
return
//Toggles ID upload.
if (href_list["toggle_id_upload"])
- add_req_access = !add_req_access
- send_byjax(usr,"exosuit.browser","t_id_upload","[add_req_access?"L":"Unl"]ock ID upload panel")
+ mecha_flags ^= ADDING_ACCESS_POSSIBLE
+ send_byjax(usr,"exosuit.browser","t_id_upload","[(mecha_flags & ADDING_ACCESS_POSSIBLE)?"L":"Unl"]ock ID upload panel")
return
//Toggles main access.
if(href_list["toggle_maint_access"])
if(construction_state)
- occupant_message("
Maintenance protocols in effect")
+ to_chat(occupants, "[icon2html(src, occupants)]
Maintenance protocols in effect")
return
- maint_access = !maint_access
- send_byjax(usr,"exosuit.browser","t_maint_access","[maint_access?"Forbid":"Permit"] maintenance protocols")
+ mecha_flags ^= ADDING_MAINT_ACCESS_POSSIBLE
+ send_byjax(usr,"exosuit.browser","t_maint_access","[(mecha_flags & ADDING_MAINT_ACCESS_POSSIBLE)?"Forbid":"Permit"] maintenance protocols")
return
//Toggles connection port.
if (href_list["toggle_port_connection"])
if(internal_tank.connected_port)
if(internal_tank.disconnect())
- occupant_message("
Disconnected from the air system port.")
+ to_chat(occupants, "[icon2html(src, occupants)]
Disconnected from the air system port.")
log_message("Disconnected from gas port.", LOG_MECHA)
else
- occupant_message("
Unable to disconnect from the air system port!")
+ to_chat(occupants, "[icon2html(src, occupants)]
Unable to disconnect from the air system port!")
return
else
var/obj/machinery/atmospherics/components/unary/portables_connector/possible_port = locate() in loc
if(internal_tank.connect(possible_port))
- occupant_message("
Connected to the air system port.")
+ to_chat(occupants, "[icon2html(src, occupants)]
Connected to the air system port.")
log_message("Connected to gas port.", LOG_MECHA)
else
- occupant_message("
Unable to connect with air system port!")
+ to_chat(occupants, "[icon2html(src, occupants)]
Unable to connect with air system port!")
return
- send_byjax(occupant,"exosuit.browser","t_port_connection","[internal_tank.connected_port?"Disconnect from":"Connect to"] gas port")
+ send_byjax(occupants,"exosuit.browser","t_port_connection","[internal_tank.connected_port?"Disconnect from":"Connect to"] gas port")
return
//Turns on the DNA lock
if(href_list["dna_lock"])
- if(!iscarbon(occupant) || !occupant.dna)
- occupant_message("
You feel a prick as the needle takes your DNA sample.")
+ var/mob/living/carbon/user = usr
+ if(!istype(user) || !user.dna)
+ to_chat(user, "[icon2html(src, occupants)]
You can't create a DNA lock with no DNA!.")
return
- dna_lock = occupant.dna.unique_enzymes
- occupant_message("
You feel a prick as the needle takes your DNA sample.")
+ dna_lock = user.dna.unique_enzymes
+ to_chat(user, "[icon2html(src, occupants)]
You feel a prick as the needle takes your DNA sample.")
return
//Resets the DNA lock
@@ -406,16 +406,16 @@
//Repairs internal damage
if(href_list["repair_int_control_lost"])
- occupant_message("
Recalibrating coordination system...")
+ to_chat(occupants, "[icon2html(src, occupants)]
Recalibrating coordination system...")
log_message("Recalibration of coordination system started.", LOG_MECHA)
addtimer(CALLBACK(src, .proc/stationary_repair, loc), 100, TIMER_UNIQUE)
///Repairs internal damage if the mech hasn't moved.
-/obj/mecha/proc/stationary_repair(location)
+/obj/vehicle/sealed/mecha/proc/stationary_repair(location)
if(location == loc)
clearInternalDamage(MECHA_INT_CONTROL_LOST)
- occupant_message("
Recalibration successful.")
+ to_chat(occupants, "[icon2html(src, occupants)]
Recalibration successful.")
log_message("Recalibration of coordination system finished with 0 errors.", LOG_MECHA)
else
- occupant_message("
Recalibration failed!")
+ to_chat(occupants, "[icon2html(src, occupants)]
Recalibration failed!")
log_message("Recalibration of coordination system failed with 1 error.", LOG_MECHA, color="red")
diff --git a/code/game/mecha/mecha_wreckage.dm b/code/modules/vehicles/mecha/mecha_wreckage.dm
similarity index 100%
rename from code/game/mecha/mecha_wreckage.dm
rename to code/modules/vehicles/mecha/mecha_wreckage.dm
diff --git a/code/game/mecha/medical/odysseus.dm b/code/modules/vehicles/mecha/medical/odysseus.dm
similarity index 59%
rename from code/game/mecha/medical/odysseus.dm
rename to code/modules/vehicles/mecha/medical/odysseus.dm
index 27e139c84ab..1991d683af1 100644
--- a/code/game/mecha/medical/odysseus.dm
+++ b/code/modules/vehicles/mecha/medical/odysseus.dm
@@ -1,29 +1,31 @@
-/obj/mecha/medical/odysseus
+/obj/vehicle/sealed/mecha/medical/odysseus
desc = "These exosuits are developed and produced by Vey-Med. (© All rights reserved)."
name = "\improper Odysseus"
icon_state = "odysseus"
- step_in = 2
+ allow_diagonal_movement = TRUE
+ movedelay = 2
max_temperature = 15000
max_integrity = 120
wreckage = /obj/structure/mecha_wreckage/odysseus
internal_damage_threshold = 35
deflect_chance = 15
step_energy_drain = 6
+ internals_req_access = list(ACCESS_MECH_SCIENCE, ACCESS_MECH_MEDICAL)
-/obj/mecha/medical/odysseus/moved_inside(mob/living/carbon/human/H)
+/obj/vehicle/sealed/mecha/medical/odysseus/moved_inside(mob/living/carbon/human/H)
. = ..()
if(.)
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
hud.add_hud_to(H)
-/obj/mecha/medical/odysseus/go_out()
- if(isliving(occupant))
- var/mob/living/L = occupant
+/obj/vehicle/sealed/mecha/medical/odysseus/remove_occupant(mob/M)
+ if(isliving(M))
+ var/mob/living/L = M
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
hud.remove_hud_from(L)
- ..()
+ return ..()
-/obj/mecha/medical/odysseus/mmi_moved_inside(obj/item/mmi/M, mob/user)
+/obj/vehicle/sealed/mecha/medical/odysseus/mmi_moved_inside(obj/item/mmi/M, mob/user)
. = ..()
if(.)
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
diff --git a/code/game/mecha/working/clarke.dm b/code/modules/vehicles/mecha/working/clarke.dm
similarity index 79%
rename from code/game/mecha/working/clarke.dm
rename to code/modules/vehicles/mecha/working/clarke.dm
index 07ae1e62d3e..25e782ca96c 100644
--- a/code/game/mecha/working/clarke.dm
+++ b/code/modules/vehicles/mecha/working/clarke.dm
@@ -1,11 +1,11 @@
///Lavaproof, fireproof, fast mech with low armor and higher energy consumption, cannot strafe and has an internal ore box.
-/obj/mecha/working/clarke
+/obj/vehicle/sealed/mecha/working/clarke
desc = "Combining man and machine for a better, stronger engineer. Can even resist lava!"
name = "\improper Clarke"
icon_state = "clarke"
max_temperature = 65000
max_integrity = 200
- step_in = 1.25
+ movedelay = 1.25
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
lights_power = 7
deflect_chance = 10
@@ -14,34 +14,34 @@
max_equip = 7
wreckage = /obj/structure/mecha_wreckage/clarke
enter_delay = 40
- canstrafe = FALSE
+ mecha_flags = ADDING_ACCESS_POSSIBLE | IS_ENCLOSED
/// Handles an internal ore box for Clarke
var/obj/structure/ore_box/box
-/obj/mecha/working/clarke/Initialize()
+/obj/vehicle/sealed/mecha/working/clarke/Initialize()
. = ..()
box = new /obj/structure/ore_box(src)
var/obj/item/mecha_parts/mecha_equipment/orebox_manager/ME = new(src)
ME.attach(src)
-/obj/mecha/working/clarke/Destroy()
+/obj/vehicle/sealed/mecha/working/clarke/Destroy()
box.dump_box_contents()
return ..()
-/obj/mecha/working/clarke/moved_inside(mob/living/carbon/human/H)
+/obj/vehicle/sealed/mecha/working/clarke/moved_inside(mob/living/carbon/human/H)
. = ..()
if(.)
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_DIAGNOSTIC_ADVANCED]
hud.add_hud_to(H)
-/obj/mecha/working/clarke/go_out()
- if(isliving(occupant))
- var/mob/living/L = occupant
+/obj/vehicle/sealed/mecha/working/clarke/remove_occupant(mob/M)
+ if(isliving(M))
+ var/mob/living/L = M
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_DIAGNOSTIC_ADVANCED]
hud.remove_hud_from(L)
return ..()
-/obj/mecha/working/clarke/mmi_moved_inside(obj/item/mmi/M, mob/user)
+/obj/vehicle/sealed/mecha/working/clarke/mmi_moved_inside(obj/item/mmi/M, mob/user)
. = ..()
if(.)
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_DIAGNOSTIC_ADVANCED]
@@ -60,11 +60,11 @@
detachable = FALSE
salvageable = FALSE
/// Var to avoid istype checking every time the topic button is pressed. This will only work inside Clarke mechs.
- var/obj/mecha/working/clarke/hostmech
+ var/obj/vehicle/sealed/mecha/working/clarke/hostmech
-/obj/item/mecha_parts/mecha_equipment/orebox_manager/attach(obj/mecha/M)
+/obj/item/mecha_parts/mecha_equipment/orebox_manager/attach(obj/vehicle/sealed/mecha/M)
. = ..()
- if(istype(M, /obj/mecha/working/clarke))
+ if(istype(M, /obj/vehicle/sealed/mecha/working/clarke))
hostmech = M
/obj/item/mecha_parts/mecha_equipment/orebox_manager/detach()
diff --git a/code/game/mecha/working/ripley.dm b/code/modules/vehicles/mecha/working/ripley.dm
similarity index 79%
rename from code/game/mecha/working/ripley.dm
rename to code/modules/vehicles/mecha/working/ripley.dm
index 3dc9531adae..3cc13ab6883 100644
--- a/code/game/mecha/working/ripley.dm
+++ b/code/modules/vehicles/mecha/working/ripley.dm
@@ -1,9 +1,9 @@
-/obj/mecha/working/ripley
+/obj/vehicle/sealed/mecha/working/ripley
desc = "Autonomous Power Loader Unit MK-I. Designed primarily around heavy lifting, the Ripley can be outfitted with utility equipment to fill a number of roles."
name = "\improper APLU MK-I \"Ripley\""
icon_state = "ripley"
silicon_icon_state = "ripley-empty"
- step_in = 1.5 //Move speed, lower is faster.
+ movedelay = 1.5 //Move speed, lower is faster.
/// How fast the mech is in low pressure
var/fast_pressure_step_in = 1.5
/// How fast the mech is in normal pressure
@@ -26,42 +26,42 @@
/// How much things Ripley can carry in their Cargo Compartment
var/cargo_capacity = 15
-/obj/mecha/working/ripley/Move()
+/obj/vehicle/sealed/mecha/working/ripley/Move()
. = ..()
update_pressure()
-/obj/mecha/working/ripley/go_out()
+/obj/vehicle/sealed/mecha/working/ripley/mob_exit(mob/M, silent, forced)
..()
update_icon()
-/obj/mecha/working/ripley/moved_inside(mob/living/carbon/human/H)
+/obj/vehicle/sealed/mecha/working/ripley/moved_inside(mob/living/carbon/human/H)
..()
update_icon()
-/obj/mecha/working/ripley/check_for_internal_damage(list/possible_int_damage,ignore_threshold=null)
+/obj/vehicle/sealed/mecha/working/ripley/check_for_internal_damage(list/possible_int_damage, ignore_threshold = FALSE)
if (!enclosed)
possible_int_damage -= (MECHA_INT_TEMP_CONTROL + MECHA_INT_TANK_BREACH) //if we don't even have an air tank, these two doesn't make a ton of sense.
. = ..()
-/obj/mecha/working/ripley/Initialize()
+/obj/vehicle/sealed/mecha/working/ripley/Initialize()
. = ..()
AddComponent(/datum/component/armor_plate,3,/obj/item/stack/sheet/animalhide/goliath_hide,list(MELEE = 10, BULLET = 5, LASER = 5))
-/obj/mecha/working/ripley/Destroy()
+/obj/vehicle/sealed/mecha/working/ripley/Destroy()
for(var/atom/movable/A in cargo)
A.forceMove(drop_location())
step_rand(A)
cargo.Cut()
return ..()
-/obj/mecha/working/ripley/mkii
+/obj/vehicle/sealed/mecha/working/ripley/mkii
desc = "Autonomous Power Loader Unit MK-II. This prototype Ripley is refitted with a pressurized cabin, trading its prior speed for atmospheric protection and armor."
name = "\improper APLU MK-II \"Ripley\""
icon_state = "ripleymkii"
fast_pressure_step_in = 2 //step_in while in low pressure conditions
slow_pressure_step_in = 4 //step_in while in normal pressure conditions
- step_in = 4
+ movedelay = 4
max_temperature = 30000
max_integrity = 250
armor = list(MELEE = 40, BULLET = 30, LASER = 30, ENERGY = 30, BOMB = 60, BIO = 0, RAD = 70, FIRE = 100, ACID = 100)
@@ -69,47 +69,45 @@
enclosed = TRUE
enter_delay = 40
silicon_icon_state = null
- opacity = TRUE
-/obj/mecha/working/ripley/deathripley
+/obj/vehicle/sealed/mecha/working/ripley/deathripley
desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE"
name = "\improper DEATH-RIPLEY"
icon_state = "deathripley"
fast_pressure_step_in = 2 //step_in while in low pressure conditions
slow_pressure_step_in = 3 //step_in while in normal pressure conditions
- step_in = 4
+ movedelay = 4
lights_power = 7
wreckage = /obj/structure/mecha_wreckage/ripley/deathripley
step_energy_drain = 0
enclosed = TRUE
enter_delay = 40
silicon_icon_state = null
- opacity = TRUE
-/obj/mecha/working/ripley/deathripley/Initialize()
+/obj/vehicle/sealed/mecha/working/ripley/deathripley/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill
ME.attach(src)
-/obj/mecha/working/ripley/deathripley/real
+/obj/vehicle/sealed/mecha/working/ripley/deathripley/real
desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE. FOR REAL"
-/obj/mecha/working/ripley/deathripley/real/Initialize()
+/obj/vehicle/sealed/mecha/working/ripley/deathripley/real/Initialize()
. = ..()
for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
E.detach()
qdel(E)
- equipment.Cut()
+ LAZYCLEARLIST(equipment)
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/real
ME.attach(src)
-/obj/mecha/working/ripley/mining
+/obj/vehicle/sealed/mecha/working/ripley/mining
desc = "An old, dusty mining Ripley."
name = "\improper APLU \"Miner\""
obj_integrity = 75 //Low starting health
-/obj/mecha/working/ripley/mining/Initialize()
+/obj/vehicle/sealed/mecha/working/ripley/mining/Initialize()
. = ..()
if(cell)
cell.charge = FLOOR(cell.charge * 0.25, 1) //Starts at very low charge
@@ -137,24 +135,24 @@
var/obj/item/mecha_parts/mecha_equipment/mining_scanner/scanner = new
scanner.attach(src)
-/obj/mecha/working/ripley/Exit(atom/movable/O)
+/obj/vehicle/sealed/mecha/working/ripley/Exit(atom/movable/O)
if(O in cargo)
return 0
return ..()
-/obj/mecha/working/ripley/Topic(href, href_list)
+/obj/vehicle/sealed/mecha/working/ripley/Topic(href, href_list)
..()
if(href_list["drop_from_cargo"])
var/obj/O = locate(href_list["drop_from_cargo"]) in cargo
if(O)
- occupant_message("
You unload [O].")
+ to_chat(occupants, "[icon2html(src, occupants)]
You unload [O].")
O.forceMove(drop_location())
cargo -= O
log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]", LOG_MECHA)
return
-/obj/mecha/working/ripley/contents_explosion(severity, target)
+/obj/vehicle/sealed/mecha/working/ripley/contents_explosion(severity, target)
for(var/X in cargo)
var/obj/O = X
if(prob(30/severity))
@@ -162,7 +160,7 @@
O.forceMove(drop_location())
. = ..()
-/obj/mecha/working/ripley/get_stats_part()
+/obj/vehicle/sealed/mecha/working/ripley/get_stats_part()
var/output = ..()
output += "
Cargo Compartment Contents:"
if(cargo.len)
@@ -173,7 +171,7 @@
output += "
"
return output
-/obj/mecha/working/ripley/relay_container_resist_act(mob/living/user, obj/O)
+/obj/vehicle/sealed/mecha/working/ripley/relay_container_resist_act(mob/living/user, obj/O)
to_chat(user, "
You lean on the back of [O] and start pushing so it falls out of [src].")
if(do_after(user, 300, target = O))
if(!user || user.stat != CONSCIOUS || user.loc != src || O.loc != src )
@@ -184,20 +182,21 @@
else
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
to_chat(user, "
You fail to push [O] out of [src]!")
+
/**
* Makes the mecha go faster and halves the mecha drill cooldown if in Lavaland pressure.
*
* Checks for Lavaland pressure, if that works out the mech's speed is equal to fast_pressure_step_in and the cooldown for the mecha drill is halved. If not it uses slow_pressure_step_in and drill cooldown is normal.
*/
-/obj/mecha/working/ripley/proc/update_pressure()
+/obj/vehicle/sealed/mecha/working/ripley/proc/update_pressure()
var/turf/T = get_turf(loc)
if(lavaland_equipment_pressure_check(T))
- step_in = fast_pressure_step_in
+ movedelay = fast_pressure_step_in
for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment)
drill.equip_cooldown = initial(drill.equip_cooldown) * 0.5
else
- step_in = slow_pressure_step_in
+ movedelay = slow_pressure_step_in
for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment)
drill.equip_cooldown = initial(drill.equip_cooldown)
diff --git a/code/game/mecha/working/working.dm b/code/modules/vehicles/mecha/working/working.dm
similarity index 84%
rename from code/game/mecha/working/working.dm
rename to code/modules/vehicles/mecha/working/working.dm
index 51213bd110b..5d6a8537152 100644
--- a/code/game/mecha/working/working.dm
+++ b/code/modules/vehicles/mecha/working/working.dm
@@ -1,7 +1,7 @@
-/obj/mecha/working
+/obj/vehicle/sealed/mecha/working
internal_damage_threshold = 60
-/obj/mecha/working/Move()
+/obj/vehicle/sealed/mecha/working/Move()
. = ..()
if(.)
collect_ore()
@@ -11,7 +11,7 @@
*
* Checks for a hydraulic clamp or ore box manager and if it finds an ore box inside them puts ore in the ore box.
*/
-/obj/mecha/working/proc/collect_ore()
+/obj/vehicle/sealed/mecha/working/proc/collect_ore()
if((locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in equipment) || (locate(/obj/item/mecha_parts/mecha_equipment/orebox_manager) in equipment))
var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in contents
if(ore_box)
diff --git a/code/modules/vehicles/ridden.dm b/code/modules/vehicles/ridden.dm
index 71805a8e6f0..f69847207e2 100644
--- a/code/modules/vehicles/ridden.dm
+++ b/code/modules/vehicles/ridden.dm
@@ -2,7 +2,7 @@
name = "ridden vehicle"
can_buckle = TRUE
max_buckled_mobs = 1
- buckle_lying = FALSE
+ buckle_lying = 0
default_driver_move = FALSE
var/legs_required = 2
var/arms_required = 1 //why not?
diff --git a/code/modules/vehicles/sealed.dm b/code/modules/vehicles/sealed.dm
index 6751ddfe358..e3a019427bf 100644
--- a/code/modules/vehicles/sealed.dm
+++ b/code/modules/vehicles/sealed.dm
@@ -50,10 +50,12 @@
mob_exit(M, silent, randomstep)
/obj/vehicle/sealed/proc/mob_exit(mob/M, silent = FALSE, randomstep = FALSE)
+ SIGNAL_HANDLER
if(!istype(M))
return FALSE
remove_occupant(M)
- M.forceMove(exit_location(M))
+ if(!isAI(M))//This is the ONE mob we dont want to be moved to the vehicle that should be handeled when used
+ M.forceMove(exit_location(M))
if(randomstep)
var/turf/target_turf = get_step(exit_location(M), pick(GLOB.cardinals))
M.throw_at(target_turf, 5, 10)
diff --git a/code/modules/vehicles/vehicle_actions.dm b/code/modules/vehicles/vehicle_actions.dm
index cbb64694286..0e2b9893cfc 100644
--- a/code/modules/vehicles/vehicle_actions.dm
+++ b/code/modules/vehicles/vehicle_actions.dm
@@ -89,7 +89,7 @@
occupant_actions -= M
return TRUE
-//ACTION DATUMS
+/////////////ACTION DATUMS\\\\\\\\\
/datum/action/vehicle
check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUN | AB_CHECK_CONSCIOUS
diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm
index 1d1bded9308..91ba5605d34 100644
--- a/code/modules/vending/_vending.dm
+++ b/code/modules/vending/_vending.dm
@@ -920,7 +920,7 @@ GLOBAL_LIST_EMPTY(vending_products)
var/obj/throw_item = null
var/mob/living/target = locate() in view(7,src)
if(!target)
- return 0
+ return FALSE
for(var/datum/data/vending_product/R in shuffle(product_records))
if(R.amount <= 0) //Try to use a record that actually has something to dump.
@@ -933,13 +933,13 @@ GLOBAL_LIST_EMPTY(vending_products)
throw_item = new dump_path(loc)
break
if(!throw_item)
- return 0
+ return FALSE
pre_throw(throw_item)
throw_item.throw_at(target, 16, 3)
visible_message("
[src] launches [throw_item] at [target]!")
- return 1
+ return TRUE
/**
* A callback called before an item is tossed out
*
diff --git a/code/modules/vending/liberation.dm b/code/modules/vending/liberation.dm
index e519372adbe..e4ab27b156b 100644
--- a/code/modules/vending/liberation.dm
+++ b/code/modules/vending/liberation.dm
@@ -5,8 +5,8 @@
product_slogans = "Liberation Station: Your one-stop shop for all things second amendment!;Be a patriot today, pick up a gun!;Quality weapons for cheap prices!;Better dead than red!"
product_ads = "Float like an astronaut, sting like a bullet!;Express your second amendment today!;Guns don't kill people, but you can!;Who needs responsibilities when you have guns?"
vend_reply = "Remember the name: Liberation Station!"
- products = list(/obj/item/reagent_containers/food/snacks/burger/plain = 5, //O say can you see, by the dawn's early light
- /obj/item/reagent_containers/food/snacks/burger/baseball = 3, //What so proudly we hailed at the twilight's last gleaming
+ products = list(/obj/item/food/burger/plain = 5, //O say can you see, by the dawn's early light
+ /obj/item/food/burger/baseball = 3, //What so proudly we hailed at the twilight's last gleaming
/obj/item/reagent_containers/food/snacks/fries = 5, //Whose broad stripes and bright stars through the perilous fight
/obj/item/reagent_containers/food/drinks/beer/light = 10, //O'er the ramparts we watched, were so gallantly streaming?
/obj/item/gun/ballistic/automatic/pistol/deagle/gold = 2,
@@ -22,10 +22,10 @@
/obj/item/ammo_box/magazine/m45 = 2,
/obj/item/ammo_box/magazine/m75 = 2,
/obj/item/reagent_containers/food/snacks/cheesyfries = 5,
- /obj/item/reagent_containers/food/snacks/burger/baconburger = 5) //Premium burgers for the premium section
+ /obj/item/food/burger/baconburger = 5) //Premium burgers for the premium section
contraband = list(/obj/item/clothing/under/misc/patriotsuit = 3,
/obj/item/bedsheet/patriot = 5,
- /obj/item/reagent_containers/food/snacks/burger/superbite = 3) //U S A
+ /obj/item/food/burger/superbite = 3) //U S A
armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 50)
resistance_flags = FIRE_PROOF
default_price = 150
diff --git a/html/changelog.html b/html/changelog.html
index eb3fe1cafc6..bffed07e4c6 100644
--- a/html/changelog.html
+++ b/html/changelog.html
@@ -51,6 +51,104 @@
-->
+
30 August 2020
+
ArcaneMusic updated:
+
+ - Showers now preform a touch reaction, not a touch/vapor reaction with piped reagents.
+ - You can now build water recyclers in lathes, as intended.
+
+
Ghilker updated:
+
+ - Pressure Valve (a device that allow gas flow in a pipenet if the input pressure is higher than the set pressure)
+
+
Jared-Fogle updated:
+
+ - You can now spray paint anything you want again.
+
+
LemonInTheDark updated:
+
+ - You can no longer increase your view range by messing about with ghostroles
+
+
Qustinnus, 4Dplanner updated:
+
+ - Adds map_generator datums, which will handle terrain generation for a specific area
+ - Adds a jungle generator datum, which uses rust-g noise to generate 3 layers of perlin noise to make a somewhat coheisve and seamless jungle based on height humidity and heat.
+
+
YPOQ updated:
+
+ - Silicons and parrots can speak into their radios again.
+
+
oranges, kryson updated:
+
+ - Added a medal box for the Head Of Personnel
+ - Added the OrdoM memorial medal for paperwork excellence
+
+
qustinnus updated:
+
+ - burgers now composition based
+ - you can now grind bread again
+ - you can now auto-eat things with edible component
+ - food trash element, for dumping trash when u eat food
+
+
+
29 August 2020
+
ATHATH updated:
+
+ - Blob spores from gold slime core and hostile life reactions are now marked as being independent, meaning that they can now drag things, but can no longer freely walk through blob tiles.
+ - Independent blob spores and blobbernauts can now speak over blob chat like overmind-dependent blob mobs do.
+ - Blob spores can no longer damage the environment, for realzies this time. This change does not affect blob zombies.
+ - Removed an unused variable from tech nodes (and the unused proc that references it).
+
+
ArcaneMusic updated:
+
+ - Admins can now spawn the Teambuilding machine for assign teams, like Red or Blue, quickly!
+ - Sinks and showers can now have reagents piped into them.
+ - Using metal sheets on reagent dispensers will now produce a plumbing-enabled supply tank for station use.
+ - Added a new stock part, the water recycler, used in building showers and sinks from scratch.
+ - Hydroponics trays are now plumbing enabled. Water and nutrients will be sorted into their appropriate slots when piped in.
+ - Sinks and showers now have internal water reservoirs, and start filled with water.
+ - Showers and sinks must be constructed from a frame, then finished with a water recycler. remove: Hydroponics hoses have been removed in favor of actual plumbing between machines.
+
+
Donkie updated:
+
+ - Fixed regular pump on map icon north/south being misaligned by 1 pixel
+
+
EdgeLordExe updated:
+
+ - Rust_spread will no longer lag servers into oblivion
+ - Changed a few flavour texts to better represent lore.
+ - Rustbringer's oath now properly only heals while on rusted tiles.
+
+
Helianthus00 updated:
+
+ - Deltastation: made a maint area below the captain's office
+
+
Krysonism updated:
+
+ - granting a mob sentience, with the sentience potion also tames it.
+
+
Melbert updated:
+
+ - You can now remove items from food storage by clicking on them on grab intent.
+ - Componentizes food storage from food/snacks/store.
+
+
TiviPlus updated:
+
+ - A bunch of 1 and 0 use the true/false define now and changed up a bunch of returns
+
+
VexingRaven updated:
+
+ - Plasmaman Supply Kit description now properly lists the envirosuit gloves it contains
+
+
Wayland-Smithy updated:
+
+ - A vulnerability in the AI chamber anti-abduction foil lining has been fixed.
+
+
actioninja updated:
+
+ - Automatic glide size adjustment for smoother movement
+
+
27 August 2020
ATHATH updated:
@@ -2660,79 +2758,6 @@
- ...And they turned the old medipen into a luxury
- Lavaland Extract was found to break laws of physics and was removed from existance
-
-
28 June 2020
-
ATHATH updated:
-
- - Fixed n2o knocking out players for longer than expected.
-
-
ArcaneMusic updated:
-
- - Adds the Cargo Bounty UI as a modular app, with cargo access.
- - The Cargo Bounty UI has been revamped.
- - Cargo tablets now come preinstalled with the price tagger and cargo bounty apps.
-
-
Cyberboss updated:
-
- - TGS4 channel tags will now use ',' as a delimiter to indicate multiple tags.
-
-
EdgeLordExe updated:
-
- - Mansus grasp now wont proc on things it shouldnt proc on, tl;dr you wont loose your charges by missclicking on a tile.
- - Replaced touch of madness with a new fun late game spell
- - Switches positions of blood siphon and cleave
-
-
Fikou updated:
-
- - you can now transmute a pen, a pair of eyes, a bible and human skin into a spare codex cicatrix if you researched some new lore
- - mjolnir now knockdowns instead of stunning
-
-
Hopek updated:
-
- - Tape recorder has been reworked.
-
-
KathyRyals updated:
-
- - The Xray mutation can no longer be obtained via combining radioactive and thermal eyes.
-
-
ShizCalev updated:
-
- - Fixed some bad areacoord messages when teleporting around.
- - Fixed an exploit that would allow you to destroy round-critical / indestructible items with folders.
-
-
XRandomXManX updated:
-
- - Removed Decal Painter from BEPIS Minor Rewards
- - Added Decal Painter to the Basic Tools Research Node
- - Added Decal Painter to Maintenance Loot alongside the Airlock Painter
-
-
necromanceranne updated:
-
- - Added new heretic blade sprites! One for the Ashen Blade, Rusted Blade and Flesh Blade
- - The blades have some descriptions now.
- - Fixed some infiltrator toolbox sprites (hopefully).
- - Some eldritch items have had their descriptions and text altered to be a bit more legible and flavourful.
-
-
nightred updated:
-
- - Service department area update on Meta
- - Stackers deposit to the silo when picking up stacks from the input side.
-
-
silicons updated:
-
- - An explosion compressor has been added to science. It makes raw anomaly cores into proper anomaly cores using prepared TTVs of a specific required blast radius.
-
-
-
27 June 2020
-
Ryll/Shaps updated:
-
- - Too much bone hurting juice REALLY hurts your bones, oof.
-
-
Tlaltecuhtli updated:
-
- - the nanotransen research science division found that epinephrine has healing effects to people who drank lexorin
- - eye stabbing returns a normal attack if it fails instead of doing nothing
-
GoonStation 13 Development Team
diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml
index 18568ad1b2e..22cc54d7889 100644
--- a/html/changelogs/.all_changelog.yml
+++ b/html/changelogs/.all_changelog.yml
@@ -42389,3 +42389,82 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
break the panel.'
- admin: Unthickened hrefs.log (no more ping hrefs)
- admin: Thickened tgui.log (logs actions, interacted object and mob location)
+2020-08-29:
+ ATHATH:
+ - bugfix: Blob spores from gold slime core and hostile life reactions are now marked
+ as being independent, meaning that they can now drag things, but can no longer
+ freely walk through blob tiles.
+ - balance: Independent blob spores and blobbernauts can now speak over blob chat
+ like overmind-dependent blob mobs do.
+ - bugfix: Blob spores can no longer damage the environment, for realzies this time.
+ This change does not affect blob zombies.
+ - rscdel: Removed an unused variable from tech nodes (and the unused proc that references
+ it).
+ ArcaneMusic:
+ - rscadd: Admins can now spawn the Teambuilding machine for assign teams, like Red
+ or Blue, quickly!
+ - rscadd: Sinks and showers can now have reagents piped into them.
+ - rscadd: Using metal sheets on reagent dispensers will now produce a plumbing-enabled
+ supply tank for station use.
+ - rscadd: Added a new stock part, the water recycler, used in building showers and
+ sinks from scratch.
+ - rscadd: Hydroponics trays are now plumbing enabled. Water and nutrients will be
+ sorted into their appropriate slots when piped in.
+ - tweak: Sinks and showers now have internal water reservoirs, and start filled
+ with water.
+ - tweak: 'Showers and sinks must be constructed from a frame, then finished with
+ a water recycler. remove: Hydroponics hoses have been removed in favor of actual
+ plumbing between machines.'
+ Donkie:
+ - bugfix: Fixed regular pump on map icon north/south being misaligned by 1 pixel
+ EdgeLordExe:
+ - tweak: Rust_spread will no longer lag servers into oblivion
+ - tweak: Changed a few flavour texts to better represent lore.
+ - bugfix: Rustbringer's oath now properly only heals while on rusted tiles.
+ Helianthus00:
+ - tweak: 'Deltastation: made a maint area below the captain''s office'
+ Krysonism:
+ - tweak: granting a mob sentience, with the sentience potion also tames it.
+ Melbert:
+ - tweak: You can now remove items from food storage by clicking on them on grab
+ intent.
+ - code_imp: Componentizes food storage from food/snacks/store.
+ TiviPlus:
+ - refactor: A bunch of 1 and 0 use the true/false define now and changed up a bunch
+ of returns
+ VexingRaven:
+ - tweak: Plasmaman Supply Kit description now properly lists the envirosuit gloves
+ it contains
+ Wayland-Smithy:
+ - bugfix: A vulnerability in the AI chamber anti-abduction foil lining has been
+ fixed.
+ actioninja:
+ - rscadd: Automatic glide size adjustment for smoother movement
+2020-08-30:
+ ArcaneMusic:
+ - bugfix: Showers now preform a touch reaction, not a touch/vapor reaction with
+ piped reagents.
+ - bugfix: You can now build water recyclers in lathes, as intended.
+ Ghilker:
+ - rscadd: Pressure Valve (a device that allow gas flow in a pipenet if the input
+ pressure is higher than the set pressure)
+ Jared-Fogle:
+ - rscadd: You can now spray paint anything you want again.
+ LemonInTheDark:
+ - bugfix: You can no longer increase your view range by messing about with ghostroles
+ Qustinnus, 4Dplanner:
+ - rscadd: Adds map_generator datums, which will handle terrain generation for a
+ specific area
+ - rscadd: Adds a jungle generator datum, which uses rust-g noise to generate 3 layers
+ of perlin noise to make a somewhat coheisve and seamless jungle based on height
+ humidity and heat.
+ YPOQ:
+ - bugfix: Silicons and parrots can speak into their radios again.
+ oranges, kryson:
+ - rscadd: Added a medal box for the Head Of Personnel
+ - rscadd: Added the OrdoM memorial medal for paperwork excellence
+ qustinnus:
+ - code_imp: burgers now composition based
+ - bugfix: you can now grind bread again
+ - rscadd: you can now auto-eat things with edible component
+ - code_imp: food trash element, for dumping trash when u eat food
diff --git a/html/changelogs/AutoChangeLog-pr-52515.yml b/html/changelogs/AutoChangeLog-pr-52515.yml
deleted file mode 100644
index 9707ca8e716..00000000000
--- a/html/changelogs/AutoChangeLog-pr-52515.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-author: "actioninja"
-delete-after: True
-changes:
- - rscadd: "Automatic glide size adjustment for smoother movement"
diff --git a/html/changelogs/AutoChangeLog-pr-52680.yml b/html/changelogs/AutoChangeLog-pr-52680.yml
deleted file mode 100644
index df78a80d47c..00000000000
--- a/html/changelogs/AutoChangeLog-pr-52680.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-author: "EdgeLordExe"
-delete-after: True
-changes:
- - tweak: "Rust_spread will no longer lag servers into oblivion"
- - tweak: "Changed a few flavour texts to better represent lore."
- - bugfix: "Rustbringer's oath now properly only heals while on rusted tiles."
diff --git a/html/changelogs/AutoChangeLog-pr-52865.yml b/html/changelogs/AutoChangeLog-pr-52865.yml
deleted file mode 100644
index 4e7ce03ac2a..00000000000
--- a/html/changelogs/AutoChangeLog-pr-52865.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-author: "ArcaneMusic"
-delete-after: True
-changes:
- - rscadd: "Sinks and showers can now have reagents piped into them."
- - rscadd: "Using metal sheets on reagent dispensers will now produce a plumbing-enabled supply tank for station use."
- - rscadd: "Added a new stock part, the water recycler, used in building showers and sinks from scratch."
- - rscadd: "Hydroponics trays are now plumbing enabled. Water and nutrients will be sorted into their appropriate slots when piped in."
- - tweak: "Sinks and showers now have internal water reservoirs, and start filled with water."
- - tweak: "Showers and sinks must be constructed from a frame, then finished with a water recycler.
-remove: Hydroponics hoses have been removed in favor of actual plumbing between machines."
diff --git a/html/changelogs/AutoChangeLog-pr-52902.yml b/html/changelogs/AutoChangeLog-pr-52902.yml
new file mode 100644
index 00000000000..54e180e53ec
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-52902.yml
@@ -0,0 +1,4 @@
+author: "TiviPlus"
+delete-after: True
+changes:
+ - refactor: "Mech refactor"
diff --git a/html/changelogs/AutoChangeLog-pr-52941.yml b/html/changelogs/AutoChangeLog-pr-52941.yml
new file mode 100644
index 00000000000..0e28557da2c
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-52941.yml
@@ -0,0 +1,4 @@
+author: "Ghilker"
+delete-after: True
+changes:
+ - rscadd: "Added Crystal Invasion Event (with all the mechanics, mobs and item related)"
diff --git a/html/changelogs/AutoChangeLog-pr-53005.yml b/html/changelogs/AutoChangeLog-pr-53005.yml
deleted file mode 100644
index 21d2f657f5e..00000000000
--- a/html/changelogs/AutoChangeLog-pr-53005.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-author: "Wayland-Smithy"
-delete-after: True
-changes:
- - bugfix: "A vulnerability in the AI chamber anti-abduction foil lining has been fixed."
diff --git a/html/changelogs/AutoChangeLog-pr-53083.yml b/html/changelogs/AutoChangeLog-pr-53083.yml
new file mode 100644
index 00000000000..e0191ab9974
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-53083.yml
@@ -0,0 +1,4 @@
+author: "Dennok"
+delete-after: True
+changes:
+ - tweak: "ladders keep its menu opened when you use ladder"
diff --git a/html/changelogs/AutoChangeLog-pr-53116.yml b/html/changelogs/AutoChangeLog-pr-53116.yml
deleted file mode 100644
index c9b00f796c1..00000000000
--- a/html/changelogs/AutoChangeLog-pr-53116.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-author: "Melbert"
-delete-after: True
-changes:
- - tweak: "You can now remove items from food storage by clicking on them on grab intent."
- - code_imp: "Componentizes food storage from food/snacks/store."
diff --git a/html/changelogs/AutoChangeLog-pr-53147.yml b/html/changelogs/AutoChangeLog-pr-53147.yml
deleted file mode 100644
index 541274ede5a..00000000000
--- a/html/changelogs/AutoChangeLog-pr-53147.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-author: "ArcaneMusic"
-delete-after: True
-changes:
- - rscadd: "Admins can now spawn the Teambuilding machine for assign teams, like Red or Blue, quickly!"
diff --git a/html/changelogs/AutoChangeLog-pr-53167.yml b/html/changelogs/AutoChangeLog-pr-53167.yml
deleted file mode 100644
index dbcb2b1e9fc..00000000000
--- a/html/changelogs/AutoChangeLog-pr-53167.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-author: "Krysonism"
-delete-after: True
-changes:
- - tweak: "granting a mob sentience, with the sentience potion also tames it."
diff --git a/html/changelogs/AutoChangeLog-pr-53178.yml b/html/changelogs/AutoChangeLog-pr-53178.yml
deleted file mode 100644
index af0ca113d46..00000000000
--- a/html/changelogs/AutoChangeLog-pr-53178.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-author: "VexingRaven"
-delete-after: True
-changes:
- - tweak: "Plasmaman Supply Kit description now properly lists the envirosuit gloves it contains"
diff --git a/html/changelogs/AutoChangeLog-pr-53188.yml b/html/changelogs/AutoChangeLog-pr-53188.yml
deleted file mode 100644
index e6805957046..00000000000
--- a/html/changelogs/AutoChangeLog-pr-53188.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-author: "ATHATH"
-delete-after: True
-changes:
- - bugfix: "Blob spores from gold slime core and hostile life reactions are now marked as being independent, meaning that they can now drag things, but can no longer freely walk through blob tiles."
- - balance: "Independent blob spores and blobbernauts can now speak over blob chat like overmind-dependent blob mobs do."
- - bugfix: "Blob spores can no longer damage the environment, for realzies this time. This change does not affect blob zombies."
diff --git a/html/changelogs/AutoChangeLog-pr-53214.yml b/html/changelogs/AutoChangeLog-pr-53214.yml
deleted file mode 100644
index d9232bb46f3..00000000000
--- a/html/changelogs/AutoChangeLog-pr-53214.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-author: "ATHATH"
-delete-after: True
-changes:
- - rscdel: "Removed an unused variable from tech nodes (and the unused proc that references it)."
diff --git a/html/changelogs/AutoChangeLog-pr-53216.yml b/html/changelogs/AutoChangeLog-pr-53216.yml
deleted file mode 100644
index de06ca4aea8..00000000000
--- a/html/changelogs/AutoChangeLog-pr-53216.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-author: "Donkie"
-delete-after: True
-changes:
- - bugfix: "Fixed regular pump on map icon north/south being misaligned by 1 pixel"
diff --git a/html/changelogs/AutoChangeLog-pr-53233.yml b/html/changelogs/AutoChangeLog-pr-53233.yml
new file mode 100644
index 00000000000..7731205c44a
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-53233.yml
@@ -0,0 +1,5 @@
+author: "LemonInTheDark"
+delete-after: True
+changes:
+ - rscadd: "H2O is a bit more spicy in the sm, and plux is now a danger rather then a gift, filter it out you nerds."
+ - balance: "You feel a great shift in space, the spice rock has changed"
diff --git a/html/changelogs/AutoChangeLog-pr-53287.yml b/html/changelogs/AutoChangeLog-pr-53287.yml
new file mode 100644
index 00000000000..13ccdabec67
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-53287.yml
@@ -0,0 +1,7 @@
+author: "Helianthus00"
+delete-after: True
+changes:
+ - rscadd: "Added 2 new subtypes of gas meter so that they work on layers 1 and 3"
+ - bugfix: "Deltastation: Fixes some broken gas meters to be on the correct layer"
+ - bugfix: "Icebox station: Fixes some broken gas meters to be on the correct layer, as well as relocating the random ones in maint to actual pipes"
+ - bugfix: "Pubbystation: Fixes some broken gas meters to be on the correct layer"
diff --git a/html/changelogs/AutoChangeLog-pr-53317.yml b/html/changelogs/AutoChangeLog-pr-53317.yml
new file mode 100644
index 00000000000..a80c9a1602a
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-53317.yml
@@ -0,0 +1,4 @@
+author: "TiviPlus"
+delete-after: True
+changes:
+ - bugfix: "fixed overlay lighting sometimes displaying offset"
diff --git a/html/statbrowser.html b/html/statbrowser.html
index f8d6df48dea..db582457869 100644
--- a/html/statbrowser.html
+++ b/html/statbrowser.html
@@ -9,8 +9,8 @@
body {
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: 12px !important;
- margin: 5px !important;
- padding: 2px !important;
+ margin: 0 !important;
+ padding: 0 !important;
}
body.dark {
background-color: #131313;
@@ -19,11 +19,18 @@ body.dark {
#menu {
background-color: white;
+ position: fixed;
+ padding: 7px;
+ width: 100%;
}
.dark #menu {
background-color: #131313;
}
+#statcontent {
+ padding: 0 7px 7px 7px;
+}
+
a {
color: black;
text-decoration: none
@@ -142,6 +149,7 @@ li a:hover:not(.active) {
+