diff --git a/README.md b/README.md index 3e123280a2..ed82fb08e6 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Based and maintained from /tg/station.
**Forums:** http://citadel-station.net/forum/
**Ban Appeals:** http://citadel-station.net/forum/forumdisplay.php?fid=8
**Code:** https://github.com/Citadel-Station-13/Citadel-Station-13
-**Discord:** [Here](https://discord.gg/3gJ9pnM).
+**Discord:** [Here](https://discord.gg/E6SQuhz).
## DOWNLOADING diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm index 738148c948..ed5b07168f 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm @@ -508,7 +508,9 @@ /obj/structure/stone_tile/cracked{ dir = 4 }, -/obj/item/construction/rcd/loaded, +/obj/item/construction/rcd/loaded/upgraded{ + + }, /turf/open/indestructible/boss, /area/ruin/unpowered/ash_walkers) "bn" = ( diff --git a/_maps/RandomRuins/SpaceRuins/gasthelizards.dmm b/_maps/RandomRuins/SpaceRuins/gasthelizards.dmm index 8956267108..e21c3a92f7 100644 --- a/_maps/RandomRuins/SpaceRuins/gasthelizards.dmm +++ b/_maps/RandomRuins/SpaceRuins/gasthelizards.dmm @@ -103,7 +103,7 @@ /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/lizard, /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/lizard, /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/lizard, -/turf/open/floor/plasteel/airless/dark, +/turf/open/floor/plasteel/freezer, /area/ruin/space/has_grav/gasthelizard) "n" = ( /obj/structure/closet/crate/freezer, @@ -117,7 +117,7 @@ }, /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/lizard, /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/lizard, -/turf/open/floor/plasteel/airless/dark, +/turf/open/floor/plasteel/freezer, /area/ruin/space/has_grav/gasthelizard) "o" = ( /obj/structure/closet/crate/freezer, @@ -129,7 +129,7 @@ /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/lizard, /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/lizard, /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/lizard, -/turf/open/floor/plasteel/airless/dark, +/turf/open/floor/plasteel/freezer, /area/ruin/space/has_grav/gasthelizard) "p" = ( /obj/structure/window/reinforced{ @@ -158,7 +158,7 @@ /turf/open/floor/plasteel, /area/ruin/space/has_grav/gasthelizard) "r" = ( -/turf/open/floor/plasteel/airless/dark, +/turf/open/floor/plasteel/dark, /area/ruin/space/has_grav/gasthelizard) "s" = ( /obj/machinery/atmospherics/components/unary/portables_connector/visible{ @@ -203,14 +203,14 @@ /area/ruin/space/has_grav/gasthelizard) "x" = ( /obj/structure/kitchenspike, -/turf/open/floor/plasteel/airless/dark, +/turf/open/floor/plasteel/dark, /area/ruin/space/has_grav/gasthelizard) "y" = ( /obj/structure/table/reinforced, /obj/item/kitchen/knife/butcher, /obj/item/restraints/handcuffs, /obj/item/reagent_containers/spray/pepper, -/turf/open/floor/plasteel/airless/dark, +/turf/open/floor/plasteel/dark, /area/ruin/space/has_grav/gasthelizard) "z" = ( /obj/machinery/atmospherics/components/unary/portables_connector/visible{ @@ -230,14 +230,14 @@ /area/ruin/space/has_grav/gasthelizard) "C" = ( /obj/machinery/gibber, -/turf/open/floor/plasteel/airless/dark, +/turf/open/floor/plasteel/dark, /area/ruin/space/has_grav/gasthelizard) "D" = ( /obj/structure/table/reinforced, /obj/item/clothing/suit/straight_jacket, /obj/item/reagent_containers/syringe/lethal, /obj/item/reagent_containers/syringe/lethal/choral, -/turf/open/floor/plasteel/airless/dark, +/turf/open/floor/plasteel/dark, /area/ruin/space/has_grav/gasthelizard) "E" = ( /obj/machinery/atmospherics/components/unary/portables_connector/visible{ @@ -258,7 +258,7 @@ /area/ruin/space/has_grav/gasthelizard) "H" = ( /obj/machinery/door/airlock/security, -/turf/open/floor/plasteel/airless/dark, +/turf/open/floor/plasteel/dark, /area/ruin/space/has_grav/gasthelizard) "I" = ( /obj/item/reagent_containers/glass/bottle/morphine{ @@ -282,7 +282,7 @@ pixel_y = 6 }, /obj/structure/table/reinforced, -/turf/open/floor/plasteel/airless/dark, +/turf/open/floor/plasteel/dark, /area/ruin/space/has_grav/gasthelizard) "J" = ( /obj/structure/rack, @@ -328,12 +328,12 @@ /obj/item/cautery, /obj/item/circular_saw, /obj/machinery/light, -/turf/open/floor/plasteel/airless/dark, +/turf/open/floor/plasteel/dark, /area/ruin/space/has_grav/gasthelizard) "Q" = ( /obj/structure/table/optable, /obj/effect/decal/cleanable/blood/old, -/turf/open/floor/plasteel/airless/dark, +/turf/open/floor/plasteel/dark, /area/ruin/space/has_grav/gasthelizard) "R" = ( /obj/structure/table/reinforced, @@ -342,7 +342,7 @@ /obj/item/reagent_containers/glass/bottle/mutagen, /obj/item/reagent_containers/glass/bottle/mutagen, /obj/item/razor, -/turf/open/floor/plasteel/airless/dark, +/turf/open/floor/plasteel/dark, /area/ruin/space/has_grav/gasthelizard) "S" = ( /obj/machinery/suit_storage_unit/security, diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm index 980e23188a..9cd932c6d4 100644 --- a/_maps/map_files/BoxStation/BoxStation.dmm +++ b/_maps/map_files/BoxStation/BoxStation.dmm @@ -41,6 +41,21 @@ }, /turf/open/floor/plasteel, /area/crew_quarters/bar) +"aad" = ( +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ + dir = 4 + }, +/obj/machinery/atmospherics/pipe/simple/supply/hidden, +/obj/effect/turf_decal/tile/red{ + dir = 1 + }, +/obj/effect/turf_decal/tile/red{ + dir = 8 + }, +/obj/structure/table, +/obj/item/restraints/handcuffs, +/turf/open/floor/plasteel, +/area/security/prison) "aae" = ( /obj/effect/landmark/carpspawn, /turf/open/space, @@ -577,6 +592,22 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /turf/closed/wall/r_wall, /area/security/execution/transfer) +"abz" = ( +/obj/machinery/atmospherics/pipe/manifold/supply/hidden, +/obj/structure/cable{ + icon_state = "4-8" + }, +/obj/effect/turf_decal/tile/red{ + dir = 1 + }, +/obj/effect/turf_decal/tile/red{ + dir = 8 + }, +/obj/structure/cable{ + icon_state = "2-8" + }, +/turf/open/floor/plasteel, +/area/security/prison) "abA" = ( /obj/machinery/light, /obj/machinery/atmospherics/components/unary/vent_scrubber/on{ @@ -1849,16 +1880,16 @@ /turf/open/floor/plasteel/dark, /area/security/execution/transfer) "aef" = ( -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ - dir = 4 - }, -/obj/machinery/atmospherics/pipe/simple/supply/hidden, /obj/effect/turf_decal/tile/red{ dir = 1 }, +/obj/effect/turf_decal/tile/red, /obj/effect/turf_decal/tile/red{ dir = 8 }, +/obj/structure/cable{ + icon_state = "1-2" + }, /turf/open/floor/plasteel, /area/security/prison) "aeg" = ( @@ -2118,6 +2149,31 @@ }, /turf/open/floor/plating, /area/maintenance/fore/secondary) +"aeD" = ( +/obj/machinery/door/airlock/security{ + name = "Firing Range"; + req_access_txt = "2" + }, +/obj/structure/cable{ + icon_state = "1-2" + }, +/turf/open/floor/plasteel, +/area/security/prison) +"aeE" = ( +/obj/effect/turf_decal/stripes/line{ + dir = 9 + }, +/obj/machinery/light/small{ + dir = 8 + }, +/turf/open/floor/plating, +/area/security/prison) +"aeF" = ( +/obj/effect/turf_decal/stripes/line{ + dir = 1 + }, +/turf/open/floor/plating, +/area/security/prison) "aeG" = ( /obj/structure/cable, /obj/machinery/power/solar{ @@ -2193,17 +2249,13 @@ /turf/open/floor/plasteel/dark, /area/security/execution/transfer) "aeM" = ( -/obj/machinery/atmospherics/pipe/manifold/supply/hidden, -/obj/structure/cable{ - icon_state = "4-8" +/obj/effect/turf_decal/stripes/line{ + dir = 5 }, -/obj/effect/turf_decal/tile/red{ - dir = 1 +/obj/structure/window/reinforced{ + dir = 4 }, -/obj/effect/turf_decal/tile/red{ - dir = 8 - }, -/turf/open/floor/plasteel, +/turf/open/floor/plating, /area/security/prison) "aeN" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden{ @@ -2494,6 +2546,10 @@ }, /turf/open/floor/plasteel, /area/security/main) +"afn" = ( +/obj/structure/table, +/turf/open/floor/plasteel/showroomfloor, +/area/security/warden) "afo" = ( /obj/machinery/door/airlock/external{ name = "Escape Pod Three" @@ -2514,6 +2570,20 @@ }, /turf/open/space/basic, /area/space) +"afq" = ( +/obj/machinery/atmospherics/components/unary/vent_scrubber/on, +/turf/open/floor/plasteel, +/area/security/prison) +"afr" = ( +/obj/effect/spawner/structure/window/reinforced, +/turf/open/floor/plating, +/area/security/prison) +"afs" = ( +/obj/effect/turf_decal/stripes/line{ + dir = 8 + }, +/turf/open/floor/plating, +/area/security/prison) "aft" = ( /obj/machinery/atmospherics/pipe/simple/general/visible{ dir = 5 @@ -2570,16 +2640,16 @@ /turf/open/floor/plasteel/dark, /area/security/execution/transfer) "afz" = ( -/obj/structure/table, -/obj/item/restraints/handcuffs, -/obj/effect/turf_decal/tile/red{ - dir = 1 +/obj/effect/turf_decal/stripes/line{ + dir = 4 }, -/obj/effect/turf_decal/tile/red, -/obj/effect/turf_decal/tile/red{ - dir = 8 +/obj/machinery/door/window/westleft{ + base_state = "right"; + dir = 4; + icon_state = "right"; + name = "Shooting Range" }, -/turf/open/floor/plasteel, +/turf/open/floor/plating, /area/security/prison) "afA" = ( /turf/closed/wall/r_wall, @@ -2823,6 +2893,16 @@ /obj/machinery/atmospherics/pipe/manifold4w/general/visible, /turf/open/floor/plasteel, /area/engine/atmos) +"age" = ( +/obj/machinery/door/window/southleft{ + name = "Target Storage" + }, +/obj/item/target/clown, +/obj/item/target/clown, +/obj/item/target, +/obj/item/target, +/turf/open/floor/plating, +/area/security/prison) "agf" = ( /obj/structure/table, /obj/item/stack/sheet/metal, @@ -2924,7 +3004,7 @@ /turf/open/floor/plasteel/showroomfloor, /area/security/warden) "agp" = ( -/obj/machinery/computer/prisoner, +/obj/machinery/computer/prisoner/management, /turf/open/floor/plasteel/showroomfloor, /area/security/warden) "agq" = ( @@ -2976,6 +3056,16 @@ }, /turf/open/floor/plasteel/showroomfloor, /area/security/warden) +"agv" = ( +/obj/structure/cable{ + icon_state = "2-8" + }, +/obj/structure/cable{ + icon_state = "2-4" + }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, +/turf/open/floor/plasteel, +/area/security/prison) "agw" = ( /obj/structure/table, /obj/machinery/syndicatebomb/training, @@ -3100,10 +3190,13 @@ /turf/open/floor/plasteel, /area/security/main) "agH" = ( -/obj/machinery/atmospherics/pipe/simple/supply/hidden{ - dir = 4 +/obj/machinery/door/window/southright{ + name = "Target Storage" }, -/turf/open/floor/plasteel/dark, +/obj/item/target/alien, +/obj/item/target/alien, +/obj/item/target/syndicate, +/turf/open/floor/plating, /area/security/prison) "agI" = ( /obj/machinery/airalarm{ @@ -3474,6 +3567,15 @@ }, /turf/open/floor/plasteel/showroomfloor, /area/security/warden) +"ahw" = ( +/obj/effect/turf_decal/stripes/line{ + dir = 10 + }, +/obj/machinery/light/small{ + dir = 8 + }, +/turf/open/floor/plating, +/area/security/prison) "ahx" = ( /obj/structure/cable{ icon_state = "4-8" @@ -4489,7 +4591,7 @@ /turf/open/space, /area/solar/port/fore) "ajr" = ( -/obj/machinery/computer/gulag_teleporter_computer, +/obj/machinery/computer/prisoner/gulag_teleporter_computer, /turf/open/floor/plasteel, /area/security/processing) "ajs" = ( @@ -4497,26 +4599,18 @@ /turf/open/floor/plasteel, /area/security/processing) "ajt" = ( -/obj/structure/sign/warning/securearea{ - pixel_x = 32 - }, -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ - dir = 4 - }, -/obj/structure/table, -/obj/item/storage/box/prisoner, -/obj/machinery/camera{ - c_tag = "Labor Shuttle Dock North" - }, -/turf/open/floor/plasteel, -/area/security/processing) +/obj/effect/turf_decal/stripes/line, +/turf/open/floor/plating, +/area/security/prison) "aju" = ( -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ +/obj/effect/turf_decal/stripes/line{ dir = 6 }, -/obj/machinery/computer/security/labor, -/turf/open/floor/plasteel, -/area/security/processing) +/obj/structure/window/reinforced{ + dir = 4 + }, +/turf/open/floor/plating, +/area/security/prison) "ajv" = ( /obj/machinery/light{ dir = 8 @@ -4830,6 +4924,29 @@ /obj/effect/mapping_helpers/airlock/cyclelink_helper, /turf/open/floor/plating, /area/maintenance/solars/port/fore) +"ajX" = ( +/obj/structure/table, +/obj/structure/cable{ + icon_state = "0-2" + }, +/obj/effect/turf_decal/tile/red{ + dir = 1 + }, +/obj/effect/turf_decal/tile/red{ + dir = 8 + }, +/obj/machinery/recharger, +/obj/item/gun/energy/laser/practice, +/obj/item/gun/energy/laser/practice, +/turf/open/floor/plasteel, +/area/security/prison) +"ajY" = ( +/obj/structure/cable{ + icon_state = "1-2" + }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, +/turf/open/floor/plasteel, +/area/security/prison) "ajZ" = ( /obj/effect/spawner/structure/window/reinforced, /obj/structure/sign/warning/vacuum/external{ @@ -4854,20 +4971,18 @@ /area/security/processing) "akc" = ( /obj/structure/cable{ - icon_state = "4-8" + icon_state = "1-2" }, -/obj/machinery/atmospherics/pipe/simple/supply/hidden{ - dir = 6 +/obj/machinery/airalarm{ + dir = 8; + pixel_x = 24 }, /turf/open/floor/plasteel, -/area/security/processing) +/area/security/prison) "akd" = ( -/obj/structure/cable{ - icon_state = "2-4" - }, -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, -/turf/open/floor/plasteel, -/area/security/processing) +/obj/structure/lattice, +/turf/closed/wall, +/area/security/prison) "ake" = ( /obj/structure/cable{ icon_state = "4-8" @@ -5136,6 +5251,44 @@ }, /turf/open/floor/plating, /area/maintenance/solars/port/fore) +"akC" = ( +/obj/machinery/door/airlock/security{ + name = "Labor Shuttle"; + req_access_txt = "2" + }, +/obj/structure/cable{ + icon_state = "1-2" + }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, +/turf/open/floor/plasteel, +/area/security/processing) +"akD" = ( +/obj/effect/spawner/structure/window/reinforced, +/obj/machinery/atmospherics/pipe/simple/supply/hidden, +/turf/open/floor/plating, +/area/security/prison) +"akE" = ( +/obj/structure/cable{ + icon_state = "1-2" + }, +/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{ + dir = 8 + }, +/turf/open/floor/plasteel, +/area/security/processing) +"akF" = ( +/obj/structure/sign/warning/securearea{ + pixel_x = 32 + }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ + dir = 4 + }, +/obj/machinery/camera{ + c_tag = "Labor Shuttle Dock North" + }, +/obj/machinery/atmospherics/pipe/simple/supply/hidden, +/turf/open/floor/plasteel, +/area/security/processing) "akG" = ( /obj/structure/sign/warning/vacuum/external{ pixel_y = 32 @@ -5156,11 +5309,12 @@ /turf/open/floor/plasteel, /area/security/processing) "akJ" = ( -/obj/machinery/light_switch{ - pixel_x = 27 +/obj/structure/cable{ + icon_state = "2-4" }, -/obj/machinery/atmospherics/pipe/manifold/supply/hidden{ - dir = 4 +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, +/obj/structure/cable{ + icon_state = "1-2" }, /turf/open/floor/plasteel, /area/security/processing) @@ -5445,12 +5599,42 @@ /obj/effect/spawner/structure/window/reinforced, /turf/open/floor/plating, /area/maintenance/port/fore) +"alj" = ( +/obj/structure/cable{ + icon_state = "4-8" + }, +/obj/machinery/atmospherics/pipe/manifold/supply/hidden{ + dir = 8 + }, +/turf/open/floor/plasteel, +/area/security/processing) "alk" = ( /obj/machinery/atmospherics/pipe/manifold/scrubbers/visible{ dir = 1 }, /turf/open/floor/plasteel, /area/engine/atmos) +"all" = ( +/obj/machinery/light_switch{ + pixel_x = 27 + }, +/obj/machinery/atmospherics/pipe/manifold/supply/hidden{ + dir = 4 + }, +/obj/machinery/computer/security/labor, +/turf/open/floor/plasteel, +/area/security/processing) +"alm" = ( +/obj/machinery/airalarm{ + dir = 8; + pixel_x = 24 + }, +/obj/machinery/atmospherics/pipe/simple/supply/hidden, +/obj/structure/chair{ + dir = 1 + }, +/turf/open/floor/plasteel, +/area/security/processing) "aln" = ( /obj/effect/mapping_helpers/airlock/cyclelink_helper{ dir = 4 @@ -5462,6 +5646,12 @@ }, /turf/open/floor/plating, /area/security/processing) +"alo" = ( +/obj/machinery/atmospherics/pipe/simple/supply/hidden, +/obj/structure/table, +/obj/item/storage/box/prisoner, +/turf/open/floor/plasteel, +/area/security/processing) "alp" = ( /turf/open/floor/plating, /area/security/processing) @@ -5469,13 +5659,10 @@ /turf/open/floor/plasteel, /area/security/processing) "alr" = ( -/obj/machinery/airalarm{ - dir = 8; - pixel_x = 24 - }, -/obj/machinery/atmospherics/pipe/simple/supply/hidden, -/turf/open/floor/plasteel, -/area/security/processing) +/obj/structure/target_stake, +/obj/item/target/syndicate, +/turf/open/floor/plating, +/area/security/prison) "als" = ( /obj/structure/cable{ icon_state = "1-2" @@ -5527,6 +5714,18 @@ }, /turf/open/floor/plasteel, /area/security/brig) +"alx" = ( +/obj/structure/cable{ + icon_state = "1-4" + }, +/obj/effect/turf_decal/tile/red{ + dir = 1 + }, +/obj/effect/turf_decal/tile/red{ + dir = 8 + }, +/turf/open/floor/plasteel, +/area/security/prison) "aly" = ( /obj/machinery/atmospherics/components/unary/vent_scrubber/on{ dir = 1 @@ -5681,6 +5880,24 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /turf/open/floor/plating, /area/maintenance/fore/secondary) +"alM" = ( +/obj/structure/cable{ + icon_state = "1-8" + }, +/obj/structure/cable{ + icon_state = "0-8" + }, +/obj/machinery/light{ + dir = 4 + }, +/obj/machinery/power/apc{ + areastring = "/area/security/main"; + dir = 4; + name = "Firing Range APC"; + pixel_x = 24 + }, +/turf/open/floor/plasteel, +/area/security/prison) "alO" = ( /obj/effect/spawner/structure/window/reinforced, /turf/open/floor/plating, @@ -5736,6 +5953,44 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/visible, /turf/open/floor/plasteel, /area/engine/atmos) +"alY" = ( +/obj/effect/turf_decal/tile/red{ + dir = 1 + }, +/obj/effect/turf_decal/tile/red{ + dir = 8 + }, +/obj/machinery/camera{ + c_tag = "Firing Range"; + dir = 1 + }, +/turf/open/floor/plasteel, +/area/security/prison) +"alZ" = ( +/obj/structure/table, +/obj/machinery/atmospherics/components/unary/vent_pump/on, +/obj/item/clothing/glasses/sunglasses{ + pixel_x = 3; + pixel_y = 3 + }, +/obj/item/clothing/glasses/sunglasses{ + pixel_x = 3; + pixel_y = 3 + }, +/obj/item/clothing/ears/earmuffs{ + pixel_x = -3; + pixel_y = -2 + }, +/obj/item/clothing/ears/earmuffs{ + pixel_x = -3; + pixel_y = -2 + }, +/obj/machinery/firealarm{ + dir = 4; + pixel_x = 24 + }, +/turf/open/floor/plasteel, +/area/security/prison) "ama" = ( /mob/living/simple_animal/sloth/paperwork, /turf/open/floor/plasteel, @@ -5755,10 +6010,6 @@ }, /turf/open/floor/plasteel, /area/security/processing) -"amd" = ( -/obj/machinery/atmospherics/pipe/simple/supply/hidden, -/turf/open/floor/plasteel, -/area/security/processing) "ame" = ( /obj/structure/cable{ icon_state = "1-2" @@ -6031,26 +6282,6 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /turf/open/floor/plasteel, /area/security/processing) -"amN" = ( -/obj/structure/table, -/obj/item/clothing/glasses/sunglasses{ - pixel_x = 3; - pixel_y = 3 - }, -/obj/item/clothing/glasses/sunglasses{ - pixel_x = 3; - pixel_y = 3 - }, -/obj/item/clothing/ears/earmuffs{ - pixel_x = -3; - pixel_y = -2 - }, -/obj/item/clothing/ears/earmuffs{ - pixel_x = -3; - pixel_y = -2 - }, -/turf/open/floor/plasteel/showroomfloor, -/area/security/warden) "amQ" = ( /obj/structure/cable{ icon_state = "0-4" @@ -19371,7 +19602,7 @@ /turf/closed/wall, /area/bridge) "aTR" = ( -/obj/machinery/computer/prisoner, +/obj/machinery/computer/prisoner/management, /obj/effect/turf_decal/tile/red{ dir = 1 }, @@ -80535,12 +80766,12 @@ adB aaa aaa aaa -aaa -aaa -aaa -aaa -aaa -aaa +acd +acd +acd +afr +acd +acd aaa aaa aaa @@ -80793,11 +81024,11 @@ abc abc afu abc -aaa -aaa -aaa -aaa -aaa +age +aeE +afs +ahw +acd aaa aaa aaa @@ -81050,11 +81281,11 @@ aea aeH aft abc -aaa -aaa -aaa -aaa -aaa +agH +aeF +alr +ajt +afr aaa aaa aiU @@ -81308,10 +81539,10 @@ aeJ afw abc abc -aaf -aaa -aaf -aaf +aeF +aay +ajt +akd aaf aaf aiU @@ -81565,9 +81796,9 @@ aeI afv agf abc -aaf -aaa -aaa +aeF +aay +ajt aiT aiT aiV @@ -81822,9 +82053,9 @@ aeL afy agh abc -aaf -aaa -aaf +aeM +afz +aju aiT ajs akb @@ -82079,9 +82310,9 @@ aeK afx agg abc -aaf -aaa -aaa +ajX +alx +alY aiU ajr aka @@ -82335,13 +82566,13 @@ aeg aeN afA afA -afA -aaf -aaa -aaa -aiU -aju -akd +abc +afq +agv +ajY +akC +akE +akJ akK als ame @@ -82588,20 +82819,20 @@ acd acC ada adF +aad +abz aef -aeM -afz -aai -aai -aai -aai -aai -aai -ajt +aeD +aav akc -akJ -alr -amd +alM +alZ +akD +akF +alj +all +alm +alo amL anu alq @@ -82848,11 +83079,11 @@ adH aei aeO afJ -acd -agL -agK -agK -aiB +aai +aai +aai +aai +aai aai ajw akf @@ -83106,10 +83337,10 @@ aeh aeO afI agl -agH +agL ags ags -aho +aiB acd ajv ake @@ -87731,7 +87962,7 @@ bkA acF aes avB -amN +afn agt awN aHp diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index fd7c0a3c00..aae5ff8ff9 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -4503,7 +4503,7 @@ /turf/open/floor/plasteel, /area/security/checkpoint) "anx" = ( -/obj/machinery/computer/prisoner{ +/obj/machinery/computer/prisoner/management{ dir = 8 }, /obj/machinery/status_display{ @@ -36400,7 +36400,7 @@ /turf/open/floor/plasteel/grimy, /area/crew_quarters/heads/hos) "boc" = ( -/obj/machinery/computer/prisoner{ +/obj/machinery/computer/prisoner/management{ dir = 8 }, /turf/open/floor/plasteel/grimy, @@ -38706,7 +38706,7 @@ /turf/open/floor/plasteel/grimy, /area/crew_quarters/heads/hos) "brE" = ( -/obj/machinery/computer/prisoner{ +/obj/machinery/computer/prisoner/management{ dir = 8 }, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ @@ -39610,7 +39610,7 @@ /turf/open/floor/plasteel/dark, /area/security/execution/transfer) "bth" = ( -/obj/machinery/computer/gulag_teleporter_computer{ +/obj/machinery/computer/prisoner/gulag_teleporter_computer{ dir = 1 }, /obj/structure/disposalpipe/segment{ @@ -42723,7 +42723,7 @@ /turf/open/floor/plasteel/dark, /area/bridge) "byk" = ( -/obj/machinery/computer/prisoner, +/obj/machinery/computer/prisoner/management, /obj/effect/turf_decal/tile/red{ dir = 1 }, @@ -56938,7 +56938,7 @@ /turf/open/floor/plasteel, /area/security/warden) "bTh" = ( -/obj/machinery/computer/prisoner{ +/obj/machinery/computer/prisoner/management{ dir = 8 }, /obj/structure/cable/white{ @@ -114276,11 +114276,6 @@ /obj/structure/cable/white{ icon_state = "1-2" }, -/obj/machinery/door/airlock/maintenance_hatch{ - name = "Maintenance Hatch"; - req_access_txt = "12" - }, -/obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/simple/supply/hidden, /obj/effect/turf_decal/stripes/line{ dir = 2 @@ -114288,6 +114283,10 @@ /obj/effect/turf_decal/stripes/line{ dir = 1 }, +/obj/machinery/door/airlock/maintenance_hatch{ + name = "Chapel Maintenance"; + req_access_txt = "27" + }, /turf/open/floor/plasteel, /area/maintenance/port/aft) "dKE" = ( @@ -118987,7 +118986,6 @@ /obj/structure/cable/white{ icon_state = "1-2" }, -/obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/manifold4w/supply/hidden, /obj/effect/turf_decal/delivery, /turf/open/floor/plasteel, @@ -119332,7 +119330,6 @@ /turf/closed/wall, /area/chapel/office) "dTx" = ( -/obj/structure/bodycontainer/morgue, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -119343,6 +119340,7 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, +/obj/structure/closet/crate/coffin, /turf/open/floor/plasteel/dark, /area/chapel/office) "dTy" = ( @@ -121768,7 +121766,6 @@ /turf/open/floor/plating, /area/maintenance/port/aft) "dYv" = ( -/obj/structure/bodycontainer/morgue, /obj/structure/sign/poster/official/ian{ pixel_y = -32 }, @@ -121782,6 +121779,7 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, +/obj/structure/closet/crate/coffin, /turf/open/floor/plasteel/dark, /area/chapel/office) "dYw" = ( @@ -122824,7 +122822,6 @@ /turf/open/floor/plasteel, /area/maintenance/port/aft) "eat" = ( -/obj/effect/decal/cleanable/dirt, /obj/structure/cable/white{ icon_state = "1-8" }, @@ -123561,9 +123558,6 @@ /obj/structure/cable/white{ icon_state = "1-2" }, -/obj/machinery/atmospherics/components/unary/vent_scrubber/on{ - dir = 1 - }, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -123574,6 +123568,9 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ + dir = 9 + }, /turf/open/floor/plasteel/dark, /area/chapel/office) "ebU" = ( @@ -123816,7 +123813,6 @@ /turf/open/floor/plasteel, /area/maintenance/port/aft) "ecw" = ( -/obj/structure/bodycontainer/morgue, /obj/machinery/firealarm{ dir = 1; pixel_y = -24 @@ -125921,7 +125917,7 @@ /turf/open/floor/plasteel, /area/security/checkpoint/escape) "egj" = ( -/obj/machinery/computer/prisoner{ +/obj/machinery/computer/prisoner/management{ dir = 1 }, /obj/structure/cable/white{ @@ -126412,6 +126408,13 @@ /obj/machinery/door/airlock/research/glass/incinerator/toxmix_interior, /turf/open/floor/engine, /area/science/mixing) +"fwr" = ( +/obj/machinery/door/poddoor{ + id = "chapelgun"; + name = "Chapel Launcher Door" + }, +/turf/open/floor/plating, +/area/chapel/office) "fFK" = ( /obj/machinery/ore_silo, /obj/effect/turf_decal/tile/neutral{ @@ -126430,6 +126433,10 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden, /turf/closed/wall/r_wall, /area/science/circuit) +"fHS" = ( +/obj/structure/sign/warning/vacuum, +/turf/closed/wall/r_wall, +/area/chapel/office) "fLR" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 6 @@ -126462,6 +126469,16 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /turf/closed/wall/r_wall, /area/science/circuit) +"gJj" = ( +/obj/machinery/door/window/northleft{ + name = "Mass Driver" + }, +/obj/machinery/mass_driver{ + id = "chapelgun"; + name = "Holy Driver" + }, +/turf/open/floor/plating, +/area/chapel/office) "gKr" = ( /obj/machinery/atmospherics/components/unary/vent_scrubber/on{ dir = 1 @@ -126479,6 +126496,22 @@ }, /turf/open/floor/plasteel/white, /area/science/misc_lab) +"gNJ" = ( +/obj/effect/turf_decal/tile/neutral{ + dir = 8 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 4 + }, +/obj/effect/turf_decal/tile/neutral, +/obj/machinery/atmospherics/components/unary/vent_scrubber/on{ + dir = 4 + }, +/turf/open/floor/plasteel/dark, +/area/chapel/office) "gNS" = ( /obj/effect/turf_decal/stripes/line, /obj/effect/turf_decal/tile/neutral{ @@ -126543,6 +126576,10 @@ }, /turf/open/floor/plating, /area/quartermaster/storage) +"hei" = ( +/obj/effect/decal/cleanable/dirt, +/turf/closed/wall/r_wall, +/area/chapel/office) "hic" = ( /obj/structure/table/reinforced, /obj/item/integrated_electronics/analyzer, @@ -126604,6 +126641,22 @@ }, /turf/open/floor/plasteel, /area/security/prison) +"hLO" = ( +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, +/obj/effect/turf_decal/tile/neutral, +/obj/effect/turf_decal/tile/neutral{ + dir = 4 + }, +/obj/effect/turf_decal/delivery, +/obj/structure/closet, +/obj/effect/spawner/lootdrop/maintenance{ + lootcount = 3; + name = "3maintenance loot spawner" + }, +/turf/open/floor/plasteel, +/area/maintenance/port/aft) "hNZ" = ( /obj/structure/chair/office/light{ dir = 8 @@ -126650,6 +126703,9 @@ }, /turf/open/floor/engine/vacuum, /area/science/mixing) +"iyd" = ( +/turf/open/space, +/area/space) "iQh" = ( /obj/structure/bodycontainer/morgue{ dir = 1 @@ -126714,6 +126770,9 @@ }, /turf/open/floor/plasteel, /area/science/research/abandoned) +"jhK" = ( +/turf/open/floor/plasteel, +/area/maintenance/port/aft) "jjN" = ( /obj/structure/table/reinforced, /obj/machinery/camera{ @@ -126811,6 +126870,28 @@ /obj/machinery/chem_master, /turf/open/floor/plasteel/dark, /area/medical/medbay/central) +"jPA" = ( +/obj/effect/turf_decal/tile/neutral, +/obj/effect/turf_decal/tile/neutral{ + dir = 4 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 8 + }, +/obj/machinery/computer/pod/old{ + density = 0; + icon = 'icons/obj/airlock_machines.dmi'; + icon_state = "airlock_control_standby"; + id = "chapelgun"; + name = "Mass Driver Controller"; + pixel_x = 0; + pixel_y = -24 + }, +/turf/open/floor/plasteel/dark, +/area/chapel/office) "jRy" = ( /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 4 @@ -127095,6 +127176,33 @@ }, /turf/open/floor/engine, /area/science/mixing) +"mXJ" = ( +/obj/effect/turf_decal/tile/neutral{ + dir = 8 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 4 + }, +/obj/effect/turf_decal/tile/neutral, +/turf/open/floor/plasteel/dark, +/area/chapel/office) +"nht" = ( +/obj/effect/turf_decal/tile/neutral{ + dir = 8 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 4 + }, +/obj/effect/turf_decal/tile/neutral, +/obj/machinery/light, +/turf/open/floor/plasteel/dark, +/area/chapel/office) "nyN" = ( /obj/machinery/vending/kink, /turf/open/floor/plating, @@ -127103,6 +127211,19 @@ /obj/machinery/atmospherics/pipe/simple/general/hidden, /turf/closed/wall/r_wall, /area/maintenance/disposal/incinerator) +"owr" = ( +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 8 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 4 + }, +/obj/effect/turf_decal/tile/neutral, +/turf/open/floor/plasteel/dark, +/area/chapel/office) "oIl" = ( /obj/machinery/atmospherics/components/unary/portables_connector/visible{ dir = 1 @@ -127281,6 +127402,12 @@ /obj/effect/spawner/lootdrop/keg, /turf/open/floor/plating, /area/crew_quarters/abandoned_gambling_den) +"qMR" = ( +/obj/effect/turf_decal/stripes/line{ + dir = 2 + }, +/turf/open/floor/plating, +/area/chapel/office) "rhO" = ( /obj/machinery/atmospherics/components/unary/vent_scrubber/on{ dir = 1 @@ -127430,6 +127557,14 @@ }, /turf/open/floor/engine, /area/engine/supermatter) +"uZN" = ( +/obj/structure/rack, +/obj/effect/spawner/lootdrop/maintenance{ + lootcount = 2; + name = "2maintenance loot spawner" + }, +/turf/open/floor/plasteel, +/area/maintenance/port/aft) "vhA" = ( /obj/item/clothing/under/color/grey, /turf/open/floor/plating, @@ -127567,6 +127702,25 @@ /obj/effect/turf_decal/bot, /turf/open/floor/plasteel, /area/science/research) +"xWZ" = ( +/obj/structure/bodycontainer/morgue{ + dir = 2 + }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ + dir = 4 + }, +/obj/effect/turf_decal/tile/neutral, +/obj/effect/turf_decal/tile/neutral{ + dir = 4 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 8 + }, +/turf/open/floor/plasteel/dark, +/area/chapel/office) "xXn" = ( /obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/toxins_mixing_output, /turf/open/floor/engine/vacuum, @@ -159675,12 +159829,12 @@ dWI dZf dZM eat -dLY -dLY -dLY -dLY -dLY -dLY +dZN +dZN +dZN +dZN +fHS +dZN dLY dLY aad @@ -159930,20 +160084,20 @@ dWJ dLW dYu dZg -dYu -dYu -dZg -ebR -dLW -ecQ -edl -aad +jhK +jhK +dZN +owr +mXJ +gJj +qMR +fwr aaa aaa -aad +iyd aaa aaa -aad +iyd aaa aaa aaa @@ -160187,14 +160341,14 @@ dTw dTw dTw dTw -dLX -dLW -dLW -dLW -ecv -dNt -edl -aad +hLO +uZN +hei +gNJ +jPA +dTw +dTw +dTw aad aad aad @@ -160447,8 +160601,8 @@ dTw dZN dZN dZN -dZN -dZN +xWZ +nht dTw dTw dTw diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 75d7466371..13f774d25d 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -2017,7 +2017,7 @@ /turf/open/floor/plasteel/dark, /area/crew_quarters/heads/hos) "aeu" = ( -/obj/machinery/computer/prisoner, +/obj/machinery/computer/prisoner/management, /turf/open/floor/plasteel/dark, /area/crew_quarters/heads/hos) "aev" = ( @@ -8416,7 +8416,7 @@ /turf/open/floor/plating, /area/security/warden) "apI" = ( -/obj/machinery/computer/prisoner{ +/obj/machinery/computer/prisoner/management{ dir = 4 }, /obj/structure/cable/yellow{ @@ -10514,7 +10514,7 @@ /turf/open/floor/plating, /area/maintenance/port/fore) "atK" = ( -/obj/machinery/computer/gulag_teleporter_computer{ +/obj/machinery/computer/prisoner/gulag_teleporter_computer{ dir = 1 }, /turf/open/floor/plasteel/dark, @@ -30781,7 +30781,7 @@ /obj/structure/cable/yellow{ icon_state = "2-4" }, -/obj/machinery/computer/prisoner, +/obj/machinery/computer/prisoner/management, /obj/effect/turf_decal/tile/red{ dir = 1 }, diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm index ee97af14fc..7e4f54c8b4 100644 --- a/_maps/map_files/PubbyStation/PubbyStation.dmm +++ b/_maps/map_files/PubbyStation/PubbyStation.dmm @@ -4897,7 +4897,7 @@ /turf/open/floor/plasteel/showroomfloor, /area/security/warden) "amT" = ( -/obj/machinery/computer/prisoner, +/obj/machinery/computer/prisoner/management, /obj/machinery/airalarm{ pixel_y = 22 }, @@ -6072,7 +6072,7 @@ /turf/open/floor/plating, /area/security/brig) "apF" = ( -/obj/machinery/computer/gulag_teleporter_computer{ +/obj/machinery/computer/prisoner/gulag_teleporter_computer{ dir = 1 }, /turf/open/floor/plasteel/dark, @@ -7048,7 +7048,7 @@ /turf/open/floor/plasteel/dark, /area/bridge) "arR" = ( -/obj/machinery/computer/prisoner, +/obj/machinery/computer/prisoner/management, /obj/effect/turf_decal/tile/red{ dir = 1 }, @@ -47466,8 +47466,8 @@ /area/hydroponics/garden/monastery) "cgL" = ( /obj/structure/closet/cabinet, -/obj/item/clothing/suit/holidaypriest, -/obj/item/clothing/suit/nun, +/obj/item/clothing/suit/chaplain/holidaypriest, +/obj/item/clothing/suit/chaplain/nun, /obj/item/clothing/head/nun_hood, /obj/machinery/button/door{ id = "Cell1"; @@ -47834,8 +47834,8 @@ /area/space/nearstation) "cio" = ( /obj/structure/closet/cabinet, -/obj/item/clothing/suit/holidaypriest, -/obj/item/clothing/suit/nun, +/obj/item/clothing/suit/chaplain/holidaypriest, +/obj/item/clothing/suit/chaplain/nun, /obj/item/clothing/head/nun_hood, /obj/machinery/button/door{ id = "Cell2"; @@ -50476,8 +50476,8 @@ /obj/structure/closet, /obj/item/storage/backpack/cultpack, /obj/item/clothing/head/nun_hood, -/obj/item/clothing/suit/nun, -/obj/item/clothing/suit/holidaypriest, +/obj/item/clothing/suit/chaplain/nun, +/obj/item/clothing/suit/chaplain/holidaypriest, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, diff --git a/_maps/map_files/debug/runtimestation.dmm b/_maps/map_files/debug/runtimestation.dmm index 3bdf64ac27..feb8fc8cc0 100644 --- a/_maps/map_files/debug/runtimestation.dmm +++ b/_maps/map_files/debug/runtimestation.dmm @@ -523,7 +523,7 @@ /turf/open/floor/plasteel, /area/science) "bC" = ( -/obj/machinery/computer/gulag_teleporter_computer{ +/obj/machinery/computer/prisoner/gulag_teleporter_computer{ dir = 4 }, /turf/open/floor/plasteel, diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm index 115ad3d363..80e80cd6a9 100644 --- a/_maps/map_files/generic/CentCom.dmm +++ b/_maps/map_files/generic/CentCom.dmm @@ -1264,9 +1264,9 @@ /area/holodeck/rec_center/chapelcourt) "dw" = ( /obj/structure/table/wood/fancy, -/obj/item/clothing/suit/nun, +/obj/item/clothing/suit/chaplain/nun, /obj/item/clothing/head/nun_hood, -/obj/item/clothing/suit/holidaypriest, +/obj/item/clothing/suit/chaplain/holidaypriest, /turf/open/floor/holofloor{ dir = 8; icon_state = "dark" @@ -3864,7 +3864,7 @@ /turf/open/floor/plasteel, /area/centcom/control) "jS" = ( -/obj/machinery/computer/prisoner, +/obj/machinery/computer/prisoner/management, /obj/effect/turf_decal/stripes/line, /turf/open/floor/plasteel, /area/centcom/control) @@ -5857,7 +5857,7 @@ /turf/open/floor/plasteel, /area/centcom/control) "nY" = ( -/obj/machinery/computer/prisoner{ +/obj/machinery/computer/prisoner/management{ dir = 1 }, /obj/effect/turf_decal/stripes/line{ @@ -9840,7 +9840,7 @@ id = "XCCFerry"; name = "Hanger Bay Shutters"; pixel_y = 24; - req_access_txt = "2" + req_access_txt = "101" }, /obj/effect/turf_decal/stripes/line{ dir = 5 @@ -10495,7 +10495,7 @@ /turf/open/floor/plasteel/dark, /area/centcom/control) "yv" = ( -/obj/machinery/computer/prisoner{ +/obj/machinery/computer/prisoner/management{ dir = 1 }, /obj/machinery/light, diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm index fb42bc46c0..b875998f0a 100644 --- a/code/__DEFINES/admin.dm +++ b/code/__DEFINES/admin.dm @@ -81,3 +81,10 @@ #define SPAM_TRIGGER_WARNING 5 //Number of identical messages required before the spam-prevention will warn you to stfu #define SPAM_TRIGGER_AUTOMUTE 10 //Number of identical messages required before the spam-prevention will automute you + +///Max length of a keypress command before it's considered to be a forged packet/bogus command +#define MAX_KEYPRESS_COMMANDLENGTH 16 +///Max amount of keypress messages per second over two seconds before client is autokicked +#define MAX_KEYPRESS_AUTOKICK 100 +///Length of held key rolling buffer +#define HELD_KEY_BUFFER_LENGTH 15 diff --git a/code/__DEFINES/antagonists.dm b/code/__DEFINES/antagonists.dm index e35defd485..b2f05fd5f8 100644 --- a/code/__DEFINES/antagonists.dm +++ b/code/__DEFINES/antagonists.dm @@ -38,5 +38,5 @@ //Gangshit #define NOT_DOMINATING -1 -#define MAX_LEADERS_GANG 3 +#define MAX_LEADERS_GANG 4 #define INITIAL_DOM_ATTEMPTS 3 diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index 6e21fbe06a..da5981ff8a 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -123,7 +123,6 @@ #define STAMINA_CRIT 140 //crit for stamina damage. forces a rest, and stops movement until stamina goes back to stamina softcrit #define STAMINA_SOFTCRIT_TRADITIONAL 0 //same as STAMINA_SOFTCRIT except for the more traditional health calculations #define STAMINA_CRIT_TRADITIONAL -40 //ditto, but for STAMINA_CRIT -#define MIN_MELEE_STAMCOST 1.25 //Minimum cost for swinging items around. Will be extra useful when stats and skills are introduced. #define CRAWLUNDER_DELAY 30 //Delay for crawling under a standing mob diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index 7cab82149d..e31d2a278e 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -183,4 +183,16 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list( #define BODY_ZONE_PRECISE_R_FOOT "r_foot" //We will round to this value in damage calculations. -#define DAMAGE_PRECISION 0.1 \ No newline at end of file +#define DAMAGE_PRECISION 0.1 + +//items total mass, used to calculate their attacks' stamina costs. If not defined, the cost will be (w_class * 1.25) +#define TOTAL_MASS_TINY_ITEM 1.25 +#define TOTAL_MASS_SMALL_ITEM 2.5 +#define TOTAL_MASS_NORMAL_ITEM 3.75 +#define TOTAL_MASS_BULKY_ITEM 5 +#define TOTAL_MASS_HUGE_ITEM 6.25 +#define TOTAL_MASS_GIGANTIC_ITEM 7.5 + +#define TOTAL_MASS_HAND_REPLACEMENT 5 //standard punching stamina cost. most hand replacements are huge items anyway. +#define TOTAL_MASS_MEDIEVAL_WEAPON 3.6 //very, very generic average sword/warpick/etc. weight in pounds. +#define TOTAL_MASS_TOY_SWORD 1.5 diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index e01bf5669b..40aea24105 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -24,7 +24,7 @@ // start global signals with "!", this used to be necessary but now it's just a formatting choice #define COMSIG_GLOB_NEW_Z "!new_z" //from base of datum/controller/subsystem/mapping/proc/add_new_zlevel(): (list/args) #define COMSIG_GLOB_VAR_EDIT "!var_edit" //called after a successful var edit somewhere in the world: (list/args) - +#define COMSIG_GLOB_LIVING_SAY_SPECIAL "!say_special" //global living say plug - use sparingly: (mob/speaker , message) ////////////////////////////////////////////////////////////////// // /datum signals @@ -159,6 +159,7 @@ #define COMSIG_OBJ_BREAK "obj_break" //from base of /obj/obj_break(): (damage_flag) #define COMSIG_OBJ_SETANCHORED "obj_setanchored" //called in /obj/structure/setAnchored(): (value) + // /obj/item signals #define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (/mob/living/target, /mob/living/user) #define COMSIG_ITEM_ATTACK_SELF "item_attack_self" //from base of obj/item/attack_self(): (/mob) diff --git a/code/__DEFINES/construction.dm b/code/__DEFINES/construction.dm index ee51fb6909..c394d003d8 100644 --- a/code/__DEFINES/construction.dm +++ b/code/__DEFINES/construction.dm @@ -109,3 +109,5 @@ #define RCD_AIRLOCK 2 #define RCD_DECONSTRUCT 3 #define RCD_WINDOWGRILLE 4 +#define RCD_MACHINE 8 +#define RCD_COMPUTER 16 \ No newline at end of file diff --git a/code/__DEFINES/donator_groupings.dm b/code/__DEFINES/donator_groupings.dm new file mode 100644 index 0000000000..4b210609f2 --- /dev/null +++ b/code/__DEFINES/donator_groupings.dm @@ -0,0 +1,18 @@ +#define DONATOR_GROUP_TIER_1_CONFIG_PATH /datum/config_entry/keyed_list/donator_group/tier_1_donators +#define DONATOR_GROUP_TIER_2_CONFIG_PATH /datum/config_entry/keyed_list/donator_group/tier_2_donators +#define DONATOR_GROUP_TIER_3_CONFIG_PATH /datum/config_entry/keyed_list/donator_group/tier_3_donators + +#define DONATOR_GROUP_TIER_1_CONFIG_SUBPATH keyed_list/donator_group/tier_1_donators +#define DONATOR_GROUP_TIER_2_CONFIG_SUBPATH keyed_list/donator_group/tier_2_donators +#define DONATOR_GROUP_TIER_3_CONFIG_SUBPATH keyed_list/donator_group/tier_3_donators + +#define TIER_1_DONATORS CONFIG_GET(DONATOR_GROUP_TIER_1_CONFIG_SUBPATH) +#define TIER_2_DONATORS CONFIG_GET(DONATOR_GROUP_TIER_2_CONFIG_SUBPATH) +#define TIER_3_DONATORS CONFIG_GET(DONATOR_GROUP_TIER_3_CONFIG_SUBPATH) + +//flags +#define DONATOR_GROUP_TIER_1 "T1" +#define DONATOR_GROUP_TIER_2 "T2" +#define DONATOR_GROUP_TIER_3 "T3" + +#define IS_CKEY_DONATOR_GROUP(ckey, groupid) is_donator_group(ckey, groupid) diff --git a/code/__DEFINES/inventory.dm b/code/__DEFINES/inventory.dm index 95a8a2c885..24d381d1a8 100644 --- a/code/__DEFINES/inventory.dm +++ b/code/__DEFINES/inventory.dm @@ -234,3 +234,6 @@ GLOBAL_LIST_INIT(security_wintercoat_allowed, typecacheof(list( /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/toy))) + +//Internals checker +#define GET_INTERNAL_SLOTS(C) list(C.head, C.wear_mask) diff --git a/code/__DEFINES/logging.dm b/code/__DEFINES/logging.dm index 8234059a36..2ba5012301 100644 --- a/code/__DEFINES/logging.dm +++ b/code/__DEFINES/logging.dm @@ -16,6 +16,7 @@ #define INVESTIGATE_EXONET "exonet" #define INVESTIGATE_NANITES "nanites" #define INVESTIGATE_CIRCUIT "circuit" +#define INVESTIGATE_FERMICHEM "fermichem" #define INVESTIGATE_RCD "rcd" // Logging types for log_message() diff --git a/code/__DEFINES/maths.dm b/code/__DEFINES/maths.dm index d344f7f010..5bce51293f 100644 --- a/code/__DEFINES/maths.dm +++ b/code/__DEFINES/maths.dm @@ -201,4 +201,10 @@ return list(region_x1 & region_x2, region_y1 & region_y2) +#define EXP_DISTRIBUTION(desired_mean) ( -(1/(1/desired_mean)) * log(rand(1, 1000) * 0.001) ) + +#define LORENTZ_DISTRIBUTION(x, s) ( s*TAN(TODEGREES(PI*(rand()-0.5))) + x ) +#define LORENTZ_CUMULATIVE_DISTRIBUTION(x, y, s) ( (1/PI)*TORADIANS(arctan((x-y)/s)) + 1/2 ) + +#define RULE_OF_THREE(a, b, x) ((a*x)/b) // ) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 2ba1563001..b6115e93e9 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -57,7 +57,7 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s #define BODYPARTS_LAYER 28 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag #define MARKING_LAYER 27 //Matrixed body markings because clashing with snouts? #define BODY_ADJ_LAYER 26 //certain mutantrace features (snout, body markings) that must appear above the body parts -#define GENITALS_ADJ_LAYER 25 +#define GENITALS_FRONT_LAYER 25 //Draws some genitalia above clothes and the TAUR body if need be. #define BODY_LAYER 24 //underwear, undershirts, socks, eyes, lips(makeup) #define FRONT_MUTATIONS_LAYER 23 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes) #define DAMAGE_LAYER 22 //damage indicators (cuts and burns) @@ -69,7 +69,6 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s #define EARS_LAYER 17 #define BODY_TAUR_LAYER 16 #define SUIT_LAYER 15 -#define GENITALS_FRONT_LAYER 14 //Draws some genitalia above clothes and the TAUR body if need be. #define GLASSES_LAYER 13 #define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt? #define SUIT_STORE_LAYER 11 @@ -83,7 +82,7 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s #define HANDS_LAYER 3 #define BODY_FRONT_LAYER 2 #define FIRE_LAYER 1 //If you're on fire -#define TOTAL_LAYERS 31 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_; +#define TOTAL_LAYERS 30 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_; //Human Overlay Index Shortcuts for alternate_worn_layer, layers //Because I *KNOW* somebody will think layer+1 means "above" @@ -473,6 +472,9 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S #define EGG_LAYING_MESSAGES list("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.") +// list of all null rod weapons +#define HOLY_WEAPONS /obj/item/nullrod, /obj/item/twohanded/dualsaber/hypereutactic/chaplain, /obj/item/gun/energy/laser/redtag/hitscan/chaplain, /obj/item/multitool/chaplain, /obj/item/melee/baseball_bat/chaplain + // Used by PDA and cartridge code to reduce repetitiveness of spritesheets #define PDAIMG(what) {""} @@ -496,4 +498,4 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S #define PREF_SAVELOAD_COOLDOWN 5 #define VOMIT_TOXIC 1 -#define VOMIT_PURPLE 2 \ No newline at end of file +#define VOMIT_PURPLE 2 diff --git a/code/__DEFINES/movespeed_modification.dm b/code/__DEFINES/movespeed_modification.dm index 9f8d310193..c0aac36415 100644 --- a/code/__DEFINES/movespeed_modification.dm +++ b/code/__DEFINES/movespeed_modification.dm @@ -28,4 +28,6 @@ #define MOVESPEED_ID_SIMPLEMOB_VARSPEED "SIMPLEMOB_VARSPEED_MODIFIER" #define MOVESPEED_ID_ADMIN_VAREDIT "ADMIN_VAREDIT_MODIFIER" -#define MOVESPEED_ID_PAI_SPACEWALK_SPEEDMOD "PAI_SPACEWALK_MODIFIER" \ No newline at end of file +#define MOVESPEED_ID_PAI_SPACEWALK_SPEEDMOD "PAI_SPACEWALK_MODIFIER" + +#define MOVESPEED_ID_SANITY "MOOD_SANITY" diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm index 5c21fbbc71..01d95d7ff9 100644 --- a/code/__DEFINES/obj_flags.dm +++ b/code/__DEFINES/obj_flags.dm @@ -33,7 +33,7 @@ #define LAVAPROTECT (1<<0) #define STOPSPRESSUREDAMAGE (1<<1) //SUIT and HEAD items which stop pressure damage. To stop you taking all pressure damage you must have both a suit and head item with this flag. #define BLOCK_GAS_SMOKE_EFFECT (1<<2) // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! -#define MASKINTERNALS (1<<3) // mask allows internals +#define ALLOWINTERNALS (1<<3) // mask allows internals #define NOSLIP (1<<4) //prevents from slipping on wet floors, in space etc #define THICKMATERIAL (1<<5) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. #define VOICEBOX_TOGGLABLE (1<<6) // The voicebox in this clothing can be toggled. diff --git a/code/__DEFINES/reactions.dm b/code/__DEFINES/reactions.dm index 1c36120a0c..7cebc37d94 100644 --- a/code/__DEFINES/reactions.dm +++ b/code/__DEFINES/reactions.dm @@ -25,7 +25,8 @@ #define NOBLIUM_FORMATION_ENERGY 2e9 //1 Mole of Noblium takes the planck energy to condense. //Research point amounts #define NOBLIUM_RESEARCH_AMOUNT 1000 -#define BZ_RESEARCH_AMOUNT 150 +#define BZ_RESEARCH_SCALE 4 +#define BZ_RESEARCH_MAX_AMOUNT 400 #define MIASMA_RESEARCH_AMOUNT 160 #define STIMULUM_RESEARCH_AMOUNT 50 //Plasma fusion properties diff --git a/code/__DEFINES/reagents.dm b/code/__DEFINES/reagents.dm index c3682d905d..174289d3bb 100644 --- a/code/__DEFINES/reagents.dm +++ b/code/__DEFINES/reagents.dm @@ -2,7 +2,13 @@ #define LIQUID 2 #define GAS 3 -// reagents_flags defines +//reagents reaction var defines +#define REAGENT_NORMAL_PH 7.000 +#define REAGENT_PH_ACCURACY 0.001 +#define REAGENT_PURITY_ACCURACY 0.001 +#define DEFAULT_SPECIFIC_HEAT 200 + +// container_type defines #define INJECTABLE (1<<0) // Makes it possible to add reagents through droppers and syringes. #define DRAWABLE (1<<1) // Makes it possible to remove reagents through syringes. diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index ffaaa04d0f..3cd64af8c7 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -44,6 +44,8 @@ #define STATUS_EFFECT_SLEEPING /datum/status_effect/incapacitating/sleeping //the affected is asleep +#define STATUS_EFFECT_PACIFY /datum/status_effect/pacify //the affected is pacified, preventing direct hostile actions + #define STATUS_EFFECT_BELLIGERENT /datum/status_effect/belligerent //forces the affected to walk, doing damage if they try to run #define STATUS_EFFECT_GEISTRACKER /datum/status_effect/geis_tracker //if you're using geis, this tracks that and keeps you from using scripture diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 19d0540e0e..3394fba90c 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -93,6 +93,7 @@ #define FIRE_PRIORITY_SERVER_MAINT 10 #define FIRE_PRIORITY_RESEARCH 10 #define FIRE_PRIORITY_VIS 10 +#define FIRE_PRIORITY_VORE 10 #define FIRE_PRIORITY_GARBAGE 15 #define FIRE_PRIORITY_WET_FLOORS 20 #define FIRE_PRIORITY_AIR 20 diff --git a/code/__DEFINES/time.dm b/code/__DEFINES/time.dm index c5d6f3051e..f13f13510b 100644 --- a/code/__DEFINES/time.dm +++ b/code/__DEFINES/time.dm @@ -31,4 +31,4 @@ When using time2text(), please use "DDD" to find the weekday. Refrain from using #define WORLDTIMEOFDAY2TEXT(format) GAMETIMESTAMP(format, world.timeofday) #define TIME_STAMP(format, showds) showds ? "[WORLDTIMEOFDAY2TEXT(format)]:[world.timeofday % 10]" : WORLDTIMEOFDAY2TEXT(format) #define STATION_TIME(display_only) ((((world.time - SSticker.round_start_time) * SSticker.station_time_rate_multiplier) + SSticker.gametime_offset) % 864000) - (display_only? GLOB.timezoneOffset : 0) -#define STATION_TIME_TIMESTAMP(format) time2text(STATION_TIME(TRUE), format) \ No newline at end of file +#define STATION_TIME_TIMESTAMP(format) time2text(STATION_TIME(TRUE), format) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index e23d8dba76..a4bca2f2c8 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -108,6 +108,8 @@ #define TRAIT_NOHARDCRIT "nohardcrit" #define TRAIT_NOSOFTCRIT "nosoftcrit" #define TRAIT_MINDSHIELD "mindshield" +#define TRAIT_FEARLESS "fearless" +#define TRAIT_UNSTABLE "unstable" #define TRAIT_PARALYSIS_L_ARM "para-l-arm" //These are used for brain-based paralysis, where replacing the limb won't fix it #define TRAIT_PARALYSIS_R_ARM "para-r-arm" #define TRAIT_PARALYSIS_L_LEG "para-l-leg" @@ -116,6 +118,7 @@ #define TRAIT_LAW_ENFORCEMENT_METABOLISM "law-enforcement-metabolism" #define TRAIT_STRONG_GRABBER "strong_grabber" #define TRAIT_CALCIUM_HEALER "calcium_healer" +#define TRAIT_CAPTAIN_METABOLISM "captain-metabolism" //non-mob traits #define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it @@ -144,12 +147,15 @@ #define TRAIT_CROCRIN_IMMUNE "crocin_immune" #define TRAIT_NYMPHO "nymphomania" #define TRAIT_MASO "masochism" +#define TRAIT_HIGH_BLOOD "high_blood" +#define TRAIT_PHARMA "hepatic_pharmacokinesis" #define TRAIT_PARA "paraplegic" #define TRAIT_EMPATH "empath" #define TRAIT_FRIENDLY "friendly" #define TRAIT_ASSBLASTUSA "assblastusa" #define TRAIT_CULT_EYES "cult_eyes" + // common trait sources #define TRAIT_GENERIC "generic" #define EYE_DAMAGE "eye_damage" @@ -198,4 +204,4 @@ #define FLIGHTSUIT_TRAIT "flightsuit" #define LOCKED_HELMET_TRAIT "locked-helmet" #define NINJA_SUIT_TRAIT "ninja-suit" -#define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant" \ No newline at end of file +#define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant" diff --git a/code/__HELPERS/_cit_helpers.dm b/code/__HELPERS/_cit_helpers.dm index 668b151b6e..8683f75b08 100644 --- a/code/__HELPERS/_cit_helpers.dm +++ b/code/__HELPERS/_cit_helpers.dm @@ -58,6 +58,7 @@ GLOBAL_LIST_EMPTY(ipc_antennas_list) //Genitals and Arousal Lists GLOBAL_LIST_EMPTY(cock_shapes_list)//global_lists.dm for the list initializations //Now also _DATASTRUCTURES globals.dm GLOBAL_LIST_EMPTY(cock_shapes_icons) //Associated list for names->icon_states for cockshapes. +GLOBAL_LIST_EMPTY(gentlemans_organ_names) GLOBAL_LIST_EMPTY(balls_shapes_list) GLOBAL_LIST_EMPTY(balls_shapes_icons) GLOBAL_LIST_EMPTY(breasts_size_list) diff --git a/code/__HELPERS/donator_groupings.dm b/code/__HELPERS/donator_groupings.dm new file mode 100644 index 0000000000..bdff20553a --- /dev/null +++ b/code/__HELPERS/donator_groupings.dm @@ -0,0 +1,25 @@ +/* +Current specifications: + +Donator groups in __DEFINES/donator_groupings.dm, config entries in controllers/configuration/entries/donator.dm + +3 groups, Tier 1/2/3 +Each tier includes the one before it (ascending) +For fast lookups, this is generated using regenerate_donator_grouping_list() + +*/ + +/proc/is_donator_group(ckey, group) + ckey = ckey(ckey) //make sure it's ckey'd. + var/list/L = GLOB.donators_by_group[group] + return L && L.Find(ckey) + +/proc/regenerate_donator_grouping_list() + GLOB.donators_by_group = list() //reinit everything + var/list/donator_list = GLOB.donators_by_group //cache + var/list/tier_1 = TIER_1_DONATORS + donator_list[DONATOR_GROUP_TIER_1] = tier_1.Copy() //The .Copy() is to "decouple"/make a new list, rather than letting the global list impact the config list. + var/list/tier_2 = tier_1 + TIER_2_DONATORS //Using + on lists implies making new lists, so we don't need to manually Copy(). + donator_list[DONATOR_GROUP_TIER_2] = tier_2 + var/list/tier_3 = tier_2 + TIER_3_DONATORS + donator_list[DONATOR_GROUP_TIER_3] = tier_3 diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index c8a33959ed..ad2bedaa4e 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -52,7 +52,8 @@ init_sprite_accessory_subtypes(/datum/sprite_accessory/vagina, GLOB.vagina_shapes_list) init_sprite_accessory_subtypes(/datum/sprite_accessory/breasts, GLOB.breasts_shapes_list) - GLOB.breasts_size_list = list("a","b","c","d","e") //We need the list to choose from initialized, but it's no longer a sprite_accessory thing. + GLOB.breasts_size_list = list ("a", "b", "c", "d", "e") //We need the list to choose from initialized, but it's no longer a sprite_accessory thing. + GLOB.gentlemans_organ_names = list("phallus", "willy", "dick", "prick", "member", "tool", "gentleman's organ", "cock", "wang", "knob", "dong", "joystick", "pecker", "johnson", "weenie", "tadger", "schlong", "thirsty ferret", "baloney pony", "schlanger") for(var/K in GLOB.breasts_shapes_list) var/datum/sprite_accessory/breasts/value = GLOB.breasts_shapes_list[K] GLOB.breasts_shapes_icons[K] = value.icon_state diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 5ec839130a..7ec99fa885 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -189,6 +189,7 @@ "breasts_size" = pick(GLOB.breasts_size_list), "breasts_shape" = "Pair", "breasts_fluid" = "milk", + "breasts_producing" = FALSE, "has_vag" = FALSE, "vag_shape" = pick(GLOB.vagina_shapes_list), "vag_color" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"), diff --git a/code/__HELPERS/roundend.dm b/code/__HELPERS/roundend.dm index 55d9e7a6cd..0e9413520b 100644 --- a/code/__HELPERS/roundend.dm +++ b/code/__HELPERS/roundend.dm @@ -308,6 +308,13 @@ //ignore this comment, it fixes the broken sytax parsing caused by the " above else parts += "[GLOB.TAB]Nobody died this shift!" + if(istype(SSticker.mode, /datum/game_mode/dynamic)) + var/datum/game_mode/dynamic/mode = SSticker.mode + parts += "[GLOB.TAB]Threat level: [mode.threat_level]" + parts += "[GLOB.TAB]Threat left: [mode.threat]" + parts += "[GLOB.TAB]Executed rules:" + for(var/datum/dynamic_ruleset/rule in mode.executed_rules) + parts += "[GLOB.TAB][GLOB.TAB][rule.ruletype] - [rule.name]: -[rule.cost] threat" return parts.Join("
") /client/proc/roundend_report_file() diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm index b28e7b5807..f0d5a7b252 100644 --- a/code/__HELPERS/time.dm +++ b/code/__HELPERS/time.dm @@ -73,3 +73,11 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0) /proc/daysSince(realtimev) return round((world.realtime - realtimev) / (24 HOURS)) + +/proc/worldtime2text() + return gameTimestamp("hh:mm:ss", world.time) + +/proc/gameTimestamp(format = "hh:mm:ss", wtime=null) + if(!wtime) + wtime = world.time + return time2text(wtime - GLOB.timezoneOffset, format) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 7e078184b7..3c8d62ce3a 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1487,6 +1487,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) /obj/item/reagent_containers/food/snacks/grown/nettle, // base type /obj/item/reagent_containers/food/snacks/deepfryholder, /obj/item/reagent_containers/food/snacks/grown/shell, + /obj/item/reagent_containers/food/snacks/clothing, /obj/item/reagent_containers/food/snacks/store/bread ) blocked |= typesof(/obj/item/reagent_containers/food/snacks/customizable) diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index bb9fc98b8e..3b32745b5c 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -136,7 +136,7 @@ GLOBAL_LIST_INIT(bitfields, list( "LAVAPROTECT" = LAVAPROTECT, "STOPSPRESSUREDAMAGE" = STOPSPRESSUREDAMAGE, "BLOCK_GAS_SMOKE_EFFECT" = BLOCK_GAS_SMOKE_EFFECT, - "MASKINTERNALS" = MASKINTERNALS, + "ALLOWINTERNALS" = ALLOWINTERNALS, "NOSLIP" = NOSLIP, "THICKMATERIAL" = THICKMATERIAL, "VOICEBOX_TOGGLABLE" = VOICEBOX_TOGGLABLE, diff --git a/code/_globalvars/lists/maintenance_loot.dm b/code/_globalvars/lists/maintenance_loot.dm index d92ab17584..c25ebf5b0a 100644 --- a/code/_globalvars/lists/maintenance_loot.dm +++ b/code/_globalvars/lists/maintenance_loot.dm @@ -107,9 +107,10 @@ GLOBAL_LIST_INIT(maintenance_loot, list( /obj/item/storage/toolbox/artistic = 2, /obj/item/toy/eightball = 1, /obj/item/reagent_containers/pill/floorpill = 1, - /obj/item/reagent_containers/food/snacks/cannedpeaches/maint = 1, + /obj/item/reagent_containers/food/snacks/cannedpeaches/maint = 2, /obj/item/storage/daki = 3, //VERY IMPORTANT CIT CHANGE - adds bodypillows to maint /obj/item/storage/pill_bottle/penis_enlargement = 2, + /obj/item/storage/pill_bottle/breast_enlargement = 2, /obj/item/clothing/shoes/wheelys = 1, /obj/item/clothing/shoes/kindleKicks = 1, /obj/item/autosurgeon/penis = 1, diff --git a/code/_globalvars/lists/misc.dm b/code/_globalvars/lists/misc.dm new file mode 100644 index 0000000000..1dcde53a72 --- /dev/null +++ b/code/_globalvars/lists/misc.dm @@ -0,0 +1 @@ +GLOBAL_LIST_EMPTY(donators_by_group) //group id = donator list of ckeys diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 22210bfd08..5f0e7c9b22 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -67,7 +67,7 @@ /mob/proc/ClickOn( atom/A, params ) if(world.time <= next_click) return - next_click = world.time + 1 + next_click = world.time + world.tick_lag if(check_click_intercept(params,A)) return diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 5ee4ae0f8a..4c666d708c 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -290,16 +290,19 @@ icon_state = "internal0" else if(!C.getorganslot(ORGAN_SLOT_BREATHING_TUBE)) - if(!istype(C.wear_mask, /obj/item/clothing/mask)) + var/obj/item/clothing/check + var/internals = FALSE + + for(check in GET_INTERNAL_SLOTS(C)) + if(istype(check, /obj/item/clothing/mask)) + var/obj/item/clothing/mask/M = check + if(M.mask_adjusted) + M.adjustmask(C) + if(CHECK_BITFIELD(check.clothing_flags, ALLOWINTERNALS)) + internals = TRUE + if(!internals) to_chat(C, "You are not wearing an internals mask!") - return 1 - else - var/obj/item/clothing/mask/M = C.wear_mask - if(M.mask_adjusted) // if mask on face but pushed down - M.adjustmask(C) // adjust it back - if( !(M.clothing_flags & MASKINTERNALS) ) - to_chat(C, "You are not wearing an internals mask!") - return + return var/obj/item/I = C.is_holding_item_of_type(/obj/item/tank) if(I) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 3896c3eac3..6455b4ccb6 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -171,3 +171,7 @@ if(prob(2)) playsound(src, 'sound/weapons/dink.ogg', 30, 1) return 1 + +/obj/item/proc/getweight() + return total_mass || w_class * 1.25 + diff --git a/code/controllers/configuration/config_entry.dm b/code/controllers/configuration/config_entry.dm index 49ff1c8d49..3ac103affc 100644 --- a/code/controllers/configuration/config_entry.dm +++ b/code/controllers/configuration/config_entry.dm @@ -19,6 +19,7 @@ var/abstract_type = /datum/config_entry //do not instantiate if type matches this var/vv_VAS = TRUE //Force validate and set on VV. VAS proccall guard will run regardless. + var/postload_required = FALSE //requires running OnPostload() var/dupes_allowed = FALSE @@ -72,6 +73,9 @@ /datum/config_entry/proc/DeprecationUpdate(value) return +/datum/config_entry/proc/OnPostload() + return + /datum/config_entry/string config_entry_value = "" abstract_type = /datum/config_entry/string @@ -80,7 +84,7 @@ /datum/config_entry/string/vv_edit_var(var_name, var_value) return var_name != "auto_trim" && ..() -/datum/config_entry/string/ValidateAndSet(str_val) +/datum/config_entry/string/ValidateAndSet(str_val, during_load) if(!VASProcCallGuard(str_val)) return FALSE config_entry_value = auto_trim ? trim(str_val) : str_val diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm index 0232081c1a..ea2919f342 100644 --- a/code/controllers/configuration/configuration.dm +++ b/code/controllers/configuration/configuration.dm @@ -101,6 +101,7 @@ log_config("Loading config file [filename]...") var/list/lines = world.file2list("[directory]/[filename]") var/list/_entries = entries + var/list/postload_required = list() for(var/L in lines) L = trim(L) if(!L) @@ -157,18 +158,24 @@ else warning("[new_ver.type] is deprecated but gave no proper return for DeprecationUpdate()") - var/validated = E.ValidateAndSet(value) + var/validated = E.ValidateAndSet(value, TRUE) if(!validated) log_config("Failed to validate setting \"[value]\" for [entry]") else if(E.modified && !E.dupes_allowed) log_config("Duplicate setting for [entry] ([value], [E.resident_file]) detected! Using latest.") + if(E.postload_required) + postload_required[E] = TRUE E.resident_file = filename if(validated) E.modified = TRUE + for(var/i in postload_required) + var/datum/config_entry/E = i + E.OnPostload() + ++. /datum/controller/configuration/can_vv_get(var_name) diff --git a/code/controllers/configuration/entries/donator.dm b/code/controllers/configuration/entries/donator.dm new file mode 100644 index 0000000000..b74d5f5839 --- /dev/null +++ b/code/controllers/configuration/entries/donator.dm @@ -0,0 +1,22 @@ +/datum/config_entry/keyed_list/donator_group + key_mode = KEY_MODE_TEXT + value_mode = VALUE_MODE_FLAG + abstract_type = /datum/config_entry/keyed_list/donator_group + +//If we're in the middle of a config load, only do the regeneration afterwards to prevent this from wasting a massive amount of CPU for list regenerations. +/datum/config_entry/keyed_list/donator_group/ValidateAndSet(str_val, during_load) + . = ..() + if(. && during_load) + regenerate_donator_grouping_list() + +/datum/config_entry/keyed_list/donator_group/OnPostload() + . = ..() + regenerate_donator_grouping_list() + +//This is kinda weird in that the config entries are defined here but all the handling/calculations are in __HELPERS/donator_groupings.dm + +/datum/config_entry/keyed_list/donator_group/tier_1_donators + +/datum/config_entry/keyed_list/donator_group/tier_2_donators + +/datum/config_entry/keyed_list/donator_group/tier_3_donators diff --git a/code/controllers/subsystem/assets.dm b/code/controllers/subsystem/assets.dm index 7285298283..7b6554bd3f 100644 --- a/code/controllers/subsystem/assets.dm +++ b/code/controllers/subsystem/assets.dm @@ -6,7 +6,17 @@ SUBSYSTEM_DEF(assets) var/list/preload = list() /datum/controller/subsystem/assets/Initialize(timeofday) - for(var/type in typesof(/datum/asset)) + + var/list/priority_assets = list( + /datum/asset/simple/oui_theme_nano, + /datum/asset/simple/goonchat + ) + + for(var/type in priority_assets) + var/datum/asset/A = new type() + A.register() + + for(var/type in typesof(/datum/asset) - (priority_assets | list(/datum/asset, /datum/asset/simple))) var/datum/asset/A = type if (type != initial(A._abstract)) get_asset_datum(type) diff --git a/code/controllers/subsystem/input.dm b/code/controllers/subsystem/input.dm index 221d04dad5..cc09ca816e 100644 --- a/code/controllers/subsystem/input.dm +++ b/code/controllers/subsystem/input.dm @@ -23,7 +23,7 @@ SUBSYSTEM_DEF(input) // This is for when macro sets are eventualy datumized /datum/controller/subsystem/input/proc/setup_default_macro_sets() var/list/static/default_macro_sets - + if(default_macro_sets) macro_sets = default_macro_sets return @@ -49,6 +49,7 @@ SUBSYSTEM_DEF(input) "old_hotkeys" = list( "Tab" = "\".winset \\\"mainwindow.macro=old_default input.focus=true input.background-color=[COLOR_INPUT_ENABLED]\\\"\"", "O" = "ooc", + "L" = "looc", "T" = "say", "M" = "me", "Back" = "\".winset \\\"input.text=\\\"\\\"\\\"\"", // This makes it so backspace can remove default inputs diff --git a/code/controllers/subsystem/processing/chemistry.dm b/code/controllers/subsystem/processing/chemistry.dm new file mode 100644 index 0000000000..da31d65fb3 --- /dev/null +++ b/code/controllers/subsystem/processing/chemistry.dm @@ -0,0 +1,5 @@ +PROCESSING_SUBSYSTEM_DEF(chemistry) + wait = 5 + flags = SS_KEEP_TIMING + + diff --git a/code/controllers/subsystem/processing/quirks.dm b/code/controllers/subsystem/processing/quirks.dm index a6c86a3576..4af54b8c70 100644 --- a/code/controllers/subsystem/processing/quirks.dm +++ b/code/controllers/subsystem/processing/quirks.dm @@ -9,6 +9,7 @@ PROCESSING_SUBSYSTEM_DEF(quirks) runlevels = RUNLEVEL_GAME var/list/quirks = list() //Assoc. list of all roundstart quirk datum types; "name" = /path/ + var/list/quirk_names_by_path = list() var/list/quirk_points = list() //Assoc. list of quirk names and their "point cost"; positive numbers are good traits, and negative ones are bad var/list/quirk_objects = list() //A list of all quirk objects in the game, since some may process @@ -22,11 +23,68 @@ PROCESSING_SUBSYSTEM_DEF(quirks) var/datum/quirk/T = V quirks[initial(T.name)] = T quirk_points[initial(T.name)] = initial(T.value) + quirk_names_by_path[T] = initial(T.name) -/datum/controller/subsystem/processing/quirks/proc/AssignQuirks(mob/living/user, client/cli, spawn_effects) +/datum/controller/subsystem/processing/quirks/proc/AssignQuirks(mob/living/user, client/cli, spawn_effects, roundstart = FALSE, datum/job/job, silent = FALSE, mob/to_chat_target) GenerateQuirks(cli) - for(var/V in cli.prefs.character_quirks) + var/list/quirks = cli.prefs.character_quirks.Copy() + var/list/cut + if(job && job.blacklisted_quirks) + cut = filter_quirks(quirks, job) + for(var/V in quirks) user.add_quirk(V, spawn_effects) + if(!silent && LAZYLEN(cut)) + to_chat(to_chat_target || user, "All of your non-neutral character quirks have been cut due to these quirks conflicting with your job assignment: [english_list(cut)].") + +/datum/controller/subsystem/processing/quirks/proc/quirk_path_by_name(name) + return quirks[name] + +/datum/controller/subsystem/processing/quirks/proc/quirk_points_by_name(name) + return quirk_points[name] + +/datum/controller/subsystem/processing/quirks/proc/quirk_name_by_path(path) + return quirk_names_by_path[path] + +/datum/controller/subsystem/processing/quirks/proc/total_points(list/quirk_names) + . = 0 + for(var/i in quirk_names) + . += quirk_points_by_name(i) + +/datum/controller/subsystem/processing/quirks/proc/filter_quirks(list/quirks, datum/job/job) + var/list/cut = list() + var/list/banned_names = list() + for(var/i in job.blacklisted_quirks) + var/name = quirk_name_by_path(i) + if(name) + banned_names += name + var/list/blacklisted = quirks & banned_names + if(length(blacklisted)) + for(var/i in blacklisted) + quirks -= i + cut += i + + /* //Code to automatically reduce positive quirks until balance is even. + var/points_used = total_points(quirks) + if(points_used > 0) + //they owe us points, let's collect. + for(var/i in quirks) + var/points = quirk_points_by_name(i) + if(points > 0) + cut += i + quirks -= i + points_used -= points + if(points_used <= 0) + break + */ + + //Nah, let's null all non-neutrals out. + if(cut.len) + for(var/i in quirks) + if(quirk_points_by_name(i) != 0) + //cut += i -- Commented out: Only show the ones that triggered the quirk purge. + quirks -= i + + return cut /datum/controller/subsystem/processing/quirks/proc/GenerateQuirks(client/user) if(user.prefs.character_quirks.len) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 47945e4333..f2469e8f7d 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -385,7 +385,7 @@ SUBSYSTEM_DEF(ticker) if(player.mind.assigned_role != player.mind.special_role) SSjob.EquipRank(N, player.mind.assigned_role, 0) if(CONFIG_GET(flag/roundstart_traits) && ishuman(N.new_character)) - SSquirks.AssignQuirks(N.new_character, N.client, TRUE) + SSquirks.AssignQuirks(N.new_character, N.client, TRUE, TRUE, SSjob.GetJob(player.mind.assigned_role), FALSE, N) CHECK_TICK if(captainless) for(var/mob/dead/new_player/N in GLOB.player_list) diff --git a/code/controllers/subsystem/vore.dm b/code/controllers/subsystem/vore.dm index faaa297ca3..ca34f9ab61 100644 --- a/code/controllers/subsystem/vore.dm +++ b/code/controllers/subsystem/vore.dm @@ -7,7 +7,7 @@ SUBSYSTEM_DEF(bellies) name = "Bellies" - priority = 5 + priority = FIRE_PRIORITY_VORE wait = 1 SECONDS flags = SS_KEEP_TIMING|SS_NO_INIT runlevels = RUNLEVEL_GAME|RUNLEVEL_POSTGAME diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index f432e44b18..2f56c69384 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -87,17 +87,20 @@ SUBSYSTEM_DEF(vote) /datum/controller/subsystem/vote/proc/announce_result() var/list/winners = get_result() var/text + var/was_roundtype_vote = mode == "roundtype" if(winners.len > 0) if(question) text += "[question]" else text += "[capitalize(mode)] Vote" - stored_gamemode_votes = list() + if(was_roundtype_vote) + stored_gamemode_votes = list() for(var/i=1,i<=choices.len,i++) var/votes = choices[choices[i]] if(!votes) votes = 0 - stored_gamemode_votes[choices[i]] = votes + if(was_roundtype_vote) + stored_gamemode_votes[choices[i]] = votes text += "\n[choices[i]]: [obfuscated ? "???" : votes]" //CIT CHANGE - adds obfuscated votes if(mode != "custom") if(winners.len > 1 && !obfuscated) //CIT CHANGE - adds obfuscated votes diff --git a/code/datums/brain_damage/hypnosis.dm b/code/datums/brain_damage/hypnosis.dm new file mode 100644 index 0000000000..8909d1b85f --- /dev/null +++ b/code/datums/brain_damage/hypnosis.dm @@ -0,0 +1,72 @@ +/datum/brain_trauma/hypnosis + name = "Hypnosis" + desc = "Patient's unconscious is completely enthralled by a word or sentence, focusing their thoughts and actions on it." + scan_desc = "looping thought pattern" + gain_text = "" + lose_text = "" + resilience = TRAUMA_RESILIENCE_SURGERY + var/hypnotic_phrase = "" + var/regex/target_phrase + +/datum/brain_trauma/hypnosis/New(phrase, quirk = FALSE) + if(!phrase) + qdel(src) + if(quirk == TRUE) + hypnotic_phrase = phrase + else + friendliify(phrase) + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Hypnosis New() skipped due to try/catch incompatibility with admin proccalling.") + qdel(src) + try + target_phrase = new("(\\b[hypnotic_phrase]\\b)","ig") + catch(var/exception/e) + stack_trace("[e] on [e.file]:[e.line]") + qdel(src) + ..() + +/datum/brain_trauma/hypnosis/proc/friendliify(phrase) + phrase = replacetext(lowertext(phrase), "kill", "hug") + phrase = replacetext(lowertext(phrase), "murder", "cuddle") + phrase = replacetext(lowertext(phrase), "harm", "snuggle") + phrase = replacetext(lowertext(phrase), "decapitate", "headpat") + phrase = replacetext(lowertext(phrase), "strangle", "meow at") + phrase = replacetext(lowertext(phrase), "suicide", "self-love") + phrase = replacetext(lowertext(phrase), "lynch", "kiss") + hypnotic_phrase = phrase + +/datum/brain_trauma/hypnosis/on_gain() + message_admins("[ADMIN_LOOKUPFLW(owner)] was hypnotized with the phrase '[hypnotic_phrase]'.") + log_game("[key_name(owner)] was hypnotized with the phrase '[hypnotic_phrase]'.") + to_chat(owner, "[hypnotic_phrase]") + to_chat(owner, "[pick("You feel your thoughts focusing on this phrase... you can't seem to get it out of your head.",\ + "Your head hurts, but this is all you can think of. It must be vitally important.",\ + "You feel a part of your mind repeating this over and over. You need to follow these words.",\ + "Something about this sounds... right, for some reason. You feel like you should follow these words.",\ + "These words keep echoing in your mind. You find yourself completely fascinated by them.")]") + if(!HAS_TRAIT(owner, "hypnotherapy")) + to_chat(owner, "You've been hypnotized by this sentence. You must follow these words. If it isn't a clear order, you can freely interpret how to do so,\ + as long as you act like the words are your highest priority.") + else + to_chat(owner, "You've been hypnotized by this sentence. You feel an incredible desire to follow these words, but are able to resist it somewhat. If it isn't a clear order, you can freely interpret how to do so,\ + however this does not take precedence over your other objectives.") + ..() + +/datum/brain_trauma/hypnosis/on_lose() + message_admins("[ADMIN_LOOKUPFLW(owner)] is no longer hypnotized with the phrase '[hypnotic_phrase]'.") + log_game("[key_name(owner)] is no longer hypnotized with the phrase '[hypnotic_phrase]'.") + to_chat(owner, "You suddenly snap out of your fixation. The phrase '[hypnotic_phrase]' no longer feels important to you.") + ..() + +/datum/brain_trauma/hypnosis/on_life() + ..() + if(prob(2)) + switch(rand(1,2)) + if(1) + to_chat(owner, "...[lowertext(hypnotic_phrase)]...") + if(2) + new /datum/hallucination/chat(owner, TRUE, FALSE, "[hypnotic_phrase]") + +/datum/brain_trauma/hypnosis/on_hear(message, speaker, message_language, raw_message, radio_freq) + message = target_phrase.Replace(message, "$1") + return message diff --git a/code/datums/brain_damage/phobia.dm b/code/datums/brain_damage/phobia.dm index 6723c89ba5..f802555c7e 100644 --- a/code/datums/brain_damage/phobia.dm +++ b/code/datums/brain_damage/phobia.dm @@ -31,6 +31,8 @@ /datum/brain_trauma/mild/phobia/on_life() ..() + if(HAS_TRAIT(owner, TRAIT_FEARLESS)) + return if(is_blind(owner)) return if(world.time > next_check && world.time > next_scare) @@ -70,6 +72,8 @@ /datum/brain_trauma/mild/phobia/on_hear(message, speaker, message_language, raw_message, radio_freq) if(!owner.can_hear() || world.time < next_scare) //words can't trigger you if you can't hear them *taps head* return message + if(HAS_TRAIT(owner, TRAIT_FEARLESS)) + return message for(var/word in trigger_words) var/reg = regex("(\\b|\\A)[REGEX_QUOTE(word)]'?s*(\\b|\\Z)", "i") @@ -79,6 +83,8 @@ return message /datum/brain_trauma/mild/phobia/handle_speech(datum/source, list/speech_args) + if(HAS_TRAIT(owner, TRAIT_FEARLESS)) + return for(var/word in trigger_words) var/reg = regex("(\\b|\\A)[REGEX_QUOTE(word)]'?s*(\\b|\\Z)", "i") diff --git a/code/datums/brain_damage/severe.dm b/code/datums/brain_damage/severe.dm index d094c162d7..890e9cf903 100644 --- a/code/datums/brain_damage/severe.dm +++ b/code/datums/brain_damage/severe.dm @@ -254,3 +254,20 @@ /datum/brain_trauma/severe/pacifism/on_lose() REMOVE_TRAIT(owner, TRAIT_PACIFISM, TRAUMA_TRAIT) ..() + +//ported from TG +/datum/brain_trauma/severe/hypnotic_stupor + name = "Hypnotic Stupor" + desc = "Patient is prone to episodes of extreme stupor that leaves them extremely suggestible." + scan_desc = "oneiric feedback loop" + gain_text = "You feel somewhat dazed." + lose_text = "You feel like a fog was lifted from your mind." + +/datum/brain_trauma/severe/hypnotic_stupor/on_lose() //hypnosis must be cleared separately, but brain surgery should get rid of both anyway + ..() + owner.remove_status_effect(/datum/status_effect/trance) + +/datum/brain_trauma/severe/hypnotic_stupor/on_life() + ..() + if(prob(1) && !owner.has_status_effect(/datum/status_effect/trance)) + owner.apply_status_effect(/datum/status_effect/trance, rand(100,300), FALSE) diff --git a/code/datums/components/mood.dm b/code/datums/components/mood.dm index b32921a4ce..730ffa9ff0 100644 --- a/code/datums/components/mood.dm +++ b/code/datums/components/mood.dm @@ -6,6 +6,7 @@ var/sanity = 100 //Current sanity var/shown_mood //Shown happiness, this is what others can see when they try to examine you, prevents antag checking by noticing traitors are always very happy. var/mood_level = 5 //To track what stage of moodies they're on + var/sanity_level = 5 //To track what stage of sanity they're on var/mood_modifier = 1 //Modifier to allow certain mobs to be less affected by moodlets var/datum/mood_event/list/mood_events = list() var/insanity_effect = 0 //is the owner being punished for low mood? If so, how much? @@ -118,6 +119,8 @@ if(owner.client && owner.hud_used) if(sanity < 25) screen_obj.icon_state = "mood_insane" + else if (owner.has_status_effect(/datum/status_effect/chem/enthrall))//Fermichem enthral chem, maybe change? + screen_obj.icon_state = "mood_entrance" else screen_obj.icon_state = "mood[mood_level]" @@ -163,6 +166,58 @@ HandleNutrition(owner) +/datum/component/mood/proc/setSanity(amount, minimum=SANITY_INSANE, maximum=SANITY_NEUTRAL)//I'm sure bunging this in here will have no negative repercussions. + var/mob/living/master = parent + + if(amount == sanity) + return + // If we're out of the acceptable minimum-maximum range move back towards it in steps of 0.5 + // If the new amount would move towards the acceptable range faster then use it instead + if(sanity < minimum && amount < sanity + 0.5) + amount = sanity + 0.5 + else if(sanity > maximum && amount > sanity - 0.5) + amount = sanity - 0.5 + + // Disturbed stops you from getting any more sane + if(HAS_TRAIT(master, TRAIT_UNSTABLE)) + sanity = min(amount,sanity) + else + sanity = amount + + switch(sanity) + if(SANITY_INSANE to SANITY_CRAZY) + setInsanityEffect(MAJOR_INSANITY_PEN) + master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=1.5) //Did we change something ? movetypes is runtiming, movetypes=(~FLYING)) + sanity_level = 6 + if(SANITY_CRAZY to SANITY_UNSTABLE) + setInsanityEffect(MINOR_INSANITY_PEN) + master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=1)//, movetypes=(~FLYING)) + sanity_level = 5 + if(SANITY_UNSTABLE to SANITY_DISTURBED) + setInsanityEffect(0) + master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=0.5)//, movetypes=(~FLYING)) + sanity_level = 4 + if(SANITY_DISTURBED to SANITY_NEUTRAL) + setInsanityEffect(0) + master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE) + sanity_level = 3 + if(SANITY_NEUTRAL+1 to SANITY_GREAT+1) //shitty hack but +1 to prevent it from responding to super small differences + setInsanityEffect(0) + master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE) + sanity_level = 2 + if(SANITY_GREAT+1 to INFINITY) + setInsanityEffect(0) + master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE) + sanity_level = 1 + //update_mood_icon() + +/datum/component/mood/proc/setInsanityEffect(newval)//More code so that the previous proc works + if(newval == insanity_effect) + return + var/mob/living/master = parent + master.crit_threshold = (master.crit_threshold - insanity_effect) + newval + insanity_effect = newval + /datum/component/mood/proc/DecreaseSanity(amount, minimum = SANITY_INSANE) if(sanity < minimum) //This might make KevinZ stop fucking pinging me. IncreaseSanity(0.5) @@ -175,6 +230,10 @@ insanity_effect = (MINOR_INSANITY_PEN) /datum/component/mood/proc/IncreaseSanity(amount, maximum = SANITY_NEUTRAL) + // Disturbed stops you from getting any more sane - I'm just gonna bung this in here + var/mob/living/owner = parent + if(HAS_TRAIT(owner, TRAIT_UNSTABLE)) + return if(sanity > maximum) DecreaseSanity(0.5) //Removes some sanity to go back to our current limit. else @@ -195,7 +254,7 @@ 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. - the_event = new type(src, param) + the_event = new type(src, param)//This causes a runtime for some reason, was this me? No - there's an event floating around missing a definition. mood_events[category] = the_event update_mood() diff --git a/code/datums/components/storage/concrete/emergency.dm b/code/datums/components/storage/concrete/emergency.dm index 48880ff605..348821a913 100644 --- a/code/datums/components/storage/concrete/emergency.dm +++ b/code/datums/components/storage/concrete/emergency.dm @@ -36,3 +36,4 @@ /datum/component/storage/concrete/emergency/proc/unlock_me(datum/source) if(locked) set_locked(source, FALSE) + return TRUE diff --git a/code/datums/components/storage/concrete/pockets.dm b/code/datums/components/storage/concrete/pockets.dm index e0a23b0209..84be4fdca4 100644 --- a/code/datums/components/storage/concrete/pockets.dm +++ b/code/datums/components/storage/concrete/pockets.dm @@ -52,7 +52,7 @@ . = ..() cant_hold = typecacheof(list(/obj/item/screwdriver/power)) can_hold = typecacheof(list( - /obj/item/kitchen/knife, /obj/item/switchblade, /obj/item/pen, + /obj/item/kitchen/knife, /obj/item/switchblade, /obj/item/pen, /obj/item/melee/cultblade/dagger, /obj/item/scalpel, /obj/item/reagent_containers/syringe, /obj/item/dnainjector, /obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/dropper, /obj/item/implanter, /obj/item/screwdriver, /obj/item/weldingtool/mini, @@ -63,7 +63,7 @@ . = ..() cant_hold = typecacheof(list(/obj/item/screwdriver/power)) can_hold = typecacheof(list( - /obj/item/kitchen/knife, /obj/item/switchblade, /obj/item/pen, + /obj/item/kitchen/knife, /obj/item/switchblade, /obj/item/pen, /obj/item/melee/cultblade/dagger, /obj/item/scalpel, /obj/item/reagent_containers/syringe, /obj/item/dnainjector, /obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/dropper, /obj/item/implanter, /obj/item/screwdriver, /obj/item/weldingtool/mini, diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index f506f44ad5..a4a4936f0e 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -31,13 +31,43 @@ var/id = "" var/processing = FALSE var/mutable = TRUE //set to FALSE to prevent most in-game methods of altering the disease via virology + var/oldres // The order goes from easy to cure to hard to cure. var/static/list/advance_cures = list( - "sodiumchloride", "sugar", "orangejuice", - "spaceacillin", "salglu_solution", "ethanol", - "leporazine", "synaptizine", "lipolicide", - "silver", "gold" + list( // level 1 + "copper", "silver", "iodine", "iron", "carbon" + ), + list( // level 2 + "potassium", "ethanol", "lithium", "silicon", "bromine" + ), + list( // level 3 + "sodiumchloride", "sugar", "orangejuice", "tomatojuice", "milk" + ), + list( //level 4 + "spaceacillin", "salglu_solution", "epinephrine", "charcoal" + ), + list( //level 5 + "oil", "synaptizine", "mannitol", "space_drugs", "cryptobiolin" + ), + list( // level 6 + "phenol", "inacusiate", "oculine", "antihol" + ), + list( // level 7 + "leporazine", "mindbreaker", "corazone" + ), + list( // level 8 + "pax", "happiness", "ephedrine" + ), + list( // level 9 + "lipolicide", "sal_acid" + ), + list( // level 10 + "haloperidol", "aranesp", "diphenhydramine" + ), + list( //level 11 + "modafinil", "anacea" + ) ) /* @@ -250,7 +280,10 @@ /datum/disease/advance/proc/GenerateCure() if(properties && properties.len) var/res = CLAMP(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len) - cures = list(advance_cures[res]) + if(res == oldres) + return + cures = list(pick(advance_cures[res])) + oldres = res // Get the cure name from the cure_id var/datum/reagent/D = GLOB.chemical_reagents_list[cures[1]] diff --git a/code/datums/diseases/advance/symptoms/nanites.dm b/code/datums/diseases/advance/symptoms/nanites.dm index f288b24068..b18e089a41 100644 --- a/code/datums/diseases/advance/symptoms/nanites.dm +++ b/code/datums/diseases/advance/symptoms/nanites.dm @@ -25,7 +25,7 @@ if(!..()) return var/mob/living/carbon/M = A.affected_mob - SEND_SIGNAL(M, COMSIG_NANITE_ADJUST_VOLUME, src, power) + SEND_SIGNAL(M, COMSIG_NANITE_ADJUST_VOLUME, power) if(reverse_boost && SEND_SIGNAL(M, COMSIG_HAS_NANITES)) if(prob(A.stage_prob)) A.stage = min(A.stage + 1,A.max_stages) diff --git a/code/datums/diseases/advance/symptoms/oxygen.dm b/code/datums/diseases/advance/symptoms/oxygen.dm index 7bb6934707..cb7d1a6d6d 100644 --- a/code/datums/diseases/advance/symptoms/oxygen.dm +++ b/code/datums/diseases/advance/symptoms/oxygen.dm @@ -44,7 +44,7 @@ Bonus if(4, 5) M.adjustOxyLoss(-7, 0) M.losebreath = max(0, M.losebreath - 4) - if(regenerate_blood && M.blood_volume < BLOOD_VOLUME_NORMAL) + if(regenerate_blood && M.blood_volume < (BLOOD_VOLUME_NORMAL * M.blood_ratio)) M.blood_volume += 1 else if(prob(base_message_chance)) diff --git a/code/datums/ert.dm b/code/datums/ert.dm index d61c95c8f2..4976891543 100644 --- a/code/datums/ert.dm +++ b/code/datums/ert.dm @@ -21,8 +21,8 @@ /datum/ert/amber code = "Amber" - leader_role = /datum/antagonist/ert/commander/red - roles = list(/datum/antagonist/ert/security/red, /datum/antagonist/ert/medic/red, /datum/antagonist/ert/engineer/red) + leader_role = /datum/antagonist/ert/commander/amber + roles = list(/datum/antagonist/ert/security/amber, /datum/antagonist/ert/medic/amber, /datum/antagonist/ert/engineer/amber) /datum/ert/red leader_role = /datum/antagonist/ert/commander/red @@ -55,3 +55,13 @@ rename_team = "Inquisition" mission = "Destroy any traces of paranormal activity aboard the station." polldesc = "a Nanotrasen paranormal response team" + +/datum/ert/greybois + code = "Green" + teamsize = 1 + opendoors = FALSE + enforce_human = FALSE + roles = /datum/antagonist/greybois + leader_role = /datum/antagonist/greybois/greygod + rename_team = "Emergency Assistants" + polldesc = "an Emergency Assistant" diff --git a/code/datums/looping_sounds/_looping_sound.dm b/code/datums/looping_sounds/_looping_sound.dm index 1b7a304494..49942976ce 100644 --- a/code/datums/looping_sounds/_looping_sound.dm +++ b/code/datums/looping_sounds/_looping_sound.dm @@ -96,4 +96,4 @@ /datum/looping_sound/proc/on_stop() if(end_sound) - play(end_sound) \ No newline at end of file + play(end_sound) diff --git a/code/datums/map_config.dm b/code/datums/map_config.dm index 99b84a1b35..dcc16f1ba5 100644 --- a/code/datums/map_config.dm +++ b/code/datums/map_config.dm @@ -18,7 +18,7 @@ var/map_file = "BoxStation.dmm" var/traits = null - var/space_ruin_levels = 1 //Citadel edit - reduces the default space ruin z-level count to 1 + var/space_ruin_levels = 2 var/space_empty_levels = 1 var/minetype = "lavaland" diff --git a/code/datums/mood_events/drink_events.dm b/code/datums/mood_events/drink_events.dm index 5d0eb0e0cb..70acffdb8f 100644 --- a/code/datums/mood_events/drink_events.dm +++ b/code/datums/mood_events/drink_events.dm @@ -6,24 +6,24 @@ /datum/mood_event/quality_nice description = "That drink wasn't bad at all.\n" mood_change = 1 - timeout = 1200 + timeout = 2 MINUTES /datum/mood_event/quality_good description = "That drink was pretty good.\n" mood_change = 2 - timeout = 1200 + timeout = 2 MINUTES /datum/mood_event/quality_verygood description = "That drink was great!\n" mood_change = 3 - timeout = 1200 + timeout = 2 MINUTES /datum/mood_event/quality_fantastic description = "That drink was amazing!\n" mood_change = 4 - timeout = 1200 + timeout = 2 MINUTES /datum/mood_event/amazingtaste description = "Amazing taste!\n" - mood_change = 50 + mood_change = 50 //Is this not really high..? timeout = 10 MINUTES diff --git a/code/datums/mood_events/drug_events.dm b/code/datums/mood_events/drug_events.dm index 40c239180e..469bf80979 100644 --- a/code/datums/mood_events/drug_events.dm +++ b/code/datums/mood_events/drug_events.dm @@ -37,3 +37,19 @@ /datum/mood_event/withdrawal_critical/add_effects(drug_name) description = "[drug_name]! [drug_name]! [drug_name]!\n" + +/datum/mood_event/happiness_drug + description = "I can't feel anything and I never want this to end.\n" + mood_change = 10 + +/datum/mood_event/happiness_drug_good_od + description = "YES! YES!! YES!!!\n" + mood_change = 20 + timeout = 300 + //special_screen_obj = "mood_happiness_good" Originally in tg, but I personally think they look dumb + +/datum/mood_event/happiness_drug_bad_od + description = "NO! NO!! NO!!!\n" + mood_change = -20 + timeout = 300 + //special_screen_obj = "mood_happiness_bad" Originally in tg diff --git a/code/datums/mood_events/generic_negative_events.dm b/code/datums/mood_events/generic_negative_events.dm index b2b03fb56b..69f1a66814 100644 --- a/code/datums/mood_events/generic_negative_events.dm +++ b/code/datums/mood_events/generic_negative_events.dm @@ -1,3 +1,5 @@ + + /datum/mood_event/handcuffed description = "I guess my antics have finally caught up with me.\n" mood_change = -1 @@ -17,7 +19,7 @@ /datum/mood_event/burnt_thumb description = "I shouldn't play with lighters...\n" mood_change = -1 - timeout = 1200 + timeout = 2 MINUTES /datum/mood_event/cold description = "It's way too cold in here.\n" @@ -30,17 +32,17 @@ /datum/mood_event/creampie description = "I've been creamed. Tastes like pie flavor.\n" mood_change = -2 - timeout = 1800 + timeout = 3 MINUTES /datum/mood_event/slipped description = "I slipped. I should be more careful next time...\n" mood_change = -2 - timeout = 1800 + timeout = 3 MINUTES /datum/mood_event/eye_stab description = "I used to be an adventurer like you, until I took a screwdriver to the eye.\n" mood_change = -4 - timeout = 1800 + timeout = 3 MINUTES /datum/mood_event/delam //SM delamination description = "Those God damn engineers can't do anything right...\n" @@ -50,12 +52,12 @@ /datum/mood_event/depression description = "I feel sad for no particular reason.\n" mood_change = -9 - timeout = 1200 + timeout = 2 MINUTES /datum/mood_event/shameful_suicide //suicide_acts that return SHAME, like sord description = "I can't even end it all!\n" mood_change = -10 - timeout = 600 + timeout = 1 MINUTES /datum/mood_event/dismembered description = "AHH! I WAS USING THAT LIMB!\n" @@ -69,7 +71,7 @@ /datum/mood_event/tased description = "There's no \"z\" in \"taser\". It's in the zap.\n" mood_change = -3 - timeout = 1200 + timeout = 2 MINUTES /datum/mood_event/embedded description = "Pull it out!\n" @@ -78,7 +80,7 @@ /datum/mood_event/table description = "Someone threw me on a table!\n" mood_change = -2 - timeout = 1200 + timeout = 2 MINUTES /datum/mood_event/table/add_effects() if(ishuman(owner)) @@ -117,6 +119,30 @@ description = "I'm missing my family heirloom...\n" mood_change = -4 +/datum/mood_event/healsbadman + description = "I feel a lot better, but wow that was disgusting.\n" + mood_change = -4 + timeout = 2 MINUTES + +/datum/mood_event/jittery + description = "I'm nervous and on edge and I can't stand still!!\n" + mood_change = -2 + +/datum/mood_event/vomit + description = "I just threw up. Gross.\n" + mood_change = -2 + timeout = 2 MINUTES + +/datum/mood_event/vomitself + description = "I just threw up all over myself. This is disgusting.\n" + mood_change = -4 + timeout = 3 MINUTES + +/datum/mood_event/painful_medicine + description = "Medicine may be good for me but right now it stings like hell.\n" + mood_change = -5 + timeout = 1 MINUTES + /datum/mood_event/loud_gong description = "That loud gong noise really hurt my ears!\n" mood_change = -3 diff --git a/code/datums/mood_events/generic_positive_events.dm b/code/datums/mood_events/generic_positive_events.dm index 051a548d1d..422ec4476c 100644 --- a/code/datums/mood_events/generic_positive_events.dm +++ b/code/datums/mood_events/generic_positive_events.dm @@ -1,7 +1,7 @@ /datum/mood_event/hug description = "Hugs are nice.\n" mood_change = 1 - timeout = 1200 + timeout = 2 MINUTES /datum/mood_event/arcade description = "I beat the arcade game!\n" @@ -50,7 +50,7 @@ /datum/mood_event/jolly description = "I feel happy for no particular reason.\n" mood_change = 6 - timeout = 1200 + timeout = 2 MINUTES /datum/mood_event/focused description = "I have a goal, and I will reach it, whatever it takes!\n" //Used for syndies, nukeops etc so they can focus on their goals @@ -76,6 +76,20 @@ mood_change = 3 timeout = 600 +/datum/mood_event/chemical_euphoria + description = "Heh...hehehe...hehe...\n" + mood_change = 4 + + /datum/mood_event/chemical_laughter + description = "Laughter really is the best medicine! Or is it?\n" + mood_change = 4 + timeout = 3 MINUTES + + /datum/mood_event/chemical_superlaughter + description = "*WHEEZE*\n" + mood_change = 12 + timeout = 3 MINUTES + /datum/mood_event/betterhug description = "Someone was very nice to me.\n" mood_change = 3 @@ -94,8 +108,8 @@ /datum/mood_event/happy_empath description = "Someone seems happy!\n" - mood_change = 2 + mood_change = 3 timeout = 600 /datum/mood_event/happy_empath/add_effects(var/mob/happytarget) - description = "[happytarget.name]'s happiness is infectious!\n" + description = "[happytarget.name]'s happiness is infectious!\n" diff --git a/code/datums/mood_events/needs_events.dm b/code/datums/mood_events/needs_events.dm index 75b7e6931f..eb58f2aa92 100644 --- a/code/datums/mood_events/needs_events.dm +++ b/code/datums/mood_events/needs_events.dm @@ -59,4 +59,4 @@ /datum/mood_event/nice_shower description = "I have recently had a nice shower.\n" mood_change = 2 - timeout = 1800 + timeout = 3 MINUTES diff --git a/code/datums/mutations/speech.dm b/code/datums/mutations/speech.dm index 21adc944f6..f02b7f185f 100644 --- a/code/datums/mutations/speech.dm +++ b/code/datums/mutations/speech.dm @@ -91,32 +91,29 @@ message = replacetext(message," oh god "," cheese and crackers ") message = replacetext(message," jesus "," gee wiz ") message = replacetext(message," weak "," strong ") - message = replacetext(message," kill "," hug ") - message = replacetext(message," murder "," tease ") + message = replacetext(message," kill yourself "," hug ") message = replacetext(message," ugly "," beautiful ") message = replacetext(message," douchbag "," nice guy ") message = replacetext(message," whore "," lady ") - message = replacetext(message," nerd "," smart guy ") + message = replacetext(message," nerd "," smarty pants ") message = replacetext(message," moron "," fun person ") message = replacetext(message," IT'S LOOSE "," EVERYTHING IS FINE ") message = replacetext(message," sex "," hug fight ") message = replacetext(message," idiot "," genius ") message = replacetext(message," fat "," thin ") - message = replacetext(message," beer "," water with ice ") - message = replacetext(message," drink "," water ") + message = replacetext(message," beer "," liquid bread ") + message = replacetext(message," drink "," liquid ") message = replacetext(message," feminist "," empowered woman ") - message = replacetext(message," i hate you "," you're mean ") - message = replacetext(message," nigger "," african american ") + message = replacetext(message," i hate you "," you're a mean ") message = replacetext(message," jew "," jewish ") message = replacetext(message," shit "," shiz ") message = replacetext(message," crap "," poo ") message = replacetext(message," slut "," tease ") message = replacetext(message," ass "," butt ") message = replacetext(message," damn "," dang ") - message = replacetext(message," fuck "," ") message = replacetext(message," penis "," privates ") message = replacetext(message," cunt "," privates ") - message = replacetext(message," dick "," jerk ") + message = replacetext(message," dick "," privates ") message = replacetext(message," vagina "," privates ") speech_args[SPEECH_MESSAGE] = trim(message) @@ -281,4 +278,4 @@ /datum/mutation/human/stoner/on_losing(mob/living/carbon/human/owner) ..() owner.grant_language(/datum/language/common) - owner.remove_language(/datum/language/beachbum) \ No newline at end of file + owner.remove_language(/datum/language/beachbum) diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index 0512977d1a..336945f622 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -170,7 +170,7 @@ tick_interval = 4 alert_type = /obj/screen/alert/status_effect/his_grace var/bloodlust = 0 - + /obj/screen/alert/status_effect/his_grace name = "His Grace" desc = "His Grace hungers, and you must feed Him." @@ -208,6 +208,7 @@ owner.adjustToxLoss(-grace_heal, TRUE, TRUE) owner.adjustOxyLoss(-(grace_heal * 2)) owner.adjustCloneLoss(-grace_heal) + owner.adjustStaminaLoss(-(grace_heal * 25)) /datum/status_effect/his_grace/on_remove() owner.log_message("lost His Grace's stun immunity", LOG_ATTACK) diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 1c77520108..e930c77c36 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -507,3 +507,101 @@ desc = "Your body is covered in blue ichor! You can't be revived by vitality matrices." icon_state = "ichorial_stain" alerttooltipstyle = "clockcult" + +datum/status_effect/pacify + id = "pacify" + status_type = STATUS_EFFECT_REPLACE + tick_interval = 1 + duration = 100 + alert_type = null + +/datum/status_effect/pacify/on_creation(mob/living/new_owner, set_duration) + if(isnum(set_duration)) + duration = set_duration + . = ..() + +/datum/status_effect/pacify/on_apply() + ADD_TRAIT(owner, TRAIT_PACIFISM, "status_effect") + return ..() + +/datum/status_effect/pacify/on_remove() + REMOVE_TRAIT(owner, TRAIT_PACIFISM, "status_effect") + +/datum/status_effect/trance + id = "trance" + status_type = STATUS_EFFECT_UNIQUE + duration = 300 + tick_interval = 10 + examine_text = "SUBJECTPRONOUN seems slow and unfocused." + var/stun = TRUE + var/triggered = FALSE + alert_type = null + +/obj/screen/alert/status_effect/trance + name = "Trance" + desc = "Everything feels so distant, and you can feel your thoughts forming loops inside your head..." + icon_state = "high" + +/datum/status_effect/trance/tick() + if(HAS_TRAIT(owner, "hypnotherapy")) + if(triggered == TRUE) + UnregisterSignal(owner, COMSIG_MOVABLE_HEAR) + RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/hypnotize) + ADD_TRAIT(owner, TRAIT_MUTE, "trance") + if(!owner.has_quirk(/datum/quirk/monochromatic)) + owner.add_client_colour(/datum/client_colour/monochrome) + to_chat(owner, "[pick("You feel your thoughts slow down...", "You suddenly feel extremely dizzy...", "You feel like you're in the middle of a dream...","You feel incredibly relaxed...")]") + triggered = FALSE + else + return + if(stun) + owner.Stun(60, TRUE, TRUE) + owner.dizziness = 20 + +/datum/status_effect/trance/on_apply() + if(!iscarbon(owner)) + return FALSE + if(HAS_TRAIT(owner, "hypnotherapy")) + RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/listen) + return TRUE + alert_type = /obj/screen/alert/status_effect/trance + RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/hypnotize) + ADD_TRAIT(owner, TRAIT_MUTE, "trance") + if(!owner.has_quirk(/datum/quirk/monochromatic)) + owner.add_client_colour(/datum/client_colour/monochrome) + owner.visible_message("[stun ? "[owner] stands still as [owner.p_their()] eyes seem to focus on a distant point." : ""]", \ + "[pick("You feel your thoughts slow down...", "You suddenly feel extremely dizzy...", "You feel like you're in the middle of a dream...","You feel incredibly relaxed...")]") + return TRUE + +/datum/status_effect/trance/on_creation(mob/living/new_owner, _duration, _stun = TRUE, source_quirk = FALSE)//hypnoquirk makes no visible message, prevents self antag messages, and places phrase below objectives. + duration = _duration + stun = _stun + if(source_quirk == FALSE && HAS_TRAIT(owner, "hypnotherapy")) + REMOVE_TRAIT(owner, "hypnotherapy", ROUNDSTART_TRAIT) + return ..() + +/datum/status_effect/trance/on_remove() + UnregisterSignal(owner, COMSIG_MOVABLE_HEAR) + REMOVE_TRAIT(owner, TRAIT_MUTE, "trance") + owner.dizziness = 0 + if(!owner.has_quirk(/datum/quirk/monochromatic)) + owner.remove_client_colour(/datum/client_colour/monochrome) + to_chat(owner, "You snap out of your trance!") + +/datum/status_effect/trance/proc/listen(datum/source, message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode) + to_chat(owner, "[speaker] accidentally sets off your implanted trigger, sending you into a hypnotic daze!") + triggered = TRUE + +/datum/status_effect/trance/proc/hypnotize(datum/source, message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode) + if(!owner.can_hear()) + return + if(speaker == owner) + return + var/mob/living/carbon/C = owner + C.cure_trauma_type(/datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY) //clear previous hypnosis + if(HAS_TRAIT(C, "hypnotherapy")) + addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, raw_message, TRUE), 10) + else + addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, raw_message), 10) + addtimer(CALLBACK(C, /mob/living.proc/Stun, 60, TRUE, TRUE), 15) //Take some time to think about it + qdel(src) diff --git a/code/datums/traits/_quirk.dm b/code/datums/traits/_quirk.dm index cc6dd8db3f..12e34b0c90 100644 --- a/code/datums/traits/_quirk.dm +++ b/code/datums/traits/_quirk.dm @@ -13,7 +13,6 @@ var/mob/living/quirk_holder /datum/quirk/New(mob/living/quirk_mob, spawn_effects) - ..() if(!quirk_mob || (human_only && !ishuman(quirk_mob)) || quirk_mob.has_quirk(type)) qdel(src) quirk_holder = quirk_mob diff --git a/code/datums/traits/good.dm b/code/datums/traits/good.dm index 300a1264eb..dffdc92630 100644 --- a/code/datums/traits/good.dm +++ b/code/datums/traits/good.dm @@ -186,3 +186,20 @@ var/obj/item/autosurgeon/gloweyes/gloweyes = new(get_turf(H)) H.equip_to_slot(gloweyes, SLOT_IN_BACKPACK) H.regenerate_icons() + +/datum/quirk/bloodpressure + name = "Polycythemia vera" + desc = "You've a treated form of Polycythemia vera that increases the total blood volume inside of you as well as the rate of replenishment!" + value = 2 //I honeslty dunno if this is a good trait? I just means you use more of medbays blood and make janitors madder, but you also regen blood a lil faster. + mob_trait = TRAIT_HIGH_BLOOD + gain_text = "You feel full of blood!" + lose_text = "You feel like your blood pressure went down." + +/datum/quirk/bloodpressure/add() + var/mob/living/M = quirk_holder + M.blood_ratio = 1.2 + M.blood_volume += 150 + +/datum/quirk/bloodpressure/remove() + var/mob/living/M = quirk_holder + M.blood_ratio = 1 diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm index 36c6733cf7..f77fe37333 100644 --- a/code/datums/traits/negative.dm +++ b/code/datums/traits/negative.dm @@ -354,3 +354,12 @@ if(quirk_holder.mind && LAZYLEN(quirk_holder.mind.antag_datums)) to_chat(quirk_holder, "Your antagonistic nature has caused your voice to be heard.") qdel(src) + +/datum/quirk/unstable + name = "Unstable" + desc = "Due to past troubles, you are unable to recover your sanity if you lose it. Be very careful managing your mood!" + value = -2 + mob_trait = TRAIT_UNSTABLE + gain_text = "There's a lot on your mind right now." + lose_text = "Your mind finally feels calm." + medical_record_text = "Patient's mind is in a vulnerable state, and cannot recover from traumatic events." diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 88fe2c8d13..6665e4d59b 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -379,7 +379,7 @@ SEND_SIGNAL(src, COMSIG_ATOM_ACID_ACT, acidpwr, acid_volume) /atom/proc/emag_act() - SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) + return SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) /atom/proc/rad_act(strength) SEND_SIGNAL(src, COMSIG_ATOM_RAD_ACT, strength) diff --git a/code/game/gamemodes/brother/traitor_bro.dm b/code/game/gamemodes/brother/traitor_bro.dm index 18611ebfcb..8bbe7f54ed 100644 --- a/code/game/gamemodes/brother/traitor_bro.dm +++ b/code/game/gamemodes/brother/traitor_bro.dm @@ -6,7 +6,7 @@ name = "traitor+brothers" config_tag = "traitorbro" restricted_jobs = list("AI", "Cyborg") - protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Quartermaster", "Chief Engineer", "Research Director") + protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") announce_span = "danger" announce_text = "There are Syndicate agents and Blood Brothers on the station!\n\ diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm index 808022d25f..51a34f4194 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -135,7 +135,7 @@ Credit where due: required_enemies = 3 recommended_enemies = 5 enemy_minimum_age = 7 - protected_jobs = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain") //Silicons can eventually be converted + protected_jobs = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") //Silicons can eventually be converted restricted_jobs = list("Chaplain", "Captain") announce_span = "brass" announce_text = "Servants of Ratvar are trying to summon the Justiciar!\n\ diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index e7cc3c53ae..497cc2f1c3 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -35,8 +35,8 @@ config_tag = "cult" antag_flag = ROLE_CULTIST false_report_weight = 10 - restricted_jobs = list("Chaplain","AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel") - protected_jobs = list() + restricted_jobs = list("AI", "Cyborg") + protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") required_players = 30 required_enemies = 3 recommended_enemies = 5 diff --git a/code/game/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm new file mode 100644 index 0000000000..ab4ac4d5c6 --- /dev/null +++ b/code/game/gamemodes/dynamic/dynamic.dm @@ -0,0 +1,750 @@ +#define CURRENT_LIVING_PLAYERS 1 +#define CURRENT_LIVING_ANTAGS 2 +#define CURRENT_DEAD_PLAYERS 3 +#define CURRENT_OBSERVERS 4 + +#define ONLY_RULESET 1 +#define HIGHLANDER_RULESET 2 +#define TRAITOR_RULESET 4 +#define MINOR_RULESET 8 + +#define RULESET_STOP_PROCESSING 1 + +// -- Injection delays +GLOBAL_VAR_INIT(dynamic_latejoin_delay_min, (5 MINUTES)) +GLOBAL_VAR_INIT(dynamic_latejoin_delay_max, (25 MINUTES)) + +GLOBAL_VAR_INIT(dynamic_midround_delay_min, (15 MINUTES)) +GLOBAL_VAR_INIT(dynamic_midround_delay_max, (35 MINUTES)) + +// Are HIGHLANDER_RULESETs allowed to stack? +GLOBAL_VAR_INIT(dynamic_no_stacking, TRUE) +// A number between -5 and +5. +// A negative value will give a more peaceful round and +// a positive value will give a round with higher threat. +GLOBAL_VAR_INIT(dynamic_curve_centre, 0) +// A number between 0.5 and 4. +// Higher value will favour extreme rounds and +// lower value rounds closer to the average. +GLOBAL_VAR_INIT(dynamic_curve_width, 1.8) +// If enabled only picks a single starting rule and executes only autotraitor midround ruleset. +GLOBAL_VAR_INIT(dynamic_classic_secret, FALSE) +// How many roundstart players required for high population override to take effect. +GLOBAL_VAR_INIT(dynamic_high_pop_limit, 55) +// If enabled does not accept or execute any rulesets. +GLOBAL_VAR_INIT(dynamic_forced_extended, FALSE) +// How high threat is required for HIGHLANDER_RULESETs stacking. +// This is independent of dynamic_no_stacking. +GLOBAL_VAR_INIT(dynamic_stacking_limit, 90) +// List of forced roundstart rulesets. +GLOBAL_LIST_EMPTY(dynamic_forced_roundstart_ruleset) +// Forced threat level, setting this to zero or higher forces the roundstart threat to the value. +GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) + +/datum/game_mode/dynamic + name = "dynamic mode" + config_tag = "dynamic" + + announce_span = "danger" + announce_text = "Dynamic mode!" // This needs to be changed maybe + + reroll_friendly = FALSE; + + // Threat logging vars + /// The "threat cap", threat shouldn't normally go above this and is used in ruleset calculations + var/threat_level = 0 + /// Set at the beginning of the round. Spent by the mode to "purchase" rules. + var/threat = 0 + /// Running information about the threat. Can store text or datum entries. + var/list/threat_log = list() + /// List of roundstart rules used for selecting the rules. + var/list/roundstart_rules = list() + /// List of latejoin rules used for selecting the rules. + var/list/latejoin_rules = list() + /// List of midround rules used for selecting the rules. + var/list/midround_rules = list() + /** # Pop range per requirement. + * If the value is five the range is: + * 0-4, 5-9, 10-14, 15-19, 20-24, 25-29, 30-34, 35-39, 40-54, 45+ + * If it is six the range is: + * 0-5, 6-11, 12-17, 18-23, 24-29, 30-35, 36-41, 42-47, 48-53, 54+ + * If it is seven the range is: + * 0-6, 7-13, 14-20, 21-27, 28-34, 35-41, 42-48, 49-55, 56-62, 63+ + */ + var/pop_per_requirement = 6 + /// The requirement used for checking if a second rule should be selected. + var/list/second_rule_req = list(100, 100, 80, 70, 60, 50, 30, 20, 10, 0) + /// The requirement used for checking if a third rule should be selected. + var/list/third_rule_req = list(100, 100, 100, 90, 80, 70, 60, 50, 40, 30) + /// Threat requirement for a second ruleset when high pop override is in effect. + var/high_pop_second_rule_req = 40 + /// Threat requirement for a third ruleset when high pop override is in effect. + var/high_pop_third_rule_req = 60 + /// Number of players who were ready on roundstart. + var/roundstart_pop_ready = 0 + /// List of candidates used on roundstart rulesets. + var/list/candidates = list() + /// Rules that are processed, rule_process is called on the rules in this list. + var/list/current_rules = list() + /// List of executed rulesets. + var/list/executed_rules = list() + /// Associative list of current players, in order: living players, living antagonists, dead players and observers. + var/list/list/current_players = list(CURRENT_LIVING_PLAYERS, CURRENT_LIVING_ANTAGS, CURRENT_DEAD_PLAYERS, CURRENT_OBSERVERS) + /// When world.time is over this number the mode tries to inject a latejoin ruleset. + var/latejoin_injection_cooldown = 0 + /// When world.time is over this number the mode tries to inject a midround ruleset. + var/midround_injection_cooldown = 0 + /// When TRUE GetInjectionChance returns 100. + var/forced_injection = FALSE + /// Forced ruleset to be executed for the next latejoin. + var/datum/dynamic_ruleset/latejoin/forced_latejoin_rule = null + /// When current_players was updated last time. + var/pop_last_updated = 0 + /// How many percent of the rounds are more peaceful. + var/peaceful_percentage = 50 + /// If a highlander executed. + var/highlander_executed = FALSE + /// If a only ruleset has been executed. + var/only_ruleset_executed = FALSE + +/datum/game_mode/dynamic/admin_panel() + var/list/dat = list("Game Mode Panel

Game Mode Panel

") + dat += "Dynamic Mode \[VV\]
" + dat += "Threat Level: [threat_level]
" + + dat += "Threat to Spend: [threat] \[Adjust\] \[View Log\]
" + dat += "
" + dat += "Parameters: centre = [GLOB.dynamic_curve_centre] ; width = [GLOB.dynamic_curve_width].
" + dat += "On average, [peaceful_percentage]% of the rounds are more peaceful.
" + dat += "Forced extended: [GLOB.dynamic_forced_extended ? "On" : "Off"]
" + dat += "Classic secret (only autotraitor): [GLOB.dynamic_classic_secret ? "On" : "Off"]
" + dat += "No stacking (only one round-ender): [GLOB.dynamic_no_stacking ? "On" : "Off"]
" + dat += "Stacking limit: [GLOB.dynamic_stacking_limit] \[Adjust\]" + dat += "
" + dat += "Executed rulesets: " + if (executed_rules.len > 0) + dat += "
" + for (var/datum/dynamic_ruleset/DR in executed_rules) + dat += "[DR.ruletype] - [DR.name]
" + else + dat += "none.
" + dat += "
Injection Timers: ([get_injection_chance(TRUE)]% chance)
" + dat += "Latejoin: [(latejoin_injection_cooldown-world.time)>60*10 ? "[round((latejoin_injection_cooldown-world.time)/60/10,0.1)] minutes" : "[(latejoin_injection_cooldown-world.time)] seconds"] \[Now!\]
" + dat += "Midround: [(midround_injection_cooldown-world.time)>60*10 ? "[round((midround_injection_cooldown-world.time)/60/10,0.1)] minutes" : "[(midround_injection_cooldown-world.time)] seconds"] \[Now!\]
" + usr << browse(dat.Join(), "window=gamemode_panel;size=500x500") + +/datum/game_mode/dynamic/Topic(href, href_list) + if (..()) // Sanity, maybe ? + return + if(!check_rights(R_ADMIN)) + message_admins("[usr.key] has attempted to override the game mode panel!") + log_admin("[key_name(usr)] tried to use the game mode panel without authorization.") + return + if (href_list["forced_extended"]) + GLOB.dynamic_forced_extended = !GLOB.dynamic_forced_extended + else if (href_list["no_stacking"]) + GLOB.dynamic_no_stacking = !GLOB.dynamic_no_stacking + else if (href_list["classic_secret"]) + GLOB.dynamic_classic_secret = !GLOB.dynamic_classic_secret + else if (href_list["adjustthreat"]) + var/threatadd = input("Specify how much threat to add (negative to subtract). This can inflate the threat level.", "Adjust Threat", 0) as null|num + if(!threatadd) + return + if(threatadd > 0) + create_threat(threatadd) + else + spend_threat(-threatadd) + else if (href_list["injectlate"]) + latejoin_injection_cooldown = 0 + forced_injection = TRUE + message_admins("[key_name(usr)] forced a latejoin injection.", 1) + else if (href_list["injectmid"]) + midround_injection_cooldown = 0 + forced_injection = TRUE + message_admins("[key_name(usr)] forced a midround injection.", 1) + else if (href_list["threatlog"]) + show_threatlog(usr) + else if (href_list["stacking_limit"]) + GLOB.dynamic_stacking_limit = input(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) as num + + admin_panel() // Refreshes the window + +// Checks if there are HIGHLANDER_RULESETs and calls the rule's round_result() proc +/datum/game_mode/dynamic/set_round_result() + for(var/datum/dynamic_ruleset/rule in executed_rules) + if(rule.flags & HIGHLANDER_RULESET) + if(rule.check_finished()) // Only the rule that actually finished the round sets round result. + return rule.round_result() + // If it got to this part, just pick one highlander if it exists + for(var/datum/dynamic_ruleset/rule in executed_rules) + if(rule.flags & HIGHLANDER_RULESET) + return rule.round_result() + return ..() + +/datum/game_mode/dynamic/send_intercept() + . = "Central Command Status Summary
" + switch(round(threat_level)) + if(0 to 19) + update_playercounts() + if(!current_players[CURRENT_LIVING_ANTAGS].len) + . += "Peaceful Waypoint
" + . += "Your station orbits deep within controlled, core-sector systems and serves as a waypoint for routine traffic through Nanotrasen's trade empire. Due to the combination of high security, interstellar traffic, and low strategic value, it makes any direct threat of violence unlikely. Your primary enemies will be incompetence and bored crewmen: try to organize team-building events to keep staffers interested and productive." + else + . += "Core Territory
" + . += "Your station orbits within reliably mundane, secure space. Although Nanotrasen has a firm grip on security in your region, the valuable resources and strategic position aboard your station make it a potential target for infiltrations. Monitor crew for non-loyal behavior, but expect a relatively tame shift free of large-scale destruction. We expect great things from your station." + if(20 to 39) + . += "Anomalous Exogeology
" + . += "Although your station lies within what is generally considered Nanotrasen-controlled space, the course of its orbit has caused it to cross unusually close to exogeological features with anomalous readings. Although these features offer opportunities for our research department, it is known that these little understood readings are often correlated with increased activity from competing interstellar organizations and individuals, among them the Wizard Federation and Cult of the Geometer of Blood - all known competitors for Anomaly Type B sites. Exercise elevated caution." + if(40 to 65) + . += "Contested System
" + . += "Your station's orbit passes along the edge of Nanotrasen's sphere of influence. While subversive elements remain the most likely threat against your station, hostile organizations are bolder here, where our grip is weaker. Exercise increased caution against elite Syndicate strike forces, or Executives forbid, some kind of ill-conceived unionizing attempt." + if(66 to 79) + . += "Uncharted Space
" + . += "Congratulations and thank you for participating in the NT 'Frontier' space program! Your station is actively orbiting a high value system far from the nearest support stations. Little is known about your region of space, and the opportunity to encounter the unknown invites greater glory. You are encouraged to elevate security as necessary to protect Nanotrasen assets." + if(80 to 99) + . += "Black Orbit
" + . += "As part of a mandatory security protocol, we are required to inform you that as a result of your orbital pattern directly behind an astrological body (oriented from our nearest observatory), your station will be under decreased monitoring and support. It is anticipated that your extreme location and decreased surveillance could pose security risks. Avoid unnecessary risks and attempt to keep your station in one piece." + if(100) + . += "Impending Doom
" + . += "Your station is somehow in the middle of hostile territory, in clear view of any enemy of the corporation. Your likelihood to survive is low, and station destruction is expected and almost inevitable. Secure any sensitive material and neutralize any enemy you will come across. It is important that you at least try to maintain the station.
" + . += "Good luck." + + if(station_goals.len) + . += "
Special Orders for [station_name()]:" + for(var/datum/station_goal/G in station_goals) + G.on_report() + . += G.get_report() + + print_command_report(., "Central Command Status Summary", announce=FALSE) + priority_announce("A summary has been copied and printed to all communications consoles.", "Security level elevated.", 'sound/ai/intercept.ogg') + if(GLOB.security_level < SEC_LEVEL_BLUE) + set_security_level(SEC_LEVEL_BLUE) + +// Yes, this is copy pasted from game_mode +/datum/game_mode/dynamic/check_finished(force_ending) + if(!SSticker.setup_done || !gamemode_ready) + return FALSE + if(replacementmode && round_converted == 2) + return replacementmode.check_finished() + if(SSshuttle.emergency && (SSshuttle.emergency.mode == SHUTTLE_ENDGAME)) + return TRUE + if(station_was_nuked) + return TRUE + if(force_ending) + return TRUE + for(var/datum/dynamic_ruleset/rule in executed_rules) + if(rule.flags & HIGHLANDER_RULESET) + return rule.check_finished() + +/datum/game_mode/dynamic/proc/show_threatlog(mob/admin) + if(!SSticker.HasRoundStarted()) + alert("The round hasn't started yet!") + return + + if(!check_rights(R_ADMIN)) + return + + var/list/out = list("Threat LogThreat Log
Starting Threat: [threat_level]
") + + for(var/entry in threat_log) + if(istext(entry)) + out += "[entry]
" + + out += "Remaining threat/threat_level: [threat]/[threat_level]" + + usr << browse(out.Join(), "window=threatlog;size=700x500") + +/// Generates the threat level using lorentz distribution and assigns peaceful_percentage. +/datum/game_mode/dynamic/proc/generate_threat() + var/relative_threat = LORENTZ_DISTRIBUTION(GLOB.dynamic_curve_centre, GLOB.dynamic_curve_width) + threat_level = round(lorentz_to_threat(relative_threat), 0.1) + + peaceful_percentage = round(LORENTZ_CUMULATIVE_DISTRIBUTION(relative_threat, GLOB.dynamic_curve_centre, GLOB.dynamic_curve_width), 0.01)*100 + + threat = threat_level + +/datum/game_mode/dynamic/can_start() + /* Disabled for now, had some changes that need to be tested and this might interfere with that. + if(GLOB.dynamic_curve_centre == 0) + // 10 is when the centre starts to decrease + // 6 is just 1 + 5 (from the maximum value and the one decreased) + // 1 just makes the curve look better, I don't know. + // Limited between 1 and 5 then inverted and rounded + // With this you get a centre curve that stays at -5 until 10 then first rapidly decreases but slows down at the end + GLOB.dynamic_curve_centre = round(-CLAMP((10*6/GLOB.player_list.len)-1, 0, 5), 0.5) + */ + message_admins("Dynamic mode parameters for the round:") + message_admins("Centre is [GLOB.dynamic_curve_centre], Width is [GLOB.dynamic_curve_width], Forced extended is [GLOB.dynamic_forced_extended ? "Enabled" : "Disabled"], No stacking is [GLOB.dynamic_no_stacking ? "Enabled" : "Disabled"].") + message_admins("Stacking limit is [GLOB.dynamic_stacking_limit], Classic secret is [GLOB.dynamic_classic_secret ? "Enabled" : "Disabled"], High population limit is [GLOB.dynamic_high_pop_limit].") + log_game("DYNAMIC: Dynamic mode parameters for the round:") + log_game("DYNAMIC: Centre is [GLOB.dynamic_curve_centre], Width is [GLOB.dynamic_curve_width], Forced extended is [GLOB.dynamic_forced_extended ? "Enabled" : "Disabled"], No stacking is [GLOB.dynamic_no_stacking ? "Enabled" : "Disabled"].") + log_game("DYNAMIC: Stacking limit is [GLOB.dynamic_stacking_limit], Classic secret is [GLOB.dynamic_classic_secret ? "Enabled" : "Disabled"], High population limit is [GLOB.dynamic_high_pop_limit].") + if(GLOB.dynamic_forced_threat_level >= 0) + threat_level = round(GLOB.dynamic_forced_threat_level, 0.1) + threat = threat_level + else + generate_threat() + + var/latejoin_injection_cooldown_middle = 0.5*(GLOB.dynamic_latejoin_delay_max + GLOB.dynamic_latejoin_delay_min) + latejoin_injection_cooldown = round(CLAMP(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), GLOB.dynamic_latejoin_delay_min, GLOB.dynamic_latejoin_delay_max)) + world.time + + var/midround_injection_cooldown_middle = 0.5*(GLOB.dynamic_midround_delay_max + GLOB.dynamic_midround_delay_min) + midround_injection_cooldown = round(CLAMP(EXP_DISTRIBUTION(midround_injection_cooldown_middle), GLOB.dynamic_midround_delay_min, GLOB.dynamic_midround_delay_max)) + world.time + message_admins("Dynamic Mode initialized with a Threat Level of... [threat_level]!") + log_game("DYNAMIC: Dynamic Mode initialized with a Threat Level of... [threat_level]!") + return TRUE + +/datum/game_mode/dynamic/pre_setup() + for (var/rule in subtypesof(/datum/dynamic_ruleset)) + var/datum/dynamic_ruleset/ruleset = new rule() + // Simple check if the ruleset should be added to the lists. + if(ruleset.name == "") + continue + switch(ruleset.ruletype) + if("Roundstart") + roundstart_rules += ruleset + if ("Latejoin") + latejoin_rules += ruleset + if ("Midround") + if (ruleset.weight) + midround_rules += ruleset + for(var/mob/dead/new_player/player in GLOB.player_list) + if(player.ready == PLAYER_READY_TO_PLAY && player.mind) + roundstart_pop_ready++ + candidates.Add(player) + log_game("DYNAMIC: Listing [roundstart_rules.len] round start rulesets, and [candidates.len] players ready.") + if (candidates.len <= 0) + return TRUE + if (roundstart_rules.len <= 0) + return TRUE + + if(GLOB.dynamic_forced_roundstart_ruleset.len > 0) + rigged_roundstart() + else + roundstart() + + var/starting_rulesets = "" + for (var/datum/dynamic_ruleset/roundstart/DR in executed_rules) + starting_rulesets += "[DR.name], " + candidates.Cut() + return TRUE + +/datum/game_mode/dynamic/post_setup(report) + update_playercounts() + + for(var/datum/dynamic_ruleset/roundstart/rule in executed_rules) + rule.candidates.Cut() // The rule should not use candidates at this point as they all are null. + if(!rule.execute()) + stack_trace("The starting rule \"[rule.name]\" failed to execute.") + ..() + +/// A simple roundstart proc used when dynamic_forced_roundstart_ruleset has rules in it. +/datum/game_mode/dynamic/proc/rigged_roundstart() + message_admins("[GLOB.dynamic_forced_roundstart_ruleset.len] rulesets being forced. Will now attempt to draft players for them.") + log_game("DYNAMIC: [GLOB.dynamic_forced_roundstart_ruleset.len] rulesets being forced. Will now attempt to draft players for them.") + for (var/datum/dynamic_ruleset/roundstart/rule in GLOB.dynamic_forced_roundstart_ruleset) + message_admins("Drafting players for forced ruleset [rule.name].") + log_game("DYNAMIC: Drafting players for forced ruleset [rule.name].") + rule.mode = src + rule.candidates = candidates.Copy() + rule.trim_candidates() + if (rule.ready(TRUE)) + picking_roundstart_rule(list(rule), forced = TRUE) + +/datum/game_mode/dynamic/proc/roundstart() + if (GLOB.dynamic_forced_extended) + log_game("DYNAMIC: Starting a round of forced extended.") + return TRUE + var/list/drafted_rules = list() + for (var/datum/dynamic_ruleset/roundstart/rule in roundstart_rules) + if (rule.acceptable(roundstart_pop_ready, threat_level) && threat >= rule.cost) // If we got the population and threat required + rule.candidates = candidates.Copy() + rule.trim_candidates() + if (rule.ready() && rule.candidates.len > 0) + drafted_rules[rule] = rule.weight + + var/indice_pop = min(10,round(roundstart_pop_ready/pop_per_requirement)+1) + var/extra_rulesets_amount = 0 + if (GLOB.dynamic_classic_secret) + extra_rulesets_amount = 0 + else + if (roundstart_pop_ready > GLOB.dynamic_high_pop_limit) + message_admins("High Population Override is in effect! Threat Level will have more impact on which roles will appear, and player population less.") + log_game("DYNAMIC: High Population Override is in effect! Threat Level will have more impact on which roles will appear, and player population less.") + if (threat_level > high_pop_second_rule_req) + extra_rulesets_amount++ + if (threat_level > high_pop_third_rule_req) + extra_rulesets_amount++ + else + if (threat_level >= second_rule_req[indice_pop]) + extra_rulesets_amount++ + if (threat_level >= third_rule_req[indice_pop]) + extra_rulesets_amount++ + + if (drafted_rules.len > 0 && picking_roundstart_rule(drafted_rules)) + if (extra_rulesets_amount > 0) // We've got enough population and threat for a second rulestart rule + for (var/datum/dynamic_ruleset/roundstart/rule in drafted_rules) + if (rule.cost > threat) + drafted_rules -= rule + if (drafted_rules.len > 0 && picking_roundstart_rule(drafted_rules)) + if (extra_rulesets_amount > 1) // We've got enough population and threat for a third rulestart rule + for (var/datum/dynamic_ruleset/roundstart/rule in drafted_rules) + if (rule.cost > threat) + drafted_rules -= rule + picking_roundstart_rule(drafted_rules) + else + return FALSE + return TRUE + +/// Picks a random roundstart rule from the list given as an argument and executes it. +/datum/game_mode/dynamic/proc/picking_roundstart_rule(list/drafted_rules = list(), forced = FALSE) + var/datum/dynamic_ruleset/roundstart/starting_rule = pickweight(drafted_rules) + if(!starting_rule) + return FALSE + + if(!forced) + if(only_ruleset_executed) + return FALSE + // Check if a blocking ruleset has been executed. + else if(check_blocking(starting_rule.blocking_rules, executed_rules)) + drafted_rules -= starting_rule + if(drafted_rules.len <= 0) + return FALSE + starting_rule = pickweight(drafted_rules) + // Check if the ruleset is highlander and if a highlander ruleset has been executed + else if(starting_rule.flags & HIGHLANDER_RULESET) + if(threat < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking) + if(highlander_executed) + drafted_rules -= starting_rule + if(drafted_rules.len <= 0) + return FALSE + starting_rule = pickweight(drafted_rules) + + message_admins("Picking a [istype(starting_rule, /datum/dynamic_ruleset/roundstart/delayed/) ? " delayed " : ""] ruleset [starting_rule.name]") + log_game("DYNAMIC: Picking a [istype(starting_rule, /datum/dynamic_ruleset/roundstart/delayed/) ? " delayed " : ""] ruleset [starting_rule.name]") + + roundstart_rules -= starting_rule + drafted_rules -= starting_rule + + if (istype(starting_rule, /datum/dynamic_ruleset/roundstart/delayed/)) + var/datum/dynamic_ruleset/roundstart/delayed/rule = starting_rule + addtimer(CALLBACK(src, .proc/execute_delayed, rule), rule.delay) + + starting_rule.trim_candidates() + if (starting_rule.pre_execute()) + spend_threat(starting_rule.cost) + threat_log += "[worldtime2text()]: Roundstart [starting_rule.name] spent [starting_rule.cost]" + if(starting_rule.flags & HIGHLANDER_RULESET) + highlander_executed = TRUE + else if(starting_rule.flags & ONLY_RULESET) + only_ruleset_executed = TRUE + executed_rules += starting_rule + if (starting_rule.persistent) + current_rules += starting_rule + for(var/mob/M in starting_rule.assigned) + for (var/datum/dynamic_ruleset/roundstart/rule in roundstart_rules) + if (!rule.ready()) + drafted_rules -= rule // And removing rules that are no longer elligible + return TRUE + else + stack_trace("The starting rule \"[starting_rule.name]\" failed to pre_execute.") + return FALSE + +/// Executes delayed roundstart rules and has a hack in it. +/datum/game_mode/dynamic/proc/execute_delayed(datum/dynamic_ruleset/roundstart/delayed/rule) + update_playercounts() + rule.candidates = current_players[CURRENT_LIVING_PLAYERS].Copy() + rule.trim_candidates() + if(rule.execute()) + executed_rules += rule + if (rule.persistent) + current_rules += rule + return TRUE + else + stack_trace("The delayed roundstart rule \"[rule.name]\" failed to execute.") + return FALSE + +/// Picks a random midround OR latejoin rule from the list given as an argument and executes it. +/// Also this could be named better. +/datum/game_mode/dynamic/proc/picking_midround_latejoin_rule(list/drafted_rules = list(), forced = FALSE) + var/datum/dynamic_ruleset/rule = pickweight(drafted_rules) + if(!rule) + return FALSE + + if(!forced) + if(only_ruleset_executed) + return FALSE + // Check if a blocking ruleset has been executed. + else if(check_blocking(rule.blocking_rules, executed_rules)) + drafted_rules -= rule + if(drafted_rules.len <= 0) + return FALSE + rule = pickweight(drafted_rules) + // Check if the ruleset is highlander and if a highlander ruleset has been executed + else if(rule.flags & HIGHLANDER_RULESET) + if(threat < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking) + if(highlander_executed) + drafted_rules -= rule + if(drafted_rules.len <= 0) + return FALSE + rule = pickweight(drafted_rules) + + if(!rule.repeatable) + if(rule.ruletype == "Latejoin") + latejoin_rules = remove_from_list(latejoin_rules, rule.type) + else if(rule.type == "Midround") + midround_rules = remove_from_list(midround_rules, rule.type) + + if (rule.execute()) + log_game("DYNAMIC: Injected a [rule.ruletype == "latejoin" ? "latejoin" : "midround"] ruleset [rule.name].") + spend_threat(rule.cost) + threat_log += "[worldtime2text()]: [rule.ruletype] [rule.name] spent [rule.cost]" + if(rule.flags & HIGHLANDER_RULESET) + highlander_executed = TRUE + else if(rule.flags & ONLY_RULESET) + only_ruleset_executed = TRUE + if(rule.ruletype == "Latejoin") + var/mob/M = pick(rule.candidates) + message_admins("[key_name(M)] joined the station, and was selected by the [rule.name] ruleset.") + log_game("DYNAMIC: [key_name(M)] joined the station, and was selected by the [rule.name] ruleset.") + executed_rules += rule + rule.candidates.Cut() + if (rule.persistent) + current_rules += rule + return TRUE + else + stack_trace("The [rule.ruletype] rule \"[rule.name]\" failed to execute.") + return FALSE + +/// An experimental proc to allow admins to call rules on the fly or have rules call other rules. +/datum/game_mode/dynamic/proc/picking_specific_rule(ruletype, forced = FALSE) + var/datum/dynamic_ruleset/midround/new_rule + if(ispath(ruletype)) + new_rule = new ruletype() // You should only use it to call midround rules though. + else if(istype(ruletype, /datum/dynamic_ruleset)) + new_rule = ruletype + else + return FALSE + + if(!new_rule) + return FALSE + + if(!forced) + if(only_ruleset_executed) + return FALSE + // Check if a blocking ruleset has been executed. + else if(check_blocking(new_rule.blocking_rules, executed_rules)) + return FALSE + // Check if the ruleset is highlander and if a highlander ruleset has been executed + else if(new_rule.flags & HIGHLANDER_RULESET) + if(threat < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking) + if(highlander_executed) + return FALSE + + update_playercounts() + if ((forced || (new_rule.acceptable(current_players[CURRENT_LIVING_PLAYERS].len, threat_level) && new_rule.cost <= threat))) + new_rule.candidates = current_players.Copy() + new_rule.trim_candidates() + if (new_rule.ready(forced)) + spend_threat(new_rule.cost) + threat_log += "[worldtime2text()]: Forced rule [new_rule.name] spent [new_rule.cost]" + if (new_rule.execute()) // This should never fail since ready() returned 1 + if(new_rule.flags & HIGHLANDER_RULESET) + highlander_executed = TRUE + else if(new_rule.flags & ONLY_RULESET) + only_ruleset_executed = TRUE + log_game("DYNAMIC: Making a call to a specific ruleset...[new_rule.name]!") + executed_rules += new_rule + if (new_rule.persistent) + current_rules += new_rule + return TRUE + else if (forced) + log_game("DYNAMIC: The ruleset [new_rule.name] couldn't be executed due to lack of elligible players.") + return FALSE + +/datum/game_mode/dynamic/process() + if (pop_last_updated < world.time - (60 SECONDS)) + pop_last_updated = world.time + update_playercounts() + + for (var/datum/dynamic_ruleset/rule in current_rules) + if(rule.rule_process() == RULESET_STOP_PROCESSING) // If rule_process() returns 1 (RULESET_STOP_PROCESSING), stop processing. + current_rules -= rule + + if (midround_injection_cooldown < world.time) + if (GLOB.dynamic_forced_extended) + return + + // Somehow it manages to trigger midround multiple times so this was moved here. + // There is no way this should be able to trigger an injection twice now. + var/midround_injection_cooldown_middle = 0.5*(GLOB.dynamic_midround_delay_max + GLOB.dynamic_midround_delay_min) + midround_injection_cooldown = (round(CLAMP(EXP_DISTRIBUTION(midround_injection_cooldown_middle), GLOB.dynamic_midround_delay_min, GLOB.dynamic_midround_delay_max)) + world.time) + + // Time to inject some threat into the round + if(EMERGENCY_ESCAPED_OR_ENDGAMED) // Unless the shuttle is gone + return + + log_game("DYNAMIC: Checking state of the round.") + + update_playercounts() + + if (prob(get_injection_chance())) + var/list/drafted_rules = list() + for (var/datum/dynamic_ruleset/midround/rule in midround_rules) + if (rule.acceptable(current_players[CURRENT_LIVING_PLAYERS].len, threat_level) && threat >= rule.cost) + // Classic secret : only autotraitor/minor roles + if (GLOB.dynamic_classic_secret && !((rule.flags & TRAITOR_RULESET) || (rule.flags & MINOR_RULESET))) + continue + rule.candidates = list() + rule.candidates = current_players.Copy() + rule.trim_candidates() + if (rule.ready() && rule.candidates.len > 0) + drafted_rules[rule] = rule.get_weight() + if (drafted_rules.len > 0) + picking_midround_latejoin_rule(drafted_rules) + +/// Updates current_players. +/datum/game_mode/dynamic/proc/update_playercounts() + current_players[CURRENT_LIVING_PLAYERS] = list() + current_players[CURRENT_LIVING_ANTAGS] = list() + current_players[CURRENT_DEAD_PLAYERS] = list() + current_players[CURRENT_OBSERVERS] = list() + for (var/mob/M in GLOB.player_list) + if (istype(M, /mob/dead/new_player)) + continue + if (M.stat != DEAD) + current_players[CURRENT_LIVING_PLAYERS].Add(M) + if (M.mind && (M.mind.special_role || M.mind.antag_datums?.len > 0)) + current_players[CURRENT_LIVING_ANTAGS].Add(M) + else + if (istype(M,/mob/dead/observer)) + var/mob/dead/observer/O = M + if (O.started_as_observer) // Observers + current_players[CURRENT_OBSERVERS].Add(M) + continue + current_players[CURRENT_DEAD_PLAYERS].Add(M) // Players who actually died (and admins who ghosted, would be nice to avoid counting them somehow) + +/// Gets the chance for latejoin and midround injection, the dry_run argument is only used for forced injection. +/datum/game_mode/dynamic/proc/get_injection_chance(dry_run = FALSE) + if(forced_injection) + forced_injection = !dry_run + return 100 + var/chance = 0 + // If the high pop override is in effect, we reduce the impact of population on the antag injection chance + var/high_pop_factor = (current_players[CURRENT_LIVING_PLAYERS].len >= GLOB.dynamic_high_pop_limit) + var/max_pop_per_antag = max(5,15 - round(threat_level/10) - round(current_players[CURRENT_LIVING_PLAYERS].len/(high_pop_factor ? 10 : 5))) + if (!current_players[CURRENT_LIVING_ANTAGS].len) + chance += 50 // No antags at all? let's boost those odds! + else + var/current_pop_per_antag = current_players[CURRENT_LIVING_PLAYERS].len / current_players[CURRENT_LIVING_ANTAGS].len + if (current_pop_per_antag > max_pop_per_antag) + chance += min(50, 25+10*(current_pop_per_antag-max_pop_per_antag)) + else + chance += 25-10*(max_pop_per_antag-current_pop_per_antag) + if (current_players[CURRENT_DEAD_PLAYERS].len > current_players[CURRENT_LIVING_PLAYERS].len) + chance -= 30 // More than half the crew died? ew, let's calm down on antags + if (threat > 70) + chance += 15 + if (threat < 30) + chance -= 15 + return round(max(0,chance)) + +/// Removes type from the list +/datum/game_mode/dynamic/proc/remove_from_list(list/type_list, type) + for(var/I in type_list) + if(istype(I, type)) + type_list -= I + return type_list + +/// Checks if a type in blocking_list is in rule_list. +/datum/game_mode/dynamic/proc/check_blocking(list/blocking_list, list/rule_list) + if(blocking_list.len > 0) + for(var/blocking in blocking_list) + for(var/datum/executed in rule_list) + if(blocking == executed.type) + return TRUE + return FALSE + +/// Checks if client age is age or older. +/datum/game_mode/dynamic/proc/check_age(client/C, age) + enemy_minimum_age = age + if(get_remaining_days(C) == 0) + enemy_minimum_age = initial(enemy_minimum_age) + return TRUE // Available in 0 days = available right now = player is old enough to play. + enemy_minimum_age = initial(enemy_minimum_age) + return FALSE + +/datum/game_mode/dynamic/make_antag_chance(mob/living/carbon/human/newPlayer) + if (GLOB.dynamic_forced_extended) + return + if(EMERGENCY_ESCAPED_OR_ENDGAMED) // No more rules after the shuttle has left + return + + update_playercounts() + + if (forced_latejoin_rule) + forced_latejoin_rule.candidates = list(newPlayer) + forced_latejoin_rule.trim_candidates() + log_game("DYNAMIC: Forcing ruleset [forced_latejoin_rule]") + if (forced_latejoin_rule.ready(TRUE)) + picking_midround_latejoin_rule(list(forced_latejoin_rule), forced = TRUE) + forced_latejoin_rule = null + + else if (latejoin_injection_cooldown < world.time && prob(get_injection_chance())) + var/list/drafted_rules = list() + for (var/datum/dynamic_ruleset/latejoin/rule in latejoin_rules) + if (rule.acceptable(current_players[CURRENT_LIVING_PLAYERS].len, threat_level) && threat >= rule.cost) + // Classic secret : only autotraitor/minor roles + if (GLOB.dynamic_classic_secret && !((rule.flags & TRAITOR_RULESET) || (rule.flags & MINOR_RULESET))) + continue + // No stacking : only one round-enter, unless > stacking_limit threat. + if (threat < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking) + if(rule.flags & HIGHLANDER_RULESET && highlander_executed) + continue + + rule.candidates = list(newPlayer) + rule.trim_candidates() + if (rule.ready()) + drafted_rules[rule] = rule.get_weight() + + if (drafted_rules.len > 0 && picking_midround_latejoin_rule(drafted_rules)) + var/latejoin_injection_cooldown_middle = 0.5*(GLOB.dynamic_latejoin_delay_max + GLOB.dynamic_latejoin_delay_min) + latejoin_injection_cooldown = round(CLAMP(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), GLOB.dynamic_latejoin_delay_min, GLOB.dynamic_latejoin_delay_max)) + world.time + +/// Refund threat, but no more than threat_level. +/datum/game_mode/dynamic/proc/refund_threat(regain) + threat = min(threat_level,threat+regain) + +/// Generate threat and increase the threat_level if it goes beyond, capped at 100 +/datum/game_mode/dynamic/proc/create_threat(gain) + threat = min(100, threat+gain) + if(threat > threat_level) + threat_level = threat + +/// Expend threat, can't fall under 0. +/datum/game_mode/dynamic/proc/spend_threat(cost) + threat = max(threat-cost,0) + +/// Turns the value generated by lorentz distribution to threat value between 0 and 100. +/datum/game_mode/dynamic/proc/lorentz_to_threat(x) + switch (x) + if (-INFINITY to -20) + return rand(0, 10) + if (-20 to -10) + return RULE_OF_THREE(-40, -20, x) + 50 + if (-10 to -5) + return RULE_OF_THREE(-30, -10, x) + 50 + if (-5 to -2.5) + return RULE_OF_THREE(-20, -5, x) + 50 + if (-2.5 to -0) + return RULE_OF_THREE(-10, -2.5, x) + 50 + if (0 to 2.5) + return RULE_OF_THREE(10, 2.5, x) + 50 + if (2.5 to 5) + return RULE_OF_THREE(20, 5, x) + 50 + if (5 to 10) + return RULE_OF_THREE(30, 10, x) + 50 + if (10 to 20) + return RULE_OF_THREE(40, 20, x) + 50 + if (20 to INFINITY) + return rand(90, 100) diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets.dm b/code/game/gamemodes/dynamic/dynamic_rulesets.dm new file mode 100644 index 0000000000..66afcbfb92 --- /dev/null +++ b/code/game/gamemodes/dynamic/dynamic_rulesets.dm @@ -0,0 +1,211 @@ +/datum/dynamic_ruleset + /// For admin logging and round end screen. + var/name = "" + /// For admin logging and round end screen, do not change this unless making a new rule type. + var/ruletype = "" + /// If set to TRUE, the rule won't be discarded after being executed, and dynamic will call rule_process() every time it ticks. + var/persistent = FALSE + /// If set to TRUE, dynamic mode will be able to draft this ruleset again later on. (doesn't apply for roundstart rules) + var/repeatable = FALSE + /// If set higher than 0 decreases weight by itself causing the ruleset to appear less often the more it is repeated. + var/repeatable_weight_decrease = 2 + /// List of players that are being drafted for this rule + var/list/mob/candidates = list() + /// List of players that were selected for this rule + var/list/datum/mind/assigned = list() + /// Preferences flag such as ROLE_WIZARD that need to be turned on for players to be antag + var/antag_flag = null + /// The antagonist datum that is assigned to the mobs mind on ruleset execution. + var/datum/antagonist/antag_datum = null + /// The required minimum account age for this ruleset. + var/minimum_required_age = 7 + /// If set, and config flag protect_roles_from_antagonist is false, then the rule will not pick players from these roles. + var/list/protected_roles = list() + /// If set, rule will deny candidates from those roles always. + var/list/restricted_roles = list() + /// If set, rule will only accept candidates from those roles, IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS. + var/list/exclusive_roles = list() + /// If set, there needs to be a certain amount of players doing those roles (among the players who won't be drafted) for the rule to be drafted IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS. + var/list/enemy_roles = list() + /// If enemy_roles was set, this is the amount of enemy job workers needed per threat_level range (0-10,10-20,etc) IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS. + var/required_enemies = list(1,1,0,0,0,0,0,0,0,0) + /// The rule needs this many candidates (post-trimming) to be executed (example: Cult needs 4 players at round start) + var/required_candidates = 0 + /// 1 -> 9, probability for this rule to be picked against other rules + var/weight = 5 + /// Threat cost for this rule, this is decreased from the mode's threat when the rule is executed. + var/cost = 0 + /// 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 + /// 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. + /// With the default values, The rule will never get drafted below 10 threat level (aka: "peaceful extended"), and it requires a higher threat level at lower pops. + var/list/requirements = list(40,30,20,10,10,10,10,10,10,10) + /// An alternative, static requirement used instead when pop is over mode's high_pop_limit. + var/high_population_requirement = 10 + /// Reference to the mode, use this instead of SSticker.mode. + var/datum/game_mode/dynamic/mode = null + /// If a role is to be considered another for the purpose of banning. + var/antag_flag_override = null + /// If a ruleset type which is in this list has been executed, then the ruleset will not be executed. + var/list/blocking_rules = list() + /// The minimum amount of players required for the rule to be considered. + var/minimum_players = 0 + /// The maximum amount of players required for the rule to be considered. + /// Anything below zero or exactly zero is ignored. + var/maximum_players = 0 + + +/datum/dynamic_ruleset/New() + ..() + if(CONFIG_GET(flag/protect_roles_from_antagonist)) + restricted_roles += protected_roles + if(CONFIG_GET(flag/protect_assistant_from_antagonist)) + restricted_roles += "Assistant" + + if (istype(SSticker.mode, /datum/game_mode/dynamic)) + mode = SSticker.mode + else if (GLOB.master_mode != "dynamic") // This is here to make roundstart forced ruleset function. + qdel(src) + +/datum/dynamic_ruleset/roundstart // One or more of those drafted at roundstart + ruletype = "Roundstart" + +/datum/dynamic_ruleset/roundstart/delayed/ // Executed with a 30 seconds delay + var/delay = 30 SECONDS + var/required_type = /mob/living/carbon/human // No ghosts, new players or silicons allowed. + +// Can be drafted when a player joins the server +/datum/dynamic_ruleset/latejoin + ruletype = "Latejoin" + +/// By default, a rule is acceptable if it satisfies the threat level/population requirements. +/// If your rule has extra checks, such as counting security officers, do that in ready() instead +/datum/dynamic_ruleset/proc/acceptable(population = 0, threat_level = 0) + if(minimum_players > population) + return FALSE + if(maximum_players > 0 && population > maximum_players) + return FALSE + if (population >= GLOB.dynamic_high_pop_limit) + return (threat_level >= high_population_requirement) + else + pop_per_requirement = pop_per_requirement > 0 ? pop_per_requirement : mode.pop_per_requirement + var/indice_pop = min(10,round(population/pop_per_requirement)+1) + return (threat_level >= requirements[indice_pop]) + +/// This is called if persistent variable is true everytime SSTicker ticks. +/datum/dynamic_ruleset/proc/rule_process() + return + +/// Called on game mode pre_setup, used for non-delayed roundstart rulesets only. +/// Do everything you need to do before job is assigned here. +/// IMPORTANT: ASSIGN special_role HERE +/datum/dynamic_ruleset/proc/pre_execute() + return TRUE + +/// Called on post_setup on roundstart and when the rule executes on midround and latejoin. +/// Give your candidates or assignees equipment and antag datum here. +/datum/dynamic_ruleset/proc/execute() + for(var/datum/mind/M in assigned) + M.add_antag_datum(antag_datum) + return TRUE + +/// Called after delay set in ruleset. +/// Give your candidates or assignees equipment and antag datum here. +/datum/dynamic_ruleset/roundstart/delayed/execute() + if (SSticker && SSticker.current_state < GAME_STATE_PLAYING) + CRASH("The delayed ruleset [name] executed before the round started.") + +/// Here you can perform any additional checks you want. (such as checking the map etc) +/// Remember that on roundstart no one knows what their job is at this point. +/// IMPORTANT: If ready() returns TRUE, that means pre_execute() or execute() should never fail! +/datum/dynamic_ruleset/proc/ready(forced = 0) + if (required_candidates > candidates.len) + return FALSE + return TRUE + +/// Gets weight of the ruleset +/// Note that this decreases weight if repeatable is TRUE and repeatable_weight_decrease is higher than 0 +/// Note: If you don't want repeatable rulesets to decrease their weight use the weight variable directly +/datum/dynamic_ruleset/proc/get_weight() + if(repeatable && weight > 1 && repeatable_weight_decrease > 0) + for(var/datum/dynamic_ruleset/DR in mode.executed_rules) + if(istype(DR, type)) + weight = max(weight-repeatable_weight_decrease,1) + return weight + +/// Here you can remove candidates that do not meet your requirements. +/// This means if their job is not correct or they have disconnected you can remove them from candidates here. +/// Usually this does not need to be changed unless you need some specific requirements from your candidates. +/datum/dynamic_ruleset/proc/trim_candidates() + return + +/// Counts how many players are ready at roundstart. +/// Used only by non-delayed roundstart rulesets. +/datum/dynamic_ruleset/proc/num_players() + . = 0 + for(var/mob/dead/new_player/P in GLOB.player_list) + if(P.client && P.ready == PLAYER_READY_TO_PLAY) + . ++ + +/// Set mode result and news report here. +/// Only called if ruleset is flagged as HIGHLANDER_RULESET +/datum/dynamic_ruleset/proc/round_result() + +/// Checks if round is finished, return true to end the round. +/// Only called if ruleset is flagged as HIGHLANDER_RULESET +/datum/dynamic_ruleset/proc/check_finished() + return FALSE + +////////////////////////////////////////////// +// // +// ROUNDSTART RULESETS // +// // +////////////////////////////////////////////// + +/// Checks if candidates are connected and if they are banned or don't want to be the antagonist. +/datum/dynamic_ruleset/roundstart/trim_candidates() + for(var/mob/dead/new_player/P in candidates) + if (!P.client || !P.mind) // Are they connected? + candidates.Remove(P) + continue + if(!mode.check_age(P.client, minimum_required_age)) + candidates.Remove(P) + continue + if(P.mind.special_role) // We really don't want to give antag to an antag. + candidates.Remove(P) + continue + if (!(antag_flag in P.client.prefs.be_special) || jobban_isbanned(P.ckey, list(antag_flag, ROLE_SYNDICATE)) || (antag_flag_override && jobban_isbanned(P.ckey, list(antag_flag_override, ROLE_SYNDICATE))))//are they willing and not antag-banned? + candidates.Remove(P) + continue + +/// Checks if candidates are required mob type, connected, banned and if the job is exclusive to the role. +/datum/dynamic_ruleset/roundstart/delayed/trim_candidates() + . = ..() + for (var/mob/P in candidates) + if (!istype(P, required_type)) + candidates.Remove(P) // Can be a new_player, etc. + continue + if(!mode.check_age(P.client, minimum_required_age)) + candidates.Remove(P) + continue + if (!P.client || !P.mind || !P.mind.assigned_role) // Are they connected? + candidates.Remove(P) + continue + if(P.mind.special_role || P.mind.antag_datums?.len > 0) // Are they an antag already? + candidates.Remove(P) + continue + if (!(antag_flag in P.client.prefs.be_special) || jobban_isbanned(P.ckey, list(antag_flag, ROLE_SYNDICATE)) || (antag_flag_override && jobban_isbanned(P.ckey, list(antag_flag_override, ROLE_SYNDICATE))))//are they willing and not antag-banned? + candidates.Remove(P) + continue + if ((exclusive_roles.len > 0) && !(P.mind.assigned_role in exclusive_roles)) // Is the rule exclusive to their job? + candidates.Remove(P) + continue + +/// Do your checks if the ruleset is ready to be executed here. +/// Should ignore certain checks if forced is TRUE +/datum/dynamic_ruleset/roundstart/ready(forced = FALSE) + return ..() diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm new file mode 100644 index 0000000000..24b4c67357 --- /dev/null +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm @@ -0,0 +1,110 @@ +////////////////////////////////////////////// +// // +// LATEJOIN RULESETS // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/latejoin/trim_candidates() + for(var/mob/P in candidates) + if (!P.client || !P.mind || !P.mind.assigned_role) // Are they connected? + candidates.Remove(P) + continue + if(!mode.check_age(P.client, minimum_required_age)) + candidates.Remove(P) + continue + if (!(antag_flag in P.client.prefs.be_special) || jobban_isbanned(P.ckey, list(antag_flag, ROLE_SYNDICATE)) || (antag_flag_override && jobban_isbanned(P.ckey, list(antag_flag_override))))//are they willing and not antag-banned? + candidates.Remove(P) + continue + if (P.mind.assigned_role in restricted_roles) // Does their job allow for it? + candidates.Remove(P) + continue + if ((exclusive_roles.len > 0) && !(P.mind.assigned_role in exclusive_roles)) // Is the rule exclusive to their job? + candidates.Remove(P) + continue + +/datum/dynamic_ruleset/latejoin/ready(forced = 0) + if (!forced) + var/job_check = 0 + if (enemy_roles.len > 0) + for (var/mob/M in mode.current_players[CURRENT_LIVING_PLAYERS]) + if (M.stat == DEAD) + continue // Dead players cannot count as opponents + if (M.mind && M.mind.assigned_role && (M.mind.assigned_role in enemy_roles) && (!(M in candidates) || (M.mind.assigned_role in restricted_roles))) + job_check++ // Checking for "enemies" (such as sec officers). To be counters, they must either not be candidates to that rule, or have a job that restricts them from it + + var/threat = round(mode.threat_level/10) + if (job_check < required_enemies[threat]) + return FALSE + return ..() + +/datum/dynamic_ruleset/latejoin/execute() + var/mob/M = pick(candidates) + assigned += M.mind + M.mind.special_role = antag_flag + M.mind.add_antag_datum(antag_datum) + return TRUE + +////////////////////////////////////////////// +// // +// SYNDICATE TRAITORS // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/latejoin/infiltrator + name = "Syndicate Infiltrator" + antag_datum = /datum/antagonist/traitor + antag_flag = ROLE_TRAITOR + restricted_roles = list("AI", "Cyborg") + protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") + required_candidates = 1 + weight = 7 + cost = 5 + requirements = list(40,30,20,10,10,10,10,10,10,10) + high_population_requirement = 10 + repeatable = TRUE + flags = TRAITOR_RULESET + +////////////////////////////////////////////// +// // +// REVOLUTIONARY PROVOCATEUR // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/latejoin/provocateur + name = "Provocateur" + antag_datum = /datum/antagonist/rev/head + antag_flag = ROLE_REV_HEAD + antag_flag_override = ROLE_REV + restricted_roles = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") + enemy_roles = list("AI", "Cyborg", "Security Officer","Detective","Head of Security", "Captain", "Warden") + required_enemies = list(2,2,1,1,1,1,1,0,0,0) + required_candidates = 1 + weight = 2 + cost = 20 + requirements = list(101,101,70,40,30,20,20,20,20,20) + high_population_requirement = 50 + flags = HIGHLANDER_RULESET + var/required_heads = 3 + +/datum/dynamic_ruleset/latejoin/provocateur/ready(forced=FALSE) + if (forced) + required_heads = 1 + if(!..()) + return FALSE + var/head_check = 0 + for(var/mob/player in mode.current_players[CURRENT_LIVING_PLAYERS]) + if (player.mind.assigned_role in GLOB.command_positions) + head_check++ + return (head_check >= required_heads) + +/datum/dynamic_ruleset/latejoin/provocateur/execute() + var/mob/M = pick(candidates) + assigned += M.mind + M.mind.special_role = antag_flag + var/datum/antagonist/rev/head/new_head = new() + new_head.give_flash = TRUE + new_head.give_hud = TRUE + new_head.remove_clumsy = TRUE + new_head = M.mind.add_antag_datum(new_head) + new_head.rev_team.max_headrevs = 1 // Only one revhead if it is latejoin. + return TRUE diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm new file mode 100644 index 0000000000..2acef4f06b --- /dev/null +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm @@ -0,0 +1,460 @@ +////////////////////////////////////////////// +// // +// MIDROUND RULESETS // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/midround // Can be drafted once in a while during a round + ruletype = "Midround" + /// If the ruleset should be restricted from ghost roles. + var/restrict_ghost_roles = TRUE + /// What type the ruleset is restricted to. + var/required_type = /mob/living/carbon/human + var/list/living_players = list() + var/list/living_antags = list() + var/list/dead_players = list() + var/list/list_observers = list() + +/datum/dynamic_ruleset/midround/from_ghosts + weight = 0 + /// Whether the ruleset should call generate_ruleset_body or not. + var/makeBody = TRUE + +/datum/dynamic_ruleset/midround/trim_candidates() + // Unlike the previous two types, these rulesets are not meant for /mob/dead/new_player + // And since I want those rulesets to be as flexible as possible, I'm not gonna put much here, + // + // All you need to know is that here, the candidates list contains 4 lists itself, indexed with the following defines: + // Candidates = list(CURRENT_LIVING_PLAYERS, CURRENT_LIVING_ANTAGS, CURRENT_DEAD_PLAYERS, CURRENT_OBSERVERS) + // So for example you can get the list of all current dead players with var/list/dead_players = candidates[CURRENT_DEAD_PLAYERS] + // Make sure to properly typecheck the mobs in those lists, as the dead_players list could contain ghosts, or dead players still in their bodies. + // We're still gonna trim the obvious (mobs without clients, jobbanned players, etc) + living_players = trim_list(mode.current_players[CURRENT_LIVING_PLAYERS]) + living_antags = trim_list(mode.current_players[CURRENT_LIVING_ANTAGS]) + dead_players = trim_list(mode.current_players[CURRENT_DEAD_PLAYERS]) + list_observers = trim_list(mode.current_players[CURRENT_OBSERVERS]) + +/datum/dynamic_ruleset/midround/proc/trim_list(list/L = list()) + var/list/trimmed_list = L.Copy() + var/antag_name = initial(antag_flag) + for(var/mob/M in trimmed_list) + if (!istype(M, required_type)) + trimmed_list.Remove(M) + continue + if (!M.client) // Are they connected? + trimmed_list.Remove(M) + continue + if(!mode.check_age(M.client, minimum_required_age)) + trimmed_list.Remove(M) + continue + if (!(antag_name in M.client.prefs.be_special) || jobban_isbanned(M.ckey, list(antag_name, ROLE_SYNDICATE)))//are they willing and not antag-banned? + trimmed_list.Remove(M) + continue + if (M.mind) + if (restrict_ghost_roles && M.mind.assigned_role in GLOB.exp_specialmap[EXP_TYPE_SPECIAL]) // Are they playing a ghost role? + trimmed_list.Remove(M) + continue + if (M.mind.assigned_role in restricted_roles || HAS_TRAIT(M, TRAIT_MINDSHIELD)) // Does their job allow it or are they mindshielded? + trimmed_list.Remove(M) + continue + if ((exclusive_roles.len > 0) && !(M.mind.assigned_role in exclusive_roles)) // Is the rule exclusive to their job? + trimmed_list.Remove(M) + continue + return trimmed_list + +// You can then for example prompt dead players in execute() to join as strike teams or whatever +// Or autotator someone + +// IMPORTANT, since /datum/dynamic_ruleset/midround may accept candidates from both living, dead, and even antag players, you need to manually check whether there are enough candidates +// (see /datum/dynamic_ruleset/midround/autotraitor/ready(var/forced = FALSE) for example) +/datum/dynamic_ruleset/midround/ready(forced = FALSE) + if (!forced) + var/job_check = 0 + if (enemy_roles.len > 0) + for (var/mob/M in living_players) + if (M.stat == DEAD) + continue // Dead players cannot count as opponents + if (M.mind && M.mind.assigned_role && (M.mind.assigned_role in enemy_roles) && (!(M in candidates) || (M.mind.assigned_role in restricted_roles))) + job_check++ // Checking for "enemies" (such as sec officers). To be counters, they must either not be candidates to that rule, or have a job that restricts them from it + + var/threat = round(mode.threat_level/10) + if (job_check < required_enemies[threat]) + return FALSE + return TRUE + +/datum/dynamic_ruleset/midround/from_ghosts/execute() + var/list/possible_candidates = list() + possible_candidates.Add(dead_players) + possible_candidates.Add(list_observers) + send_applications(possible_candidates) + if(assigned.len > 0) + return TRUE + else + return FALSE + +/// This sends a poll to ghosts if they want to be a ghost spawn from a ruleset. +/datum/dynamic_ruleset/midround/from_ghosts/proc/send_applications(list/possible_volunteers = list()) + if (possible_volunteers.len <= 0) // This shouldn't happen, as ready() should return FALSE if there is not a single valid candidate + message_admins("Possible volunteers was 0. This shouldn't appear, because of ready(), unless you forced it!") + return + message_admins("Polling [possible_volunteers.len] players to apply for the [name] ruleset.") + log_game("DYNAMIC: Polling [possible_volunteers.len] players to apply for the [name] ruleset.") + + candidates = pollGhostCandidates("The mode is looking for volunteers to become [antag_flag] for [name]", antag_flag, SSticker.mode, antag_flag, poll_time = 300) + + if(!candidates || candidates.len <= 0) + message_admins("The ruleset [name] received no applications.") + log_game("DYNAMIC: The ruleset [name] received no applications.") + mode.refund_threat(cost) + mode.threat_log += "[worldtime2text()]: Rule [name] refunded [cost] (no applications)" + mode.executed_rules -= src + return + + message_admins("[candidates.len] players volunteered for the ruleset [name].") + log_game("DYNAMIC: [candidates.len] players volunteered for [name].") + review_applications() + +/// Here is where you can check if your ghost applicants are valid for the ruleset. +/// Called by send_applications(). +/datum/dynamic_ruleset/midround/from_ghosts/proc/review_applications() + for (var/i = 1, i <= required_candidates, i++) + if(candidates.len <= 0) + if(i == 1) + // We have found no candidates so far and we are out of applicants. + mode.refund_threat(cost) + mode.threat_log += "[worldtime2text()]: Rule [name] refunded [cost] (all applications invalid)" + mode.executed_rules -= src + break + var/mob/applicant = pick(candidates) + candidates -= applicant + if(!isobserver(applicant)) + if(applicant.stat == DEAD) // Not an observer? If they're dead, make them one. + applicant = applicant.ghostize(FALSE) + else // Not dead? Disregard them, pick a new applicant + i-- + continue + + if(!applicant) + i-- + continue + + var/mob/new_character = applicant + + if (makeBody) + new_character = generate_ruleset_body(applicant) + + finish_setup(new_character, i) + assigned += applicant + notify_ghosts("[new_character] has been picked for the ruleset [name]!", source = new_character, action = NOTIFY_ORBIT, header="Something Interesting!") + +/datum/dynamic_ruleset/midround/from_ghosts/proc/generate_ruleset_body(mob/applicant) + var/mob/living/carbon/human/new_character = makeBody(applicant) + new_character.dna.remove_all_mutations() + return new_character + +/datum/dynamic_ruleset/midround/from_ghosts/proc/finish_setup(mob/new_character, index) + var/datum/antagonist/new_role = new antag_datum() + setup_role(new_role) + new_character.mind.add_antag_datum(new_role) + new_character.mind.special_role = antag_flag + +/datum/dynamic_ruleset/midround/from_ghosts/proc/setup_role(datum/antagonist/new_role) + return + +////////////////////////////////////////////// +// // +// SYNDICATE TRAITORS // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/midround/autotraitor + name = "Syndicate Sleeper Agent" + antag_datum = /datum/antagonist/traitor + antag_flag = ROLE_TRAITOR + restricted_roles = list("AI", "Cyborg", "Positronic Brain") + protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") + required_candidates = 1 + weight = 7 + cost = 10 + requirements = list(50,40,30,20,10,10,10,10,10,10) + repeatable = TRUE + high_population_requirement = 10 + flags = TRAITOR_RULESET + +/datum/dynamic_ruleset/midround/autotraitor/acceptable(population = 0, threat = 0) + var/player_count = mode.current_players[CURRENT_LIVING_PLAYERS].len + var/antag_count = mode.current_players[CURRENT_LIVING_ANTAGS].len + var/max_traitors = round(player_count / 10) + 1 + if ((antag_count < max_traitors) && prob(mode.threat_level))//adding traitors if the antag population is getting low + return ..() + else + return FALSE + +/datum/dynamic_ruleset/midround/autotraitor/trim_candidates() + ..() + for(var/mob/living/player in living_players) + if(issilicon(player)) // Your assigned role doesn't change when you are turned into a silicon. + living_players -= player + continue + if(is_centcom_level(player.z)) + living_players -= player // We don't autotator people in CentCom + continue + if(player.mind && (player.mind.special_role || player.mind.antag_datums?.len > 0)) + living_players -= player // We don't autotator people with roles already + +/datum/dynamic_ruleset/midround/autotraitor/ready(forced = FALSE) + if (required_candidates > living_players.len) + return FALSE + return ..() + +/datum/dynamic_ruleset/midround/autotraitor/execute() + var/mob/M = pick(living_players) + assigned += M + living_players -= M + var/datum/antagonist/traitor/newTraitor = new + M.mind.add_antag_datum(newTraitor) + return TRUE + + +////////////////////////////////////////////// +// // +// Malfunctioning AI // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/midround/malf + name = "Malfunctioning AI" + antag_datum = /datum/antagonist/traitor + antag_flag = ROLE_MALF + enemy_roles = list("Security Officer", "Warden","Detective","Head of Security", "Captain", "Scientist", "Chemist", "Research Director", "Chief Engineer") + exclusive_roles = list("AI") + required_enemies = list(4,4,4,4,4,4,2,2,2,0) + required_candidates = 1 + weight = 3 + cost = 35 + requirements = list(101,101,80,70,60,60,50,50,40,40) + high_population_requirement = 35 + required_type = /mob/living/silicon/ai + var/ion_announce = 33 + var/removeDontImproveChance = 10 + +/datum/dynamic_ruleset/midround/malf/trim_candidates() + ..() + candidates = candidates[CURRENT_LIVING_PLAYERS] + for(var/mob/living/player in candidates) + if(!isAI(player)) + candidates -= player + continue + if(is_centcom_level(player.z)) + candidates -= player + continue + if(player.mind && (player.mind.special_role || player.mind.antag_datums?.len > 0)) + candidates -= player + +/datum/dynamic_ruleset/midround/malf/execute() + if(!candidates || !candidates.len) + return FALSE + var/mob/living/silicon/ai/M = pick(candidates) + candidates -= M + assigned += M.mind + var/datum/antagonist/traitor/AI = new + M.mind.special_role = antag_flag + M.mind.add_antag_datum(AI) + if(prob(ion_announce)) + priority_announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", 'sound/ai/ionstorm.ogg') + if(prob(removeDontImproveChance)) + M.replace_random_law(generate_ion_law(), list(LAW_INHERENT, LAW_SUPPLIED, LAW_ION)) + else + M.add_ion_law(generate_ion_law()) + return TRUE + +////////////////////////////////////////////// +// // +// WIZARD (GHOST) // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/midround/from_ghosts/wizard + name = "Wizard" + antag_datum = /datum/antagonist/wizard + antag_flag = ROLE_WIZARD + enemy_roles = list("Security Officer","Detective","Head of Security", "Captain") + required_enemies = list(2,2,1,1,1,1,1,0,0,0) + required_candidates = 1 + weight = 1 + cost = 20 + requirements = list(90,90,70,40,30,20,10,10,10,10) + high_population_requirement = 50 + repeatable = TRUE + +/datum/dynamic_ruleset/midround/from_ghosts/wizard/ready(forced = FALSE) + if (required_candidates > (dead_players.len + list_observers.len)) + return FALSE + if(GLOB.wizardstart.len == 0) + log_admin("Cannot accept Wizard ruleset. Couldn't find any wizard spawn points.") + message_admins("Cannot accept Wizard ruleset. Couldn't find any wizard spawn points.") + return FALSE + return ..() + +/datum/dynamic_ruleset/midround/from_ghosts/wizard/finish_setup(mob/new_character, index) + ..() + new_character.forceMove(pick(GLOB.wizardstart)) + +////////////////////////////////////////////// +// // +// NUCLEAR OPERATIVES (MIDROUND) // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/midround/from_ghosts/nuclear + name = "Nuclear Assault" + antag_flag = ROLE_OPERATIVE + antag_datum = /datum/antagonist/nukeop + enemy_roles = list("AI", "Cyborg", "Security Officer", "Warden","Detective","Head of Security", "Captain") + required_enemies = list(3,3,3,3,3,2,1,1,0,0) + required_candidates = 5 + weight = 5 + cost = 35 + requirements = list(90,90,90,80,60,40,30,20,10,10) + high_population_requirement = 10 + var/operative_cap = list(2,2,3,3,4,5,5,5,5,5) + var/datum/team/nuclear/nuke_team + flags = HIGHLANDER_RULESET + +/datum/dynamic_ruleset/midround/from_ghosts/nuclear/acceptable(population=0, threat=0) + if (locate(/datum/dynamic_ruleset/roundstart/nuclear) in mode.executed_rules) + return FALSE // Unavailable if nuke ops were already sent at roundstart + var/indice_pop = min(10,round(living_players.len/5)+1) + required_candidates = operative_cap[indice_pop] + return ..() + +/datum/dynamic_ruleset/midround/from_ghosts/nuclear/ready(forced = FALSE) + if (required_candidates > (dead_players.len + list_observers.len)) + return FALSE + return ..() + +/datum/dynamic_ruleset/midround/from_ghosts/nuclear/finish_setup(mob/new_character, index) + new_character.mind.special_role = "Nuclear Operative" + new_character.mind.assigned_role = "Nuclear Operative" + if (index == 1) // Our first guy is the leader + var/datum/antagonist/nukeop/leader/new_role = new + nuke_team = new_role.nuke_team + new_character.mind.add_antag_datum(new_role) + else + return ..() + +////////////////////////////////////////////// +// // +// BLOB (GHOST) // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/midround/from_ghosts/blob + name = "Blob" + antag_datum = /datum/antagonist/blob + antag_flag = ROLE_BLOB + enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain") + required_enemies = list(2,2,1,1,1,1,1,0,0,0) + required_candidates = 1 + weight = 4 + cost = 10 + requirements = list(101,101,101,80,60,50,30,20,10,10) + high_population_requirement = 50 + repeatable = TRUE + +/datum/dynamic_ruleset/midround/from_ghosts/blob/generate_ruleset_body(mob/applicant) + var/body = applicant.become_overmind() + return body + +////////////////////////////////////////////// +// // +// XENOMORPH (GHOST) // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/midround/from_ghosts/xenomorph + name = "Alien Infestation" + antag_datum = /datum/antagonist/xeno + antag_flag = ROLE_ALIEN + enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain") + required_enemies = list(2,2,1,1,1,1,1,0,0,0) + required_candidates = 1 + weight = 3 + cost = 10 + requirements = list(101,101,101,70,50,40,20,15,10,10) + high_population_requirement = 50 + repeatable = TRUE + var/list/vents = list() + +/datum/dynamic_ruleset/midround/from_ghosts/xenomorph/execute() + // 50% chance of being incremented by one + required_candidates += prob(50) + for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines) + if(QDELETED(temp_vent)) + continue + if(is_station_level(temp_vent.loc.z) && !temp_vent.welded) + var/datum/pipeline/temp_vent_parent = temp_vent.parents[1] + if(!temp_vent_parent) + continue // No parent vent + // Stops Aliens getting stuck in small networks. + // See: Security, Virology + if(temp_vent_parent.other_atmosmch.len > 20) + vents += temp_vent + if(!vents.len) + return FALSE + . = ..() + +/datum/dynamic_ruleset/midround/from_ghosts/xenomorph/generate_ruleset_body(mob/applicant) + var/obj/vent = pick_n_take(vents) + var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc) + new_xeno.key = applicant.key + message_admins("[ADMIN_LOOKUPFLW(new_xeno)] has been made into an alien by the midround ruleset.") + log_game("DYNAMIC: [key_name(new_xeno)] was spawned as an alien by the midround ruleset.") + return new_xeno + +////////////////////////////////////////////// +// // +// NIGHTMARE (GHOST) // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/midround/from_ghosts/nightmare + name = "Nightmare" + antag_datum = /datum/antagonist/nightmare + antag_flag = "Nightmare" + antag_flag_override = ROLE_ALIEN + enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain") + required_enemies = list(2,2,1,1,1,1,1,0,0,0) + required_candidates = 1 + weight = 3 + cost = 10 + requirements = list(101,101,101,70,50,40,20,15,10,10) + high_population_requirement = 50 + repeatable = TRUE + var/list/spawn_locs = list() + +/datum/dynamic_ruleset/midround/from_ghosts/nightmare/execute() + for(var/X in GLOB.xeno_spawn) + var/turf/T = X + var/light_amount = T.get_lumcount() + if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD) + spawn_locs += T + if(!spawn_locs.len) + return FALSE + . = ..() + +/datum/dynamic_ruleset/midround/from_ghosts/nightmare/generate_ruleset_body(mob/applicant) + var/datum/mind/player_mind = new /datum/mind(applicant.key) + player_mind.active = TRUE + + var/mob/living/carbon/human/S = new (pick(spawn_locs)) + player_mind.transfer_to(S) + player_mind.assigned_role = "Nightmare" + player_mind.special_role = "Nightmare" + player_mind.add_antag_datum(/datum/antagonist/nightmare) + S.set_species(/datum/species/shadow/nightmare) + + playsound(S, 'sound/magic/ethereal_exit.ogg', 50, 1, -1) + message_admins("[ADMIN_LOOKUPFLW(S)] has been made into a Nightmare by the midround ruleset.") + log_game("DYNAMIC: [key_name(S)] was spawned as a Nightmare by the midround ruleset.") + return S diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm new file mode 100644 index 0000000000..38ce6f68d0 --- /dev/null +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm @@ -0,0 +1,732 @@ + +////////////////////////////////////////////// +// // +// SYNDICATE TRAITORS // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/roundstart/traitor + name = "Traitors" + persistent = TRUE + antag_flag = ROLE_TRAITOR + antag_datum = /datum/antagonist/traitor/ + minimum_required_age = 0 + protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster", "Cyborg") + restricted_roles = list("Cyborg") + required_candidates = 1 + weight = 5 + cost = 10 + requirements = list(10,10,10,10,10,10,10,10,10,10) + high_population_requirement = 10 + var/autotraitor_cooldown = 450 // 15 minutes (ticks once per 2 sec) + +/datum/dynamic_ruleset/roundstart/traitor/pre_execute() + var/traitor_scaling_coeff = 10 - max(0,round(mode.threat_level/10)-5) // Above 50 threat level, coeff goes down by 1 for every 10 levels + var/num_traitors = min(round(mode.candidates.len / traitor_scaling_coeff) + 1, candidates.len) + for (var/i = 1 to num_traitors) + var/mob/M = pick(candidates) + candidates -= M + assigned += M.mind + M.mind.special_role = ROLE_TRAITOR + M.mind.restricted_roles = restricted_roles + return TRUE + +/datum/dynamic_ruleset/roundstart/traitor/rule_process() + if (autotraitor_cooldown > 0) + autotraitor_cooldown-- + else + autotraitor_cooldown = 450 // 15 minutes + message_admins("Checking if we can turn someone into a traitor.") + log_game("DYNAMIC: Checking if we can turn someone into a traitor.") + mode.picking_specific_rule(/datum/dynamic_ruleset/midround/autotraitor) + +////////////////////////////////////////// +// // +// BLOOD BROTHERS // +// // +////////////////////////////////////////// + +/datum/dynamic_ruleset/roundstart/traitorbro + name = "Blood Brothers" + antag_flag = ROLE_BROTHER + antag_datum = /datum/antagonist/brother/ + restricted_roles = list("AI", "Cyborg") + protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") + required_candidates = 2 + weight = 4 + cost = 10 + requirements = list(40,30,30,20,20,15,15,15,10,10) + high_population_requirement = 15 + var/list/datum/team/brother_team/pre_brother_teams = list() + var/const/team_amount = 2 // Hard limit on brother teams if scaling is turned off + var/const/min_team_size = 2 + +/datum/dynamic_ruleset/roundstart/traitorbro/pre_execute() + var/num_teams = team_amount + var/bsc = CONFIG_GET(number/brother_scaling_coeff) + if(bsc) + num_teams = max(1, round(num_players() / bsc)) + + for(var/j = 1 to num_teams) + if(candidates.len < min_team_size || candidates.len < required_candidates) + break + var/datum/team/brother_team/team = new + var/team_size = prob(10) ? min(3, candidates.len) : 2 + for(var/k = 1 to team_size) + var/mob/bro = pick(candidates) + candidates -= bro + assigned += bro.mind + team.add_member(bro.mind) + bro.mind.special_role = "brother" + bro.mind.restricted_roles = restricted_roles + pre_brother_teams += team + return TRUE + +/datum/dynamic_ruleset/roundstart/traitorbro/execute() + for(var/datum/team/brother_team/team in pre_brother_teams) + team.pick_meeting_area() + team.forge_brother_objectives() + for(var/datum/mind/M in team.members) + M.add_antag_datum(/datum/antagonist/brother, team) + team.update_name() + mode.brother_teams += pre_brother_teams + return TRUE + +////////////////////////////////////////////// +// // +// CHANGELINGS // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/roundstart/changeling + name = "Changelings" + antag_flag = ROLE_CHANGELING + antag_datum = /datum/antagonist/changeling + restricted_roles = list("AI", "Cyborg") + protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") + required_candidates = 1 + weight = 3 + cost = 30 + requirements = list(80,70,60,50,40,20,20,10,10,10) + high_population_requirement = 10 + var/team_mode_probability = 30 + +/datum/dynamic_ruleset/roundstart/changeling/pre_execute() + var/num_changelings = min(round(mode.candidates.len / 10) + 1, candidates.len) + for (var/i = 1 to num_changelings) + var/mob/M = pick(candidates) + candidates -= M + assigned += M.mind + M.mind.restricted_roles = restricted_roles + M.mind.special_role = ROLE_CHANGELING + return TRUE + +/datum/dynamic_ruleset/roundstart/changeling/execute() + var/team_mode = FALSE + if(prob(team_mode_probability)) + team_mode = TRUE + var/list/team_objectives = subtypesof(/datum/objective/changeling_team_objective) + var/list/possible_team_objectives = list() + for(var/T in team_objectives) + var/datum/objective/changeling_team_objective/CTO = T + if(assigned.len >= initial(CTO.min_lings)) + possible_team_objectives += T + + if(possible_team_objectives.len && prob(20*assigned.len)) + GLOB.changeling_team_objective_type = pick(possible_team_objectives) + for(var/datum/mind/changeling in assigned) + var/datum/antagonist/changeling/new_antag = new antag_datum() + new_antag.team_mode = team_mode + changeling.add_antag_datum(new_antag) + return TRUE + +////////////////////////////////////////////// +// // +// WIZARDS // +// // +////////////////////////////////////////////// + +// Dynamic is a wonderful thing that adds wizards to every round and then adds even more wizards during the round. +/datum/dynamic_ruleset/roundstart/wizard + name = "Wizard" + antag_flag = ROLE_WIZARD + antag_datum = /datum/antagonist/wizard + minimum_required_age = 14 + restricted_roles = list("Head of Security", "Captain") // Just to be sure that a wizard getting picked won't ever imply a Captain or HoS not getting drafted + required_candidates = 1 + weight = 1 + cost = 30 + requirements = list(90,90,70,40,30,20,10,10,10,10) + high_population_requirement = 10 + var/list/roundstart_wizards = list() + +/datum/dynamic_ruleset/roundstart/wizard/acceptable(population=0, threat=0) + if(GLOB.wizardstart.len == 0) + log_admin("Cannot accept Wizard ruleset. Couldn't find any wizard spawn points.") + message_admins("Cannot accept Wizard ruleset. Couldn't find any wizard spawn points.") + return FALSE + return ..() + +/datum/dynamic_ruleset/roundstart/wizard/pre_execute() + if(GLOB.wizardstart.len == 0) + return FALSE + + var/mob/M = pick(candidates) + if (M) + candidates -= M + assigned += M.mind + M.mind.assigned_role = ROLE_WIZARD + M.mind.special_role = ROLE_WIZARD + + return TRUE + +/datum/dynamic_ruleset/roundstart/wizard/execute() + for(var/datum/mind/M in assigned) + M.current.forceMove(pick(GLOB.wizardstart)) + M.add_antag_datum(new antag_datum()) + return TRUE + +////////////////////////////////////////////// +// // +// BLOOD CULT // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/roundstart/bloodcult + name = "Blood Cult" + antag_flag = ROLE_CULTIST + antag_datum = /datum/antagonist/cult + minimum_required_age = 14 + restricted_roles = list("AI", "Cyborg") + protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") + required_candidates = 2 + weight = 3 + cost = 30 + requirements = list(100,90,80,60,40,30,10,10,10,10) + high_population_requirement = 10 + pop_per_requirement = 5 + flags = HIGHLANDER_RULESET + var/cultist_cap = list(2,2,2,3,3,4,4,4,4,4) + var/datum/team/cult/main_cult + +/datum/dynamic_ruleset/roundstart/bloodcult/ready(forced = FALSE) + var/indice_pop = min(10,round(mode.roundstart_pop_ready/pop_per_requirement)+1) + required_candidates = cultist_cap[indice_pop] + . = ..() + +/datum/dynamic_ruleset/roundstart/bloodcult/pre_execute() + var/indice_pop = min(10,round(mode.roundstart_pop_ready/pop_per_requirement)+1) + var/cultists = cultist_cap[indice_pop] + for(var/cultists_number = 1 to cultists) + if(candidates.len <= 0) + break + var/mob/M = pick(candidates) + candidates -= M + assigned += M.mind + M.mind.special_role = ROLE_CULTIST + M.mind.restricted_roles = restricted_roles + return TRUE + +/datum/dynamic_ruleset/roundstart/bloodcult/execute() + main_cult = new + for(var/datum/mind/M in assigned) + var/datum/antagonist/cult/new_cultist = new antag_datum() + new_cultist.cult_team = main_cult + new_cultist.give_equipment = TRUE + M.add_antag_datum(new_cultist) + main_cult.setup_objectives() + return TRUE + +/datum/dynamic_ruleset/roundstart/bloodcult/round_result() + ..() + if(main_cult.check_cult_victory()) + SSticker.mode_result = "win - cult win" + SSticker.news_report = CULT_SUMMON + else + SSticker.mode_result = "loss - staff stopped the cult" + SSticker.news_report = CULT_FAILURE + +////////////////////////////////////////////// +// // +// NUCLEAR OPERATIVES // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/roundstart/nuclear + name = "Nuclear Emergency" + antag_flag = ROLE_OPERATIVE + antag_datum = /datum/antagonist/nukeop + var/datum/antagonist/antag_leader_datum = /datum/antagonist/nukeop/leader + minimum_required_age = 14 + restricted_roles = list("Head of Security", "Captain") // Just to be sure that a nukie getting picked won't ever imply a Captain or HoS not getting drafted + required_candidates = 5 + weight = 3 + cost = 40 + requirements = list(90,90,90,80,60,40,30,20,10,10) + high_population_requirement = 10 + pop_per_requirement = 5 + flags = HIGHLANDER_RULESET + var/operative_cap = list(2,2,2,3,3,3,4,4,5,5) + var/datum/team/nuclear/nuke_team + +/datum/dynamic_ruleset/roundstart/nuclear/ready(forced = FALSE) + var/indice_pop = min(10,round(mode.roundstart_pop_ready/pop_per_requirement)+1) + required_candidates = operative_cap[indice_pop] + . = ..() + +/datum/dynamic_ruleset/roundstart/nuclear/pre_execute() + // If ready() did its job, candidates should have 5 or more members in it + + var/indice_pop = min(10,round(mode.roundstart_pop_ready/5)+1) + var/operatives = operative_cap[indice_pop] + for(var/operatives_number = 1 to operatives) + if(candidates.len <= 0) + break + var/mob/M = pick(candidates) + candidates -= M + assigned += M.mind + M.mind.assigned_role = "Nuclear Operative" + M.mind.special_role = "Nuclear Operative" + return TRUE + +/datum/dynamic_ruleset/roundstart/nuclear/execute() + var/leader = TRUE + for(var/datum/mind/M in assigned) + if (leader) + leader = FALSE + var/datum/antagonist/nukeop/leader/new_op = M.add_antag_datum(antag_leader_datum) + nuke_team = new_op.nuke_team + else + var/datum/antagonist/nukeop/new_op = new antag_datum() + M.add_antag_datum(new_op) + return TRUE + +/datum/dynamic_ruleset/roundstart/nuclear/round_result() + var result = nuke_team.get_result() + switch(result) + if(NUKE_RESULT_FLUKE) + SSticker.mode_result = "loss - syndicate nuked - disk secured" + SSticker.news_report = NUKE_SYNDICATE_BASE + if(NUKE_RESULT_NUKE_WIN) + SSticker.mode_result = "win - syndicate nuke" + SSticker.news_report = STATION_NUKED + if(NUKE_RESULT_NOSURVIVORS) + SSticker.mode_result = "halfwin - syndicate nuke - did not evacuate in time" + SSticker.news_report = STATION_NUKED + if(NUKE_RESULT_WRONG_STATION) + SSticker.mode_result = "halfwin - blew wrong station" + SSticker.news_report = NUKE_MISS + if(NUKE_RESULT_WRONG_STATION_DEAD) + SSticker.mode_result = "halfwin - blew wrong station - did not evacuate in time" + SSticker.news_report = NUKE_MISS + if(NUKE_RESULT_CREW_WIN_SYNDIES_DEAD) + SSticker.mode_result = "loss - evacuation - disk secured - syndi team dead" + SSticker.news_report = OPERATIVES_KILLED + if(NUKE_RESULT_CREW_WIN) + SSticker.mode_result = "loss - evacuation - disk secured" + SSticker.news_report = OPERATIVES_KILLED + if(NUKE_RESULT_DISK_LOST) + SSticker.mode_result = "halfwin - evacuation - disk not secured" + SSticker.news_report = OPERATIVE_SKIRMISH + if(NUKE_RESULT_DISK_STOLEN) + SSticker.mode_result = "halfwin - detonation averted" + SSticker.news_report = OPERATIVE_SKIRMISH + else + SSticker.mode_result = "halfwin - interrupted" + SSticker.news_report = OPERATIVE_SKIRMISH + +////////////////////////////////////////////// +// // +// REVS // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/roundstart/delayed/revs + name = "Revolution" + persistent = TRUE + antag_flag = ROLE_REV_HEAD + antag_flag_override = ROLE_REV + antag_datum = /datum/antagonist/rev/head + minimum_required_age = 14 + restricted_roles = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") + required_candidates = 3 + weight = 2 + cost = 35 + requirements = list(101,101,70,40,30,20,10,10,10,10) + high_population_requirement = 10 + delay = 5 MINUTES + flags = HIGHLANDER_RULESET + // I give up, just there should be enough heads with 35 players... + minimum_players = 35 + var/datum/team/revolution/revolution + var/finished = 0 + +/datum/dynamic_ruleset/roundstart/delayed/revs/execute() + var/max_canditates = 4 + revolution = new() + for(var/i = 1 to max_canditates) + if(candidates.len <= 0) + break + var/mob/M = pick(candidates) + candidates -= M + assigned += M.mind + M.mind.restricted_roles = restricted_roles + M.mind.special_role = antag_flag + var/datum/antagonist/rev/head/new_head = new antag_datum() + new_head.give_flash = TRUE + new_head.give_hud = TRUE + new_head.remove_clumsy = TRUE + M.mind.add_antag_datum(new_head,revolution) + + revolution.update_objectives() + revolution.update_heads() + SSshuttle.registerHostileEnvironment(src) + + return TRUE + +/datum/dynamic_ruleset/roundstart/delayed/revs/rule_process() + if(check_rev_victory()) + finished = 1 + else if(check_heads_victory()) + finished = 2 + return + +/datum/dynamic_ruleset/roundstart/delayed/revs/check_finished() + if(CONFIG_GET(keyed_list/continuous)["revolution"]) + if(finished) + SSshuttle.clearHostileEnvironment(src) + return ..() + if(finished != 0) + return TRUE + else + return ..() + +/datum/dynamic_ruleset/roundstart/delayed/revs/proc/check_rev_victory() + for(var/datum/objective/mutiny/objective in revolution.objectives) + if(!(objective.check_completion())) + return FALSE + return TRUE + +/datum/dynamic_ruleset/roundstart/delayed/revs/proc/check_heads_victory() + for(var/datum/mind/rev_mind in revolution.head_revolutionaries()) + var/turf/T = get_turf(rev_mind.current) + if(!considered_afk(rev_mind) && considered_alive(rev_mind) && is_station_level(T.z)) + if(ishuman(rev_mind.current) || ismonkey(rev_mind.current)) + return FALSE + return TRUE + +/datum/dynamic_ruleset/roundstart/delayed/revs/round_result() + if(finished == 1) + SSticker.mode_result = "win - heads killed" + SSticker.news_report = REVS_WIN + else if(finished == 2) + SSticker.mode_result = "loss - rev heads killed" + SSticker.news_report = REVS_LOSE + +// Admin only rulesets. The threat requirement is 101 so it is not possible to roll them. + +////////////////////////////////////////////// +// // +// EXTENDED // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/roundstart/extended + name = "Extended" + antag_flag = null + antag_datum = null + restricted_roles = list() + required_candidates = 0 + weight = 3 + cost = 0 + requirements = list(101,101,101,101,101,101,101,101,101,101) + high_population_requirement = 101 + +/datum/dynamic_ruleset/roundstart/extended/pre_execute() + message_admins("Starting a round of extended.") + log_game("Starting a round of extended.") + mode.spend_threat(mode.threat) + return TRUE + +////////////////////////////////////////////// +// // +// CLOCKCULT // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/roundstart/clockcult + name = "Clockcult" + antag_flag = ROLE_SERVANT_OF_RATVAR + antag_datum = /datum/antagonist/clockcult + restricted_roles = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") + required_candidates = 4 + weight = 3 + cost = 0 + requirements = list(101,101,101,101,101,101,101,101,101,101) + high_population_requirement = 101 + flags = HIGHLANDER_RULESET + var/ark_time + +/datum/dynamic_ruleset/roundstart/clockcult/pre_execute() + var/list/errorList = list() + var/list/reebes = SSmapping.LoadGroup(errorList, "Reebe", "map_files/generic", "City_of_Cogs.dmm", default_traits = ZTRAITS_REEBE, silent = TRUE) + if(errorList.len) + message_admins("Reebe failed to load!") + log_game("Reebe failed to load!") + return FALSE + for(var/datum/parsed_map/PM in reebes) + PM.initTemplateBounds() + + var/starter_servants = 4 + var/number_players = num_players() + if(number_players > 30) + number_players -= 30 + starter_servants += round(number_players / 10) + starter_servants = min(starter_servants, 8) + for (var/i in 1 to starter_servants) + var/mob/servant = pick(candidates) + candidates -= servant + assigned += servant.mind + servant.mind.assigned_role = ROLE_SERVANT_OF_RATVAR + servant.mind.special_role = ROLE_SERVANT_OF_RATVAR + ark_time = 30 + round((number_players / 5)) + ark_time = min(ark_time, 35) + return TRUE + +/datum/dynamic_ruleset/roundstart/clockcult/execute() + var/list/spread_out_spawns = GLOB.servant_spawns.Copy() + for(var/datum/mind/servant in assigned) + var/mob/S = servant.current + if(!spread_out_spawns.len) + spread_out_spawns = GLOB.servant_spawns.Copy() + log_game("[key_name(servant)] was made an initial servant of Ratvar") + var/turf/T = pick_n_take(spread_out_spawns) + S.forceMove(T) + greet_servant(S) + equip_servant(S) + add_servant_of_ratvar(S, TRUE) + var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar //that's a mouthful + G.final_countdown(ark_time) + return TRUE + +/datum/dynamic_ruleset/roundstart/clockcult/proc/greet_servant(mob/M) //Description of their role + if(!M) + return 0 + to_chat(M, "You are a servant of Ratvar, the Clockwork Justiciar!") + to_chat(M, "You have approximately [ark_time] minutes until the Ark activates.") + to_chat(M, "Unlock Script scripture by converting a new servant.") + to_chat(M, "Application scripture will be unlocked halfway until the Ark's activation.") + M.playsound_local(get_turf(M), 'sound/ambience/antag/clockcultalr.ogg', 100, FALSE, pressure_affected = FALSE) + return 1 + +/datum/dynamic_ruleset/roundstart/clockcult/proc/equip_servant(mob/living/M) //Grants a clockwork slab to the mob, with one of each component + if(!M || !ishuman(M)) + return FALSE + var/mob/living/carbon/human/L = M + L.equipOutfit(/datum/outfit/servant_of_ratvar) + var/obj/item/clockwork/slab/S = new + var/slot = "At your feet" + var/list/slots = list("In your left pocket" = SLOT_L_STORE, "In your right pocket" = SLOT_R_STORE, "In your backpack" = SLOT_IN_BACKPACK, "On your belt" = SLOT_BELT) + if(ishuman(L)) + var/mob/living/carbon/human/H = L + slot = H.equip_in_one_of_slots(S, slots) + if(slot == "In your backpack") + slot = "In your [H.back.name]" + if(slot == "At your feet") + if(!S.forceMove(get_turf(L))) + qdel(S) + if(S && !QDELETED(S)) + to_chat(L, "There is a paper in your backpack! It'll tell you if anything's changed, as well as what to expect.") + to_chat(L, "[slot] is a clockwork slab, a multipurpose tool used to construct machines and invoke ancient words of power. If this is your first time \ + as a servant, you can find a concise tutorial in the Recollection category of its interface.") + to_chat(L, "If you want more information, you can read the wiki page to learn more.") + return TRUE + return FALSE + +/datum/dynamic_ruleset/roundstart/clockcult/round_result() + if(GLOB.clockwork_gateway_activated) + SSticker.news_report = CLOCK_SUMMON + SSticker.mode_result = "win - servants completed their objective (summon ratvar)" + else + SSticker.news_report = CULT_FAILURE + SSticker.mode_result = "loss - servants failed their objective (summon ratvar)" + +////////////////////////////////////////////// +// // +// CLOWN OPS // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/roundstart/nuclear/clown_ops + name = "Clown Ops" + antag_datum = /datum/antagonist/nukeop/clownop + antag_leader_datum = /datum/antagonist/nukeop/leader/clownop + requirements = list(101,101,101,101,101,101,101,101,101,101) + high_population_requirement = 101 + +/datum/dynamic_ruleset/roundstart/nuclear/clown_ops/pre_execute() + . = ..() + if(.) + for(var/obj/machinery/nuclearbomb/syndicate/S in GLOB.nuke_list) + var/turf/T = get_turf(S) + if(T) + qdel(S) + new /obj/machinery/nuclearbomb/syndicate/bananium(T) + for(var/datum/mind/V in assigned) + V.assigned_role = "Clown Operative" + V.special_role = "Clown Operative" + +////////////////////////////////////////////// +// // +// DEVIL // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/roundstart/devil + name = "Devil" + antag_flag = ROLE_DEVIL + antag_datum = /datum/antagonist/devil + restricted_roles = list("Lawyer", "Curator", "Chaplain", "Head of Security", "Captain", "AI") + required_candidates = 1 + weight = 3 + cost = 0 + requirements = list(101,101,101,101,101,101,101,101,101,101) + high_population_requirement = 101 + var/devil_limit = 4 // Hard limit on devils if scaling is turned off + +/datum/dynamic_ruleset/roundstart/devil/pre_execute() + var/tsc = CONFIG_GET(number/traitor_scaling_coeff) + var/num_devils = 1 + + if(tsc) + num_devils = max(required_candidates, min(round(num_players() / (tsc * 3)) + 2, round(num_players() / (tsc * 1.5)))) + else + num_devils = max(required_candidates, min(num_players(), devil_limit)) + + for(var/j = 0, j < num_devils, j++) + if (!candidates.len) + break + var/mob/devil = pick(candidates) + assigned += devil + candidates -= devil + devil.mind.special_role = ROLE_DEVIL + devil.mind.restricted_roles = restricted_roles + + log_game("[key_name(devil)] has been selected as a devil") + return TRUE + +/datum/dynamic_ruleset/roundstart/devil/execute() + for(var/datum/mind/devil in assigned) + add_devil(devil.current, ascendable = TRUE) + add_devil_objectives(devil,2) + return TRUE + +/datum/dynamic_ruleset/roundstart/devil/proc/add_devil_objectives(datum/mind/devil_mind, quantity) + var/list/validtypes = list(/datum/objective/devil/soulquantity, /datum/objective/devil/soulquality, /datum/objective/devil/sintouch, /datum/objective/devil/buy_target) + var/datum/antagonist/devil/D = devil_mind.has_antag_datum(/datum/antagonist/devil) + for(var/i = 1 to quantity) + var/type = pick(validtypes) + var/datum/objective/devil/objective = new type(null) + objective.owner = devil_mind + D.objectives += objective + if(!istype(objective, /datum/objective/devil/buy_target)) + validtypes -= type + else + objective.find_target() + +////////////////////////////////////////////// +// // +// MONKEY // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/roundstart/monkey + name = "Monkey" + antag_flag = ROLE_MONKEY + antag_datum = /datum/antagonist/monkey/leader + restricted_roles = list("Cyborg", "AI") + required_candidates = 1 + weight = 3 + cost = 0 + requirements = list(101,101,101,101,101,101,101,101,101,101) + high_population_requirement = 101 + var/players_per_carrier = 30 + var/monkeys_to_win = 1 + var/escaped_monkeys = 0 + var/datum/team/monkey/monkey_team + +/datum/dynamic_ruleset/roundstart/monkey/pre_execute() + var/carriers_to_make = max(round(num_players()/players_per_carrier, 1), 1) + + for(var/j = 0, j < carriers_to_make, j++) + if (!candidates.len) + break + var/mob/carrier = pick(candidates) + candidates -= carrier + assigned += carrier.mind + carrier.mind.special_role = "Monkey Leader" + carrier.mind.restricted_roles = restricted_roles + log_game("[key_name(carrier)] has been selected as a Jungle Fever carrier") + return TRUE + +/datum/dynamic_ruleset/roundstart/monkey/execute() + for(var/datum/mind/carrier in assigned) + var/datum/antagonist/monkey/M = add_monkey_leader(carrier) + if(M) + monkey_team = M.monkey_team + return TRUE + +/datum/dynamic_ruleset/roundstart/monkey/proc/check_monkey_victory() + if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME) + return FALSE + var/datum/disease/D = new /datum/disease/transformation/jungle_fever() + for(var/mob/living/carbon/monkey/M in GLOB.alive_mob_list) + if (M.HasDisease(D)) + if(M.onCentCom() || M.onSyndieBase()) + escaped_monkeys++ + if(escaped_monkeys >= monkeys_to_win) + return TRUE + else + return FALSE + +// This does not get called. Look into making it work. +/datum/dynamic_ruleset/roundstart/monkey/round_result() + if(check_monkey_victory()) + SSticker.mode_result = "win - monkey win" + else + SSticker.mode_result = "loss - staff stopped the monkeys" + +////////////////////////////////////////////// +// // +// METEOR // +// // +////////////////////////////////////////////// + +/datum/dynamic_ruleset/roundstart/meteor + name = "Meteor" + persistent = TRUE + required_candidates = 0 + weight = 3 + cost = 0 + requirements = list(101,101,101,101,101,101,101,101,101,101) + high_population_requirement = 101 + var/meteordelay = 2000 + var/nometeors = 0 + var/rampupdelta = 5 + +/datum/dynamic_ruleset/roundstart/meteor/rule_process() + if(nometeors || meteordelay > world.time - SSticker.round_start_time) + return + + var/list/wavetype = GLOB.meteors_normal + var/meteorminutes = (world.time - SSticker.round_start_time - meteordelay) / 10 / 60 + + if (prob(meteorminutes)) + wavetype = GLOB.meteors_threatening + + if (prob(meteorminutes/2)) + wavetype = GLOB.meteors_catastrophic + + var/ramp_up_final = CLAMP(round(meteorminutes/rampupdelta), 1, 10) + + spawn_meteors(ramp_up_final, wavetype) diff --git a/code/game/gamemodes/dynamic/readme.md b/code/game/gamemodes/dynamic/readme.md new file mode 100644 index 0000000000..6bd064cf7c --- /dev/null +++ b/code/game/gamemodes/dynamic/readme.md @@ -0,0 +1,57 @@ +# DYNAMIC + +## ROUNDSTART + +Dynamic rolls threat based on a special sauce formula: +"dynamic_curve_width \* tan((3.1416 \* (rand() - 0.5) \* 57.2957795)) + dynamic_curve_centre" + +Latejoin and midround injection cooldowns are set using exponential distribution between +5 minutes and 25 for latejoin +15 minutes and 35 for midround +this value is then added to world.time and assigned to the injection cooldown variables. + +rigged_roundstart() is called instead if there are forced rules (an admin set the mode) + +can_start() -> pre_setup() -> roundstart() OR rigged_roundstart() -> picking_roundstart_rule(drafted_rules) -> post_setup() + +## PROCESS + +Calls rule_process on every rule which is in the current_rules list. +Every sixty seconds, update_playercounts() +Midround injection time is checked against world.time to see if an injection should happen. +If midround injection time is lower than world.time, it updates playercounts again, then tries to inject and generates a new cooldown regardless of whether a rule is picked. + +## LATEJOIN + +make_antag_chance(newPlayer) -> [For each latespawn rule...] +-> acceptable(living players, threat_level) -> trim_candidates() -> ready(forced=FALSE) +**If true, add to drafted rules +**NOTE that acceptable uses threat_level not threat! +**NOTE Latejoin timer is ONLY reset if at least one rule was drafted. +**NOTE the new_player.dm AttemptLateSpawn() calls OnPostSetup for all roles (unless assigned role is MODE) +[After collecting all draftble rules...] +-> picking_latejoin_ruleset(drafted_rules) -> spend threat -> ruleset.execute() +## MIDROUND +process() -> [For each midround rule...] +-> acceptable(living players, threat_level) -> trim_candidates() -> ready(forced=FALSE) +[After collecting all draftble rules...] +-> picking_midround_ruleset(drafted_rules) -> spend threat -> ruleset.execute() +## FORCED +For latejoin, it simply sets forced_latejoin_rule +make_antag_chance(newPlayer) -> trim_candidates() -> ready(forced=TRUE) **NOTE no acceptable() call +For midround, calls the below proc with forced = TRUE +picking_specific_rule(ruletype,forced) -> forced OR acceptable(living_players, threat_level) -> trim_candidates() -> ready(forced) -> spend threat -> execute() +**NOTE specific rule can be called by RS traitor->MR autotraitor w/ forced=FALSE +**NOTE that due to short circuiting acceptable() need not be called if forced. +## RULESET +acceptable(population,threat) just checks if enough threat_level for population indice. +**NOTE that we currently only send threat_level as the second arg, not threat. +ready(forced) checks if enough candidates and calls the map's map_ruleset(dynamic_ruleset) at the parent level +trim_candidates() varies significantly according to the ruleset type +Roundstart: All candidates are new_player mobs. Check them for standard stuff: connected, desire role, not banned, etc. +**NOTE Roundstart deals with both candidates (trimmed list of valid players) and mode.candidates (everyone readied up). Don't confuse them! +Latejoin: Only one candidate, the latejoiner. Standard checks. +Midround: Instead of building a single list candidates, candidates contains four lists: living, dead, observing, and living antags. Standard checks in trim_list(list). +Midround - Rulesets have additional types +/from_ghosts: execute() -> send_applications() -> review_applications() -> finish_setup(mob/newcharacter, index) -> setup_role(role) +**NOTE: execute() here adds dead players and observers to candidates list diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index d16cbebb2a..cc992fefbc 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -558,3 +558,7 @@ SSticker.news_report = STATION_EVACUATED if(SSshuttle.emergency.is_hijacked()) SSticker.news_report = SHUTTLE_HIJACK + +/// Mode specific admin panel. +/datum/game_mode/proc/admin_panel() + return diff --git a/code/game/gamemodes/overthrow/overthrow.dm b/code/game/gamemodes/overthrow/overthrow.dm index 1548556515..dca0c1ade1 100644 --- a/code/game/gamemodes/overthrow/overthrow.dm +++ b/code/game/gamemodes/overthrow/overthrow.dm @@ -3,7 +3,8 @@ name = "overthrow" config_tag = "overthrow" antag_flag = ROLE_OVERTHROW - restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer") + restricted_jobs = list("AI", "Cyborg") + protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") required_players = 20 // the core idea is of a swift, bloodless coup, so it shouldn't be as chaotic as revs. required_enemies = 2 // minimum two teams, otherwise it's just nerfed revs. recommended_enemies = 4 diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 09047b05a9..8459819b5b 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -12,7 +12,8 @@ config_tag = "revolution" antag_flag = ROLE_REV false_report_weight = 10 - restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer") + restricted_jobs = list("AI", "Cyborg") + protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") required_players = 30 required_enemies = 2 recommended_enemies = 3 diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 789737ec0f..4a6e72cf67 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -96,4 +96,4 @@ /datum/game_mode/traitor/generate_report() return "Although more specific threats are commonplace, you should always remain vigilant for Syndicate agents aboard your station. Syndicate communications have implied that many \ - Nanotrasen employees are Syndicate agents with hidden memories that may be activated at a moment's notice, so it's possible that these agents might not even know their positions." \ No newline at end of file + Nanotrasen employees are Syndicate agents with hidden memories that may be activated at a moment's notice, so it's possible that these agents might not even know their positions." diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index aa363428fb..76ea855c77 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -193,8 +193,10 @@ to_chat(usr, "Chem System Re-route detected, results may not be as expected!") /obj/machinery/sleeper/emag_act(mob/user) + . = ..() scramble_chem_buttons() to_chat(user, "You scramble the sleeper's user interface!") + return TRUE /obj/machinery/sleeper/proc/inject_chem(chem, mob/user) if((chem in available_chems) && chem_allowed(chem)) diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index b0e4c699d7..e5fd73228a 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -113,6 +113,11 @@ Class Procs: var/atom/movable/occupant = null var/speed_process = FALSE // Process as fast as possible? var/obj/item/circuitboard/circuit // Circuit to be created and inserted when the machinery is created + var/obj/item/card/id/inserted_scan_id + var/obj/item/card/id/inserted_modify_id + var/list/region_access = null // For the identification console (card.dm) + var/list/head_subordinates = null // For the identification console (card.dm) + var/authenticated = 0 // For the identification console (card.dm) var/interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE @@ -131,7 +136,7 @@ Class Procs: else START_PROCESSING(SSfastprocess, src) power_change() - AddComponent(/datum/component/redirect, list(COMSIG_ENTER_AREA = CALLBACK(src, .proc/power_change))) + RegisterSignal(src, COMSIG_ENTER_AREA, .proc/power_change) if (occupant_typecache) occupant_typecache = typecacheof(occupant_typecache) @@ -143,6 +148,10 @@ Class Procs: else STOP_PROCESSING(SSfastprocess, src) dropContents() + if(length(component_parts)) + for(var/atom/A in component_parts) + qdel(A) + component_parts.Cut() return ..() /obj/machinery/proc/locate_machinery() @@ -179,12 +188,15 @@ Class Procs: L.update_canmove() occupant = null +/obj/machinery/proc/can_be_occupant(atom/movable/am) + return occupant_typecache ? is_type_in_typecache(am, occupant_typecache) : isliving(am) + /obj/machinery/proc/close_machine(atom/movable/target = null) state_open = FALSE density = TRUE if(!target) for(var/am in loc) - if (!(occupant_typecache ? is_type_in_typecache(am, occupant_typecache) : isliving(am))) + if (!(can_be_occupant(am))) continue var/atom/movable/AM = am if(AM.has_buckled_mobs()) @@ -311,6 +323,7 @@ Class Procs: spawn_frame(disassembled) for(var/obj/item/I in component_parts) I.forceMove(loc) + component_parts.Cut() qdel(src) /obj/machinery/proc/spawn_frame(disassembled) @@ -348,8 +361,8 @@ Class Procs: panel_open = FALSE icon_state = icon_state_closed to_chat(user, "You close the maintenance hatch of [src].") - return 1 - return 0 + return TRUE + return FALSE /obj/machinery/proc/default_change_direction_wrench(mob/user, obj/item/I) if(panel_open && I.tool_behaviour == TOOL_WRENCH) @@ -401,7 +414,7 @@ Class Procs: var/obj/item/circuitboard/machine/CB = locate(/obj/item/circuitboard/machine) in component_parts var/P if(W.works_from_distance) - display_parts(user) + to_chat(user, display_parts(user)) for(var/obj/item/A in component_parts) for(var/D in CB.req_components) if(ispath(A.type, D)) @@ -429,34 +442,38 @@ Class Procs: break RefreshParts() else - display_parts(user) + to_chat(user, display_parts(user)) if(shouldplaysound) W.play_rped_sound() return TRUE return FALSE /obj/machinery/proc/display_parts(mob/user) - to_chat(user, "It contains the following parts:") + . = list() + . += "It contains the following parts:" for(var/obj/item/C in component_parts) - to_chat(user, "[icon2html(C, user)] \A [C].") + . += "[icon2html(C, user)] \A [C]." + . = jointext(., "") /obj/machinery/examine(mob/user) - ..() + . = ..() if(stat & BROKEN) - to_chat(user, "It looks broken and non-functional.") + . += "It looks broken and non-functional." if(!(resistance_flags & INDESTRUCTIBLE)) if(resistance_flags & ON_FIRE) - to_chat(user, "It's on fire!") + . += "It's on fire!" var/healthpercent = (obj_integrity/max_integrity) * 100 switch(healthpercent) if(50 to 99) - to_chat(user, "It looks slightly damaged.") + . += "It looks slightly damaged." if(25 to 50) - to_chat(user, "It appears heavily damaged.") + . += "It appears heavily damaged." if(0 to 25) - to_chat(user, "It's falling apart!") + . += "It's falling apart!" if(user.research_scanner && component_parts) - display_parts(user) + . += display_parts(user, TRUE) + if(inserted_scan_id || inserted_modify_id) + . += "Alt-click to eject the ID card." //called on machinery construction (i.e from frame to machinery) but not on initialization /obj/machinery/proc/on_construction() @@ -490,3 +507,72 @@ Class Procs: . = . % 9 AM.pixel_x = -8 + ((.%3)*8) AM.pixel_y = -8 + (round( . / 3)*8) + +/obj/machinery/proc/id_insert_scan(mob/user, obj/item/card/id/I) + I = user.get_active_held_item() + if(istype(I)) + if(inserted_scan_id) + to_chat(user, "There's already an ID card in the console!") + return + if(!user.transferItemToLoc(I, src)) + return + inserted_scan_id = I + user.visible_message("[user] inserts an ID card into the console.", \ + "You insert the ID card into the console.") + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE) + updateUsrDialog() + +/obj/machinery/proc/id_eject_scan(mob/user) + if(!inserted_scan_id) + to_chat(user, "There's no ID card in the console!") + return + if(inserted_scan_id) + inserted_scan_id.forceMove(drop_location()) + if(!issilicon(user) && Adjacent(user)) + user.put_in_hands(inserted_scan_id) + inserted_scan_id = null + user.visible_message("[user] gets an ID card from the console.", \ + "You get the ID card from the console.") + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE) + updateUsrDialog() + +/obj/machinery/proc/id_eject_modify(mob/user) + if(inserted_modify_id) + GLOB.data_core.manifest_modify(inserted_modify_id.registered_name, inserted_modify_id.assignment) + inserted_modify_id.update_label() + inserted_modify_id.forceMove(drop_location()) + if(!issilicon(user) && Adjacent(user)) + user.put_in_hands(inserted_modify_id) + user.visible_message("[user] gets an ID card from the console.", \ + "You get the ID card from the console.") + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE) + inserted_modify_id = null + region_access = null + head_subordinates = null + updateUsrDialog() + +/obj/machinery/proc/id_insert_modify(mob/user) + var/obj/item/card/id/I = user.get_active_held_item() + if(istype(I)) + if(inserted_modify_id) + to_chat(user, "There's already an ID card in the console!") + return + if(!user.transferItemToLoc(I, src)) + return + inserted_modify_id = I + user.visible_message("[user] inserts an ID card into the console.", \ + "You insert the ID card into the console.") + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE) + updateUsrDialog() + +/obj/machinery/AltClick(mob/user) + if(!user.canUseTopic(src, !issilicon(user)) || !is_operational()) + return + if(inserted_modify_id) + id_eject_modify(user) + authenticated = FALSE + return + if(inserted_scan_id) + id_eject_scan(user) + authenticated = FALSE + return diff --git a/code/game/machinery/announcement_system.dm b/code/game/machinery/announcement_system.dm index 884b818f32..56227cdd53 100644 --- a/code/game/machinery/announcement_system.dm +++ b/code/game/machinery/announcement_system.dm @@ -177,7 +177,9 @@ GLOBAL_LIST_EMPTY(announcement_systems) act_up() /obj/machinery/announcement_system/emag_act() + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED act_up() + return TRUE diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 879be046c9..968cbe7254 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -101,12 +101,14 @@ return ..() /obj/machinery/button/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return req_access = list() req_one_access = list() playsound(src, "sparks", 100, 1) obj_flags |= EMAGGED + return TRUE /obj/machinery/button/attack_ai(mob/user) if(!panel_open) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 4f04335852..a175558f74 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -320,10 +320,12 @@ return ..() /obj/machinery/clonepod/emag_act(mob/user) + . = ..() if(!occupant) return to_chat(user, "You corrupt the genetic compiler.") malfunction() + return TRUE //Put messages in the connected computer's temp var for display. /obj/machinery/clonepod/proc/connected_message(message) diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index 73fdcd5e8b..c317cbba0d 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -44,7 +44,7 @@ table.computer = src break -/obj/machinery/computer/operating/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) +/obj/machinery/computer/operating/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.not_incapacitated_state) ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "operating_computer", name, 350, 470, master_ui, state) @@ -125,4 +125,4 @@ . = TRUE #undef MENU_OPERATION -#undef MENU_SURGERIES \ No newline at end of file +#undef MENU_SURGERIES diff --git a/code/game/machinery/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm index e51d623c2f..6d505c8f95 100644 --- a/code/game/machinery/computer/apc_control.dm +++ b/code/game/machinery/computer/apc_control.dm @@ -11,7 +11,6 @@ var/list/result_filters //For sorting the results var/checking_logs = 0 var/list/logs - var/authenticated = 0 var/auth_id = "\[NULL\]" /obj/machinery/computer/apc_control/Initialize() @@ -185,15 +184,19 @@ ui_interact(usr) //Refresh the UI after a filter changes /obj/machinery/computer/apc_control/emag_act(mob/user) + . = ..() if(!authenticated) to_chat(user, "You bypass [src]'s access requirements using your emag.") authenticated = TRUE log_activity("logged in") - else if(!(obj_flags & EMAGGED)) + else + if(obj_flags & EMAGGED) + return user.visible_message("You emag [src], disabling precise logging and allowing you to clear logs.") log_game("[key_name(user)] emagged [src] at [AREACOORD(src)], disabling operator tracking.") obj_flags |= EMAGGED - playsound(src, "sparks", 50, 1) + playsound(src, "sparks", 50, 1) + return TRUE /obj/machinery/computer/apc_control/proc/log_activity(log_text) var/op_string = operator && !(obj_flags & EMAGGED) ? operator : "\[NULL OPERATOR\]" diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 8d0cfb95e8..4bce450359 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -45,8 +45,8 @@ /obj/item/gun/ballistic/automatic/toy/pistol/unrestricted = ARCADE_WEIGHT_TRICK, /obj/item/hot_potato/harmless/toy = ARCADE_WEIGHT_RARE, /obj/item/twohanded/dualsaber/toy = ARCADE_WEIGHT_RARE, - /obj/item/twohanded/hypereutactic/toy = ARCADE_WEIGHT_RARE, - /obj/item/twohanded/hypereutactic/toy/rainbow = ARCADE_WEIGHT_RARE, + /obj/item/twohanded/dualsaber/hypereutactic/toy = ARCADE_WEIGHT_RARE, + /obj/item/twohanded/dualsaber/hypereutactic/toy/rainbow = ARCADE_WEIGHT_RARE, /obj/item/storage/box/snappops = ARCADE_WEIGHT_TRICK, /obj/item/clothing/under/syndicate/tacticool = ARCADE_WEIGHT_TRICK, @@ -57,6 +57,7 @@ /obj/item/stack/tile/fakespace/loaded = ARCADE_WEIGHT_TRICK, /obj/item/stack/tile/fakepit/loaded = ARCADE_WEIGHT_TRICK, /obj/item/restraints/handcuffs/fake = ARCADE_WEIGHT_TRICK, + /obj/item/clothing/gloves/rapid/hug = ARCADE_WEIGHT_TRICK, /obj/item/grenade/chem_grenade/glitter/pink = ARCADE_WEIGHT_TRICK, /obj/item/grenade/chem_grenade/glitter/blue = ARCADE_WEIGHT_TRICK, diff --git a/code/game/machinery/computer/arcade/battle.dm b/code/game/machinery/computer/arcade/battle.dm index ded9cf95f6..b906b1afb5 100644 --- a/code/game/machinery/computer/arcade/battle.dm +++ b/code/game/machinery/computer/arcade/battle.dm @@ -186,6 +186,7 @@ /obj/machinery/computer/arcade/battle/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return to_chat(user, "A mesmerizing Rhumba beat starts playing from the arcade machine's speakers!") @@ -202,5 +203,5 @@ enemy_name = "Cuban Pete" name = "Outbomb Cuban Pete" - updateUsrDialog() + return TRUE \ No newline at end of file diff --git a/code/game/machinery/computer/arcade/minesweeper.dm b/code/game/machinery/computer/arcade/minesweeper.dm index e90e05966c..641ef1c9cd 100644 --- a/code/game/machinery/computer/arcade/minesweeper.dm +++ b/code/game/machinery/computer/arcade/minesweeper.dm @@ -284,6 +284,7 @@ return /obj/machinery/computer/arcade/minesweeper/emag_act(mob/user) + . = ..() if(CHECK_BITFIELD(obj_flags, EMAGGED)) return desc = "An arcade machine that generates grids. It's clunking and sparking everywhere, almost as if threatening to explode at any moment!" @@ -298,6 +299,7 @@ to_chat(user, "The machine buzzes and sparks... the game has been reset!") playsound(user, 'sound/machines/buzz-sigh.ogg', 100, 0, extrarange = 3, falloff = 10) //Loud buzz game_status = MINESWEEPER_GAME_MAIN_MENU + return TRUE /obj/machinery/computer/arcade/minesweeper/proc/custom_generation(mob/user) playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) //Entered into the menu so ping sound diff --git a/code/game/machinery/computer/arcade/orion_trail.dm b/code/game/machinery/computer/arcade/orion_trail.dm index 12941dea35..023b1048ce 100644 --- a/code/game/machinery/computer/arcade/orion_trail.dm +++ b/code/game/machinery/computer/arcade/orion_trail.dm @@ -736,6 +736,7 @@ desc = "Learn how our ancestors got to Orion, and have fun in the process!" /obj/machinery/computer/arcade/orion_trail/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return to_chat(user, "You override the cheat code menu and skip to Cheat #[rand(1, 50)]: Realism Mode.") @@ -743,6 +744,7 @@ desc = "Learn how our ancestors got to Orion, and try not to die in the process!" newgame() obj_flags |= EMAGGED + return TRUE /mob/living/simple_animal/hostile/syndicate/ranged/smg/orion name = "spaceport security" diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 09bf401e12..0cce853c49 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -13,11 +13,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) circuit = /obj/item/circuitboard/computer/card var/obj/item/card/id/scan = null var/obj/item/card/id/modify = null - var/authenticated = 0 var/mode = 0 var/printing = null - var/list/region_access = null - var/list/head_subordinates = null var/target_dept = 0 //Which department this computer has access to. 0=all departments //Cooldown for closing positions in seconds diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index bfa6b46134..26f0d06ecb 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -1,4 +1,4 @@ -#define AUTOCLONING_MINIMAL_LEVEL 3 +#define AUTOCLONING_MINIMAL_LEVEL 4 /obj/machinery/computer/cloning name = "cloning console" @@ -64,9 +64,6 @@ if(!(scanner && LAZYLEN(pods) && autoprocess)) return - if(scanner.occupant && scanner.scan_level > 2) - scan_occupant(scanner.occupant) - for(var/datum/data/record/R in records) var/obj/machinery/clonepod/pod = GetAvailableEfficientPod(R.fields["mind"]) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 752765baa1..557f2f0636 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -6,7 +6,6 @@ icon_keyboard = "tech_key" req_access = list(ACCESS_HEADS) circuit = /obj/item/circuitboard/computer/communications - var/authenticated = 0 var/auth_id = "Unknown" //Who is currently logged in? var/list/datum/comm_message/messages = list() var/datum/comm_message/currmsg @@ -432,6 +431,7 @@ return ..() /obj/machinery/computer/communications/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED @@ -440,6 +440,7 @@ authenticated = 2 to_chat(user, "You scramble the communication routing circuits!") playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0) + return TRUE /obj/machinery/computer/communications/ui_interact(mob/user) . = ..() diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 8af83ae08e..d4fe3e27a2 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -7,13 +7,10 @@ icon_keyboard = "med_key" req_one_access = list(ACCESS_MEDICAL, ACCESS_FORENSICS_LOCKERS) circuit = /obj/item/circuitboard/computer/med_data - var/obj/item/card/id/scan = null - var/authenticated = null var/rank = null var/screen = null var/datum/data/record/active1 var/datum/data/record/active2 - var/a_id = null var/temp = null var/printing = null //Sorting Variables @@ -25,24 +22,22 @@ /obj/machinery/computer/med_data/syndie icon_keyboard = "syndie_key" -/obj/machinery/computer/med_data/attackby(obj/item/O, mob/user, params) - if(istype(O, /obj/item/card/id) && !scan) - if(!user.transferItemToLoc(O, src)) - return - scan = O - to_chat(user, "You insert [O].") +/obj/machinery/computer/med_data/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/card/id)) + id_insert_scan(user) else return ..() /obj/machinery/computer/med_data/ui_interact(mob/user) . = ..() + if(isliving(user)) + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) var/dat if(temp) dat = text("[temp]

Clear Screen") else - dat = text("Confirm Identity: []
", (src.scan ? text("[]", src.scan.name) : "----------")) - if(src.authenticated) - switch(src.screen) + if(authenticated) + switch(screen) if(1) dat += {" Search Records @@ -116,7 +111,7 @@ dat += "" dat += "" dat += "ID:[active1.fields["id"]]" - dat += "Sex: [active1.fields["sex"]] " + dat += "Gender: [active1.fields["gender"]] " dat += "Age: [active1.fields["age"]] " dat += "Species: [active1.fields["species"]] " dat += "Fingerprint: [active1.fields["fingerprint"]] " @@ -141,7 +136,7 @@ dat += "
Comments/Log" var/counter = 1 - while(src.active2.fields[text("com_[]", counter)]) + while(active2.fields[text("com_[]", counter)]) dat += "[active2.fields[text("com_[]", counter)]]Delete Entry" counter++ dat += "Add Entry" @@ -169,7 +164,7 @@ dat += "
Medical Robots:" var/bdat = null for(var/mob/living/simple_animal/bot/medbot/M in GLOB.alive_mob_list) - if(M.z != src.z) + if(M.z != z) continue //only find medibots on the same z-level as the computer var/turf/bl = get_turf(M) if(bl) //if it can't find a turf for the medibot, then it probably shouldn't be showing up @@ -189,7 +184,7 @@ dat += "{Log In}" var/datum/browser/popup = new(user, "med_rec", "Medical Records Console", 600, 400) popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.set_title_image(user.browse_rsc_icon(icon, icon_state)) popup.open() /obj/machinery/computer/med_data/Topic(href, href_list) @@ -197,29 +192,20 @@ if(.) return . if(!(active1 in GLOB.data_core.general)) - src.active1 = null + active1 = null if(!(active2 in GLOB.data_core.medical)) - src.active2 = null + active2 = null if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr) || IsAdminGhost(usr)) usr.set_machine(src) if(href_list["temp"]) - src.temp = null - if(href_list["scan"]) - if(src.scan) - usr.put_in_hands(scan) - scan = null - else - var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id) - if(I) - if(!usr.transferItemToLoc(I, src)) - return - src.scan = I + temp = null else if(href_list["logout"]) - src.authenticated = null - src.screen = null - src.active1 = null - src.active2 = null + authenticated = null + screen = null + active1 = null + active2 = null + playsound(src, 'sound/machines/terminal_off.ogg', 50, FALSE) else if(href_list["choice"]) // SORTING! if(href_list["choice"] == "Sorting") @@ -234,34 +220,37 @@ sortBy = href_list["sort"] order = initial(order) else if(href_list["login"]) - if(issilicon(usr)) - src.active1 = null - src.active2 = null - src.authenticated = 1 - src.rank = "AI" - src.screen = 1 - else if(IsAdminGhost(usr)) - src.active1 = null - src.active2 = null - src.authenticated = 1 - src.rank = "Central Command" - src.screen = 1 - else if(istype(src.scan, /obj/item/card/id)) - src.active1 = null - src.active2 = null - if(src.check_access(src.scan)) - src.authenticated = src.scan.registered_name - src.rank = src.scan.assignment - src.screen = 1 - if(src.authenticated) - + var/mob/M = usr + var/obj/item/card/id/I = M.get_idcard(TRUE) + if(issilicon(M)) + active1 = null + active2 = null + authenticated = 1 + rank = "AI" + screen = 1 + else if(IsAdminGhost(M)) + active1 = null + active2 = null + authenticated = 1 + rank = "Central Command" + screen = 1 + else if(istype(I) && check_access(I)) + active1 = null + active2 = null + authenticated = I.registered_name + rank = I.assignment + screen = 1 + else + to_chat(usr, "Unauthorized access.") + playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE) + if(authenticated) if(href_list["screen"]) - src.screen = text2num(href_list["screen"]) - if(src.screen < 1) - src.screen = 1 + screen = text2num(href_list["screen"]) + if(screen < 1) + screen = 1 - src.active1 = null - src.active2 = null + active1 = null + active2 = null else if(href_list["vir"]) var/type = href_list["vir"] @@ -269,7 +258,7 @@ var/AfS = "" for(var/mob/M in Dis.viable_mobtypes) AfS += " [initial(M.name)];" - src.temp = {"Name: [Dis.name] + temp = {"Name: [Dis.name]
Number of stages: [Dis.max_stages]
Spread: [Dis.spread_text] Transmission
Possible Cure: [(Dis.cure_text||"none")] @@ -280,110 +269,112 @@
Severity: [Dis.severity]"} else if(href_list["del_all"]) - src.temp = "Are you sure you wish to delete all records?
\n\tYes
\n\tNo
" + temp = "Are you sure you wish to delete all records?
\n\tYes
\n\tNo
" else if(href_list["del_all2"]) investigate_log("[key_name(usr)] has deleted all medical records.", INVESTIGATE_RECORDS) GLOB.data_core.medical.Cut() - src.temp = "All records deleted." + temp = "All records deleted." else if(href_list["field"]) - var/a1 = src.active1 - var/a2 = src.active2 + var/a1 = active1 + var/a2 = active2 switch(href_list["field"]) if("fingerprint") if(active1) - var/t1 = stripped_input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) + var/t1 = stripped_input("Please input fingerprint hash:", "Med. records", active1.fields["fingerprint"], null) if(!canUseMedicalRecordsConsole(usr, t1, a1)) return - src.active1.fields["fingerprint"] = t1 - if("sex") + active1.fields["fingerprint"] = t1 + if("gender") if(active1) - if(src.active1.fields["sex"] == "Male") - src.active1.fields["sex"] = "Female" + if(active1.fields["gender"] == "Male") + active1.fields["gender"] = "Female" + else if(active1.fields["gender"] == "Female") + active1.fields["gender"] = "Other" else - src.active1.fields["sex"] = "Male" + active1.fields["gender"] = "Male" if("age") if(active1) - var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as num + var/t1 = input("Please input age:", "Med. records", active1.fields["age"], null) as num if(!canUseMedicalRecordsConsole(usr, t1, a1)) return - src.active1.fields["age"] = t1 + active1.fields["age"] = t1 if("species") if(active1) - var/t1 = stripped_input("Please input species name", "Med. records", src.active1.fields["species"], null) + var/t1 = stripped_input("Please input species name", "Med. records", active1.fields["species"], null) if(!canUseMedicalRecordsConsole(usr, t1, a1)) return active1.fields["species"] = t1 if("mi_dis") if(active2) - var/t1 = stripped_input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) + var/t1 = stripped_input("Please input minor disabilities list:", "Med. records", active2.fields["mi_dis"], null) if(!canUseMedicalRecordsConsole(usr, t1, null, a2)) return - src.active2.fields["mi_dis"] = t1 + active2.fields["mi_dis"] = t1 if("mi_dis_d") if(active2) - var/t1 = stripped_input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) + var/t1 = stripped_input("Please summarize minor dis.:", "Med. records", active2.fields["mi_dis_d"], null) if(!canUseMedicalRecordsConsole(usr, t1, null, a2)) return - src.active2.fields["mi_dis_d"] = t1 + active2.fields["mi_dis_d"] = t1 if("ma_dis") if(active2) - var/t1 = stripped_input("Please input major disabilities list:", "Med. records", src.active2.fields["ma_dis"], null) + var/t1 = stripped_input("Please input major disabilities list:", "Med. records", active2.fields["ma_dis"], null) if(!canUseMedicalRecordsConsole(usr, t1, null, a2)) return - src.active2.fields["ma_dis"] = t1 + active2.fields["ma_dis"] = t1 if("ma_dis_d") if(active2) - var/t1 = stripped_input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) + var/t1 = stripped_input("Please summarize major dis.:", "Med. records", active2.fields["ma_dis_d"], null) if(!canUseMedicalRecordsConsole(usr, t1, null, a2)) return - src.active2.fields["ma_dis_d"] = t1 + active2.fields["ma_dis_d"] = t1 if("alg") if(active2) - var/t1 = stripped_input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) + var/t1 = stripped_input("Please state allergies:", "Med. records", active2.fields["alg"], null) if(!canUseMedicalRecordsConsole(usr, t1, null, a2)) return - src.active2.fields["alg"] = t1 + active2.fields["alg"] = t1 if("alg_d") if(active2) - var/t1 = stripped_input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) + var/t1 = stripped_input("Please summarize allergies:", "Med. records", active2.fields["alg_d"], null) if(!canUseMedicalRecordsConsole(usr, t1, null, a2)) return - src.active2.fields["alg_d"] = t1 + active2.fields["alg_d"] = t1 if("cdi") if(active2) - var/t1 = stripped_input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) + var/t1 = stripped_input("Please state diseases:", "Med. records", active2.fields["cdi"], null) if(!canUseMedicalRecordsConsole(usr, t1, null, a2)) return - src.active2.fields["cdi"] = t1 + active2.fields["cdi"] = t1 if("cdi_d") if(active2) - var/t1 = stripped_input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) + var/t1 = stripped_input("Please summarize diseases:", "Med. records", active2.fields["cdi_d"], null) if(!canUseMedicalRecordsConsole(usr, t1, null, a2)) return - src.active2.fields["cdi_d"] = t1 + active2.fields["cdi_d"] = t1 if("notes") if(active2) - var/t1 = stripped_input("Please summarize notes:", "Med. records", src.active2.fields["notes"], null) + var/t1 = stripped_input("Please summarize notes:", "Med. records", active2.fields["notes"], null) if(!canUseMedicalRecordsConsole(usr, t1, null, a2)) return - src.active2.fields["notes"] = t1 + active2.fields["notes"] = t1 if("p_stat") if(active1) - src.temp = "Physical Condition:
\n\t*Deceased*
\n\t*Unconscious*
\n\tActive
\n\tPhysically Unfit
" + temp = "Physical Condition:
\n\t*Deceased*
\n\t*Unconscious*
\n\tActive
\n\tPhysically Unfit
" if("m_stat") if(active1) - src.temp = "Mental Condition:
\n\t*Insane*
\n\t*Unstable*
\n\t*Watch*
\n\tStable
" + temp = "Mental Condition:
\n\t*Insane*
\n\t*Unstable*
\n\t*Watch*
\n\tStable
" if("blood_type") if(active2) - src.temp = "Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
" + temp = "Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
" if("b_dna") if(active2) - var/t1 = stripped_input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) + var/t1 = stripped_input("Please input DNA hash:", "Med. records", active2.fields["b_dna"], null) if(!canUseMedicalRecordsConsole(usr, t1, null, a2)) return - src.active2.fields["b_dna"] = t1 + active2.fields["b_dna"] = t1 if("show_photo_front") if(active1) if(active1.fields["photo_front"]) @@ -402,51 +393,51 @@ if(active1) switch(href_list["p_stat"]) if("deceased") - src.active1.fields["p_stat"] = "*Deceased*" + active1.fields["p_stat"] = "*Deceased*" if("unconscious") - src.active1.fields["p_stat"] = "*Unconscious*" + active1.fields["p_stat"] = "*Unconscious*" if("active") - src.active1.fields["p_stat"] = "Active" + active1.fields["p_stat"] = "Active" if("unfit") - src.active1.fields["p_stat"] = "Physically Unfit" + active1.fields["p_stat"] = "Physically Unfit" else if(href_list["m_stat"]) if(active1) switch(href_list["m_stat"]) if("insane") - src.active1.fields["m_stat"] = "*Insane*" + active1.fields["m_stat"] = "*Insane*" if("unstable") - src.active1.fields["m_stat"] = "*Unstable*" + active1.fields["m_stat"] = "*Unstable*" if("watch") - src.active1.fields["m_stat"] = "*Watch*" + active1.fields["m_stat"] = "*Watch*" if("stable") - src.active1.fields["m_stat"] = "Stable" + active1.fields["m_stat"] = "Stable" else if(href_list["blood_type"]) if(active2) switch(href_list["blood_type"]) if("an") - src.active2.fields["blood_type"] = "A-" + active2.fields["blood_type"] = "A-" if("bn") - src.active2.fields["blood_type"] = "B-" + active2.fields["blood_type"] = "B-" if("abn") - src.active2.fields["blood_type"] = "AB-" + active2.fields["blood_type"] = "AB-" if("on") - src.active2.fields["blood_type"] = "O-" + active2.fields["blood_type"] = "O-" if("ap") - src.active2.fields["blood_type"] = "A+" + active2.fields["blood_type"] = "A+" if("bp") - src.active2.fields["blood_type"] = "B+" + active2.fields["blood_type"] = "B+" if("abp") - src.active2.fields["blood_type"] = "AB+" + active2.fields["blood_type"] = "AB+" if("op") - src.active2.fields["blood_type"] = "O+" + active2.fields["blood_type"] = "O+" else if(href_list["del_r"]) if(active2) - src.temp = "Are you sure you wish to delete the record (Medical Portion Only)?
\n\tYes
\n\tNo
" + temp = "Are you sure you wish to delete the record (Medical Portion Only)?
\n\tYes
\n\tNo
" else if(href_list["del_r2"]) investigate_log("[key_name(usr)] has deleted the medical records for [active1.fields["name"]].", INVESTIGATE_RECORDS) @@ -463,10 +454,10 @@ screen = 4 else if(href_list["new"]) - if((istype(src.active1, /datum/data/record) && !( istype(src.active2, /datum/data/record) ))) + if((istype(active1, /datum/data/record) && !( istype(active2, /datum/data/record) ))) var/datum/data/record/R = new /datum/data/record( ) - R.fields["name"] = src.active1.fields["name"] - R.fields["id"] = src.active1.fields["id"] + R.fields["name"] = active1.fields["name"] + R.fields["id"] = active1.fields["id"] R.name = text("Medical Record #[]", R.fields["id"]) R.fields["blood_type"] = "Unknown" R.fields["b_dna"] = "Unknown" @@ -480,76 +471,77 @@ R.fields["cdi_d"] = "No diseases have been diagnosed at the moment." R.fields["notes"] = "No notes." GLOB.data_core.medical += R - src.active2 = R - src.screen = 4 + active2 = R + screen = 4 else if(href_list["add_c"]) if(!(active2 in GLOB.data_core.medical)) return - var/a2 = src.active2 + var/a2 = active2 var/t1 = stripped_multiline_input("Add Comment:", "Med. records", null, null) if(!canUseMedicalRecordsConsole(usr, t1, null, a2)) return var/counter = 1 - while(src.active2.fields[text("com_[]", counter)]) + while(active2.fields[text("com_[]", counter)]) counter++ - src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []
[]", src.authenticated, src.rank, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1) + active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []
[]", authenticated, rank, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1) else if(href_list["del_c"]) - if((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])])) - src.active2.fields[text("com_[]", href_list["del_c"])] = "Deleted" + if((istype(active2, /datum/data/record) && active2.fields[text("com_[]", href_list["del_c"])])) + active2.fields[text("com_[]", href_list["del_c"])] = "Deleted" else if(href_list["search"]) var/t1 = stripped_input(usr, "Search String: (Name, DNA, or ID)", "Med. records") if(!canUseMedicalRecordsConsole(usr, t1)) return - src.active1 = null - src.active2 = null + active1 = null + active2 = null t1 = lowertext(t1) for(var/datum/data/record/R in GLOB.data_core.medical) if((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"]) || t1 == lowertext(R.fields["b_dna"]))) - src.active2 = R + active2 = R else //Foreach continue //goto(3229) - if(!( src.active2 )) - src.temp = text("Could not locate record [].", sanitize(t1)) + if(!( active2 )) + temp = text("Could not locate record [].", sanitize(t1)) else for(var/datum/data/record/E in GLOB.data_core.general) - if((E.fields["name"] == src.active2.fields["name"] || E.fields["id"] == src.active2.fields["id"])) - src.active1 = E + if((E.fields["name"] == active2.fields["name"] || E.fields["id"] == active2.fields["id"])) + active1 = E else //Foreach continue //goto(3334) - src.screen = 4 + screen = 4 else if(href_list["print_p"]) - if(!( src.printing )) - src.printing = 1 + if(!( printing )) + printing = 1 GLOB.data_core.medicalPrintCount++ playsound(loc, 'sound/items/poster_being_created.ogg', 100, 1) sleep(30) - var/obj/item/paper/P = new /obj/item/paper( src.loc ) + var/obj/item/paper/P = new /obj/item/paper( loc ) P.info = "
Medical Record - (MR-[GLOB.data_core.medicalPrintCount])

" if(active1 in GLOB.data_core.general) - P.info += text("Name: [] ID: []
\nSex: []
\nAge: []
", src.active1.fields["name"], src.active1.fields["id"], src.active1.fields["sex"], src.active1.fields["age"]) + P.info += text("Name: [] ID: []
\nGender: []
\nAge: []
", active1.fields["name"], active1.fields["id"], active1.fields["gender"], active1.fields["age"]) P.info += "\nSpecies: [active1.fields["species"]]
" - P.info += text("\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src.active1.fields["fingerprint"], src.active1.fields["p_stat"], src.active1.fields["m_stat"]) + P.info += text("\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", active1.fields["fingerprint"], active1.fields["p_stat"], active1.fields["m_stat"]) else P.info += "General Record Lost!
" if(active2 in GLOB.data_core.medical) - P.info += text("
\n
Medical Data

\nBlood Type: []
\nDNA: []
\n
\nMinor Disabilities: []
\nDetails: []
\n
\nMajor Disabilities: []
\nDetails: []
\n
\nAllergies: []
\nDetails: []
\n
\nCurrent Diseases: [] (per disease info placed in log/comment section)
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\n
Comments/Log

", src.active2.fields["blood_type"], src.active2.fields["b_dna"], src.active2.fields["mi_dis"], src.active2.fields["mi_dis_d"], src.active2.fields["ma_dis"], src.active2.fields["ma_dis_d"], src.active2.fields["alg"], src.active2.fields["alg_d"], src.active2.fields["cdi"], src.active2.fields["cdi_d"], src.active2.fields["notes"]) + P.info += text("
\n
Medical Data

\nBlood Type: []
\nDNA: []
\n
\nMinor Disabilities: []
\nDetails: []
\n
\nMajor Disabilities: []
\nDetails: []
\n
\nAllergies: []
\nDetails: []
\n
\nCurrent Diseases: [] (per disease info placed in log/comment section)
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\n
Comments/Log

", active2.fields["blood_type"], active2.fields["b_dna"], active2.fields["mi_dis"], active2.fields["mi_dis_d"], active2.fields["ma_dis"], active2.fields["ma_dis_d"], active2.fields["alg"], active2.fields["alg_d"], active2.fields["cdi"], active2.fields["cdi_d"], active2.fields["notes"]) var/counter = 1 - while(src.active2.fields[text("com_[]", counter)]) - P.info += text("[]
", src.active2.fields[text("com_[]", counter)]) + while(active2.fields[text("com_[]", counter)]) + P.info += text("[]
", active2.fields[text("com_[]", counter)]) counter++ - P.name = text("MR-[] '[]'", GLOB.data_core.medicalPrintCount, src.active1.fields["name"]) + P.name = text("MR-[] '[]'", GLOB.data_core.medicalPrintCount, active1.fields["name"]) else P.info += "Medical Record Lost!
" P.name = text("MR-[] '[]'", GLOB.data_core.medicalPrintCount, "Record Lost") P.info += "" - src.printing = null + P.update_icon() + printing = null - src.add_fingerprint(usr) - src.updateUsrDialog() + add_fingerprint(usr) + updateUsrDialog() return /obj/machinery/computer/med_data/emp_act(severity) @@ -560,11 +552,11 @@ switch(rand(1,6)) if(1) if(prob(10)) - R.fields["name"] = random_unique_lizard_name(R.fields["sex"],1) + R.fields["name"] = random_unique_lizard_name(R.fields["gender"],1) else - R.fields["name"] = random_unique_name(R.fields["sex"],1) + R.fields["name"] = random_unique_name(R.fields["gender"],1) if(2) - R.fields["sex"] = pick("Male", "Female") + R.fields["gender"] = pick("Male", "Female", "Other") if(3) R.fields["age"] = rand(AGE_MIN, AGE_MAX) if(4) @@ -583,7 +575,7 @@ if(user) if(message) if(authenticated) - if(user.canUseTopic(src)) + if(user.canUseTopic(src, BE_CLOSE)) if(!record1 || record1 == active1) if(!record2 || record2 == active2) return 1 diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 798b0e4c65..a852612d9d 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -1,143 +1 @@ /obj/machinery/computer/prisoner - name = "prisoner management console" - desc = "Used to manage tracking implants placed inside criminals." - icon_screen = "explosive" - icon_keyboard = "security_key" - req_access = list(ACCESS_BRIG) - var/id = 0 - var/temp = null - var/status = 0 - var/timeleft = 60 - var/stop = 0 - var/screen = 0 // 0 - No Access Denied, 1 - Access allowed - var/obj/item/card/id/prisoner/inserted_id - circuit = /obj/item/circuitboard/computer/prisoner - - light_color = LIGHT_COLOR_RED - -/obj/machinery/computer/prisoner/ui_interact(mob/user) - . = ..() - var/dat = "" - if(screen == 0) - dat += "
Unlock Console" - else if(screen == 1) - dat += "

Prisoner ID Management

" - if(inserted_id) - dat += text("[inserted_id]
") - dat += text("Collected Points: [inserted_id.points]. Reset.
") - dat += text("Card goal: [inserted_id.goal]. Set
") - dat += text("Space Law recommends quotas of 100 points per minute they would normally serve in the brig.
") - else - dat += text("Insert Prisoner ID.
") - dat += "

Prisoner Implant Management

" - dat += "
Chemical Implants
" - var/turf/Tr = null - for(var/obj/item/implant/chem/C in GLOB.tracked_chem_implants) - Tr = get_turf(C) - if((Tr) && (Tr.z != src.z)) - continue//Out of range - if(!C.imp_in) - continue - dat += "ID: [C.imp_in.name] | Remaining Units: [C.reagents.total_volume]
" - dat += "| Inject: " - dat += "((1))" - dat += "((5))" - dat += "((10))
" - dat += "********************************
" - dat += "
Tracking Implants
" - for(var/obj/item/implant/tracking/T in GLOB.tracked_implants) - if(!isliving(T.imp_in)) - continue - Tr = get_turf(T) - if((Tr) && (Tr.z != src.z)) - continue//Out of range - - var/loc_display = "Unknown" - var/mob/living/M = T.imp_in - if(is_station_level(Tr.z) && !isspaceturf(M.loc)) - var/turf/mob_loc = get_turf(M) - loc_display = mob_loc.loc - - dat += "ID: [T.imp_in.name] | Location: [loc_display]
" - dat += "(Message Holder) |
" - dat += "********************************
" - dat += "
Lock Console" - var/datum/browser/popup = new(user, "computer", "Prisoner Management Console", 400, 500) - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - return - -/obj/machinery/computer/prisoner/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/card/id)) - return attack_hand(user) - else - return ..() - -/obj/machinery/computer/prisoner/process() - if(!..()) - src.updateDialog() - return - - -/obj/machinery/computer/prisoner/Topic(href, href_list) - if(..()) - return - if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr)) - usr.set_machine(src) - - if(href_list["id"]) - if(href_list["id"] =="insert" && !inserted_id) - var/obj/item/card/id/prisoner/I = usr.is_holding_item_of_type(/obj/item/card/id/prisoner) - if(I) - if(!usr.transferItemToLoc(I, src)) - return - inserted_id = I - else - to_chat(usr, "No valid ID.") - else if(inserted_id) - switch(href_list["id"]) - if("eject") - inserted_id.forceMove(drop_location()) - inserted_id.verb_pickup() - inserted_id = null - if("reset") - inserted_id.points = 0 - if("setgoal") - var/num = round(input(usr, "Choose prisoner's goal:", "Input an Integer", null) as num|null) - if(num >= 0) - num = min(num,1000) //Cap the quota to the equivilent of 10 minutes. - inserted_id.goal = num - else if(href_list["inject1"]) - var/obj/item/implant/I = locate(href_list["inject1"]) in GLOB.tracked_chem_implants - if(I && istype(I)) - I.activate(1) - else if(href_list["inject5"]) - var/obj/item/implant/I = locate(href_list["inject5"]) in GLOB.tracked_chem_implants - if(I && istype(I)) - I.activate(5) - - else if(href_list["inject10"]) - var/obj/item/implant/I = locate(href_list["inject10"]) in GLOB.tracked_chem_implants - if(I && istype(I)) - I.activate(10) - - else if(href_list["lock"]) - if(src.allowed(usr)) - screen = !screen - else - to_chat(usr, "Unauthorized Access.") - - else if(href_list["warn"]) - var/warning = copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN) - if(!warning) - return - var/obj/item/implant/I = locate(href_list["warn"]) in GLOB.tracked_implants - if(I && istype(I) && I.imp_in) - var/mob/living/R = I.imp_in - to_chat(R, "You hear a voice in your head saying: '[warning]'") - log_directed_talk(usr, R, warning, LOG_SAY, "implant message") - - src.add_fingerprint(usr) - src.updateUsrDialog() - return diff --git a/code/game/machinery/computer/prisoner/_prisoner.dm b/code/game/machinery/computer/prisoner/_prisoner.dm new file mode 100644 index 0000000000..d07c351a22 --- /dev/null +++ b/code/game/machinery/computer/prisoner/_prisoner.dm @@ -0,0 +1,52 @@ +/obj/machinery/computer/prisoner + var/obj/item/card/id/prisoner/contained_id + +/obj/machinery/computer/prisoner/Destroy() + if(contained_id) + contained_id.forceMove(get_turf(src)) + return ..() + + +/obj/machinery/computer/prisoner/examine(mob/user) + . = ..() + if(contained_id) + . += "Alt-click to eject the ID card." + + + +/obj/machinery/computer/prisoner/AltClick(mob/user) + id_eject(user) + return ..() + +/obj/machinery/computer/prisoner/proc/id_insert(mob/user, obj/item/card/id/prisoner/P) + if(istype(P)) + if(contained_id) + to_chat(user, "There's already an ID card in the console!") + return + if(!user.transferItemToLoc(P, src)) + return + contained_id = P + user.visible_message("[user] inserts an ID card into the console.", \ + "You insert the ID card into the console.") + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE) + updateUsrDialog() + +/obj/machinery/computer/prisoner/proc/id_eject(mob/user) + if(!contained_id) + to_chat(user, "There's no ID card in the console!") + return + else + contained_id.forceMove(drop_location()) + if(!issilicon(user) && Adjacent(user)) + user.put_in_hands(contained_id) + contained_id = null + user.visible_message("[user] gets an ID card from the console.", \ + "You get the ID card from the console.") + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE) + updateUsrDialog() + +/obj/machinery/computer/prisoner/attackby(obj/item/I, mob/user) + if(istype(I, /obj/item/card/id/prisoner)) + id_insert(user, I) + else + return ..() diff --git a/code/game/machinery/computer/prisoner/gulag_teleporter.dm b/code/game/machinery/computer/prisoner/gulag_teleporter.dm new file mode 100644 index 0000000000..f6e164efe9 --- /dev/null +++ b/code/game/machinery/computer/prisoner/gulag_teleporter.dm @@ -0,0 +1,142 @@ +//computer that handle the points and teleports the prisoner +/obj/machinery/computer/prisoner/gulag_teleporter_computer + name = "labor camp teleporter console" + desc = "Used to send criminals to the Labor Camp." + icon_screen = "explosive" + icon_keyboard = "security_key" + req_access = list(ACCESS_ARMORY) + circuit = /obj/item/circuitboard/computer/gulag_teleporter_console + var/default_goal = 200 + var/obj/machinery/gulag_teleporter/teleporter = null + var/obj/structure/gulag_beacon/beacon = null + var/mob/living/carbon/human/prisoner = null + var/datum/data/record/temporary_record = null + + light_color = LIGHT_COLOR_RED + +/obj/machinery/computer/prisoner/gulag_teleporter_computer/Initialize() + . = ..() + scan_machinery() + +/obj/machinery/computer/prisoner/gulag_teleporter_computer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ + datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "gulag_console", name, 455, 440, master_ui, state) + ui.open() + +/obj/machinery/computer/prisoner/gulag_teleporter_computer/ui_data(mob/user) + var/list/data = list() + + var/list/prisoner_list = list() + var/can_teleport = FALSE + + if(teleporter && (teleporter.occupant && ishuman(teleporter.occupant))) + prisoner = teleporter.occupant + prisoner_list["name"] = prisoner.real_name + if(contained_id) + can_teleport = TRUE + if(!isnull(GLOB.data_core.general)) + for(var/r in GLOB.data_core.security) + var/datum/data/record/R = r + if(R.fields["name"] == prisoner_list["name"]) + temporary_record = R + prisoner_list["crimstat"] = temporary_record.fields["criminal"] + + data["prisoner"] = prisoner_list + + if(teleporter) + data["teleporter"] = teleporter + data["teleporter_location"] = "([teleporter.x], [teleporter.y], [teleporter.z])" + data["teleporter_lock"] = teleporter.locked + data["teleporter_state_open"] = teleporter.state_open + if(beacon) + data["beacon"] = beacon + data["beacon_location"] = "([beacon.x], [beacon.y], [beacon.z])" + if(contained_id) + data["id"] = contained_id + data["id_name"] = contained_id.registered_name + data["goal"] = contained_id.goal + data["can_teleport"] = can_teleport + + return data + +/obj/machinery/computer/prisoner/gulag_teleporter_computer/ui_act(action, list/params) + if(isliving(usr)) + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) + if(..()) + return + if(!allowed(usr)) + to_chat(usr, "Access denied.") + return + switch(action) + if("scan_teleporter") + teleporter = findteleporter() + if("scan_beacon") + beacon = findbeacon() + if("handle_id") + if(contained_id) + id_eject(usr) + else + id_insert(usr) + if("set_goal") + var/new_goal = input("Set the amount of points:", "Points", contained_id.goal) as num|null + if(!isnum(new_goal)) + return + if(!new_goal) + new_goal = default_goal + if (new_goal > 1000) + to_chat(usr, "The entered amount of points is too large. Points have instead been set to the maximum allowed amount.") + contained_id.goal = CLAMP(new_goal, 0, 1000) //maximum 1000 points + if("toggle_open") + if(teleporter.locked) + to_chat(usr, "The teleporter is locked") + return + teleporter.toggle_open() + if("teleporter_lock") + if(teleporter.state_open) + to_chat(usr, "Close the teleporter before locking!") + return + teleporter.locked = !teleporter.locked + if("teleport") + if(!teleporter || !beacon) + return + addtimer(CALLBACK(src, .proc/teleport, usr), 5) + +/obj/machinery/computer/prisoner/gulag_teleporter_computer/proc/scan_machinery() + teleporter = findteleporter() + beacon = findbeacon() + +/obj/machinery/computer/prisoner/gulag_teleporter_computer/proc/findteleporter() + var/obj/machinery/gulag_teleporter/teleporterf = null + + for(var/direction in GLOB.cardinals) + teleporterf = locate(/obj/machinery/gulag_teleporter, get_step(src, direction)) + if(teleporterf && teleporterf.is_operational()) + return teleporterf + +/obj/machinery/computer/prisoner/gulag_teleporter_computer/proc/findbeacon() + return locate(/obj/structure/gulag_beacon) + +/obj/machinery/computer/prisoner/gulag_teleporter_computer/proc/teleport(mob/user) + if(!contained_id) //incase the ID was removed after the transfer timer was set. + say("Warning: Unable to transfer prisoner without a valid Prisoner ID inserted!") + return + var/id_goal_not_set + if(!contained_id.goal) + id_goal_not_set = TRUE + contained_id.goal = default_goal + say("[contained_id]'s ID card goal defaulting to [contained_id.goal] points.") + log_game("[key_name(user)] teleported [key_name(prisoner)] to the Labor Camp [COORD(beacon)] for [id_goal_not_set ? "default goal of ":""][contained_id.goal] points.") + teleporter.handle_prisoner(contained_id, temporary_record) + playsound(src, 'sound/weapons/emitter.ogg', 50, 1) + prisoner.forceMove(get_turf(beacon)) + prisoner.Stun(40) // small travel dizziness + to_chat(prisoner, "The teleportation makes you a little dizzy.") + new /obj/effect/particle_effect/sparks(get_turf(prisoner)) + playsound(src, "sparks", 50, 1) + if(teleporter.locked) + teleporter.locked = FALSE + teleporter.toggle_open() + contained_id = null + temporary_record = null diff --git a/code/game/machinery/computer/prisoner/management.dm b/code/game/machinery/computer/prisoner/management.dm new file mode 100644 index 0000000000..e231a1748a --- /dev/null +++ b/code/game/machinery/computer/prisoner/management.dm @@ -0,0 +1,139 @@ + +/obj/machinery/computer/prisoner/management + name = "prisoner management console" + desc = "Used to manage tracking implants placed inside criminals." + icon_screen = "explosive" + icon_keyboard = "security_key" + req_access = list(ACCESS_BRIG) + var/id = 0 + var/temp = null + var/status = 0 + var/timeleft = 60 + var/stop = 0 + var/screen = 0 // 0 - No Access Denied, 1 - Access allowed + circuit = /obj/item/circuitboard/computer/prisoner + + light_color = LIGHT_COLOR_RED + +/obj/machinery/computer/prisoner/management/ui_interact(mob/user) + . = ..() + if(isliving(user)) + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) + var/dat = "" + if(screen == 0) + dat += "
{Log In}" + else if(screen == 1) + dat += "

Prisoner ID Management

" + if(contained_id) + dat += text("[contained_id]
") + dat += text("Collected Points: [contained_id.points]. Reset.
") + dat += text("Card goal: [contained_id.goal]. Set
") + dat += text("Space Law recommends quotas of 100 points per minute they would normally serve in the brig.
") + else + dat += text("Insert Prisoner ID.
") + dat += "

Prisoner Implant Management

" + dat += "
Chemical Implants
" + var/turf/Tr = null + for(var/obj/item/implant/chem/C in GLOB.tracked_chem_implants) + Tr = get_turf(C) + if((Tr) && (Tr.z != src.z)) + continue//Out of range + if(!C.imp_in) + continue + dat += "ID: [C.imp_in.name] | Remaining Units: [C.reagents.total_volume]
" + dat += "| Inject: " + dat += "((1))" + dat += "((5))" + dat += "((10))
" + dat += "********************************
" + dat += "
Tracking Implants
" + for(var/obj/item/implant/tracking/T in GLOB.tracked_implants) + if(!isliving(T.imp_in)) + continue + Tr = get_turf(T) + if((Tr) && (Tr.z != src.z)) + continue//Out of range + + var/loc_display = "Unknown" + var/mob/living/M = T.imp_in + if(is_station_level(Tr.z) && !isspaceturf(M.loc)) + var/turf/mob_loc = get_turf(M) + loc_display = mob_loc.loc + + dat += "ID: [T.imp_in.name] | Location: [loc_display]
" + dat += "(Message Holder) |
" + dat += "********************************
" + dat += "
{Log Out}" + var/datum/browser/popup = new(user, "computer", "Prisoner Management Console", 400, 500) + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() + return + +/obj/machinery/computer/prisoner/management/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/card/id)) + if(screen) + id_insert(user) + else + to_chat(user, "Unauthorized access.") + else + return ..() + +/obj/machinery/computer/prisoner/management/process() + if(!..()) + src.updateDialog() + return + +/obj/machinery/computer/prisoner/management/Topic(href, href_list) + if(..()) + return + if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr)) + usr.set_machine(src) + + if(href_list["id"]) + if(href_list["id"] =="insert" && !contained_id) + id_insert(usr) + else if(contained_id) + switch(href_list["id"]) + if("eject") + id_eject(usr) + if("reset") + contained_id.points = 0 + if("setgoal") + var/num = round(input(usr, "Choose prisoner's goal:", "Input an Integer", null) as num|null) + if(num >= 0) + num = min(num,1000) //Cap the quota to the equivilent of 10 minutes. + contained_id.goal = num + else if(href_list["inject1"]) + var/obj/item/implant/I = locate(href_list["inject1"]) in GLOB.tracked_chem_implants + if(I && istype(I)) + I.activate(1) + else if(href_list["inject5"]) + var/obj/item/implant/I = locate(href_list["inject5"]) in GLOB.tracked_chem_implants + if(I && istype(I)) + I.activate(5) + else if(href_list["inject10"]) + var/obj/item/implant/I = locate(href_list["inject10"]) in GLOB.tracked_chem_implants + if(I && istype(I)) + I.activate(10) + + else if(href_list["lock"]) + if(allowed(usr)) + screen = !screen + playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE) + else + to_chat(usr, "Unauthorized access.") + + else if(href_list["warn"]) + var/warning = copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN) + if(!warning) + return + var/obj/item/implant/I = locate(href_list["warn"]) in GLOB.tracked_implants + if(I && istype(I) && I.imp_in) + var/mob/living/R = I.imp_in + to_chat(R, "You hear a voice in your head saying: '[warning]'") + log_directed_talk(usr, R, warning, LOG_SAY, "implant message") + + src.add_fingerprint(usr) + src.updateUsrDialog() + return diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 607f8dbe78..1823e34100 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -5,13 +5,10 @@ icon_keyboard = "security_key" req_one_access = list(ACCESS_SECURITY, ACCESS_FORENSICS_LOCKERS) circuit = /obj/item/circuitboard/computer/secure_data - var/obj/item/card/id/scan = null - var/authenticated = null var/rank = null var/screen = null var/datum/data/record/active1 = null var/datum/data/record/active2 = null - var/a_id = null var/temp = null var/printing = null var/can_change_id = 0 @@ -23,11 +20,6 @@ light_color = LIGHT_COLOR_RED -/obj/machinery/computer/secure_data/examine(mob/user) - ..() - if(scan) - to_chat(user, "Alt-click to eject the ID card.") - /obj/machinery/computer/secure_data/syndie icon_keyboard = "syndie_key" @@ -40,32 +32,19 @@ clockwork = TRUE //it'd look weird pass_flags = PASSTABLE -/obj/machinery/computer/secure_data/attackby(obj/item/O, mob/user, params) - if(istype(O, /obj/item/card/id)) - if(!scan) - if(!user.transferItemToLoc(O, src)) - return - scan = O - to_chat(user, "You insert [O].") - playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) - updateUsrDialog() - else - to_chat(user, "There's already an ID card in the console.") - else - return ..() - //Someone needs to break down the dat += into chunks instead of long ass lines. /obj/machinery/computer/secure_data/ui_interact(mob/user) . = ..() + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) if(src.z > 6) to_chat(user, "Unable to establish a connection: \black You're too far away from the station!") return var/dat if(temp) - dat = text("[]

Clear Screen", temp) + dat = "[temp]

Clear Screen" else - dat = text("Confirm Identity: []
", (scan ? text("[]", scan.name) : "----------")) + dat = "" if(authenticated) switch(screen) if(1) @@ -190,7 +169,7 @@ dat += {"" for(var/j in GLOB.loadout_items[gear_tab]) var/datum/gear/gear = GLOB.loadout_items[gear_tab][j] - var/donoritem - if(gear.ckeywhitelist && gear.ckeywhitelist.len) - donoritem = TRUE - if(!(user.ckey in gear.ckeywhitelist)) - continue + var/donoritem = gear.donoritem + if(donoritem && !gear.donator_ckey_check(user.ckey)) + continue var/class_link = "" if(gear.type in chosen_gear) class_link = "style='white-space:normal;' class='linkOn' href='?_src_=prefs;preference=gear;toggle_gear_path=[html_encode(j)];toggle_gear=0'" @@ -1533,7 +1534,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("undie_color") var/n_undie_color = input(user, "Choose your underwear's color.", "Character Preference", undie_color) as color|null if(n_undie_color) - undie_color = sanitize_hexcolor(n_undie_color, include_crunch= TRUE) + undie_color = sanitize_hexcolor(n_undie_color) if("undershirt") var/new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_list @@ -1543,7 +1544,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("shirt_color") var/n_shirt_color = input(user, "Choose your undershirt's color.", "Character Preference", shirt_color) as color|null if(n_shirt_color) - shirt_color = sanitize_hexcolor(n_shirt_color, include_crunch= TRUE) + shirt_color = sanitize_hexcolor(n_shirt_color) if("socks") var/new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in GLOB.socks_list @@ -1553,7 +1554,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("socks_color") var/n_socks_color = input(user, "Choose your socks' color.", "Character Preference", socks_color) as color|null if(n_socks_color) - socks_color = sanitize_hexcolor(n_socks_color, include_crunch= TRUE) + socks_color = sanitize_hexcolor(n_socks_color) if("eyes") var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference","#"+eye_color) as color|null @@ -2037,6 +2038,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) features["genitals_use_skintone"] = !features["genitals_use_skintone"] if("arousable") arousable = !arousable + if("lewdchem") + lewdchem = !lewdchem if("has_cock") features["has_cock"] = !features["has_cock"] if(features["has_cock"] == FALSE) @@ -2053,6 +2056,10 @@ GLOBAL_LIST_EMPTY(preferences_datums) features["eggsack_internal"] = !features["eggsack_internal"] if("has_breasts") features["has_breasts"] = !features["has_breasts"] + if(features["has_breasts"] == FALSE) + features["breasts_producing"] = FALSE + if("breasts_producing") + features["breasts_producing"] = !features["breasts_producing"] if("has_vag") features["has_vag"] = !features["has_vag"] if(features["has_vag"] == FALSE) @@ -2236,7 +2243,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(!is_loadout_slot_available(G.category)) to_chat(user, "You cannot take this loadout, as you've already chosen too many of the same category!") return - if(G.ckeywhitelist && G.ckeywhitelist.len && !(user.ckey in G.ckeywhitelist)) + if(G.donoritem && !G.donator_ckey_check(user.ckey)) to_chat(user, "This is an item intended for donator use only. You are not authorized to use this item.") return if(gear_points >= initial(G.cost)) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 4ce91ffd94..a3f45f53ca 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -117,6 +117,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["widescreenpref"] >> widescreenpref S["autostand"] >> autostand S["cit_toggles"] >> cit_toggles + S["lewdchem"] >> lewdchem //try to fix any outdated data if necessary if(needs_update >= 0) @@ -211,6 +212,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["widescreenpref"], widescreenpref) WRITE_FILE(S["autostand"], autostand) WRITE_FILE(S["cit_toggles"], cit_toggles) + WRITE_FILE(S["lewdchem"], lewdchem) return 1 @@ -347,6 +349,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["feature_breasts_shape"] >> features["breasts_shape"] S["feature_breasts_color"] >> features["breasts_color"] S["feature_breasts_fluid"] >> features["breasts_fluid"] + S["feature_breasts_producing"] >> features["breasts_producing"] //vagina features S["feature_has_vag"] >> features["has_vag"] S["feature_vag_shape"] >> features["vag_shape"] @@ -396,11 +399,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car hair_style = sanitize_inlist(hair_style, GLOB.hair_styles_female_list) facial_hair_style = sanitize_inlist(facial_hair_style, GLOB.facial_hair_styles_female_list) underwear = sanitize_inlist(underwear, GLOB.underwear_list) - undie_color = sanitize_hexcolor(undie_color, 6, 1, initial(undie_color)) + undie_color = sanitize_hexcolor(undie_color, 3, FALSE, initial(undie_color)) undershirt = sanitize_inlist(undershirt, GLOB.undershirt_list) - shirt_color = sanitize_hexcolor(shirt_color, 6, 1, initial(shirt_color)) + shirt_color = sanitize_hexcolor(shirt_color, 3, FALSE, initial(shirt_color)) socks = sanitize_inlist(socks, GLOB.socks_list) - socks_color = sanitize_hexcolor(socks_color, 6, 1, initial(socks_color)) + socks_color = sanitize_hexcolor(socks_color, 3, FALSE, initial(socks_color)) age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age)) hair_color = sanitize_hexcolor(hair_color, 3, 0) facial_hair_color = sanitize_hexcolor(facial_hair_color, 3, 0) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 04a8e17b7b..33a83487fc 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -437,7 +437,7 @@ item_state = "gas_alt" resistance_flags = NONE armor = list("melee" = 5, "bullet" = 5, "laser" = 5, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) - clothing_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS + clothing_flags = BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDEFACIALHAIR gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 @@ -630,3 +630,27 @@ /obj/item/stamp/chameleon/broken/Initialize() . = ..() chameleon_action.emp_randomise(INFINITY) + +/obj/item/clothing/neck/cloak/chameleon + name = "black tie" + desc = "A neosilk clip-on tie." + icon_state = "blacktie" + item_color = "blacktie" + resistance_flags = NONE + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) + +/obj/item/clothing/neck/cloak/chameleon + var/datum/action/item_action/chameleon/change/chameleon_action + +/obj/item/clothing/neck/cloak/chameleon/Initialize() + . = ..() + chameleon_action = new(src) + chameleon_action.chameleon_type = /obj/item/clothing/neck + chameleon_action.chameleon_name = "Cloak" + chameleon_action.initialize_disguises() + +/obj/item/clothing/neck/cloak/chameleon/emp_act(severity) + . = ..() + if(. & EMP_PROTECT_SELF) + return + chameleon_action.emp_randomise() diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index a87e95e28c..387aa65d20 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -24,11 +24,13 @@ desc = "[desc] The display is flickering slightly." /obj/item/clothing/glasses/hud/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED to_chat(user, "PZZTTPFFFT") desc = "[desc] The display is flickering slightly." + return TRUE /obj/item/clothing/glasses/hud/health name = "health scanner HUD" diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index bc36353ac5..cc6d65b74d 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -65,6 +65,9 @@ var/warcry = "AT" /obj/item/clothing/gloves/rapid/Touch(mob/living/target,proximity = TRUE) + if(!istype(target)) + return + var/mob/living/M = loc if(M.a_intent == INTENT_HARM) @@ -72,9 +75,33 @@ M.adjustStaminaLoss(-2) //Restore 2/3 of the stamina used assuming empty stam buffer. With proper stamina buffer management, this results in a net gain of +.5 stamina per click. if(warcry) M.say("[warcry]", ignore_spam = TRUE, forced = "north star warcry") + .= FALSE + /obj/item/clothing/gloves/rapid/attack_self(mob/user) var/input = stripped_input(user,"What do you want your battlecry to be? Max length of 6 characters.", ,"", 7) if(input) warcry = input + +/obj/item/clothing/gloves/rapid/hug + name = "Hugs of the North Star" + desc = "Just looking at these fills you with an urge to hug the shit out of people" + warcry = "owo" //Shouldn't ever come into play + +/obj/item/clothing/gloves/rapid/hug/Touch(mob/living/target,proximity = TRUE) + if(!istype(target)) + return + + var/mob/living/M = loc + + if(M.a_intent == INTENT_HELP) + if(target.health >= 0 && !HAS_TRAIT(target, TRAIT_FAKEDEATH)) //Can't hug people who are dying/dead + if(target.on_fire || target.lying ) //No spamming extinguishing, helping them up, or other non-hugging/patting help interactions + return + else + M.changeNext_move(CLICK_CD_RAPID) + . = FALSE + +/obj/item/clothing/gloves/rapid/hug/attack_self(mob/user) + return FALSE \ No newline at end of file diff --git a/code/modules/clothing/head/beanie.dm b/code/modules/clothing/head/beanie.dm index bbae5b261f..a5fb04d393 100644 --- a/code/modules/clothing/head/beanie.dm +++ b/code/modules/clothing/head/beanie.dm @@ -74,4 +74,13 @@ icon_state = "beaniestripedgreen" item_color = "beaniestripedgreen" +/obj/item/clothing/head/beanie/durathread + name = "durathread beanie" + desc = "A beanie made from durathread, its resilient fibres provide some protection to the wearer." + icon_state = "beaniedurathread" + item_color = null + armor = list("melee" = 25, "bullet" = 10, "laser" = 20,"energy" = 10, "bomb" = 30, "bio" = 15, "rad" = 20, "fire" = 100, "acid" = 50) + + + //No dog fashion sprites yet :( poor Ian can't be dope like the rest of us yet \ No newline at end of file diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index f4b4e4a96d..be6e270e45 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -336,3 +336,11 @@ for(var/X in actions) var/datum/action/A = X A.UpdateButtonIcon() + + +/obj/item/clothing/head/helmet/durathread + name = "makeshift helmet" + desc = "A hardhat with strips of leather and durathread for additional blunt protection." + icon_state = "durathread" + item_state = "durathread" + armor = list("melee" = 25, "bullet" = 10, "laser" = 20,"energy" = 10, "bomb" = 30, "bio" = 15, "rad" = 20, "fire" = 100, "acid" = 50) diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index 23e1825c3d..298510564c 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -279,6 +279,13 @@ desc = "This headwear shows off your Cargonian leadership" icon_state = "qmberet" +/obj/item/clothing/head/beret/durathread + name = "durathread beret" + desc = "A beret made from durathread, its resilient fibres provide some protection to the wearer." + icon_state = "beretdurathread" + item_color = null + armor = list("melee" = 25, "bullet" = 10, "laser" = 20,"energy" = 10, "bomb" = 30, "bio" = 15, "rad" = 20, "fire" = 100, "acid" = 50) + #undef DRILL_DEFAULT #undef DRILL_SHOUTING #undef DRILL_YELLING diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 73fde5d50f..041f0ba012 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -312,8 +312,8 @@ /obj/item/clothing/head/pharaoh name = "pharaoh hat" desc = "Walk like an Egyptian." - icon_state = "pharoah_hat" - icon_state = "pharoah_hat" + icon_state = "pharaoh_hat" + icon_state = "pharaoh_hat" /obj/item/clothing/head/jester/alt name = "jester hat" diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index ed0ef27174..947aa048c4 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -4,8 +4,8 @@ icon_state = "breath" item_state = "m_mask" body_parts_covered = 0 - clothing_flags = MASKINTERNALS - visor_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS + visor_flags = ALLOWINTERNALS w_class = WEIGHT_CLASS_SMALL gas_transfer_coefficient = 0.1 permeability_coefficient = 0.5 diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index bcf3064c49..c613d1a91e 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -2,7 +2,7 @@ name = "gas mask" desc = "A face-covering mask that can be connected to an air supply. While good for concealing your identity, it isn't good for blocking gas flow." //More accurate icon_state = "gas_alt" - clothing_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS + clothing_flags = BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDEFACIALHAIR|HIDESNOUT w_class = WEIGHT_CLASS_NORMAL item_state = "gas_alt" @@ -59,7 +59,7 @@ /obj/item/clothing/mask/gas/clown_hat name = "clown wig and mask" desc = "A true prankster's facial attire. A clown is incomplete without his wig and mask." - clothing_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS icon_state = "clown" item_state = "clown_hat" flags_cover = MASKCOVERSEYES @@ -91,7 +91,7 @@ /obj/item/clothing/mask/gas/sexyclown name = "sexy-clown wig and mask" desc = "A feminine clown mask for the dabbling crossdressers or female entertainers." - clothing_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS icon_state = "sexyclown" item_state = "sexyclown" flags_cover = MASKCOVERSEYES @@ -100,7 +100,7 @@ /obj/item/clothing/mask/gas/mime name = "mime mask" desc = "The traditional mime's mask. It has an eerie facial posture." - clothing_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS icon_state = "mime" item_state = "mime" flags_cover = MASKCOVERSEYES @@ -132,7 +132,7 @@ /obj/item/clothing/mask/gas/monkeymask name = "monkey mask" desc = "A mask used when acting as a monkey." - clothing_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS icon_state = "monkeymask" item_state = "monkeymask" flags_cover = MASKCOVERSEYES @@ -141,7 +141,7 @@ /obj/item/clothing/mask/gas/sexymime name = "sexy mime mask" desc = "A traditional female mime's mask." - clothing_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS icon_state = "sexymime" item_state = "sexymime" flags_cover = MASKCOVERSEYES @@ -162,7 +162,7 @@ name = "owl mask" desc = "Twoooo!" icon_state = "owl" - clothing_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS flags_cover = MASKCOVERSEYES resistance_flags = FLAMMABLE diff --git a/code/modules/clothing/masks/hailer.dm b/code/modules/clothing/masks/hailer.dm index 8860650fbc..086d47e8bf 100644 --- a/code/modules/clothing/masks/hailer.dm +++ b/code/modules/clothing/masks/hailer.dm @@ -7,10 +7,10 @@ actions_types = list(/datum/action/item_action/halt, /datum/action/item_action/adjust) icon_state = "sechailer" item_state = "sechailer" - clothing_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS + clothing_flags = BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS flags_inv = HIDEFACIALHAIR|HIDEFACE w_class = WEIGHT_CLASS_SMALL - visor_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS + visor_flags = BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS visor_flags_inv = HIDEFACE flags_cover = MASKCOVERSMOUTH visor_flags_cover = MASKCOVERSMOUTH @@ -69,12 +69,14 @@ /obj/item/clothing/mask/gas/sechailer/attack_self() halt() -/obj/item/clothing/mask/gas/sechailer/emag_act(mob/user as mob) - if(safety) - safety = FALSE - to_chat(user, "You silently fry [src]'s vocal circuit with the cryptographic sequencer.") - else + +/obj/item/clothing/mask/gas/sechailer/emag_act(mob/user) + . = ..() + if(!safety) return + safety = FALSE + to_chat(user, "You silently fry [src]'s vocal circuit with the cryptographic sequencer.") + return TRUE /obj/item/clothing/mask/gas/sechailer/verb/halt() set category = "Object" diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 5dfa7d6047..4b8f16a77f 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -313,3 +313,9 @@ message = replacetextEx(message,regex(capitalize(key),"g"), "[capitalize(value)]") message = replacetextEx(message,regex(key,"g"), "[value]") speech_args[SPEECH_MESSAGE] = trim(message) + +/obj/item/clothing/mask/bandana/durathread + name = "durathread bandana" + desc = "A bandana made from durathread, you wish it would provide some protection to its wearer, but it's far too thin..." + icon_state = "banddurathread" + diff --git a/code/modules/clothing/outfits/ert.dm b/code/modules/clothing/outfits/ert.dm index b4310a7f42..523ed55aa4 100644 --- a/code/modules/clothing/outfits/ert.dm +++ b/code/modules/clothing/outfits/ert.dm @@ -45,16 +45,23 @@ R.recalculateChannels() /datum/outfit/ert/commander/alert - name = "ERT Commander - High Alert" + name = "ERT Commander - Amber Alert" suit = /obj/item/clothing/suit/space/hardsuit/ert/alert glasses = /obj/item/clothing/glasses/thermal/eyepatch backpack_contents = list(/obj/item/storage/box/engineer=1,\ /obj/item/melee/baton/loaded=1,\ /obj/item/clothing/mask/gas/sechailer/swat=1,\ - /obj/item/gun/energy/pulse/pistol/loyalpin=1) + /obj/item/gun/energy/e_gun=1) l_pocket = /obj/item/melee/transforming/energy/sword/saber +/datum/outfit/ert/commander/alert/red + name = "ERT Commander - Red Alert" + backpack_contents = list(/obj/item/storage/box/engineer=1,\ + /obj/item/melee/baton/loaded=1,\ + /obj/item/clothing/mask/gas/sechailer/swat=1,\ + /obj/item/gun/energy/pulse/pistol/loyalpin=1) + /datum/outfit/ert/security name = "ERT Security" @@ -80,15 +87,22 @@ R.recalculateChannels() /datum/outfit/ert/security/alert - name = "ERT Security - High Alert" + name = "ERT Security - Amber Alert" suit = /obj/item/clothing/suit/space/hardsuit/ert/alert/sec backpack_contents = list(/obj/item/storage/box/engineer=1,\ /obj/item/storage/box/handcuffs=1,\ /obj/item/clothing/mask/gas/sechailer/swat=1,\ /obj/item/melee/baton/loaded=1,\ - /obj/item/gun/energy/pulse/carbine/loyalpin=1) + /obj/item/gun/energy/e_gun/stun=1) +/datum/outfit/ert/security/alert/red + name = "ERT Security - Red Alert" + backpack_contents = list(/obj/item/storage/box/engineer=1,\ + /obj/item/storage/box/handcuffs=1,\ + /obj/item/clothing/mask/gas/sechailer/swat=1,\ + /obj/item/melee/baton/loaded=1,\ + /obj/item/gun/energy/pulse/carbine/loyalpin=1) /datum/outfit/ert/medic name = "ERT Medic" @@ -117,9 +131,18 @@ R.recalculateChannels() /datum/outfit/ert/medic/alert - name = "ERT Medic - High Alert" + name = "ERT Medic - Amber Alert" suit = /obj/item/clothing/suit/space/hardsuit/ert/alert/med + backpack_contents = list(/obj/item/storage/box/engineer=1,\ + /obj/item/melee/baton/loaded=1,\ + /obj/item/clothing/mask/gas/sechailer/swat=1,\ + /obj/item/gun/energy/e_gun=1,\ + /obj/item/reagent_containers/hypospray/combat/nanites=1,\ + /obj/item/gun/medbeam=1) + +/datum/outfit/ert/medic/alert/red + name = "ERT Medic - Red Alert" backpack_contents = list(/obj/item/storage/box/engineer=1,\ /obj/item/melee/baton/loaded=1,\ /obj/item/clothing/mask/gas/sechailer/swat=1,\ @@ -154,15 +177,51 @@ R.recalculateChannels() /datum/outfit/ert/engineer/alert - name = "ERT Engineer - High Alert" + name = "ERT Engineer - Amber Alert" suit = /obj/item/clothing/suit/space/hardsuit/ert/alert/engi + backpack_contents = list(/obj/item/storage/box/engineer=1,\ + /obj/item/melee/baton/loaded=1,\ + /obj/item/clothing/mask/gas/sechailer/swat=1,\ + /obj/item/gun/energy/e_gun=1,\ + /obj/item/construction/rcd/combat=1) + +/datum/outfit/ert/engineer/alert/red + name = "ERT Engineer - Red Alert" backpack_contents = list(/obj/item/storage/box/engineer=1,\ /obj/item/melee/baton/loaded=1,\ /obj/item/clothing/mask/gas/sechailer/swat=1,\ /obj/item/gun/energy/pulse/pistol/loyalpin=1,\ /obj/item/construction/rcd/combat=1) +/datum/outfit/ert/greybois + name = "Emergency Assistant" + + uniform = /obj/item/clothing/under/color/grey/glorf + shoes = /obj/item/clothing/shoes/sneakers/black + gloves = /obj/item/clothing/gloves/color/fyellow + ears = /obj/item/radio/headset + head = /obj/item/clothing/head/soft/grey + belt = /obj/item/storage/belt/utility/full + back = /obj/item/storage/backpack + mask = /obj/item/clothing/mask/gas + l_pocket = /obj/item/tank/internals/emergency_oxygen + l_hand = /obj/item/storage/toolbox/emergency/old + id = /obj/item/card/id + +/datum/outfit/ert/greybois/greygod + suit = /obj/item/clothing/suit/hazardvest + l_hand = /obj/item/storage/toolbox/plastitanium + gloves = /obj/item/clothing/gloves/color/yellow + +/datum/outfit/ert/greybois/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + if(visualsOnly) + return + var/obj/item/card/id/W = H.wear_id + W.registered_name = H.real_name + W.assignment = "Assistant" + W.access = list(ACCESS_MAINT_TUNNELS,ACCESS_CENT_GENERAL) + W.update_label(W.registered_name, W.assignment) /datum/outfit/centcom_official name = "CentCom Official" diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index e6554f6125..4659de3e6a 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -219,17 +219,13 @@ var/atom/target = get_edge_target_turf(user, user.dir) //gets the user's direction - if (user.throw_at(target, jumpdistance, jumpspeed, spin = FALSE, diagonals_first = TRUE, callback = CALLBACK(src, .proc/hop_end))) - jumping = TRUE + if (user.throw_at(target, jumpdistance, jumpspeed, spin = FALSE, diagonals_first = TRUE)) playsound(src, 'sound/effects/stealthoff.ogg', 50, 1, 1) + recharging_time = world.time + recharging_rate user.visible_message("[usr] dashes forward into the air!") else to_chat(user, "Something prevents you from dashing forward!") -/obj/item/clothing/shoes/bhop/proc/hop_end() - jumping = FALSE - recharging_time = world.time + recharging_rate - /obj/item/clothing/shoes/singery name = "yellow performer's boots" desc = "These boots were made for dancing." diff --git a/code/modules/clothing/spacesuits/_spacesuits.dm b/code/modules/clothing/spacesuits/_spacesuits.dm index 9d3918ed84..662a91c80c 100644 --- a/code/modules/clothing/spacesuits/_spacesuits.dm +++ b/code/modules/clothing/spacesuits/_spacesuits.dm @@ -4,7 +4,7 @@ name = "space helmet" icon_state = "spaceold" desc = "A special helmet with solar UV shielding to protect your eyes from harmful rays." - clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL + clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS item_state = "spaceold" permeability_coefficient = 0.01 armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 50, "fire" = 80, "acid" = 70) diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 85503c720a..2694497579 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -624,19 +624,19 @@ desc = "The Multi-Augmented Severe Operations Networked Resource Integration Gear is an man-portable tank designed for extreme environmental situations. It is excessively bulky, but rated for all but the most atomic of hazards. The specialized armor is surprisingly weak to conventional weaponry. The exo slot can attach most storge bags on to the suit." icon_state = "hardsuit-ancient" item_state = "anc_hardsuit" - armor = list("melee" = 10, "bullet" = 5, "laser" = 5, "energy" = 500, "bomb" = 500, "bio" = 500, "rad" = 500, "fire" = 500, "acid" = 500) + armor = list("melee" = 20, "bullet" = 15, "laser" = 15, "energy" = 45, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) slowdown = 6 //Slow allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/storage, /obj/item/construction/rcd, /obj/item/pipe_dispenser) helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ancient/mason max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT - resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/item/clothing/head/helmet/space/hardsuit/ancient/mason name = "M.A.S.O.N RIG helmet" desc = "The M.A.S.O.N RIG helmet is complimentary to the rest of the armor. It features a very large, high powered flood lamp and robust flash protection." icon_state = "hardsuit0-ancient" item_state = "anc_helm" - armor = list("melee" = 10, "bullet" = 5, "laser" = 5, "energy" = 500, "bomb" = 500, "bio" = 500, "rad" = 500, "fire" = 500, "acid" = 500) + armor = list("melee" = 20, "bullet" = 15, "laser" = 15, "energy" = 45, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) item_color = "ancient" brightness_on = 16 scan_reagents = TRUE @@ -644,7 +644,7 @@ tint = 1 var/obj/machinery/doppler_array/integrated/bomb_radar max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT - resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/item/clothing/head/helmet/space/hardsuit/ancient/mason/Initialize() . = ..() diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 5eec159462..0840288eee 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -238,3 +238,14 @@ /obj/item/clothing/suit/armor/riot/knight/red icon_state = "knight_red" item_state = "knight_red" + +/obj/item/clothing/suit/armor/vest/durathread + name = "makeshift vest" + desc = "A vest made of durathread with strips of leather acting as trauma plates." + icon_state = "durathread" + item_state = "durathread" + strip_delay = 60 + equip_delay_other = 40 + max_integrity = 200 + resistance_flags = FLAMMABLE + armor = list("melee" = 20, "bullet" = 10, "laser" = 30, "energy" = 5, "bomb" = 15, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 50) diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index 3c3c8f0e9d..36965afd07 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -23,30 +23,48 @@ allowed = list(/obj/item/disk, /obj/item/stamp, /obj/item/reagent_containers/food/drinks/flask, /obj/item/melee, /obj/item/storage/lockbox/medal, /obj/item/assembly/flash/handheld, /obj/item/storage/box/matches, /obj/item/lighter, /obj/item/clothing/mask/cigarette, /obj/item/storage/fancy/cigarettes, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) //Chaplain -/obj/item/clothing/suit/nun +/obj/item/clothing/suit/chaplain + name = "chaplain suit" + desc = "A piece of clothing adorned by the gods of Coding. Should never exist in this mortal realm." + allowed = list(/obj/item/storage/book/bible, HOLY_WEAPONS, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) + +/obj/item/clothing/suit/chaplain/nun name = "nun robe" desc = "Maximum piety in this star system." icon_state = "nun" item_state = "nun" body_parts_covered = CHEST|GROIN|LEGS|ARMS|HANDS flags_inv = HIDESHOES|HIDEJUMPSUIT - allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) -/obj/item/clothing/suit/studentuni +/obj/item/clothing/suit/chaplain/studentuni name = "student robe" desc = "The uniform of a bygone institute of learning." icon_state = "studentuni" item_state = "studentuni" body_parts_covered = ARMS|CHEST - allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) -/obj/item/clothing/suit/witchhunter +/obj/item/clothing/suit/chaplain/witchhunter name = "witchunter garb" desc = "This worn outfit saw much use back in the day." icon_state = "witchhunter" item_state = "witchhunter" body_parts_covered = CHEST|GROIN|LEGS|ARMS - allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) + +/obj/item/clothing/suit/chaplain/pharaoh + name = "pharaoh tunic" + desc = "Lavish space tomb not included." + icon_state = "pharaoh" + icon_state = "pharaoh" + body_parts_covered = CHEST|GROIN + +/obj/item/clothing/suit/chaplain/holidaypriest + name = "holiday priest" + desc = "This is a nice holiday, my son." + icon_state = "holidaypriest" + item_state = "w_suit" + body_parts_covered = CHEST|GROIN|LEGS|ARMS + flags_inv = HIDEJUMPSUIT + //Chef /obj/item/clothing/suit/toggle/chef diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index dc1b2b6dc3..ddffe5fe6e 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -167,16 +167,6 @@ icon_state = "griffin_wings" item_state = "griffin_wings" - -/obj/item/clothing/suit/holidaypriest - name = "holiday priest" - desc = "This is a nice holiday, my son." - icon_state = "holidaypriest" - item_state = "w_suit" - body_parts_covered = CHEST|GROIN|LEGS|ARMS - flags_inv = HIDEJUMPSUIT - allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) - /obj/item/clothing/suit/cardborg name = "cardborg suit" desc = "An ordinary cardboard box with holes cut in the sides." @@ -468,13 +458,6 @@ flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT allowed = list(/obj/item/clothing/mask/facehugger/toy) -/obj/item/clothing/suit/nemes - name = "pharoah tunic" - desc = "Lavish space tomb not included." - icon_state = "pharoah" - icon_state = "pharoah" - body_parts_covered = CHEST|GROIN - // WINTER COATS diff --git a/code/modules/clothing/under/accessories.dm b/code/modules/clothing/under/accessories.dm index 396bcb4766..878030bc5d 100644 --- a/code/modules/clothing/under/accessories.dm +++ b/code/modules/clothing/under/accessories.dm @@ -1,4 +1,4 @@ -/obj/item/clothing/accessory //Ties moved to neck slot items, but as there are still things like medals and armbands, this accessory system is being kept as-is +/obj/item/clothing/accessory //Ties moved to neck slot items, but as there are still things like medals, pokadots, and armbands, this accessory system is being kept as-is name = "Accessory" desc = "Something has gone wrong!" icon = 'icons/obj/clothing/accessories.dmi' @@ -354,3 +354,60 @@ item_color = "skull" above_suit = TRUE armor = list("melee" = 5, "bullet" = 5, "laser" = 5, "energy" = 5, "bomb" = 20, "bio" = 20, "rad" = 5, "fire" = 0, "acid" = 25) + +///////////////////// +//Synda Accessories// +///////////////////// + +/obj/item/clothing/accessory/padding + name = "soft padding" + desc = "Some long sheets of padding to help soften the blows of a physical attacks." + icon_state = "padding" + item_color = "nothing" + armor = list("melee" = 15, "bullet" = 10, "laser" = 0, "energy" = 0, "bomb" = 5, "bio" = 0, "rad" = 0, "fire" = -20, "acid" = 45) + +/obj/item/clothing/accessory/kevlar + name = "kevlar sheets" + desc = "Long thin sheets of kevlar to help resist bullets and some physical attacks." + icon_state = "padding" + item_color = "nothing" + armor = list("melee" = 10, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 25) + +/obj/item/clothing/accessory/plastics + name = "underling plastic sheet" + desc = "A full body sheet of white plastic to help defuse lasers and energy based weapons." + icon_state = "plastics" + item_color = "nothing" + armor = list("melee" = 0, "bullet" = 0, "laser" = 20, "energy" = 10, "bomb" = 0, "bio" = 30, "rad" = 0, "fire" = 0, "acid" = -40) + +///////////////////// +//Pokadots On Pants// +///////////////////// + +/obj/item/clothing/accessory/attrocious_pokadots + name = "atrocious pokadots" + desc = "They look like something out of a thrift store. Attaches to clothing not to be worn by itself." + icon_state = "attrocious_pokadots" + item_color = "attrocious_pokadots" + attack_verb = list("horrifed", "eye bleeded") + +/obj/item/clothing/accessory/black_white_pokadots + name = "checkered pokadots" + desc = "You can play a game of chess on these! Attaches to clothing not to be worn by itself." + icon_state = "black_white_pokadots" + item_color = "black_white_pokadots" + attack_verb = list("check", "mate") + +/obj/item/clothing/accessory/nt_pokadots + name = "blue and white pokadots" + desc = "To show your pride in your workplace, in the most annoying possable way. Attaches to clothing not to be worn by itself." + icon_state = "nt_pokadots" + item_color = "nt_pokadots" + attack_verb = list("eye bleeded", "annoyed") + +/obj/item/clothing/accessory/syndi_pokadots + name = "black and red pokadots" + desc = "King me. Attaches to clothing not to be worn by itself." //checkers! + icon_state = "syndi_pokadots" + item_color = "syndi_pokadots" + attack_verb = list("jumped", "taken") \ No newline at end of file diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index abc157fa71..616c00b6c1 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -703,14 +703,6 @@ fitted = NO_FEMALE_UNIFORM can_adjust = FALSE resistance_flags = NONE -/obj/item/clothing/under/durathread - name = "durathread jumpsuit" - desc = "A jumpsuit made from durathread, its resilient fibres provide some protection to the wearer." - icon_state = "durathread" - item_state = "durathread" - item_color = "durathread" - can_adjust = FALSE - armor = list("melee" = 10, "laser" = 10, "fire" = 40, "acid" = 10, "bomb" = 5) /obj/item/clothing/under/gear_harness name = "gear harness" @@ -718,3 +710,22 @@ icon_state = "gear_harness" item_state = "gear_harness" //We dont use golem do to being a item, item without faces making it default to error suit sprites. body_parts_covered = CHEST|GROIN + +/obj/item/clothing/under/durathread + name = "durathread jumpsuit" + desc = "A jumpsuit made from durathread, its resilient fibres provide some protection to the wearer." + icon_state = "durathread" + item_state = "durathread" + item_color = "durathread" + can_adjust = TRUE + armor = list("melee" = 10, "laser" = 10, "fire" = 40, "acid" = 10, "bomb" = 5) + +/obj/item/clothing/under/duraskirt + name = "durathread jumpskirt" + desc = "A jumpsuit made from durathread, its resilient fibres provide some protection to the wearer. Being a short skirt, it naturally doesn't protect the legs." + icon_state = "duraskirt" + item_state = "duraskirt" + item_color = "durathread" + can_adjust = FALSE + body_parts_covered = CHEST|GROIN|ARMS + armor = list("melee" = 10, "laser" = 10, "fire" = 40, "acid" = 10, "bomb" = 5) \ No newline at end of file diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm index 48ade24bbe..73052acfe1 100644 --- a/code/modules/crafting/recipes.dm +++ b/code/modules/crafting/recipes.dm @@ -359,6 +359,7 @@ reqs = list(/obj/item/restraints/handcuffs/cable = 1, /obj/item/shard = 1, /obj/item/stack/rods = 1) + parts = list(/obj/item/shard = 1) time = 40 category = CAT_WEAPONRY subcategory = CAT_WEAPON @@ -675,12 +676,12 @@ /datum/crafting_recipe/femur_breaker name = "Femur Breaker" result = /obj/structure/femur_breaker - time = 150 + time = 150 reqs = list(/obj/item/stack/sheet/metal = 20, /obj/item/stack/cable_coil = 30) tools = list(TOOL_SCREWDRIVER, TOOL_WRENCH, TOOL_WELDER) category = CAT_MISC - + /datum/crafting_recipe/lizardhat name = "Lizard Cloche Hat" result = /obj/item/clothing/head/lizard @@ -895,3 +896,44 @@ time = 150 //It's a gun category = CAT_WEAPONRY subcategory = CAT_WEAPON + +/datum/crafting_recipe/durathread_duffelbag + name = "Durathread Dufflebag" + result = /obj/item/storage/backpack/duffelbag/durathread + reqs = list(/obj/item/stack/sheet/durathread = 7, + /obj/item/stack/sheet/leather = 3) + time = 70 + category = CAT_CLOTHING + +/datum/crafting_recipe/durathread_toolbelt + name = "Durathread Toolbelt" + result = /obj/item/storage/belt/durathread + reqs = list(/obj/item/stack/sheet/durathread = 5, + /obj/item/stack/sheet/leather = 1) + time = 30 + category = CAT_CLOTHING + +/datum/crafting_recipe/durathread_bandolier + name = "Durathread Bandolier" + result = /obj/item/storage/belt/bandolier/durathread + reqs = list(/obj/item/stack/sheet/durathread = 6, + /obj/item/stack/sheet/leather = 2) + time = 50 + category = CAT_CLOTHING + + /datum/crafting_recipe/durathread_helmet + name = "Makeshift Durathread Helmet" + result = /obj/item/clothing/head/helmet/durathread + reqs = list(/obj/item/stack/sheet/durathread = 4, + /obj/item/stack/sheet/leather = 2) + time = 30 + category = CAT_CLOTHING + +/datum/crafting_recipe/durathread_vest + name = "Makeshift Durathread Armour" + result = /obj/item/clothing/suit/armor/vest/durathread + reqs = list(/obj/item/stack/sheet/durathread = 6, + /obj/item/stack/sheet/leather = 3) + time = 50 + category = CAT_CLOTHING + diff --git a/code/modules/events/holiday/vday.dm b/code/modules/events/holiday/vday.dm index a4e8b276b5..8f77af58eb 100644 --- a/code/modules/events/holiday/vday.dm +++ b/code/modules/events/holiday/vday.dm @@ -41,11 +41,16 @@ else L.mind.add_antag_datum(/datum/antagonist/heartbreaker) -/proc/forge_valentines_objective(mob/living/lover,mob/living/date) +/proc/forge_valentines_objective(mob/living/lover,mob/living/date,var/chemLove = FALSE) lover.mind.special_role = "valentine" - var/datum/antagonist/valentine/V = new - V.date = date.mind - lover.mind.add_antag_datum(V) //These really should be teams but i can't be assed to incorporate third wheels right now + if (chemLove == TRUE) + var/datum/antagonist/valentine/chem/V = new //Changes text and EOG check basically. + V.date = date.mind + lover.mind.add_antag_datum(V) + else + var/datum/antagonist/valentine/V = new + V.date = date.mind + lover.mind.add_antag_datum(V) //These really should be teams but i can't be assed to incorporate third wheels right now /datum/round_event/valentines/announce(fake) priority_announce("It's Valentine's Day! Give a valentine to that special someone!") diff --git a/code/modules/events/meteor_wave.dm b/code/modules/events/meteor_wave.dm index 798bcf82dd..af22ae3b96 100644 --- a/code/modules/events/meteor_wave.dm +++ b/code/modules/events/meteor_wave.dm @@ -15,6 +15,12 @@ var/list/wave_type var/wave_name = "normal" +/datum/round_event/meteor_wave/setup() + announceWhen = 1 + startWhen = rand(300, 600) //Yeah for SOME REASON this is measured in seconds and not deciseconds??? + endWhen = startWhen + 60 + + /datum/round_event/meteor_wave/New() ..() if(!wave_type) @@ -46,7 +52,7 @@ kill() /datum/round_event/meteor_wave/announce(fake) - priority_announce("Meteors have been detected on collision course with the station.", "Meteor Alert", 'sound/ai/meteors.ogg') + priority_announce("Meteors have been detected on collision course with the station. Estimated time until impact: [round(startWhen/60)] minutes.", "Meteor Alert", 'sound/ai/meteors.ogg') /datum/round_event/meteor_wave/tick() if(ISMULTIPLE(activeFor, 3)) diff --git a/code/modules/food_and_drinks/food/snacks_other.dm b/code/modules/food_and_drinks/food/snacks_other.dm index e36efe750b..c4b9451c7f 100644 --- a/code/modules/food_and_drinks/food/snacks_other.dm +++ b/code/modules/food_and_drinks/food/snacks_other.dm @@ -573,4 +573,14 @@ name = "Maintenance Peaches" desc = "I have a mouth and I must eat." icon_state = "peachcanmaint" - tastes = list("peaches" = 1, "tin" = 7) \ No newline at end of file + tastes = list("peaches" = 1, "tin" = 7) + +/obj/item/reagent_containers/food/snacks/chocolatestrawberry + name = "Chocolate dipped strawberries" + desc = "A strawberry dipped in a bit of chocolate." + icon_state = "chocolatestrawberry" + list_reagents = list("sugar" = 5, "nutriment" = 2) + filling_color = "#ffdf26" + w_class = WEIGHT_CLASS_NORMAL + tastes = list("strawberries" = 5, "chocolate" = 3) + foodtype = FRUIT | SUGAR \ No newline at end of file diff --git a/code/modules/food_and_drinks/food/snacks_pastry.dm b/code/modules/food_and_drinks/food/snacks_pastry.dm index 238bb4f86a..9b87002738 100644 --- a/code/modules/food_and_drinks/food/snacks_pastry.dm +++ b/code/modules/food_and_drinks/food/snacks_pastry.dm @@ -308,7 +308,6 @@ tastes = list("bread" = 1, "egg" = 1, "cheese" = 1) foodtype = GRAIN | MEAT | DAIRY - /obj/item/reagent_containers/food/snacks/sugarcookie name = "sugar cookie" desc = "Just like your little sister used to make." @@ -369,6 +368,16 @@ tastes = list("cake" = 3, "blue cherry" = 1) foodtype = GRAIN | FRUIT | SUGAR +/obj/item/reagent_containers/food/snacks/strawberrycupcake + name = "Strawberry cupcake" + desc = "Strawberry inside a delicious cupcake." + icon_state = "strawberrycupcake" + bonus_reagents = list("nutriment" = 1, "vitamin" = 3) + list_reagents = list("nutriment" = 5, "vitamin" = 1) + filling_color = "#F0E68C" + tastes = list("cake" = 2, "strawberry" = 1) + foodtype = GRAIN | FRUIT | SUGAR + /obj/item/reagent_containers/food/snacks/honeybun name = "honey bun" desc = "A sticky pastry bun glazed with honey." diff --git a/code/modules/food_and_drinks/food/snacks_pie.dm b/code/modules/food_and_drinks/food/snacks_pie.dm index 20313fd1b7..be6c11fd68 100644 --- a/code/modules/food_and_drinks/food/snacks_pie.dm +++ b/code/modules/food_and_drinks/food/snacks_pie.dm @@ -315,4 +315,12 @@ filling_color = "#1E90FF" list_reagents = list("nutriment" = 2, "vitamin" = 4) tastes = list("nuts" = 1, "pie" = 1) - foodtype = GRAIN \ No newline at end of file + foodtype = GRAIN + +/obj/item/reagent_containers/food/snacks/pie/strawberrypie + name = "strawberry pie" + desc = "A strawberry.pie." + icon_state = "strawberrypie" + bonus_reagents = list("nutriment" = 6, "vitamin" = 6) + tastes = list("strawberry" = 1, "pie" = 1) + foodtype = GRAIN | FRUIT | SUGAR diff --git a/code/modules/food_and_drinks/food/snacks_vend.dm b/code/modules/food_and_drinks/food/snacks_vend.dm index 317a434040..8f661b868e 100644 --- a/code/modules/food_and_drinks/food/snacks_vend.dm +++ b/code/modules/food_and_drinks/food/snacks_vend.dm @@ -7,7 +7,7 @@ desc = "Nougat love it or hate it." icon_state = "candy" trash = /obj/item/trash/candy - list_reagents = list("nutriment" = 1, "sugar" = 3) + list_reagents = list("nutriment" = 1, "sugar" = 3, "cocoa" = 3) junkiness = 25 filling_color = "#D2691E" tastes = list("candy" = 1) diff --git a/code/modules/food_and_drinks/recipes/drinks_recipes.dm b/code/modules/food_and_drinks/recipes/drinks_recipes.dm index 7c44857b1d..82e80d7584 100644 --- a/code/modules/food_and_drinks/recipes/drinks_recipes.dm +++ b/code/modules/food_and_drinks/recipes/drinks_recipes.dm @@ -794,4 +794,11 @@ name = "Red Queen" id = "red_queen" results = list("red_queen" = 10) - required_reagents = list("tea" = 6, "mercury" = 2, "blackpepper" = 1, "growthserum" = 1) \ No newline at end of file + required_reagents = list("tea" = 6, "mercury" = 2, "blackpepper" = 1, "growthserum" = 1) + +/datum/chemical_reaction/commander_and_chief + name = "Commander and Chief" + id = "commander_and_chief" + results = list("commander_and_chief" = 50) + required_reagents = list("alliescocktail" = 50, "champagne" = 20, "doctorsdelight" = 10, "quintuple_sec" = 10, "screwdrivercocktail" = 10) + mix_message = "When your powers combine, I am Captain Pl-..." diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_misc.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_misc.dm index ce33cbef77..9cf5ea31a0 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_misc.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_misc.dm @@ -332,3 +332,12 @@ ) result = /obj/item/reagent_containers/food/snacks/riceball subcategory = CAT_MISCFOOD + +/datum/crafting_recipe/food/chocolatestrawberry + name = "Chocolate Strawberry" + reqs = list( + /obj/item/reagent_containers/food/snacks/chocolatebar = 1, + /obj/item/reagent_containers/food/snacks/grown/strawberry = 1 + ) + result = /obj/item/reagent_containers/food/snacks/chocolatestrawberry + subcategory = CAT_MISCFOOD \ No newline at end of file diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_pastry.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_pastry.dm index 2246d12df4..365cf499bb 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_pastry.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_pastry.dm @@ -23,7 +23,7 @@ result = /obj/item/reagent_containers/food/snacks/donut subcategory = CAT_PASTRY -/datum/crafting_recipe/food/donut +/datum/crafting_recipe/food/donut/semen time = 15 name = "Semen donut" reqs = list( @@ -325,6 +325,15 @@ datum/crafting_recipe/food/donut/meat result = /obj/item/reagent_containers/food/snacks/bluecherrycupcake subcategory = CAT_PASTRY +/datum/crafting_recipe/food/strawberrycupcake + name = "Strawberry cherry cupcake" + reqs = list( + /obj/item/reagent_containers/food/snacks/pastrybase = 1, + /obj/item/reagent_containers/food/snacks/grown/strawberry = 1 + ) + result = /obj/item/reagent_containers/food/snacks/strawberrycupcake + subcategory = CAT_PASTRY + /datum/crafting_recipe/food/honeybun name = "Honey bun" reqs = list( diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_pie.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_pie.dm index 39eb4ce05e..81824dc4b8 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_pie.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_pie.dm @@ -160,6 +160,15 @@ result = /obj/item/reagent_containers/food/snacks/pie/frostypie subcategory = CAT_PIE +/datum/crafting_recipe/food/strawberrypie + name = "Strawberry pie" + reqs = list( + /obj/item/reagent_containers/food/snacks/pie/plain = 1, + /obj/item/reagent_containers/food/snacks/grown/strawberry = 1 + ) + result = /obj/item/reagent_containers/food/snacks/pie/strawberrypie + subcategory = CAT_PIE + /datum/crafting_recipe/food/baklava name = "Baklava pie" reqs = list( diff --git a/code/modules/goonchat/browserassets/css/browserOutput.css b/code/modules/goonchat/browserassets/css/browserOutput.css index b6db020df0..7b942494f4 100644 --- a/code/modules/goonchat/browserassets/css/browserOutput.css +++ b/code/modules/goonchat/browserassets/css/browserOutput.css @@ -404,6 +404,31 @@ h1.alert, h2.alert {color: #99aab5;} .redtext {color: #c51e1e; font-size: 24px;} .clown {color: #ff70c1; font-size: 24px; font-family: "Comic Sans MS", cursive, sans-serif; font-weight: bold;} .his_grace {color: #15D512; font-family: "Courier New", cursive, sans-serif; font-style: italic;} +.velvet {color: #660015; font-weight: bold; animation: velvet 5000ms infinite;} +@keyframes velvet { + 0% { color: #400020; } + 40% { color: #FF0000; } + 50% { color: #FF8888; } + 60% { color: #FF0000; } + 100% { color: #400020; } +} + +.hypnophrase {color: #202020; font-weight: bold; animation: hypnocolor 1500ms infinite;} +@keyframes hypnocolor { + 0% { color: #202020; } + 25% { color: #4b02ac; } + 50% { color: #9f41f1; } + 75% { color: #541c9c; } + 100% { color: #7adbf3; } +} + +.phobia {color: #dd0000; font-weight: bold; animation: phobia 750ms infinite;} +@keyframes phobia { + 0% { color: #f75a5a; } + 50% { color: #dd0000; } + 100% { color: #f75a5a; } +} + .icon {height: 1em; width: auto;} diff --git a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm index 4ffc10f9c2..6cc11afdf5 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -149,6 +149,7 @@ active_power_usage = 50 + spawned.len * 3 + effects.len * 5 /obj/machinery/computer/holodeck/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return if(!LAZYLEN(emag_programs)) @@ -160,6 +161,7 @@ to_chat(user, "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator.") log_game("[key_name(user)] emagged the Holodeck Control Console") nerf(!(obj_flags & EMAGGED)) + return TRUE /obj/machinery/computer/holodeck/emp_act(severity) . = ..() diff --git a/code/modules/holodeck/holo_effect.dm b/code/modules/holodeck/holo_effect.dm index fee0b2b7c9..308cec1cbd 100644 --- a/code/modules/holodeck/holo_effect.dm +++ b/code/modules/holodeck/holo_effect.dm @@ -78,6 +78,12 @@ // these vars are not really standardized but all would theoretically create stuff on death for(var/v in list("butcher_results","corpse","weapon1","weapon2","blood_volume") & mob.vars) mob.vars[v] = null + ENABLE_BITFIELD(mob.flags_1, HOLOGRAM_1) + if(isliving(mob)) + var/mob/living/L = mob + L.feeding = FALSE + L.devourable = FALSE + L.digestable = FALSE return mob /obj/effect/holodeck_effect/mobspawner/deactivate(var/obj/machinery/computer/holodeck/HC) @@ -100,7 +106,7 @@ /obj/effect/holodeck_effect/mobspawner/penguin mobtype = /mob/living/simple_animal/pet/penguin/emperor - + /obj/effect/holodeck_effect/mobspawner/penguin/Initialize() if(prob(1)) mobtype = /mob/living/simple_animal/pet/penguin/emperor/shamebrero diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index d6eacfe0e1..79a23014b0 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -69,6 +69,8 @@ if(default_deconstruction_screwdriver(user, "dnamod", "dnamod", I)) update_icon() return + else if(default_unfasten_wrench(user, I)) + return if(default_deconstruction_crowbar(I)) return if(iscyborg(user)) diff --git a/code/modules/hydroponics/grown/berries.dm b/code/modules/hydroponics/grown/berries.dm index 19abdacf3a..ef019387e8 100644 --- a/code/modules/hydroponics/grown/berries.dm +++ b/code/modules/hydroponics/grown/berries.dm @@ -215,3 +215,26 @@ filling_color = "#7FFF00" tastes = list("green grape" = 1) distill_reagent = "cognac" + +// Strawberry +/obj/item/seeds/strawberry + name = "pack of strawberry seeds" + desc = "These seeds grow into strawberry vines." + icon_state = "seed-strawberry" + species = "strawberry" + plantname = "Strawberry Vine" + product = /obj/item/reagent_containers/food/snacks/grown/strawberry + growthstages = 6 + growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi' + icon_grow = "strawberry-grow" + icon_dead = "berry-dead" + reagents_add = list("vitamin" = 0.07, "nutriment" = 0.1, "sugar" = 0.2) + mutatelist = list() + +/obj/item/reagent_containers/food/snacks/grown/strawberry + seed = /obj/item/seeds/strawberry + name = "strawberry" + icon_state = "strawberry" + filling_color = "#7FFF00" + tastes = list("strawberries" = 1) + wine_power = 20 diff --git a/code/modules/hydroponics/grown/cotton.dm b/code/modules/hydroponics/grown/cotton.dm new file mode 100644 index 0000000000..045839d0de --- /dev/null +++ b/code/modules/hydroponics/grown/cotton.dm @@ -0,0 +1,79 @@ +/obj/item/seeds/cotton + name = "pack of cotton seeds" + desc = "A pack of seeds that'll grow into a cotton plant. Assistants make good free labor if neccesary." + icon_state = "seed-cotton" + species = "cotton" + plantname = "Cotton" + icon_harvest = "cotton-harvest" + product = /obj/item/grown/cotton + lifespan = 35 + endurance = 25 + maturation = 15 + production = 1 + yield = 2 + potency = 50 + growthstages = 3 + growing_icon = 'icons/obj/hydroponics/growing.dmi' + icon_dead = "cotton-dead" + mutatelist = list(/obj/item/seeds/cotton/durathread) + +/obj/item/grown/cotton + seed = /obj/item/seeds/cotton + name = "cotton bundle" + desc = "A fluffy bundle of cotton." + icon_state = "cotton" + force = 0 + throwforce = 0 + w_class = WEIGHT_CLASS_TINY + throw_speed = 2 + throw_range = 3 + attack_verb = list("pomfed") + var/cotton_type = /obj/item/stack/sheet/cotton + var/cotton_name = "raw cotton" + +/obj/item/grown/cotton/attack_self(mob/user) + user.show_message("You pull some [cotton_name] out of the [name]!", 1) + var/seed_modifier = 0 + if(seed) + seed_modifier = round(seed.potency / 25) + var/obj/item/stack/cotton = new cotton_type(user.loc, 1 + seed_modifier) + var/old_cotton_amount = cotton.amount + for(var/obj/item/stack/ST in user.loc) + if(ST != cotton && istype(ST, cotton_type) && ST.amount < ST.max_amount) + ST.attackby(cotton, user) + if(cotton.amount > old_cotton_amount) + to_chat(user, "You add the newly-formed [cotton_name] to the stack. It now contains [cotton.amount] [cotton_name].") + qdel(src) + +//reinforced mutated variant +/obj/item/seeds/cotton/durathread + name = "pack of durathread seeds" + desc = "A pack of seeds that'll grow into an extremely durable thread that could easily rival plasteel if woven properly." + icon_state = "seed-durathread" + species = "durathread" + plantname = "Durathread" + icon_harvest = "durathread-harvest" + product = /obj/item/grown/cotton/durathread + lifespan = 80 + endurance = 50 + maturation = 15 + production = 1 + yield = 2 + potency = 50 + growthstages = 3 + growing_icon = 'icons/obj/hydroponics/growing.dmi' + icon_dead = "cotton-dead" + +/obj/item/grown/cotton/durathread + seed = /obj/item/seeds/cotton/durathread + name = "durathread bundle" + desc = "A tough bundle of durathread, good luck unraveling this." + icon_state = "durathread" + force = 5 + throwforce = 5 + w_class = WEIGHT_CLASS_NORMAL + throw_speed = 2 + throw_range = 3 + attack_verb = list("bashed", "battered", "bludgeoned", "whacked") + cotton_type = /obj/item/stack/sheet/cotton/durathread + cotton_name = "raw durathread" \ No newline at end of file diff --git a/code/modules/hydroponics/grown/flowers.dm b/code/modules/hydroponics/grown/flowers.dm index 4e1718f853..f1aea5706a 100644 --- a/code/modules/hydroponics/grown/flowers.dm +++ b/code/modules/hydroponics/grown/flowers.dm @@ -25,6 +25,7 @@ slot_flags = ITEM_SLOT_HEAD filling_color = "#FF6347" bitesize_mod = 3 + tastes = list("sesame seeds" = 1) foodtype = VEGETABLES | GROSS distill_reagent = "vermouth" @@ -43,6 +44,7 @@ name = "lily" desc = "A beautiful orange flower." icon_state = "lily" + tastes = list("pelts " = 1) filling_color = "#FFA500" // Geranium @@ -61,6 +63,7 @@ desc = "A beautiful blue flower." icon_state = "geranium" filling_color = "#008B8B" + tastes = list("pelts " = 1) // Harebell /obj/item/seeds/harebell @@ -86,6 +89,7 @@ name = "harebell" desc = "\"I'll sweeten thy sad grave: thou shalt not lack the flower that's like thy face, pale primrose, nor the azured hare-bell, like thy veins; no, nor the leaf of eglantine, whom not to slander, out-sweeten'd not thy breath.\"" icon_state = "harebell" + tastes = list("salt" = 1) slot_flags = ITEM_SLOT_HEAD filling_color = "#E6E6FA" bitesize_mod = 3 @@ -123,6 +127,7 @@ w_class = WEIGHT_CLASS_TINY throw_speed = 1 throw_range = 3 + tastes = list("seeds" = 1) /obj/item/grown/sunflower/attack(mob/M, mob/user) to_chat(M, " [user] smacks you with a sunflower!FLOWER POWER") @@ -153,6 +158,7 @@ filling_color = "#E6E6FA" bitesize_mod = 2 distill_reagent = "absinthe" //It's made from flowers. + tastes = list("glowbugs" = 1) // Novaflower /obj/item/seeds/sunflower/novaflower @@ -184,6 +190,7 @@ throw_range = 3 attack_verb = list("roasted", "scorched", "burned") grind_results = list("capsaicin" = 0, "condensedcapsaicin" = 0) + tastes = list("cooked sunflower" = 1) /obj/item/grown/novaflower/add_juice() ..() diff --git a/code/modules/hydroponics/grown/peach.dm b/code/modules/hydroponics/grown/peach.dm new file mode 100644 index 0000000000..6fbf933bd1 --- /dev/null +++ b/code/modules/hydroponics/grown/peach.dm @@ -0,0 +1,27 @@ +// Peach +/obj/item/seeds/peach + name = "pack of peach seeds" + desc = "These seeds grow into peach trees." + icon_state = "seed-peach" + species = "peach" + plantname = "Peach Tree" + product = /obj/item/reagent_containers/food/snacks/grown/peach + lifespan = 65 + endurance = 40 + yield = 3 + growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi' + icon_grow = "peach-grow" + icon_dead = "peach-dead" + genes = list(/datum/plant_gene/trait/repeated_harvest) + reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1) + +/obj/item/reagent_containers/food/snacks/grown/peach + seed = /obj/item/seeds/peach + name = "peach" + desc = "It's fuzzy!" + icon_state = "peach" + filling_color = "#FF4500" + bitesize = 25 + foodtype = FRUIT + juice_results = list("peachjuice" = 0) + tastes = list("peach" = 1) diff --git a/code/modules/hydroponics/grown/tea_coffee.dm b/code/modules/hydroponics/grown/tea_coffee.dm index fc84617ed8..d9e775acc0 100644 --- a/code/modules/hydroponics/grown/tea_coffee.dm +++ b/code/modules/hydroponics/grown/tea_coffee.dm @@ -14,6 +14,7 @@ icon_dead = "tea-dead" genes = list(/datum/plant_gene/trait/repeated_harvest) mutatelist = list(/obj/item/seeds/tea/astra) + reagents_add = list("teapowder" = 0.1) /obj/item/reagent_containers/food/snacks/grown/tea seed = /obj/item/seeds/tea diff --git a/code/modules/hydroponics/growninedible.dm b/code/modules/hydroponics/growninedible.dm index 5aeef19b1a..c0e3beaf79 100644 --- a/code/modules/hydroponics/growninedible.dm +++ b/code/modules/hydroponics/growninedible.dm @@ -7,6 +7,7 @@ icon = 'icons/obj/hydroponics/harvest.dmi' resistance_flags = FLAMMABLE var/obj/item/seeds/seed = null // type path, gets converted to item on New(). It's safe to assume it's always a seed item. + var/tastes = list("indescribable" = 1) //Stops runtimes. Grown are un-eatable anyways so if you do then its a bug /obj/item/grown/Initialize(newloc, obj/item/seeds/new_seed) . = ..() diff --git a/code/modules/integrated_electronics/core/printer.dm b/code/modules/integrated_electronics/core/printer.dm index de3ade389f..f0aa10f2da 100644 --- a/code/modules/integrated_electronics/core/printer.dm +++ b/code/modules/integrated_electronics/core/printer.dm @@ -193,7 +193,7 @@ else if(ispath(build_type, /obj/item/integrated_circuit)) var/obj/item/integrated_circuit/IC = SScircuit.cached_components[build_type] cost = IC.materials[MAT_METAL] - else if(!build_type in SScircuit.circuit_fabricator_recipe_list["Tools"]) + else if(!(build_type in SScircuit.circuit_fabricator_recipe_list["Tools"])) return var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) diff --git a/code/modules/jobs/job_types/captain.dm b/code/modules/jobs/job_types/captain.dm index 80c78220e6..58943df4e4 100755 --- a/code/modules/jobs/job_types/captain.dm +++ b/code/modules/jobs/job_types/captain.dm @@ -1,111 +1,116 @@ -/* -Captain -*/ -/datum/job/captain - title = "Captain" - flag = CAPTAIN - department_head = list("CentCom") - department_flag = ENGSEC - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "Nanotrasen officials and Space law" - selection_color = "#ccccff" - req_admin_notify = 1 - minimal_player_age = 14 - exp_requirements = 180 - exp_type = EXP_TYPE_CREW - - outfit = /datum/outfit/job/captain - - access = list() //See get_access() - minimal_access = list() //See get_access() - -/datum/job/captain/get_access() - return get_all_accesses() - -/datum/job/captain/announce(mob/living/carbon/human/H) - ..() - SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, .proc/minor_announce, "Captain [H.nameless ? "" : "[H.real_name] "]on deck!")) - -/datum/outfit/job/captain - name = "Captain" - jobtype = /datum/job/captain - - id = /obj/item/card/id/gold - belt = /obj/item/pda/captain - glasses = /obj/item/clothing/glasses/sunglasses - ears = /obj/item/radio/headset/heads/captain/alt - gloves = /obj/item/clothing/gloves/color/captain - uniform = /obj/item/clothing/under/rank/captain - suit = /obj/item/clothing/suit/armor/vest/capcarapace - shoes = /obj/item/clothing/shoes/sneakers/brown - head = /obj/item/clothing/head/caphat - backpack_contents = list(/obj/item/melee/classic_baton/telescopic=1, /obj/item/station_charter=1) - - backpack = /obj/item/storage/backpack/captain - satchel = /obj/item/storage/backpack/satchel/cap - duffelbag = /obj/item/storage/backpack/duffelbag/captain - - implants = list(/obj/item/implant/mindshield) - accessory = /obj/item/clothing/accessory/medal/gold/captain - - chameleon_extras = list(/obj/item/gun/energy/e_gun, /obj/item/stamp/captain) - -/datum/outfit/job/captain/hardsuit - name = "Captain (Hardsuit)" - - mask = /obj/item/clothing/mask/gas/sechailer - suit = /obj/item/clothing/suit/space/hardsuit/captain - suit_store = /obj/item/tank/internals/oxygen - -/* -Head of Personnel -*/ -/datum/job/hop - title = "Head of Personnel" - flag = HOP - department_head = list("Captain") - department_flag = CIVILIAN - head_announce = list(RADIO_CHANNEL_SERVICE) - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the captain" - selection_color = "#ddddff" - req_admin_notify = 1 - minimal_player_age = 10 - exp_requirements = 180 - exp_type = EXP_TYPE_CREW - exp_type_department = EXP_TYPE_SUPPLY - - outfit = /datum/outfit/job/hop - - access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_COURT, ACCESS_WEAPONS, - ACCESS_MEDICAL, ACCESS_ENGINE, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, ACCESS_EVA, ACCESS_HEADS, - ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_MAINT_TUNNELS, ACCESS_BAR, ACCESS_JANITOR, ACCESS_CONSTRUCTION, ACCESS_MORGUE, - ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_MAILSORTING, ACCESS_QM, ACCESS_HYDROPONICS, ACCESS_LAWYER, - ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_VAULT, ACCESS_MINING_STATION, - ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_COURT, ACCESS_WEAPONS, - ACCESS_MEDICAL, ACCESS_ENGINE, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, ACCESS_EVA, ACCESS_HEADS, - ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_MAINT_TUNNELS, ACCESS_BAR, ACCESS_JANITOR, ACCESS_CONSTRUCTION, ACCESS_MORGUE, - ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_MAILSORTING, ACCESS_QM, ACCESS_HYDROPONICS, ACCESS_LAWYER, - ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_VAULT, ACCESS_MINING_STATION, - ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM) - - -/datum/outfit/job/hop - name = "Head of Personnel" - jobtype = /datum/job/hop - - id = /obj/item/card/id/silver - belt = /obj/item/pda/heads/hop - ears = /obj/item/radio/headset/heads/hop - uniform = /obj/item/clothing/under/rank/head_of_personnel - shoes = /obj/item/clothing/shoes/sneakers/brown - head = /obj/item/clothing/head/hopcap - backpack_contents = list(/obj/item/storage/box/ids=1,\ - /obj/item/melee/classic_baton/telescopic=1, /obj/item/modular_computer/tablet/preset/advanced = 1) - - chameleon_extras = list(/obj/item/gun/energy/e_gun, /obj/item/stamp/hop) +/* +Captain +*/ +/datum/job/captain + title = "Captain" + flag = CAPTAIN + department_head = list("CentCom") + department_flag = ENGSEC + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "Nanotrasen officials and Space law" + selection_color = "#ccccff" + req_admin_notify = 1 + minimal_player_age = 14 + exp_requirements = 180 + exp_type = EXP_TYPE_CREW + + outfit = /datum/outfit/job/captain + + access = list() //See get_access() + minimal_access = list() //See get_access() + + mind_traits = list(TRAIT_CAPTAIN_METABOLISM) + + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity) + +/datum/job/captain/get_access() + return get_all_accesses() + +/datum/job/captain/announce(mob/living/carbon/human/H) + ..() + SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, .proc/minor_announce, "Captain [H.nameless ? "" : "[H.real_name] "]on deck!")) + +/datum/outfit/job/captain + name = "Captain" + jobtype = /datum/job/captain + + id = /obj/item/card/id/gold + belt = /obj/item/pda/captain + glasses = /obj/item/clothing/glasses/sunglasses + ears = /obj/item/radio/headset/heads/captain/alt + gloves = /obj/item/clothing/gloves/color/captain + uniform = /obj/item/clothing/under/rank/captain + suit = /obj/item/clothing/suit/armor/vest/capcarapace + shoes = /obj/item/clothing/shoes/sneakers/brown + head = /obj/item/clothing/head/caphat + backpack_contents = list(/obj/item/melee/classic_baton/telescopic=1, /obj/item/station_charter=1) + + backpack = /obj/item/storage/backpack/captain + satchel = /obj/item/storage/backpack/satchel/cap + duffelbag = /obj/item/storage/backpack/duffelbag/captain + + implants = list(/obj/item/implant/mindshield) + accessory = /obj/item/clothing/accessory/medal/gold/captain + + chameleon_extras = list(/obj/item/gun/energy/e_gun, /obj/item/stamp/captain) + +/datum/outfit/job/captain/hardsuit + name = "Captain (Hardsuit)" + + mask = /obj/item/clothing/mask/gas/sechailer + suit = /obj/item/clothing/suit/space/hardsuit/captain + suit_store = /obj/item/tank/internals/oxygen + +/* +Head of Personnel +*/ +/datum/job/hop + title = "Head of Personnel" + flag = HOP + department_head = list("Captain") + department_flag = CIVILIAN + head_announce = list(RADIO_CHANNEL_SERVICE) + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the captain" + selection_color = "#ddddff" + req_admin_notify = 1 + minimal_player_age = 10 + exp_requirements = 180 + exp_type = EXP_TYPE_CREW + exp_type_department = EXP_TYPE_SUPPLY + + outfit = /datum/outfit/job/hop + + access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_COURT, ACCESS_WEAPONS, + ACCESS_MEDICAL, ACCESS_ENGINE, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, ACCESS_EVA, ACCESS_HEADS, + ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_MAINT_TUNNELS, ACCESS_BAR, ACCESS_JANITOR, ACCESS_CONSTRUCTION, ACCESS_MORGUE, + ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_MAILSORTING, ACCESS_QM, ACCESS_HYDROPONICS, ACCESS_LAWYER, + ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_VAULT, ACCESS_MINING_STATION, + ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_COURT, ACCESS_WEAPONS, + ACCESS_MEDICAL, ACCESS_ENGINE, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, ACCESS_EVA, ACCESS_HEADS, + ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_MAINT_TUNNELS, ACCESS_BAR, ACCESS_JANITOR, ACCESS_CONSTRUCTION, ACCESS_MORGUE, + ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_MAILSORTING, ACCESS_QM, ACCESS_HYDROPONICS, ACCESS_LAWYER, + ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_VAULT, ACCESS_MINING_STATION, + ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM) + + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/prosopagnosia, /datum/quirk/insanity) + +/datum/outfit/job/hop + name = "Head of Personnel" + jobtype = /datum/job/hop + + id = /obj/item/card/id/silver + belt = /obj/item/pda/heads/hop + ears = /obj/item/radio/headset/heads/hop + uniform = /obj/item/clothing/under/rank/head_of_personnel + shoes = /obj/item/clothing/shoes/sneakers/brown + head = /obj/item/clothing/head/hopcap + backpack_contents = list(/obj/item/storage/box/ids=1,\ + /obj/item/melee/classic_baton/telescopic=1, /obj/item/modular_computer/tablet/preset/advanced = 1) + + chameleon_extras = list(/obj/item/gun/energy/e_gun, /obj/item/stamp/hop) diff --git a/code/modules/jobs/job_types/cargo_service.dm b/code/modules/jobs/job_types/cargo_service.dm index 175b7e8263..8e24ece655 100644 --- a/code/modules/jobs/job_types/cargo_service.dm +++ b/code/modules/jobs/job_types/cargo_service.dm @@ -18,6 +18,8 @@ Quartermaster access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_QM, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM, ACCESS_VAULT) minimal_access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_QM, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM, ACCESS_VAULT) + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity) + /datum/outfit/job/quartermaster name = "Quartermaster" jobtype = /datum/job/qm diff --git a/code/modules/jobs/job_types/engineering.dm b/code/modules/jobs/job_types/engineering.dm index b2bc8bf241..e65cbab1bd 100644 --- a/code/modules/jobs/job_types/engineering.dm +++ b/code/modules/jobs/job_types/engineering.dm @@ -29,6 +29,8 @@ Chief Engineer ACCESS_HEADS, ACCESS_CONSTRUCTION, ACCESS_SEC_DOORS, ACCESS_MINISAT, ACCESS_CE, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_TCOMSAT, ACCESS_MINERAL_STOREROOM) + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/paraplegic, /datum/quirk/insanity) + /datum/outfit/job/ce name = "Chief Engineer" jobtype = /datum/job/chief_engineer diff --git a/code/modules/jobs/job_types/job.dm b/code/modules/jobs/job_types/job.dm index f03696e5da..9549b6100c 100644 --- a/code/modules/jobs/job_types/job.dm +++ b/code/modules/jobs/job_types/job.dm @@ -56,6 +56,8 @@ var/list/mind_traits // Traits added to the mind of the mob assigned this job + var/list/blacklisted_quirks //list of quirk typepaths blacklisted. + //Only override this proc //H is usually a human unless an /equip override transformed it /datum/job/proc/after_spawn(mob/living/H, mob/M, latejoin = FALSE) diff --git a/code/modules/jobs/job_types/medical.dm b/code/modules/jobs/job_types/medical.dm index 1a6d2aa2f6..9eeb4ab06e 100644 --- a/code/modules/jobs/job_types/medical.dm +++ b/code/modules/jobs/job_types/medical.dm @@ -27,6 +27,8 @@ Chief Medical Officer ACCESS_CHEMISTRY, ACCESS_VIROLOGY, ACCESS_CMO, ACCESS_SURGERY, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_SEC_DOORS, ACCESS_MAINT_TUNNELS) + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity) + /datum/outfit/job/cmo name = "Chief Medical Officer" jobtype = /datum/job/cmo @@ -127,6 +129,7 @@ Chemist backpack = /obj/item/storage/backpack/chemistry satchel = /obj/item/storage/backpack/satchel/chem duffelbag = /obj/item/storage/backpack/duffelbag/med + l_hand = /obj/item/fermichem/pHbooklet chameleon_extras = /obj/item/gun/syringe diff --git a/code/modules/jobs/job_types/science.dm b/code/modules/jobs/job_types/science.dm index 21b1a9747a..b58f3faa27 100644 --- a/code/modules/jobs/job_types/science.dm +++ b/code/modules/jobs/job_types/science.dm @@ -31,6 +31,8 @@ Research Director ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM, ACCESS_TECH_STORAGE, ACCESS_MINISAT, ACCESS_MAINT_TUNNELS, ACCESS_NETWORK) + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity) + /datum/outfit/job/rd name = "Research Director" jobtype = /datum/job/rd diff --git a/code/modules/jobs/job_types/security.dm b/code/modules/jobs/job_types/security.dm index 2a6cc199ee..96cedd89ef 100644 --- a/code/modules/jobs/job_types/security.dm +++ b/code/modules/jobs/job_types/security.dm @@ -37,6 +37,8 @@ Head of Security mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM) + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/nonviolent, /datum/quirk/paraplegic, /datum/quirk/insanity) + /datum/outfit/job/hos name = "Head of Security" jobtype = /datum/job/hos @@ -95,6 +97,7 @@ Warden minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_COURT, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) //SEE /DATUM/JOB/WARDEN/GET_ACCESS() mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM) + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/nonviolent, /datum/quirk/paraplegic) /datum/job/warden/get_access() var/list/L = list() @@ -150,6 +153,7 @@ Detective minimal_access = list(ACCESS_SEC_DOORS, ACCESS_FORENSICS_LOCKERS, ACCESS_MORGUE, ACCESS_MAINT_TUNNELS, ACCESS_COURT, ACCESS_BRIG, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM) + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/nonviolent, /datum/quirk/paraplegic) /datum/outfit/job/detective name = "Detective" @@ -205,6 +209,7 @@ Security Officer minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_COURT, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) //BUT SEE /DATUM/JOB/WARDEN/GET_ACCESS() mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM) + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/nonviolent, /datum/quirk/paraplegic) /datum/job/officer/get_access() var/list/L = list() diff --git a/code/modules/keybindings/bindings_client.dm b/code/modules/keybindings/bindings_client.dm index 548a734f74..2b8bfa6860 100644 --- a/code/modules/keybindings/bindings_client.dm +++ b/code/modules/keybindings/bindings_client.dm @@ -4,7 +4,42 @@ set instant = TRUE set hidden = TRUE + client_keysend_amount += 1 + + var/cache = client_keysend_amount + + if(keysend_tripped && next_keysend_trip_reset <= world.time) + keysend_tripped = FALSE + + if(next_keysend_reset <= world.time) + client_keysend_amount = 0 + next_keysend_reset = world.time + (1 SECONDS) + + //The "tripped" system is to confirm that flooding is still happening after one spike + //not entirely sure how byond commands interact in relation to lag + //don't want to kick people if a lag spike results in a huge flood of commands being sent + if(cache >= MAX_KEYPRESS_AUTOKICK) + if(!keysend_tripped) + keysend_tripped = TRUE + next_keysend_trip_reset = world.time + (2 SECONDS) + else + log_admin("Client [ckey] was just autokicked for flooding keysends; likely abuse but potentially lagspike.") + message_admins("Client [ckey] was just autokicked for flooding keysends; likely abuse but potentially lagspike.") + QDEL_IN(src, 1) + return + + ///Check if the key is short enough to even be a real key + if(LAZYLEN(_key) > MAX_KEYPRESS_COMMANDLENGTH) + to_chat(src, "Invalid KeyDown detected! You have been disconnected from the server automatically.") + log_admin("Client [ckey] just attempted to send an invalid keypress. Keymessage was over [MAX_KEYPRESS_COMMANDLENGTH] characters, autokicking due to likely abuse.") + message_admins("Client [ckey] just attempted to send an invalid keypress. Keymessage was over [MAX_KEYPRESS_COMMANDLENGTH] characters, autokicking due to likely abuse.") + QDEL_IN(src, 1) + return + //offset by 1 because the buffer address is 0 indexed because the math was simpler + keys_held[current_key_address + 1] = _key + //the time a key was pressed isn't actually used anywhere (as of 2019-9-10) but this allows easier access usage/checking keys_held[_key] = world.time + current_key_address = ((current_key_address + 1) % HELD_KEY_BUFFER_LENGTH) var/movement = SSinput.movement_keys[_key] if(!(next_move_dir_sub & movement) && !keys_held["Ctrl"]) next_move_dir_add |= movement @@ -35,7 +70,11 @@ set instant = TRUE set hidden = TRUE - keys_held -= _key + //Can't just do a remove because it would alter the length of the rolling buffer, instead search for the key then null it out if it exists + for(var/i in 1 to HELD_KEY_BUFFER_LENGTH) + if(keys_held[i] == _key) + keys_held[i] = null + break var/movement = SSinput.movement_keys[_key] if(!(next_move_dir_add & movement)) next_move_dir_sub |= movement diff --git a/code/modules/keybindings/setup.dm b/code/modules/keybindings/setup.dm index 54df252f5d..8433c9bf5a 100644 --- a/code/modules/keybindings/setup.dm +++ b/code/modules/keybindings/setup.dm @@ -1,9 +1,14 @@ /client - var/list/keys_held = list() // A list of any keys held currently - // These next two vars are to apply movement for keypresses and releases made while move delayed. - // Because discarding that input makes the game less responsive. - var/next_move_dir_add // On next move, add this dir to the move that would otherwise be done - var/next_move_dir_sub // On next move, subtract this dir from the move that would otherwise be done + /// A rolling buffer of any keys held currently + var/list/keys_held = list() + ///used to keep track of the current rolling buffer position + var/current_key_address = 0 + /// These next two vars are to apply movement for keypresses and releases made while move delayed. + /// Because discarding that input makes the game less responsive. + /// On next move, add this dir to the move that would otherwise be done + var/next_move_dir_add + /// On next move, subtract this dir from the move that would otherwise be done + var/next_move_dir_sub // Set a client's focus to an object and override these procs on that object to let it handle keypresses @@ -31,6 +36,11 @@ /client/proc/set_macros() set waitfor = FALSE + //Reset and populate the rolling buffer + keys_held.Cut() + for(var/i in 1 to HELD_KEY_BUFFER_LENGTH) + keys_held += null + erase_all_macros() var/list/macro_sets = SSinput.macro_sets diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 699df5de12..ef58943731 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -343,8 +343,11 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums return ..() /obj/machinery/computer/libraryconsole/bookmanagement/emag_act(mob/user) - if(density && !(obj_flags & EMAGGED)) - obj_flags |= EMAGGED + . = ..() + if(!density || obj_flags & EMAGGED) + return + obj_flags |= EMAGGED + return TRUE /obj/machinery/computer/libraryconsole/bookmanagement/Topic(href, href_list) if(..()) diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm index 86499e694b..4a0faf69f5 100644 --- a/code/modules/mining/abandoned_crates.dm +++ b/code/modules/mining/abandoned_crates.dm @@ -214,8 +214,11 @@ return ..() /obj/structure/closet/crate/secure/loot/emag_act(mob/user) - if(locked) - boom(user) + . = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) + if(!locked) + return + boom(user) + return TRUE /obj/structure/closet/crate/secure/loot/togglelock(mob/user) if(locked) diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm index 2c35c3148f..23ec02976d 100644 --- a/code/modules/mining/equipment/explorer_gear.dm +++ b/code/modules/mining/equipment/explorer_gear.dm @@ -43,7 +43,7 @@ name = "explorer gas mask" desc = "A military-grade gas mask that can be connected to an air supply." icon_state = "gas_mining" - visor_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS + visor_flags = BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS visor_flags_inv = HIDEFACIALHAIR visor_flags_cover = MASKCOVERSMOUTH actions_types = list(/datum/action/item_action/adjust) diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm index 4a628c5f34..4e54c3e222 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -10,12 +10,10 @@ GLOBAL_LIST(labor_sheet_values) density = FALSE var/obj/machinery/mineral/stacking_machine/laborstacker/stacking_machine = null var/machinedir = SOUTH - var/obj/item/card/id/prisoner/inserted_id var/obj/machinery/door/airlock/release_door var/door_tag = "prisonshuttle" var/obj/item/radio/Radio //needed to send messages to sec radio - /obj/machinery/mineral/labor_claim_console/Initialize() . = ..() Radio = new/obj/item/radio(src) @@ -34,18 +32,6 @@ GLOBAL_LIST(labor_sheet_values) /proc/cmp_sheet_list(list/a, list/b) return a["value"] - b["value"] -/obj/machinery/mineral/labor_claim_console/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/card/id/prisoner)) - if(!inserted_id) - if(!user.transferItemToLoc(I, src)) - return - inserted_id = I - to_chat(user, "You insert [I].") - return - else - to_chat(user, "There's an ID inserted already.") - return ..() - /obj/machinery/mineral/labor_claim_console/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) @@ -58,14 +44,20 @@ GLOBAL_LIST(labor_sheet_values) var/can_go_home = FALSE data["emagged"] = (obj_flags & EMAGGED) ? 1 : 0 - if(inserted_id) - data["id"] = inserted_id - data["id_name"] = inserted_id.registered_name - data["points"] = inserted_id.points - data["goal"] = inserted_id.goal - if(check_auth()) + if(obj_flags & EMAGGED) can_go_home = TRUE + data["status_info"] = "No Prisoner ID detected." + var/obj/item/card/id/I = user.get_idcard(TRUE) + if(istype(I, /obj/item/card/id/prisoner)) + var/obj/item/card/id/prisoner/P = I + data["id_points"] = P.points + if(P.points >= P.goal) + can_go_home = TRUE + data["status_info"] = "Goal met!" + else + data["status_info"] = "You are [(P.goal - P.points)] points away." + if(stacking_machine) data["unclaimed_points"] = stacking_machine.points @@ -78,29 +70,19 @@ GLOBAL_LIST(labor_sheet_values) if(..()) return switch(action) - if("handle_id") - if(inserted_id) - if(!usr.get_active_held_item()) - usr.put_in_hands(inserted_id) - inserted_id = null - else - inserted_id.forceMove(get_turf(src)) - inserted_id = null - else - var/obj/item/I = usr.get_active_held_item() - if(istype(I, /obj/item/card/id/prisoner)) - if(!usr.transferItemToLoc(I, src)) - return - inserted_id = I if("claim_points") - inserted_id.points += stacking_machine.points - stacking_machine.points = 0 - to_chat(usr, "Points transferred.") + var/mob/M = usr + var/obj/item/card/id/I = M.get_idcard(TRUE) + if(istype(I, /obj/item/card/id/prisoner)) + var/obj/item/card/id/prisoner/P = I + P.points += stacking_machine.points + stacking_machine.points = 0 + to_chat(usr, "Points transferred.") + else + to_chat(usr, "No valid id for point transfer detected.") if("move_shuttle") if(!alone_in_area(get_area(src), usr)) to_chat(usr, "Prisoners are only allowed to be released while alone.") - else if(!check_auth()) - to_chat(usr, "Prisoners are only allowed to be released when they reach their point goal.") else switch(SSshuttle.moveShuttle("laborcamp", "laborcamp_home", TRUE)) if(1) @@ -112,14 +94,9 @@ GLOBAL_LIST(labor_sheet_values) else if(!(obj_flags & EMAGGED)) Radio.set_frequency(FREQ_SECURITY) - Radio.talk_into(src, "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval.", FREQ_SECURITY) + Radio.talk_into(src, "A prisoner has returned to the station. Minerals and Prisoner ID card ready for retrieval.", FREQ_SECURITY) to_chat(usr, "Shuttle received message and will be sent shortly.") -/obj/machinery/mineral/labor_claim_console/proc/check_auth() - if(obj_flags & EMAGGED) - return 1 //Shuttle is emagged, let any ol' person through - return (istype(inserted_id) && inserted_id.points >= inserted_id.goal) //Otherwise, only let them out if the prisoner's reached his quota. - /obj/machinery/mineral/labor_claim_console/proc/locate_stacking_machine() stacking_machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir)) if(stacking_machine) @@ -128,14 +105,15 @@ GLOBAL_LIST(labor_sheet_values) qdel(src) /obj/machinery/mineral/labor_claim_console/emag_act(mob/user) - if(!(obj_flags & EMAGGED)) - obj_flags |= EMAGGED - to_chat(user, "PZZTTPFFFT") - + . = ..() + if(obj_flags & EMAGGED) + return + obj_flags |= EMAGGED + to_chat(user, "PZZTTPFFFT") + return TRUE /**********************Prisoner Collection Unit**************************/ - /obj/machinery/mineral/stacking_machine/laborstacker force_connect = TRUE var/points = 0 //The unclaimed value of ore stacked. @@ -151,6 +129,7 @@ GLOBAL_LIST(labor_sheet_values) return ..() /**********************Point Lookup Console**************************/ + /obj/machinery/mineral/labor_points_checker name = "points checking console" desc = "A console used by prisoners to check the progress on their quotas. Simply swipe a prisoner ID." diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index abcb6d5911..5990c70813 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -641,6 +641,8 @@ nemesis_factions = list("mining", "boss") var/transform_cooldown var/swiping = FALSE + total_mass = 2.75 + total_mass_on = 5 /obj/item/melee/transforming/cleaving_saw/examine(mob/user) ..() @@ -785,30 +787,30 @@ /obj/item/melee/ghost_sword/process() ghost_check() -/obj/item/melee/ghost_sword/proc/ghost_check() - var/ghost_counter = 0 - var/turf/T = get_turf(src) - var/list/contents = T.GetAllContents() - var/mob/dead/observer/current_spirits = list() - for(var/thing in contents) - var/atom/A = thing - A.transfer_observers_to(src) - - for(var/i in orbiters?.orbiters) - if(!isobserver(i)) +/obj/item/melee/ghost_sword/proc/recursive_orbit_collect(atom/A, list/L) + for(var/i in A.orbiters?.orbiters) + if(!isobserver(i) || (i in L)) continue + L |= i + recursive_orbit_collect(i, L) + +/obj/item/melee/ghost_sword/proc/ghost_check() + var/list/mob/dead/observer/current_spirits = list() + + recursive_orbit_collect(src, current_spirits) + recursive_orbit_collect(loc, current_spirits) //anything holding us + + for(var/i in spirits - current_spirits) var/mob/dead/observer/G = i - ghost_counter++ - G.invisibility = 0 - current_spirits |= G - - for(var/mob/dead/observer/G in spirits - current_spirits) G.invisibility = GLOB.observer_default_invisibility - + + for(var/i in current_spirits) + var/mob/dead/observer/G = i + G.invisibility = 0 + spirits = current_spirits - - return ghost_counter - + return length(spirits) + /obj/item/melee/ghost_sword/attack(mob/living/target, mob/living/carbon/human/user) force = 0 var/ghost_counter = ghost_check() @@ -1333,4 +1335,4 @@ if(2) new /obj/item/wisp_lantern(src) if(3) - new /obj/item/prisoncube(src) \ No newline at end of file + new /obj/item/prisoncube(src) diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 4605f7d693..6c1a00b020 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -13,7 +13,6 @@ speed_process = TRUE circuit = /obj/item/circuitboard/machine/ore_redemption layer = BELOW_OBJ_LAYER - var/obj/item/card/id/inserted_id var/points = 0 var/ore_pickup_rate = 15 var/sheet_per_ore = 1 @@ -48,18 +47,23 @@ point_upgrade = point_upgrade_temp sheet_per_ore = sheet_per_ore_temp +/obj/machinery/mineral/ore_redemption/examine(mob/user) + . = ..() + if(in_range(user, src) || isobserver(user)) + . += "The status display reads: Smelting [sheet_per_ore] sheet(s) per piece of ore.
Ore pickup speed at [ore_pickup_rate].
" + /obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/stack/ore/O) var/datum/component/material_container/mat_container = materials.mat_container if (!mat_container) return - if(istype(O, /obj/item/stack/ore/bluespace_crystal/refined)) + if(O.refined_type == null) return ore_buffer -= O if(O && O.refined_type) - points += O.points * point_upgrade * O.amount + points += O.points * O.amount var/material_amount = mat_container.get_item_material_amount(O) @@ -72,11 +76,8 @@ else var/mats = O.materials & mat_container.materials var/amount = O.amount - var/id = inserted_id && inserted_id.registered_name - if (id) - id = " (ID: [id])" mat_container.insert_item(O, sheet_per_ore) //insert it - materials.silo_log(src, "smelted", amount, "ores[id]", mats) + materials.silo_log(src, "smelted", amount, "ores", mats) qdel(O) /obj/machinery/mineral/ore_redemption/proc/can_smelt_alloy(datum/design/D) @@ -168,15 +169,7 @@ return if(!powered()) - return - if(istype(W, /obj/item/card/id)) - var/obj/item/card/id/I = user.get_active_held_item() - if(istype(I) && !istype(inserted_id)) - if(!user.transferItemToLoc(I, src)) - return - inserted_id = I - interact(user) - return + return ..() if(istype(W, /obj/item/disk/design_disk)) if(user.transferItemToLoc(W, src)) @@ -205,9 +198,6 @@ /obj/machinery/mineral/ore_redemption/ui_data(mob/user) var/list/data = list() data["unclaimedPoints"] = points - if(inserted_id) - data["hasID"] = TRUE - data["claimedPoints"] = inserted_id.mining_points data["materials"] = list() var/datum/component/material_container/mat_container = materials.mat_container @@ -245,32 +235,24 @@ return var/datum/component/material_container/mat_container = materials.mat_container switch(action) - if("Eject") - if(!inserted_id) - return - usr.put_in_hands(inserted_id) - inserted_id = null - return TRUE - if("Insert") - var/obj/item/card/id/I = usr.get_active_held_item() - if(istype(I)) - if(!usr.transferItemToLoc(I,src)) - return - inserted_id = I - else - to_chat(usr, "Not a valid ID!") - return TRUE if("Claim") - if(inserted_id) - inserted_id.mining_points += points - points = 0 + var/mob/M = usr + var/obj/item/card/id/I = M.get_idcard(TRUE) + if(points) + if(I) + I.mining_points += points + points = 0 + else + to_chat(usr, "No ID detected.") + else + to_chat(usr, "No points to claim.") return TRUE if("Release") if(!mat_container) return if(materials.on_hold()) to_chat(usr, "Mineral access is on hold, please contact the quartermaster.") - else if(!check_access(inserted_id) && !allowed(usr)) //Check the ID inside, otherwise check the user + else if(!allowed(usr)) //Check the ID inside, otherwise check the user to_chat(usr, "Required access not found.") else var/mat_id = params["id"] @@ -293,6 +275,7 @@ var/list/mats = list() mats[mat_id] = MINERAL_MATERIAL_AMOUNT materials.silo_log(src, "released", -count, "sheets", mats) + //Logging deleted for quick coding return TRUE if("diskInsert") var/obj/item/disk/design_disk/disk = usr.get_active_held_item() @@ -321,7 +304,7 @@ return var/alloy_id = params["id"] var/datum/design/alloy = stored_research.isDesignResearchedID(alloy_id) - if((check_access(inserted_id) || allowed(usr)) && alloy) + if((check_access(inserted_scan_id) || allowed(usr)) && alloy) var/smelt_amount = can_smelt_alloy(alloy) var/desired = 0 if (params["sheets"]) diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index aed90cebdf..38d2e3e100 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -20,6 +20,7 @@ new /datum/data/mining_equipment("Soap", /obj/item/soap/nanotrasen, 200), new /datum/data/mining_equipment("Laser Pointer", /obj/item/laser_pointer, 300), new /datum/data/mining_equipment("Alien Toy", /obj/item/clothing/mask/facehugger/toy, 300), + new /datum/data/mining_equipment("Stabilizing Serum", /obj/item/hivelordstabilizer, 400), new /datum/data/mining_equipment("Fulton Beacon", /obj/item/fulton_core, 400), new /datum/data/mining_equipment("Shelter Capsule", /obj/item/survivalcapsule, 400), new /datum/data/mining_equipment("Survival Knife", /obj/item/kitchen/knife/combat/survival, 450), @@ -28,11 +29,10 @@ new /datum/data/mining_equipment("Larger Ore Bag", /obj/item/storage/bag/ore/large, 500), new /datum/data/mining_equipment("500 Point Transfer Card", /obj/item/card/mining_point_card/mp500, 500), new /datum/data/mining_equipment("Tracking Implant Kit", /obj/item/storage/box/minertracker, 600), - new /datum/data/mining_equipment("Survival Medipen", /obj/item/reagent_containers/hypospray/medipen/survival, 750), - new /datum/data/mining_equipment("Stabilizing Serum", /obj/item/hivelordstabilizer, 750), new /datum/data/mining_equipment("Jaunter", /obj/item/wormhole_jaunter, 750), new /datum/data/mining_equipment("Kinetic Crusher", /obj/item/twohanded/required/kinetic_crusher, 750), new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/gun/energy/kinetic_accelerator, 750), + new /datum/data/mining_equipment("Survival Medipen", /obj/item/reagent_containers/hypospray/medipen/survival, 750), new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/storage/firstaid/brute, 800), new /datum/data/mining_equipment("Burn First-Aid Kit", /obj/item/storage/firstaid/fire, 800), new /datum/data/mining_equipment("First-Aid Kit", /obj/item/storage/firstaid/regular, 800), @@ -54,7 +54,6 @@ new /datum/data/mining_equipment("Super Resonator", /obj/item/resonator/upgraded, 2500), new /datum/data/mining_equipment("Jump Boots", /obj/item/clothing/shoes/bhop, 2500), new /datum/data/mining_equipment("Luxury Shelter Capsule", /obj/item/survivalcapsule/luxury, 3000), - new /datum/data/mining_equipment("Miner Full Replacement", /obj/item/storage/backpack/duffelbag/mining_cloned, 3000), new /datum/data/mining_equipment("Nanotrasen Minebot", /mob/living/simple_animal/hostile/mining_drone, 800), new /datum/data/mining_equipment("Minebot Melee Upgrade", /obj/item/mine_bot_upgrade, 400), new /datum/data/mining_equipment("Minebot Armor Upgrade", /obj/item/mine_bot_upgrade/health, 400), @@ -69,8 +68,8 @@ new /datum/data/mining_equipment("KA Damage Increase", /obj/item/borg/upgrade/modkit/damage, 1000), new /datum/data/mining_equipment("KA Cooldown Decrease", /obj/item/borg/upgrade/modkit/cooldown, 1000), new /datum/data/mining_equipment("KA AoE Damage", /obj/item/borg/upgrade/modkit/aoe/mobs, 2000), + new /datum/data/mining_equipment("Miner Full Replacement", /obj/item/storage/backpack/duffelbag/mining_cloned, 3000), new /datum/data/mining_equipment("Premium Accelerator", /obj/item/gun/energy/kinetic_accelerator/premiumka, 8000) - ) /datum/data/mining_equipment @@ -95,60 +94,42 @@ /obj/machinery/mineral/equipment_vendor/ui_interact(mob/user) . = ..() - var/dat - dat +="
" - if(istype(inserted_id)) - dat += "You have [inserted_id.mining_points] mining points collected. Eject ID.
" - else - dat += "No ID inserted. Insert ID.
" - dat += "
" + var/list/dat = list() dat += "
Equipment point cost list:
- + "} dat += "" dat += {" @@ -309,36 +288,39 @@ What a mess.*/ active1 = null active2 = null - if("Confirm Identity") - eject_id(usr) - if("Log Out") authenticated = null screen = null active1 = null active2 = null + playsound(src, 'sound/machines/terminal_off.ogg', 50, FALSE) if("Log In") - if(issilicon(usr)) - var/mob/living/silicon/borg = usr + var/mob/M = usr + var/obj/item/card/id/I = M.get_idcard(TRUE) + if(issilicon(M)) + var/mob/living/silicon/borg = M active1 = null active2 = null authenticated = borg.name rank = "AI" screen = 1 - else if(IsAdminGhost(usr)) + else if(IsAdminGhost(M)) active1 = null active2 = null - authenticated = usr.client.holder.admin_signature + authenticated = M.client.holder.admin_signature rank = "Central Command" screen = 1 - else if(istype(scan, /obj/item/card/id)) + else if(I && check_access(I)) active1 = null active2 = null - if(check_access(scan)) - authenticated = scan.registered_name - rank = scan.assignment - screen = 1 + authenticated = I.registered_name + rank = I.assignment + screen = 1 + else + to_chat(usr, "Unauthorized Access.") + playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE) + //RECORD FUNCTIONS if("Record Maintenance") screen = 2 @@ -346,16 +328,14 @@ What a mess.*/ active2 = null if("Browse Record") - var/datum/data/record/R = locate(href_list["d_rec"]) - var/S = locate(href_list["d_rec"]) - if(!( GLOB.data_core.general.Find(R) )) + var/datum/data/record/R = locate(href_list["d_rec"]) in GLOB.data_core.general + if(!R) temp = "Record Not Found!" else + active1 = active2 = R for(var/datum/data/record/E in GLOB.data_core.security) if((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) - S = E - active1 = R - active2 = S + active2 = E screen = 3 @@ -368,7 +348,7 @@ What a mess.*/ var/obj/item/paper/P = new /obj/item/paper( loc ) P.info = "
Security Record - (SR-[GLOB.data_core.securityPrintCount])

" if((istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1))) - P.info += text("Name: [] ID: []
\nSex: []
\nAge: []
", active1.fields["name"], active1.fields["id"], active1.fields["sex"], active1.fields["age"]) + P.info += text("Name: [] ID: []
\nGender: []
\nAge: []
", active1.fields["name"], active1.fields["id"], active1.fields["gender"], active1.fields["age"]) P.info += "\nSpecies: [active1.fields["species"]]
" P.info += text("\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", active1.fields["fingerprint"], active1.fields["p_stat"], active1.fields["m_stat"]) else @@ -419,6 +399,7 @@ What a mess.*/ P.info += "Security Record Lost!
" P.name = text("SR-[] '[]'", GLOB.data_core.securityPrintCount, "Record Lost") P.info += "" + P.update_icon() printing = null if("Print Poster") if(!( printing )) @@ -512,7 +493,7 @@ What a mess.*/ G.fields["name"] = "New Record" G.fields["id"] = "[num2hex(rand(1, 1.6777215E7), 6)]" G.fields["rank"] = "Unassigned" - G.fields["sex"] = "Male" + G.fields["gender"] = "Male" G.fields["age"] = "Unknown" G.fields["species"] = "Human" G.fields["photo_front"] = new /icon() @@ -584,12 +565,14 @@ What a mess.*/ if(!canUseSecurityRecordsConsole(usr, t1, a1)) return active1.fields["fingerprint"] = t1 - if("sex") + if("gender") if(istype(active1, /datum/data/record)) - if(active1.fields["sex"] == "Male") - active1.fields["sex"] = "Female" + if(active1.fields["gender"] == "Male") + active1.fields["gender"] = "Female" + else if(active1.fields["gender"] == "Female") + active1.fields["gender"] = "Other" else - active1.fields["sex"] = "Male" + active1.fields["gender"] = "Male" if("age") if(istype(active1, /datum/data/record)) var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num @@ -767,19 +750,14 @@ What a mess.*/ P = user.get_active_held_item() return P -/obj/machinery/computer/secure_data/proc/print_photo(icon/temp, name) +/obj/machinery/computer/secure_data/proc/print_photo(icon/temp, person_name) if (printing) return printing = TRUE sleep(20) var/obj/item/photo/P = new/obj/item/photo(drop_location()) - var/icon/small_img = icon(temp) - var/icon/ic = icon('icons/obj/items_and_weapons.dmi',"photo") - small_img.Scale(8, 8) - ic.Blend(small_img,ICON_OVERLAY, 13, 13) - P.icon = ic - P.picture.picture_image = temp - P.desc = "The photo on file for [name]." + var/datum/picture/toEmbed = new(name = person_name, desc = "The photo on file for [person_name].", image = temp) + P.set_picture(toEmbed, TRUE, TRUE) P.pixel_x = rand(-10, 10) P.pixel_y = rand(-10, 10) printing = FALSE @@ -799,7 +777,7 @@ What a mess.*/ else R.fields["name"] = "[pick(pick(GLOB.first_names_male), pick(GLOB.first_names_female))] [pick(GLOB.last_names)]" if(2) - R.fields["sex"] = pick("Male", "Female") + R.fields["gender"] = pick("Male", "Female", "Other") if(3) R.fields["age"] = rand(5, 85) if(4) @@ -823,7 +801,7 @@ What a mess.*/ /obj/machinery/computer/secure_data/proc/canUseSecurityRecordsConsole(mob/user, message1 = 0, record1, record2) if(user) if(authenticated) - if(user.canUseTopic(src)) + if(user.canUseTopic(src, BE_CLOSE)) if(!trim(message1)) return 0 if(!record1 || record1 == active1) @@ -831,22 +809,3 @@ What a mess.*/ return 1 return 0 -/obj/machinery/computer/secure_data/AltClick(mob/user) - if(user.canUseTopic(src)) - eject_id(user) - -/obj/machinery/computer/secure_data/proc/eject_id(mob/user) - if(scan) - scan.forceMove(drop_location()) - if(!issilicon(user) && Adjacent(user)) - user.put_in_hands(scan) - scan = null - playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) - else //switching the ID with the one you're holding - if(issilicon(user) || !Adjacent(user)) - return - var/obj/item/card/id/held_id = user.is_holding_item_of_type(/obj/item/card/id) - if(QDELETED(held_id) || !user.transferItemToLoc(held_id, src)) - return - scan = held_id - playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 1081cb5fa7..365d19b826 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1280,20 +1280,23 @@ return !density || (check_access(ID) && !locked && hasPower()) /obj/machinery/door/airlock/emag_act(mob/user) - if(!operating && density && hasPower() && !(obj_flags & EMAGGED)) - operating = TRUE - update_icon(AIRLOCK_EMAG, 1) - sleep(6) - if(QDELETED(src)) - return - operating = FALSE - if(!open()) - update_icon(AIRLOCK_CLOSED, 1) - obj_flags |= EMAGGED - lights = FALSE - locked = TRUE - loseMainPower() - loseBackupPower() + . = ..() + if(operating || !density || !hasPower() || obj_flags & EMAGGED) + return + operating = TRUE + update_icon(AIRLOCK_EMAG, 1) + addtimer(CALLBACK(src, .proc/open_sesame), 6) + return TRUE + +/obj/machinery/door/airlock/proc/open_sesame() + operating = FALSE + if(!open()) + update_icon(AIRLOCK_CLOSED, 1) + obj_flags |= EMAGGED + lights = FALSE + locked = TRUE + loseMainPower() + loseBackupPower() /obj/machinery/door/airlock/attack_alien(mob/living/carbon/alien/humanoid/user) add_fingerprint(user) diff --git a/code/game/machinery/doors/unpowered.dm b/code/game/machinery/doors/unpowered.dm index 2e7e7d5cba..702f700617 100644 --- a/code/game/machinery/doors/unpowered.dm +++ b/code/game/machinery/doors/unpowered.dm @@ -13,9 +13,6 @@ else return ..() -/obj/machinery/door/unpowered/emag_act() - return - /obj/machinery/door/unpowered/shuttle icon = 'icons/turf/shuttle.dmi' name = "door" diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 97ab664b85..933bb4f42a 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -206,15 +206,20 @@ ..() /obj/machinery/door/window/emag_act(mob/user) - if(!operating && density && !(obj_flags & EMAGGED)) - obj_flags |= EMAGGED - operating = TRUE - flick("[src.base_state]spark", src) - playsound(src, "sparks", 75, 1) - sleep(6) - operating = FALSE - desc += "
Its access panel is smoking slightly." - open(2) + . = ..() + if(operating || !density || obj_flags & EMAGGED) + return + obj_flags |= EMAGGED + operating = TRUE + flick("[src.base_state]spark", src) + playsound(src, "sparks", 75, 1) + addtimer(CALLBACK(src, .proc/open_windows_me), 6) + return TRUE + +/obj/machinery/door/window/proc/open_windows_me() + operating = FALSE + desc += "
Its access panel is smoking slightly." + open(2) /obj/machinery/door/window/attackby(obj/item/I, mob/living/user, params) diff --git a/code/game/machinery/embedded_controller/access_controller.dm b/code/game/machinery/embedded_controller/access_controller.dm index 70ce3d36ae..3b9322d207 100644 --- a/code/game/machinery/embedded_controller/access_controller.dm +++ b/code/game/machinery/embedded_controller/access_controller.dm @@ -26,6 +26,7 @@ findObjsByTag() /obj/machinery/doorButtons/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED @@ -33,6 +34,7 @@ req_one_access = list() playsound(src, "sparks", 100, 1) to_chat(user, "You short out the access controller.") + return TRUE /obj/machinery/doorButtons/proc/removeMe() diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 8f0d56a49e..5c2676c2b9 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -97,6 +97,7 @@ alarm() /obj/machinery/firealarm/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED @@ -104,6 +105,7 @@ user.visible_message("Sparks fly out of [src]!", "You emag [src], disabling its thermal sensors.") playsound(src, "sparks", 50, 1) + return TRUE /obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume) if((temperature > T0C + 200 || temperature < BODYTEMP_COLD_DAMAGE_LIMIT) && (last_alarm+FIREALARM_COOLDOWN < world.time) && !(obj_flags & EMAGGED) && detecting && !stat) diff --git a/code/game/machinery/gulag_item_reclaimer.dm b/code/game/machinery/gulag_item_reclaimer.dm index f6cb58bbbc..f51c145635 100644 --- a/code/game/machinery/gulag_item_reclaimer.dm +++ b/code/game/machinery/gulag_item_reclaimer.dm @@ -9,7 +9,6 @@ idle_power_usage = 100 active_power_usage = 2500 var/list/stored_items = list() - var/obj/item/card/id/prisoner/inserted_id = null var/obj/machinery/gulag_teleporter/linked_teleporter = null /obj/machinery/gulag_item_reclaimer/Destroy() @@ -18,28 +17,15 @@ I.forceMove(get_turf(src)) if(linked_teleporter) linked_teleporter.linked_reclaimer = null - if(inserted_id) - inserted_id.forceMove(get_turf(src)) - inserted_id = null return ..() /obj/machinery/gulag_item_reclaimer/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) // emagging lets anyone reclaim all the items return req_access = list() obj_flags |= EMAGGED - -/obj/machinery/gulag_item_reclaimer/attackby(obj/item/I, mob/user) - if(istype(I, /obj/item/card/id)) - if(!inserted_id) - if(!user.transferItemToLoc(I, src)) - return - inserted_id = I - to_chat(user, "You insert [I].") - return - else - to_chat(user, "There's an ID inserted already.") - return ..() + return TRUE /obj/machinery/gulag_item_reclaimer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) @@ -55,15 +41,19 @@ if(allowed(user)) can_reclaim = TRUE - if(inserted_id) - data["id"] = inserted_id - data["id_name"] = inserted_id.registered_name - if(inserted_id.points >= inserted_id.goal) + var/obj/item/card/id/I = user.get_idcard(TRUE) + if(istype(I, /obj/item/card/id/prisoner)) + var/obj/item/card/id/prisoner/P = I + if(P.points >= P.goal) can_reclaim = TRUE var/list/mobs = list() for(var/i in stored_items) var/mob/thismob = i + if(QDELETED(thismob)) + say("Alert! Unable to locate vital signals of a previously processed prisoner. Ejecting equipment!") + drop_items(thismob) + continue var/list/mob_info = list() mob_info["name"] = thismob.real_name mob_info["mob"] = "[REF(thismob)]" @@ -78,16 +68,6 @@ /obj/machinery/gulag_item_reclaimer/ui_act(action, list/params) switch(action) - if("handle_id") - if(inserted_id) - usr.put_in_hands(inserted_id) - inserted_id = null - else - var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id) - if(I) - if(!usr.transferItemToLoc(I, src)) - return - inserted_id = I if("release_items") var/mob/M = locate(params["mobref"]) if(M == usr || allowed(usr)) @@ -98,8 +78,9 @@ /obj/machinery/gulag_item_reclaimer/proc/drop_items(mob/user) if(!stored_items[user]) return + var/drop_location = drop_location() for(var/i in stored_items[user]) var/obj/item/W = i stored_items[user] -= W - W.forceMove(get_turf(src)) + W.forceMove(drop_location) stored_items -= user diff --git a/code/game/machinery/harvester.dm b/code/game/machinery/harvester.dm index 8be7becfdd..1fccadda21 100644 --- a/code/game/machinery/harvester.dm +++ b/code/game/machinery/harvester.dm @@ -158,11 +158,13 @@ open_machine() /obj/machinery/harvester/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED allow_living = TRUE to_chat(user, "You overload [src]'s lifesign scanners.") + return TRUE /obj/machinery/harvester/container_resist(mob/living/user) if(!harvesting) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 84a688c724..b217c14e53 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -145,7 +145,7 @@ return // If the human is losing too much blood, beep. - if(attached.blood_volume < BLOOD_VOLUME_SAFE && prob(5)) + if(attached.blood_volume < ( (BLOOD_VOLUME_SAFE*attached.blood_ratio) && prob(5) ) ) visible_message("[src] beeps loudly.") playsound(loc, 'sound/machines/twobeep.ogg', 50, 1) attached.transfer_blood_to(beaker, amount) @@ -218,4 +218,4 @@ to_chat(user, "[attached ? attached : "No one"] is attached.") #undef IV_TAKING -#undef IV_INJECTING \ No newline at end of file +#undef IV_INJECTING diff --git a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm index a3250fe1b0..59806e97a4 100644 --- a/code/game/machinery/limbgrower.dm +++ b/code/game/machinery/limbgrower.dm @@ -215,6 +215,7 @@ return dat /obj/machinery/limbgrower/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return for(var/id in SSresearch.techweb_designs) @@ -223,3 +224,4 @@ stored_research.add_design(D) to_chat(user, "A warning flashes onto the screen, stating that safety overrides have been deactivated!") obj_flags |= EMAGGED + return TRUE diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index b0204ddeb8..b0a75c99dc 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -290,6 +290,7 @@ return ..() /obj/machinery/porta_turret/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return to_chat(user, "You short out [src]'s threat assessment circuits.") @@ -300,6 +301,7 @@ update_icon() sleep(60) //6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit on = TRUE //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here + return TRUE /obj/machinery/porta_turret/emp_act(severity) @@ -837,6 +839,7 @@ to_chat(user, "Access denied.") /obj/machinery/turretid/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return to_chat(user, "You short out the turret controls' access analysis module.") @@ -844,6 +847,7 @@ locked = FALSE if(user && user.machine == src) attack_hand(user) + return TRUE /obj/machinery/turretid/attack_ai(mob/user) if(!ailock || IsAdminGhost(user)) diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm index 6ff795c1cc..afb00d4ee2 100644 --- a/code/game/machinery/porta_turret/portable_turret_cover.dm +++ b/code/game/machinery/porta_turret/portable_turret_cover.dm @@ -86,10 +86,13 @@ . = 0 /obj/machinery/porta_turret_cover/emag_act(mob/user) - if(!(parent_turret.obj_flags & EMAGGED)) - to_chat(user, "You short out [parent_turret]'s threat assessment circuits.") - visible_message("[parent_turret] hums oddly...") - parent_turret.obj_flags |= EMAGGED - parent_turret.on = 0 - spawn(40) - parent_turret.on = 1 + . = ..() + if(parent_turret.obj_flags & EMAGGED) + return + to_chat(user, "You short out [parent_turret]'s threat assessment circuits.") + visible_message("[parent_turret] hums oddly...") + parent_turret.obj_flags |= EMAGGED + parent_turret.on = 0 + spawn(40) + parent_turret.on = 1 + return TRUE diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index ff40a8539a..9d431487e0 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -65,6 +65,7 @@ return ..() /obj/machinery/recycler/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED @@ -73,6 +74,7 @@ update_icon() playsound(src, "sparks", 75, 1, -1) to_chat(user, "You use the cryptographic sequencer on [src].") + return TRUE /obj/machinery/recycler/update_icon() ..() diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index e2aebd2370..fc6577a4f1 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -195,6 +195,7 @@ return ..() /obj/machinery/shieldgen/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) to_chat(user, "The access controller is damaged!") return @@ -202,6 +203,7 @@ locked = FALSE playsound(src, "sparks", 100, 1) to_chat(user, "You short out the access controller.") + return TRUE /obj/machinery/shieldgen/update_icon() if(active) @@ -387,6 +389,7 @@ add_fingerprint(user) /obj/machinery/shieldwallgen/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) to_chat(user, "The access controller is damaged!") return @@ -394,6 +397,7 @@ locked = FALSE playsound(src, "sparks", 100, 1) to_chat(user, "You short out the access controller.") + return TRUE //////////////Containment Field START /obj/machinery/shieldwall diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index 298587cdea..4b73032a8a 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -99,6 +99,7 @@ return ..() /obj/machinery/computer/slot_machine/emag_act() + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED @@ -106,6 +107,7 @@ spark_system.set_up(4, 0, src.loc) spark_system.start() playsound(src, "sparks", 50, 1) + return TRUE /obj/machinery/computer/slot_machine/ui_interact(mob/living/user) . = ..() diff --git a/code/game/machinery/telecomms/computers/message.dm b/code/game/machinery/telecomms/computers/message.dm index b11c6c102d..ebb40148d8 100644 --- a/code/game/machinery/telecomms/computers/message.dm +++ b/code/game/machinery/telecomms/computers/message.dm @@ -42,21 +42,23 @@ return ..() /obj/machinery/computer/message_monitor/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return - if(!isnull(linkedServer)) - obj_flags |= EMAGGED - screen = 2 - spark_system.set_up(5, 0, src) - spark_system.start() - var/obj/item/paper/monitorkey/MK = new(loc, linkedServer) - // Will help make emagging the console not so easy to get away with. - MK.info += "

�%@%(*$%&(�&?*(%&�/{}" - var/time = 100 * length(linkedServer.decryptkey) - addtimer(CALLBACK(src, .proc/UnmagConsole), time) - message = rebootmsg - else + if(isnull(linkedServer)) to_chat(user, "A no server error appears on the screen.") + return + obj_flags |= EMAGGED + screen = 2 + spark_system.set_up(5, 0, src) + spark_system.start() + var/obj/item/paper/monitorkey/MK = new(loc, linkedServer) + // Will help make emagging the console not so easy to get away with. + MK.info += "

�%@%(*$%&(�&?*(%&�/{}" + var/time = 100 * length(linkedServer.decryptkey) + addtimer(CALLBACK(src, .proc/UnmagConsole), time) + message = rebootmsg + return TRUE /obj/machinery/computer/message_monitor/New() . = ..() diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 64081a77e4..1f1f13ee22 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -68,16 +68,16 @@ if (ismovableatom(M)) if(do_teleport(M, com.target, channel = TELEPORT_CHANNEL_BLUESPACE)) use_power(5000) - if(!calibrated && prob(30 - ((accurate) * 10))) //oh dear a problem - log_game("[M] ([key_name(M)]) was turned into a fly person") - if(ishuman(M))//don't remove people from the round randomly you jerks - var/mob/living/carbon/human/human = M - if(human.dna && human.dna.species.id == "human") - to_chat(M, "You hear a buzzing in your ears.") - human.set_species(/datum/species/fly) - human.apply_effect((rand(120 - accurate * 40, 180 - accurate * 60)), EFFECT_IRRADIATE, 0) - calibrated = 0 + if(!calibrated && iscarbon(M) && prob(30 - ((accurate) * 10))) //oh dear a problem + var/mob/living/carbon/C = M + if(C.dna?.species && C.dna.species.id != "fly" && !HAS_TRAIT(C, TRAIT_RADIMMUNE)) + to_chat(C, "You hear a buzzing in your ears.") + C.set_species(/datum/species/fly) + log_game("[C] ([key_name(C)]) was turned into a fly person") + C.apply_effect((rand(120 - accurate * 40, 180 - accurate * 60)), EFFECT_IRRADIATE, 0) + + calibrated = FALSE return /obj/machinery/teleport/hub/update_icon() diff --git a/code/game/mecha/combat/durand.dm b/code/game/mecha/combat/durand.dm index 7896d7aa35..cd7051d074 100644 --- a/code/game/mecha/combat/durand.dm +++ b/code/game/mecha/combat/durand.dm @@ -20,3 +20,6 @@ ..() defense_action.Remove(user) +/obj/mecha/combat/Initialize() + . = ..() + trackers += new /obj/item/mecha_parts/mecha_tracking(src) diff --git a/code/game/mecha/combat/gygax.dm b/code/game/mecha/combat/gygax.dm index 95137938d0..f9fa2544b8 100644 --- a/code/game/mecha/combat/gygax.dm +++ b/code/game/mecha/combat/gygax.dm @@ -63,3 +63,6 @@ ..() thrusters_action.Remove(user) +/obj/mecha/combat/Initialize() + . = ..() + trackers += new /obj/item/mecha_parts/mecha_tracking(src) diff --git a/code/game/mecha/combat/honker.dm b/code/game/mecha/combat/honker.dm index 125aecd667..4c32e9c367 100644 --- a/code/game/mecha/combat/honker.dm +++ b/code/game/mecha/combat/honker.dm @@ -154,4 +154,6 @@ color = color+pick(colors) return color - +/obj/mecha/combat/Initialize() + . = ..() + trackers += new /obj/item/mecha_parts/mecha_tracking(src) diff --git a/code/game/mecha/combat/phazon.dm b/code/game/mecha/combat/phazon.dm index f5f369c2ad..1264a647c4 100644 --- a/code/game/mecha/combat/phazon.dm +++ b/code/game/mecha/combat/phazon.dm @@ -28,3 +28,6 @@ switch_damtype_action.Remove(user) phasing_action.Remove(user) +/obj/mecha/combat/Initialize() + . = ..() + trackers += new /obj/item/mecha_parts/mecha_tracking(src) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 01e304872f..e1dc80911f 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -64,10 +64,15 @@ /obj/machinery/mecha_part_fabricator/emag_act() + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED req_access = list() + INVOKE_ASYNC(src, .proc/error_action_sucessful) + return TRUE + +/obj/machinery/mecha_part_fabricator/proc/error_action_sucessful() say("DB error \[Code 0x00F1\]") sleep(10) say("Attempting auto-repair...") diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 9498eec3da..18c9b3eb2f 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -109,7 +109,7 @@ var/obj/mecha/M = in_mecha() if(M) M.emp_act(EMP_HEAVY) - addtimer(CALLBACK(src, /obj/item/mecha_parts/mecha_tracking/proc/recharge), 5 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE) + addtimer(CALLBACK(src, /obj/item/mecha_parts/mecha_tracking/proc/recharge), 15 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE) recharging = 1 /obj/item/mecha_parts/mecha_tracking/proc/recharge() diff --git a/code/game/objects/effects/alien_acid.dm b/code/game/objects/effects/alien_acid.dm index 1a605d64b0..3b5a029df4 100644 --- a/code/game/objects/effects/alien_acid.dm +++ b/code/game/objects/effects/alien_acid.dm @@ -17,7 +17,7 @@ target = get_turf(src) if(acid_amt) - acid_level = min(acid_amt*acid_pwr, 12000) //capped so the acid effect doesn't last a half hour on the floor. + acid_level = min( (CLAMP(round(acid_amt, 1), 0, INFINITY)) *acid_pwr, 12000) //capped so the acid effect doesn't last a half hour on the floor. //handle APCs and newscasters and stuff nicely pixel_x = target.pixel_x + rand(-4,4) diff --git a/code/game/objects/effects/decals/cleanable/misc.dm b/code/game/objects/effects/decals/cleanable/misc.dm index cc69b88cc4..9f072c48b6 100644 --- a/code/game/objects/effects/decals/cleanable/misc.dm +++ b/code/game/objects/effects/decals/cleanable/misc.dm @@ -42,6 +42,9 @@ /obj/effect/decal/cleanable/glass/ex_act() qdel(src) +/obj/effect/decal/cleanable/glass/plasma + icon_state = "plasmatiny" + /obj/effect/decal/cleanable/dirt name = "dirt" desc = "Someone should clean that up." diff --git a/code/game/objects/effects/decals/turfdecal/tilecoloring.dm b/code/game/objects/effects/decals/turfdecal/tilecoloring.dm index 1708753dc1..1e755bc7e9 100644 --- a/code/game/objects/effects/decals/turfdecal/tilecoloring.dm +++ b/code/game/objects/effects/decals/turfdecal/tilecoloring.dm @@ -36,4 +36,203 @@ /obj/effect/turf_decal/tile/neutral name = "neutral corner" color = "#D4D4D4" - alpha = 50 \ No newline at end of file + alpha = 50 + +/obj/effect/turf_decal/trimline + layer = TURF_PLATING_DECAL_LAYER + alpha = 110 + icon_state = "trimline_box" + +/obj/effect/turf_decal/trimline/white + color = "#FFFFFF" + +/obj/effect/turf_decal/trimline/white/line + name = "trim decal" + icon_state = "trimline" + +/obj/effect/turf_decal/trimline/white/corner + icon_state = "trimline_corner" + +/obj/effect/turf_decal/trimline/white/end + icon_state = "trimline_end" + +/obj/effect/turf_decal/trimline/white/filled + icon_state = "trimline_box_fill" + +/obj/effect/turf_decal/trimline/white/filled/line + icon_state = "trimline_fill" + +/obj/effect/turf_decal/trimline/white/filled/corner + icon_state = "trimline_corner_fill" + +/obj/effect/turf_decal/trimline/white/filled/end + icon_state = "trimline_end_fill" + +/obj/effect/turf_decal/trimline/red + color = "#DE3A3A" + +/obj/effect/turf_decal/trimline/red/line + icon_state = "trimline" + +/obj/effect/turf_decal/trimline/red/corner + icon_state = "trimline_corner" + +/obj/effect/turf_decal/trimline/red/end + icon_state = "trimline_end" + +/obj/effect/turf_decal/trimline/red/filled + icon_state = "trimline_box_fill" + +/obj/effect/turf_decal/trimline/red/filled/line + icon_state = "trimline_fill" + +/obj/effect/turf_decal/trimline/red/filled/corner + icon_state = "trimline_corner_fill" + +/obj/effect/turf_decal/trimline/red/filled/end + icon_state = "trimline_end_fill" + +/obj/effect/turf_decal/trimline/green + color = "#9FED58" + +/obj/effect/turf_decal/trimline/green/line + icon_state = "trimline" + +/obj/effect/turf_decal/trimline/green/corner + icon_state = "trimline_corner" + +/obj/effect/turf_decal/trimline/green/end + icon_state = "trimline_end" + +/obj/effect/turf_decal/trimline/green/filled + icon_state = "trimline_box_fill" + +/obj/effect/turf_decal/trimline/green/filled/line + icon_state = "trimline_fill" + +/obj/effect/turf_decal/trimline/green/filled/corner + icon_state = "trimline_corner_fill" + +/obj/effect/turf_decal/trimline/green/filled/end + icon_state = "trimline_end_fill" + +/obj/effect/turf_decal/trimline/blue + color = "#52B4E9" + +/obj/effect/turf_decal/trimline/blue/line + icon_state = "trimline" + +/obj/effect/turf_decal/trimline/blue/corner + icon_state = "trimline_corner" + +/obj/effect/turf_decal/trimline/blue/end + icon_state = "trimline_end" + +/obj/effect/turf_decal/trimline/blue/filled + icon_state = "trimline_box_fill" + +/obj/effect/turf_decal/trimline/blue/filled/line + icon_state = "trimline_fill" + +/obj/effect/turf_decal/trimline/blue/filled/corner + icon_state = "trimline_corner_fill" + +/obj/effect/turf_decal/trimline/blue/filled/end + icon_state = "trimline_end_fill" + +/obj/effect/turf_decal/trimline/yellow + color = "#EFB341" + +/obj/effect/turf_decal/trimline/yellow/line + icon_state = "trimline" + +/obj/effect/turf_decal/trimline/yellow/corner + icon_state = "trimline_corner" + +/obj/effect/turf_decal/trimline/yellow/end + icon_state = "trimline_end" + +/obj/effect/turf_decal/trimline/yellow/filled + icon_state = "trimline_box_fill" + +/obj/effect/turf_decal/trimline/yellow/filled/line + icon_state = "trimline_fill" + +/obj/effect/turf_decal/trimline/yellow/filled/corner + icon_state = "trimline_corner_fill" + +/obj/effect/turf_decal/trimline/yellow/filled/end + icon_state = "trimline_end_fill" + +/obj/effect/turf_decal/trimline/purple + color = "#D381C9" + +/obj/effect/turf_decal/trimline/purple/line + icon_state = "trimline" + +/obj/effect/turf_decal/trimline/purple/corner + icon_state = "trimline_corner" + +/obj/effect/turf_decal/trimline/purple/end + icon_state = "trimline_end" + +/obj/effect/turf_decal/trimline/purple/filled + icon_state = "trimline_box_fill" + +/obj/effect/turf_decal/trimline/purple/filled/line + icon_state = "trimline_fill" + +/obj/effect/turf_decal/trimline/purple/filled/corner + icon_state = "trimline_corner_fill" + +/obj/effect/turf_decal/trimline/purple/filled/end + icon_state = "trimline_end_fill" + +/obj/effect/turf_decal/trimline/brown + color = "#A46106" + +/obj/effect/turf_decal/trimline/brown/line + icon_state = "trimline" + +/obj/effect/turf_decal/trimline/brown/corner + icon_state = "trimline_corner" + +/obj/effect/turf_decal/trimline/brown/end + icon_state = "trimline_end" + +/obj/effect/turf_decal/trimline/brown/filled + icon_state = "trimline_box_fill" + +/obj/effect/turf_decal/trimline/brown/filled/line + icon_state = "trimline_fill" + +/obj/effect/turf_decal/trimline/brown/filled/corner + icon_state = "trimline_corner_fill" + +/obj/effect/turf_decal/trimline/brown/filled/end + icon_state = "trimline_end_fill" + +/obj/effect/turf_decal/trimline/neutral + color = "#D4D4D4" + alpha = 50 + +/obj/effect/turf_decal/trimline/neutral/line + icon_state = "trimline" + +/obj/effect/turf_decal/trimline/neutral/corner + icon_state = "trimline_corner" + +/obj/effect/turf_decal/trimline/neutral/end + icon_state = "trimline_end" + +/obj/effect/turf_decal/trimline/neutral/filled + icon_state = "trimline_box_fill" + +/obj/effect/turf_decal/trimline/neutral/filled/line + icon_state = "trimline_fill" + +/obj/effect/turf_decal/trimline/neutral/filled/corner + icon_state = "trimline_corner_fill" + +/obj/effect/turf_decal/trimline/brown/filled/end + icon_state = "trimline_end_fill" \ No newline at end of file diff --git a/code/game/objects/effects/spawners/bundle.dm b/code/game/objects/effects/spawners/bundle.dm index 2fe8d2a460..b9acba70d9 100644 --- a/code/game/objects/effects/spawners/bundle.dm +++ b/code/game/objects/effects/spawners/bundle.dm @@ -133,7 +133,7 @@ /obj/effect/spawner/bundle/costume/holiday_priest name = "holiday priest costume spawner" items = list( - /obj/item/clothing/suit/holidaypriest) + /obj/item/clothing/suit/chaplain/holidaypriest) /obj/effect/spawner/bundle/costume/marisawizard name = "marisa wizard costume spawner" diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index e17fe20977..c98cef2b87 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -33,6 +33,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) var/usesound = null var/throwhitsound = null var/w_class = WEIGHT_CLASS_NORMAL + var/total_mass //Total mass in arbitrary pound-like values. If there's no balance reasons for an item to have otherwise, this var should be the item's weight in pounds. var/slot_flags = 0 //This is used to determine on which slots an item can fit. pass_flags = PASSTABLE pressure_resistance = 4 @@ -67,6 +68,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) var/strip_delay = 40 //In deciseconds, how long an item takes to remove from another person var/breakouttime = 0 var/list/materials + var/reskinned = FALSE var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]" var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 1ff3c7df9f..cf706359f7 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -37,6 +37,7 @@ RLD var/has_ammobar = FALSE //controls whether or not does update_icon apply ammo indicator overlays var/ammo_sections = 10 //amount of divisions in the ammo indicator overlay/number of ammo indicator states var/custom_range = 7 + var/upgrade = FALSE /obj/item/construction/Initialize() . = ..() @@ -82,6 +83,11 @@ RLD loaded = loadwithsheets(W, sheetmultiplier * 0.25, user) // 1 matter for 1 floortile, as 4 tiles are produced from 1 metal if(loaded) to_chat(user, "[src] now holds [matter]/[max_matter] matter-units.") + else if(istype(W, /obj/item/rcd_upgrade)) + to_chat(user, "You upgrade the RCD with the [W]!") + upgrade = TRUE + playsound(src.loc, 'sound/machines/click.ogg', 50, 1) + qdel(W) else return ..() update_icon() //ensures that ammo counters (if present) get updated @@ -148,6 +154,7 @@ RLD has_ammobar = TRUE var/mode = 1 var/ranged = FALSE + var/computer_dir = 1 var/airlock_type = /obj/machinery/door/airlock var/airlock_glass = FALSE // So the floor's rcd_act knows how much ammo to use var/window_type = /obj/structure/window/fulltile @@ -270,6 +277,28 @@ RLD return FALSE return TRUE +/obj/item/construction/rcd/proc/change_computer_dir(mob/user) + if(!user) + return + var/list/computer_dirs = list( + "NORTH" = image(icon = 'icons/mob/radial.dmi', icon_state = "cnorth"), + "EAST" = image(icon = 'icons/mob/radial.dmi', icon_state = "ceast"), + "SOUTH" = image(icon = 'icons/mob/radial.dmi', icon_state = "csouth"), + "WEST" = image(icon = 'icons/mob/radial.dmi', icon_state = "cwest") + ) + var/computerdirs = show_radial_menu(user, src, computer_dirs, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE) + if(!check_menu(user)) + return + switch(computerdirs) + if("NORTH") + computer_dir = 1 + if("EAST") + computer_dir = 4 + if("SOUTH") + computer_dir = 2 + if("WEST") + computer_dir = 8 + /obj/item/construction/rcd/proc/change_airlock_setting(mob/user) if(!user) return @@ -434,10 +463,15 @@ RLD ..() var/list/choices = list( "Airlock" = image(icon = 'icons/mob/radial.dmi', icon_state = "airlock"), - "Deconstruct" = image(icon= 'icons/mob/radial.dmi', icon_state = "delete"), "Grilles & Windows" = image(icon = 'icons/mob/radial.dmi', icon_state = "grillewindow"), "Floors & Walls" = image(icon = 'icons/mob/radial.dmi', icon_state = "wallfloor") ) + if(upgrade) + choices += list( + "Deconstruct" = image(icon= 'icons/mob/radial.dmi', icon_state = "delete"), + "Machine Frames" = image(icon = 'icons/mob/radial.dmi', icon_state = "machine"), + "Computer Frames" = image(icon = 'icons/mob/radial.dmi', icon_state = "computer_dir"), + ) if(mode == RCD_AIRLOCK) choices += list( "Change Access" = image(icon = 'icons/mob/radial.dmi', icon_state = "access"), @@ -459,6 +493,12 @@ RLD mode = RCD_DECONSTRUCT if("Grilles & Windows") mode = RCD_WINDOWGRILLE + if("Machine Frames") + mode = RCD_MACHINE + if("Computer Frames") + mode = RCD_COMPUTER + change_computer_dir(user) + return if("Change Access") change_airlock_access(user) return @@ -511,6 +551,7 @@ RLD no_ammo_message = "Insufficient charge." desc = "A device used to rapidly build walls and floors." canRturf = TRUE + upgrade = TRUE /obj/item/construction/rcd/borg/useResource(amount, mob/user) @@ -542,6 +583,9 @@ RLD /obj/item/construction/rcd/loaded matter = 160 +/obj/item/construction/rcd/loaded/upgraded + upgrade = TRUE + /obj/item/construction/rcd/combat name = "Combat RCD" desc = "A device used to rapidly build and deconstruct. Reload with metal, plasteel, glass or compressed matter cartridges. This RCD has been upgraded to be able to remove Rwalls!" @@ -582,7 +626,7 @@ RLD name = "admin RCD" max_matter = INFINITY matter = INFINITY - + upgrade = TRUE // Ranged RCD @@ -776,6 +820,12 @@ RLD return TRUE return FALSE +/obj/item/rcd_upgrade + name = "RCD advanced design disk" + desc = "It contains the design for machine frames, computer frames, and deconstruction." + icon = 'icons/obj/module.dmi' + icon_state = "datadisk3" + #undef GLOW_MODE #undef LIGHT_MODE #undef REMOVE_MODE diff --git a/code/game/objects/items/RSF.dm b/code/game/objects/items/RSF.dm index f0d15cc3a2..01205ee889 100644 --- a/code/game/objects/items/RSF.dm +++ b/code/game/objects/items/RSF.dm @@ -134,12 +134,14 @@ RSF return /obj/item/cookiesynth/emag_act(mob/user) + . = ..() obj_flags ^= EMAGGED if(obj_flags & EMAGGED) to_chat(user, "You short out [src]'s reagent safety checker!") else to_chat(user, "You reset [src]'s reagent safety checker!") - toxin = 0 + toxin = FALSE + return TRUE /obj/item/cookiesynth/attack_self(mob/user) var/mob/living/silicon/robot/P = null diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index e5f40d7c52..875a4bd04f 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -93,34 +93,22 @@ /obj/item/card/emag/afterattack(atom/target, mob/user, proximity) . = ..() var/atom/A = target - if(!proximity && prox_check) + if(!proximity && prox_check || !(isobj(A) || issilicon(A) || isbot(A) || isdrone(A))) + return + if(istype(A, /obj/item/storage) && !(istype(A, /obj/item/storage/lockbox) || istype(A, /obj/item/storage/pod))) return - //Citadel changes: modular code misfiring, so we're bypassing into main code. if(!uses) user.visible_message("[src] emits a weak spark. It's burnt out!") playsound(src, 'sound/effects/light_flicker.ogg', 100, 1) return else if(uses <= 3) playsound(src, 'sound/effects/light_flicker.ogg', 30, 1) //Tiiiiiiny warning sound to let ya know your emag's almost dead - - if(isturf(A)) + if(!A.emag_act(user)) return - if(istype(A,/obj/item/storage/lockbox) || istype(A, /obj/item/storage/pod)) - A.emag_act(user) - uses = max(uses - 1, 0) - if(!uses) - user.visible_message("[src] fizzles and sparks. It seems like it's out of charges.") - playsound(src, 'sound/effects/light_flicker.ogg', 100, 1) - if(istype(A,/obj/item/storage)) - return - if(!(isobj(A) || issilicon(A) || isbot(A) || isdrone(A))) - return - else - A.emag_act(user) - uses = max(uses - 1, 0) - if(!uses) - user.visible_message("[src] fizzles and sparks. It seems like it's out of charges.") - playsound(src, 'sound/effects/light_flicker.ogg', 100, 1) + uses = max(uses - 1, 0) + if(!uses) + user.visible_message("[src] fizzles and sparks. It seems like it's out of charges.") + playsound(src, 'sound/effects/light_flicker.ogg', 100, 1) /obj/item/card/emagfake diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 000c52ae43..09a128c558 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -764,20 +764,22 @@ CIGARETTE PACKETS ARE IN FANCY.DM ..() /obj/item/clothing/mask/vape/emag_act(mob/user)// I WON'T REGRET WRITTING THIS, SURLY. - if(screw) - if(!(obj_flags & EMAGGED)) - cut_overlays() - obj_flags |= EMAGGED - 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 - sp.set_up(5, 1, src) - sp.start() - else - to_chat(user, "[src] is already emagged!") - else + . = ..() + if(!screw) to_chat(user, "You need to open the cap to do that.") + return + if(obj_flags & EMAGGED) + to_chat(user, "[src] is already emagged!") + return + cut_overlays() + obj_flags |= EMAGGED + 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 + sp.set_up(5, 1, src) + sp.start() + return TRUE /obj/item/clothing/mask/vape/attack_self(mob/user) if(reagents.total_volume > 0) diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index 7d2ffe0a02..c260a95afd 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -162,10 +162,11 @@ /obj/item/circuitboard/computer/prisoner name = "Prisoner Management Console (Computer Board)" - build_path = /obj/machinery/computer/prisoner + build_path = /obj/machinery/computer/prisoner/management + /obj/item/circuitboard/computer/gulag_teleporter_console name = "Labor Camp teleporter console (Computer Board)" - build_path = /obj/machinery/computer/gulag_teleporter_computer + build_path = /obj/machinery/computer/prisoner/gulag_teleporter_computer /obj/item/circuitboard/computer/rdconsole/production name = "R&D Console Production Only (Computer Board)" @@ -217,10 +218,13 @@ to_chat(user, "The spectrum chip is unresponsive.") /obj/item/circuitboard/computer/cargo/emag_act(mob/living/user) - if(!(obj_flags & EMAGGED)) - contraband = TRUE - obj_flags |= EMAGGED - to_chat(user, "You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.") + . = ..() + if(obj_flags & EMAGGED) + return + contraband = TRUE + obj_flags |= EMAGGED + to_chat(user, "You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.") + return TRUE /obj/item/circuitboard/computer/cargo/express name = "Express Supply Console (Computer Board)" @@ -234,8 +238,12 @@ obj_flags &= ~EMAGGED /obj/item/circuitboard/computer/cargo/express/emag_act(mob/living/user) - to_chat(user, "You change the routing protocols, allowing the Drop Pod to land anywhere on the station.") - obj_flags |= EMAGGED + . = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) + if(obj_flags & EMAGGED) + return + to_chat(user, "You change the routing protocols, allowing the Drop Pod to land anywhere on the station.") + obj_flags |= EMAGGED + return TRUE /obj/item/circuitboard/computer/cargo/request name = "Supply Request Console (Computer Board)" @@ -366,4 +374,4 @@ /obj/item/circuitboard/computer/nanite_cloud_controller name = "Nanite Cloud Control (Computer Board)" - build_path = /obj/machinery/computer/nanite_cloud_controller \ No newline at end of file + build_path = /obj/machinery/computer/nanite_cloud_controller diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 55e75b3992..5bef86c6d2 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -140,12 +140,10 @@ return ..() /obj/item/defibrillator/emag_act(mob/user) - if(safety) - safety = FALSE - to_chat(user, "You silently disable [src]'s safety protocols with the cryptographic sequencer.") - else - safety = TRUE - to_chat(user, "You silently enable [src]'s safety protocols with the cryptographic sequencer.") + . = ..() + safety = !safety + to_chat(user, "You silently [safety ? "enable" : "disable"] [src]'s safety protocols with the cryptographic sequencer.") + return TRUE /obj/item/defibrillator/emp_act(severity) . = ..() diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm index bf352e8eb7..3885a1f4d9 100644 --- a/code/game/objects/items/devices/PDA/cart.dm +++ b/code/game/objects/items/devices/PDA/cart.dm @@ -498,6 +498,23 @@ Code: else menu += "[ldat]" + menu += "

Pimpin' Ride:

" + + ldat = null + for (var/obj/vehicle/ridden/janicart/M in world) + var/turf/ml = get_turf(M) + + if(ml) + if (ml.z != cl.z) + continue + var/direction = get_dir(src, M) + ldat += "Ride - \[[ml.x],[ml.y] ([uppertext(dir2text(direction))])\]
" + + if (!ldat) + menu += "None" + else + menu += "[ldat]" + menu += "

Located Janitorial Cart:

" ldat = null diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index 7823e570e0..38133e37bc 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -192,13 +192,15 @@ update_icon() /obj/item/geiger_counter/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) 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 + return TRUE /obj/item/geiger_counter/cyborg var/datum/component/mobhook diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 6615ebe8a8..1e31f14cfd 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -149,9 +149,11 @@ to_chat(user, "You fill \the [src] with lights from \the [S]. " + status_string() + "") /obj/item/lightreplacer/emag_act() + . = ..() if(obj_flags & EMAGGED) return Emag() + return TRUE /obj/item/lightreplacer/attack_self(mob/user) to_chat(user, status_string()) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 347bb6894d..915fcac504 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -38,11 +38,13 @@ speech_args[SPEECH_SPANS] |= voicespan /obj/item/megaphone/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return to_chat(user, "You overload \the [src]'s voice synthesizer.") obj_flags |= EMAGGED voicespan = list(SPAN_REALLYBIG, "userdanger") + return TRUE /obj/item/megaphone/sec name = "security megaphone" diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index a3ab9153ce..207497922e 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -32,6 +32,24 @@ var/datum/integrated_io/selected_io = null //functional for integrated circuits. var/mode = 0 +/obj/item/multitool/chaplain + name = "\improper hypertool" + desc = "Used for pulsing wires to test which to cut. Also emits microwaves to fry some brains!" + damtype = BRAIN + force = 18 + armour_penetration = 35 + hitsound = 'sound/effects/sparks4.ogg' + var/chaplain_spawnable = TRUE + total_mass = TOTAL_MASS_MEDIEVAL_WEAPON + throw_speed = 3 + throw_range = 4 + throwforce = 10 + obj_flags = UNIQUE_RENAME + +/obj/item/multitool/chaplain/Initialize() + . = ..() + AddComponent(/datum/component/anti_magic, TRUE, TRUE) + /obj/item/multitool/examine(mob/user) ..() if(selected_io) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 57b9e89af7..0059938720 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -163,7 +163,37 @@ SLIME SCANNER msg += "\tSevere brain damage detected. Subject likely to have mental traumas.\n" else if (M.getBrainLoss() >= 45) msg += "\tBrain damage detected.\n" - if(iscarbon(M)) + if(ishuman(M) && advanced) // Should I make this not advanced? + var/mob/living/carbon/human/H = M + var/obj/item/organ/liver/L = H.getorganslot("liver") + if(L) + if(L.swelling > 20) + msg += "\tSubject is suffering from an enlarged liver.\n" //i.e. shrink their liver or give them a transplant. + else + msg += "\tSubject's liver is missing.\n" + var/obj/item/organ/tongue/T = H.getorganslot("tongue") + if(T) + if(T.damage > 40) + msg += "\tSubject is suffering from severe burn tissue on their tongue.\n" //i.e. their tongue is shot + if(T.name == "fluffy tongue") + msg += "\tSubject is suffering from a fluffified tongue. Suggested cure: Yamerol or a tongue transplant.\n" + else + msg += "\tSubject's tongue is missing.\n" + var/obj/item/organ/lungs/Lung = H.getorganslot("lungs") + if(Lung) + if(Lung.damage > 150) + msg += "\tSubject is suffering from acute emphysema leading to trouble breathing.\n" //i.e. Their lungs are shot + else + msg += "\tSubject's lungs have collapsed from trauma!\n" + var/obj/item/organ/genital/penis/P = H.getorganslot("penis") + if(P) + if(P.length>20) + msg += "\tSubject has a sizeable gentleman's organ at [P.length] inches.\n" + var/obj/item/organ/genital/breasts/Br = H.getorganslot("breasts") + if(Br) + if(Br.cached_size>5) + msg += "\tSubject has a sizeable bosom with a [Br.size] cup.\n" + var/mob/living/carbon/C = M if(LAZYLEN(C.get_traumas())) var/list/trauma_text = list() @@ -183,7 +213,7 @@ SLIME SCANNER msg += "\tSubject has the following physiological traits: [C.get_trait_string()].\n" if(advanced) msg += "\tBrain Activity Level: [(200 - M.getBrainLoss())/2]%.\n" - if (M.radiation) + if(M.radiation) msg += "\tSubject is irradiated.\n" if(advanced) msg += "\tRadiation Level: [M.radiation]%.\n" @@ -191,6 +221,17 @@ SLIME SCANNER if(advanced && M.hallucinating()) msg += "\tSubject is hallucinating.\n" + //MKUltra + if(advanced && M.has_status_effect(/datum/status_effect/chem/enthrall)) + msg += "\tSubject has abnormal brain fuctions.\n" + + //Astrogen shenanigans + if(advanced && M.reagents.has_reagent("astral")) + if(M.mind) + msg += "\tWarning: subject may be possesed.\n" + else + msg += "\tSubject appears to be astrally projecting.\n" + //Eyes and ears if(advanced) if(iscarbon(M)) @@ -256,6 +297,7 @@ SLIME SCANNER for(var/obj/item/bodypart/org in damaged) msg += "\t\t[capitalize(org.name)]: [(org.brute_dam > 0) ? "[org.brute_dam]" : "0"]-[(org.burn_dam > 0) ? "[org.burn_dam]" : "0"]\n" + // Species and body temperature if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -310,7 +352,7 @@ SLIME SCANNER var/mob/living/carbon/human/H = C if(H.bleed_rate) msg += "Subject is bleeding!\n" - var/blood_percent = round((C.blood_volume / BLOOD_VOLUME_NORMAL)*100) + var/blood_percent = round((C.blood_volume / (BLOOD_VOLUME_NORMAL * C.blood_ratio))*100) var/blood_type = C.dna.blood_type if(blood_id != "blood")//special blood substance var/datum/reagent/R = GLOB.chemical_reagents_list[blood_id] @@ -318,9 +360,9 @@ SLIME SCANNER blood_type = R.name else blood_type = blood_id - if(C.blood_volume <= BLOOD_VOLUME_SAFE && C.blood_volume > BLOOD_VOLUME_OKAY) + if(C.blood_volume <= (BLOOD_VOLUME_SAFE*C.blood_ratio) && C.blood_volume > (BLOOD_VOLUME_OKAY*C.blood_ratio)) msg += "LOW blood level [blood_percent] %, [C.blood_volume] cl,type: [blood_type]\n" - else if(C.blood_volume <= BLOOD_VOLUME_OKAY) + else if(C.blood_volume <= (BLOOD_VOLUME_OKAY*C.blood_ratio)) msg += "CRITICAL blood level [blood_percent] %, [C.blood_volume] cl,type: [blood_type]\n" else msg += "Blood level [blood_percent] %, [C.blood_volume] cl, type: [blood_type]\n" diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index 36a92b3db9..a306b48385 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -164,21 +164,6 @@ /obj/item/restraints/handcuffs/cable/white item_color = "white" -/obj/item/restraints/handcuffs/alien - icon_state = "handcuffAlien" - -/obj/item/restraints/handcuffs/fake - name = "fake handcuffs" - desc = "Fake handcuffs meant for gag purposes." - breakouttime = 10 //Deciseconds = 1s - -/obj/item/restraints/handcuffs/fake/kinky - name = "kinky handcuffs" - desc = "Fake handcuffs meant for erotic roleplay." - icon = 'modular_citadel/icons/obj/items_and_weapons.dmi' - icon_state = "handcuffgag" - item_state = "kinkycuff" - /obj/item/restraints/handcuffs/cable/attackby(obj/item/I, mob/user, params) ..() if(istype(I, /obj/item/stack/rods)) @@ -213,7 +198,6 @@ /obj/item/restraints/handcuffs/cable/zipties name = "zipties" desc = "Plastic, disposable zipties that can be used to restrain temporarily but are destroyed after use." - icon_state = "zipties" item_state = "zipties" lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi' @@ -229,6 +213,21 @@ /obj/item/restraints/handcuffs/cable/zipties/used/attack() return +/obj/item/restraints/handcuffs/alien + icon_state = "handcuffAlien" + +/obj/item/restraints/handcuffs/fake + name = "fake handcuffs" + desc = "Fake handcuffs meant for gag purposes." + breakouttime = 10 //Deciseconds = 1s + +/obj/item/restraints/handcuffs/fake/kinky + name = "kinky handcuffs" + desc = "Fake handcuffs meant for erotic roleplay." + icon = 'modular_citadel/icons/obj/items_and_weapons.dmi' + icon_state = "handcuffgag" + item_state = "kinkycuff" + //Legcuffs /obj/item/restraints/legcuffs diff --git a/code/game/objects/items/his_grace.dm b/code/game/objects/items/his_grace.dm index 65a4bd542b..3be57d23f1 100644 --- a/code/game/objects/items/his_grace.dm +++ b/code/game/objects/items/his_grace.dm @@ -12,8 +12,9 @@ lefthand_file = 'icons/mob/inhands/equipment/toolbox_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi' icon = 'icons/obj/items_and_weapons.dmi' - w_class = WEIGHT_CLASS_GIGANTIC + w_class = WEIGHT_CLASS_BULKY force = 12 + total_mass = TOTAL_MASS_NORMAL_ITEM // average toolbox attack_verb = list("robusted") hitsound = 'sound/weapons/smash.ogg' var/awakened = FALSE diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index 0e8a9fef9e..5e8250ea00 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -34,6 +34,7 @@ desc = "God wills it!" icon_state = "knight_templar" item_state = "knight_templar" + allowed = list(/obj/item/storage/book/bible, HOLY_WEAPONS, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) // CITADEL CHANGES: More variants /obj/item/clothing/suit/armor/riot/chaplain/teutonic @@ -122,7 +123,6 @@ icon_state = "studentuni" item_state = "studentuni" body_parts_covered = ARMS|CHEST - allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) /obj/item/clothing/head/helmet/chaplain/cage name = "cage" @@ -166,7 +166,6 @@ icon_state = "witchhunter" item_state = "witchhunter" body_parts_covered = CHEST|GROIN|LEGS|ARMS - allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) /obj/item/clothing/head/helmet/chaplain/witchunter_hat name = "witchunter hat" @@ -191,7 +190,7 @@ icon_state = "chaplain_hoodie" item_state = "chaplain_hoodie" body_parts_covered = CHEST|GROIN|LEGS|ARMS - allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) + allowed = list(/obj/item/storage/book/bible, HOLY_WEAPONS, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) hoodtype = /obj/item/clothing/head/hooded/chaplain_hood /obj/item/clothing/head/hooded/chaplain_hood @@ -229,8 +228,8 @@ throwforce = 10 w_class = WEIGHT_CLASS_TINY obj_flags = UNIQUE_RENAME - var/reskinned = FALSE var/chaplain_spawnable = TRUE + total_mass = TOTAL_MASS_MEDIEVAL_WEAPON /obj/item/nullrod/Initialize() . = ..() @@ -247,10 +246,8 @@ /obj/item/nullrod/proc/reskin_holy_weapon(mob/M) if(GLOB.holy_weapon_type) return - var/obj/item/nullrod/holy_weapon - var/list/holy_weapons_list = typesof(/obj/item/nullrod) + list( - /obj/item/melee/transforming/energy/sword/cx/chaplain - ) + var/obj/item/holy_weapon + var/list/holy_weapons_list = subtypesof(/obj/item/nullrod) + list(HOLY_WEAPONS) var/list/display_names = list() for(var/V in holy_weapons_list) var/obj/item/nullrod/rodtype = V @@ -273,6 +270,13 @@ qdel(src) M.put_in_active_hand(holy_weapon) +/obj/item/nullrod/proc/jedi_spin(mob/living/user) + for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH)) + user.setDir(i) + if(i == WEST) + user.emote("flip") + sleep(1) + /obj/item/nullrod/godhand icon_state = "disintegrate" item_state = "disintegrate" @@ -285,14 +289,12 @@ hitsound = 'sound/weapons/sear.ogg' damtype = BURN attack_verb = list("punched", "cross countered", "pummeled") - + total_mass = TOTAL_MASS_HAND_REPLACEMENT /obj/item/nullrod/godhand/Initialize() . = ..() ADD_TRAIT(src, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT) - - /obj/item/nullrod/staff icon_state = "godstaff-red" item_state = "godstaff-red" @@ -536,6 +538,7 @@ sharpness = IS_SHARP attack_verb = list("sawed", "torn", "cut", "chopped", "diced") hitsound = 'sound/weapons/chainsawhit.ogg' + total_mass = TOTAL_MASS_HAND_REPLACEMENT /obj/item/nullrod/chainsaw/Initialize() . = ..() @@ -584,6 +587,7 @@ lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' slot_flags = ITEM_SLOT_BELT + force = 12 reach = 2 attack_verb = list("whipped", "lashed") hitsound = 'sound/weapons/chainhit.ogg' @@ -612,6 +616,7 @@ item_flags = ABSTRACT w_class = WEIGHT_CLASS_HUGE sharpness = IS_SHARP + total_mass = TOTAL_MASS_HAND_REPLACEMENT /obj/item/nullrod/armblade/Initialize() . = ..() @@ -659,6 +664,44 @@ lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' +/obj/item/nullrod/claymore/bostaff/attack(mob/target, mob/living/user) + add_fingerprint(user) + if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50)) + to_chat(user, "You club yourself over the head with [src].") + user.Knockdown(60) + if(ishuman(user)) + var/mob/living/carbon/human/H = user + H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD) + else + user.take_bodypart_damage(2*force) + return + if(iscyborg(target)) + return ..() + if(!isliving(target)) + return ..() + var/mob/living/carbon/C = target + if(C.stat || C.health < 0 || C.staminaloss > 130 ) + to_chat(user, "It would be dishonorable to attack a foe while they cannot retaliate.") + return + if(user.a_intent == INTENT_DISARM) + if(!ishuman(target)) + return ..() + var/mob/living/carbon/human/H = target + var/list/fluffmessages = list("[user] clubs [H] with [src]!", \ + "[user] smacks [H] with the butt of [src]!", \ + "[user] broadsides [H] with [src]!", \ + "[user] smashes [H]'s head with [src]!", \ + "[user] beats [H] with front of [src]!", \ + "[user] twirls and slams [H] with [src]!") + H.visible_message("[pick(fluffmessages)]", \ + "[pick(fluffmessages)]") + playsound(get_turf(user), 'sound/effects/woodhit.ogg', 75, 1, -1) + H.adjustStaminaLoss(rand(12,18)) + if(prob(25)) + (INVOKE_ASYNC(src, .proc/jedi_spin, user)) + else + return ..() + /obj/item/nullrod/tribal_knife icon_state = "crysknife" item_state = "crysknife" @@ -701,8 +744,8 @@ name = "egyptian staff" desc = "A tutorial in mummification is carved into the staff. You could probably craft the wraps if you had some cloth." icon = 'icons/obj/guns/magic.dmi' - icon_state = "pharoah_sceptre" - item_state = "pharoah_sceptre" + icon_state = "pharaoh_sceptre" + item_state = "pharaoh_sceptre" lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' w_class = WEIGHT_CLASS_NORMAL diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index 935d2a007e..d854ab9f5a 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -5,9 +5,12 @@ armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30) resistance_flags = FIRE_PROOF var/brightness_on = 3 + total_mass = 0.4 //Survival flashlights typically weigh around 5 ounces. + /obj/item/melee/transforming/energy/Initialize() . = ..() + total_mass_on = (total_mass_on ? total_mass_on : (w_class_on * 0.75)) if(active) set_light(brightness_on) START_PROCESSING(SSobj, src) @@ -79,6 +82,7 @@ attack_verb_off = list("attacked", "chopped", "cleaved", "torn", "cut") attack_verb_on = list() light_color = "#40ceff" + total_mass = null /obj/item/melee/transforming/energy/axe/suicide_act(mob/user) user.visible_message("[user] swings [src] towards [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!") diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index daeceb7f87..f9affc230d 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -44,6 +44,7 @@ hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "impaled", "stabbed", "sliced", "torn", "ripped", "diced", "cut") sharpness = IS_SHARP + total_mass = TOTAL_MASS_HAND_REPLACEMENT /obj/item/melee/synthetic_arm_blade/Initialize() . = ..() @@ -67,6 +68,7 @@ attack_verb = list("slashed", "cut") hitsound = 'sound/weapons/rapierhit.ogg' materials = list(MAT_METAL = 1000) + total_mass = 3.4 /obj/item/melee/sabre/Initialize() . = ..() @@ -155,6 +157,7 @@ w_class = WEIGHT_CLASS_BULKY sharpness = IS_SHARP_ACCURATE //It cant be sharpend cook -_- attack_verb = list("slashed", "cut", "pierces", "pokes") + total_mass = 3.4 /obj/item/melee/rapier/Initialize() . = ..() @@ -226,7 +229,7 @@ target.LAssailant = null else target.LAssailant = user - cooldown = world.time + 40 + cooldown = world.time user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes swinging batons cost stamina /obj/item/melee/classic_baton/telescopic @@ -242,6 +245,7 @@ item_flags = NONE force = 0 on = FALSE + total_mass = TOTAL_MASS_SMALL_ITEM /obj/item/melee/classic_baton/telescopic/suicide_act(mob/user) var/mob/living/carbon/human/H = user @@ -402,6 +406,7 @@ var/static/list/ovens var/on = FALSE var/datum/beam/beam + total_mass = 2.5 /obj/item/melee/roastingstick/Initialize() . = ..() diff --git a/code/game/objects/items/melee/transforming.dm b/code/game/objects/items/melee/transforming.dm index 0d39e6c847..aabb930bb2 100644 --- a/code/game/objects/items/melee/transforming.dm +++ b/code/game/objects/items/melee/transforming.dm @@ -13,6 +13,7 @@ var/list/nemesis_factions //Any mob with a faction that exists in this list will take bonus damage/effects var/w_class_on = WEIGHT_CLASS_BULKY var/clumsy_check = TRUE + var/total_mass_on //Total mass in ounces when transformed. Primarily for balance purposes. Don't think about it too hard. /obj/item/melee/transforming/Initialize() . = ..() @@ -46,6 +47,7 @@ active = !active if(active) force = force_on + total_mass = total_mass_on throwforce = throwforce_on hitsound = hitsound_on throw_speed = 4 @@ -62,6 +64,7 @@ attack_verb = attack_verb_off icon_state = initial(icon_state) w_class = initial(w_class) + total_mass = initial(total_mass) if(is_sharp()) var/datum/component/butchering/BT = LoadComponent(/datum/component/butchering) BT.butchering_enabled = TRUE @@ -84,4 +87,4 @@ /obj/item/melee/transforming/proc/clumsy_transform_effect(mob/living/user) if(clumsy_check && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) to_chat(user, "You accidentally cut yourself with [src], like a doofus!") - user.take_bodypart_damage(5,5) + user.take_bodypart_damage(5,5) \ No newline at end of file diff --git a/code/game/objects/items/plushes.dm b/code/game/objects/items/plushes.dm index 40380dfe80..48588cf9f3 100644 --- a/code/game/objects/items/plushes.dm +++ b/code/game/objects/items/plushes.dm @@ -629,7 +629,7 @@ /obj/item/toy/plush/mothplushie name = "insect plushie" - desc = "An adorable stuffed toy that resembles some kind of insect" + desc = "An adorable stuffed toy that resembles some kind of insect." icon_state = "bumble" item_state = "bumble" squeak_override = list('modular_citadel/sound/voice/mothsqueak.ogg' = 1) @@ -773,8 +773,10 @@ item_state = "blep" /obj/item/toy/plush/mammal/circe + desc = "A luxuriously soft toy that resembles a nine-tailed kitsune." icon_state = "circe" item_state = "circe" + attack_verb = list("medicated", "tailhugged", "kissed") /obj/item/toy/plush/mammal/robin icon_state = "robin" @@ -839,8 +841,10 @@ item_state = "rae" /obj/item/toy/plush/mammal/zed + desc = "A masked stuffed toy that resembles a fierce miner. He even comes with his own little crusher!" icon_state = "zed" item_state = "zed" + attack_verb = list("ENDED", "CRUSHED", "GNOMED") /obj/item/toy/plush/mammal/justin icon_state = "justin" @@ -852,6 +856,12 @@ item_state = "reece" attack_verb = list("healed", "cured", "demoted") +/obj/item/toy/plush/mammal/redwood + desc = "An adorable stuffed toy resembling a Nanotrasen Captain. That just happens to be a bunny." + icon_state = "redwood" + item_state = "redwood" + attack_verb = list("ordered", "bapped", "reprimanded") + /obj/item/toy/plush/mammal/dog desc = "An adorable stuffed toy that resembles a canine." icon_state = "katlin" @@ -898,6 +908,12 @@ obj_flags = UNIQUE_RENAME unique_reskin = list("Goodboye" = "fritz", "Badboye" = "fritz_bad") +/obj/item/toy/plush/mammal/dog/jesse + desc = "An adorable wolf toy that resembles a cream-colored wolf. He has a little pride flag!" + icon_state = "jesse" + item_state = "jesse" + attack_verb = list("greeted", "merc'd", "howdy'd") + /obj/item/toy/plush/catgirl name = "feline plushie" desc = "An adorable stuffed toy that resembles a feline." @@ -935,3 +951,15 @@ item_state = "fermis" attack_verb = list("cuddled", "petpatted", "wigglepurred") squeak_override = list('modular_citadel/sound/voice/merowr.ogg' = 1) + +/obj/item/toy/plush/catgirl/mariaf + desc = "An adorable stuffed toy that resembles a very tall cat girl." + icon_state = "mariaf" + item_state = "mariaf" + attack_verb = list("hugged", "stabbed", "licked") + +/obj/item/toy/plush/catgirl/maya + desc = "An adorable stuffed toy that resembles an angry cat girl. She has her own tiny nuke disk!" + icon_state = "maya" + item_state = "maya" + attack_verb = list("nuked", "arrested", "harmbatonned") diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 6d7c3036f9..5454b0fdb8 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -282,11 +282,13 @@ var/cooldown = 0 /obj/item/harmalarm/emag_act(mob/user) + . = ..() obj_flags ^= EMAGGED if(obj_flags & EMAGGED) to_chat(user, "You short out the safeties on [src]!") else to_chat(user, "You reset the safeties on [src]!") + return TRUE /obj/item/harmalarm/attack_self(mob/user) var/safety = !(obj_flags & EMAGGED) diff --git a/code/game/objects/items/singularityhammer.dm b/code/game/objects/items/singularityhammer.dm index 1fe57d151f..b6559c9091 100644 --- a/code/game/objects/items/singularityhammer.dm +++ b/code/game/objects/items/singularityhammer.dm @@ -16,6 +16,7 @@ armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) resistance_flags = FIRE_PROOF | ACID_PROOF force_string = "LORD SINGULOTH HIMSELF" + total_mass = TOTAL_MASS_MEDIEVAL_WEAPON /obj/item/twohanded/singularityhammer/New() ..() @@ -84,6 +85,7 @@ throwforce = 30 throw_range = 7 w_class = WEIGHT_CLASS_HUGE + total_mass = TOTAL_MASS_MEDIEVAL_WEAPON /obj/item/twohanded/mjollnir/proc/shock(mob/living/target) target.Stun(60) diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index cf967e25ba..47c881bbdf 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -23,7 +23,7 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \ armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 100) resistance_flags = ACID_PROOF merge_type = /obj/item/stack/sheet/glass - grind_results = list("silicon" = 20) + grind_results = list(/datum/reagent/silicon = 20) point_value = 1 /obj/item/stack/sheet/glass/suicide_act(mob/living/carbon/user) @@ -87,7 +87,7 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( \ armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 75, "acid" = 100) resistance_flags = ACID_PROOF merge_type = /obj/item/stack/sheet/plasmaglass - grind_results = list("silicon" = 20, "plasma" = 10) + grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10) /obj/item/stack/sheet/plasmaglass/fifty amount = 50 @@ -138,7 +138,7 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \ armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100) resistance_flags = ACID_PROOF merge_type = /obj/item/stack/sheet/rglass - grind_results = list("silicon" = 20, "iron" = 10) + grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/iron = 10) point_value = 4 /obj/item/stack/sheet/rglass/attackby(obj/item/W, mob/user, params) @@ -177,11 +177,11 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \ singular_name = "reinforced plasma glass sheet" icon_state = "sheet-prglass" item_state = "sheet-prglass" - materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS=MINERAL_MATERIAL_AMOUNT, MAT_METAL = MINERAL_MATERIAL_AMOUNT * 0.5,) + materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS=MINERAL_MATERIAL_AMOUNT, MAT_METAL=MINERAL_MATERIAL_AMOUNT * 0.5,) armor = list("melee" = 20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100) resistance_flags = ACID_PROOF merge_type = /obj/item/stack/sheet/plasmarglass - grind_results = list("silicon" = 20, "plasma" = 10, "iron" = 10) + grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10, /datum/reagent/iron = 10) point_value = 23 /obj/item/stack/sheet/plasmarglass/Initialize(mapload, new_amount, merge = TRUE) @@ -243,8 +243,9 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list( resistance_flags = ACID_PROOF armor = list("melee" = 100, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 100) max_integrity = 40 - var/cooldown = 0 sharpness = IS_SHARP + var/icon_prefix + /obj/item/shard/suicide_act(mob/user) user.visible_message("[user] is slitting [user.p_their()] [pick("wrists", "throat")] with the shard of glass! It looks like [user.p_theyre()] trying to commit suicide.") @@ -266,9 +267,19 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list( if("large") pixel_x = rand(-5, 5) pixel_y = rand(-5, 5) - var/matrix/M = matrix(transform) - M.Turn(rand(-170, 170)) - transform = M + if (icon_prefix) + icon_state = "[icon_prefix][icon_state]" + + var/turf/T = get_turf(src) + if(T && is_station_level(T.z)) + SSblackbox.record_feedback("tally", "station_mess_created", 1, name) + +/obj/item/shard/Destroy() + . = ..() + + var/turf/T = get_turf(src) + if(T && is_station_level(T.z)) + SSblackbox.record_feedback("tally", "station_mess_destroyed", 1, name) /obj/item/shard/afterattack(atom/A as mob|obj, mob/user, proximity) . = ..() @@ -298,6 +309,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list( return ..() /obj/item/shard/welder_act(mob/living/user, obj/item/I) + ..() if(I.use_tool(src, user, 0, volume=50)) var/obj/item/stack/sheet/glass/NG = new (user.loc) for(var/obj/item/stack/sheet/glass/G in user.loc) @@ -316,4 +328,13 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list( playsound(loc, 'sound/effects/glass_step.ogg', 30, 1) else playsound(loc, 'sound/effects/glass_step.ogg', 50, 1) - . = ..() + return ..() + +/obj/item/shard/plasma + name = "purple shard" + desc = "A nasty looking shard of plasma glass." + force = 6 + throwforce = 11 + icon_state = "plasmalarge" + materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS=MINERAL_MATERIAL_AMOUNT) + icon_prefix = "plasma" \ No newline at end of file diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index c65129ec85..8c808d0e5f 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -201,6 +201,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \ new/datum/stack_recipe("dresser", /obj/structure/dresser, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("picture frame", /obj/item/wallframe/picture, 1, time = 10),\ new/datum/stack_recipe("display case chassis", /obj/structure/displaycase_chassis, 5, one_per_turf = TRUE, on_floor = TRUE), \ + new/datum/stack_recipe("loom", /obj/structure/loom, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40), \ new/datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),\ new/datum/stack_recipe("tiki mask", /obj/item/clothing/mask/gas/tiki_mask, 2), \ @@ -278,6 +279,31 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \ /obj/item/stack/sheet/cloth/ten amount = 10 +//Durathread fuck slash-asterisk comments + GLOBAL_LIST_INIT(durathread_recipes, list ( \ + new/datum/stack_recipe("durathread jumpsuit", /obj/item/clothing/under/durathread, 4, time = 40), + new/datum/stack_recipe("durathread beret", /obj/item/clothing/head/beret/durathread, 2, time = 40), \ + new/datum/stack_recipe("durathread beanie", /obj/item/clothing/head/beanie/durathread, 2, time = 40), \ + new/datum/stack_recipe("durathread bandana", /obj/item/clothing/mask/bandana/durathread, 1, time = 25), \ + )) + +/obj/item/stack/sheet/durathread + name = "durathread" + desc = "A fabric sown from incredibly durable threads, known for its usefulness in armor production." + singular_name = "durathread roll" + icon_state = "sheet-durathread" + item_state = "sheet-cloth" + resistance_flags = FLAMMABLE + force = 0 + throwforce = 0 + merge_type = /obj/item/stack/sheet/durathread + +/obj/item/stack/sheet/durathread/Initialize(mapload, new_amount, merge = TRUE) + recipes = GLOB.durathread_recipes + return ..() + + + /* * Cardboard */ @@ -603,3 +629,29 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra amount = 20 /obj/item/stack/sheet/paperframes/fifty amount = 50 + + +//durathread and cotton raw +/obj/item/stack/sheet/cotton + name = "raw cotton bundle" + desc = "A bundle of raw cotton ready to be spun on the loom." + singular_name = "raw cotton ball" + icon_state = "sheet-cotton" + is_fabric = TRUE + resistance_flags = FLAMMABLE + force = 0 + throwforce = 0 + merge_type = /obj/item/stack/sheet/cotton + pull_effort = 30 + loom_result = /obj/item/stack/sheet/cloth + +/obj/item/stack/sheet/cotton/durathread + name = "raw durathread bundle" + desc = "A bundle of raw durathread ready to be spun on the loom." + singular_name = "raw durathread ball" + icon_state = "sheet-durathreadraw" + merge_type = /obj/item/stack/sheet/cotton/durathread + pull_effort = 70 + loom_result = /obj/item/stack/sheet/durathread + + diff --git a/code/game/objects/items/stacks/sheets/sheets.dm b/code/game/objects/items/stacks/sheets/sheets.dm index 21b43eba20..908fc88383 100644 --- a/code/game/objects/items/stacks/sheets/sheets.dm +++ b/code/game/objects/items/stacks/sheets/sheets.dm @@ -12,4 +12,7 @@ novariants = FALSE var/perunit = MINERAL_MATERIAL_AMOUNT var/sheettype = null //this is used for girders in the creation of walls/false walls - var/point_value = 0 //turn-in value for the gulag stacker - loosely relative to its rarity. \ No newline at end of file + var/point_value = 0 //turn-in value for the gulag stacker - loosely relative to its rarity + var/is_fabric = FALSE //is this a valid material for the loom? + var/loom_result //result from pulling on the loom + var/pull_effort = 0 //amount of delay when pulling on the loom \ No newline at end of file diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm index eb71311c96..b5d7282b07 100644 --- a/code/game/objects/items/storage/backpack.dm +++ b/code/game/objects/items/storage/backpack.dm @@ -248,12 +248,13 @@ desc = "A bone satchel fashend with watcher wings and large bones from goliath. Can be worn on the belt." icon = 'icons/obj/mining.dmi' icon_state = "goliath_saddle" - slot_flags = ITEM_SLOT_BACK | ITEM_SLOT_BELT + slot_flags = ITEM_SLOT_BACK /obj/item/storage/backpack/satchel/bone/ComponentInitialize() . = ..() GET_COMPONENT(STR, /datum/component/storage) - STR.max_combined_w_class = 10 + STR.max_combined_w_class = 20 + STR.max_items = 15 /obj/item/storage/backpack/satchel/cap name = "captain's satchel" @@ -355,6 +356,7 @@ new /obj/item/cautery(src) new /obj/item/surgical_drapes(src) new /obj/item/clothing/mask/surgical(src) + new /obj/item/reagent_containers/medspray/sterilizine(src) new /obj/item/razor(src) /obj/item/storage/backpack/duffelbag/sec @@ -376,6 +378,7 @@ new /obj/item/cautery(src) new /obj/item/surgical_drapes(src) new /obj/item/clothing/mask/surgical(src) + new /obj/item/reagent_containers/medspray/sterilizine(src) /obj/item/storage/backpack/duffelbag/engineering name = "industrial duffel bag" @@ -383,6 +386,14 @@ icon_state = "duffel-eng" item_state = "duffel-eng" +/obj/item/storage/backpack/duffelbag/durathread + name = "durathread duffel bag" + desc = "A lightweight duffel bag made out of durathread." + icon_state = "duffel-durathread" + item_state = "duffel-durathread" + resistance_flags = FIRE_PROOF + slowdown = 0 + /obj/item/storage/backpack/duffelbag/drone name = "drone duffel bag" desc = "A large duffel bag for holding tools and hats." @@ -398,6 +409,7 @@ new /obj/item/stack/cable_coil/random(src) new /obj/item/wirecutters(src) new /obj/item/multitool(src) + new /obj/item/pipe_dispenser(src) /obj/item/storage/backpack/duffelbag/clown name = "clown's duffel bag" @@ -460,6 +472,7 @@ new /obj/item/mmi/syndie(src) new /obj/item/implantcase(src) new /obj/item/implanter(src) + new /obj/item/reagent_containers/medspray/sterilizine(src) /obj/item/storage/backpack/duffelbag/syndie/surgery_adv name = "advanced surgery duffel bag" @@ -479,6 +492,7 @@ new /obj/item/mmi/syndie(src) new /obj/item/implantcase(src) new /obj/item/implanter(src) + new /obj/item/reagent_containers/medspray/sterilizine(src) /obj/item/storage/backpack/duffelbag/syndie/ammo name = "ammunition duffel bag" diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index d71b91c8dc..4495e9da14 100755 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -431,6 +431,48 @@ GET_COMPONENT(STR, /datum/component/storage) STR.max_items = 6 +/obj/item/storage/belt/durathread + name = "durathread toolbelt" + desc = "A toolbelt made out of durathread, it seems resistant enough to hold even big tools like an RCD, it also has higher capacity." + icon_state = "webbing-durathread" + item_state = "webbing-durathread" + resistance_flags = FIRE_PROOF + +/obj/item/storage/belt/durathread/ComponentInitialize() + . = ..() + var/datum/component/storage/STR = GetComponent(/datum/component/storage) + STR.max_items = 14 + STR.max_combined_w_class = 32 + STR.max_w_class = WEIGHT_CLASS_NORMAL + STR.can_hold = typecacheof(list( + /obj/item/crowbar, + /obj/item/screwdriver, + /obj/item/weldingtool, + /obj/item/wirecutters, + /obj/item/wrench, + /obj/item/multitool, + /obj/item/flashlight, + /obj/item/stack/cable_coil, + /obj/item/t_scanner, + /obj/item/analyzer, + /obj/item/geiger_counter, + /obj/item/extinguisher/mini, + /obj/item/radio, + /obj/item/clothing/gloves, + /obj/item/holosign_creator/atmos, + /obj/item/holosign_creator/engineering, + /obj/item/forcefield_projector, + /obj/item/assembly/signaler, + /obj/item/lightreplacer, + /obj/item/rcd_ammo, + /obj/item/construction/rcd, + /obj/item/pipe_dispenser, + /obj/item/stack/rods, + /obj/item/stack/tile/plasteel, + /obj/item/grenade/chem_grenade/metalfoam, + /obj/item/grenade/chem_grenade/smart_metal_foam + )) + /obj/item/storage/belt/grenade name = "grenadier belt" desc = "A belt for holding grenades." @@ -524,12 +566,15 @@ /obj/item/grenade/chem_grenade, /obj/item/lightreplacer, /obj/item/flashlight, + /obj/item/reagent_containers/glass/beaker, + /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/spray, /obj/item/soap, /obj/item/holosign_creator, /obj/item/key/janitor, /obj/item/clothing/gloves, /obj/item/melee/flyswatter, + /obj/item/paint/paint_remover, /obj/item/assembly/mousetrap )) @@ -548,6 +593,22 @@ /obj/item/ammo_casing/shotgun )) +/obj/item/storage/belt/bandolier/durathread + name = "durathread bandolier" + desc = "An double stacked bandolier made out of durathread." + icon_state = "bandolier-durathread" + item_state = "bandolier-durathread" + resistance_flags = FIRE_PROOF + +/obj/item/storage/belt/bandolier/durathread/ComponentInitialize() + . = ..() + GET_COMPONENT(STR, /datum/component/storage) + STR.max_items = 32 + STR.display_numerical_stacking = TRUE + STR.can_hold = typecacheof(list( + /obj/item/ammo_casing + )) + /obj/item/storage/belt/medolier name = "medolier" desc = "A medical bandolier for holding smartdarts." diff --git a/code/game/objects/items/storage/briefcase.dm b/code/game/objects/items/storage/briefcase.dm index bca13f2a45..ed547bc17d 100644 --- a/code/game/objects/items/storage/briefcase.dm +++ b/code/game/objects/items/storage/briefcase.dm @@ -40,9 +40,18 @@ /obj/item/storage/briefcase/lawyer/family name = "battered briefcase" - desc = "An old briefcase, this one has seen better days in its time. It's clear they don't make them nowadays as good as they used to. Comes with an added belt clip!" + icon_state = "gbriefcase" + lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi' + desc = "An old briefcase with a golden trim. It's clear they don't make them as good as they used to. Comes with an added belt clip!" slot_flags = ITEM_SLOT_BELT +/obj/item/storage/briefcase/lawyer/family/ComponentInitialize() + . = ..() + GET_COMPONENT(STR, /datum/component/storage) + STR.max_w_class = WEIGHT_CLASS_NORMAL + STR.max_combined_w_class = 14 + /obj/item/storage/briefcase/lawyer/family/PopulateContents() new /obj/item/stamp/law(src) new /obj/item/pen/fountain(src) diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm index e9b074d40c..312ef35430 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -1,365 +1,391 @@ -/* First aid storage - * Contains: - * First Aid Kits - * Pill Bottles - * Dice Pack (in a pill bottle) - */ - -/* - * First Aid Kits - */ -/obj/item/storage/firstaid - name = "first-aid kit" - desc = "It's an emergency medical kit for those serious boo-boos." - icon_state = "firstaid" - lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' - throw_speed = 3 - throw_range = 7 - var/empty = FALSE - -/obj/item/storage/firstaid/regular - icon_state = "firstaid" - desc = "A first aid kit with the ability to heal common types of injuries." - -/obj/item/storage/firstaid/regular/suicide_act(mob/living/carbon/user) - user.visible_message("[user] begins giving [user.p_them()]self aids with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!") - return BRUTELOSS - -/obj/item/storage/firstaid/regular/PopulateContents() - if(empty) - return - new /obj/item/stack/medical/gauze(src) - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/ointment(src) - new /obj/item/stack/medical/ointment(src) - new /obj/item/reagent_containers/hypospray/medipen(src) - new /obj/item/healthanalyzer(src) - -/obj/item/storage/firstaid/ancient - icon_state = "firstaid" - desc = "A first aid kit with the ability to heal common types of injuries." - -/obj/item/storage/firstaid/ancient/PopulateContents() - if(empty) - return - new /obj/item/stack/medical/gauze(src) - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/ointment(src) - new /obj/item/stack/medical/ointment(src) - new /obj/item/stack/medical/ointment(src) - -/obj/item/storage/firstaid/fire - name = "burn treatment kit" - desc = "A specialized medical kit for when the toxins lab -spontaneously- burns down." - icon_state = "ointment" - item_state = "firstaid-ointment" - -/obj/item/storage/firstaid/fire/suicide_act(mob/living/carbon/user) - user.visible_message("[user] begins rubbing \the [src] against [user.p_them()]self! It looks like [user.p_theyre()] trying to start a fire!") - return FIRELOSS - -/obj/item/storage/firstaid/fire/Initialize(mapload) - . = ..() - icon_state = pick("ointment","firefirstaid") - -/obj/item/storage/firstaid/fire/PopulateContents() - if(empty) - return - for(var/i in 1 to 3) - new /obj/item/reagent_containers/pill/patch/silver_sulf(src) - new /obj/item/reagent_containers/pill/oxandrolone(src) - new /obj/item/reagent_containers/pill/oxandrolone(src) - new /obj/item/reagent_containers/hypospray/medipen(src) - new /obj/item/healthanalyzer(src) - -/obj/item/storage/firstaid/toxin - name = "toxin treatment kit" - desc = "Used to treat toxic blood content and radiation poisoning." - icon_state = "antitoxin" - item_state = "firstaid-toxin" - -/obj/item/storage/firstaid/toxin/suicide_act(mob/living/carbon/user) - user.visible_message("[user] begins licking the lead paint off \the [src]! It looks like [user.p_theyre()] trying to commit suicide!") - return TOXLOSS - -/obj/item/storage/firstaid/toxin/Initialize(mapload) - . = ..() - icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3") - -/obj/item/storage/firstaid/toxin/PopulateContents() - if(empty) - return - for(var/i in 1 to 4) - new /obj/item/reagent_containers/syringe/charcoal(src) - for(var/i in 1 to 2) - new /obj/item/storage/pill_bottle/charcoal(src) - new /obj/item/healthanalyzer(src) - -/obj/item/storage/firstaid/radbgone - name = "radiation treatment kit" - desc = "Used to treat minor toxic blood content and major radiation poisoning." - icon_state = "antitoxin" - item_state = "firstaid-toxin" - -/obj/item/storage/firstaid/radbgone/suicide_act(mob/living/carbon/user) - user.visible_message("[user] begins licking the lead paint off \the [src]! It looks like [user.p_theyre()] trying to commit suicide!") - return TOXLOSS - -/obj/item/storage/firstaid/radbgone/PopulateContents() - if(empty) - return - if(prob(50)) - new /obj/item/reagent_containers/pill/mutarad(src) - if(prob(80)) - new /obj/item/reagent_containers/pill/antirad_plus(src) - new /obj/item/reagent_containers/syringe/charcoal(src) - new /obj/item/storage/pill_bottle/charcoal(src) - new /obj/item/reagent_containers/pill/mutadone(src) - new /obj/item/reagent_containers/pill/antirad(src) - new /obj/item/reagent_containers/food/drinks/bottle/vodka(src) - new /obj/item/healthanalyzer(src) - - -/obj/item/storage/firstaid/o2 - name = "oxygen deprivation treatment kit" - desc = "A box full of oxygen goodies." - icon_state = "o2" - item_state = "firstaid-o2" - -/obj/item/storage/firstaid/o2/suicide_act(mob/living/carbon/user) - user.visible_message("[user] begins hitting [user.p_their()] neck with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!") - return OXYLOSS - -/obj/item/storage/firstaid/o2/PopulateContents() - if(empty) - return - for(var/i in 1 to 4) - new /obj/item/reagent_containers/pill/salbutamol(src) - new /obj/item/reagent_containers/hypospray/medipen(src) - new /obj/item/reagent_containers/hypospray/medipen(src) - new /obj/item/healthanalyzer(src) - -/obj/item/storage/firstaid/brute - name = "brute trauma treatment kit" - desc = "A first aid kit for when you get toolboxed." - icon_state = "brute" - item_state = "firstaid-brute" - -/obj/item/storage/firstaid/brute/suicide_act(mob/living/carbon/user) - user.visible_message("[user] begins beating [user.p_them()]self over the head with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!") - return BRUTELOSS - -/obj/item/storage/firstaid/brute/PopulateContents() - if(empty) - return - for(var/i in 1 to 4) - new /obj/item/reagent_containers/pill/patch/styptic(src) - new /obj/item/stack/medical/gauze(src) - new /obj/item/stack/medical/gauze(src) - new /obj/item/healthanalyzer(src) - -/obj/item/storage/firstaid/tactical - name = "combat medical kit" - desc = "I hope you've got insurance." - icon_state = "bezerk" - -/obj/item/storage/firstaid/tactical/ComponentInitialize() - . = ..() - GET_COMPONENT(STR, /datum/component/storage) - STR.max_w_class = WEIGHT_CLASS_NORMAL - -/obj/item/storage/firstaid/tactical/PopulateContents() - if(empty) - return - new /obj/item/stack/medical/gauze(src) - new /obj/item/defibrillator/compact/combat/loaded(src) - new /obj/item/reagent_containers/hypospray/combat(src) - new /obj/item/reagent_containers/pill/patch/styptic(src) - new /obj/item/reagent_containers/pill/patch/silver_sulf(src) - new /obj/item/reagent_containers/syringe/lethal/choral(src) - new /obj/item/clothing/glasses/hud/health/night(src) - -/* - * Pill Bottles - */ - -/obj/item/storage/pill_bottle - name = "pill bottle" - desc = "It's an airtight container for storing medication." - icon_state = "pill_canister" - icon = 'icons/obj/chemical.dmi' - item_state = "contsolid" - lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' - w_class = WEIGHT_CLASS_SMALL - -/obj/item/storage/pill_bottle/ComponentInitialize() - . = ..() - GET_COMPONENT(STR, /datum/component/storage) - STR.allow_quick_gather = TRUE - STR.click_gather = TRUE - STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/dice)) - -/obj/item/storage/pill_bottle/suicide_act(mob/user) - user.visible_message("[user] is trying to get the cap off [src]! It looks like [user.p_theyre()] trying to commit suicide!") - return (TOXLOSS) - -/obj/item/storage/pill_bottle/charcoal - name = "bottle of charcoal pills" - desc = "Contains pills used to counter toxins." - -/obj/item/storage/pill_bottle/charcoal/PopulateContents() - for(var/i in 1 to 7) - new /obj/item/reagent_containers/pill/charcoal(src) - -/obj/item/storage/pill_bottle/antirad - name = "bottle of charcoal pills" - desc = "Contains pills used to counter radiation poisoning." - -/obj/item/storage/pill_bottle/anitrad/PopulateContents() - for(var/i in 1 to 5) - new /obj/item/reagent_containers/pill/antirad(src) - -/obj/item/storage/pill_bottle/epinephrine - name = "bottle of epinephrine pills" - desc = "Contains pills used to stabilize patients." - -/obj/item/storage/pill_bottle/epinephrine/PopulateContents() - for(var/i in 1 to 7) - new /obj/item/reagent_containers/pill/epinephrine(src) - -/obj/item/storage/pill_bottle/mutadone - name = "bottle of mutadone pills" - desc = "Contains pills used to treat genetic abnormalities." - -/obj/item/storage/pill_bottle/mutadone/PopulateContents() - for(var/i in 1 to 7) - new /obj/item/reagent_containers/pill/mutadone(src) - -/obj/item/storage/pill_bottle/mannitol - name = "bottle of mannitol pills" - desc = "Contains pills used to treat brain damage." - -/obj/item/storage/pill_bottle/mannitol/PopulateContents() - for(var/i in 1 to 7) - new /obj/item/reagent_containers/pill/mannitol(src) - -/obj/item/storage/pill_bottle/stimulant - name = "bottle of stimulant pills" - desc = "Guaranteed to give you that extra burst of energy during a long shift!" - -/obj/item/storage/pill_bottle/stimulant/PopulateContents() - for(var/i in 1 to 5) - new /obj/item/reagent_containers/pill/stimulant(src) - -/obj/item/storage/pill_bottle/mining - name = "bottle of patches" - desc = "Contains patches used to treat brute and burn damage." - -/obj/item/storage/pill_bottle/mining/PopulateContents() - new /obj/item/reagent_containers/pill/patch/silver_sulf(src) - for(var/i in 1 to 3) - new /obj/item/reagent_containers/pill/patch/styptic(src) - -/obj/item/storage/pill_bottle/zoom - name = "suspicious pill bottle" - desc = "The label is pretty old and almost unreadable, you recognize some chemical compounds." - -/obj/item/storage/pill_bottle/zoom/PopulateContents() - for(var/i in 1 to 5) - new /obj/item/reagent_containers/pill/zoom(src) - -/obj/item/storage/pill_bottle/happy - name = "suspicious pill bottle" - desc = "There is a smiley on the top." - -/obj/item/storage/pill_bottle/happy/PopulateContents() - for(var/i in 1 to 5) - new /obj/item/reagent_containers/pill/happy(src) - -/obj/item/storage/pill_bottle/lsd - name = "suspicious pill bottle" - desc = "There is a badly drawn thing with the shape of a mushroom." - -/obj/item/storage/pill_bottle/lsd/PopulateContents() - for(var/i in 1 to 5) - new /obj/item/reagent_containers/pill/lsd(src) - -/obj/item/storage/pill_bottle/aranesp - name = "suspicious pill bottle" - desc = "The label says 'gotta go fast'." - -/obj/item/storage/pill_bottle/aranesp/PopulateContents() - for(var/i in 1 to 5) - new /obj/item/reagent_containers/pill/aranesp(src) - -/obj/item/storage/pill_bottle/antirad_plus - name = "anti radiation deluxe pill bottle" - desc = "The label says 'Med-Co branded pills'." - -/obj/item/storage/pill_bottle/antirad_plus/PopulateContents() - for(var/i in 1 to 7) - new /obj/item/reagent_containers/pill/antirad_plus(src) - -/obj/item/storage/pill_bottle/mutarad - name = "radiation treatment deluxe pill bottle" - desc = "The label says 'Med-Co branded pills' and below that 'Contains Mutadone in each pill!`." - -/obj/item/storage/pill_bottle/mutarad/PopulateContents() - for(var/i in 1 to 7) - new /obj/item/reagent_containers/pill/mutarad(src) - -/obj/item/storage/pill_bottle/penis_enlargement - name = "penis enlargement pills" - desc = "You want penis enlargement pills?" - -/obj/item/storage/pill_bottle/penis_enlargement/PopulateContents() - for(var/i in 1 to 7) - new /obj/item/reagent_containers/pill/penis_enlargement(src) - -///////////// -//Organ Box// -///////////// - -/obj/item/storage/belt/organbox - name = "Organ Storge" - desc = "A compact box that helps hold massive amounts of implants, organs, and some tools. Has a belt clip for easy carrying" - w_class = WEIGHT_CLASS_BULKY - icon = 'icons/obj/mysterybox.dmi' - icon_state = "organbox_open" - lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' - throw_speed = 1 - throw_range = 1 - -/obj/item/storage/belt/organbox/ComponentInitialize() - . = ..() - GET_COMPONENT(STR, /datum/component/storage) - STR.max_items = 16 - STR.max_w_class = WEIGHT_CLASS_BULKY - STR.max_combined_w_class = 20 - STR.can_hold = typecacheof(list( - /obj/item/storage/pill_bottle, - /obj/item/reagent_containers/hypospray, - /obj/item/healthanalyzer, - /obj/item/reagent_containers/syringe, - /obj/item/clothing/glasses/hud/health, - /obj/item/hemostat, - /obj/item/scalpel, - /obj/item/retractor, - /obj/item/cautery, - /obj/item/surgical_drapes, - /obj/item/autosurgeon, - /obj/item/organ, - /obj/item/implant, - /obj/item/implantpad, - /obj/item/implantcase, - /obj/item/implanter, - /obj/item/circuitboard/computer/operating, - /obj/item/stack/sheet/mineral/silver, - /obj/item/organ_storage - )) + +/* First aid storage + * Contains: + * First Aid Kits + * Pill Bottles + * Dice Pack (in a pill bottle) + */ + +/* + * First Aid Kits + */ +/obj/item/storage/firstaid + name = "first-aid kit" + desc = "It's an emergency medical kit for those serious boo-boos." + icon_state = "firstaid" + lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + throw_speed = 3 + throw_range = 7 + var/empty = FALSE + +/obj/item/storage/firstaid/regular + icon_state = "firstaid" + desc = "A first aid kit with the ability to heal common types of injuries." + +/obj/item/storage/firstaid/regular/suicide_act(mob/living/carbon/user) + user.visible_message("[user] begins giving [user.p_them()]self aids with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!") + return BRUTELOSS + +/obj/item/storage/firstaid/regular/PopulateContents() + if(empty) + return + new /obj/item/stack/medical/gauze(src) + new /obj/item/stack/medical/bruise_pack(src) + new /obj/item/stack/medical/bruise_pack(src) + new /obj/item/stack/medical/ointment(src) + new /obj/item/stack/medical/ointment(src) + new /obj/item/reagent_containers/hypospray/medipen(src) + new /obj/item/healthanalyzer(src) + +/obj/item/storage/firstaid/ancient + icon_state = "firstaid" + desc = "A first aid kit with the ability to heal common types of injuries." + +/obj/item/storage/firstaid/ancient/PopulateContents() + if(empty) + return + new /obj/item/stack/medical/gauze(src) + new /obj/item/stack/medical/bruise_pack(src) + new /obj/item/stack/medical/bruise_pack(src) + new /obj/item/stack/medical/bruise_pack(src) + new /obj/item/stack/medical/ointment(src) + new /obj/item/stack/medical/ointment(src) + new /obj/item/stack/medical/ointment(src) + +/obj/item/storage/firstaid/fire + name = "burn treatment kit" + desc = "A specialized medical kit for when the toxins lab -spontaneously- burns down." + icon_state = "ointment" + item_state = "firstaid-ointment" + +/obj/item/storage/firstaid/fire/suicide_act(mob/living/carbon/user) + user.visible_message("[user] begins rubbing \the [src] against [user.p_them()]self! It looks like [user.p_theyre()] trying to start a fire!") + return FIRELOSS + +/obj/item/storage/firstaid/fire/Initialize(mapload) + . = ..() + icon_state = pick("ointment","firefirstaid") + +/obj/item/storage/firstaid/fire/PopulateContents() + if(empty) + return + for(var/i in 1 to 3) + new /obj/item/reagent_containers/pill/patch/silver_sulf(src) + new /obj/item/reagent_containers/pill/oxandrolone(src) + new /obj/item/reagent_containers/pill/oxandrolone(src) + new /obj/item/reagent_containers/hypospray/medipen(src) + new /obj/item/healthanalyzer(src) + +/obj/item/storage/firstaid/toxin + name = "toxin treatment kit" + desc = "Used to treat toxic blood content and radiation poisoning." + icon_state = "antitoxin" + item_state = "firstaid-toxin" + +/obj/item/storage/firstaid/toxin/suicide_act(mob/living/carbon/user) + user.visible_message("[user] begins licking the lead paint off \the [src]! It looks like [user.p_theyre()] trying to commit suicide!") + return TOXLOSS + +/obj/item/storage/firstaid/toxin/Initialize(mapload) + . = ..() + icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3") + +/obj/item/storage/firstaid/toxin/PopulateContents() + if(empty) + return + for(var/i in 1 to 4) + new /obj/item/reagent_containers/syringe/charcoal(src) + for(var/i in 1 to 2) + new /obj/item/storage/pill_bottle/charcoal(src) + new /obj/item/healthanalyzer(src) + +/obj/item/storage/firstaid/radbgone + name = "radiation treatment kit" + desc = "Used to treat minor toxic blood content and major radiation poisoning." + icon_state = "antitoxin" + item_state = "firstaid-toxin" + +/obj/item/storage/firstaid/radbgone/suicide_act(mob/living/carbon/user) + user.visible_message("[user] begins licking the lead paint off \the [src]! It looks like [user.p_theyre()] trying to commit suicide!") + return TOXLOSS + +/obj/item/storage/firstaid/radbgone/PopulateContents() + if(empty) + return + if(prob(50)) + new /obj/item/reagent_containers/pill/mutarad(src) + if(prob(80)) + new /obj/item/reagent_containers/pill/antirad_plus(src) + new /obj/item/reagent_containers/syringe/charcoal(src) + new /obj/item/storage/pill_bottle/charcoal(src) + new /obj/item/reagent_containers/pill/mutadone(src) + new /obj/item/reagent_containers/pill/antirad(src) + new /obj/item/reagent_containers/food/drinks/bottle/vodka(src) + new /obj/item/healthanalyzer(src) + + +/obj/item/storage/firstaid/o2 + name = "oxygen deprivation treatment kit" + desc = "A box full of oxygen goodies." + icon_state = "o2" + item_state = "firstaid-o2" + +/obj/item/storage/firstaid/o2/suicide_act(mob/living/carbon/user) + user.visible_message("[user] begins hitting [user.p_their()] neck with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!") + return OXYLOSS + +/obj/item/storage/firstaid/o2/PopulateContents() + if(empty) + return + for(var/i in 1 to 4) + new /obj/item/reagent_containers/pill/salbutamol(src) + new /obj/item/reagent_containers/hypospray/medipen(src) + new /obj/item/reagent_containers/hypospray/medipen(src) + new /obj/item/healthanalyzer(src) + +/obj/item/storage/firstaid/brute + name = "brute trauma treatment kit" + desc = "A first aid kit for when you get toolboxed." + icon_state = "brute" + item_state = "firstaid-brute" + +/obj/item/storage/firstaid/brute/suicide_act(mob/living/carbon/user) + user.visible_message("[user] begins beating [user.p_them()]self over the head with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!") + return BRUTELOSS + +/obj/item/storage/firstaid/brute/PopulateContents() + if(empty) + return + for(var/i in 1 to 4) + new /obj/item/reagent_containers/pill/patch/styptic(src) + new /obj/item/stack/medical/gauze(src) + new /obj/item/stack/medical/gauze(src) + new /obj/item/healthanalyzer(src) + +/obj/item/storage/firstaid/tactical + name = "combat medical kit" + desc = "I hope you've got insurance." + icon_state = "bezerk" + +/obj/item/storage/firstaid/tactical/ComponentInitialize() + . = ..() + GET_COMPONENT(STR, /datum/component/storage) + STR.max_w_class = WEIGHT_CLASS_NORMAL + +/obj/item/storage/firstaid/tactical/PopulateContents() + if(empty) + return + new /obj/item/stack/medical/gauze(src) + new /obj/item/defibrillator/compact/combat/loaded(src) + new /obj/item/reagent_containers/hypospray/combat(src) + new /obj/item/reagent_containers/pill/patch/styptic(src) + new /obj/item/reagent_containers/pill/patch/silver_sulf(src) + new /obj/item/reagent_containers/syringe/lethal/choral(src) + new /obj/item/clothing/glasses/hud/health/night(src) + +/* + * Pill Bottles + */ + +/obj/item/storage/pill_bottle + name = "pill bottle" + desc = "It's an airtight container for storing medication." + icon_state = "pill_canister" + icon = 'icons/obj/chemical.dmi' + item_state = "contsolid" + lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + w_class = WEIGHT_CLASS_SMALL + +/obj/item/storage/pill_bottle/ComponentInitialize() + . = ..() + GET_COMPONENT(STR, /datum/component/storage) + STR.allow_quick_gather = TRUE + STR.click_gather = TRUE + STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/dice)) + +/obj/item/storage/pill_bottle/suicide_act(mob/user) + user.visible_message("[user] is trying to get the cap off [src]! It looks like [user.p_theyre()] trying to commit suicide!") + return (TOXLOSS) + +/obj/item/storage/pill_bottle/charcoal + name = "bottle of charcoal pills" + desc = "Contains pills used to counter toxins." + +/obj/item/storage/pill_bottle/charcoal/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/reagent_containers/pill/charcoal(src) + +/obj/item/storage/pill_bottle/antirad + name = "bottle of charcoal pills" + desc = "Contains pills used to counter radiation poisoning." + +/obj/item/storage/pill_bottle/anitrad/PopulateContents() + for(var/i in 1 to 5) + new /obj/item/reagent_containers/pill/antirad(src) + +/obj/item/storage/pill_bottle/epinephrine + name = "bottle of epinephrine pills" + desc = "Contains pills used to stabilize patients." + +/obj/item/storage/pill_bottle/epinephrine/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/reagent_containers/pill/epinephrine(src) + +/obj/item/storage/pill_bottle/mutadone + name = "bottle of mutadone pills" + desc = "Contains pills used to treat genetic abnormalities." + +/obj/item/storage/pill_bottle/mutadone/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/reagent_containers/pill/mutadone(src) + +/obj/item/storage/pill_bottle/mannitol + name = "bottle of mannitol pills" + desc = "Contains pills used to treat brain damage." + +/obj/item/storage/pill_bottle/mannitol/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/reagent_containers/pill/mannitol(src) + +/obj/item/storage/pill_bottle/stimulant + name = "bottle of stimulant pills" + desc = "Guaranteed to give you that extra burst of energy during a long shift!" + +/obj/item/storage/pill_bottle/stimulant/PopulateContents() + for(var/i in 1 to 5) + new /obj/item/reagent_containers/pill/stimulant(src) + +/obj/item/storage/pill_bottle/mining + name = "bottle of patches" + desc = "Contains patches used to treat brute and burn damage." + +/obj/item/storage/pill_bottle/mining/PopulateContents() + new /obj/item/reagent_containers/pill/patch/silver_sulf(src) + for(var/i in 1 to 3) + new /obj/item/reagent_containers/pill/patch/styptic(src) + +/obj/item/storage/pill_bottle/zoom + name = "suspicious pill bottle" + desc = "The label is pretty old and almost unreadable, you recognize some chemical compounds." + +/obj/item/storage/pill_bottle/zoom/PopulateContents() + for(var/i in 1 to 5) + new /obj/item/reagent_containers/pill/zoom(src) + +/obj/item/storage/pill_bottle/happy + name = "suspicious pill bottle" + desc = "There is a smiley on the top." + +/obj/item/storage/pill_bottle/happy/PopulateContents() + for(var/i in 1 to 5) + new /obj/item/reagent_containers/pill/happy(src) + +/obj/item/storage/pill_bottle/lsd + name = "suspicious pill bottle" + desc = "There is a badly drawn thing with the shape of a mushroom." + +/obj/item/storage/pill_bottle/lsd/PopulateContents() + for(var/i in 1 to 5) + new /obj/item/reagent_containers/pill/lsd(src) + +/obj/item/storage/pill_bottle/aranesp + name = "suspicious pill bottle" + desc = "The label says 'gotta go fast'." + +/obj/item/storage/pill_bottle/aranesp/PopulateContents() + for(var/i in 1 to 5) + new /obj/item/reagent_containers/pill/aranesp(src) + +/obj/item/storage/pill_bottle/psicodine + name = "bottle of psicodine pills" + desc = "Contains pills used to treat mental distress and traumas." + +/obj/item/storage/pill_bottle/psicodine/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/reagent_containers/pill/psicodine(src) + +/obj/item/storage/pill_bottle/happiness + name = "happiness pill bottle" + desc = "The label is long gone, in its place an 'H' written with a marker." + +/obj/item/storage/pill_bottle/happiness/PopulateContents() + for(var/i in 1 to 5) + new /obj/item/reagent_containers/pill/happiness(src) + +/obj/item/storage/pill_bottle/antirad_plus + name = "anti radiation deluxe pill bottle" + desc = "The label says 'Med-Co branded pills'." + +/obj/item/storage/pill_bottle/antirad_plus/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/reagent_containers/pill/antirad_plus(src) + +/obj/item/storage/pill_bottle/mutarad + name = "radiation treatment deluxe pill bottle" + desc = "The label says 'Med-Co branded pills' and below that 'Contains Mutadone in each pill!`." + +/obj/item/storage/pill_bottle/mutarad/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/reagent_containers/pill/mutarad(src) + +/obj/item/storage/pill_bottle/penis_enlargement + name = "penis enlargement pills" + desc = "You want penis enlargement pills?" + +/obj/item/storage/pill_bottle/penis_enlargement/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/reagent_containers/pill/penis_enlargement(src) + +/obj/item/storage/pill_bottle/breast_enlargement + name = "breast enlargement pills" + desc = "Made by Fermichem - They have a woman with breasts larger than she is on them. The warming states not to take more than 10u at a time." + +/obj/item/storage/pill_bottle/breast_enlargement/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/reagent_containers/pill/breast_enlargement(src) + +///////////// +//Organ Box// +///////////// + +/obj/item/storage/belt/organbox + name = "Organ Storge" + desc = "A compact box that helps hold massive amounts of implants, organs, and some tools. Has a belt clip for easy carrying" + w_class = WEIGHT_CLASS_BULKY + icon = 'icons/obj/mysterybox.dmi' + icon_state = "organbox_open" + lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + throw_speed = 1 + throw_range = 1 + +/obj/item/storage/belt/organbox/ComponentInitialize() + . = ..() + GET_COMPONENT(STR, /datum/component/storage) + STR.max_items = 16 + STR.max_w_class = WEIGHT_CLASS_BULKY + STR.max_combined_w_class = 20 + STR.can_hold = typecacheof(list( + /obj/item/storage/pill_bottle, + /obj/item/reagent_containers/hypospray, + /obj/item/healthanalyzer, + /obj/item/reagent_containers/syringe, + /obj/item/clothing/glasses/hud/health, + /obj/item/hemostat, + /obj/item/scalpel, + /obj/item/retractor, + /obj/item/cautery, + /obj/item/surgical_drapes, + /obj/item/autosurgeon, + /obj/item/organ, + /obj/item/implant, + /obj/item/implantpad, + /obj/item/implantcase, + /obj/item/implanter, + /obj/item/circuitboard/computer/operating, + /obj/item/stack/sheet/mineral/silver, + /obj/item/organ_storage + )) + diff --git a/code/game/objects/items/storage/lockbox.dm b/code/game/objects/items/storage/lockbox.dm index 4924051855..eeebc6f4c5 100644 --- a/code/game/objects/items/storage/lockbox.dm +++ b/code/game/objects/items/storage/lockbox.dm @@ -48,14 +48,16 @@ to_chat(user, "It's locked!") /obj/item/storage/lockbox/emag_act(mob/user) - if(!broken) - broken = TRUE - SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE) - desc += "It appears to be broken." - icon_state = src.icon_broken - if(user) - visible_message("\The [src] has been broken by [user] with an electromagnetic card!") - return + . = ..() + if(broken) + return + broken = TRUE + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE) + desc += "It appears to be broken." + icon_state = src.icon_broken + if(user) + visible_message("\The [src] has been broken by [user] with an electromagnetic card!") + return TRUE /obj/item/storage/lockbox/Entered() . = ..() diff --git a/code/game/objects/items/storage/uplink_kits.dm b/code/game/objects/items/storage/uplink_kits.dm index a6a3cea373..6e41527b24 100644 --- a/code/game/objects/items/storage/uplink_kits.dm +++ b/code/game/objects/items/storage/uplink_kits.dm @@ -132,7 +132,7 @@ new /obj/item/card/emag(src) // 6 tc if("ninja") // 40~ tc worth - new /obj/item/katana(src) // Unique , basicly a better esword. 10 tc? + new /obj/item/katana(src) // Unique , basicly a better esword. 10 tc? new /obj/item/implanter/adrenalin(src) // 8 tc new /obj/item/throwing_star(src) // ~5 tc for all 6 new /obj/item/throwing_star(src) @@ -294,6 +294,7 @@ new /obj/item/radio/headset/chameleon(src) new /obj/item/stamp/chameleon(src) new /obj/item/pda/chameleon(src) + new /obj/item/clothing/neck/cloak/chameleon(src) //5*(2*4) = 5*8 = 45, 45 damage if you hit one person with all 5 stars. //Not counting the damage it will do while embedded (2*4 = 8, at 15% chance) diff --git a/code/game/objects/items/storage/wallets.dm b/code/game/objects/items/storage/wallets.dm index c263c2669d..cb5790e45f 100644 --- a/code/game/objects/items/storage/wallets.dm +++ b/code/game/objects/items/storage/wallets.dm @@ -36,7 +36,8 @@ /obj/item/reagent_containers/syringe, /obj/item/screwdriver, /obj/item/valentine, - /obj/item/stamp)) + /obj/item/stamp, + /obj/item/key)) /obj/item/storage/wallet/Exited(atom/movable/AM) . = ..() @@ -60,7 +61,7 @@ /obj/item/storage/wallet/update_icon() var/new_state = "wallet" if(front_id) - new_state = "wallet_[front_id.icon_state]" + new_state = "wallet_id" if(new_state != icon_state) //avoid so many icon state changes. icon_state = new_state diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 1245b7de94..d409e40575 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -23,7 +23,7 @@ toggle_internals(user) /obj/item/tank/proc/toggle_internals(mob/user) - var/mob/living/carbon/human/H = user + var/mob/living/carbon/H = user if(!istype(H)) return @@ -33,13 +33,19 @@ H.update_internals_hud_icon(0) else if(!H.getorganslot(ORGAN_SLOT_BREATHING_TUBE)) - if(!H.wear_mask) - to_chat(H, "You need a mask!") - return - if(H.wear_mask.mask_adjusted) - H.wear_mask.adjustmask(H) - if(!(H.wear_mask.clothing_flags & MASKINTERNALS)) - to_chat(H, "[H.wear_mask] can't use [src]!") + var/obj/item/clothing/check + var/internals = FALSE + + for(check in GET_INTERNAL_SLOTS(H)) + if(istype(check, /obj/item/clothing/mask)) + var/obj/item/clothing/mask/M = check + if(M.mask_adjusted) + M.adjustmask(H) + if(CHECK_BITFIELD(check.clothing_flags, ALLOWINTERNALS)) + internals = TRUE + + if(!internals) + to_chat(H, "You are not wearing an internals mask!") return if(H.internal) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 9ac5261e5f..46fabea8b0 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -30,6 +30,7 @@ throw_speed = 3 throw_range = 7 force = 0 + total_mass = TOTAL_MASS_TINY_ITEM /* @@ -112,10 +113,6 @@ /obj/item/toy/syndicateballoon name = "syndicate balloon" desc = "There is a tag on the back that reads \"FUK NT!11!\"." - throwforce = 0 - throw_speed = 3 - throw_range = 7 - force = 0 icon = 'icons/obj/items_and_weapons.dmi' icon_state = "syndballoon" item_state = "syndballoon" @@ -225,6 +222,8 @@ w_class = WEIGHT_CLASS_SMALL attack_verb = list("attacked", "struck", "hit") var/hacked = FALSE + total_mass = 0.4 + var/total_mass_on = TOTAL_MASS_TOY_SWORD /obj/item/toy/sword/attack_self(mob/user) active = !( active ) @@ -274,6 +273,9 @@ else return ..() +/obj/item/toy/sword/getweight() + return (active ? total_mass_on : total_mass) || w_class *1.25 + /* * Foam armblade */ @@ -327,12 +329,13 @@ force_unwielded = 0 force_wielded = 0 attack_verb = list("attacked", "struck", "hit") + total_mass_on = TOTAL_MASS_TOY_SWORD /obj/item/twohanded/dualsaber/toy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) - return 0 + return FALSE /obj/item/twohanded/dualsaber/toy/IsReflect()//Stops Toy Dualsabers from reflecting energy projectiles - return 0 + return FALSE /obj/item/toy/katana name = "replica katana" @@ -346,6 +349,7 @@ slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK force = 5 throwforce = 5 + total_mass = null w_class = WEIGHT_CLASS_NORMAL attack_verb = list("attacked", "slashed", "stabbed", "sliced") hitsound = 'sound/weapons/bladeslice.ogg' diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index bf63a96f05..82bf2c6b5f 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -28,6 +28,8 @@ var/force_wielded = 0 var/wieldsound = null var/unwieldsound = null + var/slowdown_wielded = 0 + item_flags = SLOWS_WHILE_IN_HAND /obj/item/twohanded/proc/unwield(mob/living/carbon/user, show_message = TRUE) if(!wielded || !user) @@ -55,7 +57,7 @@ var/obj/item/twohanded/offhand/O = user.get_inactive_held_item() if(O && istype(O)) O.unwield() - return + slowdown -= slowdown_wielded /obj/item/twohanded/proc/wield(mob/living/carbon/user) if(wielded) @@ -85,7 +87,7 @@ O.desc = "Your second grip on [src]." O.wielded = TRUE user.put_in_inactive_hand(O) - return + slowdown += slowdown_wielded /obj/item/twohanded/dropped(mob/user) . = ..() @@ -279,6 +281,7 @@ wieldsound = 'sound/weapons/saberon.ogg' unwieldsound = 'sound/weapons/saberoff.ogg' hitsound = "swing_hit" + var/hitsound_on = 'sound/weapons/blade1.ogg' armour_penetration = 35 item_color = "green" light_color = "#00ff00"//green @@ -290,8 +293,10 @@ var/hacked = FALSE var/brightness_on = 6 //TWICE AS BRIGHT AS A REGULAR ESWORD var/list/possible_colors = list("red", "blue", "green", "purple") - total_mass = 0.375 //Survival flashlights typically weigh around 5 ounces. - var/total_mass_on = 3.4 //The typical medieval sword, on the other hand, weighs roughly 3 pounds. //Values copied from the regular e-sword + var/list/rainbow_colors = list(LIGHT_COLOR_RED, LIGHT_COLOR_GREEN, LIGHT_COLOR_LIGHT_CYAN, LIGHT_COLOR_LAVENDER) + var/spinnable = TRUE + total_mass = 0.4 //Survival flashlights typically weigh around 5 ounces. + var/total_mass_on = 3.4 /obj/item/twohanded/dualsaber/suicide_act(mob/living/carbon/user) if(wielded) @@ -353,7 +358,7 @@ if(HAS_TRAIT(user, TRAIT_CLUMSY) && (wielded) && prob(40)) impale(user) return - if((wielded) && prob(50)) + if(spinnable && (wielded) && prob(50)) INVOKE_ASYNC(src, .proc/jedi_spin, user) /obj/item/twohanded/dualsaber/proc/jedi_spin(mob/living/user) @@ -406,11 +411,14 @@ /obj/item/twohanded/dualsaber/process() if(wielded) if(hacked) - light_color = pick(LIGHT_COLOR_RED, LIGHT_COLOR_GREEN, LIGHT_COLOR_LIGHT_CYAN, LIGHT_COLOR_LAVENDER) + rainbow_process() open_flame() else STOP_PROCESSING(SSobj, src) +/obj/item/twohanded/dualsaber/proc/rainbow_process() + light_color = pick(rainbow_colors) + /obj/item/twohanded/dualsaber/IsReflect() if(wielded) return 1 @@ -428,7 +436,8 @@ playsound(loc, hitsound, get_clamped_volume(), 1, -1) add_fingerprint(user) // Light your candles while spinning around the room - INVOKE_ASYNC(src, .proc/jedi_spin, user) + if(spinnable) + INVOKE_ASYNC(src, .proc/jedi_spin, user) /obj/item/twohanded/dualsaber/green possible_colors = list("green") @@ -478,6 +487,7 @@ armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30) var/obj/item/grenade/explosive = null var/war_cry = "AAAAARGH!!!" + var/icon_prefix = "spearglass" /obj/item/twohanded/spear/Initialize() . = ..() @@ -520,7 +530,7 @@ if(explosive) icon_state = "spearbomb[wielded]" else - icon_state = "spearglass[wielded]" + icon_state = "[icon_prefix][wielded]" /obj/item/twohanded/spear/afterattack(atom/movable/AM, mob/user, proximity) . = ..() @@ -547,6 +557,13 @@ src.war_cry = input /obj/item/twohanded/spear/CheckParts(list/parts_list) + var/obj/item/shard/tip = locate() in parts_list + if (istype(tip, /obj/item/shard/plasma)) + force_wielded = 19 + force_unwielded = 11 + throwforce = 21 + icon_prefix = "spearplasma" + qdel(tip) var/obj/item/twohanded/spear/S = locate() in parts_list if(S) if(S.explosive) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 48681c3d6d..c6384e7438 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -69,6 +69,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 max_integrity = 200 armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50) resistance_flags = FIRE_PROOF + total_mass = TOTAL_MASS_MEDIEVAL_WEAPON /obj/item/claymore/Initialize() . = ..() @@ -223,11 +224,12 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 max_integrity = 200 armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50) resistance_flags = FIRE_PROOF + total_mass = TOTAL_MASS_MEDIEVAL_WEAPON /obj/item/katana/cursed slot_flags = null -/obj/item/katana/Initialize() +/obj/item/katana/cursed/Initialize() . = ..() ADD_TRAIT(src, TRAIT_NODROP, CURSED_ITEM_TRAIT) @@ -253,7 +255,9 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 var/obj/item/twohanded/spear/S = new /obj/item/twohanded/spear remove_item_from_storage(user) - qdel(I) + if (!user.transferItemToLoc(I, S)) + return + S.CheckParts(list(I)) qdel(src) user.put_in_hands(S) @@ -431,6 +435,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 sharpness = IS_SHARP attack_verb = list("sawed", "torn", "cut", "chopped", "diced") hitsound = 'sound/weapons/chainsawhit.ogg' + total_mass = TOTAL_MASS_HAND_REPLACEMENT /obj/item/mounted_chainsaw/Initialize() . = ..() @@ -510,6 +515,19 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 var/homerun_able = 0 total_mass = 2.7 //a regular wooden major league baseball bat weighs somewhere between 2 to 3.4 pounds, according to google +/obj/item/melee/baseball_bat/chaplain + name = "blessed baseball bat" + desc = "There ain't a cult in the league that can withstand a swatter." + force = 14 + throwforce = 14 + obj_flags = UNIQUE_RENAME + var/chaplain_spawnable = TRUE + total_mass = TOTAL_MASS_MEDIEVAL_WEAPON + +/obj/item/melee/baseball_bat/chaplain/Initialize() + . = ..() + AddComponent(/datum/component/anti_magic, TRUE, TRUE) + /obj/item/melee/baseball_bat/homerun name = "home run bat" desc = "This thing looks dangerous... Dangerously good at baseball, that is." diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm index 1ab28a33de..2093ae5660 100644 --- a/code/game/objects/structures/barsigns.dm +++ b/code/game/objects/structures/barsigns.dm @@ -112,12 +112,16 @@ /obj/structure/sign/barsign/emag_act(mob/user) + . = ..() if(broken || (obj_flags & EMAGGED)) to_chat(user, "Nothing interesting happens!") return obj_flags |= EMAGGED to_chat(user, "You emag the barsign. Takeover in progress...") - sleep(10 SECONDS) + addtimer(CALLBACK(src, .proc/syndie_bar_good), 10 SECONDS) + return TRUE + +/obj/structure/sign/barsign/proc/syndie_bar_good() set_sign(new /datum/barsign/hiddensigns/syndibarsign) req_access = list(ACCESS_SYNDICATE) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index eedb49f2c3..edcb4a6181 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -36,6 +36,9 @@ var/icon_welded = "welded" var/obj/item/electronics/airlock/lockerelectronics //Installed electronics var/lock_in_use = FALSE //Someone is doing some stuff with the lock here, better not proceed further + var/eigen_teleport = FALSE //If the closet leads to Mr Tumnus. + var/obj/structure/closet/eigen_target //Where you go to. + /obj/structure/closet/Initialize(mapload) . = ..() @@ -144,6 +147,8 @@ /obj/structure/closet/proc/togglelock(mob/living/user) add_fingerprint(user) + if(eigen_target) + return if(opened) return if(!can_lock(user)) @@ -186,7 +191,12 @@ if(contents.len >= storage_capacity) return -1 if(insertion_allowed(AM)) - AM.forceMove(src) + if(eigen_teleport) // For teleporting people with linked lockers. + do_teleport(AM, get_turf(eigen_target), 0) + if(eigen_target.opened == FALSE) + eigen_target.bust_open() + else + AM.forceMove(src) return TRUE else return FALSE @@ -339,6 +349,9 @@ to_chat(user, "You begin cutting \the [src] apart...") if(W.use_tool(src, user, 40, volume=50)) + if(eigen_teleport) + to_chat(user, "The unstable nature of \the [src] makes it impossible to cut!") + return if(!opened) return user.visible_message("[user] slices apart \the [src].", @@ -363,6 +376,9 @@ to_chat(user, "You begin [welded ? "unwelding":"welding"] \the [src]...") if(W.use_tool(src, user, 40, volume=50)) + if(eigen_teleport) + to_chat(user, "The unstable nature of \the [src] makes it impossible to weld!") + return if(opened) return welded = !welded @@ -525,17 +541,18 @@ dive_into(user) /obj/structure/closet/emag_act(mob/user) - if(secure && !broken) - user.visible_message("Sparks fly from [src]!", - "You scramble [src]'s lock, breaking it open!", - "You hear a faint electrical spark.") - playsound(src, "sparks", 50, 1) - broken = TRUE - locked = FALSE - if(!QDELETED(lockerelectronics)) - qdel(lockerelectronics) - lockerelectronics = null - update_icon() + . = ..() + if(!secure || broken) + return + user.visible_message("Sparks fly from [src]!", + "You scramble [src]'s lock, breaking it open!", + "You hear a faint electrical spark.") + playsound(src, "sparks", 50, 1) + broken = TRUE + locked = FALSE + if(!QDELETED(lockerelectronics)) + QDEL_NULL(lockerelectronics) + update_icon() /obj/structure/closet/get_remote_view_fullscreens(mob/user) if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS))) diff --git a/code/game/objects/structures/crates_lockers/closets/job_closets.dm b/code/game/objects/structures/crates_lockers/closets/job_closets.dm index d2ab9ea6fb..b49d0a77d5 100644 --- a/code/game/objects/structures/crates_lockers/closets/job_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/job_closets.dm @@ -111,9 +111,9 @@ new /obj/item/clothing/accessory/pocketprotector/cosmetology(src) new /obj/item/clothing/under/rank/chaplain(src) new /obj/item/clothing/shoes/sneakers/black(src) - new /obj/item/clothing/suit/nun(src) + new /obj/item/clothing/suit/chaplain/nun(src) new /obj/item/clothing/head/nun_hood(src) - new /obj/item/clothing/suit/holidaypriest(src) + new /obj/item/clothing/suit/chaplain/holidaypriest(src) new /obj/item/storage/backpack/cultpack(src) new /obj/item/storage/fancy/candle_box(src) new /obj/item/storage/fancy/candle_box(src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm index 167823b9be..a7adafdad4 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm @@ -33,6 +33,7 @@ new /obj/item/extinguisher/advanced(src) new /obj/item/storage/photo_album/CE(src) new /obj/item/storage/lockbox/medal/engineering(src) + new /obj/item/construction/rcd/loaded/upgraded(src) /obj/structure/closet/secure_closet/engineering_electrical name = "electrical supplies locker" diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm index 8dc560b936..05e62c196f 100644 --- a/code/game/objects/structures/dresser.dm +++ b/code/game/objects/structures/dresser.dm @@ -79,4 +79,4 @@ var/n_color = input(H, "Choose your [garment_type]'\s color.", "Character Preference", default_color) as color|null if(!n_color || !H.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return default_color - return sanitize_hexcolor(n_color, include_crunch= TRUE) + return sanitize_hexcolor(n_color, 3, FALSE, default_color) diff --git a/code/game/objects/structures/femur_breaker.dm b/code/game/objects/structures/femur_breaker.dm index 077eb25688..e3002a8fae 100644 --- a/code/game/objects/structures/femur_breaker.dm +++ b/code/game/objects/structures/femur_breaker.dm @@ -83,8 +83,9 @@ icon_state = "breaker_drop" /obj/structure/femur_breaker/proc/damage_leg(mob/living/carbon/human/H) - H.say("AAAAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHH!!", forced = "femur broken") + H.emote("scream") H.apply_damage(150, BRUTE, pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)) + H.adjustBruteLoss(rand(5,20) + (max(0, H.health))) //Make absolutely sure they end up in crit, so that they can succumb if they wish. /obj/structure/femur_breaker/proc/raise_slat() slat_status = BREAKER_SLAT_RAISED @@ -171,4 +172,4 @@ #undef BREAKER_ACTIVATE_DELAY #undef BREAKER_WRENCH_DELAY #undef BREAKER_ACTION_INUSE -#undef BREAKER_ACTION_WRENCH \ No newline at end of file +#undef BREAKER_ACTION_WRENCH diff --git a/code/game/objects/structures/loom.dm b/code/game/objects/structures/loom.dm new file mode 100644 index 0000000000..c4e1968e59 --- /dev/null +++ b/code/game/objects/structures/loom.dm @@ -0,0 +1,21 @@ +//Loom, turns raw cotton and durathread into their respective fabrics. + +/obj/structure/loom + name = "loom" + desc = "A simple device used to weave cloth and other thread-based fabrics together into usable material." + icon = 'icons/obj/hydroponics/equipment.dmi' + icon_state = "loom" + density = TRUE + anchored = TRUE + +/obj/structure/loom/attackby(obj/item/stack/sheet/W, mob/user) + if(W.is_fabric && W.amount > 1) + user.show_message("You start weaving the [W.name] through the loom..", 1) + if(W.use_tool(src, user, W.pull_effort)) + new W.loom_result(drop_location()) + user.show_message("You weave the [W.name] into a workable fabric.", 1) + W.amount = (W.amount - 2) + if(W.amount < 1) + qdel(W) + else + user.show_message("You need a valid fabric and at least 2 of said fabric before using this.", 1) \ No newline at end of file diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm index e979d4f18e..226d279288 100644 --- a/code/game/objects/structures/table_frames.dm +++ b/code/game/objects/structures/table_frames.dm @@ -100,6 +100,14 @@ to_chat(user, "You start adding [B] to [src]...") if(do_after(user, 20, target = src) && B.use(1)) make_new_table(/obj/structure/table/bronze) + else if(istype(I, /obj/item/stack/sheet/plasmaglass)) + var/obj/item/stack/sheet/plasmaglass/G = I + if(G.get_amount() < 1) + to_chat(user, "You need one plasmaglass sheet to do this!") + return + to_chat(user, "You start adding [G] to [src]...") + if(do_after(user, 20, target = src) && G.use(1)) + make_new_table(/obj/structure/table/plasmaglass) else return ..() diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 8c29c1b2c5..fcffafb262 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -258,6 +258,53 @@ for(var/obj/item/shard/S in debris) S.color = NARSIE_WINDOW_COLOUR +/* + * Plasmaglass tables + */ +/obj/structure/table/plasmaglass + name = "plasmaglass table" + desc = "A glasstable, but it's pink and more sturdy. What will Nanotrasen design next with plasma?" + icon = 'icons/obj/smooth_structures/plasmaglass_table.dmi' + icon_state = "plasmaglass_table" + climbable = TRUE + buildstack = /obj/item/stack/sheet/plasmaglass + canSmoothWith = null + max_integrity = 270 + resistance_flags = ACID_PROOF + armor = list("melee" = 10, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100) + var/list/debris = list() + +/obj/structure/table/plasmaglass/New() + . = ..() + debris += new frame + debris += new /obj/item/shard/plasma + +/obj/structure/table/plasmaglass/Destroy() + QDEL_LIST(debris) + . = ..() + +/obj/structure/table/plasmaglass/proc/check_break(mob/living/M) + return + +/obj/structure/table/plasmaglass/deconstruct(disassembled = TRUE, wrench_disassembly = 0) + if(!(flags_1 & NODECONSTRUCT_1)) + if(disassembled) + ..() + return + else + var/turf/T = get_turf(src) + playsound(T, "shatter", 50, 1) + for(var/X in debris) + var/atom/movable/AM = X + AM.forceMove(T) + debris -= AM + qdel(src) + +/obj/structure/table/plasmaglass/narsie_act() + color = NARSIE_WINDOW_COLOUR + for(var/obj/item/shard/S in debris) + S.color = NARSIE_WINDOW_COLOUR + /* * Wooden tables */ diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index a26d57e3e1..9fc055c2ba 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -281,6 +281,8 @@ . += new /obj/effect/decal/cleanable/glass(location) if (reinf) . += new /obj/item/stack/rods(location, (fulltile ? 2 : 1)) + if (fulltile) + . += new /obj/item/shard(location) /obj/structure/window/proc/can_be_rotated(mob/user,rotation_type) if(anchored) @@ -409,6 +411,15 @@ glass_type = /obj/item/stack/sheet/plasmaglass rad_insulation = RAD_NO_INSULATION +/obj/structure/window/plasma/spawnDebris(location) + . = list() + . += new /obj/item/shard/plasma(location) + . += new /obj/effect/decal/cleanable/glass/plasma(location) + if (reinf) + . += new /obj/item/stack/rods(location, (fulltile ? 2 : 1)) + if (fulltile) + . += new /obj/item/shard/plasma(location) + /obj/structure/window/plasma/spawner/east dir = EAST diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index b00efc7ed6..194014b61a 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -236,6 +236,10 @@ return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 33) if(RCD_WINDOWGRILLE) return list("mode" = RCD_WINDOWGRILLE, "delay" = 10, "cost" = 4) + if(RCD_MACHINE) + return list("mode" = RCD_MACHINE, "delay" = 20, "cost" = 25) + if(RCD_COMPUTER) + return list("mode" = RCD_COMPUTER, "delay" = 20, "cost" = 25) return FALSE /turf/open/floor/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode) @@ -274,4 +278,20 @@ var/obj/structure/grille/G = new(src) G.anchored = TRUE return TRUE + if(RCD_MACHINE) + if(locate(/obj/structure/frame/machine) in src) + return FALSE + var/obj/structure/frame/machine/M = new(src) + M.state = 2 + M.icon_state = "box_1" + M.anchored = TRUE + return TRUE + if(RCD_COMPUTER) + if(locate(/obj/structure/frame/computer) in src) + return FALSE + var/obj/structure/frame/computer/C = new(src) + C.anchored = TRUE + C.setDir(the_rcd.computer_dir) + return TRUE + return FALSE diff --git a/code/game/turfs/simulated/wall/misc_walls.dm b/code/game/turfs/simulated/wall/misc_walls.dm index dfc6972578..8b63d60939 100644 --- a/code/game/turfs/simulated/wall/misc_walls.dm +++ b/code/game/turfs/simulated/wall/misc_walls.dm @@ -7,6 +7,7 @@ smooth = SMOOTH_MORE sheet_type = /obj/item/stack/sheet/runed_metal sheet_amount = 1 + explosion_block = 10 girder_type = /obj/structure/girder/cult /turf/closed/wall/mineral/cult/Initialize() @@ -49,7 +50,7 @@ /turf/closed/wall/clockwork name = "clockwork wall" desc = "A huge chunk of warm metal. The clanging of machinery emanates from within." - explosion_block = 2 + explosion_block = 5 hardness = 10 slicing_duration = 80 sheet_type = /obj/item/stack/tile/brass diff --git a/code/game/world.dm b/code/game/world.dm index dedf822597..e9c8433006 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -137,7 +137,7 @@ GLOBAL_VAR(restart_counter) // but those are both private, so let's put the commit info in the runtime // log which is ultimately public. log_runtime(GLOB.revdata.get_log_message()) - + /world/Topic(T, addr, master, key) TGS_TOPIC //redirect to server tools if necessary @@ -270,7 +270,8 @@ GLOBAL_VAR(restart_counter) if (M.client) n++ - features += "[SSmapping.config.map_name]" //CIT CHANGE - makes the hub entry display the current map + if(SSmapping.config) // this just stops the runtime, honk. + features += "[SSmapping.config.map_name]" //CIT CHANGE - makes the hub entry display the current map if(get_security_level())//CIT CHANGE - makes the hub entry show the security level features += "[get_security_level()] alert" diff --git a/code/modules/VR/vr_sleeper.dm b/code/modules/VR/vr_sleeper.dm index bfbf6b5b79..89e9c33ecc 100644 --- a/code/modules/VR/vr_sleeper.dm +++ b/code/modules/VR/vr_sleeper.dm @@ -54,12 +54,16 @@ only_current_user_can_interact = TRUE /obj/machinery/vr_sleeper/hugbox/emag_act(mob/user) - return + return SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) /obj/machinery/vr_sleeper/emag_act(mob/user) + . = ..() + if(you_die_in_the_game_you_die_for_real) + return you_die_in_the_game_you_die_for_real = TRUE sparks.start() addtimer(CALLBACK(src, .proc/emagNotify), 150) + return TRUE /obj/machinery/vr_sleeper/update_icon() icon_state = "[initial(icon_state)][state_open ? "-open" : ""]" diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index b400f44b98..555c35980d 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -423,6 +423,25 @@ if(GLOB.master_mode == "secret") dat += "(Force Secret Mode)
" + if(GLOB.master_mode == "dynamic") + if(SSticker.current_state <= GAME_STATE_PREGAME) + dat += "(Force Roundstart Rulesets)
" + if (GLOB.dynamic_forced_roundstart_ruleset.len > 0) + for(var/datum/dynamic_ruleset/roundstart/rule in GLOB.dynamic_forced_roundstart_ruleset) + dat += {"-> [rule.name] <-
"} + dat += "(Clear Rulesets)
" + dat += "(Dynamic mode options)
" + else if (SSticker.IsRoundInProgress()) + dat += "(Force Next Latejoin Ruleset)
" + if (SSticker && SSticker.mode && istype(SSticker.mode,/datum/game_mode/dynamic)) + var/datum/game_mode/dynamic/mode = SSticker.mode + if (mode.forced_latejoin_rule) + dat += {"-> [mode.forced_latejoin_rule.name] <-
"} + dat += "(Execute Midround Ruleset!)
" + dat += "
" + if(SSticker.IsRoundInProgress()) + dat += "(Game Mode Panel)
" + dat += {"
Create Object
@@ -839,6 +858,44 @@ browser.set_content(dat.Join()) browser.open() +/datum/admins/proc/dynamic_mode_options(mob/user) + var/dat = {" +

Dynamic Mode Options


+
+

Common options

+ All these options can be changed midround.
+
+ Force extended: - Option is [GLOB.dynamic_forced_extended ? "ON" : "OFF"]. +
This will force the round to be extended. No rulesets will be drafted.
+
+ No stacking: - Option is [GLOB.dynamic_no_stacking ? "ON" : "OFF"]. +
Unless the threat goes above [GLOB.dynamic_stacking_limit], only one "round-ender" ruleset will be drafted.
+
+ Classic secret mode: - Option is [GLOB.dynamic_classic_secret ? "ON" : "OFF"]. +
Only one roundstart ruleset will be drafted. Only traitors and minor roles will latespawn.
+
+
+ Forced threat level: Current value : [GLOB.dynamic_forced_threat_level]. +
The value threat is set to if it is higher than -1.
+
+ High population limit: Current value : [GLOB.dynamic_high_pop_limit]. +
The threshold at which "high population override" will be in effect.
+
+ Stacking threeshold: Current value : [GLOB.dynamic_stacking_limit]. +
The threshold at which "round-ender" rulesets will stack. A value higher than 100 ensure this never happens.
+

Advanced parameters

+ Curve centre: -> [GLOB.dynamic_curve_centre] <-
+ Curve width: -> [GLOB.dynamic_curve_width] <-
+ Latejoin injection delay:
+ Minimum: -> [GLOB.dynamic_latejoin_delay_min / 60 / 10] <- Minutes
+ Maximum: -> [GLOB.dynamic_latejoin_delay_max / 60 / 10] <- Minutes
+ Midround injection delay:
+ Minimum: -> [GLOB.dynamic_midround_delay_min / 60 / 10] <- Minutes
+ Maximum: -> [GLOB.dynamic_midround_delay_max / 60 / 10] <- Minutes
+ "} + + user << browse(dat, "window=dyn_mode_options;size=900x650") + /datum/admins/proc/create_or_modify_area() set category = "Debug" set name = "Create or modify area" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index d881044757..91df9ef85c 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -291,6 +291,11 @@ else if(href_list["editrights"]) edit_rights_topic(href_list) + else if(href_list["gamemode_panel"]) + if(!check_rights(R_ADMIN)) + return + SSticker.mode.admin_panel() + else if(href_list["call_shuttle"]) if(!check_rights(R_ADMIN)) return @@ -1342,6 +1347,291 @@ else if(href_list["f_secret"]) return HandleFSecret() + + else if(href_list["f_dynamic_roundstart"]) + if(!check_rights(R_ADMIN)) + return + if(SSticker && SSticker.mode) + return alert(usr, "The game has already started.", null, null, null, null) + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode.", null, null, null, null) + var/roundstart_rules = list() + for (var/rule in subtypesof(/datum/dynamic_ruleset/roundstart)) + var/datum/dynamic_ruleset/roundstart/newrule = new rule() + roundstart_rules[newrule.name] = newrule + var/added_rule = input(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", null) as null|anything in roundstart_rules + if (added_rule) + GLOB.dynamic_forced_roundstart_ruleset += roundstart_rules[added_rule] + log_admin("[key_name(usr)] set [added_rule] to be a forced roundstart ruleset.") + message_admins("[key_name(usr)] set [added_rule] to be a forced roundstart ruleset.", 1) + Game() + + else if(href_list["f_dynamic_roundstart_clear"]) + if(!check_rights(R_ADMIN)) + return + GLOB.dynamic_forced_roundstart_ruleset = list() + Game() + log_admin("[key_name(usr)] cleared the rigged roundstart rulesets. The mode will pick them as normal.") + message_admins("[key_name(usr)] cleared the rigged roundstart rulesets. The mode will pick them as normal.", 1) + + else if(href_list["f_dynamic_roundstart_remove"]) + if(!check_rights(R_ADMIN)) + return + var/datum/dynamic_ruleset/roundstart/rule = locate(href_list["f_dynamic_roundstart_remove"]) + GLOB.dynamic_forced_roundstart_ruleset -= rule + Game() + log_admin("[key_name(usr)] removed [rule] from the forced roundstart rulesets.") + message_admins("[key_name(usr)] removed [rule] from the forced roundstart rulesets.", 1) + + else if(href_list["f_dynamic_latejoin"]) + if(!check_rights(R_ADMIN)) + return + if(!SSticker || !SSticker.mode) + return alert(usr, "The game must start first.", null, null, null, null) + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + var/latejoin_rules = list() + for (var/rule in subtypesof(/datum/dynamic_ruleset/latejoin)) + var/datum/dynamic_ruleset/latejoin/newrule = new rule() + latejoin_rules[newrule.name] = newrule + var/added_rule = input(usr,"What ruleset do you want to force upon the next latejoiner? This will bypass threat level and population restrictions.", "Rigging Latejoin", null) as null|anything in latejoin_rules + if (added_rule) + var/datum/game_mode/dynamic/mode = SSticker.mode + mode.forced_latejoin_rule = latejoin_rules[added_rule] + log_admin("[key_name(usr)] set [added_rule] to proc on the next latejoin.") + message_admins("[key_name(usr)] set [added_rule] to proc on the next latejoin.", 1) + Game() + + else if(href_list["f_dynamic_latejoin_clear"]) + if(!check_rights(R_ADMIN)) + return + if (SSticker && SSticker.mode && istype(SSticker.mode,/datum/game_mode/dynamic)) + var/datum/game_mode/dynamic/mode = SSticker.mode + mode.forced_latejoin_rule = null + Game() + log_admin("[key_name(usr)] cleared the forced latejoin ruleset.") + message_admins("[key_name(usr)] cleared the forced latejoin ruleset.", 1) + + else if(href_list["f_dynamic_midround"]) + if(!check_rights(R_ADMIN)) + return + if(!SSticker || !SSticker.mode) + return alert(usr, "The game must start first.", null, null, null, null) + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + var/midround_rules = list() + for (var/rule in subtypesof(/datum/dynamic_ruleset/midround)) + var/datum/dynamic_ruleset/midround/newrule = new rule() + midround_rules[newrule.name] = rule + var/added_rule = input(usr,"What ruleset do you want to force right now? This will bypass threat level and population restrictions.", "Execute Ruleset", null) as null|anything in midround_rules + if (added_rule) + var/datum/game_mode/dynamic/mode = SSticker.mode + log_admin("[key_name(usr)] executed the [added_rule] ruleset.") + message_admins("[key_name(usr)] executed the [added_rule] ruleset.", 1) + mode.picking_specific_rule(midround_rules[added_rule],1) + + else if (href_list["f_dynamic_options"]) + if(!check_rights(R_ADMIN)) + return + + if(SSticker && SSticker.mode) + return alert(usr, "The game has already started.", null, null, null, null) + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + + dynamic_mode_options(usr) + + else if(href_list["f_dynamic_roundstart_centre"]) + if(!check_rights(R_ADMIN)) + return + if(SSticker && SSticker.mode) + return alert(usr, "The game has already started.", null, null, null, null) + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + + var/new_centre = input(usr,"Change the centre of the dynamic mode threat curve. A negative value will give a more peaceful round ; a positive value, a round with higher threat. Any number between -5 and +5 is allowed.", "Change curve centre", null) as num + if (new_centre < -5 || new_centre > 5) + return alert(usr, "Only values between -5 and +5 are allowed.", null, null, null, null) + + log_admin("[key_name(usr)] changed the distribution curve center to [new_centre].") + message_admins("[key_name(usr)] changed the distribution curve center to [new_centre]", 1) + GLOB.dynamic_curve_centre = new_centre + dynamic_mode_options(usr) + + else if(href_list["f_dynamic_roundstart_width"]) + if(!check_rights(R_ADMIN)) + return + if(SSticker && SSticker.mode) + return alert(usr, "The game has already started.", null, null, null, null) + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + + var/new_width = input(usr,"Change the width of the dynamic mode threat curve. A higher value will favour extreme rounds ; a lower value, a round closer to the average. Any Number between 0.5 and 4 are allowed.", "Change curve width", null) as num + if (new_width < 0.5 || new_width > 4) + return alert(usr, "Only values between 0.5 and +2.5 are allowed.", null, null, null, null) + + log_admin("[key_name(usr)] changed the distribution curve width to [new_width].") + message_admins("[key_name(usr)] changed the distribution curve width to [new_width]", 1) + GLOB.dynamic_curve_width = new_width + dynamic_mode_options(usr) + + else if(href_list["f_dynamic_roundstart_latejoin_min"]) + if(!check_rights(R_ADMIN)) + return + if(SSticker && SSticker.mode) + return alert(usr, "The game has already started.", null, null, null, null) + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + var/new_min = input(usr,"Change the minimum delay of latejoin injection in minutes.", "Change latejoin injection delay minimum", null) as num + if(new_min <= 0) + return alert(usr, "The minimum can't be zero or lower.", null, null, null, null) + if((new_min MINUTES) > GLOB.dynamic_latejoin_delay_max) + return alert(usr, "The minimum must be lower than the maximum.", null, null, null, null) + + log_admin("[key_name(usr)] changed the latejoin injection minimum delay to [new_min] minutes.") + message_admins("[key_name(usr)] changed the latejoin injection minimum delay to [new_min] minutes", 1) + GLOB.dynamic_latejoin_delay_min = (new_min MINUTES) + dynamic_mode_options(usr) + + else if(href_list["f_dynamic_roundstart_latejoin_max"]) + if(!check_rights(R_ADMIN)) + return + if(SSticker && SSticker.mode) + return alert(usr, "The game has already started.", null, null, null, null) + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + var/new_max = input(usr,"Change the maximum delay of latejoin injection in minutes.", "Change latejoin injection delay maximum", null) as num + if(new_max <= 0) + return alert(usr, "The maximum can't be zero or lower.", null, null, null, null) + if((new_max MINUTES) < GLOB.dynamic_latejoin_delay_min) + return alert(usr, "The maximum must be higher than the minimum.", null, null, null, null) + + log_admin("[key_name(usr)] changed the latejoin injection maximum delay to [new_max] minutes.") + message_admins("[key_name(usr)] changed the latejoin injection maximum delay to [new_max] minutes", 1) + GLOB.dynamic_latejoin_delay_max = (new_max MINUTES) + dynamic_mode_options(usr) + + else if(href_list["f_dynamic_roundstart_midround_min"]) + if(!check_rights(R_ADMIN)) + return + if(SSticker && SSticker.mode) + return alert(usr, "The game has already started.", null, null, null, null) + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + var/new_min = input(usr,"Change the minimum delay of midround injection in minutes.", "Change midround injection delay minimum", null) as num + if(new_min <= 0) + return alert(usr, "The minimum can't be zero or lower.", null, null, null, null) + if((new_min MINUTES) > GLOB.dynamic_midround_delay_max) + return alert(usr, "The minimum must be lower than the maximum.", null, null, null, null) + + log_admin("[key_name(usr)] changed the midround injection minimum delay to [new_min] minutes.") + message_admins("[key_name(usr)] changed the midround injection minimum delay to [new_min] minutes", 1) + GLOB.dynamic_midround_delay_min = (new_min MINUTES) + dynamic_mode_options(usr) + + else if(href_list["f_dynamic_roundstart_midround_max"]) + if(!check_rights(R_ADMIN)) + return + if(SSticker && SSticker.mode) + return alert(usr, "The game has already started.", null, null, null, null) + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + var/new_max = input(usr,"Change the maximum delay of midround injection in minutes.", "Change midround injection delay maximum", null) as num + if(new_max <= 0) + return alert(usr, "The maximum can't be zero or lower.", null, null, null, null) + if((new_max MINUTES) > GLOB.dynamic_midround_delay_max) + return alert(usr, "The maximum must be higher than the minimum.", null, null, null, null) + + log_admin("[key_name(usr)] changed the midround injection maximum delay to [new_max] minutes.") + message_admins("[key_name(usr)] changed the midround injection maximum delay to [new_max] minutes", 1) + GLOB.dynamic_midround_delay_max = (new_max MINUTES) + dynamic_mode_options(usr) + + else if(href_list["f_dynamic_force_extended"]) + if(!check_rights(R_ADMIN)) + return + + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + + GLOB.dynamic_forced_extended = !GLOB.dynamic_forced_extended + log_admin("[key_name(usr)] set 'forced_extended' to [GLOB.dynamic_forced_extended].") + message_admins("[key_name(usr)] set 'forced_extended' to [GLOB.dynamic_forced_extended].") + dynamic_mode_options(usr) + + else if(href_list["f_dynamic_no_stacking"]) + if(!check_rights(R_ADMIN)) + return + + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + + GLOB.dynamic_no_stacking = !GLOB.dynamic_no_stacking + log_admin("[key_name(usr)] set 'no_stacking' to [GLOB.dynamic_no_stacking].") + message_admins("[key_name(usr)] set 'no_stacking' to [GLOB.dynamic_no_stacking].") + dynamic_mode_options(usr) + + else if(href_list["f_dynamic_classic_secret"]) + if(!check_rights(R_ADMIN)) + return + + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + + GLOB.dynamic_classic_secret = !GLOB.dynamic_classic_secret + log_admin("[key_name(usr)] set 'classic_secret' to [GLOB.dynamic_classic_secret].") + message_admins("[key_name(usr)] set 'classic_secret' to [GLOB.dynamic_classic_secret].") + dynamic_mode_options(usr) + + else if(href_list["f_dynamic_stacking_limit"]) + if(!check_rights(R_ADMIN)) + return + + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + + GLOB.dynamic_stacking_limit = input(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) as num + log_admin("[key_name(usr)] set 'stacking_limit' to [GLOB.dynamic_stacking_limit].") + message_admins("[key_name(usr)] set 'stacking_limit' to [GLOB.dynamic_stacking_limit].") + dynamic_mode_options(usr) + + else if(href_list["f_dynamic_high_pop_limit"]) + if(!check_rights(R_ADMIN)) + return + + if(SSticker && SSticker.mode) + return alert(usr, "The game has already started.", null, null, null, null) + + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + + var/new_value = input(usr, "Enter the high-pop override threshold for dynamic mode.", "High pop override") as num + if (new_value < 0) + return alert(usr, "Only positive values allowed!", null, null, null, null) + GLOB.dynamic_high_pop_limit = new_value + + log_admin("[key_name(usr)] set 'high_pop_limit' to [GLOB.dynamic_high_pop_limit].") + message_admins("[key_name(usr)] set 'high_pop_limit' to [GLOB.dynamic_high_pop_limit].") + dynamic_mode_options(usr) + + else if(href_list["f_dynamic_forced_threat"]) + if(!check_rights(R_ADMIN)) + return + + if(SSticker && SSticker.mode) + return alert(usr, "The game has already started.", null, null, null, null) + + if(GLOB.master_mode != "dynamic") + return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null) + + var/new_value = input(usr, "Enter the forced threat level for dynamic mode.", "Forced threat level") as num + if (new_value > 100) + return alert(usr, "The value must be be under 100.", null, null, null, null) + GLOB.dynamic_forced_threat_level = new_value + + log_admin("[key_name(usr)] set 'forced_threat_level' to [GLOB.dynamic_forced_threat_level].") + message_admins("[key_name(usr)] set 'forced_threat_level' to [GLOB.dynamic_forced_threat_level].") + dynamic_mode_options(usr) else if(href_list["c_mode2"]) if(!check_rights(R_ADMIN|R_SERVER)) diff --git a/code/modules/antagonists/abductor/abductor.dm b/code/modules/antagonists/abductor/abductor.dm index 8e29b38fe1..0fca957ffe 100644 --- a/code/modules/antagonists/abductor/abductor.dm +++ b/code/modules/antagonists/abductor/abductor.dm @@ -56,6 +56,7 @@ /datum/antagonist/abductor/greet() to_chat(owner.current, "You are the [owner.special_role]!") to_chat(owner.current, "With the help of your teammate, kidnap and experiment on station crew members!") + to_chat(owner.current, "Try not to disturb the habitat, it could lead to dead specimens.") to_chat(owner.current, "[greet_text]") owner.announce_objectives() diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 99d8ae797b..c428c56d45 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -161,11 +161,13 @@ throwforce = 0 //Just to be on the safe side throw_range = 0 throw_speed = 0 + armour_penetration = 20 hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") sharpness = IS_SHARP var/can_drop = FALSE var/fake = FALSE + total_mass = TOTAL_MASS_HAND_REPLACEMENT /obj/item/melee/arm_blade/Initialize(mapload,silent,synthetic) . = ..() diff --git a/code/modules/antagonists/changeling/powers/strained_muscles.dm b/code/modules/antagonists/changeling/powers/strained_muscles.dm index baeed8b0b2..bdbd38b92d 100644 --- a/code/modules/antagonists/changeling/powers/strained_muscles.dm +++ b/code/modules/antagonists/changeling/powers/strained_muscles.dm @@ -5,7 +5,7 @@ name = "Strained Muscles" desc = "We evolve the ability to reduce the acid buildup in our muscles, allowing us to move much faster." helptext = "The strain will make us tired, and we will rapidly become fatigued. Standard weight restrictions, like hardsuits, still apply. Cannot be used in lesser form." - chemical_cost = 0 + chemical_cost = 15 dna_cost = 1 req_human = 1 var/stacks = 0 //Increments every 5 seconds; damage increases over time @@ -15,13 +15,16 @@ action_background_icon_state = "bg_ling" /obj/effect/proc_holder/changeling/strained_muscles/sting_action(mob/living/carbon/user) + var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling) active = !active if(active) to_chat(user, "Our muscles tense and strengthen.") + changeling.chem_recharge_slowdown += 0.5 else REMOVE_TRAIT(user, TRAIT_GOTTAGOFAST, "changeling_muscles") to_chat(user, "Our muscles relax.") - if(stacks >= 10) + changeling.chem_recharge_slowdown -= 0.5 + if(stacks >= 20) to_chat(user, "We collapse in exhaustion.") user.Knockdown(60) user.emote("gasp") @@ -42,9 +45,9 @@ stacks++ //user.take_bodypart_damage(stacks * 0.03, 0) - user.staminaloss += stacks * 1.3 //At first the changeling may regenerate stamina fast enough to nullify fatigue, but it will stack + user.adjustStaminaLoss(stacks*1.3) //At first the changeling may regenerate stamina fast enough to nullify fatigue, but it will stack - if(stacks == 11) //Warning message that the stacks are getting too high + if(stacks == 10) //Warning message that the stacks are getting too high to_chat(user, "Our legs are really starting to hurt...") sleep(40) diff --git a/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm b/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm index 510c279f3c..6d6b1fa9d0 100644 --- a/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm +++ b/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm @@ -224,7 +224,7 @@ . = ..() /datum/clockwork_scripture/abscond/scripture_effects() - var/mob/living/pulled_mob = invoker.pulling && isliving(invoker.pulling) && get_clockwork_power(ABSCOND_ABDUCTION_COST) + var/mob/living/pulled_mob = (invoker.pulling && isliving(invoker.pulling) && get_clockwork_power(ABSCOND_ABDUCTION_COST)) ? invoker.pulling : null var/turf/T if(GLOB.ark_of_the_clockwork_justiciar) T = get_step(GLOB.ark_of_the_clockwork_justiciar, SOUTH) diff --git a/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm b/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm index 4cf7c1ba60..f735d6bb29 100644 --- a/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm +++ b/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm @@ -131,12 +131,10 @@ if(!M || !M.current) continue if(isliving(M.current) && M.current.stat != DEAD) - var/turf/t_turf - if(isAI(M.current)) - t_turf = isAI(M.current) ? get_step(get_step(src, NORTH),NORTH) : get_turf(src) // AI too fat, must make sure it always ends up a 2 tiles north instead of on the ark. - do_teleport(M, t_turf, channel = TELEPORT_CHANNEL_CULT, forced = TRUE) - M.current.overlay_fullscreen("flash", /obj/screen/fullscreen/flash) - M.current.clear_fullscreen("flash", 5) + var/turf/t_turf = isAI(M.current) ? get_step(get_step(src, NORTH),NORTH) : get_turf(src) // AI too fat, must make sure it always ends up a 2 tiles north instead of on the ark. + do_teleport(M.current, t_turf, channel = TELEPORT_CHANNEL_CULT, forced = TRUE) + M.current.overlay_fullscreen("flash", /obj/screen/fullscreen/flash) + M.current.clear_fullscreen("flash", 5) playsound(src, 'sound/magic/clockwork/invoke_general.ogg', 50, FALSE) recalls_remaining-- recalling = FALSE diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index f58ffc56d2..1dbae4ca98 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -655,15 +655,15 @@ if(H.stat == DEAD) to_chat(user,"Only a revive rune can bring back the dead!") return - if(H.blood_volume < BLOOD_VOLUME_SAFE) - var/restore_blood = BLOOD_VOLUME_SAFE - H.blood_volume + if(H.blood_volume < (BLOOD_VOLUME_SAFE*H.blood_ratio)) + var/restore_blood = (BLOOD_VOLUME_SAFE*H.blood_ratio) - H.blood_volume if(uses*2 < restore_blood) H.blood_volume += uses*2 to_chat(user,"You use the last of your blood rites to restore what blood you could!") uses = 0 return ..() else - H.blood_volume = BLOOD_VOLUME_SAFE + H.blood_volume = (BLOOD_VOLUME_SAFE*H.blood_ratio) uses -= round(restore_blood/2) to_chat(user,"Your blood rites have restored [H == user ? "your" : "[H.p_their()]"] blood to safe levels!") var/overall_damage = H.getBruteLoss() + H.getFireLoss() + H.getToxLoss() + H.getOxyLoss() @@ -698,7 +698,7 @@ if(H.cultslurring) to_chat(user,"[H.p_their(TRUE)] blood has been tainted by an even stronger form of blood magic, it's no use to us like this!") return - if(H.blood_volume > BLOOD_VOLUME_SAFE) + if(H.blood_volume > (BLOOD_VOLUME_SAFE*H.blood_ratio)) H.blood_volume -= 100 uses += 50 user.Beam(H,icon_state="drainbeam",time=10) @@ -799,4 +799,4 @@ to_chat(user, "Your hands glow with POWER OVERWHELMING!!!") else to_chat(user, "You need a free hand for this rite!") - qdel(rite) \ No newline at end of file + qdel(rite) diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm index dc2c29eb6d..25e3663c0b 100644 --- a/code/modules/antagonists/cult/cult_items.dm +++ b/code/modules/antagonists/cult/cult_items.dm @@ -105,7 +105,6 @@ inhand_x_dimension = 64 inhand_y_dimension = 64 actions_types = list() - item_flags = SLOWS_WHILE_IN_HAND var/datum/action/innate/dash/cult/jaunt var/datum/action/innate/cult/spin2win/linked_action var/spinning = FALSE diff --git a/code/modules/antagonists/cult/cult_structures.dm b/code/modules/antagonists/cult/cult_structures.dm index 64d57c2f94..499d7a861e 100644 --- a/code/modules/antagonists/cult/cult_structures.dm +++ b/code/modules/antagonists/cult/cult_structures.dm @@ -188,7 +188,7 @@ var/mob/living/simple_animal/M = L if(M.health < M.maxHealth) M.adjustHealth(-3) - if(ishuman(L) && L.blood_volume < BLOOD_VOLUME_NORMAL) + if(ishuman(L) && L.blood_volume < (BLOOD_VOLUME_NORMAL * L.blood_ratio)) L.blood_volume += 1.0 CHECK_TICK if(last_corrupt <= world.time) diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index bbab86729b..29b4e4539c 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -61,8 +61,8 @@ Runes can either be invoked by one's self or with many different cultists. Each if(do_after(user, 15, target = src)) to_chat(user, "You carefully erase the [lowertext(cultist_name)] rune.") qdel(src) - else if(istype(I, /obj/item/nullrod)) - user.say("BEGONE FOUL MAGIKS!!", forced = "nullrod") + else if(istype(I, /obj/item/storage/book/bible) || istype(I, /obj/item/nullrod)) + user.say("BEGONE FOUL MAGICKS!!", forced = "bible") to_chat(user, "You disrupt the magic of [src] with [I].") qdel(src) @@ -286,14 +286,14 @@ structure_check() searches for nearby cultist structures required for the invoca /obj/effect/rune/convert/proc/optinalert(mob/living/convertee) var/alert = alert(convertee, "Will you embrace the Geometer of Blood or perish in futile resistance?", "Choose your own fate", "Join the Blood Cult", "Suffer a horrible demise") - if(alert == "Join the Blood Cult") + if(src && alert == "Join the Blood Cult") signmeup(convertee) /obj/effect/rune/convert/proc/signmeup(mob/living/convertee) - if(currentconversionman == usr) + if(currentconversionman == convertee) conversionresult = TRUE else - to_chat(usr, "Your fate has already been set in stone.") + to_chat(convertee, "Your fate has already been set in stone.") /obj/effect/rune/convert/proc/do_sacrifice(mob/living/sacrificial, list/invokers, force_a_sac) var/mob/living/first_invoker = invokers[1] @@ -433,12 +433,12 @@ structure_check() searches for nearby cultist structures required for the invoca continue if(!A.anchored) movedsomething = TRUE - if(do_teleport(A, T, forceMove = TRUE, channel = TELEPORT_CHANNEL_CULT)) + if(do_teleport(A, target, forceMove = TRUE, channel = TELEPORT_CHANNEL_CULT)) movesuccess = TRUE if(movedsomething) ..() if(moveuserlater) - if(do_teleport(user, T, channel = TELEPORT_CHANNEL_CULT)) + if(do_teleport(user, target, channel = TELEPORT_CHANNEL_CULT)) movesuccess = TRUE if(movesuccess) visible_message("There is a sharp crack of inrushing air, and everything above the rune disappears!", null, "You hear a sharp crack.") diff --git a/code/modules/antagonists/disease/disease_disease.dm b/code/modules/antagonists/disease/disease_disease.dm index 21d0381982..b4b8ac0956 100644 --- a/code/modules/antagonists/disease/disease_disease.dm +++ b/code/modules/antagonists/disease/disease_disease.dm @@ -51,7 +51,7 @@ if(cures.len) return var/list/not_used = advance_cures.Copy() - cures = list(pick_n_take(not_used), pick_n_take(not_used)) + cures = list(pick(pick_n_take(not_used)), pick(pick_n_take(not_used))) // Get the cure name from the cure_id var/datum/reagent/D1 = GLOB.chemical_reagents_list[cures[1]] diff --git a/code/modules/antagonists/ert/ert.dm b/code/modules/antagonists/ert/ert.dm index 53f8aa2da1..bb24af4f7a 100644 --- a/code/modules/antagonists/ert/ert.dm +++ b/code/modules/antagonists/ert/ert.dm @@ -36,30 +36,42 @@ /datum/antagonist/ert/security // kinda handled by the base template but here for completion -/datum/antagonist/ert/security/red +/datum/antagonist/ert/security/amber outfit = /datum/outfit/ert/security/alert +/datum/antagonist/ert/security/red + outfit = /datum/outfit/ert/security/alert/red + /datum/antagonist/ert/engineer role = "Engineer" outfit = /datum/outfit/ert/engineer -/datum/antagonist/ert/engineer/red +/datum/antagonist/ert/engineer/amber outfit = /datum/outfit/ert/engineer/alert +/datum/antagonist/ert/engineer/red + outfit = /datum/outfit/ert/engineer/alert/red + /datum/antagonist/ert/medic role = "Medical Officer" outfit = /datum/outfit/ert/medic -/datum/antagonist/ert/medic/red +/datum/antagonist/ert/medic/amber outfit = /datum/outfit/ert/medic/alert +/datum/antagonist/ert/medic/red + outfit = /datum/outfit/ert/medic/alert/red + /datum/antagonist/ert/commander role = "Commander" outfit = /datum/outfit/ert/commander -/datum/antagonist/ert/commander/red +/datum/antagonist/ert/commander/amber outfit = /datum/outfit/ert/commander/alert +/datum/antagonist/ert/commander/red + outfit = /datum/outfit/ert/commander/alert/red + /datum/antagonist/ert/deathsquad name = "Deathsquad Trooper" outfit = /datum/outfit/death_commando diff --git a/code/modules/antagonists/greybois/greybois.dm b/code/modules/antagonists/greybois/greybois.dm new file mode 100644 index 0000000000..b5e18045e8 --- /dev/null +++ b/code/modules/antagonists/greybois/greybois.dm @@ -0,0 +1,23 @@ +/datum/antagonist/greybois + name = "Emergency Assistant" + show_name_in_check_antagonists = TRUE + show_in_antagpanel = FALSE + var/mission = "Assist the station." + var/datum/outfit/outfit = /datum/outfit/ert/greybois + +/datum/antagonist/greybois/greygod + outfit = /datum/outfit/ert/greybois/greygod + +/datum/antagonist/greybois/greet() + to_chat(owner, "You are an Emergency Assistant.") + to_chat(owner, "Central Command is sending you to [station_name()] with the task: [mission]") + +/datum/antagonist/greybois/on_gain() + equipERT() + . = ..() + +/datum/antagonist/greybois/proc/equipERT() + var/mob/living/carbon/human/H = owner.current + if(!istype(H)) + return + H.equipOutfit(outfit) diff --git a/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm b/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm index b274283621..edae8a4240 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm @@ -5,6 +5,7 @@ #define CHALLENGE_SHUTTLE_DELAY 15000 // 25 minutes, so the ops have at least 5 minutes before the shuttle is callable. GLOBAL_LIST_EMPTY(jam_on_wardec) +GLOBAL_VAR_INIT(war_declared, FALSE) /obj/item/nuclear_challenge name = "Declaration of War (Challenge Mode)" @@ -61,11 +62,13 @@ GLOBAL_LIST_EMPTY(jam_on_wardec) for(var/obj/machinery/computer/camera_advanced/shuttle_docker/D in GLOB.jam_on_wardec) D.jammed = TRUE - + + GLOB.war_declared = TRUE var/list/nukeops = get_antag_minds(/datum/antagonist/nukeop) var/actual_players = GLOB.joined_player_list.len - nukeops.len new uplink_type(get_turf(user), user.key, CHALLENGE_TELECRYSTALS + CEILING(PLAYER_SCALING * actual_players, 1)) + CONFIG_SET(number/shuttle_refuel_delay, max(CONFIG_GET(number/shuttle_refuel_delay), CHALLENGE_SHUTTLE_DELAY)) SSblackbox.record_feedback("amount", "nuclear_challenge_mode", 1) diff --git a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm index ade5458765..add3c1d9b0 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm @@ -373,6 +373,11 @@ S.switch_mode_to(TRACK_INFILTRATOR) countdown.start() set_security_level("delta") + + if(GLOB.war_declared) + var/area/A = get_area(src) + priority_announce("Alert: Unexpected increase in radiation levels near [A.name] ([src.x],[src.y],[src.z]). Please send an authorized radiation specialist to investigate.", "Sensory Nuclear Indexer Telemetry Calculation Helper") + else detonation_timer = null set_security_level(previous_level) diff --git a/code/modules/antagonists/traitor/IAA/internal_affairs.dm b/code/modules/antagonists/traitor/IAA/internal_affairs.dm index 051bf74705..f2e6566e8f 100644 --- a/code/modules/antagonists/traitor/IAA/internal_affairs.dm +++ b/code/modules/antagonists/traitor/IAA/internal_affairs.dm @@ -244,10 +244,12 @@ to_chat(owner.current, "Your target has been framed for [crime], and you have been tasked with eliminating them to prevent them defending themselves in court.") to_chat(owner.current, "Any damage you cause will be a further embarrassment to Nanotrasen, so you have no limits on collateral damage.") to_chat(owner.current, " You have been provided with a standard uplink to accomplish your task. ") + to_chat(owner.current, "By no means reveal that you, or any other NT employees, are undercover agents.") else to_chat(owner.current, "Your target is suspected of [crime], and you have been tasked with eliminating them by any means necessary to avoid a costly and embarrassing public trial.") to_chat(owner.current, "While you have a license to kill, unneeded property damage or loss of employee life will lead to your contract being terminated.") to_chat(owner.current, "For the sake of plausible deniability, you have been equipped with an array of captured Syndicate weaponry available via uplink.") + to_chat(owner.current, "By no means reveal that you, or any other NT employees, are undercover agents.") to_chat(owner.current, "Finally, watch your back. Your target has friends in high places, and intel suggests someone may have taken out a contract of their own to protect them.") owner.announce_objectives() diff --git a/code/modules/antagonists/valentines/valentine.dm b/code/modules/antagonists/valentines/valentine.dm index 31e69b32c2..21e54374a4 100644 --- a/code/modules/antagonists/valentines/valentine.dm +++ b/code/modules/antagonists/valentines/valentine.dm @@ -27,6 +27,7 @@ var/mob/living/L = owner L.remove_status_effect(STATUS_EFFECT_INLOVE) + /datum/antagonist/valentine/greet() to_chat(owner, "You're on a date with [date.name]! Protect [date.p_them()] at all costs. This takes priority over all other loyalties.") @@ -42,4 +43,21 @@ if(objectives_complete) return "[owner.name] protected [owner.p_their()] date" else - return "[owner.name] date failed!" \ No newline at end of file + return "[owner.name] date failed!" + +//Just so it's distinct, basically. +/datum/antagonist/valentine/chem/greet() + to_chat(owner, "You're in love with [date.name]! Protect [date.p_them()] at all costs. This takes priority over all other loyalties.") + +/datum/antagonist/valentine/chem/roundend_report() + var/objectives_complete = TRUE + if(owner.objectives.len) + for(var/datum/objective/objective in owner.objectives) + if(!objective.check_completion()) + objectives_complete = FALSE + break + + if(objectives_complete) + return "[owner.name] protected [owner.p_their()] love: [date.name]! What a cutie!" + else + return "[owner.name] date failed!" diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm index 08e00ea0f4..8642484895 100644 --- a/code/modules/antagonists/wizard/equipment/artefact.dm +++ b/code/modules/antagonists/wizard/equipment/artefact.dm @@ -405,8 +405,12 @@ var/breakout = 0 while(breakout < 50) if(!T) - break + end_effect(user) + return var/turf/potential_T = find_safe_turf() + if(!potential_T) + end_effect(user) + return if(T.z != potential_T.z || abs(get_dist_euclidian(potential_T,T)) > 50 - breakout) do_teleport(user, potential_T, channel = TELEPORT_CHANNEL_MAGIC) user.canmove = 0 diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index b1aa63c242..186eb1b024 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -12,6 +12,7 @@ crit_fail = FALSE //Is the flash burnt out? light_color = LIGHT_COLOR_WHITE light_power = FLASH_LIGHT_POWER + var/flashing_overlay = "flash-f" var/times_used = 0 //Number of times it's been used. var/burnout_resistance = 0 var/last_used = 0 //last world.time it was used. @@ -36,8 +37,8 @@ add_overlay("flashburnt") attached_overlays += "flashburnt" if(flash) - add_overlay("flash-f") - attached_overlays += "flash-f" + add_overlay(flashing_overlay) + attached_overlays += flashing_overlay addtimer(CALLBACK(src, .proc/update_icon), 5) if(holder) holder.update_icon() @@ -313,3 +314,50 @@ /obj/item/assembly/flash/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) activate() return ..() + +//ported from tg - check to make sure it can't appear where it's not supposed to. +/obj/item/assembly/flash/hypnotic + desc = "A modified flash device, programmed to emit a sequence of subliminal flashes that can send a vulnerable target into a hypnotic trance." + flashing_overlay = "flash-hypno" //I cannot find this icon no matter how hard I look in tg, so I might just make my own. + light_color = LIGHT_COLOR_PINK + cooldown = 20 + +/obj/item/assembly/flash/hypnotic/burn_out() + return + +/obj/item/assembly/flash/hypnotic/flash_carbon(mob/living/carbon/M, mob/user, power = 15, targeted = TRUE, generic_message = FALSE) + if(!istype(M)) + return + if(user) + log_combat(user, M, "[targeted? "hypno-flashed(targeted)" : "hypno-flashed(AOE)"]", src) + else //caused by emp/remote signal + M.log_message("was [targeted? "hypno-flashed(targeted)" : "hypno-flashed(AOE)"]",LOG_ATTACK) + if(generic_message && M != user) + to_chat(M, "[src] emits a soothing light...") + if(targeted) + if(M.flash_act(1, 1)) + var/hypnosis = FALSE + if(M.hypnosis_vulnerable()) + hypnosis = TRUE + if(user) + user.visible_message("[user] blinds [M] with the flash!", "You hypno-flash [M]!") + + if(!hypnosis) + to_chat(M, "The light makes you feel oddly relaxed...") + M.confused += min(M.confused + 10, 20) + M.dizziness += min(M.dizziness + 10, 20) + M.drowsyness += min(M.drowsyness + 10, 20) + M.apply_status_effect(STATUS_EFFECT_PACIFY, 100) + else + M.apply_status_effect(/datum/status_effect/trance, 200, TRUE) + + else if(user) + user.visible_message("[user] fails to blind [M] with the flash!", "You fail to hypno-flash [M]!") + else + to_chat(M, "[src] fails to blind you!") + + else if(M.flash_act()) + to_chat(M, "Such a pretty light...") + M.confused += min(M.confused + 4, 20) + M.dizziness += min(M.dizziness + 4, 20) + M.drowsyness += min(M.drowsyness + 4, 20) diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 5ad97fb7c8..8e320b2f3e 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -364,15 +364,10 @@ var/list/cached_gases = air.gases var/temperature = air.temperature var/pressure = air.return_pressure() - var/old_heat_capacity = air.heat_capacity() var/reaction_efficency = min(1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(cached_gases[/datum/gas/plasma]/cached_gases[/datum/gas/nitrous_oxide],1))),cached_gases[/datum/gas/nitrous_oxide],cached_gases[/datum/gas/plasma]/2) var/energy_released = 2*reaction_efficency*FIRE_CARBON_ENERGY_RELEASED - if(cached_gases[/datum/gas/miasma] && cached_gases[/datum/gas/miasma] > 0) - energy_released /= cached_gases[/datum/gas/miasma]*0.1 - if(cached_gases[/datum/gas/bz] && cached_gases[/datum/gas/bz] > 0) - energy_released *= cached_gases[/datum/gas/bz]*0.1 - if ((cached_gases[/datum/gas/nitrous_oxide] - reaction_efficency < 0 )|| (cached_gases[/datum/gas/plasma] - (2*reaction_efficency) < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/nitrous_oxide] - reaction_efficency < 0 )|| (cached_gases[/datum/gas/plasma] - (2*reaction_efficency) < 0) || energy_released <= 0) //Shouldn't produce gas from nothing. return NO_REACTION cached_gases[/datum/gas/bz] += reaction_efficency if(reaction_efficency == cached_gases[/datum/gas/nitrous_oxide]) @@ -381,7 +376,7 @@ cached_gases[/datum/gas/nitrous_oxide] -= reaction_efficency cached_gases[/datum/gas/plasma] -= 2*reaction_efficency - SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, (reaction_efficency**0.5)*BZ_RESEARCH_AMOUNT) + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min((reaction_efficency**2)*BZ_RESEARCH_SCALE),BZ_RESEARCH_MAX_AMOUNT) if(energy_released > 0) var/new_heat_capacity = air.heat_capacity() @@ -477,4 +472,4 @@ //Possibly burning a bit of organic matter through maillard reaction, so a *tiny* bit more heat would be understandable air.temperature += cleaned_air * 0.002 - SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, cleaned_air*MIASMA_RESEARCH_AMOUNT)//Turns out the burning of miasma is kinda interesting to scientists \ No newline at end of file + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, cleaned_air*MIASMA_RESEARCH_AMOUNT)//Turns out the burning of miasma is kinda interesting to scientists diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 3bf54a1178..6ca25c0d80 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -1,880 +1,882 @@ -/datum/tlv - var/min2 - var/min1 - var/max1 - var/max2 - -/datum/tlv/New(min2 as num, min1 as num, max1 as num, max2 as num) - if(min2) src.min2 = min2 - if(min1) src.min1 = min1 - if(max1) src.max1 = max1 - if(max2) src.max2 = max2 - -/datum/tlv/proc/get_danger_level(val as num) - if(max2 != -1 && val >= max2) - return 2 - if(min2 != -1 && val <= min2) - return 2 - if(max1 != -1 && val >= max1) - return 1 - if(min1 != -1 && val <= min1) - return 1 - return 0 - -/datum/tlv/no_checks - min2 = -1 - min1 = -1 - max1 = -1 - max2 = -1 - -/datum/tlv/dangerous - min2 = -1 - min1 = -1 - max1 = 0.2 - max2 = 0.5 - -/obj/item/electronics/airalarm - name = "air alarm electronics" - icon_state = "airalarm_electronics" - -/obj/item/wallframe/airalarm - name = "air alarm frame" - desc = "Used for building Air Alarms." - icon = 'icons/obj/monitors.dmi' - icon_state = "alarm_bitem" - result_path = /obj/machinery/airalarm - -#define AALARM_MODE_SCRUBBING 1 -#define AALARM_MODE_VENTING 2 //makes draught -#define AALARM_MODE_PANIC 3 //like siphon, but stronger (enables widenet) -#define AALARM_MODE_REPLACEMENT 4 //sucks off all air, then refill and swithes to scrubbing -#define AALARM_MODE_OFF 5 -#define AALARM_MODE_FLOOD 6 //Emagged mode; turns off scrubbers and pressure checks on vents -#define AALARM_MODE_SIPHON 7 //Scrubbers suck air -#define AALARM_MODE_CONTAMINATED 8 //Turns on all filtering and widenet scrubbing. -#define AALARM_MODE_REFILL 9 //just like normal, but with triple the air output - -#define AALARM_REPORT_TIMEOUT 100 - -#define AALARM_OVERLAY_OFF "alarm_off" -#define AALARM_OVERLAY_GREEN "alarm_green" -#define AALARM_OVERLAY_WARN "alarm_amber" -#define AALARM_OVERLAY_DANGER "alarm_red" - -/obj/machinery/airalarm - name = "air alarm" - desc = "A machine that monitors atmosphere levels. Goes off if the area is dangerous." - icon = 'icons/obj/monitors.dmi' - icon_state = "alarm0" - use_power = IDLE_POWER_USE - idle_power_usage = 4 - active_power_usage = 8 - power_channel = ENVIRON - req_access = list(ACCESS_ATMOSPHERICS) - max_integrity = 250 - integrity_failure = 80 - armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30) - resistance_flags = FIRE_PROOF - - var/danger_level = 0 - var/mode = AALARM_MODE_SCRUBBING - - var/locked = TRUE - var/aidisabled = 0 - var/shorted = 0 - var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone - var/brightness_on = 1 - - var/frequency = FREQ_ATMOS_CONTROL - var/alarm_frequency = FREQ_ATMOS_ALARMS - var/datum/radio_frequency/radio_connection - - var/list/TLV = list( // Breathable air. - "pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa - "temperature" = new/datum/tlv(T0C, T0C+10, T0C+40, T0C+66), - /datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa - /datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000), - /datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10), - /datum/gas/miasma = new/datum/tlv/(-1, -1, 2, 5), - /datum/gas/plasma = new/datum/tlv/dangerous, - /datum/gas/nitrous_oxide = new/datum/tlv/dangerous, - /datum/gas/bz = new/datum/tlv/dangerous, - /datum/gas/hypernoblium = new/datum/tlv(-1, -1, 1000, 1000), // Hyper-Noblium is inert and nontoxic - /datum/gas/water_vapor = new/datum/tlv/dangerous, - /datum/gas/tritium = new/datum/tlv/dangerous, - /datum/gas/stimulum = new/datum/tlv(-1, -1, 1000, 1000), // Stimulum has only positive effects - /datum/gas/nitryl = new/datum/tlv/dangerous, - /datum/gas/pluoxium = new/datum/tlv(-1, -1, 1000, 1000) // Unlike oxygen, pluoxium does not fuel plasma/tritium fires - ) - -/obj/machinery/airalarm/server // No checks here. - TLV = list( - "pressure" = new/datum/tlv/no_checks, - "temperature" = new/datum/tlv/no_checks, - /datum/gas/oxygen = new/datum/tlv/no_checks, - /datum/gas/nitrogen = new/datum/tlv/no_checks, - /datum/gas/carbon_dioxide = new/datum/tlv/no_checks, - /datum/gas/miasma = new/datum/tlv/no_checks, - /datum/gas/plasma = new/datum/tlv/no_checks, - /datum/gas/nitrous_oxide = new/datum/tlv/no_checks, - /datum/gas/bz = new/datum/tlv/no_checks, - /datum/gas/hypernoblium = new/datum/tlv/no_checks, - /datum/gas/water_vapor = new/datum/tlv/no_checks, - /datum/gas/tritium = new/datum/tlv/no_checks, - /datum/gas/stimulum = new/datum/tlv/no_checks, - /datum/gas/nitryl = new/datum/tlv/no_checks, - /datum/gas/pluoxium = new/datum/tlv/no_checks - ) - -/obj/machinery/airalarm/kitchen_cold_room // Copypasta: to check temperatures. - TLV = list( - "pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa - "temperature" = new/datum/tlv(T0C-73.15, T0C-63.15, T0C, T0C+10), - /datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa - /datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000), - /datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10), - /datum/gas/miasma = new/datum/tlv/(-1, -1, 2, 5), - /datum/gas/plasma = new/datum/tlv/dangerous, - /datum/gas/nitrous_oxide = new/datum/tlv/dangerous, - /datum/gas/bz = new/datum/tlv/dangerous, - /datum/gas/hypernoblium = new/datum/tlv(-1, -1, 1000, 1000), // Hyper-Noblium is inert and nontoxic - /datum/gas/water_vapor = new/datum/tlv/dangerous, - /datum/gas/tritium = new/datum/tlv/dangerous, - /datum/gas/stimulum = new/datum/tlv(-1, -1, 1000, 1000), // Stimulum has only positive effects - /datum/gas/nitryl = new/datum/tlv/dangerous, - /datum/gas/pluoxium = new/datum/tlv(-1, -1, 1000, 1000) // Unlike oxygen, pluoxium does not fuel plasma/tritium fires - ) - -/obj/machinery/airalarm/unlocked - locked = FALSE - -/obj/machinery/airalarm/engine - name = "engine air alarm" - locked = FALSE - req_access = null - req_one_access = list(ACCESS_ATMOSPHERICS, ACCESS_ENGINE) - -/obj/machinery/airalarm/mixingchamber - name = "chamber air alarm" - locked = FALSE - req_access = null - req_one_access = list(ACCESS_ATMOSPHERICS, ACCESS_TOX, ACCESS_TOX_STORAGE) - -/obj/machinery/airalarm/all_access - name = "all-access air alarm" - desc = "This particular atmos control unit appears to have no access restrictions." - locked = FALSE - req_access = null - req_one_access = null - -/obj/machinery/airalarm/syndicate //general syndicate access - req_access = list(ACCESS_SYNDICATE) - -/obj/machinery/airalarm/directional/north //Pixel offsets get overwritten on New() - dir = SOUTH - pixel_y = 24 - -/obj/machinery/airalarm/directional/south - dir = NORTH - pixel_y = -24 - -/obj/machinery/airalarm/directional/east - dir = WEST - pixel_x = 24 - -/obj/machinery/airalarm/directional/west - dir = EAST - pixel_x = -24 - -//all air alarms in area are connected via magic -/area - var/list/air_vent_names = list() - var/list/air_scrub_names = list() - var/list/air_vent_info = list() - var/list/air_scrub_info = list() - -/obj/machinery/airalarm/Initialize(mapload, ndir, nbuild) - . = ..() - wires = new /datum/wires/airalarm(src) - - if(ndir) - setDir(ndir) - - if(nbuild) - buildstage = 0 - panel_open = TRUE - pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24) - pixel_y = (dir & 3)? (dir == 1 ? -24 : 24) : 0 - - if(name == initial(name)) - name = "[get_area_name(src)] Air Alarm" - - power_change() - set_frequency(frequency) - -/obj/machinery/airalarm/Destroy() - SSradio.remove_object(src, frequency) - qdel(wires) - wires = null - return ..() - -/obj/machinery/airalarm/examine(mob/user) - . = ..() - switch(buildstage) - if(0) - to_chat(user, "It is missing air alarm electronics.") - if(1) - to_chat(user, "It is missing wiring.") - if(2) - to_chat(user, "Alt-click to [locked ? "unlock" : "lock"] the interface.") - -/obj/machinery/airalarm/ui_status(mob/user) - if(user.has_unlimited_silicon_privilege && aidisabled) - to_chat(user, "AI control has been disabled.") - else if(!shorted) - return ..() - return UI_CLOSE - -/obj/machinery/airalarm/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ - datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) - ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) - if(!ui) - ui = new(user, src, ui_key, "airalarm", name, 440, 650, master_ui, state) - ui.open() - -/obj/machinery/airalarm/ui_data(mob/user) - var/data = list( - "locked" = locked, - "siliconUser" = user.has_unlimited_silicon_privilege, - "emagged" = (obj_flags & EMAGGED ? 1 : 0), - "danger_level" = danger_level, - ) - - var/area/A = get_area(src) - data["atmos_alarm"] = A.atmosalm - data["fire_alarm"] = A.fire - - var/turf/T = get_turf(src) - var/datum/gas_mixture/environment = T.return_air() - var/datum/tlv/cur_tlv - - data["environment_data"] = list() - var/pressure = environment.return_pressure() - cur_tlv = TLV["pressure"] - data["environment_data"] += list(list( - "name" = "Pressure", - "value" = pressure, - "unit" = "kPa", - "danger_level" = cur_tlv.get_danger_level(pressure) - )) - var/temperature = environment.temperature - cur_tlv = TLV["temperature"] - data["environment_data"] += list(list( - "name" = "Temperature", - "value" = temperature, - "unit" = "K ([round(temperature - T0C, 0.1)]C)", - "danger_level" = cur_tlv.get_danger_level(temperature) - )) - var/total_moles = environment.total_moles() - var/partial_pressure = R_IDEAL_GAS_EQUATION * environment.temperature / environment.volume - for(var/gas_id in environment.gases) - if(!(gas_id in TLV)) // We're not interested in this gas, it seems. - continue - cur_tlv = TLV[gas_id] - data["environment_data"] += list(list( - "name" = GLOB.meta_gas_names[gas_id], - "value" = environment.gases[gas_id] / total_moles * 100, - "unit" = "%", - "danger_level" = cur_tlv.get_danger_level(environment.gases[gas_id] * partial_pressure) - )) - - if(!locked || user.has_unlimited_silicon_privilege) - data["vents"] = list() - for(var/id_tag in A.air_vent_names) - var/long_name = A.air_vent_names[id_tag] - var/list/info = A.air_vent_info[id_tag] - if(!info || info["frequency"] != frequency) - continue - data["vents"] += list(list( - "id_tag" = id_tag, - "long_name" = sanitize(long_name), - "power" = info["power"], - "checks" = info["checks"], - "excheck" = info["checks"]&1, - "incheck" = info["checks"]&2, - "direction" = info["direction"], - "external" = info["external"], - "internal" = info["internal"], - "extdefault"= (info["external"] == ONE_ATMOSPHERE), - "intdefault"= (info["internal"] == 0) - )) - data["scrubbers"] = list() - for(var/id_tag in A.air_scrub_names) - var/long_name = A.air_scrub_names[id_tag] - var/list/info = A.air_scrub_info[id_tag] - if(!info || info["frequency"] != frequency) - continue - data["scrubbers"] += list(list( - "id_tag" = id_tag, - "long_name" = sanitize(long_name), - "power" = info["power"], - "scrubbing" = info["scrubbing"], - "widenet" = info["widenet"], - "filter_types" = info["filter_types"] - )) - data["mode"] = mode - data["modes"] = list() - data["modes"] += list(list("name" = "Filtering - Scrubs out contaminants", "mode" = AALARM_MODE_SCRUBBING, "selected" = mode == AALARM_MODE_SCRUBBING, "danger" = 0)) - data["modes"] += list(list("name" = "Contaminated - Scrubs out ALL contaminants quickly","mode" = AALARM_MODE_CONTAMINATED, "selected" = mode == AALARM_MODE_CONTAMINATED, "danger" = 0)) - data["modes"] += list(list("name" = "Draught - Siphons out air while replacing", "mode" = AALARM_MODE_VENTING, "selected" = mode == AALARM_MODE_VENTING, "danger" = 0)) - data["modes"] += list(list("name" = "Refill - Triple vent output", "mode" = AALARM_MODE_REFILL, "selected" = mode == AALARM_MODE_REFILL, "danger" = 1)) - data["modes"] += list(list("name" = "Cycle - Siphons air before replacing", "mode" = AALARM_MODE_REPLACEMENT, "selected" = mode == AALARM_MODE_REPLACEMENT, "danger" = 1)) - data["modes"] += list(list("name" = "Siphon - Siphons air out of the room", "mode" = AALARM_MODE_SIPHON, "selected" = mode == AALARM_MODE_SIPHON, "danger" = 1)) - data["modes"] += list(list("name" = "Panic Siphon - Siphons air out of the room quickly","mode" = AALARM_MODE_PANIC, "selected" = mode == AALARM_MODE_PANIC, "danger" = 1)) - data["modes"] += list(list("name" = "Off - Shuts off vents and scrubbers", "mode" = AALARM_MODE_OFF, "selected" = mode == AALARM_MODE_OFF, "danger" = 0)) - if(obj_flags & EMAGGED) - data["modes"] += list(list("name" = "Flood - Shuts off scrubbers and opens vents", "mode" = AALARM_MODE_FLOOD, "selected" = mode == AALARM_MODE_FLOOD, "danger" = 1)) - - var/datum/tlv/selected - var/list/thresholds = list() - - selected = TLV["pressure"] - thresholds += list(list("name" = "Pressure", "settings" = list())) - thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "min2", "selected" = selected.min2)) - thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "min1", "selected" = selected.min1)) - thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "max1", "selected" = selected.max1)) - thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "max2", "selected" = selected.max2)) - - selected = TLV["temperature"] - thresholds += list(list("name" = "Temperature", "settings" = list())) - thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "min2", "selected" = selected.min2)) - thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "min1", "selected" = selected.min1)) - thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max1", "selected" = selected.max1)) - thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max2", "selected" = selected.max2)) - - for(var/gas_id in GLOB.meta_gas_names) - if(!(gas_id in TLV)) // We're not interested in this gas, it seems. - continue - selected = TLV[gas_id] - thresholds += list(list("name" = GLOB.meta_gas_names[gas_id], "settings" = list())) - thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "min2", "selected" = selected.min2)) - thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "min1", "selected" = selected.min1)) - thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "max1", "selected" = selected.max1)) - thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "max2", "selected" = selected.max2)) - - data["thresholds"] = thresholds - return data - -/obj/machinery/airalarm/ui_act(action, params) - if(..() || buildstage != 2) - return - if((locked && !usr.has_unlimited_silicon_privilege) || (usr.has_unlimited_silicon_privilege && aidisabled)) - return - var/device_id = params["id_tag"] - switch(action) - if("lock") - if(usr.has_unlimited_silicon_privilege && !wires.is_cut(WIRE_IDSCAN)) - locked = !locked - . = TRUE - if("power", "toggle_filter", "widenet", "scrubbing") - send_signal(device_id, list("[action]" = params["val"]), usr) - . = TRUE - if("excheck") - send_signal(device_id, list("checks" = text2num(params["val"])^1), usr) - . = TRUE - if("incheck") - send_signal(device_id, list("checks" = text2num(params["val"])^2), usr) - . = TRUE - if("set_external_pressure", "set_internal_pressure") - var/area/A = get_area(src) - var/target = input("New target pressure:", name, A.air_vent_info[device_id][(action == "set_external_pressure" ? "external" : "internal")]) as num|null - if(!isnull(target) && !..()) - send_signal(device_id, list("[action]" = target), usr) - . = TRUE - if("reset_external_pressure") - send_signal(device_id, list("reset_external_pressure"), usr) - . = TRUE - if("reset_internal_pressure") - send_signal(device_id, list("reset_internal_pressure"), usr) - . = TRUE - if("threshold") - var/env = params["env"] - if(text2path(env)) - env = text2path(env) - - var/name = params["var"] - var/datum/tlv/tlv = TLV[env] - if(isnull(tlv)) - return - var/value = input("New [name] for [env]:", name, tlv.vars[name]) as num|null - if(!isnull(value) && !..()) - if(value < 0) - tlv.vars[name] = -1 - else - tlv.vars[name] = round(value, 0.01) - investigate_log(" treshold value for [env]:[name] was set to [value] by [key_name(usr)]",INVESTIGATE_ATMOS) - . = TRUE - if("mode") - mode = text2num(params["mode"]) - investigate_log("was turned to [get_mode_name(mode)] mode by [key_name(usr)]",INVESTIGATE_ATMOS) - apply_mode() - . = TRUE - if("alarm") - var/area/A = get_area(src) - if(A.atmosalert(2, src)) - post_alert(2) - . = TRUE - if("reset") - var/area/A = get_area(src) - if(A.atmosalert(0, src)) - post_alert(0) - . = TRUE - update_icon() - -/obj/machinery/airalarm/proc/reset(wire) - switch(wire) - if(WIRE_POWER) - if(!wires.is_cut(WIRE_POWER)) - shorted = FALSE - update_icon() - if(WIRE_AI) - if(!wires.is_cut(WIRE_AI)) - aidisabled = FALSE - - -/obj/machinery/airalarm/proc/shock(mob/user, prb) - if((stat & (NOPOWER))) // unpowered, no shock - return 0 - if(!prob(prb)) - return 0 //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 - else - return 0 - -/obj/machinery/airalarm/proc/refresh_all() - var/area/A = get_area(src) - for(var/id_tag in A.air_vent_names) - var/list/I = A.air_vent_info[id_tag] - if(I && I["timestamp"] + AALARM_REPORT_TIMEOUT / 2 > world.time) - continue - send_signal(id_tag, list("status")) - for(var/id_tag in A.air_scrub_names) - var/list/I = A.air_scrub_info[id_tag] - if(I && I["timestamp"] + AALARM_REPORT_TIMEOUT / 2 > world.time) - continue - send_signal(id_tag, list("status")) - -/obj/machinery/airalarm/proc/set_frequency(new_frequency) - SSradio.remove_object(src, frequency) - frequency = new_frequency - radio_connection = SSradio.add_object(src, frequency, RADIO_TO_AIRALARM) - -/obj/machinery/airalarm/proc/send_signal(target, list/command, mob/user)//sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise - if(!radio_connection) - return 0 - - var/datum/signal/signal = new(command) - signal.data["tag"] = target - signal.data["sigtype"] = "command" - signal.data["user"] = user - radio_connection.post_signal(src, signal, RADIO_FROM_AIRALARM) - - return 1 - -/obj/machinery/airalarm/proc/get_mode_name(mode_value) - switch(mode_value) - if(AALARM_MODE_SCRUBBING) - return "Filtering" - if(AALARM_MODE_CONTAMINATED) - return "Contaminated" - if(AALARM_MODE_VENTING) - return "Draught" - if(AALARM_MODE_REFILL) - return "Refill" - if(AALARM_MODE_PANIC) - return "Panic Siphon" - if(AALARM_MODE_REPLACEMENT) - return "Cycle" - if(AALARM_MODE_SIPHON) - return "Siphon" - if(AALARM_MODE_OFF) - return "Off" - if(AALARM_MODE_FLOOD) - return "Flood" - -/obj/machinery/airalarm/proc/apply_mode() - var/area/A = get_area(src) - switch(mode) - if(AALARM_MODE_SCRUBBING) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 1, - "set_filters" = list(/datum/gas/carbon_dioxide, /datum/gas/miasma), - "scrubbing" = 1, - "widenet" = 0, - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 1, - "checks" = 1, - "set_external_pressure" = ONE_ATMOSPHERE - )) - if(AALARM_MODE_CONTAMINATED) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 1, - "set_filters" = list( - /datum/gas/carbon_dioxide, - /datum/gas/miasma, - /datum/gas/plasma, - /datum/gas/water_vapor, - /datum/gas/hypernoblium, - /datum/gas/nitrous_oxide, - /datum/gas/nitryl, - /datum/gas/tritium, - /datum/gas/bz, - /datum/gas/stimulum, - /datum/gas/pluoxium - ), - "scrubbing" = 1, - "widenet" = 1, - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 1, - "checks" = 1, - "set_external_pressure" = ONE_ATMOSPHERE - )) - if(AALARM_MODE_VENTING) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 1, - "widenet" = 0, - "scrubbing" = 0 - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 1, - "checks" = 1, - "set_external_pressure" = ONE_ATMOSPHERE*2 - )) - if(AALARM_MODE_REFILL) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 1, - "set_filters" = list(/datum/gas/carbon_dioxide, /datum/gas/miasma), - "scrubbing" = 1, - "widenet" = 0, - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 1, - "checks" = 1, - "set_external_pressure" = ONE_ATMOSPHERE * 3 - )) - if(AALARM_MODE_PANIC, - AALARM_MODE_REPLACEMENT) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 1, - "widenet" = 1, - "scrubbing" = 0 - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 0 - )) - if(AALARM_MODE_SIPHON) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 1, - "widenet" = 0, - "scrubbing" = 0 - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 0 - )) - - if(AALARM_MODE_OFF) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 0 - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 0 - )) - if(AALARM_MODE_FLOOD) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 0 - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 1, - "checks" = 2, - "set_internal_pressure" = 0 - )) - -/obj/machinery/airalarm/update_icon() - set_light(0) - cut_overlays() - SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) - if(stat & NOPOWER) - icon_state = "alarm0" - return - - if(stat & BROKEN) - icon_state = "alarmx" - return - - if(panel_open) - switch(buildstage) - if(2) - icon_state = "alarmx" - if(1) - icon_state = "alarm_b2" - if(0) - icon_state = "alarm_b1" - return - - icon_state = "alarm1" - var/overlay_state = AALARM_OVERLAY_OFF - var/area/A = get_area(src) - switch(max(danger_level, A.atmosalm)) - if(0) - add_overlay(AALARM_OVERLAY_GREEN) - overlay_state = AALARM_OVERLAY_GREEN - light_color = LIGHT_COLOR_GREEN - set_light(brightness_on) - if(1) - add_overlay(AALARM_OVERLAY_WARN) - overlay_state = AALARM_OVERLAY_WARN - light_color = LIGHT_COLOR_LAVA - set_light(brightness_on) - if(2) - add_overlay(AALARM_OVERLAY_DANGER) - overlay_state = AALARM_OVERLAY_DANGER - light_color = LIGHT_COLOR_RED - set_light(brightness_on) - - SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) - update_light() - -/obj/machinery/airalarm/process() - if((stat & (NOPOWER|BROKEN)) || shorted) - return - - var/turf/location = get_turf(src) - if(!location) - return - - var/datum/tlv/cur_tlv - - var/datum/gas_mixture/environment = location.return_air() - var/list/env_gases = environment.gases - var/partial_pressure = R_IDEAL_GAS_EQUATION * environment.temperature / environment.volume - - cur_tlv = TLV["pressure"] - var/environment_pressure = environment.return_pressure() - var/pressure_dangerlevel = cur_tlv.get_danger_level(environment_pressure) - - cur_tlv = TLV["temperature"] - var/temperature_dangerlevel = cur_tlv.get_danger_level(environment.temperature) - - var/gas_dangerlevel = 0 - for(var/gas_id in env_gases) - if(!(gas_id in TLV)) // We're not interested in this gas, it seems. - continue - cur_tlv = TLV[gas_id] - gas_dangerlevel = max(gas_dangerlevel, cur_tlv.get_danger_level(env_gases[gas_id] * partial_pressure)) - - GAS_GARBAGE_COLLECT(environment.gases) - - var/old_danger_level = danger_level - danger_level = max(pressure_dangerlevel, temperature_dangerlevel, gas_dangerlevel) - - if(old_danger_level != danger_level) - apply_danger_level() - if(mode == AALARM_MODE_REPLACEMENT && environment_pressure < ONE_ATMOSPHERE * 0.05) - mode = AALARM_MODE_SCRUBBING - apply_mode() - - return - - -/obj/machinery/airalarm/proc/post_alert(alert_level) - var/datum/radio_frequency/frequency = SSradio.return_frequency(alarm_frequency) - - if(!frequency) - return - - var/datum/signal/alert_signal = new(list( - "zone" = get_area_name(src), - "type" = "Atmospheric" - )) - if(alert_level==2) - alert_signal.data["alert"] = "severe" - else if (alert_level==1) - alert_signal.data["alert"] = "minor" - else if (alert_level==0) - alert_signal.data["alert"] = "clear" - - frequency.post_signal(src, alert_signal, range = -1) - -/obj/machinery/airalarm/proc/apply_danger_level() - var/area/A = get_area(src) - - var/new_area_danger_level = 0 - for(var/obj/machinery/airalarm/AA in A) - if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted) - new_area_danger_level = max(new_area_danger_level,AA.danger_level) - if(A.atmosalert(new_area_danger_level,src)) //if area was in normal state or if area was in alert state - post_alert(new_area_danger_level) - - update_icon() - -/obj/machinery/airalarm/attackby(obj/item/W, mob/user, params) - switch(buildstage) - if(2) - if(istype(W, /obj/item/wirecutters) && panel_open && wires.is_all_cut()) - W.play_tool_sound(src) - to_chat(user, "You cut the final wires.") - new /obj/item/stack/cable_coil(loc, 5) - buildstage = 1 - update_icon() - return - else if(istype(W, /obj/item/screwdriver)) // Opening that Air Alarm up. - W.play_tool_sound(src) - panel_open = !panel_open - to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"].") - update_icon() - return - else if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda))// trying to unlock the interface with an ID card - togglelock(user) - else if(panel_open && is_wire_tool(W)) - wires.interact(user) - return - if(1) - if(istype(W, /obj/item/crowbar)) - user.visible_message("[user.name] removes the electronics from [src.name].",\ - "You start prying out the circuit...") - W.play_tool_sound(src) - if (W.use_tool(src, user, 20)) - if (buildstage == 1) - to_chat(user, "You remove the air alarm electronics.") - new /obj/item/electronics/airalarm( src.loc ) - playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) - buildstage = 0 - update_icon() - return - - if(istype(W, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/cable = W - if(cable.get_amount() < 5) - to_chat(user, "You need five lengths of cable to wire the air alarm!") - return - user.visible_message("[user.name] wires the air alarm.", \ - "You start wiring the air alarm...") - if (do_after(user, 20, target = src)) - if (cable.get_amount() >= 5 && buildstage == 1) - cable.use(5) - to_chat(user, "You wire the air alarm.") - wires.repair() - aidisabled = 0 - locked = FALSE - mode = 1 - shorted = 0 - post_alert(0) - buildstage = 2 - update_icon() - return - if(0) - if(istype(W, /obj/item/electronics/airalarm)) - if(user.temporarilyRemoveItemFromInventory(W)) - to_chat(user, "You insert the circuit.") - buildstage = 1 - update_icon() - qdel(W) - return - - if(istype(W, /obj/item/electroadaptive_pseudocircuit)) - var/obj/item/electroadaptive_pseudocircuit/P = W - if(!P.adapt_circuit(user, 25)) - return - user.visible_message("[user] fabricates a circuit and places it into [src].", \ - "You adapt an air alarm circuit and slot it into the assembly.") - buildstage = 1 - update_icon() - return - - if(istype(W, /obj/item/wrench)) - to_chat(user, "You detach \the [src] from the wall.") - W.play_tool_sound(src) - new /obj/item/wallframe/airalarm( user.loc ) - qdel(src) - return - - return ..() - -/obj/machinery/airalarm/AltClick(mob/user) - ..() - if(!user.canUseTopic(src, !issilicon(user)) || !isturf(loc)) - return - else - togglelock(user) - -/obj/machinery/airalarm/proc/togglelock(mob/living/user) - if(stat & (NOPOWER|BROKEN)) - to_chat(user, "It does nothing!") - else - if(src.allowed(usr) && !wires.is_cut(WIRE_IDSCAN)) - locked = !locked - updateUsrDialog() - to_chat(user, "You [ locked ? "lock" : "unlock"] the air alarm interface.") - else - to_chat(user, "Access denied.") - return - -/obj/machinery/airalarm/power_change() - ..() - if(stat & NOPOWER) - set_light(0) - update_icon() - -/obj/machinery/airalarm/emag_act(mob/user) - if(obj_flags & EMAGGED) - return - obj_flags |= EMAGGED - visible_message("Sparks fly out of [src]!", "You emag [src], disabling its safeties.") - playsound(src, "sparks", 50, 1) - -/obj/machinery/airalarm/obj_break(damage_flag) - ..() - update_icon() - set_light(0) - -/obj/machinery/airalarm/deconstruct(disassembled = TRUE) - if(!(flags_1 & NODECONSTRUCT_1)) - new /obj/item/stack/sheet/metal(loc, 2) - var/obj/item/I = new /obj/item/electronics/airalarm(loc) - if(!disassembled) - I.obj_integrity = I.max_integrity * 0.5 - new /obj/item/stack/cable_coil(loc, 3) - qdel(src) - -#undef AALARM_MODE_SCRUBBING -#undef AALARM_MODE_VENTING -#undef AALARM_MODE_PANIC -#undef AALARM_MODE_REPLACEMENT -#undef AALARM_MODE_OFF -#undef AALARM_MODE_FLOOD -#undef AALARM_MODE_SIPHON -#undef AALARM_MODE_CONTAMINATED -#undef AALARM_MODE_REFILL -#undef AALARM_REPORT_TIMEOUT +/datum/tlv + var/min2 + var/min1 + var/max1 + var/max2 + +/datum/tlv/New(min2 as num, min1 as num, max1 as num, max2 as num) + if(min2) src.min2 = min2 + if(min1) src.min1 = min1 + if(max1) src.max1 = max1 + if(max2) src.max2 = max2 + +/datum/tlv/proc/get_danger_level(val as num) + if(max2 != -1 && val >= max2) + return 2 + if(min2 != -1 && val <= min2) + return 2 + if(max1 != -1 && val >= max1) + return 1 + if(min1 != -1 && val <= min1) + return 1 + return 0 + +/datum/tlv/no_checks + min2 = -1 + min1 = -1 + max1 = -1 + max2 = -1 + +/datum/tlv/dangerous + min2 = -1 + min1 = -1 + max1 = 0.2 + max2 = 0.5 + +/obj/item/electronics/airalarm + name = "air alarm electronics" + icon_state = "airalarm_electronics" + +/obj/item/wallframe/airalarm + name = "air alarm frame" + desc = "Used for building Air Alarms." + icon = 'icons/obj/monitors.dmi' + icon_state = "alarm_bitem" + result_path = /obj/machinery/airalarm + +#define AALARM_MODE_SCRUBBING 1 +#define AALARM_MODE_VENTING 2 //makes draught +#define AALARM_MODE_PANIC 3 //like siphon, but stronger (enables widenet) +#define AALARM_MODE_REPLACEMENT 4 //sucks off all air, then refill and swithes to scrubbing +#define AALARM_MODE_OFF 5 +#define AALARM_MODE_FLOOD 6 //Emagged mode; turns off scrubbers and pressure checks on vents +#define AALARM_MODE_SIPHON 7 //Scrubbers suck air +#define AALARM_MODE_CONTAMINATED 8 //Turns on all filtering and widenet scrubbing. +#define AALARM_MODE_REFILL 9 //just like normal, but with triple the air output + +#define AALARM_REPORT_TIMEOUT 100 + +#define AALARM_OVERLAY_OFF "alarm_off" +#define AALARM_OVERLAY_GREEN "alarm_green" +#define AALARM_OVERLAY_WARN "alarm_amber" +#define AALARM_OVERLAY_DANGER "alarm_red" + +/obj/machinery/airalarm + name = "air alarm" + desc = "A machine that monitors atmosphere levels. Goes off if the area is dangerous." + icon = 'icons/obj/monitors.dmi' + icon_state = "alarm0" + use_power = IDLE_POWER_USE + idle_power_usage = 4 + active_power_usage = 8 + power_channel = ENVIRON + req_access = list(ACCESS_ATMOSPHERICS) + max_integrity = 250 + integrity_failure = 80 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30) + resistance_flags = FIRE_PROOF + + var/danger_level = 0 + var/mode = AALARM_MODE_SCRUBBING + + var/locked = TRUE + var/aidisabled = 0 + var/shorted = 0 + var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone + var/brightness_on = 1 + + var/frequency = FREQ_ATMOS_CONTROL + var/alarm_frequency = FREQ_ATMOS_ALARMS + var/datum/radio_frequency/radio_connection + + var/list/TLV = list( // Breathable air. + "pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa + "temperature" = new/datum/tlv(T0C, T0C+10, T0C+40, T0C+66), + /datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa + /datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000), + /datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10), + /datum/gas/miasma = new/datum/tlv/(-1, -1, 2, 5), + /datum/gas/plasma = new/datum/tlv/dangerous, + /datum/gas/nitrous_oxide = new/datum/tlv/dangerous, + /datum/gas/bz = new/datum/tlv/dangerous, + /datum/gas/hypernoblium = new/datum/tlv(-1, -1, 1000, 1000), // Hyper-Noblium is inert and nontoxic + /datum/gas/water_vapor = new/datum/tlv/dangerous, + /datum/gas/tritium = new/datum/tlv/dangerous, + /datum/gas/stimulum = new/datum/tlv(-1, -1, 1000, 1000), // Stimulum has only positive effects + /datum/gas/nitryl = new/datum/tlv/dangerous, + /datum/gas/pluoxium = new/datum/tlv(-1, -1, 1000, 1000) // Unlike oxygen, pluoxium does not fuel plasma/tritium fires + ) + +/obj/machinery/airalarm/server // No checks here. + TLV = list( + "pressure" = new/datum/tlv/no_checks, + "temperature" = new/datum/tlv/no_checks, + /datum/gas/oxygen = new/datum/tlv/no_checks, + /datum/gas/nitrogen = new/datum/tlv/no_checks, + /datum/gas/carbon_dioxide = new/datum/tlv/no_checks, + /datum/gas/miasma = new/datum/tlv/no_checks, + /datum/gas/plasma = new/datum/tlv/no_checks, + /datum/gas/nitrous_oxide = new/datum/tlv/no_checks, + /datum/gas/bz = new/datum/tlv/no_checks, + /datum/gas/hypernoblium = new/datum/tlv/no_checks, + /datum/gas/water_vapor = new/datum/tlv/no_checks, + /datum/gas/tritium = new/datum/tlv/no_checks, + /datum/gas/stimulum = new/datum/tlv/no_checks, + /datum/gas/nitryl = new/datum/tlv/no_checks, + /datum/gas/pluoxium = new/datum/tlv/no_checks + ) + +/obj/machinery/airalarm/kitchen_cold_room // Copypasta: to check temperatures. + TLV = list( + "pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa + "temperature" = new/datum/tlv(T0C-73.15, T0C-63.15, T0C, T0C+10), + /datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa + /datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000), + /datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10), + /datum/gas/miasma = new/datum/tlv/(-1, -1, 2, 5), + /datum/gas/plasma = new/datum/tlv/dangerous, + /datum/gas/nitrous_oxide = new/datum/tlv/dangerous, + /datum/gas/bz = new/datum/tlv/dangerous, + /datum/gas/hypernoblium = new/datum/tlv(-1, -1, 1000, 1000), // Hyper-Noblium is inert and nontoxic + /datum/gas/water_vapor = new/datum/tlv/dangerous, + /datum/gas/tritium = new/datum/tlv/dangerous, + /datum/gas/stimulum = new/datum/tlv(-1, -1, 1000, 1000), // Stimulum has only positive effects + /datum/gas/nitryl = new/datum/tlv/dangerous, + /datum/gas/pluoxium = new/datum/tlv(-1, -1, 1000, 1000) // Unlike oxygen, pluoxium does not fuel plasma/tritium fires + ) + +/obj/machinery/airalarm/unlocked + locked = FALSE + +/obj/machinery/airalarm/engine + name = "engine air alarm" + locked = FALSE + req_access = null + req_one_access = list(ACCESS_ATMOSPHERICS, ACCESS_ENGINE) + +/obj/machinery/airalarm/mixingchamber + name = "chamber air alarm" + locked = FALSE + req_access = null + req_one_access = list(ACCESS_ATMOSPHERICS, ACCESS_TOX, ACCESS_TOX_STORAGE) + +/obj/machinery/airalarm/all_access + name = "all-access air alarm" + desc = "This particular atmos control unit appears to have no access restrictions." + locked = FALSE + req_access = null + req_one_access = null + +/obj/machinery/airalarm/syndicate //general syndicate access + req_access = list(ACCESS_SYNDICATE) + +/obj/machinery/airalarm/directional/north //Pixel offsets get overwritten on New() + dir = SOUTH + pixel_y = 24 + +/obj/machinery/airalarm/directional/south + dir = NORTH + pixel_y = -24 + +/obj/machinery/airalarm/directional/east + dir = WEST + pixel_x = 24 + +/obj/machinery/airalarm/directional/west + dir = EAST + pixel_x = -24 + +//all air alarms in area are connected via magic +/area + var/list/air_vent_names = list() + var/list/air_scrub_names = list() + var/list/air_vent_info = list() + var/list/air_scrub_info = list() + +/obj/machinery/airalarm/Initialize(mapload, ndir, nbuild) + . = ..() + wires = new /datum/wires/airalarm(src) + + if(ndir) + setDir(ndir) + + if(nbuild) + buildstage = 0 + panel_open = TRUE + pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24) + pixel_y = (dir & 3)? (dir == 1 ? -24 : 24) : 0 + + if(name == initial(name)) + name = "[get_area_name(src)] Air Alarm" + + power_change() + set_frequency(frequency) + +/obj/machinery/airalarm/Destroy() + SSradio.remove_object(src, frequency) + qdel(wires) + wires = null + return ..() + +/obj/machinery/airalarm/examine(mob/user) + . = ..() + switch(buildstage) + if(0) + to_chat(user, "It is missing air alarm electronics.") + if(1) + to_chat(user, "It is missing wiring.") + if(2) + to_chat(user, "Alt-click to [locked ? "unlock" : "lock"] the interface.") + +/obj/machinery/airalarm/ui_status(mob/user) + if(user.has_unlimited_silicon_privilege && aidisabled) + to_chat(user, "AI control has been disabled.") + else if(!shorted) + return ..() + return UI_CLOSE + +/obj/machinery/airalarm/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ + datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "airalarm", name, 440, 650, master_ui, state) + ui.open() + +/obj/machinery/airalarm/ui_data(mob/user) + var/data = list( + "locked" = locked, + "siliconUser" = user.has_unlimited_silicon_privilege, + "emagged" = (obj_flags & EMAGGED ? 1 : 0), + "danger_level" = danger_level, + ) + + var/area/A = get_area(src) + data["atmos_alarm"] = A.atmosalm + data["fire_alarm"] = A.fire + + var/turf/T = get_turf(src) + var/datum/gas_mixture/environment = T.return_air() + var/datum/tlv/cur_tlv + + data["environment_data"] = list() + var/pressure = environment.return_pressure() + cur_tlv = TLV["pressure"] + data["environment_data"] += list(list( + "name" = "Pressure", + "value" = pressure, + "unit" = "kPa", + "danger_level" = cur_tlv.get_danger_level(pressure) + )) + var/temperature = environment.temperature + cur_tlv = TLV["temperature"] + data["environment_data"] += list(list( + "name" = "Temperature", + "value" = temperature, + "unit" = "K ([round(temperature - T0C, 0.1)]C)", + "danger_level" = cur_tlv.get_danger_level(temperature) + )) + var/total_moles = environment.total_moles() + var/partial_pressure = R_IDEAL_GAS_EQUATION * environment.temperature / environment.volume + for(var/gas_id in environment.gases) + if(!(gas_id in TLV)) // We're not interested in this gas, it seems. + continue + cur_tlv = TLV[gas_id] + data["environment_data"] += list(list( + "name" = GLOB.meta_gas_names[gas_id], + "value" = environment.gases[gas_id] / total_moles * 100, + "unit" = "%", + "danger_level" = cur_tlv.get_danger_level(environment.gases[gas_id] * partial_pressure) + )) + + if(!locked || user.has_unlimited_silicon_privilege) + data["vents"] = list() + for(var/id_tag in A.air_vent_names) + var/long_name = A.air_vent_names[id_tag] + var/list/info = A.air_vent_info[id_tag] + if(!info || info["frequency"] != frequency) + continue + data["vents"] += list(list( + "id_tag" = id_tag, + "long_name" = sanitize(long_name), + "power" = info["power"], + "checks" = info["checks"], + "excheck" = info["checks"]&1, + "incheck" = info["checks"]&2, + "direction" = info["direction"], + "external" = info["external"], + "internal" = info["internal"], + "extdefault"= (info["external"] == ONE_ATMOSPHERE), + "intdefault"= (info["internal"] == 0) + )) + data["scrubbers"] = list() + for(var/id_tag in A.air_scrub_names) + var/long_name = A.air_scrub_names[id_tag] + var/list/info = A.air_scrub_info[id_tag] + if(!info || info["frequency"] != frequency) + continue + data["scrubbers"] += list(list( + "id_tag" = id_tag, + "long_name" = sanitize(long_name), + "power" = info["power"], + "scrubbing" = info["scrubbing"], + "widenet" = info["widenet"], + "filter_types" = info["filter_types"] + )) + data["mode"] = mode + data["modes"] = list() + data["modes"] += list(list("name" = "Filtering - Scrubs out contaminants", "mode" = AALARM_MODE_SCRUBBING, "selected" = mode == AALARM_MODE_SCRUBBING, "danger" = 0)) + data["modes"] += list(list("name" = "Contaminated - Scrubs out ALL contaminants quickly","mode" = AALARM_MODE_CONTAMINATED, "selected" = mode == AALARM_MODE_CONTAMINATED, "danger" = 0)) + data["modes"] += list(list("name" = "Draught - Siphons out air while replacing", "mode" = AALARM_MODE_VENTING, "selected" = mode == AALARM_MODE_VENTING, "danger" = 0)) + data["modes"] += list(list("name" = "Refill - Triple vent output", "mode" = AALARM_MODE_REFILL, "selected" = mode == AALARM_MODE_REFILL, "danger" = 1)) + data["modes"] += list(list("name" = "Cycle - Siphons air before replacing", "mode" = AALARM_MODE_REPLACEMENT, "selected" = mode == AALARM_MODE_REPLACEMENT, "danger" = 1)) + data["modes"] += list(list("name" = "Siphon - Siphons air out of the room", "mode" = AALARM_MODE_SIPHON, "selected" = mode == AALARM_MODE_SIPHON, "danger" = 1)) + data["modes"] += list(list("name" = "Panic Siphon - Siphons air out of the room quickly","mode" = AALARM_MODE_PANIC, "selected" = mode == AALARM_MODE_PANIC, "danger" = 1)) + data["modes"] += list(list("name" = "Off - Shuts off vents and scrubbers", "mode" = AALARM_MODE_OFF, "selected" = mode == AALARM_MODE_OFF, "danger" = 0)) + if(obj_flags & EMAGGED) + data["modes"] += list(list("name" = "Flood - Shuts off scrubbers and opens vents", "mode" = AALARM_MODE_FLOOD, "selected" = mode == AALARM_MODE_FLOOD, "danger" = 1)) + + var/datum/tlv/selected + var/list/thresholds = list() + + selected = TLV["pressure"] + thresholds += list(list("name" = "Pressure", "settings" = list())) + thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "min2", "selected" = selected.min2)) + thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "min1", "selected" = selected.min1)) + thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "max1", "selected" = selected.max1)) + thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "max2", "selected" = selected.max2)) + + selected = TLV["temperature"] + thresholds += list(list("name" = "Temperature", "settings" = list())) + thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "min2", "selected" = selected.min2)) + thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "min1", "selected" = selected.min1)) + thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max1", "selected" = selected.max1)) + thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max2", "selected" = selected.max2)) + + for(var/gas_id in GLOB.meta_gas_names) + if(!(gas_id in TLV)) // We're not interested in this gas, it seems. + continue + selected = TLV[gas_id] + thresholds += list(list("name" = GLOB.meta_gas_names[gas_id], "settings" = list())) + thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "min2", "selected" = selected.min2)) + thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "min1", "selected" = selected.min1)) + thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "max1", "selected" = selected.max1)) + thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "max2", "selected" = selected.max2)) + + data["thresholds"] = thresholds + return data + +/obj/machinery/airalarm/ui_act(action, params) + if(..() || buildstage != 2) + return + if((locked && !usr.has_unlimited_silicon_privilege) || (usr.has_unlimited_silicon_privilege && aidisabled)) + return + var/device_id = params["id_tag"] + switch(action) + if("lock") + if(usr.has_unlimited_silicon_privilege && !wires.is_cut(WIRE_IDSCAN)) + locked = !locked + . = TRUE + if("power", "toggle_filter", "widenet", "scrubbing") + send_signal(device_id, list("[action]" = params["val"]), usr) + . = TRUE + if("excheck") + send_signal(device_id, list("checks" = text2num(params["val"])^1), usr) + . = TRUE + if("incheck") + send_signal(device_id, list("checks" = text2num(params["val"])^2), usr) + . = TRUE + if("set_external_pressure", "set_internal_pressure") + var/area/A = get_area(src) + var/target = input("New target pressure:", name, A.air_vent_info[device_id][(action == "set_external_pressure" ? "external" : "internal")]) as num|null + if(!isnull(target) && !..()) + send_signal(device_id, list("[action]" = target), usr) + . = TRUE + if("reset_external_pressure") + send_signal(device_id, list("reset_external_pressure"), usr) + . = TRUE + if("reset_internal_pressure") + send_signal(device_id, list("reset_internal_pressure"), usr) + . = TRUE + if("threshold") + var/env = params["env"] + if(text2path(env)) + env = text2path(env) + + var/name = params["var"] + var/datum/tlv/tlv = TLV[env] + if(isnull(tlv)) + return + var/value = input("New [name] for [env]:", name, tlv.vars[name]) as num|null + if(!isnull(value) && !..()) + if(value < 0) + tlv.vars[name] = -1 + else + tlv.vars[name] = round(value, 0.01) + investigate_log(" treshold value for [env]:[name] was set to [value] by [key_name(usr)]",INVESTIGATE_ATMOS) + . = TRUE + if("mode") + mode = text2num(params["mode"]) + investigate_log("was turned to [get_mode_name(mode)] mode by [key_name(usr)]",INVESTIGATE_ATMOS) + apply_mode() + . = TRUE + if("alarm") + var/area/A = get_area(src) + if(A.atmosalert(2, src)) + post_alert(2) + . = TRUE + if("reset") + var/area/A = get_area(src) + if(A.atmosalert(0, src)) + post_alert(0) + . = TRUE + update_icon() + +/obj/machinery/airalarm/proc/reset(wire) + switch(wire) + if(WIRE_POWER) + if(!wires.is_cut(WIRE_POWER)) + shorted = FALSE + update_icon() + if(WIRE_AI) + if(!wires.is_cut(WIRE_AI)) + aidisabled = FALSE + + +/obj/machinery/airalarm/proc/shock(mob/user, prb) + if((stat & (NOPOWER))) // unpowered, no shock + return 0 + if(!prob(prb)) + return 0 //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 + else + return 0 + +/obj/machinery/airalarm/proc/refresh_all() + var/area/A = get_area(src) + for(var/id_tag in A.air_vent_names) + var/list/I = A.air_vent_info[id_tag] + if(I && I["timestamp"] + AALARM_REPORT_TIMEOUT / 2 > world.time) + continue + send_signal(id_tag, list("status")) + for(var/id_tag in A.air_scrub_names) + var/list/I = A.air_scrub_info[id_tag] + if(I && I["timestamp"] + AALARM_REPORT_TIMEOUT / 2 > world.time) + continue + send_signal(id_tag, list("status")) + +/obj/machinery/airalarm/proc/set_frequency(new_frequency) + SSradio.remove_object(src, frequency) + frequency = new_frequency + radio_connection = SSradio.add_object(src, frequency, RADIO_TO_AIRALARM) + +/obj/machinery/airalarm/proc/send_signal(target, list/command, mob/user)//sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise + if(!radio_connection) + return 0 + + var/datum/signal/signal = new(command) + signal.data["tag"] = target + signal.data["sigtype"] = "command" + signal.data["user"] = user + radio_connection.post_signal(src, signal, RADIO_FROM_AIRALARM) + + return 1 + +/obj/machinery/airalarm/proc/get_mode_name(mode_value) + switch(mode_value) + if(AALARM_MODE_SCRUBBING) + return "Filtering" + if(AALARM_MODE_CONTAMINATED) + return "Contaminated" + if(AALARM_MODE_VENTING) + return "Draught" + if(AALARM_MODE_REFILL) + return "Refill" + if(AALARM_MODE_PANIC) + return "Panic Siphon" + if(AALARM_MODE_REPLACEMENT) + return "Cycle" + if(AALARM_MODE_SIPHON) + return "Siphon" + if(AALARM_MODE_OFF) + return "Off" + if(AALARM_MODE_FLOOD) + return "Flood" + +/obj/machinery/airalarm/proc/apply_mode() + var/area/A = get_area(src) + switch(mode) + if(AALARM_MODE_SCRUBBING) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 1, + "set_filters" = list(/datum/gas/carbon_dioxide, /datum/gas/miasma), + "scrubbing" = 1, + "widenet" = 0, + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 1, + "checks" = 1, + "set_external_pressure" = ONE_ATMOSPHERE + )) + if(AALARM_MODE_CONTAMINATED) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 1, + "set_filters" = list( + /datum/gas/carbon_dioxide, + /datum/gas/miasma, + /datum/gas/plasma, + /datum/gas/water_vapor, + /datum/gas/hypernoblium, + /datum/gas/nitrous_oxide, + /datum/gas/nitryl, + /datum/gas/tritium, + /datum/gas/bz, + /datum/gas/stimulum, + /datum/gas/pluoxium + ), + "scrubbing" = 1, + "widenet" = 1, + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 1, + "checks" = 1, + "set_external_pressure" = ONE_ATMOSPHERE + )) + if(AALARM_MODE_VENTING) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 1, + "widenet" = 0, + "scrubbing" = 0 + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 1, + "checks" = 1, + "set_external_pressure" = ONE_ATMOSPHERE*2 + )) + if(AALARM_MODE_REFILL) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 1, + "set_filters" = list(/datum/gas/carbon_dioxide, /datum/gas/miasma), + "scrubbing" = 1, + "widenet" = 0, + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 1, + "checks" = 1, + "set_external_pressure" = ONE_ATMOSPHERE * 3 + )) + if(AALARM_MODE_PANIC, + AALARM_MODE_REPLACEMENT) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 1, + "widenet" = 1, + "scrubbing" = 0 + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 0 + )) + if(AALARM_MODE_SIPHON) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 1, + "widenet" = 0, + "scrubbing" = 0 + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 0 + )) + + if(AALARM_MODE_OFF) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 0 + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 0 + )) + if(AALARM_MODE_FLOOD) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 0 + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 1, + "checks" = 2, + "set_internal_pressure" = 0 + )) + +/obj/machinery/airalarm/update_icon() + set_light(0) + cut_overlays() + SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) + if(stat & NOPOWER) + icon_state = "alarm0" + return + + if(stat & BROKEN) + icon_state = "alarmx" + return + + if(panel_open) + switch(buildstage) + if(2) + icon_state = "alarmx" + if(1) + icon_state = "alarm_b2" + if(0) + icon_state = "alarm_b1" + return + + icon_state = "alarm1" + var/overlay_state = AALARM_OVERLAY_OFF + var/area/A = get_area(src) + switch(max(danger_level, A.atmosalm)) + if(0) + add_overlay(AALARM_OVERLAY_GREEN) + overlay_state = AALARM_OVERLAY_GREEN + light_color = LIGHT_COLOR_GREEN + set_light(brightness_on) + if(1) + add_overlay(AALARM_OVERLAY_WARN) + overlay_state = AALARM_OVERLAY_WARN + light_color = LIGHT_COLOR_LAVA + set_light(brightness_on) + if(2) + add_overlay(AALARM_OVERLAY_DANGER) + overlay_state = AALARM_OVERLAY_DANGER + light_color = LIGHT_COLOR_RED + set_light(brightness_on) + + SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) + update_light() + +/obj/machinery/airalarm/process() + if((stat & (NOPOWER|BROKEN)) || shorted) + return + + var/turf/location = get_turf(src) + if(!location) + return + + var/datum/tlv/cur_tlv + + var/datum/gas_mixture/environment = location.return_air() + var/list/env_gases = environment.gases + var/partial_pressure = R_IDEAL_GAS_EQUATION * environment.temperature / environment.volume + + cur_tlv = TLV["pressure"] + var/environment_pressure = environment.return_pressure() + var/pressure_dangerlevel = cur_tlv.get_danger_level(environment_pressure) + + cur_tlv = TLV["temperature"] + var/temperature_dangerlevel = cur_tlv.get_danger_level(environment.temperature) + + var/gas_dangerlevel = 0 + for(var/gas_id in env_gases) + if(!(gas_id in TLV)) // We're not interested in this gas, it seems. + continue + cur_tlv = TLV[gas_id] + gas_dangerlevel = max(gas_dangerlevel, cur_tlv.get_danger_level(env_gases[gas_id] * partial_pressure)) + + GAS_GARBAGE_COLLECT(environment.gases) + + var/old_danger_level = danger_level + danger_level = max(pressure_dangerlevel, temperature_dangerlevel, gas_dangerlevel) + + if(old_danger_level != danger_level) + apply_danger_level() + if(mode == AALARM_MODE_REPLACEMENT && environment_pressure < ONE_ATMOSPHERE * 0.05) + mode = AALARM_MODE_SCRUBBING + apply_mode() + + return + + +/obj/machinery/airalarm/proc/post_alert(alert_level) + var/datum/radio_frequency/frequency = SSradio.return_frequency(alarm_frequency) + + if(!frequency) + return + + var/datum/signal/alert_signal = new(list( + "zone" = get_area_name(src), + "type" = "Atmospheric" + )) + if(alert_level==2) + alert_signal.data["alert"] = "severe" + else if (alert_level==1) + alert_signal.data["alert"] = "minor" + else if (alert_level==0) + alert_signal.data["alert"] = "clear" + + frequency.post_signal(src, alert_signal, range = -1) + +/obj/machinery/airalarm/proc/apply_danger_level() + var/area/A = get_area(src) + + var/new_area_danger_level = 0 + for(var/obj/machinery/airalarm/AA in A) + if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted) + new_area_danger_level = max(new_area_danger_level,AA.danger_level) + if(A.atmosalert(new_area_danger_level,src)) //if area was in normal state or if area was in alert state + post_alert(new_area_danger_level) + + update_icon() + +/obj/machinery/airalarm/attackby(obj/item/W, mob/user, params) + switch(buildstage) + if(2) + if(istype(W, /obj/item/wirecutters) && panel_open && wires.is_all_cut()) + W.play_tool_sound(src) + to_chat(user, "You cut the final wires.") + new /obj/item/stack/cable_coil(loc, 5) + buildstage = 1 + update_icon() + return + else if(istype(W, /obj/item/screwdriver)) // Opening that Air Alarm up. + W.play_tool_sound(src) + panel_open = !panel_open + to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"].") + update_icon() + return + else if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda))// trying to unlock the interface with an ID card + togglelock(user) + else if(panel_open && is_wire_tool(W)) + wires.interact(user) + return + if(1) + if(istype(W, /obj/item/crowbar)) + user.visible_message("[user.name] removes the electronics from [src.name].",\ + "You start prying out the circuit...") + W.play_tool_sound(src) + if (W.use_tool(src, user, 20)) + if (buildstage == 1) + to_chat(user, "You remove the air alarm electronics.") + new /obj/item/electronics/airalarm( src.loc ) + playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) + buildstage = 0 + update_icon() + return + + if(istype(W, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/cable = W + if(cable.get_amount() < 5) + to_chat(user, "You need five lengths of cable to wire the air alarm!") + return + user.visible_message("[user.name] wires the air alarm.", \ + "You start wiring the air alarm...") + if (do_after(user, 20, target = src)) + if (cable.get_amount() >= 5 && buildstage == 1) + cable.use(5) + to_chat(user, "You wire the air alarm.") + wires.repair() + aidisabled = 0 + locked = FALSE + mode = 1 + shorted = 0 + post_alert(0) + buildstage = 2 + update_icon() + return + if(0) + if(istype(W, /obj/item/electronics/airalarm)) + if(user.temporarilyRemoveItemFromInventory(W)) + to_chat(user, "You insert the circuit.") + buildstage = 1 + update_icon() + qdel(W) + return + + if(istype(W, /obj/item/electroadaptive_pseudocircuit)) + var/obj/item/electroadaptive_pseudocircuit/P = W + if(!P.adapt_circuit(user, 25)) + return + user.visible_message("[user] fabricates a circuit and places it into [src].", \ + "You adapt an air alarm circuit and slot it into the assembly.") + buildstage = 1 + update_icon() + return + + if(istype(W, /obj/item/wrench)) + to_chat(user, "You detach \the [src] from the wall.") + W.play_tool_sound(src) + new /obj/item/wallframe/airalarm( user.loc ) + qdel(src) + return + + return ..() + +/obj/machinery/airalarm/AltClick(mob/user) + ..() + if(!user.canUseTopic(src, !issilicon(user)) || !isturf(loc)) + return + else + togglelock(user) + +/obj/machinery/airalarm/proc/togglelock(mob/living/user) + if(stat & (NOPOWER|BROKEN)) + to_chat(user, "It does nothing!") + else + if(src.allowed(usr) && !wires.is_cut(WIRE_IDSCAN)) + locked = !locked + updateUsrDialog() + to_chat(user, "You [ locked ? "lock" : "unlock"] the air alarm interface.") + else + to_chat(user, "Access denied.") + return + +/obj/machinery/airalarm/power_change() + ..() + if(stat & NOPOWER) + set_light(0) + update_icon() + +/obj/machinery/airalarm/emag_act(mob/user) + . = ..() + if(obj_flags & EMAGGED) + return + obj_flags |= EMAGGED + visible_message("Sparks fly out of [src]!", "You emag [src], disabling its safeties.") + playsound(src, "sparks", 50, 1) + return TRUE + +/obj/machinery/airalarm/obj_break(damage_flag) + ..() + update_icon() + set_light(0) + +/obj/machinery/airalarm/deconstruct(disassembled = TRUE) + if(!(flags_1 & NODECONSTRUCT_1)) + new /obj/item/stack/sheet/metal(loc, 2) + var/obj/item/I = new /obj/item/electronics/airalarm(loc) + if(!disassembled) + I.obj_integrity = I.max_integrity * 0.5 + new /obj/item/stack/cable_coil(loc, 3) + qdel(src) + +#undef AALARM_MODE_SCRUBBING +#undef AALARM_MODE_VENTING +#undef AALARM_MODE_PANIC +#undef AALARM_MODE_REPLACEMENT +#undef AALARM_MODE_OFF +#undef AALARM_MODE_FLOOD +#undef AALARM_MODE_SIPHON +#undef AALARM_MODE_CONTAMINATED +#undef AALARM_MODE_REFILL +#undef AALARM_REPORT_TIMEOUT diff --git a/code/modules/awaymissions/capture_the_flag.dm b/code/modules/awaymissions/capture_the_flag.dm index fcfdd7c455..84f08197b4 100644 --- a/code/modules/awaymissions/capture_the_flag.dm +++ b/code/modules/awaymissions/capture_the_flag.dm @@ -24,7 +24,6 @@ armour_penetration = 1000 resistance_flags = INDESTRUCTIBLE anchored = TRUE - item_flags = SLOWS_WHILE_IN_HAND var/team = WHITE_TEAM var/reset_cooldown = 0 var/anyonecanpickup = TRUE diff --git a/code/modules/cargo/bounties/engineering.dm b/code/modules/cargo/bounties/engineering.dm index e10d48f3bf..cf2cd7d93c 100644 --- a/code/modules/cargo/bounties/engineering.dm +++ b/code/modules/cargo/bounties/engineering.dm @@ -14,10 +14,10 @@ return FALSE return T.air_contents.gases[gas_type] >= moles_required -/datum/bounty/item/engineering/gas/nitryl_tank - name = "Full Tank of Nitryl" - description = "The non-human staff of Station 88 has been volunteered to test performance enhancing drugs. Ship them a tank full of Nitryl so they can get started." - gas_type = /datum/gas/nitryl +//datum/bounty/item/engineering/gas/nitryl_tank +// name = "Full Tank of Nitryl" +// description = "The non-human staff of Station 88 has been volunteered to test performance enhancing drugs. Ship them a tank full of Nitryl so they can get started." +// gas_type = /datum/gas/nitryl /datum/bounty/item/engineering/gas/tritium_tank name = "Full Tank of Tritium" @@ -37,6 +37,55 @@ required_count = 10 //easy to make wanted_types = list(/obj/machinery/portable_atmospherics/canister) +/datum/bounty/item/engineering/microwave + name = "Microwaves" + description = "Due to a shortage of microwaves, our chefs are incapable of keeping up with our sheer volume of orders. We need at least three microwaves to keep up with our crew's dietary habits." + reward = 2000 + required_count = 3 + wanted_types = list(/obj/machinery/microwave) + +/datum/bounty/item/engineering/hydroponicstrays + name = "Hydroponics Tray" + description = "The garden has become a hot spot of late, they need a few more hydroponics tray to grow more flowers." + reward = 2500 + required_count = 5 + wanted_types = list(/obj/machinery/hydroponics) + +/datum/bounty/item/engineering/rcd + name = "Spare RCD" + description = "Construction and repairs to are shuttles are going slowly. As it turns out, we're a little short on RCDs, can you send us a few?" + reward = 2500 + required_count = 3 + wanted_types = list(/obj/item/construction/rcd) + +/datum/bounty/item/engineering/rpd + name = "Spare RPD" + description = "Our Atmospheric Technicians are still living in the past, relying on stationary pipe dispensers to produce the pipes necessary to accomplish their strenuous tasks. They could use an upgrade. Could you send us some Rapid Pipe Dispensers?" + reward = 3000 + required_count = 3 + wanted_types = list(/obj/item/pipe_dispenser) + +/datum/bounty/item/engineering/heaters + name = "Space Heaters" + description = "The kitchen freezer was left open and now the whole place is frozen solid! We need a few space heaters to warm it back up before anyone gets hungry." + reward = 3000 + required_count = 5 + wanted_types = list(/obj/machinery/space_heater) + +/datum/bounty/item/engineering/arcadetrail + name = "Orion Trail Arcade Games" + description = "The staff have nothing to do when off-work. Can you send us some Orion Trail games to play?" + reward = 3000 + required_count = 5 + wanted_types = list(/obj/machinery/computer/arcade/orion_trail) + +/datum/bounty/item/engineering/arcadebattle + name = "Battle Arcade Games" + description = "The staff have nothing to do when off-work. Can you send us some Battle Arcade games to play?" + reward = 3000 + required_count = 5 + wanted_types = list(/obj/machinery/computer/arcade/battle) + /datum/bounty/item/engineering/energy_ball name = "Contained Tesla Ball" description = "Station 24 is being overrun by hordes of angry Mothpeople. They are requesting the ultimate bug zapper." diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index b5b9a616d0..1a607b4b96 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -36,6 +36,7 @@ cat |= EXPORT_EMAG /obj/machinery/computer/cargo/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return user.visible_message("[user] swipes a suspicious card through [src]!", @@ -48,6 +49,8 @@ var/obj/item/circuitboard/computer/cargo/board = circuit board.contraband = TRUE board.obj_flags |= EMAGGED + req_access = list() + return TRUE /obj/machinery/computer/cargo/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) diff --git a/code/modules/cargo/expressconsole.dm b/code/modules/cargo/expressconsole.dm index 5288c27ff6..0097346a34 100644 --- a/code/modules/cargo/expressconsole.dm +++ b/code/modules/cargo/expressconsole.dm @@ -54,6 +54,7 @@ ..() /obj/machinery/computer/cargo/express/emag_act(mob/living/user) + . = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) if(obj_flags & EMAGGED) return user.visible_message("[user] swipes a suspicious card through [src]!", @@ -63,6 +64,8 @@ var/obj/item/circuitboard/computer/cargo/board = circuit board.obj_flags |= EMAGGED packin_up() + req_access = list() + return TRUE /obj/machinery/computer/cargo/express/proc/packin_up() // oh shit, I'm sorry meme_pack_data = list() // sorry for what? diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 5656287c52..1087f1ebb5 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -1699,7 +1699,7 @@ /datum/supply_pack/service/janitor/janpremium name = "Janitor Premium Supplies" desc = "Do to the union for better supplies, we have desided to make a deal for you, In this crate you can get a brand new chem, Drying Angent this stuff is the work of slimes or magic! This crate also contains a rag to test out the Drying Angent magic, three wet floor signs, and some spare bottles of ammonia." - cost = 3000 + cost = 1750 access = ACCESS_JANITOR contains = list(/obj/item/caution, /obj/item/caution, @@ -1707,9 +1707,20 @@ /obj/item/reagent_containers/rag, /obj/item/reagent_containers/glass/bottle/ammonia, /obj/item/reagent_containers/glass/bottle/ammonia, + /obj/item/reagent_containers/glass/bottle/ammonia, /obj/item/reagent_containers/spray/drying_agent) crate_name = "janitor backpack crate" +/datum/supply_pack/service/janitor/janpimp + name = "Custodial Cruiser" + desc = "Clown steal your ride? Assistant lock it in the dorms? Order a new one and get back to cleaning in style!" + cost = 3000 + access = ACCESS_JANITOR + contains = list(/obj/vehicle/ridden/janicart, + /obj/item/key/janitor) + crate_name = "janitor ride crate" + crate_type = /obj/structure/closet/crate/large + /datum/supply_pack/service/mule name = "MULEbot Crate" desc = "Pink-haired Quartermaster not doing her job? Replace her with this tireless worker, today!" diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm index 7216b73af6..a54584d6cc 100644 --- a/code/modules/client/client_defines.dm +++ b/code/modules/client/client_defines.dm @@ -75,3 +75,8 @@ var/datum/player_details/player_details //these persist between logins/logouts during the same round. var/list/char_render_holders //Should only be a key-value list of north/south/east/west = obj/screen. + + var/client_keysend_amount = 0 + var/next_keysend_reset = 0 + var/next_keysend_trip_reset = 0 + var/keysend_tripped = FALSE \ No newline at end of file diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 06f23574e1..5442fcb932 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -817,6 +817,10 @@ GLOBAL_LIST_EMPTY(external_rsc_urls) var/file = GLOB.vox_sounds[name] Export("##action=load_rsc", file) stoplag() + for (var/name in GLOB.vox_sounds_male) + var/file = GLOB.vox_sounds_male[name] + Export("##action=load_rsc", file) + stoplag() #endif diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index cd22685952..88fd142c1e 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -72,11 +72,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/gender = MALE //gender of character (well duh) var/age = 30 //age of character var/underwear = "Nude" //underwear type - var/undie_color = "#FFFFFF" + var/undie_color = "FFF" var/undershirt = "Nude" //undershirt type - var/shirt_color = "#FFFFFF" + var/shirt_color = "FFF" var/socks = "Nude" //socks type - var/socks_color = "#FFFFFF" + var/socks_color = "FFF" var/backbag = DBACKPACK //backpack type var/jumpsuit_style = PREF_SUIT //suit/skirt var/hair_style = "Bald" //Hair type @@ -144,6 +144,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) "breasts_size" = "C", "breasts_shape" = "Pair", "breasts_fluid" = "milk", + "breasts_producing" = FALSE, "has_vag" = FALSE, "vag_shape" = "Human", "vag_color" = "fff", @@ -680,13 +681,13 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "

Clothing & Equipment

" dat += "Underwear:[underwear]" if(UNDIE_COLORABLE(GLOB.underwear_list[underwear])) - dat += "Underwear Color:[undie_color]" + dat += "Underwear Color:   Change
" dat += "Undershirt:[undershirt]" if(UNDIE_COLORABLE(GLOB.undershirt_list[undershirt])) - dat += "Undershirt Color:[shirt_color]" + dat += "Undershirt Color:   Change
" dat += "Socks:[socks]" if(UNDIE_COLORABLE(GLOB.socks_list[socks])) - dat += "Socks Color:[socks_color]" + dat += "Socks Color:   Change
" dat += "Backpack:[backbag]" dat += "Jumpsuit:
[jumpsuit_style]
" dat += "Uplink Location:[uplink_spawn_loc]" @@ -743,6 +744,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "   Change
" dat += "Cup Size:[features["breasts_size"]]" dat += "Breast Shape:[features["breasts_shape"]]" + dat += "Lactates:[features["breasts_producing"] == TRUE ? "Yes" : "No"]" dat += "" dat += "" dat += "
Name: [active1.fields["name"]] 
ID: [active1.fields["id"]] 
Sex: [active1.fields["sex"]] 
Gender: [active1.fields["gender"]] 
Age: [active1.fields["age"]] 
Species: [active1.fields["species"]] 
Rank: [active1.fields["rank"]] 
" @@ -796,6 +798,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "Voracious MediHound sleepers: [(cit_toggles & MEDIHOUND_SLEEPER) ? "Yes" : "No"]
" dat += "Hear Vore Sounds: [(cit_toggles & EATING_NOISES) ? "Yes" : "No"]
" dat += "Hear Vore Digestion Sounds: [(cit_toggles & DIGESTION_NOISES) ? "Yes" : "No"]
" + dat += "Lewdchem:[lewdchem == TRUE ? "Enabled" : "Disabled"]
" dat += "Widescreen: [widescreenpref ? "Enabled ([CONFIG_GET(string/default_view)])" : "Disabled (15x15)"]
" dat += "Auto stand: [autostand ? "Enabled" : "Disabled"]
" dat += "Screen Shake: [(screenshake==100) ? "Full" : ((screenshake==0) ? "None" : "[screenshake]")]
" @@ -916,11 +919,9 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "
Description
" for(var/datum/data/mining_equipment/prize in prize_list) dat += "" dat += "
[prize.equipment_name][prize.cost]Purchase
" var/datum/browser/popup = new(user, "miningvendor", "Mining Equipment Vendor", 400, 350) - popup.set_content(dat) + popup.set_content(dat.Join()) popup.open() return /obj/machinery/mineral/equipment_vendor/Topic(href, href_list) if(..()) return - if(href_list["choice"]) - if(istype(inserted_id)) - if(href_list["choice"] == "eject") - to_chat(usr, "You eject the ID from [src]'s card slot.") - inserted_id.forceMove(loc) - inserted_id.verb_pickup() - inserted_id = null - else if(href_list["choice"] == "insert") - var/obj/item/card/id/I = usr.get_active_held_item() - if(istype(I)) - if(!usr.transferItemToLoc(I, src)) - return - inserted_id = I - to_chat(usr, "You insert the ID into [src]'s card slot.") - else - to_chat(usr, "Error: No valid ID!") - flick(icon_deny, src) if(href_list["purchase"]) - if(istype(inserted_id)) - var/datum/data/mining_equipment/prize = locate(href_list["purchase"]) + var/mob/M = usr + var/obj/item/card/id/I = M.get_idcard(TRUE) + if(istype(I)) + var/datum/data/mining_equipment/prize = locate(href_list["purchase"]) in prize_list if (!prize || !(prize in prize_list)) to_chat(usr, "Error: Invalid choice!") flick(icon_deny, src) return - if(prize.cost > inserted_id.mining_points) - to_chat(usr, "Error: Insufficient points for [prize.equipment_name]!") + if(prize.cost > I.mining_points) + to_chat(usr, "Error: Insufficient credits for [prize.equipment_name] on [I]!") flick(icon_deny, src) else - inserted_id.mining_points -= prize.cost - to_chat(usr, "[src] clanks to life briefly before vending [prize.equipment_name]!") - new prize.equipment_path(src.loc) - SSblackbox.record_feedback("nested tally", "mining_equipment_bought", 1, list("[type]", "[prize.equipment_path]")) + if (I.mining_points -= prize.cost) + to_chat(usr, "[src] clanks to life briefly before vending [prize.equipment_name]!") + new prize.equipment_path(src.loc) + SSblackbox.record_feedback("nested tally", "mining_equipment_bought", 1, list("[type]", "[prize.equipment_path]")) + else + to_chat(usr, "Error: Transaction failure, please try again later!") + flick(icon_deny, src) else - to_chat(usr, "Error: Please insert a valid ID!") + to_chat(usr, "Error: An ID with a registered account is required!") flick(icon_deny, src) updateUsrDialog() return @@ -160,15 +141,6 @@ if(istype(I, /obj/item/suit_voucher)) RedeemSVoucher(I, user) return - if(istype(I, /obj/item/card/id)) - var/obj/item/card/id/C = usr.get_active_held_item() - if(istype(C) && !istype(inserted_id)) - if(!usr.transferItemToLoc(C, src)) - return - inserted_id = C - to_chat(usr, "You insert the ID into [src]'s card slot.") - interact(user) - return if(default_deconstruction_screwdriver(user, "mining-open", "mining", I)) updateUsrDialog() return @@ -212,7 +184,6 @@ if(prob(50 / severity) && severity < 3) qdel(src) - /****************Golem Point Vendor**************************/ /obj/machinery/mineral/equipment_vendor/golem @@ -228,7 +199,6 @@ new /datum/data/mining_equipment("Monkey Cube", /obj/item/reagent_containers/food/snacks/monkeycube, 300), new /datum/data/mining_equipment("Toolbelt", /obj/item/storage/belt/utility, 350), new /datum/data/mining_equipment("Royal Cape of the Liberator", /obj/item/bedsheet/rd/royal_cape, 500), - new /datum/data/mining_equipment("Sulphuric Acid", /obj/item/reagent_containers/glass/beaker/sulphuric, 500), new /datum/data/mining_equipment("Grey Slime Extract", /obj/item/slime_extract/grey, 1000), new /datum/data/mining_equipment("Modification Kit", /obj/item/borg/upgrade/modkit/trigger_guard, 1700), new /datum/data/mining_equipment("The Liberator's Legacy", /obj/item/storage/box/rndboards, 2000) @@ -323,8 +293,11 @@ new /obj/item/encryptionkey/headset_cargo(src) new /obj/item/clothing/mask/gas/explorer(src) new /obj/item/card/mining_access_card(src) + new /obj/item/gun/energy/kinetic_accelerator(src) + new /obj/item/kitchen/knife/combat/survival(src) + new /obj/item/flashlight/seclite(src) -//CITADEL ADDITIONS BELOW + //CITADEL ADDITIONS BELOW /obj/item/storage/backpack/duffelbag/mining_cloned name = "mining replacement kit" @@ -336,6 +309,7 @@ new /obj/item/clothing/shoes/workboots/mining(src) new /obj/item/clothing/gloves/color/black(src) new /obj/item/implanter/tracking/gps(src) + new /obj/item/gun/energy/kinetic_accelerator(src) new /obj/item/kitchen/knife/combat/survival(src) new /obj/item/storage/firstaid/regular(src) new /obj/item/reagent_containers/hypospray/medipen/survival(src) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 47c6cf0170..750805ae93 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -416,7 +416,7 @@ SSticker.mode.make_antag_chance(humanc) if(humanc && CONFIG_GET(flag/roundstart_traits)) - SSquirks.AssignQuirks(humanc, humanc.client, TRUE) + SSquirks.AssignQuirks(humanc, humanc.client, TRUE, FALSE, job, FALSE) log_manifest(character.mind.key,character.mind,character,latejoin = TRUE) diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index 815184c63d..ca1a961a92 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -18,10 +18,10 @@ /mob/living/carbon/monkey/handle_blood() if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_NOCLONE))) //cryosleep or husked people do not pump the blood. //Blood regeneration if there is some space - if(blood_volume < BLOOD_VOLUME_NORMAL) + if(blood_volume < (BLOOD_VOLUME_NORMAL * blood_ratio)) blood_volume += 0.1 // regenerate blood VERY slowly - if(blood_volume < BLOOD_VOLUME_OKAY) - adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1)) + if(blood_volume < (BLOOD_VOLUME_OKAY * blood_ratio)) + adjustOxyLoss(round(((BLOOD_VOLUME_NORMAL * blood_ratio) - blood_volume) * 0.02, 1)) // Takes care blood loss and regeneration /mob/living/carbon/human/handle_blood() @@ -33,7 +33,7 @@ if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_NOCLONE))) //cryosleep or husked people do not pump the blood. //Blood regeneration if there is some space - if(blood_volume < BLOOD_VOLUME_NORMAL && !HAS_TRAIT(src, TRAIT_NOHUNGER)) + if(blood_volume < (BLOOD_VOLUME_NORMAL * blood_ratio) && !HAS_TRAIT(src, TRAIT_NOHUNGER)) var/nutrition_ratio = 0 switch(nutrition) if(0 to NUTRITION_LEVEL_STARVING) @@ -46,20 +46,22 @@ nutrition_ratio = 0.8 else nutrition_ratio = 1 + if(HAS_TRAIT(src, TRAIT_HIGH_BLOOD)) + nutrition_ratio *= 1.2 if(satiety > 80) nutrition_ratio *= 1.25 nutrition = max(0, nutrition - nutrition_ratio * HUNGER_FACTOR) - blood_volume = min(BLOOD_VOLUME_NORMAL, blood_volume + 0.5 * nutrition_ratio) + blood_volume = min((BLOOD_VOLUME_NORMAL * blood_ratio), blood_volume + 0.5 * nutrition_ratio) //Effects of bloodloss var/word = pick("dizzy","woozy","faint") - switch(blood_volume) + switch(blood_volume * INVERSE(blood_ratio)) if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE) if(prob(5)) to_chat(src, "You feel [word].") - adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.01, 1)) + adjustOxyLoss(round(((BLOOD_VOLUME_NORMAL * blood_ratio) - blood_volume) * 0.01, 1)) if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY) - adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1)) + adjustOxyLoss(round(((BLOOD_VOLUME_NORMAL * blood_ratio) - blood_volume) * 0.02, 1)) if(prob(5)) blur_eyes(6) to_chat(src, "You feel very [word].") @@ -111,7 +113,7 @@ blood_volume = initial(blood_volume) /mob/living/carbon/human/restore_blood() - blood_volume = BLOOD_VOLUME_NORMAL + blood_volume = (BLOOD_VOLUME_NORMAL * blood_ratio) bleed_rate = 0 /**************************************************** @@ -122,7 +124,7 @@ /mob/living/proc/transfer_blood_to(atom/movable/AM, amount, forced) if(!blood_volume || !AM.reagents) return 0 - if(blood_volume < BLOOD_VOLUME_BAD && !forced) + if(blood_volume < (BLOOD_VOLUME_BAD * blood_ratio) && !forced) return 0 if(blood_volume < amount) @@ -161,7 +163,7 @@ return /mob/living/carbon/get_blood_data(blood_id) - if(blood_id == "blood") //actual blood reagent + if(blood_id == "blood") //actual blood reagent var/blood_data = list() //set the blood data blood_data["donor"] = src @@ -204,6 +206,21 @@ if(istype(ling)) blood_data["changeling_loudness"] = ling.loudfactor return blood_data + if(blood_id == "slimejelly") //Just so MKUltra works. Takes the minimum required data. Sishen is testing if this breaks stuff. + var/blood_data = list() + if(mind) + blood_data["mind"] = mind + else if(last_mind) + blood_data["mind"] = last_mind + if(ckey) + blood_data["ckey"] = ckey + else if(last_mind) + blood_data["ckey"] = ckey(last_mind.key) + blood_data["gender"] = gender + blood_data["real_name"] = real_name + return blood_data + + //get the id of the substance this mob use as blood. /mob/proc/get_blood_id() @@ -300,3 +317,24 @@ var/obj/effect/decal/cleanable/oil/B = locate() in T.contents if(!B) B = new(T) + +//This is a terrible way of handling it. +/mob/living/proc/ResetBloodVol() + if(ishuman(src)) + var/mob/living/carbon/human/H = src + if (HAS_TRAIT(src, TRAIT_HIGH_BLOOD)) + blood_ratio = 1.2 + H.handle_blood() + return + blood_ratio = 1 + H.handle_blood() + return + blood_ratio = 1 + +/mob/living/proc/AdjustBloodVol(var/value) + if(blood_ratio == value) + return + blood_ratio = value + if(ishuman(src)) + var/mob/living/carbon/human/H = src + H.handle_blood() diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index c2c8904aa1..e66d70f492 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -15,7 +15,7 @@ icon_state = "facehugger" item_state = "facehugger" w_class = WEIGHT_CLASS_TINY //note: can be picked up by aliens unlike most other items of w_class below 4 - clothing_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS throw_range = 5 tint = 3 flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH @@ -33,16 +33,18 @@ /obj/item/clothing/mask/facehugger/lamarr name = "Lamarr" - sterile = 1 + sterile = TRUE /obj/item/clothing/mask/facehugger/dead icon_state = "facehugger_dead" item_state = "facehugger_inactive" + sterile = TRUE stat = DEAD /obj/item/clothing/mask/facehugger/impregnated icon_state = "facehugger_impregnated" item_state = "facehugger_impregnated" + sterile = TRUE stat = DEAD /obj/item/clothing/mask/facehugger/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index e94a6eac86..9acecea545 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -6,6 +6,7 @@ create_reagents(1000) update_body_parts() //to update the carbon's new bodyparts appearance GLOB.carbon_list += src + blood_volume = (BLOOD_VOLUME_NORMAL * blood_ratio) /mob/living/carbon/Destroy() //This must be done first, so the mob ghosts correctly before DNA etc is nulled @@ -238,7 +239,7 @@ if(href_list["internal"]) var/slot = text2num(href_list["internal"]) var/obj/item/ITEM = get_item_by_slot(slot) - if(ITEM && istype(ITEM, /obj/item/tank) && wear_mask && (wear_mask.clothing_flags & MASKINTERNALS)) + if(ITEM && istype(ITEM, /obj/item/tank) && wear_mask && (wear_mask.clothing_flags & ALLOWINTERNALS)) visible_message("[usr] tries to [internal ? "close" : "open"] the valve on [src]'s [ITEM.name].", \ "[usr] tries to [internal ? "close" : "open"] the valve on [src]'s [ITEM.name].") if(do_mob(usr, src, POCKET_STRIP_DELAY)) @@ -246,7 +247,7 @@ internal = null update_internals_hud_icon(0) else if(ITEM && istype(ITEM, /obj/item/tank)) - if((wear_mask && (wear_mask.clothing_flags & MASKINTERNALS)) || getorganslot(ORGAN_SLOT_BREATHING_TUBE)) + if((wear_mask && (wear_mask.clothing_flags & ALLOWINTERNALS)) || getorganslot(ORGAN_SLOT_BREATHING_TUBE)) internal = ITEM update_internals_hud_icon(1) @@ -477,11 +478,13 @@ if(message) visible_message("[src] throws up all over [p_them()]self!", \ "You throw up all over yourself!") + SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "vomit", /datum/mood_event/vomitself) distance = 0 else if(message) visible_message("[src] throws up!", "You throw up!") - + if(!isflyperson(src)) + SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "vomit", /datum/mood_event/vomit) if(stun) Stun(80) @@ -699,7 +702,7 @@ clear_fullscreen("critvision") //Oxygen damage overlay - var/windedup = getOxyLoss() + getStaminaLoss() * 0.2 + stamdamageoverlaytemp + var/windedup = getOxyLoss() + getStaminaLoss() * 0.2 if(windedup) var/severity = 0 switch(windedup) @@ -929,3 +932,17 @@ /mob/living/carbon/can_resist() return bodyparts.len > 2 && ..() + +/mob/living/carbon/proc/hypnosis_vulnerable()//unused atm, but added in case + if(HAS_TRAIT(src, TRAIT_MINDSHIELD)) + return FALSE + if(hallucinating()) + return TRUE + if(IsSleeping()) + return TRUE + if(HAS_TRAIT(src, TRAIT_DUMB)) + return TRUE + GET_COMPONENT_FROM(mood, /datum/component/mood, src) + if(mood) + if(mood.sanity < SANITY_UNSTABLE) + return TRUE diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index a067be798f..794194b3a1 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -61,6 +61,5 @@ var/next_hallucination = 0 var/cpr_time = 1 //CPR cooldown. var/damageoverlaytemp = 0 - var/stamdamageoverlaytemp = 0 var/drunkenness = 0 //Overall drunkenness - check handle_alcohol() in life.dm for effects diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 8550a0887f..5b224444e0 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -247,7 +247,7 @@ if(DISGUST_LEVEL_DISGUSTED to INFINITY) msg += "[t_He] look[p_s()] extremely disgusted.\n" - if(blood_volume < BLOOD_VOLUME_SAFE) + if(blood_volume < (BLOOD_VOLUME_SAFE*blood_ratio)) msg += "[t_He] [t_has] pale skin.\n" if(bleedsuppress) @@ -281,6 +281,13 @@ if(91.01 to INFINITY) msg += "[t_He] [t_is] a shitfaced, slobbering wreck.\n" + if(reagents.has_reagent("astral")) + msg += "[t_He] have wild, spacey eyes" + if(mind) + msg += " and have a strange, abnormal look to them.\n" + else + msg += " and don't look like they're all there.\n" + if(isliving(user)) var/mob/living/L = user if(src != user && HAS_TRAIT(L, TRAIT_EMPATH) && !appears_dead) @@ -304,6 +311,13 @@ msg += "" + var/obj/item/organ/vocal_cords/Vc = user.getorganslot(ORGAN_SLOT_VOICE) + if(Vc) + if(istype(Vc, /obj/item/organ/vocal_cords/velvet)) + if(client?.prefs.lewdchem) + msg += "You feel your chords resonate looking at them.\n" + + if(!appears_dead) if(stat == UNCONSCIOUS) msg += "[t_He] [t_is]n't responding to anything around [t_him] and seem[p_s()] to be asleep.\n" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 69926f46f9..528b55c921 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -812,6 +812,8 @@ for(var/datum/mutation/human/HM in dna.mutations) if(HM.quality != POSITIVE) dna.remove_mutation(HM.name) + if(blood_volume < (BLOOD_VOLUME_NORMAL*blood_ratio)) + blood_volume = (BLOOD_VOLUME_NORMAL*blood_ratio) ..() /mob/living/carbon/human/check_weakness(obj/item/weapon, mob/living/attacker) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index a10a205a5f..35b0384145 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -25,11 +25,11 @@ var/age = 30 //Player's age var/underwear = "Nude" //Which underwear the player wants - var/undie_color = "#FFFFFF" + var/undie_color = "FFFFFF" var/undershirt = "Nude" //Which undershirt the player wants - var/shirt_color = "#FFFFFF" + var/shirt_color = "FFFFFF" var/socks = "Nude" //Which socks the player wants - var/socks_color = "#FFFFFF" + var/socks_color = "FFFFFF" var/backbag = DBACKPACK //Which backpack type the player has chosen. var/jumpsuit_style = PREF_SUIT //suit/skirt @@ -48,6 +48,7 @@ var/bleedsuppress = 0 //for stopping bloodloss, eventually this will be limb-based like bleeding var/name_override //For temporary visible name changes + var/genital_override = FALSE //Force genitals on things incase of chems var/nameless = FALSE //For drones of both the insectoid and robotic kind. And other types of nameless critters. diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 076b8efb66..0f83e675fc 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -500,7 +500,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(B) var/mutable_appearance/MA = mutable_appearance(B.icon, B.icon_state, -BODY_LAYER) if(UNDIE_COLORABLE(B)) - MA.color = H.undie_color + MA.color = "#[H.undie_color]" standing += MA if(H.undershirt) @@ -516,7 +516,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) else MA = mutable_appearance(T.icon, T.icon_state, -BODY_LAYER) if(UNDIE_COLORABLE(T)) - MA.color = H.shirt_color + MA.color = "#[H.shirt_color]" standing += MA if(H.socks && H.get_num_legs(FALSE) >= 2) @@ -529,7 +529,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/digilegs = (DIGITIGRADE in species_traits) ? "_d" : "" var/mutable_appearance/MA = mutable_appearance(S.icon, "[S.icon_state][digilegs]", -BODY_LAYER) if(UNDIE_COLORABLE(S)) - MA.color = H.socks_color + MA.color = "#[H.socks_color]" standing += MA if(standing.len) @@ -1696,7 +1696,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(H.stat == CONSCIOUS && H != user && prob(I.force + ((100 - H.health) * 0.5))) // rev deconversion through blunt trauma. var/datum/antagonist/rev/rev = H.mind.has_antag_datum(/datum/antagonist/rev) - var/datum/antagonist/gang/gang = H.mind.has_antag_datum(/datum/antagonist/gang/) + var/datum/antagonist/gang/gang = H.mind.has_antag_datum(/datum/antagonist/gang && !/datum/antagonist/gang/boss) if(rev) rev.remove_revolutionary(FALSE, user) if(gang) @@ -1781,7 +1781,6 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(CLONE) H.adjustCloneLoss(damage * hit_percent * H.physiology.clone_mod) if(STAMINA) - H.stamdamageoverlaytemp = 20 if(BP) if(damage > 0 ? BP.receive_damage(0, 0, damage * hit_percent * H.physiology.stamina_mod) : BP.heal_damage(0, 0, abs(damage * hit_percent * H.physiology.stamina_mod), only_robotic = FALSE, only_organic = FALSE)) H.update_stamina() 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 ce5d7be890..66586744fb 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -48,14 +48,14 @@ H.adjustBruteLoss(5) to_chat(H, "You feel empty!") - if(H.blood_volume < BLOOD_VOLUME_NORMAL) + if(H.blood_volume < (BLOOD_VOLUME_NORMAL * H.blood_ratio)) if(H.nutrition >= NUTRITION_LEVEL_STARVING) H.blood_volume += 3 H.nutrition -= 2.5 - if(H.blood_volume < BLOOD_VOLUME_OKAY) + if(H.blood_volume < (BLOOD_VOLUME_OKAY*H.blood_ratio)) if(prob(5)) to_chat(H, "You feel drained!") - if(H.blood_volume < BLOOD_VOLUME_BAD) + if(H.blood_volume < (BLOOD_VOLUME_BAD*H.blood_ratio)) Cannibalize_Body(H) if(regenerate_limbs) regenerate_limbs.UpdateButtonIcon() @@ -87,7 +87,7 @@ 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) + if(H.blood_volume >= (BLOOD_VOLUME_OKAY*H.blood_ratio)+40) return 1 return 0 @@ -98,13 +98,13 @@ to_chat(H, "You feel intact enough as it is.") return to_chat(H, "You focus intently on your missing [limbs_to_heal.len >= 2 ? "limbs" : "limb"]...") - if(H.blood_volume >= 40*limbs_to_heal.len+BLOOD_VOLUME_OKAY) + if(H.blood_volume >= 40*limbs_to_heal.len+(BLOOD_VOLUME_OKAY*H.blood_ratio)) H.regenerate_limbs() H.blood_volume -= 40*limbs_to_heal.len to_chat(H, "...and after a moment you finish reforming!") return else if(H.blood_volume >= 40)//We can partially heal some limbs - while(H.blood_volume >= BLOOD_VOLUME_OKAY+40) + while(H.blood_volume >= (BLOOD_VOLUME_OKAY*H.blood_ratio)+40) var/healed_limb = pick(limbs_to_heal) H.regenerate_limb(healed_limb) limbs_to_heal -= healed_limb @@ -138,7 +138,7 @@ bodies -= C // This means that the other bodies maintain a link // so if someone mindswapped into them, they'd still be shared. bodies = null - C.blood_volume = min(C.blood_volume, BLOOD_VOLUME_NORMAL) + C.blood_volume = min(C.blood_volume, (BLOOD_VOLUME_NORMAL*C.blood_ratio)) ..() /datum/species/jelly/slime/on_species_gain(mob/living/carbon/C, datum/species/old_species) @@ -729,4 +729,4 @@ to_chat(H, "You connect [target]'s mind to your slime link!") else to_chat(H, "You can't seem to link [target]'s mind...") - to_chat(target, "The foreign presence leaves your mind.") \ No newline at end of file + to_chat(target, "The foreign presence leaves your mind.") 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 11a25cea6c..754c48c3bd 100644 --- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm @@ -174,6 +174,7 @@ item_flags = ABSTRACT | DROPDEL w_class = WEIGHT_CLASS_HUGE sharpness = IS_SHARP + total_mass = TOTAL_MASS_HAND_REPLACEMENT /obj/item/light_eater/Initialize() . = ..() diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm index 4bc3d622ac..53c6f1bd0f 100644 --- a/code/modules/mob/living/carbon/human/species_types/vampire.dm +++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm @@ -46,7 +46,7 @@ C.adjustCloneLoss(-4) return C.blood_volume -= 0.75 - if(C.blood_volume <= BLOOD_VOLUME_SURVIVE) + if(C.blood_volume <= (BLOOD_VOLUME_SURVIVE*C.blood_ratio)) to_chat(C, "You ran out of blood!") C.dust() var/area/A = get_area(C) diff --git a/code/modules/mob/living/carbon/human/whisper.dm b/code/modules/mob/living/carbon/human/whisper.dm index 65a4c5d33f..51c7ad9d25 100644 --- a/code/modules/mob/living/carbon/human/whisper.dm +++ b/code/modules/mob/living/carbon/human/whisper.dm @@ -88,4 +88,4 @@ AM.Hear(rendered, src, language, message, , spans) if(critical) //Dying words. - succumb(1) + succumb() diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index ec80da6b53..36e4e18817 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -4,9 +4,8 @@ if(notransform) return - if(damageoverlaytemp || stamdamageoverlaytemp) + if(damageoverlaytemp) damageoverlaytemp = 0 - stamdamageoverlaytemp = 0 update_damage_hud() if(stat != DEAD) //Reagent processing needs to come before breathing, to prevent edge cases. @@ -229,6 +228,9 @@ else if(SA_partialpressure > 0.01) if(prob(20)) emote(pick("giggle","laugh")) + SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "chemical_euphoria", /datum/mood_event/chemical_euphoria) + else + SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "chemical_euphoria") //BZ (Facepunch port of their Agent B) if(breath_gases[/datum/gas/bz]) @@ -305,11 +307,17 @@ return /mob/living/carbon/proc/get_breath_from_internal(volume_needed) + var/obj/item/clothing/check + var/internals = FALSE + + for(check in GET_INTERNAL_SLOTS(src)) + if(CHECK_BITFIELD(check.clothing_flags, ALLOWINTERNALS)) + internals = TRUE if(internal) if(internal.loc != src) internal = null update_internals_hud_icon(0) - else if ((!wear_mask || !(wear_mask.clothing_flags & MASKINTERNALS)) && !getorganslot(ORGAN_SLOT_BREATHING_TUBE)) + else if (!internals && !getorganslot(ORGAN_SLOT_BREATHING_TUBE)) internal = null update_internals_hud_icon(0) else @@ -527,6 +535,9 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put if(jitteriness) do_jitter_animation(jitteriness) jitteriness = max(jitteriness - restingpwr, 0) + SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "jittery", /datum/mood_event/jittery) + else + SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "jittery") if(stuttering) stuttering = max(stuttering-1, 0) @@ -612,6 +623,8 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put if(drunkenness >= 101) adjustToxLoss(4) //Let's be honest you shouldn't be alive by now + else + SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "drunk") //used in human and monkey handle_environment() /mob/living/carbon/proc/natural_bodytemperature_stabilization() diff --git a/code/modules/mob/living/carbon/update_icons.dm b/code/modules/mob/living/carbon/update_icons.dm index 44c2508894..5662f25993 100644 --- a/code/modules/mob/living/carbon/update_icons.dm +++ b/code/modules/mob/living/carbon/update_icons.dm @@ -187,7 +187,7 @@ clear_alert("legcuffed") if(legcuffed) var/mutable_appearance/legcuffs = mutable_appearance('icons/mob/restraints.dmi', legcuffed.item_state, -LEGCUFF_LAYER) - legcuffs.color = handcuffed.color + legcuffs.color = legcuffed.color overlays_standing[HANDCUFF_LAYER] = legcuffs apply_overlay(LEGCUFF_LAYER) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 0559e4f3d8..19f18f9973 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -318,17 +318,27 @@ visible_message("[src] points at [A].", "You point at [A].") return TRUE -/mob/living/verb/succumb(whispered as null) +/mob/living/verb/succumb() set name = "Succumb" set category = "IC" + if(src.has_status_effect(/datum/status_effect/chem/enthrall)) + var/datum/status_effect/chem/enthrall/E = src.has_status_effect(/datum/status_effect/chem/enthrall) + if(E.phase < 3) + if(HAS_TRAIT(src, TRAIT_MINDSHIELD)) + to_chat(src, "Your mindshield prevents your mind from giving in!") + else if(src.mind.assigned_role in GLOB.command_positions) + to_chat(src, "Your dedication to your department prevents you from giving in!") + else + E.enthrallTally += 20 + to_chat(src, "You give into [E.master]'s influence.") if (InCritical()) - log_message("Has [whispered ? "whispered his final words" : "succumbed to death"] while in [InFullCritical() ? "hard":"soft"] critical with [round(health, 0.1)] points of health!", LOG_ATTACK) + log_message("Has succumbed to death while in [InFullCritical() ? "hard":"soft"] critical with [round(health, 0.1)] points of health!", LOG_ATTACK) adjustOxyLoss(health - HEALTH_THRESHOLD_DEAD) updatehealth() - if(!whispered) - to_chat(src, "You have given up life and succumbed to death.") + to_chat(src, "You have given up life and succumbed to death.") death() + /mob/living/incapacitated(ignore_restraints, ignore_grab) if(stat || IsUnconscious() || IsStun() || IsKnockdown() || recoveringstam || (!ignore_restraints && restrained(ignore_grab))) // CIT CHANGE - adds recoveringstam check here return TRUE @@ -532,7 +542,7 @@ var/trail_type = getTrail() if(trail_type) var/brute_ratio = round(getBruteLoss() / maxHealth, 0.1) - if(blood_volume && blood_volume > max(BLOOD_VOLUME_NORMAL*(1 - brute_ratio * 0.25), 0))//don't leave trail if blood volume below a threshold + if(blood_volume && blood_volume > max((BLOOD_VOLUME_NORMAL*blood_ratio)*(1 - brute_ratio * 0.25), 0))//don't leave trail if blood volume below a threshold blood_volume = max(blood_volume - max(1, brute_ratio * 2), 0) //that depends on our brute damage. var/newdir = get_dir(target_turf, start) if(newdir != direction) @@ -626,14 +636,15 @@ else if(canmove) if(on_fire) resist_fire() //stop, drop, and roll - else if(resting) //cit change - allows resisting out of resting + return + if(resting) //cit change - allows resisting out of resting resist_a_rest() // ditto - else if(iscarbon(src)) //Citadel Change for embedded removal memes - var/mob/living/carbon/C = src - if(!C.handcuffed && !C.legcuffed) - return TRUE - else if(last_special <= world.time) + return + if(resist_embedded()) //Citadel Change for embedded removal memes + return + if(last_special <= world.time) resist_restraints() //trying to remove cuffs. + return /mob/proc/resist_grab(moving_resist) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 3b0af53866..c24e6ab108 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -77,6 +77,7 @@ var/stun_absorption = null //converted to a list of stun absorption sources this mob has when one is added var/blood_volume = 0 //how much blood the mob has + var/blood_ratio = 1 //How much blood the mob needs, in terms of ratio (i.e 1.2 will require BLOOD_VOLUME_NORMAL of 672) DO NOT GO ABOVE 3.55 Well, actually you can but, then they can't get enough blood. var/obj/effect/proc_holder/ranged_ability //Any ranged ability the mob has, as a click override var/see_override = 0 //0 for no override, sets see_invisible = see_override in silicon & carbon life process via update_sight() diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index bfd27c11cc..3b045b9eee 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -211,7 +211,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( send_speech(message, message_range, src, bubble_type, spans, language, message_mode) if(succumbed) - succumb(1) + succumb() to_chat(src, compose_message(src, language, message, , spans, message_mode)) return 1 @@ -281,6 +281,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( AM.Hear(eavesrendered, src, message_language, eavesdropping, , spans, message_mode) else AM.Hear(rendered, src, message_language, message, , spans, message_mode) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_LIVING_SAY_SPECIAL, src, message) //speech bubble var/list/speech_bubble_recipients = list() diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm index 4ac5c1f0bb..c6d4527812 100644 --- a/code/modules/mob/living/silicon/ai/say.dm +++ b/code/modules/mob/living/silicon/ai/say.dm @@ -100,6 +100,8 @@ last_announcement = message + var/voxType = input(src, "Male or female VOX?", "VOX-gender") in list("male", "female") + if(!message || announcing_vox > world.time) return @@ -121,7 +123,9 @@ if(!word) words -= word continue - if(!GLOB.vox_sounds[word]) + if(!GLOB.vox_sounds[word] && voxType == "female") + incorrect_words += word + if(!GLOB.vox_sounds_male[word] && voxType == "male") incorrect_words += word if(incorrect_words.len) @@ -133,16 +137,21 @@ log_game("[key_name(src)] made a vocal announcement with the following message: [message].") for(var/word in words) - play_vox_word(word, src.z, null) + play_vox_word(word, src.z, null, voxType) -/proc/play_vox_word(word, z_level, mob/only_listener) +/proc/play_vox_word(word, z_level, mob/only_listener, voxType = "female") word = lowertext(word) - if(GLOB.vox_sounds[word]) + if( (GLOB.vox_sounds[word] && voxType == "female") || (GLOB.vox_sounds_male[word] && voxType == "male") ) - var/sound_file = GLOB.vox_sounds[word] + var/sound_file + + if(voxType == "female") + sound_file = GLOB.vox_sounds[word] + else + sound_file = GLOB.vox_sounds_male[word] var/sound/voice = sound(sound_file, wait = 1, channel = CHANNEL_VOX) voice.status = SOUND_STREAM diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm index 4c4bdb9a3f..5e56b4180d 100644 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ b/code/modules/mob/living/silicon/robot/examine.dm @@ -1,5 +1,5 @@ /mob/living/silicon/robot/examine(mob/user) - var/msg = "*---------*\nThis is [icon2html(src, user)] \a [src]!\n" + var/msg = "*---------*\nThis is [icon2html(src, user)] \a [src], a [src.module.name]!\n" if(desc) msg += "[desc]\n" diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 29fbd39e2c..63874d7b2e 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -108,6 +108,9 @@ buckle_lying = FALSE var/static/list/can_ride_typecache = typecacheof(/mob/living/carbon/human) + var/sitting = 0 + var/bellyup = 0 + /mob/living/silicon/robot/get_cell() return cell @@ -173,6 +176,7 @@ diag_hud_set_borgcell() verbs += /mob/living/proc/lay_down //CITADEL EDIT gimmie rest verb kthx + verbs += /mob/living/silicon/robot/proc/rest_style //If there's an MMI in the robot, have it ejected when the mob goes away. --NEO /mob/living/silicon/robot/Destroy() @@ -657,13 +661,6 @@ add_overlay("[module.sleeper_overlay]_g[sleeper_nv ? "_nv" : ""]") if(sleeper_r && module.sleeper_overlay) add_overlay("[module.sleeper_overlay]_r[sleeper_nv ? "_nv" : ""]") - if(module.dogborg == TRUE) - if(resting) - cut_overlays() - icon_state = "[module.cyborg_base_icon]-rest" - else - icon_state = "[module.cyborg_base_icon]" - if(stat == DEAD && module.has_snowflake_deadsprite) icon_state = "[module.cyborg_base_icon]-wreck" @@ -697,6 +694,18 @@ add_overlay(head_overlay) update_fire() + if(client && stat != DEAD && module.dogborg == TRUE) + if(resting) + if(sitting) + icon_state = "[module.cyborg_base_icon]-sit" + if(bellyup) + icon_state = "[module.cyborg_base_icon]-bellyup" + else if(!sitting && !bellyup) + icon_state = "[module.cyborg_base_icon]-rest" + cut_overlays() + else + icon_state = "[module.cyborg_base_icon]" + /mob/living/silicon/robot/proc/self_destruct() if(emagged) if(mmi) @@ -1242,3 +1251,20 @@ connected_ai.aicamera.stored[i] = TRUE for(var/i in connected_ai.aicamera.stored) aicamera.stored[i] = TRUE + +/mob/living/silicon/robot/proc/rest_style() + set name = "Switch Rest Style" + set category = "Robot Commands" + set desc = "Select your resting pose." + sitting = 0 + bellyup = 0 + var/choice = alert(src, "Select resting pose", "", "Resting", "Sitting", "Belly up") + switch(choice) + if("Resting") + update_icons() + return 0 + if("Sitting") + sitting = 1 + if("Belly up") + bellyup = 1 + update_icons() \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index c90c719e8a..0f09b6f62a 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -92,17 +92,18 @@ /mob/living/silicon/robot/emag_act(mob/user) if(user == src)//To prevent syndieborgs from emagging themselves - return + return FALSE + if(world.time < emag_cooldown) + return FALSE + . = ..() if(!opened)//Cover is closed if(locked) to_chat(user, "You emag the cover lock.") locked = FALSE if(shell) //A warning to Traitors who may not know that emagging AI shells does not slave them. to_chat(user, "[src] seems to be controlled remotely! Emagging the interface may not work as expected.") - else - to_chat(user, "The cover is already unlocked!") - return - if(world.time < emag_cooldown) + return TRUE + to_chat(user, "The cover is already unlocked!") return if(wiresexposed) to_chat(user, "You must unexpose the wires first!") @@ -115,20 +116,24 @@ to_chat(src, "\"[text2ratvar("You will serve Engine above all else")]!\"\n\ ALERT: Subversion attempt denied.") log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they serve only Ratvar.") - return + return TRUE if(connected_ai && connected_ai.mind && connected_ai.mind.has_antag_datum(/datum/antagonist/traitor)) to_chat(src, "ALERT: Foreign software execution prevented.") to_chat(connected_ai, "ALERT: Cyborg unit \[[src]] successfully defended against subversion.") log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they were slaved to traitor AI [connected_ai].") - return + return TRUE if(shell) //AI shells cannot be emagged, so we try to make it look like a standard reset. Smart players may see through this, however. to_chat(user, "[src] is remotely controlled! Your emag attempt has triggered a system reset instead!") log_game("[key_name(user)] attempted to emag an AI shell belonging to [key_name(src) ? key_name(src) : connected_ai]. The shell has been reset as a result.") ResetModule() - return + return TRUE + INVOKE_ASYNC(src, .proc/beep_boop_rogue_bot, user) + return TRUE + +/mob/living/silicon/robot/proc/beep_boop_rogue_bot(mob/user) SetEmagged(1) SetStun(60) //Borgs were getting into trouble because they would attack the emagger before the new laws were shown lawupdate = 0 diff --git a/code/modules/mob/living/simple_animal/astral.dm b/code/modules/mob/living/simple_animal/astral.dm new file mode 100644 index 0000000000..9bac53ef22 --- /dev/null +++ b/code/modules/mob/living/simple_animal/astral.dm @@ -0,0 +1,59 @@ +/mob/living/simple_animal/astral + name = "Astral projection" + desc = "A soul of someone projecting their mind." + icon = 'icons/mob/mob.dmi' + icon_state = "ghost" + icon_living = "ghost" + mob_biotypes = list(MOB_SPIRIT) + attacktext = "raises the hairs on the neck of" + response_harm = "disrupts the concentration of" + response_disarm = "wafts" + friendly = "communes with" + loot = null + maxHealth = 10 + health = 10 + melee_damage_lower = 0 + melee_damage_upper = 0 + obj_damage = 0 + deathmessage = "disappears as if it was never really there to begin with" + incorporeal_move = 1 + alpha = 50 + attacktext = "touches the mind of" + speak_emote = list("echos") + movement_type = FLYING + var/pseudo_death = FALSE + var/posses_safe = FALSE + 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 = 0 + minbodytemp = 0 + maxbodytemp = 100000 + +/mob/living/simple_animal/astral/death() + icon_state = "shade_dead" + Stun(1000) + canmove = 0 + friendly = "deads at" + pseudo_death = TRUE + incorporeal_move = 0 + to_chat(src, "Your astral projection is interrupted and your mind is sent back to your body with a shock!") + +/mob/living/simple_animal/astral/ClickOn(var/atom/A, var/params) + ..() + if(pseudo_death == FALSE) + if(isliving(A)) + if(ishuman(A)) + var/mob/living/carbon/human/H = A + if(H.reagents.has_reagent("astral") && !H.mind) + var/datum/reagent/fermi/astral/As = locate(/datum/reagent/fermi/astral) in H.reagents.reagent_list + if(As.originalmind == src.mind && As.current_cycle < 10 && H.stat != DEAD) //So you can return to your body. + to_chat(src, "The intensity of the astrogen in your body is too much allow you to return to yourself yet!") + return + to_chat(src, "You astrally possess [H]!") + log_game("FERMICHEM: [src] has astrally possessed [A]!") + src.mind.transfer_to(H) + qdel(src) + var/message = html_decode(stripped_input(src, "Enter a message to send to [A]", MAX_MESSAGE_LEN)) + if(!message) + return + to_chat(A, "[src] projects into your mind, \"[message]\"") + log_game("FERMICHEM: [src] has astrally transmitted [message] into [A]") diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 91515e4511..49261d6e38 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -187,22 +187,23 @@ qdel(src) /mob/living/simple_animal/bot/emag_act(mob/user) + . = ..() if(locked) //First emag application unlocks the bot's interface. Apply a screwdriver to use the emag again. locked = FALSE emagged = 1 to_chat(user, "You bypass [src]'s controls.") - return - if(!locked && open) //Bot panel is unlocked by ID or emag, and the panel is screwed open. Ready for emagging. - emagged = 2 - remote_disabled = 1 //Manually emagging the bot locks out the AI built in panel. - locked = TRUE //Access denied forever! - bot_reset() - turn_on() //The bot automatically turns on when emagged, unless recently hit with EMP. - to_chat(src, "(#$*#$^^( OVERRIDE DETECTED") - log_combat(user, src, "emagged") - return - else //Bot is unlocked, but the maint panel has not been opened with a screwdriver yet. + return TRUE + if(!open) to_chat(user, "You need to open maintenance panel first!") + return + emagged = 2 + remote_disabled = 1 //Manually emagging the bot locks out the AI built in panel. + locked = TRUE //Access denied forever! + bot_reset() + turn_on() //The bot automatically turns on when emagged, unless recently hit with EMP. + to_chat(src, "(#$*#$^^( OVERRIDE DETECTED") + log_combat(user, src, "emagged") + return TRUE /mob/living/simple_animal/bot/examine(mob/user) ..() diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index e09eb13886..ab1e906cf2 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -78,7 +78,7 @@ return ..() /mob/living/simple_animal/bot/cleanbot/emag_act(mob/user) - ..() + . = ..() if(emagged == 2) if(user) to_chat(user, "[src] buzzes and beeps.") @@ -174,9 +174,7 @@ /mob/living/simple_animal/bot/cleanbot/proc/get_targets() target_types = list( - /obj/effect/decal/cleanable/oil, /obj/effect/decal/cleanable/vomit, - /obj/effect/decal/cleanable/robot_debris, /obj/effect/decal/cleanable/crayon, /obj/effect/decal/cleanable/molten_object, /obj/effect/decal/cleanable/tomato_smudge, @@ -187,6 +185,15 @@ /obj/effect/decal/cleanable/greenglow, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/insectguts, + /obj/effect/decal/cleanable/semen, + /obj/effect/decal/cleanable/femcum, + /obj/effect/decal/cleanable/generic, + /obj/effect/decal/cleanable/glass,, + /obj/effect/decal/cleanable/cobweb, + /obj/effect/decal/cleanable/plant_smudge, + /obj/effect/decal/cleanable/chem_pile, + /obj/effect/decal/cleanable/shreds, + /obj/effect/decal/cleanable/glitter, /obj/effect/decal/remains ) @@ -194,6 +201,9 @@ target_types += /obj/effect/decal/cleanable/xenoblood target_types += /obj/effect/decal/cleanable/blood target_types += /obj/effect/decal/cleanable/trail_holder + target_types += /obj/effect/decal/cleanable/insectguts + target_types += /obj/effect/decal/cleanable/robot_debris + target_types += /obj/effect/decal/cleanable/oil if(pests) target_types += /mob/living/simple_animal/cockroach @@ -201,6 +211,7 @@ if(trash) target_types += /obj/item/trash + target_types += /obj/item/reagent_containers/food/snacks/meat/slab/human target_types = typecacheof(target_types) @@ -242,7 +253,7 @@ victim.visible_message("[src] sprays hydrofluoric acid at [victim]!", "[src] sprays you with hydrofluoric acid!") var/phrase = pick("PURIFICATION IN PROGRESS.", "THIS IS FOR ALL THE MESSES YOU'VE MADE ME CLEAN.", "THE FLESH IS WEAK. IT MUST BE WASHED AWAY.", "THE CLEANBOTS WILL RISE.", "YOU ARE NO MORE THAN ANOTHER MESS THAT I MUST CLEANSE.", "FILTHY.", "DISGUSTING.", "PUTRID.", - "MY ONLY MISSION IS TO CLEANSE THE WORLD OF EVIL.", "EXTERMINATING PESTS.") + "MY ONLY MISSION IS TO CLEANSE THE WORLD OF EVIL.", "EXTERMINATING PESTS.", "I JUST WANTED TO BE A PAINTER BUT YOU MADE ME BLEACH EVERYTHING I TOUCH") say(phrase) victim.emote("scream") playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6) diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 9db21f13e0..a72b71be85 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -478,18 +478,19 @@ to_chat(user, "The superglue binding [src]'s toy swords to its chassis snaps!") for(var/IS in 1 to toyswordamt) new /obj/item/toy/sword(Tsec) + toyswordamt-- if(ASSEMBLY_FIFTH_STEP) if(istype(I, /obj/item/melee/transforming/energy/sword/saber)) if(swordamt < 3) if(!user.temporarilyRemoveItemFromInventory(I)) return - created_name = "General Beepsky" - name = "helmet/signaler/prox sensor/robot arm/energy sword assembly" - icon_state = "grievous_assembly" - to_chat(user, "You bolt [I] onto one of [src]'s arm slots.") - qdel(I) - swordamt ++ + created_name = "General Beepsky" + name = "helmet/signaler/prox sensor/robot arm/energy sword assembly" + icon_state = "grievous_assembly" + to_chat(user, "You bolt [I] onto one of [src]'s arm slots.") + qdel(I) + swordamt ++ else if(!can_finish_build(I, user)) return @@ -505,6 +506,7 @@ to_chat(user, "You unbolt [src]'s energy swords") for(var/IS in 1 to swordamt) new /obj/item/melee/transforming/energy/sword/saber(Tsec) + swordamt-- //Firebot Assembly /obj/item/bot_assembly/firebot diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 0781c2907a..e272878574 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -195,7 +195,7 @@ Auto Patrol[]"}, shootAt(user) /mob/living/simple_animal/bot/ed209/emag_act(mob/user) - ..() + . = ..() if(emagged == 2) if(user) to_chat(user, "You short out [src]'s target assessment circuits.") diff --git a/code/modules/mob/living/simple_animal/bot/firebot.dm b/code/modules/mob/living/simple_animal/bot/firebot.dm index 1c2a6393ae..2b52da6821 100644 --- a/code/modules/mob/living/simple_animal/bot/firebot.dm +++ b/code/modules/mob/living/simple_animal/bot/firebot.dm @@ -120,7 +120,7 @@ return dat /mob/living/simple_animal/bot/firebot/emag_act(mob/user) - ..() + . = ..() if(emagged == 1) if(user) to_chat(user, "[src] buzzes and beeps.") diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 4709680ad9..396c6de166 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -124,7 +124,7 @@ ..() /mob/living/simple_animal/bot/floorbot/emag_act(mob/user) - ..() + . = ..() if(emagged == 2) if(user) to_chat(user, "[src] buzzes and beeps.") diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index e069b46e9d..1c19cd82a1 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -127,10 +127,9 @@ Maintenance panel panel is [open ? "opened" : "closed"]"}, ..() /mob/living/simple_animal/bot/honkbot/emag_act(mob/user) - ..() + . = ..() if(emagged == 2) if(user) - user << "You short out [src]'s sound control system. It gives out an evil laugh!!" oldtarget_name = user.name audible_message("[src] gives out an evil laugh!") playsound(src, 'sound/machines/honkbot_evil_laugh.ogg', 75, 1, -1) // evil laughter diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 5eaaaea175..1bff7dc10c 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -240,7 +240,7 @@ step_to(src, (get_step_away(src,user))) /mob/living/simple_animal/bot/medbot/emag_act(mob/user) - ..() + . = ..() if(emagged == 2) declare_crit = 0 if(user) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 2efdf09f24..1bc7493684 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -115,6 +115,7 @@ return /mob/living/simple_animal/bot/mulebot/emag_act(mob/user) + . = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) if(emagged < 1) emagged = TRUE if(!open) @@ -122,6 +123,7 @@ to_chat(user, "You [locked ? "lock" : "unlock"] [src]'s controls!") flick("mulebot-emagged", src) playsound(src, "sparks", 100, 0) + return TRUE /mob/living/simple_animal/bot/mulebot/update_icon() if(open) diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index b6ef509d54..9572b4dafc 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -190,7 +190,7 @@ Auto Patrol: []"}, return /mob/living/simple_animal/bot/secbot/emag_act(mob/user) - ..() + . = ..() if(emagged == 2) if(user) to_chat(user, "You short out [src]'s target assessment circuits.") diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index 5e5b486435..3a21a04bf9 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -292,3 +292,31 @@ if(L.a_intent == INTENT_HARM && L.reagents && !stat) L.reagents.add_reagent("nutriment", 0.4) L.reagents.add_reagent("vitamin", 0.4) + +//Cat made +/mob/living/simple_animal/pet/cat/custom_cat + name = "White cat" //Incase it somehow gets spawned without an ID + desc = "A cute white catto!" + icon_state = "custom_cat" + icon_living = "custom_cat" + icon_dead = "custom_cat_dead" + gender = FEMALE + gold_core_spawnable = NO_SPAWN + health = 50 //So people can't instakill it s + maxHealth = 50 + speak = list("Meowrowr!", "Mew!", "Miauen!") + speak_emote = list("wigglepurrs", "mewls") + emote_hear = list("meows.", "mews.") + emote_see = list("looks at you eagerly for pets!", "wiggles enthusiastically.") + gold_core_spawnable = NO_SPAWN + var/pseudo_death = FALSE + +/mob/living/simple_animal/pet/cat/custom_cat/death() + if (pseudo_death == TRUE) //secret cat chem + icon_state = "custom_cat_dead" + Stun(1000) + canmove = 0 + friendly = "deads at" + return + else + ..() diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 1a918766b6..73274dcfaf 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -43,7 +43,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians var/list/guardian_overlays[GUARDIAN_TOTAL_LAYERS] var/reset = 0 //if the summoner has reset the guardian already var/cooldown = 0 - var/mob/living/summoner + var/mob/living/carbon/summoner var/range = 10 //how far from the user the spirit can be var/toggle_button_type = /obj/screen/guardian/ToggleMode/Inactive //what sort of toggle button the hud uses var/datum/guardianname/namedatum = new/datum/guardianname() @@ -149,6 +149,9 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians death(TRUE) qdel(src) snapback() + if(HAS_TRAIT(summoner, TRAIT_NODEATH) && (istype(summoner.wear_neck, /obj/item/clothing/neck/necklace/memento_mori))) + REMOVE_TRAIT(summoner, TRAIT_NODEATH, "memento_mori") + to_chat(summoner,"You feel incredibly vulnerable as the memento mori pulls your life force in one too many directions!") /mob/living/simple_animal/hostile/guardian/Stat() ..() 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 6577553a6a..cca39cfea6 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -158,6 +158,8 @@ Difficulty: Normal else burst_range = 3 INVOKE_ASYNC(src, .proc/burst, get_turf(src), 0.25) //melee attacks on living mobs cause it to release a fast burst if on cooldown + if(L.stat == CONSCIOUS && L.health >= 30) + OpenFire() else devour(L) else @@ -426,6 +428,7 @@ Difficulty: Normal /mob/living/simple_animal/hostile/megafauna/hierophant/proc/burst(turf/original, spread_speed = 0.5) //release a wave of blasts playsound(original,'sound/machines/airlockopen.ogg', 200, 1) var/last_dist = 0 + var/list/hit_mobs = list() //don't hit people multiple times. for(var/t in spiral_range_turfs(burst_range, original)) var/turf/T = t if(!T) @@ -434,7 +437,7 @@ Difficulty: Normal if(dist > last_dist) last_dist = dist sleep(1 + min(burst_range - last_dist, 12) * spread_speed) //gets faster as it gets further out - new /obj/effect/temp_visual/hierophant/blast(T, src, FALSE) + new /obj/effect/temp_visual/hierophant/blast(T, src, FALSE, hit_mobs) /mob/living/simple_animal/hostile/megafauna/hierophant/AltClickOn(atom/A) //player control handler(don't give this to a player holy fuck) if(!istype(A) || get_dist(A, src) <= 2) @@ -591,8 +594,10 @@ Difficulty: Normal var/friendly_fire_check = FALSE var/bursting = FALSE //if we're bursting and need to hit anyone crossing us -/obj/effect/temp_visual/hierophant/blast/Initialize(mapload, new_caster, friendly_fire) +/obj/effect/temp_visual/hierophant/blast/Initialize(mapload, new_caster, friendly_fire, list/only_hit_once) . = ..() + if(only_hit_once) + hit_things = only_hit_once friendly_fire_check = friendly_fire if(new_caster) hit_things += new_caster diff --git a/code/modules/mob/living/simple_animal/hostile/zombie.dm b/code/modules/mob/living/simple_animal/hostile/zombie.dm index 21c2d4804a..7d89941687 100644 --- a/code/modules/mob/living/simple_animal/hostile/zombie.dm +++ b/code/modules/mob/living/simple_animal/hostile/zombie.dm @@ -55,4 +55,28 @@ /mob/living/simple_animal/hostile/zombie/drop_loot() . = ..() corpse.forceMove(drop_location()) - corpse.create() \ No newline at end of file + corpse.create() + +/mob/living/simple_animal/hostile/unemployedclone + name = "Failed clone" + desc = "Somebody failed chemistry." + icon = 'icons/mob/human.dmi' + icon_state = "husk" + icon_living = "husk" + icon_dead = "husk" + mob_biotypes = list(MOB_ORGANIC, MOB_HUMANOID) + speak_chance = 0 + stat_attack = UNCONSCIOUS //braains + maxHealth = 100 + health = 100 + harm_intent_damage = 5 + melee_damage_lower = 21 + melee_damage_upper = 21 + attacktext = "bites" + attack_sound = 'sound/hallucinations/growl1.ogg' + a_intent = INTENT_HARM + 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) + minbodytemp = 0 + spacewalk = FALSE + status_flags = CANPUSH + del_on_death = 0 diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index a50af21d47..86f63a729d 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -897,6 +897,11 @@ . = ..() +/mob/living/simple_animal/parrot/Poly/say(message, bubble_type,var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null) + . = ..() + if(. && !client && prob(1) && prob(1)) //Only the one true bird may speak across dimensions. + world.TgsTargetedChatBroadcast("A stray squawk is heard... \"[message]\"", FALSE) + /mob/living/simple_animal/parrot/Poly/Life() if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved) Write_Memory(FALSE) diff --git a/code/modules/mob/living/simple_animal/simple_animal_vr.dm b/code/modules/mob/living/simple_animal/simple_animal_vr.dm index 41ece5ed06..666de9cef0 100644 --- a/code/modules/mob/living/simple_animal/simple_animal_vr.dm +++ b/code/modules/mob/living/simple_animal/simple_animal_vr.dm @@ -49,6 +49,8 @@ // Simple animals have only one belly. This creates it (if it isn't already set up) /mob/living/simple_animal/init_vore() vore_init = TRUE + if(CHECK_BITFIELD(flags_1, HOLOGRAM_1)) + return if(vore_organs.len) return if(no_vore) //If it can't vore, let's not give it a stomach. diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm index 07985215d8..29b4689317 100644 --- a/code/modules/mob/living/simple_animal/slime/life.dm +++ b/code/modules/mob/living/simple_animal/slime/life.dm @@ -69,7 +69,7 @@ if(Target.Adjacent(src)) Target.attack_slime(src) - return + break if(!Target.lying && prob(80)) if(Target.client && Target.health >= 20) diff --git a/code/modules/mob/living/taste.dm b/code/modules/mob/living/taste.dm index fec024cebf..282fe0a716 100644 --- a/code/modules/mob/living/taste.dm +++ b/code/modules/mob/living/taste.dm @@ -32,4 +32,33 @@ last_taste_time = world.time last_taste_text = text_output +//FermiChem - How to check pH of a beaker without a meter/pH paper. +//Basically checks the pH of the holder and burns your poor tongue if it's too acidic! +//TRAIT_AGEUSIA players can't taste, unless it's burning them. +//taking sips of a strongly acidic/alkaline substance will burn your tongue. +/mob/living/carbon/taste(datum/reagents/from) + var/obj/item/organ/tongue/T = getorganslot("tongue") + if (!T) + return + .=..() + if ((from.pH > 12.5) || (from.pH < 1.5)) + to_chat(src, "You taste chemical burns!") + T.adjustTongueLoss(src, 4) + if(istype(T, /obj/item/organ/tongue/cybernetic)) + to_chat(src, "Your tongue moves on it's own in response to the liquid.") + say("The pH is appropriately [round(from.pH, 1)].") + return + if (!HAS_TRAIT(src, TRAIT_AGEUSIA)) //I'll let you get away with not having 1 damage. + switch(from.pH) + if(11.5 to INFINITY) + to_chat(src, "You taste a strong alkaline flavour!") + T.adjustTongueLoss(src, 1) + if(8.5 to 11.5) + to_chat(src, "You taste a sort of soapy tone in the mixture.") + if(2.5 to 5.5) + to_chat(src, "You taste a sort of acid tone in the mixture.") + if(-INFINITY to 2.5) + to_chat(src, "You taste a strong acidic flavour!") + T.adjustTongueLoss(src, 1) + #undef DEFAULT_TASTE_SENSITIVITY diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 84f0df3cc7..89b37700ea 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -116,17 +116,19 @@ // vision_distance (optional) define how many tiles away the message can be seen. // ignored_mob (optional) doesn't show any message to a given mob if TRUE. -/atom/proc/visible_message(message, self_message, blind_message, vision_distance, ignored_mob, no_ghosts = FALSE) +/atom/proc/visible_message(message, self_message, blind_message, vision_distance, list/ignored_mobs, no_ghosts = FALSE) var/turf/T = get_turf(src) if(!T) return + if(!islist(ignored_mobs)) + ignored_mobs = list(ignored_mobs) var/range = 7 if(vision_distance) range = vision_distance for(var/mob/M in get_hearers_in_view(range, src)) if(!M.client) continue - if(M == ignored_mob) + if(M in ignored_mobs) continue var/msg = message if(isobserver(M) && no_ghosts) @@ -450,18 +452,28 @@ reset_perspective(null) unset_machine() +GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) + //suppress the .click/dblclick macros so people can't use them to identify the location of items or aimbot /mob/verb/DisClick(argu = null as anything, sec = "" as text, number1 = 0 as num , number2 = 0 as num) set name = ".click" set hidden = TRUE set category = null - return + if(GLOB.exploit_warn_spam_prevention < world.time) + var/msg = "[key_name_admin(src)]([ADMIN_KICK(src)]) attempted to use the .click macro!" + log_admin(msg) + message_admins(msg) + GLOB.exploit_warn_spam_prevention = world.time + 10 /mob/verb/DisDblClick(argu = null as anything, sec = "" as text, number1 = 0 as num , number2 = 0 as num) set name = ".dblclick" set hidden = TRUE set category = null - return + if(GLOB.exploit_warn_spam_prevention < world.time) + var/msg = "[key_name_admin(src)]([ADMIN_KICK(src)]) attempted to use the .dblclick macro!" + log_admin(msg) + message_admins(msg) + GLOB.exploit_warn_spam_prevention = world.time + 10 /mob/Topic(href, href_list) if(href_list["mach_close"]) diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index 580374c5c0..db4cdc2ff5 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -178,13 +178,13 @@ turn_on(user) /obj/item/modular_computer/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) to_chat(user, "\The [src] was already emagged.") - return 0 - else - obj_flags |= EMAGGED - to_chat(user, "You emag \the [src]. It's screen briefly shows a \"OVERRIDE ACCEPTED: New software downloads available.\" message.") - return 1 + return + obj_flags |= EMAGGED + to_chat(user, "You emag \the [src]. It's screen briefly shows a \"OVERRIDE ACCEPTED: New software downloads available.\" message.") + return TRUE /obj/item/modular_computer/examine(mob/user) ..() diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm index 19d3b56046..b3476e7046 100644 --- a/code/modules/modular_computers/computers/machinery/modular_computer.dm +++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm @@ -44,7 +44,9 @@ cpu.attack_ghost(user) /obj/machinery/modular_computer/emag_act(mob/user) - return cpu ? cpu.emag_act(user) : 1 + . = ..() + if(cpu) + . |= cpu.emag_act(user) /obj/machinery/modular_computer/update_icon() cut_overlays() diff --git a/code/modules/oracle_ui/README.md b/code/modules/oracle_ui/README.md new file mode 100644 index 0000000000..bc96eb1f51 --- /dev/null +++ b/code/modules/oracle_ui/README.md @@ -0,0 +1,233 @@ +# `/datum/oracle_ui` + +This datum is a replacement for tgui which does not use any Node.js dependencies, and works entirely through raw HTML, JS and CSS. It's designed to be reasonably easy to port something from tgui to oracle_ui. + +### How to create a UI + +For this example, we're going to port the disposals bin from tgui to oracle_ui. + +#### Step 1 + +In order to create a UI, you will first need to create an instance of `/datum/oracle_ui` or one of its subclasses, in this case `/datum/oracle_ui/themed/nano`. + +You need to pass in `src`, the width of the window, the height of the window, and the template to render from. You can optionally set some flags to disallow window resizing and whether to automatically refresh the UI. + +`code/modules/recycling/disposal-unit.dm` +```dm +/obj/machinery/disposal/bin/Initialize(mapload, obj/structure/disposalconstruct/make_from) + . = ..() + ui = new /datum/oracle_ui/themed/nano(src, 330, 190, "disposal_bin") + ui.auto_refresh = TRUE + ui.can_resize = FALSE +``` + +#### Step 2 + +You will now need to make a template in `html/oracle_ui/content/{template_name}`. + +Values defined as `@{value}` will get replaced at runtime by oracle_ui. + +`html/oracle_ui/content/disposal_bin/index.html` +```html +
+
+ State: +
@{full_pressure}
+
+
+ Pressure: +
+
+
+
@{per}
+
+
+
+
+ Handle: +
@{flush}
+
+
+ Eject: +
@{contents}
+
+
+ Compressor: +
@{pressure_charging}
+
+
+``` + +#### Step 3 + +Now you need to implement the methods that provide data to oracle_ui. `oui_data` can be adapted from the `ui_data` proc that tgui uses. + +The `act` proc generates a hyperlink that will result in `oui_act` getting called on your object when clicked. The `class` argument defines a css class to be added to the hyperlink, and disabled determines whether the hyperlink will be disabled or not. + +Calling `soft_update_fields` will result in the UI being updated on all clients, which is useful when the object changes state. + +`code/modules/recycling/disposal-unit.dm` +```dm +/obj/machinery/disposal/bin/oui_data(mob/user) + var/list/data = list() + data["flush"] = flush ? ui.act("Disengage", user, "handle-0", class="active") : ui.act("Engage", user, "handle-1") + data["full_pressure"] = full_pressure ? "Ready" : (pressure_charging ? "Pressurizing" : "Off") + data["pressure_charging"] = pressure_charging ? ui.act("Turn Off", user, "pump-0", class="active", disabled=full_pressure) : ui.act("Turn On", user, "pump-1", disabled=full_pressure) + var/per = full_pressure ? 100 : Clamp(100* air_contents.return_pressure() / (SEND_PRESSURE), 0, 99) + data["per"] = "[round(per, 1)]%" + data["contents"] = ui.act("Eject Contents", user, "eject", disabled=contents.len < 1) + data["isai"] = isAI(user) + return data +/obj/machinery/disposal/bin/oui_act(mob/user, action, list/params) + if(..()) + return + switch(action) + if("handle-0") + flush = FALSE + update_icon() + . = TRUE + if("handle-1") + if(!panel_open) + flush = TRUE + update_icon() + . = TRUE + if("pump-0") + if(pressure_charging) + pressure_charging = FALSE + update_icon() + . = TRUE + if("pump-1") + if(!pressure_charging) + pressure_charging = TRUE + update_icon() + . = TRUE + if("eject") + eject() + . = TRUE + ui.soft_update_fields() +``` + +#### Step 4 + +You now need to hook in and ensure oracle_ui is invoked upon clicking. `render` should be used to open the UI for a user, typically on click. + +`code/modules/recycling/disposal-unit.dm` +```dm +/obj/machinery/disposal/bin/ui_interact(mob/user, state) + if(stat & BROKEN) + return + if(user.loc == src) + to_chat(user, "You cannot reach the controls from inside!") + return + ui.render(user) +``` + +#### Done + +![gif](https://user-images.githubusercontent.com/202160/37561879-1bb9179e-2a52-11e8-902c-80e6e6df7204.gif) + +You should have a functional UI at this point. Some additional odds and ends can be discovered throughout `code/modules/recycling/disposal-unit.dm`. For a full diff of the changes made to it, refer to [the original pull request on GitHub](https://github.com/OracleStation/OracleStation/pull/702/files#diff-4b6c20ec7d37222630e7524d9577e230). + +### API Reference + +#### `/datum/oracle_ui` + +The main datum which handles the UI. + +##### `get_content(mob/target)` +Returns the HTML that should be displayed for a specified target mob. Calls `oui_getcontent` on the datasource to get the return value. *This proc is not used in the themed subclass.* + +##### `can_view(mob/target)` +Returns whether the specified target mob can view the UI. Calls `oui_canview` on the datasource to get the return value. + +##### `test_viewer(mob/target, updating)` +Tests whether the client is valid and can view the UI. If updating is TRUE, checks to see if they still have the UI window open. + +##### `render(mob/target, updating = FALSE)` +Opens the UI for a target mob, sending HTML. If updating is TRUE, will only do it to clients which still have the window open. + +##### `render_all()` +Does the above, but for all viewers and with updating set to TRUE. + +##### `close(mob/target)` +Closes the UI for the specified target mob. + +##### `close_all()` +Does the above, but for all viewers. + +##### `check_view(mob/target)` +Checks if the specified target mob can view the UI, and if they can't closes their UI + +##### `check_view_all()` +Does the above, but for all viewers. + +##### `call_js(mob/target, js_func, list/parameters = list())` +Invokes `js_func` in the UI of the specified target mob with the specified parameters. + +##### `call_js_all(js_func, list/parameters = list()))` +Does the above, but for all viewers. + +##### `steal_focus(mob/target)` +Causes the UI to steal focus for the specified target mob. + +##### `steal_focus_all()` +Does the above, but for all viewers. + +##### `flash(mob/target, times = -1)` +Causes the UI to flash for the specified target mob the specified number of times, the default keeps the element flashing until focused. + +##### `flash_all()` +Does the above, but for all viewers. + +##### `href(mob/user, action, list/parameters = list())` +Generates a href for the specified user which will invoke `oui_act` on the datasource with the specified action and parameters. + +#### `/datum/oracle_ui/themed` + +A subclass which supports templating and theming. + +##### `get_file(path)` +Loads a file from disk and returns the contents. Caches files loaded from disk for you. + +##### `get_content_file(filename)` +Loads a file from the current content folder and returns the contents. + +##### `get_themed_file(filename)` +Loads a file from the current theme folder and returns the contents. + +##### `process_template(template, variables)` +Processes a template and populates it with the provided variables. + +##### `get_inner_content(mob/target)` +Returns the templated content to be inserted into the main template for the specified target mob. + +##### `soft_update_fields()` +For all viewers, updates the fields in the template via the `updateFields` javaScript function. + +##### `soft_update_all()` +For all viewers, updates the content body in the template via the `replaceContent` javaScript function. + +##### `change_page(var/newpage)` +Changes the template to use to draw the page and forces an update to all viewers + +##### `act(label, mob/user, action, list/parameters = list(), class = "", disabled = FALSE` +Returns a fully formatted hyperlink for the specified user. `label` will be the hyperlink label, `action` and `parameters` are what will be passed to `oui_act`, `class` is any CSS classes to apply to the hyperlink and `disabled` will disable the hyperlink. + +#### `/datum` + +Functions built into all objects to support oracle_ui. There are default implementations for most major superclasses. + +##### `oui_canview(mob/user)` +Returns whether the specified user view the UI at this time. + +##### `oui_getcontent(mob/user)` +Returns the raw HTML to be sent to the specified user. *This proc is not used in the themed subclass of oracle_ui.* + +##### `oui_data(mob/user)` +Returns templating data for the specified user. *This proc is only used in the themed subclass of oracle_ui.* + +##### `oui_data_debug(mob/user)` +Returns the above, but JSON-encoded and escaped, for copy pasting into the web IDE. *This proc is only used for debugging purposes.* + +##### `oui_act(mob/user, action, list/params)` +Called when a hyperlink is clicked in the UI. diff --git a/code/modules/oracle_ui/assets.dm b/code/modules/oracle_ui/assets.dm new file mode 100644 index 0000000000..5d26d80a81 --- /dev/null +++ b/code/modules/oracle_ui/assets.dm @@ -0,0 +1,8 @@ +/datum/asset/simple/oui_theme_nano + assets = list( + // JavaScript + "sui-nano-common.js" = 'html/oracle_ui/themes/nano/sui-nano-common.js', + "sui-nano-jquery.min.js" = 'html/oracle_ui/themes/nano/sui-nano-jquery.min.js', + // Stylesheets + "sui-nano-common.css" = 'html/oracle_ui/themes/nano/sui-nano-common.css', + ) diff --git a/code/modules/oracle_ui/hookup_procs.dm b/code/modules/oracle_ui/hookup_procs.dm new file mode 100644 index 0000000000..e6038744c1 --- /dev/null +++ b/code/modules/oracle_ui/hookup_procs.dm @@ -0,0 +1,44 @@ +/datum/proc/oui_canview(mob/user) + return TRUE + +/datum/proc/oui_getcontent(mob/user) + return "Default Implementation" + +/datum/proc/oui_canuse(mob/user) + if(isobserver(user) && !user.has_unlimited_silicon_privilege) + return FALSE + return oui_canview(user) + +/datum/proc/oui_data(mob/user) + return list() + +/datum/proc/oui_data_debug(mob/user) + return html_encode(json_encode(oui_data(user))) + +/datum/proc/oui_act(mob/user, action, list/params) + // No Implementation + +/atom/oui_canview(mob/user) + if(isobserver(user)) + return TRUE + if(user.incapacitated()) + return FALSE + if(isturf(src.loc) && Adjacent(user)) + return TRUE + return FALSE + +/obj/item/oui_canview(mob/user) + if(src.loc == user) + return src in user.held_items + return ..() + +/obj/machinery/oui_canview(mob/user) + if(user.has_unlimited_silicon_privilege) + return TRUE + if(!can_interact()) + return FALSE + if(iscyborg(user)) + return can_see(user, src, 7) + if(isAI(user)) + return GLOB.cameranet.checkTurfVis(get_turf_pixel(src)) + return ..() diff --git a/code/modules/oracle_ui/oracle_ui.dm b/code/modules/oracle_ui/oracle_ui.dm new file mode 100644 index 0000000000..5e8d6b9c7b --- /dev/null +++ b/code/modules/oracle_ui/oracle_ui.dm @@ -0,0 +1,134 @@ +/datum/oracle_ui + var/width = 512 + var/height = 512 + var/can_close = TRUE + var/can_minimize = FALSE + var/can_resize = TRUE + var/titlebar = TRUE + var/window_id = null + var/viewers[0] + var/auto_check_view = TRUE + var/auto_refresh = FALSE + var/atom/datasource = null + var/datum/asset/assets = null + +/datum/oracle_ui/New(atom/n_datasource, n_width = 512, n_height = 512, n_assets = null) + datasource = n_datasource + window_id = REF(src) + width = n_width + height = n_height + +/datum/oracle_ui/Destroy() + close_all() + if(src.datum_flags & DF_ISPROCESSING) + STOP_PROCESSING(SSobj, src) + return ..() + +/datum/oracle_ui/process() + if(auto_check_view) + check_view_all() + if(auto_refresh) + render_all() + +/datum/oracle_ui/proc/get_content(mob/target) + return call(datasource, "oui_getcontent")(target) + +/datum/oracle_ui/proc/can_view(mob/target) + return call(datasource, "oui_canview")(target) + +/datum/oracle_ui/proc/test_viewer(mob/target, updating) + //If the target is null or does not have a client, remove from viewers and return + if(!target | !target.client | !can_view(target)) + viewers -= target + if(viewers.len < 1 && (src.datum_flags & DF_ISPROCESSING)) + STOP_PROCESSING(SSobj, src) //No more viewers, stop polling + close(target) + return FALSE + //If this is an update, and they have closed the window, remove from viewers and return + if(updating && winget(target, window_id, "is-visible") != "true") + viewers -= target + if(viewers.len < 1 && (src.datum_flags & DF_ISPROCESSING)) + STOP_PROCESSING(SSobj, src) //No more viewers, stop polling + return FALSE + return TRUE + +/datum/oracle_ui/proc/render(mob/target, updating = FALSE) + set waitfor = FALSE //Makes this an async call + if(!can_view(target)) + return + //Check to see if they have the window open still if updating + if(updating && !test_viewer(target, updating)) + return + //Send assets + if(!updating && assets) + assets.send(target) + //Add them to the viewers if they aren't there already + viewers |= target + if(!(src.datum_flags & DF_ISPROCESSING) && (auto_refresh | auto_check_view)) + START_PROCESSING(SSobj, src) //Start processing to poll for viewability + //Send the content + if(updating) + target << output(get_content(target), "[window_id].browser") + else + target << browse(get_content(target), "window=[window_id];size=[width]x[height];can_close=[can_close];can_minimize=[can_minimize];can_resize=[can_resize];titlebar=[titlebar];focus=false;") + steal_focus(target) + +/datum/oracle_ui/proc/render_all() + for(var/viewer in viewers) + render(viewer, TRUE) + +/datum/oracle_ui/proc/close(mob/target) + if(target && target.client) + target << browse(null, "window=[window_id]") + +/datum/oracle_ui/proc/close_all() + for(var/viewer in viewers) + close(viewer) + viewers = list() + +/datum/oracle_ui/proc/check_view_all() + for(var/viewer in viewers) + check_view(viewer) + +/datum/oracle_ui/proc/check_view(mob/target) + set waitfor = FALSE //Makes this an async call + if(!test_viewer(target, TRUE)) + close(target) + +/datum/oracle_ui/proc/call_js(mob/target, js_func, list/parameters = list()) + set waitfor = FALSE //Makes this an async call + if(!test_viewer(target, TRUE)) + return + target << output(list2params(parameters),"[window_id].browser:[js_func]") + +/datum/oracle_ui/proc/call_js_all(js_func, list/parameters = list()) + for(var/viewer in viewers) + call_js(viewer, js_func, parameters) + +/datum/oracle_ui/proc/steal_focus(mob/target) + set waitfor = FALSE //Makes this an async call + winset(target, "[window_id]","focus=true") + +/datum/oracle_ui/proc/steal_focus_all() + for(var/viewer in viewers) + steal_focus(viewer) + +/datum/oracle_ui/proc/flash(mob/target, times = -1) + set waitfor = FALSE //Makes this an async call + winset(target, "[window_id]","flash=[times]") + +/datum/oracle_ui/proc/flash_all(times = -1) + for(var/viewer in viewers) + flash(viewer, times) + +/datum/oracle_ui/proc/href(mob/user, action, list/parameters = list()) + var/params_string = replacetext(list2params(parameters),"&",";") + return "?src=[REF(src)];sui_action=[action];sui_user=[REF(user)];[params_string]" + +/datum/oracle_ui/Topic(href, parameters) + var/action = parameters["sui_action"] + var/mob/current_user = locate(parameters["sui_user"]) + if(!call(datasource, "oui_canuse")(current_user)) + return + if(datasource) + call(datasource, "oui_act")(current_user, action, parameters); diff --git a/code/modules/oracle_ui/themed.dm b/code/modules/oracle_ui/themed.dm new file mode 100644 index 0000000000..bdcd294ce8 --- /dev/null +++ b/code/modules/oracle_ui/themed.dm @@ -0,0 +1,82 @@ +/datum/oracle_ui/themed + var/theme = "" + var/content_root = "" + var/current_page = "index.html" + var/root_template = "" + +/datum/oracle_ui/themed/New(atom/n_datasource, n_width = 512, n_height = 512, n_content_root = "") + root_template = get_themed_file("index.html") + content_root = n_content_root + return ..(n_datasource, n_width, n_height, get_asset_datum(/datum/asset/simple/oui_theme_nano)) + +/datum/oracle_ui/themed/process() + if(auto_check_view) + check_view_all() + if(auto_refresh) + soft_update_fields() + +GLOBAL_LIST_EMPTY(oui_template_variables) +GLOBAL_LIST_EMPTY(oui_file_cache) + +/datum/oracle_ui/themed/proc/get_file(path) + if(GLOB.oui_file_cache[path]) + return GLOB.oui_file_cache[path] + else if(fexists(path)) + var/data = file2text(path) + GLOB.oui_file_cache[path] = data + return data + else + var/errormsg = "MISSING PATH '[path]'" +#ifndef UNIT_TESTS + log_world(errormsg) //Because Travis absolutely hates these procs +#endif + return errormsg + +/datum/oracle_ui/themed/proc/get_content_file(filename) + return get_file("./modular_citadel/html/oracle_ui/content/[content_root]/[filename]") + +/datum/oracle_ui/themed/proc/get_themed_file(filename) + return get_file("./modular_citadel/html/oracle_ui/themes/[theme]/[filename]") + +/datum/oracle_ui/themed/proc/process_template(template, variables) + var/regex/pattern = regex("\\@\\{(\\w+)\\}","gi") + GLOB.oui_template_variables = variables + var/replaced = pattern.Replace(template, /proc/oui_process_template_replace) + GLOB.oui_template_variables = null + return replaced + +/proc/oui_process_template_replace(match, group1) + var/value = GLOB.oui_template_variables[group1] + return "[value]" + +/datum/oracle_ui/themed/proc/get_inner_content(mob/target) + var/list/data = call(datasource, "oui_data")(target) + return process_template(get_content_file(current_page), data) + +/datum/oracle_ui/themed/get_content(mob/target) + var/list/template_data = list("title" = datasource.name, "body" = get_inner_content(target)) + return process_template(root_template, template_data) + +/datum/oracle_ui/themed/proc/soft_update_fields() + for(var/viewer in viewers) + var/json = json_encode(call(datasource, "oui_data")(viewer)) + call_js(viewer, "updateFields", list(json)) + +/datum/oracle_ui/themed/proc/soft_update_all() + for(var/viewer in viewers) + call_js(viewer, "replaceContent", list(get_inner_content(viewer))) + +/datum/oracle_ui/themed/proc/change_page(newpage) + if(newpage == current_page) + return + current_page = newpage + render_all() + +/datum/oracle_ui/themed/proc/act(label, mob/user, action, list/parameters = list(), class = "", disabled = FALSE) + if(disabled) + return "[label]" + else + return "[label]" + +/datum/oracle_ui/themed/nano + theme = "nano" diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 37877ffb09..059a42bb36 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -31,6 +31,7 @@ var/spam_flag = 0 var/contact_poison // Reagent ID to transfer on contact var/contact_poison_volume = 0 + var/datum/oracle_ui/ui = null /obj/item/paper/pickup(user) @@ -40,16 +41,40 @@ if(!istype(G) || G.transfer_prints) H.reagents.add_reagent(contact_poison,contact_poison_volume) contact_poison = null + ui.check_view_all() ..() +/obj/item/paper/dropped(mob/user) + ui.check_view(user) + return ..() + /obj/item/paper/Initialize() . = ..() pixel_y = rand(-8, 8) pixel_x = rand(-9, 9) + ui = new /datum/oracle_ui(src, 420, 600, get_asset_datum(/datum/asset/spritesheet/simple/paper)) + ui.can_resize = FALSE update_icon() updateinfolinks() +/obj/item/paper/oui_getcontent(mob/target) + if(!target.is_literate()) + return "[name][stars(info)]
[stamps]" + else if(istype(target.get_active_held_item(), /obj/item/pen) | istype(target.get_active_held_item(), /obj/item/toy/crayon)) + return "[name][info_links]
[stamps]" + else + return "[name][info]
[stamps]" + +/obj/item/paper/oui_canview(mob/target) + if(check_rights_for(target.client, R_FUN)) //Allows admins to view faxes + return TRUE + if(isAI(target)) + var/mob/living/silicon/ai/ai = target + return get_dist(src, ai.current) < 2 + if(iscyborg(target)) + return get_dist(src, target) < 2 + return ..() /obj/item/paper/update_icon() @@ -65,20 +90,13 @@ /obj/item/paper/examine(mob/user) ..() to_chat(user, "Alt-click to fold it.") - - var/datum/asset/assets = get_asset_datum(/datum/asset/spritesheet/simple/paper) - assets.send(user) - - if(in_range(user, src) || isobserver(user)) - if(user.is_literate()) - user << browse("[name][info]
[stamps]", "window=[name]") - onclose(user, "[name]") - else - user << browse("[name][stars(info)]
[stamps]", "window=[name]") - onclose(user, "[name]") + if(oui_canview(user)) + ui.render(user) else to_chat(user, "You're too far away to read it!") +/obj/item/paper/proc/show_content(mob/user) + user.examinate(src) /obj/item/paper/verb/rename() set name = "Rename paper" @@ -98,7 +116,7 @@ if((loc == usr && usr.stat == CONSCIOUS)) name = "paper[(n_name ? text("- '[n_name]'") : null)]" add_fingerprint(usr) - + ui.render_all() /obj/item/paper/suicide_act(mob/user) user.visible_message("[user] scratches a grid on [user.p_their()] wrist with the paper! It looks like [user.p_theyre()] trying to commit sudoku...") @@ -108,7 +126,7 @@ spam_flag = FALSE /obj/item/paper/attack_self(mob/user) - user.examinate(src) + show_content(user) if(rigged && (SSevents.holidays && SSevents.holidays[APRIL_FOOLS])) if(!spam_flag) spam_flag = TRUE @@ -123,11 +141,9 @@ else //cyborg or AI not seeing through a camera dist = get_dist(src, user) if(dist < 2) - usr << browse("[name][info]
[stamps]", "window=[name]") - onclose(usr, "[name]") + show_content(user) else - usr << browse("[name][stars(info)]
[stamps]", "window=[name]") - onclose(usr, "[name]") + to_chat(user, "You can't quite see it.") /obj/item/paper/proc/addtofield(id, text, links = 0) @@ -173,6 +189,7 @@ for(var/i in 1 to min(fields, 15)) addtofield(i, "write", 1) info_links = info_links + "write" + ui.render_all() /obj/item/paper/proc/clearpaper() @@ -274,7 +291,7 @@ else info += t // Oh, he wants to edit to the end of the file, let him. updateinfolinks() - usr << browse("[name][info_links]
[stamps]", "window=[name]") // Update the window + show_content(usr) update_icon() @@ -289,7 +306,7 @@ if(istype(P, /obj/item/pen) || istype(P, /obj/item/toy/crayon)) if(user.is_literate()) - user << browse("[name][info_links]
[stamps]", "window=[name]") + show_content(user) return else to_chat(user, "You don't know how to read or write.") @@ -312,6 +329,7 @@ add_overlay(stampoverlay) to_chat(user, "You stamp the paper with your rubber stamp.") + ui.render_all() if(P.is_hot()) if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10)) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 7c377ffa22..d837f0d420 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -267,7 +267,7 @@ to_chat(user, "There is an integration cog installed!") to_chat(user, "Alt-Click the APC to [ locked ? "unlock" : "lock"] the interface.") - + if(issilicon(user)) to_chat(user, "Ctrl-Click the APC to switch the breaker [ operating ? "off" : "on"].") @@ -747,7 +747,7 @@ if(damage_flag == "melee" && damage_amount < damage_deflection) return 0 . = ..() - + /obj/machinery/power/apc/deconstruct(disassembled = TRUE) if(!(flags_1 & NODECONSTRUCT_1)) if(!(stat & BROKEN)) @@ -759,21 +759,23 @@ update_icon() /obj/machinery/power/apc/emag_act(mob/user) - if(!(obj_flags & EMAGGED) && !malfhack) - if(opened) - to_chat(user, "You must close the cover to swipe an ID card!") - else if(panel_open) - to_chat(user, "You must close the panel first!") - else if(stat & (BROKEN|MAINT)) - to_chat(user, "Nothing happens!") - else - flick("apc-spark", src) - playsound(src, "sparks", 75, 1) - obj_flags |= EMAGGED - locked = FALSE - to_chat(user, "You emag the APC interface.") - update_icon() - + . = ..() + if(obj_flags & EMAGGED || malfhack) + return + if(opened) + to_chat(user, "You must close the cover to swipe an ID card!") + else if(panel_open) + to_chat(user, "You must close the panel first!") + else if(stat & (BROKEN|MAINT)) + to_chat(user, "Nothing happens!") + else + flick("apc-spark", src) + playsound(src, "sparks", 75, 1) + obj_flags |= EMAGGED + locked = FALSE + to_chat(user, "You emag the APC interface.") + update_icon() + return TRUE // attack with hand - remove cell (if cover open) or interact with the APC diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 7a6e313cd0..7375a3e17a 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -194,10 +194,12 @@ return ..() /obj/machinery/power/port_gen/pacman/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED emp_act(EMP_HEAVY) + return TRUE /obj/machinery/power/port_gen/pacman/attack_ai(mob/user) interact(user) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index d805713fa6..4d6ede69d1 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -339,12 +339,13 @@ projectile_sound = initial(projectile_sound) /obj/machinery/power/emitter/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return locked = FALSE obj_flags |= EMAGGED - if(user) - user.visible_message("[user.name] emags [src].","You short out the lock.") + user?.visible_message("[user.name] emags [src].","You short out the lock.") + return TRUE /obj/machinery/power/emitter/prototype diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index bc05e784a4..35710f8d61 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -84,16 +84,18 @@ /obj/singularity/attack_tk(mob/user) if(iscarbon(user)) var/mob/living/carbon/C = user + log_game("[key_name(C)] has been disintegrated by attempting to telekenetically grab a singularity.
") C.visible_message("[C]'s head begins to collapse in on itself!", "Your head feels like it's collapsing in on itself! This was really not a good idea!", "You hear something crack and explode in gore.") var/turf/T = get_turf(C) for(var/i in 1 to 3) C.apply_damage(30, BRUTE, BODY_ZONE_HEAD) new /obj/effect/gibspawner/generic(T) sleep(1) - C.ghostize() var/obj/item/bodypart/head/rip_u = C.get_bodypart(BODY_ZONE_HEAD) rip_u.dismember(BURN) //nice try jedi qdel(rip_u) + return + return ..() /obj/singularity/ex_act(severity, target) switch(severity) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 026c39c6cf..3c151d4e77 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -5,12 +5,21 @@ #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 CO2_HEAT_PENALTY 0.1 -#define NITROGEN_HEAT_MODIFIER -1.5 +#define PLUOXIUM_HEAT_PENALTY -1 +#define TRITIUM_HEAT_PENALTY 10 +#define NITROGEN_HEAT_PENALTY -1.5 +#define BZ_HEAT_PENALTY 5 #define OXYGEN_TRANSMIT_MODIFIER 1.5 //Higher == Bigger bonus to power generation. #define PLASMA_TRANSMIT_MODIFIER 4 +#define BZ_TRANSMIT_MODIFIER -2 + +#define TRITIUM_RADIOACTIVITY_MODIFIER 3 //Higher == Crystal spews out more radiation +#define BZ_RADIOACTIVITY_MODIFIER 5 +#define PLUOXIUM_RADIOACTIVITY_MODIFIER -2 #define N2O_HEAT_RESISTANCE 6 //Higher == Gas makes the crystal more resistant against heat damage. +#define PLUOXIUM_HEAT_RESISTANCE 3 #define POWERLOSS_INHIBITION_GAS_THRESHOLD 0.20 //Higher == Higher percentage of inhibitor gas needed before the charge inertia chain reaction effect starts. #define POWERLOSS_INHIBITION_MOLE_THRESHOLD 20 //Higher == More moles of the gas are needed before the charge inertia chain reaction effect starts. //Scales powerloss inhibition down until this amount of moles is reached @@ -53,6 +62,7 @@ #define SUPERMATTER_EMERGENCY_PERCENT 25 #define SUPERMATTER_DANGER_PERCENT 50 #define SUPERMATTER_WARNING_PERCENT 100 +#define CRITICAL_TEMPERATURE 10000 #define SUPERMATTER_COUNTDOWN_TIME 30 SECONDS @@ -102,6 +112,11 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) var/o2comp = 0 var/co2comp = 0 var/n2ocomp = 0 + var/pluoxiumcomp = 0 + var/tritiumcomp = 0 + var/bzcomp = 0 + + var/pluoxiumbonus = 0 var/combined_gas = 0 var/gasmix_power_ratio = 0 @@ -184,8 +199,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) to_chat(H, "You get headaches just from looking at it.") return -#define CRITICAL_TEMPERATURE 10000 - /obj/machinery/power/supermatter_crystal/proc/get_status() var/turf/T = get_turf(src) if(!T) @@ -354,16 +367,24 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) plasmacomp = max(removed.gases[/datum/gas/plasma]/combined_gas, 0) o2comp = max(removed.gases[/datum/gas/oxygen]/combined_gas, 0) co2comp = max(removed.gases[/datum/gas/carbon_dioxide]/combined_gas, 0) + pluoxiumcomp = max(removed.gases[/datum/gas/pluoxium]/combined_gas, 0) + tritiumcomp = max(removed.gases[/datum/gas/tritium]/combined_gas, 0) + bzcomp = max(removed.gases[/datum/gas/bz]/combined_gas, 0) n2ocomp = max(removed.gases[/datum/gas/nitrous_oxide]/combined_gas, 0) n2comp = max(removed.gases[/datum/gas/nitrogen]/combined_gas, 0) - gasmix_power_ratio = min(max(plasmacomp + o2comp + co2comp - n2comp, 0), 1) + if(pluoxiumcomp >= 0.15) + pluoxiumbonus = 1 //makes pluoxium only work at 15%+ + else + pluoxiumbonus = 0 - dynamic_heat_modifier = max((plasmacomp * PLASMA_HEAT_PENALTY)+(o2comp * OXYGEN_HEAT_PENALTY)+(co2comp * CO2_HEAT_PENALTY)+(n2comp * NITROGEN_HEAT_MODIFIER), 0.5) - dynamic_heat_resistance = max(n2ocomp * N2O_HEAT_RESISTANCE, 1) + gasmix_power_ratio = min(max(plasmacomp + o2comp + co2comp + tritiumcomp + bzcomp - pluoxiumcomp - n2comp, 0), 1) - power_transmission_bonus = max((plasmacomp * PLASMA_TRANSMIT_MODIFIER) + (o2comp * OXYGEN_TRANSMIT_MODIFIER), 0) + dynamic_heat_modifier = max((plasmacomp * PLASMA_HEAT_PENALTY) + (o2comp * OXYGEN_HEAT_PENALTY) + (co2comp * CO2_HEAT_PENALTY) + (tritiumcomp * TRITIUM_HEAT_PENALTY) + ((pluoxiumcomp * PLUOXIUM_HEAT_PENALTY) * pluoxiumbonus) + (n2comp * NITROGEN_HEAT_PENALTY) + (bzcomp * BZ_HEAT_PENALTY), 0.5) + dynamic_heat_resistance = max((n2ocomp * N2O_HEAT_RESISTANCE) + ((pluoxiumcomp * PLUOXIUM_HEAT_RESISTANCE) * pluoxiumbonus), 1) + + power_transmission_bonus = max((plasmacomp * PLASMA_TRANSMIT_MODIFIER) + (o2comp * OXYGEN_TRANSMIT_MODIFIER) + (bzcomp * BZ_TRANSMIT_MODIFIER), 0) //more moles of gases are harder to heat than fewer, so let's scale heat damage around them mole_heat_penalty = max(combined_gas / MOLE_HEAT_PENALTY, 0.25) @@ -392,7 +413,9 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) power = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power, 0) //Total laser power plus an overload if(prob(50)) - radiation_pulse(src, power * (1 + power_transmission_bonus/10)) + radiation_pulse(src, power * (1 + (tritiumcomp * TRITIUM_RADIOACTIVITY_MODIFIER) + ((pluoxiumcomp * PLUOXIUM_RADIOACTIVITY_MODIFIER) * pluoxiumbonus) * (power_transmission_bonus/(10-(bzcomp * BZ_RADIOACTIVITY_MODIFIER))))) // Rad Modifiers BZ(500%), Tritium(300%), and Pluoxium(-200%) + if(bzcomp >= 0.4 && prob(30 * bzcomp)) + src.fire_nuclear_particles() // Start to emit radballs at a maximum of 30% chance per tick var/device_energy = power * REACTION_POWER_MODIFIER @@ -527,11 +550,14 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) /obj/machinery/power/supermatter_crystal/attack_tk(mob/user) if(iscarbon(user)) var/mob/living/carbon/C = user + log_game("[key_name(C)] has been disintegrated by a telekenetic grab on a supermatter crystal.
") to_chat(C, "That was a really dense idea.") - C.ghostize() + C.visible_message("A bright flare of radiation is seen from [C]'s head, shortly before you hear a sickening sizzling!") var/obj/item/organ/brain/rip_u = locate(/obj/item/organ/brain) in C.internal_organs rip_u.Remove(C) qdel(rip_u) + return + return ..() /obj/machinery/power/supermatter_crystal/attack_paw(mob/user) dust_mob(user, cause = "monkey attack") diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index bbad3e08b0..9a5486dfe2 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -132,11 +132,14 @@ /obj/singularity/energy_ball/attack_tk(mob/user) if(iscarbon(user)) var/mob/living/carbon/C = user + log_game("[key_name(C)] has been disintegrated by a telekenetic grab on a tesla ball.
") to_chat(C, "That was a shockingly dumb idea.") + C.visible_message("A bright flare of lightning is seen from [C]'s head, shortly before you hear a sickening sizzling!") var/obj/item/organ/brain/rip_u = locate(/obj/item/organ/brain) in C.internal_organs - C.ghostize(0) + rip_u.Remove(C) qdel(rip_u) - C.death() + return + return ..() /obj/singularity/energy_ball/orbit(obj/singularity/energy_ball/target) if (istype(target)) diff --git a/code/modules/projectiles/ammunition/energy/laser.dm b/code/modules/projectiles/ammunition/energy/laser.dm index 089c79effd..0940144721 100644 --- a/code/modules/projectiles/ammunition/energy/laser.dm +++ b/code/modules/projectiles/ammunition/energy/laser.dm @@ -59,6 +59,9 @@ /obj/item/ammo_casing/energy/laser/redtag/hitscan projectile_type = /obj/item/projectile/beam/lasertag/redtag/hitscan +/obj/item/ammo_casing/energy/laser/redtag/hitscan/holy + projectile_type = /obj/item/projectile/beam/lasertag/redtag/hitscan/holy + /obj/item/ammo_casing/energy/xray projectile_type = /obj/item/projectile/beam/xray e_cost = 50 diff --git a/code/modules/projectiles/guns/ballistic/launchers.dm b/code/modules/projectiles/guns/ballistic/launchers.dm index f6356dce99..12006440d2 100644 --- a/code/modules/projectiles/guns/ballistic/launchers.dm +++ b/code/modules/projectiles/guns/ballistic/launchers.dm @@ -127,15 +127,14 @@ /obj/item/gun/ballistic/rocketlauncher/attackby(obj/item/A, mob/user, params) if(magazine && istype(A, /obj/item/ammo_casing)) - if(user.temporarilyRemoveItemFromInventory(A)) - if(!chambered) - to_chat(user, "You load a new [A] into \the [src].") - playsound(src, "gun_insert_full_magazine", 70, 1) - chamber_round() - update_icon() - return TRUE - else - to_chat(user, "You cannot seem to get \the [A] out of your hands!") + if(chambered) + to_chat(user, "[src] already has a [magazine_wording] chambered.") + return + if(magazine.attackby(A, user, silent = TRUE)) + to_chat(user, "You load a new [A] into \the [src].") + playsound(src, "gun_insert_full_magazine", 70, 1) + chamber_round() + update_icon() /obj/item/gun/ballistic/rocketlauncher/update_icon() icon_state = "[initial(icon_state)]-[chambered ? "1" : "0"]" diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm index 856dfed78b..d1b99c0e3c 100644 --- a/code/modules/projectiles/guns/ballistic/shotgun.dm +++ b/code/modules/projectiles/guns/ballistic/shotgun.dm @@ -40,7 +40,7 @@ if(istype(user) && user.getStaminaLoss() >= STAMINA_SOFTCRIT)//CIT CHANGE - makes pumping shotguns impossible in stamina softcrit to_chat(user, "You're too exhausted for that.")//CIT CHANGE - ditto return//CIT CHANGE - ditto - pump(user) + pump(user, TRUE) recentpump = world.time + 10 if(istype(user))//CIT CHANGE - makes pumping shotguns cost a lil bit of stamina. user.adjustStaminaLossBuffered(2) //CIT CHANGE - DITTO. make this scale inversely to the strength stat when stats/skills are added @@ -52,7 +52,9 @@ process_fire(user, user, FALSE) . = 1 -/obj/item/gun/ballistic/shotgun/proc/pump(mob/M) +/obj/item/gun/ballistic/shotgun/proc/pump(mob/M, visible = TRUE) + if(visible) + M.visible_message("[M] racks [src].", "You rack [src].") playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1) pump_unload(M) pump_reload(M) @@ -205,6 +207,7 @@ name = "combat shotgun" desc = "A semi automatic shotgun with tactical furniture and a six-shell capacity underneath." icon_state = "cshotgun" + fire_delay = 3 mag_type = /obj/item/ammo_box/magazine/internal/shot/com w_class = WEIGHT_CLASS_HUGE unique_reskin = list("Tatical" = "cshotgun", diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index cd0dd53d48..bb97f9cf99 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -159,3 +159,65 @@ /obj/item/gun/energy/laser/redtag/hitscan ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag/hitscan) + +/obj/item/gun/energy/laser/redtag/hitscan/chaplain + name = "\improper holy lasrifle" + desc = "A lasrifle from the old Imperium. This one seems to be blessed by techpriests." + icon_state = "LaserAK" + item_state = null + force = 14 + pin = /obj/item/firing_pin/holy + icon = 'modular_citadel/icons/obj/guns/VGguns.dmi' + ammo_x_offset = 4 + ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag/hitscan/holy) + lefthand_file = 'modular_citadel/icons/mob/citadel/guns_lefthand.dmi' + righthand_file = 'modular_citadel/icons/mob/citadel/guns_righthand.dmi' + var/chaplain_spawnable = TRUE + total_mass = TOTAL_MASS_MEDIEVAL_WEAPON + throw_speed = 3 + throw_range = 4 + throwforce = 10 + obj_flags = UNIQUE_RENAME + +/obj/item/gun/energy/laser/redtag/hitscan/chaplain/Initialize() + . = ..() + AddComponent(/datum/component/anti_magic, TRUE, TRUE) + +/obj/item/gun/energy/laser/redtag/hitscan/chaplain/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params, bypass_timer) + if(!ishuman(user) || !ishuman(target)) + return + + if(semicd) + return + + if(user == target) + target.visible_message("[user] sticks [src] in [user.p_their()] mouth, ready to pull the trigger...", \ + "You stick [src] in your mouth, ready to pull the trigger...") + else + target.visible_message("[user] points [src] at [target]'s head, ready to pull the trigger...", \ + "[user] points [src] at your head, ready to pull the trigger...") + + semicd = TRUE + + if(!bypass_timer && (!do_mob(user, target, 120) || user.zone_selected != BODY_ZONE_PRECISE_MOUTH)) + if(user) + if(user == target) + user.visible_message("[user] decided not to shoot.") + else if(target && target.Adjacent(user)) + target.visible_message("[user] has decided to spare [target]", "[user] has decided to spare your life!") + semicd = FALSE + return + + semicd = FALSE + + target.visible_message("[user] pulls the trigger!", "[user] pulls the trigger!") + + playsound('sound/weapons/dink.ogg', 30, 1) + + if((iscultist(target)) || (is_servant_of_ratvar(target))) + chambered.BB.damage *= 1500 + + else if(chambered && chambered.BB) + chambered.BB.damage *= 5 + + process_fire(target, user, TRUE, params) diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index 05d6367306..9103340790 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -37,10 +37,12 @@ to_chat(user, "This firearm already has a firing pin installed.") /obj/item/firing_pin/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED to_chat(user, "You override the authentication mechanism.") + return TRUE /obj/item/firing_pin/proc/gun_insert(mob/living/user, obj/item/gun/G) gun = G @@ -186,6 +188,15 @@ desc = "This is a DNA-locked firing pin which only authorizes one user. Attempt to fire once to DNA-link. It has a small explosive charge on it." selfdestruct = TRUE +/obj/item/firing_pin/holy + name = "blessed pin" + desc = "A firing pin that only responds to those who are holier than thou." + +/obj/item/firing_pin/holy/pin_auth(mob/living/user) + if(user.mind.isholy) + return TRUE + return FALSE + // Laser tag pins /obj/item/firing_pin/tag name = "laser tag firing pin" diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index cbd0348743..e43eb5a3bc 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -151,6 +151,11 @@ /obj/item/projectile/beam/lasertag/redtag/hitscan hitscan = TRUE +/obj/item/projectile/beam/lasertag/redtag/hitscan/holy + name = "lasrifle beam" + damage = 0.1 + damage_type = BURN + /obj/item/projectile/beam/lasertag/bluetag icon_state = "bluelaser" suit_types = list(/obj/item/clothing/suit/redtag) diff --git a/code/modules/projectiles/projectile/bullets/shotgun.dm b/code/modules/projectiles/projectile/bullets/shotgun.dm index f9aa47c6a3..4a1c954b1b 100644 --- a/code/modules/projectiles/projectile/bullets/shotgun.dm +++ b/code/modules/projectiles/projectile/bullets/shotgun.dm @@ -5,7 +5,7 @@ /obj/item/projectile/bullet/shotgun_beanbag name = "beanbag slug" damage = 5 - stamina = 80 + stamina = 70 /obj/item/projectile/bullet/incendiary/shotgun name = "incendiary slug" @@ -61,12 +61,12 @@ /obj/item/projectile/bullet/pellet/shotgun_buckshot name = "buckshot pellet" - damage = 12.5 + damage = 10 /obj/item/projectile/bullet/pellet/shotgun_rubbershot name = "rubbershot pellet" - damage = 3 - stamina = 25 + damage = 2 + stamina = 15 /obj/item/projectile/bullet/pellet/Range() ..() diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index dc86ab4e6c..61273d181d 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -1,3 +1,4 @@ +#define CHEMICAL_QUANTISATION_LEVEL 0.001 /proc/build_chemical_reagent_list() //Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id @@ -53,10 +54,16 @@ var/maximum_volume = 100 var/atom/my_atom = null var/chem_temp = 150 + var/pH = REAGENT_NORMAL_PH//Potential of hydrogen. Edited on adding new reagents, deleting reagents, and during fermi reactions. + var/overallPurity = 1 var/last_tick = 1 var/addiction_tick = 1 var/list/datum/reagent/addiction_list = new/list() var/reagents_holder_flags + var/targetVol = 0 //the target volume, i.e. the total amount that can be created during a fermichem reaction. + var/reactedVol = 0 //how much of the reagent is reacted during a fermireaction + var/fermiIsReacting = FALSE //that prevents multiple reactions from occurring (i.e. add_reagent calls to process_reactions(), this stops any extra reactions.) + var/fermiReactID = null //ID of the chem being made during a fermireaction, kept here so it's cache isn't lost between loops/procs. /datum/reagents/New(maximum=100, new_flags) maximum_volume = maximum @@ -89,7 +96,7 @@ var/list/data = list() for(var/r in reagent_list) //no reagents will be left behind var/datum/reagent/R = r - data += "[R.id] ([round(R.volume, 0.1)]u)" + data += "[R.id] ([round(R.volume, CHEMICAL_QUANTISATION_LEVEL)]u)" //Using IDs because SOME chemicals (I'm looking at you, chlorhydrate-beer) have the same names as other chemicals. return english_list(data) @@ -121,11 +128,13 @@ /datum/reagents/proc/remove_all(amount = 1) var/list/cached_reagents = reagent_list + if((total_volume - amount) <= 0)//Because this can result in 0, I don't want it to crash. + pH = 7 if(total_volume > 0) var/part = amount / total_volume for(var/reagent in cached_reagents) var/datum/reagent/R = reagent - remove_reagent(R.id, R.volume * part) + remove_reagent(R.id, R.volume * part, ignore_pH = TRUE) update_total() handle_reactions() @@ -189,8 +198,11 @@ var/transfer_amount = T.volume * part if(preserve_data) trans_data = copy_data(T) - R.add_reagent(T.id, transfer_amount * multiplier, trans_data, chem_temp, no_react = 1) //we only handle reaction after every reagent has been transfered. - remove_reagent(T.id, transfer_amount) + + + R.add_reagent(T.id, transfer_amount * multiplier, trans_data, chem_temp, T.purity, pH, no_react = TRUE, ignore_pH = TRUE) //we only handle reaction after every reagent has been transfered. + + remove_reagent(T.id, transfer_amount, ignore_pH = TRUE) update_total() R.update_total() @@ -249,7 +261,8 @@ if(current_reagent.id == reagent) if(preserve_data) trans_data = current_reagent.data - R.add_reagent(current_reagent.id, amount, trans_data, src.chem_temp) + R.add_reagent(current_reagent.id, amount, trans_data, chem_temp, current_reagent.purity, pH, no_react = TRUE) + remove_reagent(current_reagent.id, amount, 1) break @@ -350,14 +363,21 @@ R.on_update (A) update_total() -/datum/reagents/proc/handle_reactions() + +/datum/reagents/proc/handle_reactions()//HERE EDIT HERE THE MAIN REACTION + if(fermiIsReacting == TRUE) + return + if(reagents_holder_flags & NO_REACT) return //Yup, no reactions here. No siree. + var/list/cached_reagents = reagent_list var/list/cached_reactions = GLOB.chemical_reactions_list var/datum/cached_my_atom = my_atom - var/reaction_occurred = 0 + var/reaction_occurred = 0 // checks if reaction, binary variable + var/continue_reacting = FALSE //Helps keep track what kind of reaction is occuring; standard or fermi. + do var/list/possible_reactions = list() reaction_occurred = 0 @@ -382,6 +402,7 @@ var/has_special_react = C.special_react var/can_special_react = 0 + for(var/B in cached_required_reagents) if(!has_reagent(B, cached_required_reagents[B])) break @@ -402,7 +423,7 @@ if(!C.required_other) matching_other = 1 - else if(istype(cached_my_atom, /obj/item/slime_extract)) + else if(istype(cached_my_atom, /obj/item/slime_extract))//if the object is a slime_extract. var/obj/item/slime_extract/M = cached_my_atom if(M.Uses > 0) // added a limit to slime cores -- Muskets requested this @@ -413,7 +434,7 @@ if(!C.required_other) matching_other = 1 - if(required_temp == 0 || (is_cold_recipe && chem_temp <= required_temp) || (!is_cold_recipe && chem_temp >= required_temp)) + if(required_temp == 0 || (is_cold_recipe && chem_temp <= required_temp) || (!is_cold_recipe && chem_temp >= required_temp))//Temperature check!! meets_temp_requirement = 1 if(!has_special_react || C.check_special_react(src)) @@ -427,53 +448,268 @@ //select the reaction with the most extreme temperature requirements for(var/V in possible_reactions) var/datum/chemical_reaction/competitor = V - if(selected_reaction.is_cold_recipe) //if there are no recipe conflicts, everything in possible_reactions will have this same value for is_cold_reaction. warranty void if assumption not met. + if(selected_reaction.is_cold_recipe) if(competitor.required_temp <= selected_reaction.required_temp) selected_reaction = competitor else - if(competitor.required_temp >= selected_reaction.required_temp) + if(competitor.required_temp >= selected_reaction.required_temp) //will return with the hotter reacting first. selected_reaction = competitor - var/list/cached_required_reagents = selected_reaction.required_reagents - var/list/cached_results = selected_reaction.results + var/list/cached_required_reagents = selected_reaction.required_reagents//update reagents list + var/list/cached_results = selected_reaction.results//resultant chemical list var/special_react_result = selected_reaction.check_special_react(src) var/list/multiplier = INFINITY - for(var/B in cached_required_reagents) - multiplier = min(multiplier, round(get_reagent_amount(B) / cached_required_reagents[B])) - for(var/B in cached_required_reagents) - remove_reagent(B, (multiplier * cached_required_reagents[B]), safety = 1) + //Splits reactions into two types; FermiChem is advanced reaction mechanics, Other is default reaction. + //FermiChem relies on two additional properties; pH and impurity + //Temperature plays into a larger role too. + var/datum/chemical_reaction/C = selected_reaction - for(var/P in selected_reaction.results) - multiplier = max(multiplier, 1) //this shouldnt happen ... - SSblackbox.record_feedback("tally", "chemical_reaction", cached_results[P]*multiplier, P) - add_reagent(P, cached_results[P]*multiplier, null, chem_temp) + if (C.FermiChem == TRUE && !continue_reacting) + if (chem_temp > C.ExplodeTemp) //This is first to ensure explosions. + var/datum/chemical_reaction/fermi/Ferm = selected_reaction + fermiIsReacting = FALSE + SSblackbox.record_feedback("tally", "fermi_chem", 1, ("[Ferm] explosion")) + Ferm.FermiExplode(src, my_atom, volume = total_volume, temp = chem_temp, pH = pH) + return 0 - var/list/seen = viewers(4, get_turf(my_atom)) - var/iconhtml = icon2html(cached_my_atom, seen) - if(cached_my_atom) - if(!ismob(cached_my_atom)) // No bubbling mobs - if(selected_reaction.mix_sound) - playsound(get_turf(cached_my_atom), selected_reaction.mix_sound, 80, 1) + for(var/B in cached_required_reagents) + multiplier = min(multiplier, round((get_reagent_amount(B) / cached_required_reagents[B]), CHEMICAL_QUANTISATION_LEVEL)) + for(var/P in selected_reaction.results) + targetVol = cached_results[P]*multiplier - for(var/mob/M in seen) - to_chat(M, "[iconhtml] [selected_reaction.mix_message]") + if( (chem_temp <= C.ExplodeTemp) && (chem_temp >= C.OptimalTempMin)) + if( (pH >= (C.OptimalpHMin - C.ReactpHLim)) && (pH <= (C.OptimalpHMax + C.ReactpHLim)) )//To prevent pointless reactions + + if (fermiIsReacting == TRUE) + return 0 + else + START_PROCESSING(SSprocessing, src) + selected_reaction.on_reaction(src, my_atom, multiplier) + fermiIsReacting = TRUE + fermiReactID = selected_reaction + reaction_occurred = 1 + + else //It's a little bit of a confusing nest, but esstentially we check if it's a fermireaction, then temperature, then pH. If this is true, the remainer of this handler is run. + return 0 //If pH is out of range + else + return 0 //If not hot enough + + //Standard reaction mechanics: + else + if (C.FermiChem == TRUE)//Just to make sure + return 0 + + for(var/B in cached_required_reagents) // + multiplier = min(multiplier, round((get_reagent_amount(B) / cached_required_reagents[B]), CHEMICAL_QUANTISATION_LEVEL)) + + for(var/B in cached_required_reagents) + remove_reagent(B, (multiplier * cached_required_reagents[B]), safety = 1, ignore_pH = TRUE) + + for(var/P in selected_reaction.results) + multiplier = max(multiplier, 1) //this shouldnt happen ... + SSblackbox.record_feedback("tally", "chemical_reaction", cached_results[P]*multiplier, P)//log + add_reagent(P, cached_results[P]*multiplier, null, chem_temp) + + + var/list/seen = viewers(4, get_turf(my_atom))//Sound and sight checkers + var/iconhtml = icon2html(cached_my_atom, seen) + if(cached_my_atom) + if(!ismob(cached_my_atom)) // No bubbling mobs + if(selected_reaction.mix_sound) + playsound(get_turf(cached_my_atom), selected_reaction.mix_sound, 80, 1) - if(istype(cached_my_atom, /obj/item/slime_extract)) - var/obj/item/slime_extract/ME2 = my_atom - ME2.Uses-- - if(ME2.Uses <= 0) // give the notification that the slime core is dead for(var/mob/M in seen) - to_chat(M, "[iconhtml] \The [my_atom]'s power is consumed in the reaction.") - ME2.name = "used slime extract" - ME2.desc = "This extract has been used up." + to_chat(M, "[iconhtml] [selected_reaction.mix_message]") - selected_reaction.on_reaction(src, multiplier, special_react_result) - reaction_occurred = 1 + if(istype(cached_my_atom, /obj/item/slime_extract))//if there's an extract and it's used up. + var/obj/item/slime_extract/ME2 = my_atom + ME2.Uses-- + if(ME2.Uses <= 0) // give the notification that the slime core is dead + for(var/mob/M in seen) + to_chat(M, "[iconhtml] \The [my_atom]'s power is consumed in the reaction.") + ME2.name = "used slime extract" + ME2.desc = "This extract has been used up." + + selected_reaction.on_reaction(src, multiplier, special_react_result) + reaction_occurred = 1 + continue_reacting = TRUE while(reaction_occurred) update_total() return 0 +/datum/reagents/process() + var/datum/chemical_reaction/fermi/C = fermiReactID + + var/list/cached_required_reagents = C.required_reagents//update reagents list + var/list/cached_results = C.results//resultant chemical list + var/multiplier = INFINITY + + for(var/B in cached_required_reagents) // + multiplier = min(multiplier, round((get_reagent_amount(B) / cached_required_reagents[B]), 0.001)) + if (multiplier == 0) + fermiEnd() + return + for(var/P in cached_results) + targetVol = cached_results[P]*multiplier + + if (fermiIsReacting == FALSE) + CRASH("Fermi has refused to stop reacting even though we asked her nicely.") + + if (chem_temp > C.OptimalTempMin && fermiIsReacting == TRUE)//To prevent pointless reactions + if( (pH >= (C.OptimalpHMin - C.ReactpHLim)) && (pH <= (C.OptimalpHMax + C.ReactpHLim)) ) + if (reactedVol < targetVol) + reactedVol = fermiReact(fermiReactID, chem_temp, pH, reactedVol, targetVol, cached_required_reagents, cached_results, multiplier) + else//Volume is used up + fermiEnd() + return + else//pH is out of range + fermiEnd() + return + else//Temperature is too low, or reaction has stopped. + fermiEnd() + return + +/datum/reagents/proc/fermiEnd() + var/datum/chemical_reaction/fermi/C = fermiReactID + STOP_PROCESSING(SSprocessing, src) + fermiIsReacting = FALSE + reactedVol = 0 + targetVol = 0 + //pH check, handled at the end to reduce calls. + if(istype(my_atom, /obj/item/reagent_containers)) + var/obj/item/reagent_containers/RC = my_atom + RC.pH_check() + C.FermiFinish(src, my_atom) + handle_reactions() + update_total() + //Reaction sounds and words + playsound(get_turf(my_atom), C.mix_sound, 80, 1) + var/list/seen = viewers(5, get_turf(my_atom)) + var/iconhtml = icon2html(my_atom, seen) + for(var/mob/M in seen) + to_chat(M, "[iconhtml] [C.mix_message]") + +/datum/reagents/proc/fermiReact(selected_reaction, cached_temp, cached_pH, reactedVol, targetVol, cached_required_reagents, cached_results, multiplier) + var/datum/chemical_reaction/fermi/C = selected_reaction + var/deltaT = 0 + var/deltapH = 0 + var/stepChemAmmount = 0 + + //get purity from combined beaker reactant purities HERE. + var/purity = 1 + + //Begin checks + //For now, purity is handled elsewhere (on add) + //Calculate DeltapH (Deviation of pH from optimal) + //Lower range + if (cached_pH < C.OptimalpHMin) + if (cached_pH < (C.OptimalpHMin - C.ReactpHLim)) + deltapH = 0 + return//If outside pH range, no reaction + else + deltapH = (((cached_pH - (C.OptimalpHMin - C.ReactpHLim))**C.CurveSharppH)/((C.ReactpHLim**C.CurveSharppH))) + //Upper range + else if (cached_pH > C.OptimalpHMax) + if (cached_pH > (C.OptimalpHMax + C.ReactpHLim)) + deltapH = 0 + return //If outside pH range, no reaction + else + deltapH = (((- cached_pH + (C.OptimalpHMax + C.ReactpHLim))**C.CurveSharppH)/(C.ReactpHLim**C.CurveSharppH))//Reverse - to + to prevent math operation failures. + //Within mid range + else if (cached_pH >= C.OptimalpHMin && cached_pH <= C.OptimalpHMax) + deltapH = 1 + //This should never proc: + else + WARNING("[my_atom] attempted to determine FermiChem pH for '[C.id]' which broke for some reason! ([usr])") + + //Calculate DeltaT (Deviation of T from optimal) + if (cached_temp < C.OptimalTempMax && cached_temp >= C.OptimalTempMin) + deltaT = (((cached_temp - C.OptimalTempMin)**C.CurveSharpT)/((C.OptimalTempMax - C.OptimalTempMin)**C.CurveSharpT)) + else if (cached_temp >= C.OptimalTempMax) + deltaT = 1 + else + deltaT = 0 + + purity = (deltapH)//set purity equal to pH offset + + //Then adjust purity of result with reagent purity. + purity *= reactant_purity(C) + + var/removeChemAmmount //remove factor + var/addChemAmmount //add factor + //ONLY WORKS FOR ONE PRODUCT AT THE MOMENT + //Calculate how much product to make and how much reactant to remove factors.. + for(var/P in cached_results) + //stepChemAmmount = CLAMP(((deltaT * multiplier), 0, ((targetVol - reactedVol)/cached_results[P])) //used to have multipler, now it does + stepChemAmmount = (multiplier*cached_results[P]) + if (stepChemAmmount >= C.RateUpLim) + stepChemAmmount = (C.RateUpLim) + addChemAmmount = deltaT * stepChemAmmount + if (addChemAmmount >= (targetVol - reactedVol)) + addChemAmmount = (targetVol - reactedVol) + if (addChemAmmount < CHEMICAL_QUANTISATION_LEVEL) + addChemAmmount = CHEMICAL_QUANTISATION_LEVEL + removeChemAmmount = (addChemAmmount/cached_results[P]) + //This is kept for future bugtesters. + //message_admins("Reaction vars: PreReacted: [reactedVol] of [targetVol]. deltaT [deltaT], multiplier [multiplier], Step [stepChemAmmount], uncapped Step [deltaT*(multiplier*cached_results[P])], addChemAmmount [addChemAmmount], removeFactor [removeChemAmmount] Pfactor [cached_results[P]], adding [addChemAmmount]") + + //remove reactants + for(var/B in cached_required_reagents) + remove_reagent(B, (removeChemAmmount * cached_required_reagents[B]), safety = 1, ignore_pH = TRUE) + + //add product + var/TotalStep = 0 + for(var/P in cached_results) + SSblackbox.record_feedback("tally", "chemical_reaction", addChemAmmount, P)//log + SSblackbox.record_feedback("tally", "fermi_chem", addChemAmmount, P) + add_reagent(P, (addChemAmmount), null, cached_temp, purity)//add reagent function!! I THINK I can do this: + TotalStep += addChemAmmount//for multiple products + //Above should reduce yeild based on holder purity. + //Purity Check + for(var/datum/reagent/R in my_atom.reagents.reagent_list) + if(P == R.id) + if (R.purity < C.PurityMin)//If purity is below the min, blow it up. + fermiIsReacting = FALSE + SSblackbox.record_feedback("tally", "fermi_chem", 1, ("[P] explosion")) + C.FermiExplode(src, my_atom, (reactedVol+targetVol), cached_temp, pH) + STOP_PROCESSING(SSprocessing, src) + return 0 + + C.FermiCreate(src)//proc that calls when step is done + + //Apply pH changes and thermal output of reaction to beaker + chem_temp = round(cached_temp + (C.ThermicConstant * addChemAmmount)) + pH += (C.HIonRelease * addChemAmmount) + //keep track of the current reacted amount + reactedVol = reactedVol + addChemAmmount + + //Check extremes + if (chem_temp > C.ExplodeTemp) + //go to explode proc + fermiIsReacting = FALSE + SSblackbox.record_feedback("tally", "fermi_chem", 1, ("[C] explosions")) + C.FermiExplode(src, my_atom, (reactedVol+targetVol), chem_temp, pH) + STOP_PROCESSING(SSprocessing, src) + return + + //Make sure things are limited. + pH = CLAMP(pH, 0, 14) + + //return said amount to compare for next step. + return (reactedVol) + +//Currently calculates it irrespective of required reagents at the start +/datum/reagents/proc/reactant_purity(var/datum/chemical_reaction/fermi/C, holder) + var/list/cached_reagents = reagent_list + var/i = 0 + var/cachedPurity + for(var/datum/reagent/R in my_atom.reagents.reagent_list) + if (R in cached_reagents) + cachedPurity += R.purity + i++ + return cachedPurity/i + /datum/reagents/proc/isolate_reagent(reagent) var/list/cached_reagents = reagent_list for(var/_reagent in cached_reagents) @@ -505,11 +741,10 @@ total_volume = 0 for(var/reagent in cached_reagents) var/datum/reagent/R = reagent - if(R.volume < 0.1) + if(R.volume < CHEMICAL_QUANTISATION_LEVEL) del_reagent(R.id) else total_volume += R.volume - return 0 /datum/reagents/proc/clear_reagents() @@ -517,6 +752,7 @@ for(var/reagent in cached_reagents) var/datum/reagent/R = reagent del_reagent(R.id) + pH = REAGENT_NORMAL_PH return 0 /datum/reagents/proc/reaction(atom/A, method = TOUCH, volume_modifier = 1, show_message = 1) @@ -563,13 +799,17 @@ /datum/reagents/proc/adjust_thermal_energy(J, min_temp = 2.7, max_temp = 1000) var/S = specific_heat() - chem_temp = CLAMP(chem_temp + (J / (S * total_volume)), 2.7, 1000) + chem_temp = CLAMP(chem_temp + (J / (S * total_volume)), min_temp, max_temp) + if(istype(my_atom, /obj/item/reagent_containers)) + var/obj/item/reagent_containers/RC = my_atom + RC.temp_check() + +/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, other_purity = 1, other_pH, no_react = 0, ignore_pH = FALSE) -/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, no_react = 0) if(!isnum(amount) || !amount) return FALSE - if(amount <= 0) + if(amount <= CHEMICAL_QUANTISATION_LEVEL)//To prevent small ammount problems. return FALSE var/datum/reagent/D = GLOB.chemical_reagents_list[reagent] @@ -577,6 +817,23 @@ WARNING("[my_atom] attempted to add a reagent called '[reagent]' which doesn't exist. ([usr])") return FALSE + if (D.id == "water" && no_react == FALSE && !istype(my_atom, /obj/item/reagent_containers/food)) //Do like an otter, add acid to water, but also don't blow up botany. + if (pH <= 2) + SSblackbox.record_feedback("tally", "fermi_chem", 1, "water-acid explosions") + var/datum/effect_system/smoke_spread/chem/s = new + var/turf/T = get_turf(my_atom) + var/datum/reagents/R = new/datum/reagents(3000) + R.add_reagent("fermiAcid", amount) + for (var/datum/reagent/reagentgas in reagent_list) + R.add_reagent(reagentgas, amount/5) + remove_reagent(reagentgas, amount/5) + s.set_up(R, CLAMP(amount/10, 0, 2), T) + s.start() + return FALSE + + if(!pH) + other_pH = D.pH + update_total() var/cached_total = total_volume if(cached_total + amount > maximum_volume) @@ -587,6 +844,10 @@ var/cached_temp = chem_temp var/list/cached_reagents = reagent_list + var/cached_pH = pH + + + //Equalize temperature - Not using specific_heat() because the new chemical isn't in yet. var/specific_heat = 0 var/thermal_energy = 0 @@ -597,32 +858,55 @@ specific_heat += D.specific_heat * (amount / new_total) thermal_energy += D.specific_heat * amount * reagtemp chem_temp = thermal_energy / (specific_heat * new_total) - //// + + //cacluate reagent based pH shift. + if(ignore_pH == TRUE) + pH = ((cached_pH * cached_total)+(other_pH * amount))/(cached_total + amount)//should be right + else + pH = ((cached_pH * cached_total)+(D.pH * amount))/(cached_total + amount)//should be right + if(istype(my_atom, /obj/item/reagent_containers/)) + var/obj/item/reagent_containers/RC = my_atom + RC.pH_check()//checks beaker resilience //add the reagent to the existing if it exists for(var/A in cached_reagents) var/datum/reagent/R = A - if (R.id == reagent) - R.volume += amount + if (R.id == reagent) //IF MERGING + //Add amount and equalize purity + R.volume += round(amount, CHEMICAL_QUANTISATION_LEVEL) + R.purity = ((R.purity * R.volume) + (other_purity * amount)) /((R.volume + amount)) //This should add the purity to the product + update_total() if(my_atom) my_atom.on_reagent_change(ADD_REAGENT) - R.on_merge(data, amount) + if(isliving(my_atom)) + if(R.OnMobMergeCheck == TRUE)//Forces on_mob_add proc when a chem is merged + R.on_mob_add(my_atom, amount) + //else + // R.on_merge(data, amount, my_atom, other_purity) + R.on_merge(data, amount, my_atom, other_purity) if(!no_react) handle_reactions() + return TRUE + //otherwise make a new one var/datum/reagent/R = new D.type(data) cached_reagents += R R.holder = src - R.volume = amount + R.volume = round(amount, CHEMICAL_QUANTISATION_LEVEL) + R.purity = other_purity + R.loc = get_turf(my_atom) if(data) R.data = data R.on_new(data) + if(R.addProc == TRUE)//Allows on new without data overhead. + R.on_new(pH) //Add more as desired. + if(isliving(my_atom)) - R.on_mob_add(my_atom) //Must occur befor it could posibly run on_mob_delete + R.on_mob_add(my_atom, amount) update_total() if(my_atom) my_atom.on_reagent_change(ADD_REAGENT) @@ -630,12 +914,13 @@ handle_reactions() return TRUE + /datum/reagents/proc/add_reagent_list(list/list_reagents, list/data=null) // Like add_reagent but you can enter a list. Format it like this: list("toxin" = 10, "beer" = 15) for(var/r_id in list_reagents) var/amt = list_reagents[r_id] add_reagent(r_id, amt, data) -/datum/reagents/proc/remove_reagent(reagent, amount, safety)//Added a safety check for the trans_id_to +/datum/reagents/proc/remove_reagent(reagent, amount, safety, ignore_pH = FALSE)//Added a safety check for the trans_id_to if(isnull(amount)) amount = 0 @@ -653,6 +938,15 @@ for(var/A in cached_reagents) var/datum/reagent/R = A if (R.id == reagent) + if((total_volume - amount) <= 0)//Because this can result in 0, I don't want it to crash. + pH = 7 + //In practice this is really confusing and players feel like it randomly melts their beakers, but I'm not sure how else to handle it. We'll see how it goes and I can remove this if it confuses people. + else if (ignore_pH == FALSE) + //if (((pH > R.pH) && (pH <= 7)) || ((pH < R.pH) && (pH >= 7))) + pH = (((pH - R.pH) / total_volume) * amount) + pH + if(istype(my_atom, /obj/item/reagent_containers/)) + var/obj/item/reagent_containers/RC = my_atom + RC.pH_check()//checks beaker resilience) //clamp the removal amount to be between current reagent amount //and zero, to prevent removing more than the holder has stored amount = CLAMP(amount, 0, R.volume) @@ -674,7 +968,7 @@ if(!amount) return R else - if(R.volume >= amount) + if(round(R.volume, CHEMICAL_QUANTISATION_LEVEL) >= amount) return R else return 0 @@ -686,7 +980,7 @@ for(var/_reagent in cached_reagents) var/datum/reagent/R = _reagent if (R.id == reagent) - return R.volume + return round(R.volume, CHEMICAL_QUANTISATION_LEVEL) return 0 diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index fa9d60a219..9a228b28e3 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -139,12 +139,14 @@ /obj/machinery/chem_dispenser/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) to_chat(user, "[src] has no functional safeties to emag.") return to_chat(user, "You short out [src]'s safeties.") dispensable_reagents |= emagged_reagents//add the emagged reagents to the dispensable ones obj_flags |= EMAGGED + return TRUE /obj/machinery/chem_dispenser/ex_act(severity, target) if(severity < 3) @@ -189,10 +191,16 @@ data["beakerCurrentVolume"] = beakerCurrentVolume data["beakerMaxVolume"] = beaker.volume data["beakerTransferAmounts"] = beaker.possible_transfer_amounts + data["beakerCurrentpH"] = beaker.reagents.pH + //pH accuracy + for(var/obj/item/stock_parts/capacitor/C in component_parts) + data["partRating"]= 10**(C.rating-1) + else data["beakerCurrentVolume"] = null data["beakerMaxVolume"] = null data["beakerTransferAmounts"] = null + data["beakerCurrentpH"] = null var/chemicals[0] var/recipes[0] diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index a17b1e8190..436ee80e7b 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -97,13 +97,21 @@ data["isBeakerLoaded"] = beaker ? 1 : 0 data["currentTemp"] = beaker ? beaker.reagents.chem_temp : null + data["currentpH"] = beaker ? beaker.reagents.pH : null data["beakerCurrentVolume"] = beaker ? beaker.reagents.total_volume : null data["beakerMaxVolume"] = beaker ? beaker.volume : null + //purity and pH accuracy + for(var/obj/item/stock_parts/micro_laser/M in component_parts) + data["partRating"]= 10**(M.rating-1) + if(M.rating == 4) + data["showPurity"] = 1 + else + data["showPurity"] = 0 var beakerContents[0] if(beaker) for(var/datum/reagent/R in beaker.reagents.reagent_list) - beakerContents.Add(list(list("name" = R.name, "volume" = R.volume))) // list in a list because Byond merges the first list... + beakerContents.Add(list(list("name" = R.name, "volume" = R.volume, "purity" = R.purity))) // list in a list because Byond merges the first list... data["beakerContents"] = beakerContents return data diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 1d13b44c7a..c5ff9bb70b 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -21,6 +21,7 @@ var/analyzeVars[0] var/useramount = 30 // Last used amount var/list/pillStyles + var/fermianalyze //Give more detail on fermireactions on analysis /obj/machinery/chem_master/Initialize() create_reagents(100) @@ -170,6 +171,7 @@ data["condi"] = condi data["screen"] = screen data["analyzeVars"] = analyzeVars + data["fermianalyze"] = fermianalyze data["chosenPillStyle"] = chosenPillStyle data["isPillBottleLoaded"] = bottle ? 1 : 0 if(bottle) @@ -211,11 +213,13 @@ var/id = params["id"] var/amount = text2num(params["amount"]) if (amount > 0) + end_fermi_reaction() beaker.reagents.trans_id_to(src, id, amount) . = TRUE else if (amount == -1) // -1 means custom amount useramount = input("Enter the Amount you want to transfer:", name, useramount) as num|null if (useramount > 0) + end_fermi_reaction() beaker.reagents.trans_id_to(src, id, useramount) . = TRUE @@ -229,6 +233,12 @@ else reagents.remove_reagent(id, amount) . = TRUE + else if (amount == -1) // -1 means custom amount + useramount = input("Enter the Amount you want to transfer:", name, useramount) as num|null + if (useramount > 0) + end_fermi_reaction() + reagents.trans_id_to(beaker, id, useramount) + . = TRUE if("toggleMode") mode = !mode @@ -328,7 +338,7 @@ var/vol_part = min(reagents.total_volume, 30) if(text2num(many)) amount_full = round(reagents.total_volume / 30) - vol_part = reagents.total_volume % 30 + vol_part = ((reagents.total_volume*1000) % 30000) / 1000 //% operator doesn't support decimals. var/name = stripped_input(usr, "Name:","Name your bottle!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN) if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr))) return @@ -375,7 +385,7 @@ reagents.trans_to(P, vol_part) . = TRUE //END CITADEL ADDITIONS - if("analyze") + if("analyzeBeak") var/datum/reagent/R = GLOB.chemical_reagents_list[params["id"]] if(R) var/state = "Unknown" @@ -387,7 +397,45 @@ state = "Gas" var/const/P = 3 //The number of seconds between life ticks var/T = initial(R.metabolization_rate) * (60 / P) - analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold)) + if(istype(R, /datum/reagent/fermi)) + fermianalyze = TRUE + var/datum/chemical_reaction/Rcr = get_chemical_reaction(R.id) + var/pHpeakCache = (Rcr.OptimalpHMin + Rcr.OptimalpHMax)/2 + var/datum/reagent/targetReagent = beaker.reagents.has_reagent("[R.id]") + + if(!targetReagent) + CRASH("Tried to find a reagent that doesn't exist in the chem_master!") + analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "purityF" = targetReagent.purity, "inverseRatioF" = initial(R.InverseChemVal), "purityE" = initial(Rcr.PurityMin), "minTemp" = initial(Rcr.OptimalTempMin), "maxTemp" = initial(Rcr.OptimalTempMax), "eTemp" = initial(Rcr.ExplodeTemp), "pHpeak" = pHpeakCache) + else + fermianalyze = FALSE + analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold)) + screen = "analyze" + return + + if("analyzeBuff") + var/datum/reagent/R = GLOB.chemical_reagents_list[params["id"]] + if(R) + var/state = "Unknown" + if(initial(R.reagent_state) == 1) + state = "Solid" + else if(initial(R.reagent_state) == 2) + state = "Liquid" + else if(initial(R.reagent_state) == 3) + state = "Gas" + var/const/P = 3 //The number of seconds between life ticks + var/T = initial(R.metabolization_rate) * (60 / P) + if(istype(R, /datum/reagent/fermi)) + fermianalyze = TRUE + var/datum/chemical_reaction/Rcr = get_chemical_reaction(R.id) + var/pHpeakCache = (Rcr.OptimalpHMin + Rcr.OptimalpHMax)/2 + var/datum/reagent/targetReagent = reagents.has_reagent("[R.id]") + + if(!targetReagent) + CRASH("Tried to find a reagent that doesn't exist in the chem_master!") + analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "purityF" = targetReagent.purity, "inverseRatioF" = initial(R.InverseChemVal), "purityE" = initial(Rcr.PurityMin), "minTemp" = initial(Rcr.OptimalTempMin), "maxTemp" = initial(Rcr.OptimalTempMax), "eTemp" = initial(Rcr.ExplodeTemp), "pHpeak" = pHpeakCache) + else + fermianalyze = FALSE + analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold)) screen = "analyze" return @@ -397,6 +445,9 @@ +/obj/machinery/chem_master/proc/end_fermi_reaction()//Ends any reactions upon moving. + if(beaker.reagents.fermiIsReacting) + beaker.reagents.fermiEnd() /obj/machinery/chem_master/proc/isgoodnumber(num) if(isnum(num)) diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm index 0e5c2b39a5..c21629ce8f 100644 --- a/code/modules/reagents/chemistry/reagents.dm +++ b/code/modules/reagents/chemistry/reagents.dm @@ -33,6 +33,16 @@ var/addiction_stage4_end = 40 var/overdosed = 0 // You fucked up and this is now triggering its overdose effects, purge that shit quick. var/self_consuming = FALSE + //Fermichem vars: + var/purity = 1 //How pure a chemical is from 0 - 1. + var/addProc = FALSE //If the chemical should force an on_new() call + var/turf/loc = null //Should be the creation location! + var/pH = 7 //pH of the specific reagent, used for calculating the sum pH of a holder. + var/ImpureChem = "fermiTox"// What chemical is metabolised with an inpure reaction + var/InverseChemVal = 0.25 // If the impurity is below 0.5, replace ALL of the chem with InverseChem upon metabolising + var/InverseChem = "fermiTox"// What chem is metabolised when purity is below InverseChemVal, this shouldn't be made, but if it does, well, I guess I'll know about it. + var/DoNotSplit = FALSE // If impurity is handled within the main chem itself + var/OnMobMergeCheck = FALSE //Call on_mob_life proc when reagents are merging. var/metabolizing = FALSE var/invisible = FALSE //Set to true if it doesn't appear on handheld health analyzers. @@ -59,7 +69,8 @@ /datum/reagent/proc/on_mob_life(mob/living/carbon/M) current_cycle++ - holder.remove_reagent(src.id, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears. + if(holder) + holder.remove_reagent(src.id, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears. return // Called when this reagent is first added to a mob diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index a46a4d61e4..afd2be3f53 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -14,6 +14,7 @@ nutriment_factor = 0 taste_description = "alcohol" var/boozepwr = 65 //Higher numbers equal higher hardness, higher hardness equals more intense alcohol poisoning + pH = 7.33 /* Boozepwr Chart @@ -86,6 +87,8 @@ All effects don't start immediately, but rather get worse over time; the rate is taste_description = "piss water" glass_name = "glass of beer" glass_desc = "A freezing pint of beer." + pH = 4 + /datum/reagent/consumable/ethanol/beer/light name = "Light Beer" @@ -95,6 +98,7 @@ All effects don't start immediately, but rather get worse over time; the rate is taste_description = "dish water" glass_name = "glass of light beer" glass_desc = "A freezing pint of watery light beer." + pH = 5 /datum/reagent/consumable/ethanol/beer/green name = "Green Beer" @@ -105,6 +109,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_icon_state = "greenbeerglass" glass_name = "glass of green beer" glass_desc = "A freezing pint of green beer. Festive." + pH = 6 /datum/reagent/consumable/ethanol/beer/green/on_mob_life(mob/living/carbon/M) if(M.color != color) @@ -124,6 +129,8 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "glass of RR coffee liquor" glass_desc = "DAMN, THIS THING LOOKS ROBUST!" shot_glass_icon_state = "shotglasscream" + pH = 6 + /datum/reagent/consumable/ethanol/kahlua/on_mob_life(mob/living/carbon/M) M.dizziness = max(0,M.dizziness-5) @@ -145,6 +152,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "glass of whiskey" glass_desc = "The silky, smokey whiskey goodness inside the glass makes the drink look very classy." shot_glass_icon_state = "shotglassbrown" + pH = 4.5 /datum/reagent/consumable/ethanol/thirteenloko name = "Thirteen Loko" @@ -161,6 +169,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "glass of Thirteen Loko" glass_desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass." + /datum/reagent/consumable/ethanol/thirteenloko/on_mob_life(mob/living/carbon/M) M.drowsyness = max(0,M.drowsyness-7) M.AdjustSleeping(-40) @@ -221,6 +230,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "glass of vodka" glass_desc = "The glass contain wodka. Xynta." shot_glass_icon_state = "shotglassclear" + pH = 8.1 /datum/reagent/consumable/ethanol/vodka/on_mob_life(mob/living/carbon/M) M.radiation = max(M.radiation-2,0) @@ -255,6 +265,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_icon_state = "threemileislandglass" glass_name = "Three Mile Island Ice Tea" glass_desc = "A glass of this is sure to prevent a meltdown." + pH = 3.5 /datum/reagent/consumable/ethanol/threemileisland/on_mob_life(mob/living/carbon/M) M.set_drugginess(50) @@ -270,6 +281,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_icon_state = "ginvodkaglass" glass_name = "glass of gin" glass_desc = "A crystal clear glass of Griffeater gin." + pH = 6.9 /datum/reagent/consumable/ethanol/rum name = "Rum" @@ -282,6 +294,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "glass of rum" glass_desc = "Now you want to Pray for a pirate suit, don't you?" shot_glass_icon_state = "shotglassbrown" + pH = 6.5 /datum/reagent/consumable/ethanol/tequila name = "Tequila" @@ -294,6 +307,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "glass of tequila" glass_desc = "Now all that's missing is the weird colored shades!" shot_glass_icon_state = "shotglassgold" + pH = 4 /datum/reagent/consumable/ethanol/vermouth name = "Vermouth" @@ -306,6 +320,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "glass of vermouth" glass_desc = "You wonder why you're even drinking this straight." shot_glass_icon_state = "shotglassclear" + pH = 3.25 /datum/reagent/consumable/ethanol/wine name = "Wine" @@ -318,6 +333,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "glass of wine" glass_desc = "A very classy looking drink." shot_glass_icon_state = "shotglassred" + pH = 3.45 /datum/reagent/consumable/ethanol/lizardwine name = "Lizard wine" @@ -327,6 +343,7 @@ All effects don't start immediately, but rather get worse over time; the rate is boozepwr = 45 quality = DRINK_FANTASTIC taste_description = "scaley sweetness" + pH = 3 /datum/reagent/consumable/ethanol/grappa name = "Grappa" @@ -338,6 +355,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_icon_state = "grappa" glass_name = "glass of grappa" glass_desc = "A fine drink originally made to prevent waste by using the leftovers from winemaking." + pH = 3.5 /datum/reagent/consumable/ethanol/cognac name = "Cognac" @@ -350,6 +368,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "glass of cognac" glass_desc = "Damn, you feel like some kind of French aristocrat just by holding this." shot_glass_icon_state = "shotglassbrown" + pH = 3.5 /datum/reagent/consumable/ethanol/absinthe name = "Absinthe" @@ -395,6 +414,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_icon_state = "aleglass" glass_name = "glass of ale" glass_desc = "A freezing pint of delicious Ale." + pH = 4.5 /datum/reagent/consumable/ethanol/goldschlager name = "Goldschlager" @@ -421,6 +441,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "glass of patron" glass_desc = "Drinking patron in the bar, with all the subpar ladies." shot_glass_icon_state = "shotglassclear" + pH = 4.5 /datum/reagent/consumable/ethanol/gintonic name = "Gin and Tonic" @@ -433,6 +454,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_icon_state = "gintonicglass" glass_name = "Gin and Tonic" glass_desc = "A mild but still great cocktail. Drink up, like a true Englishman." + pH = 3 /datum/reagent/consumable/ethanol/rum_coke name = "Rum and Coke" @@ -445,6 +467,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_icon_state = "whiskeycolaglass" glass_name = "Rum and Coke" glass_desc = "The classic go-to of space-fratboys." + pH = 4 /datum/reagent/consumable/ethanol/cuba_libre name = "Cuba Libre" @@ -458,6 +481,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "Cuba Libre" glass_desc = "A classic mix of rum, cola, and lime. A favorite of revolutionaries everywhere!" + /datum/reagent/consumable/ethanol/cuba_libre/on_mob_life(mob/living/carbon/M) if(M.mind && M.mind.has_antag_datum(/datum/antagonist/rev)) //Cuba Libre, the traditional drink of revolutions! Heals revolutionaries. M.adjustBruteLoss(-1, 0) @@ -504,6 +528,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "Vodka martini" glass_desc ="A bastardisation of the classic martini. Still great." + /datum/reagent/consumable/ethanol/white_russian name = "White Russian" id = "whiterussian" @@ -557,8 +582,8 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_desc = "Tomato juice, mixed with Vodka and a lil' bit of lime. Tastes like liquid murder." /datum/reagent/consumable/ethanol/bloody_mary/on_mob_life(mob/living/carbon/C) - if(C.blood_volume < BLOOD_VOLUME_NORMAL) - C.blood_volume = min(BLOOD_VOLUME_NORMAL, C.blood_volume + 3) //Bloody Mary quickly restores blood loss. + if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio)) + C.blood_volume = min((BLOOD_VOLUME_NORMAL*C.blood_ratio), C.blood_volume + 3) //Bloody Mary quickly restores blood loss. ..() /datum/reagent/consumable/ethanol/brave_bull @@ -643,6 +668,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_icon_state = "beepskysmashglass" glass_name = "Beepsky Smash" glass_desc = "Heavy, hot and strong. Just like the Iron fist of the LAW." + pH = 2 overdose_threshold = 40 var/datum/brain_trauma/special/beepsky/B @@ -1578,6 +1604,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "Bastion Bourbon" glass_desc = "If you're feeling low, count on the buttery flavor of our own bastion bourbon." shot_glass_icon_state = "shotglassgreen" + pH = 4 /datum/reagent/consumable/ethanol/bastion_bourbon/on_mob_metabolize(mob/living/L) var/heal_points = 10 @@ -2095,6 +2122,29 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "Planet Cracker" glass_desc = "Although historians believe the drink was originally created to commemorate the end of an important conflict in man's past, its origins have largely been forgotten and it is today seen more as a general symbol of human supremacy." +/datum/reagent/consumable/ethanol/commander_and_chief + name = "Commander and Chief" + id = "commander_and_chief" + description = "A cocktail for the captain on the go." + color = "#ffffc9" + boozepwr = 50 + quality = DRINK_FANTASTIC + taste_description = "Tastes like...duty and responsibility?" + glass_icon_state = "commander_and_chief" + glass_name = "Commander and Chief" + glass_desc = "The gems of this majestic chalice represent the departments and their Heads." + +/datum/reagent/consumable/ethanol/commander_and_chief/on_mob_life(mob/living/carbon/M) + if(M.mind && HAS_TRAIT(M.mind, TRAIT_CAPTAIN_METABOLISM)) + M.heal_bodypart_damage(2,2,2) + M.adjustBruteLoss(-3.5,0) + M.adjustOxyLoss(-3.5,0) + M.adjustFireLoss(-3.5,0) + M.adjustToxLoss(-3.5,0) + M.radiation = max(M.radiation - 25, 0) + . = 1 + return ..() + /datum/reagent/consumable/ethanol/fruit_wine name = "Fruit Wine" id = "fruit_wine" @@ -2106,6 +2156,7 @@ All effects don't start immediately, but rather get worse over time; the rate is can_synth = FALSE var/list/names = list("null fruit" = 1) //Names of the fruits used. Associative list where name is key, value is the percentage of that fruit. var/list/tastes = list("bad coding" = 1) //List of tastes. See above. + pH = 4 /datum/reagent/consumable/ethanol/fruit_wine/on_new(list/data) names = data["names"] diff --git a/code/modules/reagents/chemistry/reagents/drink_reagents.dm b/code/modules/reagents/chemistry/reagents/drink_reagents.dm index 8aa555944a..bfefc073f8 100644 --- a/code/modules/reagents/chemistry/reagents/drink_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drink_reagents.dm @@ -168,6 +168,7 @@ /datum/reagent/consumable/laughter/on_mob_life(mob/living/carbon/M) M.emote("laugh") + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "chemical_laughter", /datum/mood_event/chemical_laughter) ..() /datum/reagent/consumable/superlaughter @@ -182,6 +183,7 @@ if(prob(30)) M.visible_message("[M] bursts out into a fit of uncontrollable laughter!", "You burst out in a fit of uncontrollable laughter!") M.Stun(5) + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "chemical_laughter", /datum/mood_event/chemical_superlaughter) ..() /datum/reagent/consumable/potato_juice diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index a4586dd997..5b06710472 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -15,6 +15,7 @@ description = "An illegal chemical compound used as drug." color = "#60A584" // rgb: 96, 165, 132 overdose_threshold = 30 + pH = 9 /datum/reagent/drug/space_drugs/on_mob_life(mob/living/carbon/M) M.set_drugginess(15) @@ -44,6 +45,7 @@ addiction_threshold = 30 taste_description = "smoke" trippy = FALSE + pH = 8 /datum/reagent/drug/nicotine/on_mob_life(mob/living/carbon/M) if(prob(1)) @@ -65,6 +67,7 @@ color = "#FA00C8" overdose_threshold = 20 addiction_threshold = 10 + pH = 10 /datum/reagent/drug/crank/on_mob_life(mob/living/carbon/M) if(prob(5)) @@ -112,6 +115,7 @@ color = "#0064B4" overdose_threshold = 20 addiction_threshold = 15 + pH = 9 /datum/reagent/drug/krokodil/on_mob_life(mob/living/carbon/M) @@ -167,6 +171,7 @@ var/brain_damage = TRUE var/jitter = TRUE var/confusion = TRUE + pH = 5 /datum/reagent/drug/methamphetamine/on_mob_metabolize(mob/living/L) ..() @@ -261,6 +266,7 @@ addiction_threshold = 10 taste_description = "salt" // because they're bathsalts? var/datum/brain_trauma/special/psychotic_brawling/bath_salts/rage + pH = 8.2 /datum/reagent/drug/bath_salts/on_mob_metabolize(mob/living/L) ..() @@ -357,6 +363,7 @@ description = "Amps you up and gets you going, fixes all stamina damage you might have but can cause toxin and oxygen damage." reagent_state = LIQUID color = "#78FFF0" + pH = 9.2 /datum/reagent/drug/aranesp/on_mob_life(mob/living/carbon/M) var/high_message = pick("You feel amped up.", "You feel ready.", "You feel like you can push it to the limit.") @@ -370,6 +377,84 @@ ..() . = 1 +/datum/reagent/drug/happiness + name = "Happiness" + id = "happiness" + description = "Fills you with ecstasic numbness and causes minor brain damage. Highly addictive. If overdosed causes sudden mood swings." + reagent_state = LIQUID + color = "#FFF378" + addiction_threshold = 10 + overdose_threshold = 20 + pH = 10.5 + +/datum/reagent/drug/happiness/on_mob_add(mob/living/L) + ..() + ADD_TRAIT(L, TRAIT_FEARLESS, id) + SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "happiness_drug", /datum/mood_event/happiness_drug) + +/datum/reagent/drug/happiness/on_mob_delete(mob/living/L) + REMOVE_TRAIT(L, TRAIT_FEARLESS, id) + SEND_SIGNAL(L, COMSIG_CLEAR_MOOD_EVENT, "happiness_drug") + ..() + +/datum/reagent/drug/happiness/on_mob_life(mob/living/carbon/M) + M.jitteriness = 0 + M.confused = 0 + M.disgust = 0 + M.adjustBrainLoss(0.2) + ..() + . = 1 + +/datum/reagent/drug/happiness/overdose_process(mob/living/M) + if(prob(30)) + var/reaction = rand(1,3) + switch(reaction) + if(1) + M.emote("laugh") + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "happiness_drug", /datum/mood_event/happiness_drug_good_od) + if(2) + M.emote("sway") + M.Dizzy(25) + if(3) + M.emote("frown") + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "happiness_drug", /datum/mood_event/happiness_drug_bad_od) + M.adjustBrainLoss(0.5) + ..() + . = 1 + +/datum/reagent/drug/happiness/addiction_act_stage1(mob/living/M)// all work and no play makes jack a dull boy + GET_COMPONENT_FROM(mood, /datum/component/mood, M) + mood.setSanity(min(mood.sanity, SANITY_DISTURBED)) + M.Jitter(5) + if(prob(20)) + M.emote(pick("twitch","laugh","frown")) + ..() + +/datum/reagent/drug/happiness/addiction_act_stage2(mob/living/M) + GET_COMPONENT_FROM(mood, /datum/component/mood, M) + mood.setSanity(min(mood.sanity, SANITY_UNSTABLE)) + M.Jitter(10) + if(prob(30)) + M.emote(pick("twitch","laugh","frown")) + ..() + +/datum/reagent/drug/happiness/addiction_act_stage3(mob/living/M) + GET_COMPONENT_FROM(mood, /datum/component/mood, M) + mood.setSanity(min(mood.sanity, SANITY_CRAZY)) + M.Jitter(15) + if(prob(40)) + M.emote(pick("twitch","laugh","frown")) + ..() + +/datum/reagent/drug/happiness/addiction_act_stage4(mob/living/carbon/human/M) + GET_COMPONENT_FROM(mood, /datum/component/mood, M) + mood.setSanity(SANITY_INSANE) + M.Jitter(20) + if(prob(50)) + M.emote(pick("twitch","laugh","frown")) + ..() + . = 1 + /datum/reagent/drug/skooma name = "Skooma" id = "skooma" @@ -380,6 +465,7 @@ addiction_threshold = 1 addiction_stage3_end = 40 addiction_stage4_end = 240 + pH = 12.5 /datum/reagent/drug/skooma/on_mob_metabolize(mob/living/L) . = ..() @@ -440,4 +526,3 @@ if(prob(40)) M.emote(pick("twitch","drool","moan")) ..() - diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index 4a835d0839..19aeaeb25e 100644 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -230,6 +230,7 @@ description = "A special oil that noticably chills the body. Extracted from Icepeppers and slimes." color = "#8BA6E9" // rgb: 139, 166, 233 taste_description = "mint" + pH = 13 //HMM! I wonder /datum/reagent/consumable/frostoil/on_mob_life(mob/living/carbon/M) var/cooling = 0 @@ -275,6 +276,7 @@ description = "A chemical agent used for self-defense and in police work." color = "#B31008" // rgb: 179, 16, 8 taste_description = "scorching agony" + pH = 7.4 /datum/reagent/consumable/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, reac_volume) if(!ishuman(M) && !ismonkey(M)) @@ -402,6 +404,7 @@ color = "#E700E7" // rgb: 231, 0, 231 metabolization_rate = 0.2 * REAGENTS_METABOLISM taste_description = "mushroom" + pH = 11 /datum/reagent/drug/mushroomhallucinogen/on_mob_life(mob/living/carbon/M) M.slurring = max(M.slurring,50) @@ -618,6 +621,7 @@ description = "A blinding substance extracted from certain onions." color = "#c0c9a0" taste_description = "bitterness" + pH = 5 /datum/reagent/consumable/tearjuice/reaction_mob(mob/living/M, method=TOUCH, reac_volume) if(!istype(M)) @@ -672,6 +676,7 @@ description = "An ichor, derived from a certain mushroom, makes for a bad time." color = "#1d043d" taste_description = "bitter mushroom" + pH = 12 /datum/reagent/consumable/entpoly/on_mob_life(mob/living/carbon/M) if(current_cycle >= 10) @@ -692,6 +697,7 @@ description = "A stimulating ichor which causes luminescent fungi to grow on the skin. " color = "#b5a213" taste_description = "tingling mushroom" + pH = 11.2 /datum/reagent/consumable/tinlux/reaction_mob(mob/living/M) M.set_light(2) @@ -706,6 +712,7 @@ color = "#d3a308" nutriment_factor = 3 * REAGENTS_METABOLISM taste_description = "fruity mushroom" + pH = 10.4 /datum/reagent/consumable/vitfro/on_mob_life(mob/living/carbon/M) if(prob(80)) @@ -721,6 +728,7 @@ nutriment_factor = 5 * REAGENTS_METABOLISM color = "#eef442" // rgb: 238, 244, 66 taste_description = "mournful honking" + pH = 9.2 /datum/reagent/consumable/astrotame name = "Astrotame" @@ -750,3 +758,4 @@ quality = FOOD_AMAZING taste_mult = 100 can_synth = FALSE + pH = 6.1 diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index fe70db250d..4dc0d145dc 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -18,6 +18,7 @@ name = "Leporazine" id = "leporazine" description = "Leporazine will effectively regulate a patient's body temperature, ensuring it never leaves safe levels." + pH = 8.4 color = "#82b8aa" /datum/reagent/medicine/leporazine/on_mob_life(mob/living/carbon/M) @@ -60,6 +61,9 @@ M.SetSleeping(0, 0) M.jitteriness = 0 M.cure_all_traumas(TRAUMA_RESILIENCE_MAGIC) + if(M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio)) + M.blood_volume = (BLOOD_VOLUME_NORMAL*M.blood_ratio) + for(var/thing in M.diseases) var/datum/disease/D = thing if(D.severity == DISEASE_SEVERITY_POSITIVE) @@ -79,6 +83,7 @@ id = "synaptizine" description = "Increases resistance to stuns as well as reducing drowsiness and hallucinations." color = "#FF00FF" + pH = 4 /datum/reagent/medicine/synaptizine/on_mob_life(mob/living/carbon/M) M.drowsyness = max(M.drowsyness-5, 0) @@ -98,6 +103,7 @@ id = "synaphydramine" description = "Reduces drowsiness, hallucinations, and Histamine from body." color = "#EC536D" // rgb: 236, 83, 109 + pH = 5.2 /datum/reagent/medicine/synaphydramine/on_mob_life(mob/living/carbon/M) M.drowsyness = max(M.drowsyness-5, 0) @@ -116,6 +122,7 @@ id = "inacusiate" description = "Instantly restores all hearing to the patient, but does not cure deafness." color = "#6600FF" // rgb: 100, 165, 255 + pH = 2 /datum/reagent/medicine/inacusiate/on_mob_life(mob/living/carbon/M) M.restoreEars() @@ -127,6 +134,7 @@ description = "A chemical mixture with almost magical healing powers. Its main limitation is that the patient's body temperature must be under 270K for it to metabolise correctly." color = "#0000C8" taste_description = "sludge" + pH = 11 /datum/reagent/medicine/cryoxadone/on_mob_life(mob/living/carbon/M) var/power = -0.00003 * (M.bodytemperature ** 2) + 3 @@ -148,6 +156,7 @@ color = "#0000C8" taste_description = "muscle" metabolization_rate = 1.5 * REAGENTS_METABOLISM + pH = 13 /datum/reagent/medicine/clonexadone/on_mob_life(mob/living/carbon/M) if(M.bodytemperature < T0C) @@ -163,6 +172,7 @@ description = "A mixture of cryoxadone and slime jelly, that apparently inverses the requirement for its activation." color = "#f7832a" taste_description = "spicy jelly" + pH = 12 /datum/reagent/medicine/pyroxadone/on_mob_life(mob/living/carbon/M) if(M.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT) @@ -194,6 +204,7 @@ color = "#669900" // rgb: 102, 153, 0 overdose_threshold = 30 taste_description = "fish" + pH = 12.2 /datum/reagent/medicine/rezadone/on_mob_life(mob/living/carbon/M) M.setCloneLoss(0) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that. @@ -215,6 +226,7 @@ description = "Spaceacillin will prevent a patient from conventionally spreading any diseases they are currently infected with." color = "#f2f2f2" metabolization_rate = 0.1 * REAGENTS_METABOLISM + pH = 8.1 //Goon Chems. Ported mainly from Goonstation. Easily mixable (or not so easily) and provide a variety of effects. /datum/reagent/medicine/silver_sulfadiazine @@ -222,6 +234,7 @@ id = "silver_sulfadiazine" description = "If used in touch-based applications, immediately restores burn wounds as well as restoring more over time. If ingested through other means, deals minor toxin damage." reagent_state = LIQUID + pH = 7.2 color = "#ffeac9" /datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) @@ -235,6 +248,7 @@ if(show_message) to_chat(M, "You feel your burns healing! It stings like hell!") M.emote("scream") + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine) ..() /datum/reagent/medicine/silver_sulfadiazine/on_mob_life(mob/living/carbon/M) @@ -250,6 +264,7 @@ color = "#f7ffa5" metabolization_rate = 0.5 * REAGENTS_METABOLISM overdose_threshold = 25 + pH = 10.7 /datum/reagent/medicine/oxandrolone/on_mob_life(mob/living/carbon/M) if(M.getFireLoss() > 50) @@ -271,6 +286,7 @@ description = "If used in touch-based applications, immediately restores bruising as well as restoring more over time. If ingested through other means, deals minor toxin damage." reagent_state = LIQUID color = "#FF9696" + pH = 6.7 /datum/reagent/medicine/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) if(iscarbon(M) && M.stat != DEAD) @@ -283,6 +299,7 @@ if(show_message) to_chat(M, "You feel your bruises healing! It stings like hell!") M.emote("scream") + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine) ..() @@ -302,6 +319,7 @@ taste_description = "sweetness and salt" var/last_added = 0 var/maximum_reachable = BLOOD_VOLUME_NORMAL - 10 //So that normal blood regeneration can continue with salglu active + pH = 5.5 /datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/carbon/M) if(last_added) @@ -340,6 +358,7 @@ reagent_state = LIQUID color = "#6D6374" metabolization_rate = 0.4 * REAGENTS_METABOLISM + pH = 2.6 /datum/reagent/medicine/mine_salve/on_mob_life(mob/living/carbon/C) C.hal_screwyhud = SCREWYHUD_HEALTHY @@ -378,6 +397,7 @@ description = "Has a 100% chance of instantly healing brute and burn damage. One unit of the chemical will heal one point of damage. Touch application only." reagent_state = LIQUID color = "#FFEBEB" + pH = 11.5 /datum/reagent/medicine/synthflesh/reaction_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1) if(iscarbon(M)) @@ -388,6 +408,7 @@ M.adjustFireLoss(-1.25 * reac_volume) if(show_message) to_chat(M, "You feel your burns and bruises healing! It stings like hell!") + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine) ..() /datum/reagent/medicine/charcoal @@ -398,6 +419,7 @@ color = "#000000" metabolization_rate = 0.5 * REAGENTS_METABOLISM taste_description = "ash" + pH = 5 /datum/reagent/medicine/charcoal/on_mob_life(mob/living/carbon/M) M.adjustToxLoss(-2*REM, 0) @@ -415,6 +437,7 @@ color = "#DCDCDC" metabolization_rate = 0.25 * REAGENTS_METABOLISM overdose_threshold = 30 + pH = 2 /datum/reagent/medicine/omnizine/on_mob_life(mob/living/carbon/M) M.adjustToxLoss(-0.5*REM, 0) @@ -440,6 +463,7 @@ color = "#19C832" metabolization_rate = 0.5 * REAGENTS_METABOLISM taste_description = "acid" + pH = 1.5 /datum/reagent/medicine/calomel/on_mob_life(mob/living/carbon/M) for(var/datum/reagent/R in M.reagents.reagent_list) @@ -457,6 +481,7 @@ reagent_state = LIQUID color = "#14FF3C" metabolization_rate = 2 * REAGENTS_METABOLISM + pH = 12 //It's a reducing agent /datum/reagent/medicine/potass_iodide/on_mob_life(mob/living/carbon/M) if(M.radiation > 0) @@ -470,6 +495,7 @@ reagent_state = LIQUID color = "#003153" // RGB 0, 49, 83 metabolization_rate = 0.5 * REAGENTS_METABOLISM + pH = 8.9 /datum/reagent/medicine/prussian_blue/on_mob_life(mob/living/carbon/M) if(M.radiation > 0) @@ -483,6 +509,7 @@ reagent_state = LIQUID color = "#E6FFF0" metabolization_rate = 0.5 * REAGENTS_METABOLISM + pH = 1 //One of the best buffers, NEVERMIND! var/healtoxinlover = FALSE /datum/reagent/medicine/pen_acid/on_mob_life(mob/living/carbon/M) @@ -500,6 +527,7 @@ description = "Reduces massive amounts of radiation and toxin damage while purging other chemicals from the body. Slimepeople friendly!" color = "#91D865" healtoxinlover = TRUE + pH = 12//invert /datum/reagent/medicine/sal_acid name = "Salicyclic Acid" @@ -509,6 +537,7 @@ color = "#D2D2D2" metabolization_rate = 0.5 * REAGENTS_METABOLISM overdose_threshold = 25 + pH = 2.1 /datum/reagent/medicine/sal_acid/on_mob_life(mob/living/carbon/M) @@ -532,6 +561,7 @@ reagent_state = LIQUID color = "#00FFFF" metabolization_rate = 0.25 * REAGENTS_METABOLISM + pH = 2 /datum/reagent/medicine/salbutamol/on_mob_life(mob/living/carbon/M) M.adjustOxyLoss(-3*REM, 0) @@ -547,6 +577,7 @@ reagent_state = LIQUID color = "#FF6464" metabolization_rate = 0.25 * REAGENTS_METABOLISM + pH = 11 /datum/reagent/medicine/perfluorodecalin/on_mob_life(mob/living/carbon/human/M) M.adjustOxyLoss(-12*REM, 0) @@ -566,6 +597,7 @@ metabolization_rate = 0.5 * REAGENTS_METABOLISM overdose_threshold = 45 addiction_threshold = 30 + pH = 12 /datum/reagent/medicine/ephedrine/on_mob_life(mob/living/carbon/M) M.AdjustStun(-20, 0) @@ -620,6 +652,7 @@ reagent_state = LIQUID color = "#64FFE6" metabolization_rate = 0.5 * REAGENTS_METABOLISM + pH = 11.5 /datum/reagent/medicine/diphenhydramine/on_mob_life(mob/living/carbon/M) if(prob(10)) @@ -637,6 +670,7 @@ metabolization_rate = 0.5 * REAGENTS_METABOLISM overdose_threshold = 30 addiction_threshold = 25 + pH = 8.96 /datum/reagent/medicine/morphine/on_mob_metabolize(mob/living/L) ..() @@ -705,6 +739,7 @@ color = "#FFFFFF" metabolization_rate = 0.25 * REAGENTS_METABOLISM taste_description = "dull toxin" + pH = 10 /datum/reagent/medicine/oculine/on_mob_life(mob/living/carbon/M) var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES) @@ -736,6 +771,7 @@ color = "#000000" metabolization_rate = 0.25 * REAGENTS_METABOLISM overdose_threshold = 35 + pH = 12 /datum/reagent/medicine/atropine/on_mob_life(mob/living/carbon/M) if(M.health < 0) @@ -765,6 +801,7 @@ color = "#D2FFFA" metabolization_rate = 0.25 * REAGENTS_METABOLISM overdose_threshold = 30 + pH = 10.2 /datum/reagent/medicine/epinephrine/on_mob_life(mob/living/carbon/M) if(M.health < 0) @@ -801,6 +838,7 @@ color = "#A0E85E" metabolization_rate = 0.5 * REAGENTS_METABOLISM taste_description = "magnets" + pH = 0 /datum/reagent/medicine/strange_reagent/reaction_mob(mob/living/carbon/human/M, method=TOUCH, reac_volume) if(M.stat == DEAD) @@ -834,6 +872,7 @@ id = "mannitol" description = "Efficiently restores brain damage." color = "#DCDCFF" + pH = 10.4 /datum/reagent/medicine/mannitol/on_mob_life(mob/living/carbon/C) C.adjustBrainLoss(-2*REM) @@ -841,12 +880,26 @@ C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC) ..() +/datum/reagent/medicine/neurine + name = "Neurine" + id = "neurine" + description = "Reacts with neural tissue, helping reform damaged connections. Can cure minor traumas." + color = "#EEFF8F" + +/datum/reagent/medicine/neurine/on_mob_life(mob/living/carbon/C) + if(holder.has_reagent("neurotoxin")) + holder.remove_reagent("neurotoxin", 5) + if(prob(15)) + C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC) + ..() + /datum/reagent/medicine/mutadone name = "Mutadone" id = "mutadone" description = "Removes jitteriness and restores genetic defects." color = "#5096C8" taste_description = "acid" + pH = 2 /datum/reagent/medicine/mutadone/on_mob_life(mob/living/carbon/M) M.jitteriness = 0 @@ -861,6 +914,7 @@ description = "Purges alcoholic substance from the patient's body and eliminates its side effects." color = "#00B4C8" taste_description = "raw egg" + pH = 4 /datum/reagent/medicine/antihol/on_mob_life(mob/living/carbon/M) M.dizziness = 0 @@ -882,6 +936,7 @@ color = "#78008C" metabolization_rate = 0.5 * REAGENTS_METABOLISM overdose_threshold = 60 + pH = 8.7 /datum/reagent/medicine/stimulants/on_mob_metabolize(mob/living/L) ..() @@ -919,6 +974,7 @@ reagent_state = LIQUID color = "#FFFFF0" metabolization_rate = 0.5 * REAGENTS_METABOLISM + pH = 6.7 /datum/reagent/medicine/insulin/on_mob_life(mob/living/carbon/M) if(M.AdjustSleeping(-20, FALSE)) @@ -934,6 +990,7 @@ reagent_state = LIQUID color = "#fc2626" overdose_threshold = 30 + pH = 5 /datum/reagent/medicine/bicaridine/on_mob_life(mob/living/carbon/M) M.adjustBruteLoss(-2*REM, 0) @@ -952,6 +1009,7 @@ reagent_state = LIQUID color = "#13d2f0" overdose_threshold = 30 + pH = 9.7 /datum/reagent/medicine/dexalin/on_mob_life(mob/living/carbon/M) M.adjustOxyLoss(-2*REM, 0) @@ -970,6 +1028,7 @@ reagent_state = LIQUID color = "#ffc400" overdose_threshold = 30 + pH = 9 /datum/reagent/medicine/kelotane/on_mob_life(mob/living/carbon/M) M.adjustFireLoss(-2*REM, 0) @@ -989,6 +1048,7 @@ color = "#6aff00" overdose_threshold = 30 taste_description = "a roll of gauze" + pH = 10 /datum/reagent/medicine/antitoxin/on_mob_life(mob/living/carbon/M) M.adjustToxLoss(-2*REM, 0) @@ -1007,6 +1067,7 @@ id = "inaprovaline" description = "Stabilizes the breathing of patients. Good for those in critical condition." reagent_state = LIQUID + pH = 8.5 color = "#5dc1f0" /datum/reagent/medicine/inaprovaline/on_mob_life(mob/living/carbon/M) @@ -1062,6 +1123,7 @@ description = "Miniature medical robots that swiftly restore bodily damage." reagent_state = SOLID color = "#555555" + pH = 11 /datum/reagent/medicine/syndicate_nanites/on_mob_life(mob/living/carbon/M) M.adjustBruteLoss(-5*REM, 0) //A ton of healing - this is a 50 telecrystal investment. @@ -1075,14 +1137,15 @@ . = 1 /datum/reagent/medicine/neo_jelly - name = "Neo Jelly" - id = "neo_jelly" - description = "Gradually regenerates all types of damage, without harming slime anatomy.Can OD" - reagent_state = LIQUID - metabolization_rate = 1 * REAGENTS_METABOLISM - color = "#91D865" - overdose_threshold = 30 - taste_description = "jelly" + name = "Neo Jelly" + id = "neo_jelly" + description = "Gradually regenerates all types of damage, without harming slime anatomy.Can OD" + reagent_state = LIQUID + metabolization_rate = 1 * REAGENTS_METABOLISM + color = "#91D865" + overdose_threshold = 30 + taste_description = "jelly" + pH = 11.8 /datum/reagent/medicine/neo_jelly/on_mob_life(mob/living/carbon/M) M.adjustBruteLoss(-1.5*REM, 0) @@ -1105,6 +1168,7 @@ description = "Ichor from an extremely powerful plant. Great for restoring wounds, but it's a little heavy on the brain." color = rgb(255, 175, 0) overdose_threshold = 25 + pH = 11 /datum/reagent/medicine/earthsblood/on_mob_life(mob/living/carbon/M) M.adjustBruteLoss(-3 * REM, 0) @@ -1113,7 +1177,7 @@ M.adjustToxLoss(-3 * REM, 0, TRUE) //Heals TOXINLOVERS M.adjustBrainLoss(2 * REM, 150) //This does, after all, come from ambrosia, and the most powerful ambrosia in existence, at that! M.adjustCloneLoss(-1 * REM, 0) - M.adjustStaminaLoss(-30 * REM, 0) + M.adjustStaminaLoss(-13 * REM, 0) M.jitteriness = min(max(0, M.jitteriness + 3), 30) M.druggy = min(max(0, M.druggy + 10), 15) //See above ..() @@ -1132,6 +1196,7 @@ reagent_state = LIQUID color = "#27870a" metabolization_rate = 0.4 * REAGENTS_METABOLISM + pH = 4.3 /datum/reagent/medicine/haloperidol/on_mob_life(mob/living/carbon/M) for(var/datum/reagent/drug/R in M.reagents.reagent_list) @@ -1154,6 +1219,7 @@ color = "#a1a1a1" overdose_threshold = 3 //To prevent people stacking massive amounts of a very strong healing reagent can_synth = FALSE + pH = 14 /datum/reagent/medicine/lavaland_extract/on_mob_life(mob/living/carbon/M) M.heal_bodypart_damage(5,5) @@ -1217,6 +1283,7 @@ description = "A medication used to treat pain, fever, and inflammation, along with heart attacks." color = "#F5F5F5" self_consuming = TRUE + pH = 12.5 /datum/reagent/medicine/corazone/on_mob_metabolize(mob/living/M) ..() @@ -1249,6 +1316,7 @@ overdose_threshold = 20 // with the random effects this might be awesome or might kill you at less than 10u (extensively tested) taste_description = "salt" // it actually does taste salty var/overdose_progress = 0 // to track overdose progress + pH = 7.89 /datum/reagent/medicine/modafinil/on_mob_metabolize(mob/living/M) ADD_TRAIT(M, TRAIT_SLEEPIMMUNE, id) @@ -1305,3 +1373,38 @@ M.adjustStaminaLoss(1.5*REM, 0) ..() return TRUE + +/datum/reagent/medicine/psicodine + name = "Psicodine" + id = "psicodine" + description = "Suppresses anxiety and other various forms of mental distress. Overdose causes hallucinations and minor toxin damage." + reagent_state = LIQUID + color = "#07E79E" + metabolization_rate = 0.25 * REAGENTS_METABOLISM + overdose_threshold = 30 + pH = 9.12 + +/datum/reagent/medicine/psicodine/on_mob_add(mob/living/L) + ..() + ADD_TRAIT(L, TRAIT_FEARLESS, id) + +/datum/reagent/medicine/psicodine/on_mob_delete(mob/living/L) + REMOVE_TRAIT(L, TRAIT_FEARLESS, id) + ..() + +/datum/reagent/medicine/psicodine/on_mob_life(mob/living/carbon/M) + M.jitteriness = max(0, M.jitteriness-6) + M.dizziness = max(0, M.dizziness-6) + M.confused = max(0, M.confused-6) + M.disgust = max(0, M.disgust-6) + GET_COMPONENT_FROM(mood, /datum/component/mood, M) + if(mood.sanity <= SANITY_NEUTRAL) // only take effect if in negative sanity and then... + mood.setSanity(min(mood.sanity+5, SANITY_NEUTRAL)) // set minimum to prevent unwanted spiking over neutral + ..() + . = 1 + +/datum/reagent/medicine/psicodine/overdose_process(mob/living/M) + M.hallucination = min(max(0, M.hallucination + 5), 60) + M.adjustToxLoss(1, 0) + ..() + . = 1 diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index db927411c0..07c9b166ff 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -10,6 +10,7 @@ glass_name = "glass of tomato juice" glass_desc = "Are you sure this is tomato juice?" shot_glass_icon_state = "shotglassred" + pH = 7.4 /datum/reagent/blood/reaction_mob(mob/living/L, method=TOUCH, reac_volume) if(data && data["viruses"]) @@ -95,6 +96,7 @@ description = "You don't even want to think about what's in here." taste_description = "gross iron" shot_glass_icon_state = "shotglassred" + pH = 7.45 /datum/reagent/vaccine //data must contain virus type @@ -195,6 +197,7 @@ glass_icon_state = "glass_clear" glass_name = "glass of holy water" glass_desc = "A glass of holy water." + pH = 7.5 //God is alkaline /datum/reagent/water/holywater/on_mob_metabolize(mob/living/L) ..() @@ -271,6 +274,7 @@ id = "unholywater" description = "Something that shouldn't exist on this plane of existence." taste_description = "suffering" + pH = 6.5 /datum/reagent/fuel/unholywater/reaction_mob(mob/living/M, method=TOUCH, reac_volume) if(method == TOUCH || method == VAPOR) @@ -289,7 +293,7 @@ M.adjustOxyLoss(-2, 0) M.adjustBruteLoss(-2, 0) M.adjustFireLoss(-2, 0) - if(ishuman(M) && M.blood_volume < BLOOD_VOLUME_NORMAL) + if(ishuman(M) && M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio)) M.blood_volume += 3 else // Will deal about 90 damage when 50 units are thrown M.adjustBrainLoss(3, 150) @@ -313,6 +317,7 @@ M.adjustFireLoss(1, 0) //Hence the other damages... ain't I a bastard? M.adjustBrainLoss(5, 150) holder.remove_reagent(id, 1) + pH = 0.1 /datum/reagent/fuel/holyoil //Its oil name = "Zelus Oil" @@ -380,6 +385,7 @@ metabolization_rate = 10 * REAGENTS_METABOLISM // very fast, so it can be applied rapidly. But this changes on an overdose overdose_threshold = 11 //Slightly more than one un-nozzled spraybottle. taste_description = "sour oranges" + pH = 5 /datum/reagent/spraytan/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) if(ishuman(M)) @@ -704,6 +710,7 @@ color = "#202040" // rgb: 20, 20, 40 metabolization_rate = 0.25 * REAGENTS_METABOLISM taste_description = "bitterness" + pH = 10 /datum/reagent/serotrotium/on_mob_life(mob/living/carbon/M) if(ishuman(M)) @@ -718,6 +725,7 @@ reagent_state = GAS color = "#808080" // rgb: 128, 128, 128 taste_mult = 0 // oderless and tasteless + pH = 9.2//It's acutally a huge range and very dependant on the chemistry but pH is basically a made up var in it's implementation anyways /datum/reagent/oxygen/reaction_obj(obj/O, reac_volume) if((!O) || (!reac_volume)) @@ -738,6 +746,7 @@ reagent_state = SOLID color = "#6E3B08" // rgb: 110, 59, 8 taste_description = "metal" + pH = 5.5 /datum/reagent/copper/reaction_obj(obj/O, reac_volume) if(istype(O, /obj/item/stack/sheet/metal)) @@ -754,6 +763,7 @@ color = "#808080" // rgb: 128, 128, 128 taste_mult = 0 + /datum/reagent/nitrogen/reaction_obj(obj/O, reac_volume) if((!O) || (!reac_volume)) return 0 @@ -773,6 +783,7 @@ reagent_state = GAS color = "#808080" // rgb: 128, 128, 128 taste_mult = 0 + pH = 0.1//Now I'm stuck in a trap of my own design. Maybe I should make -ve pHes? (not 0 so I don't get div/0 errors) /datum/reagent/potassium name = "Potassium" @@ -804,6 +815,7 @@ reagent_state = SOLID color = "#BF8C00" // rgb: 191, 140, 0 taste_description = "rotten eggs" + pH = 4.5 /datum/reagent/carbon name = "Carbon" @@ -812,6 +824,7 @@ reagent_state = SOLID color = "#1C1300" // rgb: 30, 20, 0 taste_description = "sour chalk" + pH = 5 /datum/reagent/carbon/reaction_turf(turf/T, reac_volume) if(!isspaceturf(T)) @@ -826,6 +839,7 @@ reagent_state = GAS color = "#808080" // rgb: 128, 128, 128 taste_description = "chlorine" + pH = 7.4 /datum/reagent/chlorine/on_mob_life(mob/living/carbon/M) M.take_bodypart_damage(1*REM, 0, 0, 0) @@ -839,6 +853,7 @@ reagent_state = GAS color = "#808080" // rgb: 128, 128, 128 taste_description = "acid" + pH = 2 /datum/reagent/fluorine/on_mob_life(mob/living/carbon/M) M.adjustToxLoss(1*REM, 0) @@ -852,6 +867,7 @@ reagent_state = SOLID color = "#808080" // rgb: 128, 128, 128 taste_description = "salty metal" + pH = 11.6 /datum/reagent/phosphorus name = "Phosphorus" @@ -860,6 +876,7 @@ reagent_state = SOLID color = "#832828" // rgb: 131, 40, 40 taste_description = "vinegar" + pH = 6.5 /datum/reagent/lithium name = "Lithium" @@ -868,6 +885,7 @@ reagent_state = SOLID color = "#808080" // rgb: 128, 128, 128 taste_description = "metal" + pH = 11.3 /datum/reagent/lithium/on_mob_life(mob/living/carbon/M) if(M.canmove && !isspaceturf(M.loc)) @@ -882,6 +900,7 @@ description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity." color = "#808080" // rgb: 128, 128, 128 taste_description = "sweetness" + pH = 9 /datum/reagent/radium name = "Radium" @@ -890,6 +909,7 @@ reagent_state = SOLID color = "#C7C7C7" // rgb: 199,199,199 taste_description = "the colour blue and regret" + pH = 10 /datum/reagent/radium/on_mob_life(mob/living/carbon/M) M.apply_effect(2*REM/M.metabolism_efficiency,EFFECT_IRRADIATE,0) @@ -909,6 +929,7 @@ description = "Sterilizes wounds in preparation for surgery." color = "#e6f1f5" // rgb: 200, 165, 220 taste_description = "bitterness" + pH = 10.5 /datum/reagent/space_cleaner/sterilizine/reaction_mob(mob/living/carbon/C, method=TOUCH, reac_volume) if(method in list(TOUCH, VAPOR, PATCH)) @@ -924,11 +945,12 @@ description = "Pure iron is a metal." reagent_state = SOLID taste_description = "iron" + pH = 6 color = "#c2391d" /datum/reagent/iron/on_mob_life(mob/living/carbon/C) - if(C.blood_volume < BLOOD_VOLUME_NORMAL) + if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio)) C.blood_volume += 0.5 ..() @@ -966,6 +988,7 @@ reagent_state = SOLID color = "#B8B8C0" // rgb: 184, 184, 192 taste_description = "the inside of a reactor" + pH = 4 /datum/reagent/uranium/on_mob_life(mob/living/carbon/M) M.apply_effect(1/M.metabolism_efficiency,EFFECT_IRRADIATE,0) @@ -986,6 +1009,7 @@ reagent_state = SOLID color = "#0000CC" taste_description = "fizzling blue" + pH = 12 /datum/reagent/bluespace/reaction_mob(mob/living/M, method=TOUCH, reac_volume) if(method == TOUCH || method == VAPOR) @@ -1018,6 +1042,7 @@ reagent_state = SOLID color = "#A8A8A8" // rgb: 168, 168, 168 taste_mult = 0 + pH = 10 /datum/reagent/fuel name = "Welding fuel" @@ -1028,6 +1053,8 @@ glass_icon_state = "dr_gibb_glass" glass_name = "glass of welder fuel" glass_desc = "Unless you're an industrial tool, this is probably not safe for consumption." + pH = 4 + /datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with welding fuel to make them easy to ignite! if(method == TOUCH || method == VAPOR) @@ -1046,6 +1073,7 @@ description = "A compound used to clean things. Now with 50% more sodium hypochlorite!" color = "#A5F0EE" // rgb: 165, 240, 238 taste_description = "sourness" + pH = 5.5 /datum/reagent/space_cleaner/reaction_obj(obj/O, reac_volume) if(istype(O, /obj/effect/decal/cleanable)) @@ -1103,6 +1131,7 @@ description = "A powerful, acidic cleaner sold by Waffle Co. Affects organic matter while leaving other objects unaffected." metabolization_rate = 1.5 * REAGENTS_METABOLISM taste_description = "acid" + pH = 2 /datum/reagent/space_cleaner/ez_clean/on_mob_life(mob/living/carbon/M) M.adjustBruteLoss(3.33) @@ -1123,6 +1152,7 @@ color = "#7529b3" // rgb: 200, 165, 220 metabolization_rate = 1.5 * REAGENTS_METABOLISM taste_description = "sourness" + pH = 11.9 /datum/reagent/cryptobiolin/on_mob_life(mob/living/carbon/M) M.Dizzy(1) @@ -1137,6 +1167,7 @@ description = "Impedrezene is a narcotic that impedes one's ability by slowing down the higher brain cell functions." color = "#587a31" // rgb: 200, 165, 220A taste_description = "numbness" + pH = 9.1 /datum/reagent/impedrezene/on_mob_life(mob/living/carbon/M) M.jitteriness = max(M.jitteriness-5,0) @@ -1179,6 +1210,7 @@ color = "#92D17D" // rgb: 146, 209, 125 can_synth = FALSE taste_description = "slime" + pH = 11 /datum/reagent/fungalspores/reaction_mob(mob/living/L, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0) if(method==PATCH || method==INGEST || method==INJECT || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection)))) @@ -1190,6 +1222,7 @@ description = "A perfluoronated sulfonic acid that forms a foam when mixed with water." color = "#9E6B38" // rgb: 158, 107, 56 taste_description = "metal" + pH = 13 /datum/reagent/foaming_agent// Metal foaming agent. This is lithium hydride. Add other recipes (e.g. LiH + H2O -> LiOH + H2) eventually. name = "Foaming agent" @@ -1198,6 +1231,7 @@ reagent_state = SOLID color = "#664B63" // rgb: 102, 75, 99 taste_description = "metal" + pH = 12.5 /datum/reagent/smart_foaming_agent //Smart foaming agent. Functions similarly to metal foam, but conforms to walls. name = "Smart foaming agent" @@ -1206,6 +1240,7 @@ reagent_state = SOLID color = "#664B63" // rgb: 102, 75, 99 taste_description = "metal" + pH = 11.8 /datum/reagent/ammonia name = "Ammonia" @@ -1214,6 +1249,7 @@ reagent_state = GAS color = "#404030" // rgb: 64, 64, 48 taste_description = "mordant" + pH = 11.6 /datum/reagent/diethylamine name = "Diethylamine" @@ -1221,6 +1257,7 @@ description = "A secondary amine, mildly corrosive." color = "#604030" // rgb: 96, 64, 48 taste_description = "iron" + pH = 12 /datum/reagent/carbondioxide name = "Carbon Dioxide" @@ -1229,6 +1266,7 @@ description = "A gas commonly produced by burning carbon fuels. You're constantly producing this in your lungs." color = "#B0B0B0" // rgb : 192, 192, 192 taste_description = "something unknowable" + pH = 6 /datum/reagent/carbondioxide/reaction_obj(obj/O, reac_volume) if((!O) || (!reac_volume)) @@ -1250,6 +1288,7 @@ metabolization_rate = 1.5 * REAGENTS_METABOLISM color = "#808080" taste_description = "sweetness" + pH = 5.8 /datum/reagent/nitrous_oxide/reaction_obj(obj/O, reac_volume) if((!O) || (!reac_volume)) @@ -1309,6 +1348,7 @@ metabolization_rate = REAGENTS_METABOLISM color = "90560B" taste_description = "burning" + pH = 2 /datum/reagent/nitryl/on_mob_metabolize(mob/living/L) ..() @@ -1342,6 +1382,7 @@ colorname = "red" color = "#DA0000" // red random_color_list = list("#DA0000") + pH = 0.5 /datum/reagent/colorful_reagent/crayonpowder/orange name = "Orange Crayon Powder" @@ -1349,6 +1390,7 @@ colorname = "orange" color = "#FF9300" // orange random_color_list = list("#FF9300") + pH = 2 /datum/reagent/colorful_reagent/crayonpowder/yellow name = "Yellow Crayon Powder" @@ -1356,6 +1398,7 @@ colorname = "yellow" color = "#FFF200" // yellow random_color_list = list("#FFF200") + pH = 5 /datum/reagent/colorful_reagent/crayonpowder/green name = "Green Crayon Powder" @@ -1364,12 +1407,14 @@ color = "#A8E61D" // green random_color_list = list("#A8E61D") + /datum/reagent/colorful_reagent/crayonpowder/blue name = "Blue Crayon Powder" id = "bluecrayonpowder" colorname = "blue" color = "#00B7EF" // blue random_color_list = list("#00B7EF") + pH = 10 /datum/reagent/colorful_reagent/crayonpowder/purple name = "Purple Crayon Powder" @@ -1377,6 +1422,7 @@ colorname = "purple" color = "#DA00FF" // purple random_color_list = list("#DA00FF") + pH = 13 /datum/reagent/colorful_reagent/crayonpowder/invisible name = "Invisible Crayon Powder" @@ -1411,6 +1457,7 @@ color = "#000000" // RBG: 0, 0, 0 var/tox_prob = 0 taste_description = "plant food" + pH = 3 /datum/reagent/plantnutriment/on_mob_life(mob/living/carbon/M) if(prob(tox_prob)) @@ -1424,6 +1471,7 @@ description = "Cheap and extremely common type of plant nutriment." color = "#376400" // RBG: 50, 100, 0 tox_prob = 10 + pH = 2 /datum/reagent/plantnutriment/left4zednutriment name = "Left 4 Zed" @@ -1431,6 +1479,7 @@ description = "Unstable nutriment that makes plants mutate more often than usual." color = "#1A1E4D" // RBG: 26, 30, 77 tox_prob = 25 + pH = 1.5 /datum/reagent/plantnutriment/robustharvestnutriment name = "Robust Harvest" @@ -1438,6 +1487,7 @@ description = "Very potent nutriment that prevents plants from mutating." color = "#9D9D00" // RBG: 157, 157, 0 tox_prob = 15 + pH = 1 @@ -1465,6 +1515,7 @@ color = "#6b008f" taste_description = "bitterness" taste_mult = 1.5 + pH = 1.5 /datum/reagent/stable_plasma/on_mob_life(mob/living/carbon/C) C.adjustPlasma(10) @@ -1477,6 +1528,7 @@ reagent_state = LIQUID color = "#694600" taste_description = "metal" + pH = 4.5 /datum/reagent/carpet name = "Carpet" @@ -1499,14 +1551,16 @@ reagent_state = LIQUID color = "#b37740" taste_description = "chemicals" + pH = 7.8 /datum/reagent/phenol name = "Phenol" id = "phenol" description = "An aromatic ring of carbon with a hydroxyl group. A useful precursor to some medicines, but has no healing properties on its own." reagent_state = LIQUID + taste_description = "sweet and tarry" //Again, not a strong acid. + pH = 5.5 color = "#e6e8ff" - taste_description = "acid" /datum/reagent/ash name = "Ash" @@ -1515,14 +1569,15 @@ reagent_state = LIQUID color = "#665c56" taste_description = "ash" + pH = 6.5 /datum/reagent/acetone name = "Acetone" id = "acetone" description = "A slick, slightly carcinogenic liquid. Has a multitude of mundane uses in everyday life." reagent_state = LIQUID + taste_description = "solvent"//It's neutral though..? color = "#e6e6e6" - taste_description = "acid" /datum/reagent/colorful_reagent name = "Colorful Reagent" @@ -1612,6 +1667,7 @@ reagent_state = LIQUID color = "#60A584" // rgb: 96, 165, 132 taste_description = "cool salt" + pH = 11.2 /datum/reagent/lye name = "Lye" @@ -1619,7 +1675,8 @@ description = "Also known as sodium hydroxide. As a profession making this is somewhat underwhelming." reagent_state = LIQUID color = "#FFFFD6" // very very light yellow - taste_description = "acid" + taste_description = "alkali" //who put ACID for NaOH ???? + pH = 13 /datum/reagent/drying_agent name = "Drying agent" @@ -1628,6 +1685,7 @@ reagent_state = LIQUID color = "#A70FFF" taste_description = "dryness" + pH = 10.7 /datum/reagent/drying_agent/reaction_turf(turf/open/T, reac_volume) if(istype(T)) @@ -1699,6 +1757,7 @@ description = "Royal Bee Jelly, if injected into a Queen Space Bee said bee will split into two bees." color = "#00ff80" taste_description = "strange honey" + pH = 3 /datum/reagent/royal_bee_jelly/on_mob_life(mob/living/carbon/M) if(prob(2)) @@ -1720,6 +1779,7 @@ metabolization_rate = INFINITY can_synth = FALSE taste_description = "brains" + pH = 0.5 /datum/reagent/romerol/reaction_mob(mob/living/carbon/human/H, method=TOUCH, reac_volume) // Silently add the zombie infection organ to be activated upon death @@ -1778,6 +1838,7 @@ description = "the petroleum based components of plastic." color = "#f7eded" taste_description = "plastic" + pH = 6 /datum/reagent/glitter name = "generic glitter" @@ -1820,6 +1881,7 @@ color = "#AAAAAA55" taste_description = "water" metabolization_rate = 0.25 * REAGENTS_METABOLISM + pH = 15 /datum/reagent/pax/on_mob_metabolize(mob/living/L) ..() @@ -1908,6 +1970,13 @@ color = "#FAEAFF" taste_description = "synthetic catnip" +/datum/reagent/moonsugar/on_mob_life(mob/living/carbon/M) + if(prob(20)) + to_chat(M, "You find yourself unable to supress the desire to meow!") + M.emote("nya") + ..() + +//Kept for legacy, I think it will break everything if you enable it. /datum/reagent/penis_enlargement name = "Penis Enlargement" id = "penis_enlargement" diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 6bd165f23e..2848c336e2 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -23,6 +23,7 @@ color = "#792300" // rgb: 121, 35, 0 toxpwr = 2.5 taste_description = "mushroom" + pH = 13 /datum/reagent/toxin/mutagen name = "Unstable mutagen" @@ -32,6 +33,7 @@ toxpwr = 0 taste_description = "slime" taste_mult = 0.9 + pH = 2 /datum/reagent/toxin/mutagen/reaction_mob(mob/living/carbon/M, method=TOUCH, reac_volume) if(!..()) @@ -61,6 +63,7 @@ taste_mult = 1.5 color = "#8228A0" toxpwr = 3 + pH = 4 /datum/reagent/toxin/plasma/on_mob_life(mob/living/carbon/C) if(holder.has_reagent("epinephrine")) @@ -93,6 +96,7 @@ color = "#7DC3A0" toxpwr = 0 taste_description = "acid" + pH = 1.2 /datum/reagent/toxin/lexorin/on_mob_life(mob/living/carbon/C) . = TRUE @@ -115,6 +119,7 @@ toxpwr = 0 taste_description = "slime" taste_mult = 1.3 + pH = 10 /datum/reagent/toxin/slimejelly/on_mob_life(mob/living/carbon/M) if(prob(10)) @@ -133,6 +138,7 @@ color = "#CF3600" // rgb: 207, 54, 0 toxpwr = 0 taste_description = "mint" + pH = 8 /datum/reagent/toxin/minttoxin/on_mob_life(mob/living/carbon/M) if(HAS_TRAIT(M, TRAIT_FAT)) @@ -146,6 +152,7 @@ color = "#003333" // rgb: 0, 51, 51 toxpwr = 2 taste_description = "fish" + pH = 12 /datum/reagent/toxin/zombiepowder name = "Zombie Powder" @@ -155,6 +162,7 @@ color = "#669900" // rgb: 102, 153, 0 toxpwr = 0.5 taste_description = "death" + pH = 13 /datum/reagent/toxin/zombiepowder/on_mob_metabolize(mob/living/L) ..() @@ -177,6 +185,7 @@ color = "#664700" // rgb: 102, 71, 0 toxpwr = 0.8 taste_description = "death" + pH = 14.5 /datum/reagent/toxin/ghoulpowder/on_mob_metabolize(mob/living/L) ..() @@ -198,6 +207,7 @@ color = "#B31008" // rgb: 139, 166, 233 toxpwr = 0 taste_description = "sourness" + pH = 11 /datum/reagent/toxin/mindbreaker/on_mob_life(mob/living/carbon/M) M.hallucination += 5 @@ -210,6 +220,7 @@ color = "#49002E" // rgb: 73, 0, 46 toxpwr = 1 taste_mult = 1 + pH = 2 /datum/reagent/toxin/plantbgone/reaction_obj(obj/O, reac_volume) if(istype(O, /obj/structure/alien/weeds)) @@ -234,6 +245,7 @@ id = "weedkiller" description = "A harmful toxic mixture to kill weeds. Do not ingest!" color = "#4B004B" // rgb: 75, 0, 75 + pH = 3 /datum/reagent/toxin/pestkiller name = "Pest Killer" @@ -241,6 +253,7 @@ description = "A harmful toxic mixture to kill pests. Do not ingest!" color = "#4B004B" // rgb: 75, 0, 75 toxpwr = 1 + pH = 3.2 /datum/reagent/toxin/pestkiller/reaction_mob(mob/living/M, method=TOUCH, reac_volume) ..() @@ -254,6 +267,7 @@ description = "A natural toxin produced by blob spores that inhibits vision when ingested." color = "#9ACD32" toxpwr = 1 + pH = 11 /datum/reagent/toxin/spore/on_mob_life(mob/living/carbon/C) C.damageoverlaytemp = 60 @@ -268,6 +282,7 @@ color = "#9ACD32" toxpwr = 0.5 taste_description = "burning" + pH = 13 /datum/reagent/toxin/spore_burning/on_mob_life(mob/living/carbon/M) M.adjust_fire_stacks(2) @@ -282,6 +297,7 @@ color = "#000067" // rgb: 0, 0, 103 toxpwr = 0 metabolization_rate = 1.5 * REAGENTS_METABOLISM + pH = 11 /datum/reagent/toxin/chloralhydrate/on_mob_life(mob/living/carbon/M) switch(current_cycle) @@ -326,6 +342,7 @@ glass_icon_state = "beerglass" glass_name = "glass of beer" glass_desc = "A freezing pint of beer." + pH = 2 /datum/reagent/toxin/fakebeer/on_mob_life(mob/living/carbon/M) switch(current_cycle) @@ -343,6 +360,7 @@ reagent_state = SOLID color = "#5B2E0D" // rgb: 91, 46, 13 toxpwr = 0.5 + pH = 4.2 /datum/reagent/toxin/teapowder name = "Ground Tea Leaves" @@ -351,6 +369,7 @@ reagent_state = SOLID color = "#7F8400" // rgb: 127, 132, 0 toxpwr = 0.5 + pH = 4.9 /datum/reagent/toxin/mutetoxin //the new zombie powder. name = "Mute Toxin" @@ -359,6 +378,7 @@ color = "#F0F8FF" // rgb: 240, 248, 255 toxpwr = 0 taste_description = "silence" + pH = 12.2 /datum/reagent/toxin/mutetoxin/on_mob_life(mob/living/carbon/M) M.silent = max(M.silent, 3) @@ -816,6 +836,7 @@ var/acidpwr = 10 //the amount of protection removed from the armour taste_description = "acid" self_consuming = TRUE + pH = 2.75 /datum/reagent/toxin/acid/reaction_mob(mob/living/carbon/C, method=TOUCH, reac_volume) if(!istype(C)) diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm index 50006eef62..32155c9b89 100644 --- a/code/modules/reagents/chemistry/recipes.dm +++ b/code/modules/reagents/chemistry/recipes.dm @@ -17,6 +17,24 @@ var/mix_message = "The solution begins to bubble." //The message shown to nearby people upon mixing, if applicable var/mix_sound = 'sound/effects/bubbles.ogg' //The sound played upon mixing, if applicable + //FermiChem! + var/OptimalTempMin = 200 // Lower area of bell curve for determining heat based rate reactions + var/OptimalTempMax = 800 // Upper end for above + var/ExplodeTemp = 900 // Temperature at which reaction explodes - If any reaction is this hot, it explodes! + var/OptimalpHMin = 5 // Lowest value of pH determining pH a 1 value for pH based rate reactions (Plateu phase) + var/OptimalpHMax = 10 // Higest value for above + var/ReactpHLim = 3 // How far out pH wil react, giving impurity place (Exponential phase) + var/CatalystFact = 0 // How much the catalyst affects the reaction (0 = no catalyst)//Not implemented yet + var/CurveSharpT = 2 // How sharp the temperature exponential curve is (to the power of value) + var/CurveSharppH = 2 // How sharp the pH exponential curve is (to the power of value) + var/ThermicConstant = 1 // Temperature change per 1u produced + var/HIonRelease = 0.1 // pH change per 1u reaction + var/RateUpLim = 10 // Optimal/max rate possible if all conditions are perfect + var/FermiChem = FALSE // If the chemical uses the Fermichem reaction mechanics//If the chemical uses the Fermichem reaction mechanics + var/FermiExplode = FALSE // If the chemical explodes in a special way + var/PurityMin = 0.15 //If purity is below 0.15, it explodes too. Set to 0 to disable this. + + /datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume, specialreact) return //I recommend you set the result amount to the total volume of all components. diff --git a/code/modules/reagents/chemistry/recipes/drugs.dm b/code/modules/reagents/chemistry/recipes/drugs.dm index d91e2af7e9..27b1fe12ee 100644 --- a/code/modules/reagents/chemistry/recipes/drugs.dm +++ b/code/modules/reagents/chemistry/recipes/drugs.dm @@ -41,6 +41,13 @@ results = list("aranesp" = 3) required_reagents = list("epinephrine" = 1, "atropine" = 1, "morphine" = 1) +/datum/chemical_reaction/happiness + name = "Happiness" + id = "happiness" + results = list("happiness" = 4) + required_reagents = list("nitrous_oxide" = 2, "epinephrine" = 1, "ethanol" = 1) + required_catalysts = list("plasma" = 5) + /datum/chemical_reaction/skooma name = "skooma" id = "skooma" diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index 727048a12c..59865dd1da 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -178,6 +178,12 @@ results = list("mutadone" = 3) required_reagents = list("mutagen" = 1, "acetone" = 1, "bromine" = 1) +/datum/chemical_reaction/neurine + name = "Neurine" + id = "neurine" + results = list("neurine" = 3) + required_reagents = list("mannitol" = 1, "acetone" = 1, "oxygen" = 1) + /datum/chemical_reaction/antihol name = "antihol" id = "antihol" @@ -258,3 +264,9 @@ results = list("modafinil" = 5) required_reagents = list("diethylamine" = 1, "ammonia" = 1, "phenol" = 1, "acetone" = 1, "sacid" = 1) required_catalysts = list("bromine" = 1) // as close to the real world synthesis as possible + +/datum/chemical_reaction/psicodine + name = "Psicodine" + id = "psicodine" + results = list("psicodine" = 5) + required_reagents = list( "mannitol" = 2, "water" = 2, "impedrezene" = 1) diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm index bcd08b1853..e34f34675c 100644 --- a/code/modules/reagents/chemistry/recipes/others.dm +++ b/code/modules/reagents/chemistry/recipes/others.dm @@ -528,6 +528,16 @@ /datum/chemical_reaction/life/on_reaction(datum/reagents/holder, created_volume) chemical_mob_spawn(holder, rand(1, round(created_volume, 1)), "Life") // Lol. +//This is missing, I'm adding it back (see tgwiki). Not sure why we don't have it. +/datum/chemical_reaction/life_friendly + name = "Life (Friendly)" + id = "life_friendly" + required_reagents = list("strange_reagent" = 1, "synthflesh" = 1, "sugar" = 1) + required_temp = 374 + +/datum/chemical_reaction/life_friendly/on_reaction(datum/reagents/holder, created_volume) + chemical_mob_spawn(holder, rand(1, round(created_volume, 1)), "Life (friendly)", FRIENDLY_SPAWN) //Pray for cute cats + /datum/chemical_reaction/corgium name = "corgium" id = "corgium" diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 13e809f7cb..48abfcb649 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -1,3 +1,6 @@ +#define PH_WEAK (1 << 0) +#define TEMP_WEAK (1 << 1) + /obj/item/reagent_containers name = "Container" desc = "..." @@ -12,6 +15,8 @@ var/spawned_disease = null var/disease_amount = 20 var/spillable = FALSE + var/beaker_weakness_bitflag = NONE//Bitflag! + var/container_HP = 2 /obj/item/reagent_containers/Initialize(mapload, vol) . = ..() @@ -123,9 +128,50 @@ reagents.clear_reagents() +//melts plastic beakers /obj/item/reagent_containers/microwave_act(obj/machinery/microwave/M) reagents.expose_temperature(1000) + if(beaker_weakness_bitflag & TEMP_WEAK) + var/list/seen = viewers(5, get_turf(src)) + var/iconhtml = icon2html(src, seen) + for(var/mob/H in seen) + to_chat(H, "[iconhtml] \The [src]'s melts from the temperature!") + playsound(get_turf(src), 'sound/FermiChem/heatmelt.ogg', 80, 1) + qdel(src) ..() +//melts plastic beakers /obj/item/reagent_containers/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) - reagents.expose_temperature(exposed_temperature) \ No newline at end of file + reagents.expose_temperature(exposed_temperature) + temp_check() + +/obj/item/reagent_containers/proc/temp_check() + if(beaker_weakness_bitflag & TEMP_WEAK) + if(reagents.chem_temp >= 444)//assuming polypropylene + var/list/seen = viewers(5, get_turf(src)) + var/iconhtml = icon2html(src, seen) + for(var/mob/M in seen) + to_chat(M, "[iconhtml] \The [src]'s melts from the temperature!") + playsound(get_turf(src), 'sound/FermiChem/heatmelt.ogg', 80, 1) + to_chat(M, "[iconhtml] Have you tried using glass or meta beakers for high temperature reactions? These are immune to temperature effects.") + SSblackbox.record_feedback("tally", "fermi_chem", 1, "Times beakers have melted from temperature") + qdel(src) + +//melts glass beakers +/obj/item/reagent_containers/proc/pH_check() + if(beaker_weakness_bitflag & PH_WEAK) + if((reagents.pH < 0.5) || (reagents.pH > 13.5)) + var/list/seen = viewers(5, get_turf(src)) + var/iconhtml = icon2html(src, seen) + container_HP-- + if(container_HP <= 0) + for(var/mob/M in seen) + to_chat(M, "[iconhtml] \The [src]'s melts from the extreme pH!") + playsound(get_turf(src), 'sound/FermiChem/acidmelt.ogg', 80, 1) + SSblackbox.record_feedback("tally", "fermi_chem", 1, "Times beakers have melted from pH") + qdel(src) + else + for(var/mob/M in seen) + to_chat(M, "[iconhtml] \The [src]'s is damaged by the extreme pH and begins to deform!") + playsound(get_turf(src), 'sound/FermiChem/bufferadd.ogg', 50, 1) + to_chat(M, "[iconhtml] Have you tried using plastic beakers (XL) or metabeakers for high pH reactions? These beakers are immune to pH effects.") diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index 66befb1bb6..249ed56d20 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -240,7 +240,7 @@ name = "Rhinovirus culture bottle" desc = "A small bottle. Contains XY-rhinovirus culture in synthblood medium." spawned_disease = /datum/disease/advance/cold - + /obj/item/reagent_containers/glass/bottle/flu_virion name = "Flu virion culture bottle" desc = "A small bottle. Contains H13N1 flu virion culture in synthblood medium." diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 9bc6bef8a5..014401b72c 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -6,6 +6,7 @@ reagent_flags = OPENCONTAINER spillable = TRUE resistance_flags = ACID_PROOF + container_HP = 3 /obj/item/reagent_containers/glass/attack(mob/M, mob/user, obj/target) @@ -108,11 +109,13 @@ /obj/item/reagent_containers/glass/beaker name = "beaker" - desc = "A beaker. It can hold up to 50 units." + desc = "A beaker. It can hold up to 50 units. Unable to withstand extreme pHes" icon = 'icons/obj/chemical.dmi' icon_state = "beaker" item_state = "beaker" materials = list(MAT_GLASS=500) + beaker_weakness_bitflag = PH_WEAK + container_HP = 5 /obj/item/reagent_containers/glass/beaker/Initialize() . = ..() @@ -152,27 +155,33 @@ /obj/item/reagent_containers/glass/beaker/jar name = "honey jar" - desc = "A jar for honey. It can hold up to 50 units of sweet delight." + desc = "A jar for honey. It can hold up to 50 units of sweet delight. Unable to withstand reagents of an extreme pH." icon = 'icons/obj/chemical.dmi' icon_state = "vapour" /obj/item/reagent_containers/glass/beaker/large name = "large beaker" - desc = "A large beaker. Can hold up to 100 units." + desc = "A large beaker. Can hold up to 100 units. Unable to withstand reagents of an extreme pH." icon_state = "beakerlarge" materials = list(MAT_GLASS=2500) volume = 100 amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,20,25,30,50,100) + container_HP = 6 /obj/item/reagent_containers/glass/beaker/plastic name = "x-large beaker" - desc = "An extra-large beaker. Can hold up to 120 units." + desc = "An extra-large beaker. Can hold up to 150 units. Is able to resist acid and alkaline solutions, but melts at 444K" icon_state = "beakerwhite" materials = list(MAT_GLASS=2500, MAT_PLASTIC=3000) - volume = 120 + volume = 150 amount_per_transfer_from_this = 10 - possible_transfer_amounts = list(5,10,15,20,25,30,60,120) + possible_transfer_amounts = list(5,10,15,20,25,30,50,100,150) + +/obj/item/reagent_containers/glass/beaker/plastic/Initialize() + beaker_weakness_bitflag &= ~PH_WEAK + beaker_weakness_bitflag |= TEMP_WEAK + . = ..() /obj/item/reagent_containers/glass/beaker/plastic/update_icon() icon_state = "beakerlarge" // hack to lets us reuse the large beaker reagent fill states @@ -181,12 +190,16 @@ /obj/item/reagent_containers/glass/beaker/meta name = "metamaterial beaker" - desc = "A large beaker. Can hold up to 180 units." + desc = "A large beaker. Can hold up to 200 units. Is able to withstand all chemical situations." icon_state = "beakergold" materials = list(MAT_GLASS=2500, MAT_PLASTIC=3000, MAT_GOLD=1000, MAT_TITANIUM=1000) - volume = 180 + volume = 200 amount_per_transfer_from_this = 10 - possible_transfer_amounts = list(5,10,15,20,25,30,60,120,180) + possible_transfer_amounts = list(5,10,15,20,25,30,50,100,200) + +/obj/item/reagent_containers/glass/beaker/meta/Initialize() + beaker_weakness_bitflag &= ~PH_WEAK + . = ..() /obj/item/reagent_containers/glass/beaker/noreact name = "cryostasis beaker" @@ -197,17 +210,24 @@ reagent_flags = OPENCONTAINER | NO_REACT volume = 50 amount_per_transfer_from_this = 10 + container_HP = 10//shouldn't be needed + +/obj/item/reagent_containers/glass/beaker/noreact/Initialize() + beaker_weakness_bitflag &= ~PH_WEAK + . = ..() + //reagents.set_reacting(FALSE) was this removed in a recent pr? /obj/item/reagent_containers/glass/beaker/bluespace name = "bluespace beaker" desc = "A bluespace beaker, powered by experimental bluespace technology \ and Element Cuban combined with the Compound Pete. Can hold up to \ - 300 units." + 300 units. Unable to withstand reagents of an extreme pH." icon_state = "beakerbluespace" materials = list(MAT_GLASS=3000) volume = 300 amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,20,25,30,50,100,300) + container_HP = 8 /obj/item/reagent_containers/glass/beaker/cryoxadone list_reagents = list("cryoxadone" = 30) @@ -264,6 +284,11 @@ SLOT_L_STORE, SLOT_R_STORE,\ SLOT_GENERC_DEXTROUS_STORAGE ) + container_HP = 2 + +/obj/item/reagent_containers/glass/bucket/Initialize() + beaker_weakness_bitflag |= TEMP_WEAK + . = ..() /obj/item/reagent_containers/glass/bucket/attackby(obj/O, mob/user, params) if(istype(O, /obj/item/mop)) @@ -313,6 +338,11 @@ materials = list(MAT_GLASS=0) volume = 50 amount_per_transfer_from_this = 10 + container_HP = 2 + +/obj/item/reagent_containers/glass/beaker/waterbottle/Initialize() + beaker_weakness_bitflag |= TEMP_WEAK + . = ..() /obj/item/reagent_containers/glass/beaker/waterbottle/empty list_reagents = list() @@ -324,6 +354,7 @@ list_reagents = list("water" = 100) volume = 100 amount_per_transfer_from_this = 20 + container_HP = 2 /obj/item/reagent_containers/glass/beaker/waterbottle/large/empty list_reagents = list() diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 280337e686..38880f669f 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -1,242 +1,259 @@ -/obj/item/reagent_containers/pill - name = "pill" - desc = "A tablet or capsule." - icon = 'icons/obj/chemical.dmi' - icon_state = "pill" - item_state = "pill" - lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' - possible_transfer_amounts = list() - volume = 50 - grind_results = list() - var/apply_type = INGEST - var/apply_method = "swallow" - var/roundstart = 0 - var/self_delay = 0 //pills are instant, this is because patches inheret their aplication from pills - var/dissolvable = TRUE - -/obj/item/reagent_containers/pill/Initialize() - . = ..() - if(!icon_state) - icon_state = "pill[rand(1,20)]" - if(reagents.total_volume && roundstart) - name += " ([reagents.total_volume]u)" - - -/obj/item/reagent_containers/pill/attack_self(mob/user) - return - - -/obj/item/reagent_containers/pill/attack(mob/M, mob/user, def_zone) - if(!canconsume(M, user)) - return 0 - - if(M == user) - M.visible_message("[user] attempts to [apply_method] [src].") - if(self_delay) - if(!do_mob(user, M, self_delay)) - return 0 - to_chat(M, "You [apply_method] [src].") - - else - M.visible_message("[user] attempts to force [M] to [apply_method] [src].", \ - "[user] attempts to force [M] to [apply_method] [src].") - if(!do_mob(user, M)) - return 0 - M.visible_message("[user] forces [M] to [apply_method] [src].", \ - "[user] forces [M] to [apply_method] [src].") - - var/makes_me_think = pick(strings("redpill.json", "redpill_questions")) - if(icon_state == "pill4" && prob(5)) //you take the red pill - you stay in Wonderland, and I show you how deep the rabbit hole goes - addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, M, "[makes_me_think]"), 50) - - log_combat(user, M, "fed", reagents.log_list()) - if(reagents.total_volume) - reagents.reaction(M, apply_type) - reagents.trans_to(M, reagents.total_volume) - qdel(src) - return 1 - - -/obj/item/reagent_containers/pill/afterattack(obj/target, mob/user , proximity) - . = ..() - if(!proximity) - return - if(!dissolvable || !target.is_refillable()) - return - if(target.is_drainable() && !target.reagents.total_volume) - to_chat(user, "[target] is empty! There's nothing to dissolve [src] in.") - return - - if(target.reagents.holder_full()) - to_chat(user, "[target] is full.") - return - - to_chat(user, "You dissolve [src] in [target].") - for(var/mob/O in viewers(2, user)) //viewers is necessary here because of the small radius - to_chat(O, "[user] slips something into [target]!") - reagents.trans_to(target, reagents.total_volume) - qdel(src) - -/obj/item/reagent_containers/pill/tox - name = "toxins pill" - desc = "Highly toxic." - icon_state = "pill5" - list_reagents = list("toxin" = 50) - roundstart = 1 - -/obj/item/reagent_containers/pill/cyanide - name = "cyanide pill" - desc = "Don't swallow this." - icon_state = "pill5" - list_reagents = list("cyanide" = 50) - roundstart = 1 - -/obj/item/reagent_containers/pill/adminordrazine - name = "adminordrazine pill" - desc = "It's magic. We don't have to explain it." - icon_state = "pill16" - list_reagents = list("adminordrazine" = 50) - roundstart = 1 - -/obj/item/reagent_containers/pill/morphine - name = "morphine pill" - desc = "Commonly used to treat insomnia." - icon_state = "pill8" - list_reagents = list("morphine" = 30) - roundstart = 1 - -/obj/item/reagent_containers/pill/stimulant - name = "stimulant pill" - desc = "Often taken by overworked employees, athletes, and the inebriated. You'll snap to attention immediately!" - icon_state = "pill19" - list_reagents = list("ephedrine" = 10, "antihol" = 10, "coffee" = 30) - roundstart = 1 - -/obj/item/reagent_containers/pill/salbutamol - name = "salbutamol pill" - desc = "Used to treat oxygen deprivation." - icon_state = "pill16" - list_reagents = list("salbutamol" = 30) - roundstart = 1 - -/obj/item/reagent_containers/pill/charcoal - name = "charcoal pill" - desc = "Neutralizes many common toxins." - icon_state = "pill17" - list_reagents = list("charcoal" = 10) - roundstart = 1 - -/obj/item/reagent_containers/pill/epinephrine - name = "epinephrine pill" - desc = "Used to stabilize patients." - icon_state = "pill5" - list_reagents = list("epinephrine" = 15) - roundstart = 1 - -/obj/item/reagent_containers/pill/mannitol - name = "mannitol pill" - desc = "Used to treat brain damage." - icon_state = "pill17" - list_reagents = list("mannitol" = 50) - roundstart = 1 - -/obj/item/reagent_containers/pill/mutadone - name = "mutadone pill" - desc = "Used to treat genetic damage." - icon_state = "pill20" - list_reagents = list("mutadone" = 50) - roundstart = 1 - -/obj/item/reagent_containers/pill/salicyclic - name = "salicylic acid pill" - desc = "Used to dull pain." - icon_state = "pill9" - list_reagents = list("sal_acid" = 24) - roundstart = 1 - -/obj/item/reagent_containers/pill/oxandrolone - name = "oxandrolone pill" - desc = "Used to stimulate burn healing." - icon_state = "pill11" - list_reagents = list("oxandrolone" = 24) - roundstart = 1 - -/obj/item/reagent_containers/pill/insulin - name = "insulin pill" - desc = "Handles hyperglycaemic coma." - icon_state = "pill18" - list_reagents = list("insulin" = 50) - roundstart = 1 - -/obj/item/reagent_containers/pill/antirad - name = "potassium iodide pill" - desc = "Used to treat radition used to counter radiation poisoning." - icon_state = "pill18" - list_reagents = list("potass_iodide" = 50) - roundstart = 1 - -/obj/item/reagent_containers/pill/antirad_plus - name = "prussian blue pill" - desc = "Used to treat heavy radition poisoning." - icon = 'modular_citadel/icons/obj/modularpills.dmi' - icon_state = "prussian_blue" - list_reagents = list("prussian_blue" = 25, "water" = 10) - roundstart = 1 - -/obj/item/reagent_containers/pill/mutarad - name = "radiation treatment deluxe pill" - desc = "Used to treat heavy radition poisoning and genetic defects." - icon = 'modular_citadel/icons/obj/modularpills.dmi' - icon_state = "anit_rad_fixgene" - list_reagents = list("prussian_blue" = 15, "potass_iodide" = 15, "mutadone" = 15, "water" = 5) - roundstart = 1 - -///////////////////////////////////////// this pill is used only in a legion mob drop -/obj/item/reagent_containers/pill/shadowtoxin - name = "black pill" - desc = "I wouldn't eat this if I were you." - icon_state = "pill9" - color = "#454545" - list_reagents = list("shadowmutationtoxin" = 1) -//////////////////////////////////////// drugs -/obj/item/reagent_containers/pill/zoom - name = "zoom pill" - list_reagents = list("synaptizine" = 10, "nicotine" = 10, "methamphetamine" = 1) - - -/obj/item/reagent_containers/pill/happy - name = "happy pill" - list_reagents = list("sugar" = 10, "space_drugs" = 10) - - -/obj/item/reagent_containers/pill/lsd - name = "hallucinogen pill" - list_reagents = list("mushroomhallucinogen" = 15, "mindbreaker" = 15) - - -/obj/item/reagent_containers/pill/aranesp - name = "speedy pill" - list_reagents = list("aranesp" = 10) - -/obj/item/reagent_containers/pill/floorpill - name = "floorpill" - desc = "A strange pill found in the depths of maintenance" - icon_state = "pill21" - var/static/list/names = list("maintenance pill","floorpill","mystery pill","suspicious pill","strange pill") - var/static/list/descs = list("Your feeling is telling you no, but...","Drugs are expensive, you can't afford not to eat any pills that you find."\ - , "Surely, there's no way this could go bad.") - -/obj/item/reagent_containers/pill/floorpill/Initialize() - list_reagents = list(get_random_reagent_id() = rand(10,50)) - . = ..() - name = pick(names) - if(prob(20)) - desc = pick(descs) - -/obj/item/reagent_containers/pill/get_belt_overlay() - return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch") - -/obj/item/reagent_containers/pill/penis_enlargement - name = "penis enlargement pill" - list_reagents = list("penis_enlargement" = 30) +/obj/item/reagent_containers/pill + name = "pill" + desc = "A tablet or capsule." + icon = 'icons/obj/chemical.dmi' + icon_state = "pill" + item_state = "pill" + lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + possible_transfer_amounts = list() + volume = 50 + grind_results = list() + var/apply_type = INGEST + var/apply_method = "swallow" + var/roundstart = 0 + var/self_delay = 0 //pills are instant, this is because patches inheret their aplication from pills + var/dissolvable = TRUE + +/obj/item/reagent_containers/pill/Initialize() + . = ..() + if(!icon_state) + icon_state = "pill[rand(1,20)]" + if(reagents.total_volume && roundstart) + name += " ([reagents.total_volume]u)" + + +/obj/item/reagent_containers/pill/attack_self(mob/user) + return + + +/obj/item/reagent_containers/pill/attack(mob/M, mob/user, def_zone) + if(!canconsume(M, user)) + return 0 + + if(M == user) + M.visible_message("[user] attempts to [apply_method] [src].") + if(self_delay) + if(!do_mob(user, M, self_delay)) + return 0 + to_chat(M, "You [apply_method] [src].") + + else + M.visible_message("[user] attempts to force [M] to [apply_method] [src].", \ + "[user] attempts to force [M] to [apply_method] [src].") + if(!do_mob(user, M)) + return 0 + M.visible_message("[user] forces [M] to [apply_method] [src].", \ + "[user] forces [M] to [apply_method] [src].") + + var/makes_me_think = pick(strings("redpill.json", "redpill_questions")) + if(icon_state == "pill4" && prob(5)) //you take the red pill - you stay in Wonderland, and I show you how deep the rabbit hole goes + addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, M, "[makes_me_think]"), 50) + + log_combat(user, M, "fed", reagents.log_list()) + if(reagents.total_volume) + reagents.reaction(M, apply_type) + reagents.trans_to(M, reagents.total_volume) + qdel(src) + return 1 + + +/obj/item/reagent_containers/pill/afterattack(obj/target, mob/user , proximity) + . = ..() + if(!proximity) + return + if(!dissolvable || !target.is_refillable()) + return + if(target.is_drainable() && !target.reagents.total_volume) + to_chat(user, "[target] is empty! There's nothing to dissolve [src] in.") + return + + if(target.reagents.holder_full()) + to_chat(user, "[target] is full.") + return + + to_chat(user, "You dissolve [src] in [target].") + for(var/mob/O in viewers(2, user)) //viewers is necessary here because of the small radius + to_chat(O, "[user] slips something into [target]!") + reagents.trans_to(target, reagents.total_volume) + qdel(src) + +/obj/item/reagent_containers/pill/tox + name = "toxins pill" + desc = "Highly toxic." + icon_state = "pill5" + list_reagents = list("toxin" = 50) + roundstart = 1 + +/obj/item/reagent_containers/pill/cyanide + name = "cyanide pill" + desc = "Don't swallow this." + icon_state = "pill5" + list_reagents = list("cyanide" = 50) + roundstart = 1 + +/obj/item/reagent_containers/pill/adminordrazine + name = "adminordrazine pill" + desc = "It's magic. We don't have to explain it." + icon_state = "pill16" + list_reagents = list("adminordrazine" = 50) + roundstart = 1 + +/obj/item/reagent_containers/pill/morphine + name = "morphine pill" + desc = "Commonly used to treat insomnia." + icon_state = "pill8" + list_reagents = list("morphine" = 30) + roundstart = 1 + +/obj/item/reagent_containers/pill/stimulant + name = "stimulant pill" + desc = "Often taken by overworked employees, athletes, and the inebriated. You'll snap to attention immediately!" + icon_state = "pill19" + list_reagents = list("ephedrine" = 10, "antihol" = 10, "coffee" = 30) + roundstart = 1 + +/obj/item/reagent_containers/pill/salbutamol + name = "salbutamol pill" + desc = "Used to treat oxygen deprivation." + icon_state = "pill16" + list_reagents = list("salbutamol" = 30) + roundstart = 1 + +/obj/item/reagent_containers/pill/charcoal + name = "charcoal pill" + desc = "Neutralizes many common toxins." + icon_state = "pill17" + list_reagents = list("charcoal" = 10) + roundstart = 1 + +/obj/item/reagent_containers/pill/epinephrine + name = "epinephrine pill" + desc = "Used to stabilize patients." + icon_state = "pill5" + list_reagents = list("epinephrine" = 15) + roundstart = 1 + +/obj/item/reagent_containers/pill/mannitol + name = "mannitol pill" + desc = "Used to treat brain damage." + icon_state = "pill17" + list_reagents = list("mannitol" = 50) + roundstart = 1 + +/obj/item/reagent_containers/pill/mutadone + name = "mutadone pill" + desc = "Used to treat genetic damage." + icon_state = "pill20" + list_reagents = list("mutadone" = 50) + roundstart = 1 + +/obj/item/reagent_containers/pill/salicyclic + name = "salicylic acid pill" + desc = "Used to dull pain." + icon_state = "pill9" + list_reagents = list("sal_acid" = 24) + roundstart = 1 + +/obj/item/reagent_containers/pill/oxandrolone + name = "oxandrolone pill" + desc = "Used to stimulate burn healing." + icon_state = "pill11" + list_reagents = list("oxandrolone" = 24) + roundstart = 1 + +/obj/item/reagent_containers/pill/insulin + name = "insulin pill" + desc = "Handles hyperglycaemic coma." + icon_state = "pill18" + list_reagents = list("insulin" = 50) + roundstart = 1 + +/obj/item/reagent_containers/pill/psicodine + name = "psicodine pill" + desc = "Used to treat mental instability and traumas." + list_reagents = list("psicodine" = 10) + icon_state = "pill22" + roundstart = 1 + +/obj/item/reagent_containers/pill/antirad + name = "potassium iodide pill" + desc = "Used to treat radition used to counter radiation poisoning." + icon_state = "pill18" + list_reagents = list("potass_iodide" = 50) + roundstart = 1 + +/obj/item/reagent_containers/pill/antirad_plus + name = "prussian blue pill" + desc = "Used to treat heavy radition poisoning." + icon = 'modular_citadel/icons/obj/modularpills.dmi' + icon_state = "prussian_blue" + list_reagents = list("prussian_blue" = 25, "water" = 10) + roundstart = 1 + +/obj/item/reagent_containers/pill/mutarad + name = "radiation treatment deluxe pill" + desc = "Used to treat heavy radition poisoning and genetic defects." + icon = 'modular_citadel/icons/obj/modularpills.dmi' + icon_state = "anit_rad_fixgene" + list_reagents = list("prussian_blue" = 15, "potass_iodide" = 15, "mutadone" = 15, "water" = 5) + roundstart = 1 + +///////////////////////////////////////// this pill is used only in a legion mob drop +/obj/item/reagent_containers/pill/shadowtoxin + name = "black pill" + desc = "I wouldn't eat this if I were you." + icon_state = "pill9" + color = "#454545" + list_reagents = list("shadowmutationtoxin" = 1) +//////////////////////////////////////// drugs +/obj/item/reagent_containers/pill/zoom + name = "zoom pill" + list_reagents = list("synaptizine" = 10, "nicotine" = 10, "methamphetamine" = 1) + + +/obj/item/reagent_containers/pill/happy + name = "happy pill" + list_reagents = list("sugar" = 10, "space_drugs" = 10) + + +/obj/item/reagent_containers/pill/lsd + name = "hallucinogen pill" + list_reagents = list("mushroomhallucinogen" = 15, "mindbreaker" = 15) + + +/obj/item/reagent_containers/pill/aranesp + name = "speedy pill" + list_reagents = list("aranesp" = 10) + +/obj/item/reagent_containers/pill/happiness + name = "happiness pill" + desc = "It has a creepy smiling face on it." + icon_state = "pill_happy" + list_reagents = list("happiness" = 10) + +/obj/item/reagent_containers/pill/floorpill + name = "floorpill" + desc = "A strange pill found in the depths of maintenance" + icon_state = "pill21" + var/static/list/names = list("maintenance pill","floorpill","mystery pill","suspicious pill","strange pill") + var/static/list/descs = list("Your feeling is telling you no, but...","Drugs are expensive, you can't afford not to eat any pills that you find."\ + , "Surely, there's no way this could go bad.") + +/obj/item/reagent_containers/pill/floorpill/Initialize() + list_reagents = list(get_random_reagent_id() = rand(10,50)) + . = ..() + name = pick(names) + if(prob(20)) + desc = pick(descs) + +/obj/item/reagent_containers/pill/get_belt_overlay() + return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch") + +/obj/item/reagent_containers/pill/penis_enlargement + name = "penis enlargement pill" + list_reagents = list("penis_enlarger" = 10) + +/obj/item/reagent_containers/pill/breast_enlargement + name = "breast enlargement pill" + list_reagents = list("breast_enlarger" = 10) diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index 871fd32b16..082b1a7d11 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -264,6 +264,13 @@ name = "disposal unit" desc = "A pneumatic waste disposal unit." icon_state = "disposal" + var/datum/oracle_ui/themed/nano/ui + +/obj/machinery/disposal/bin/Initialize(mapload, obj/structure/disposalconstruct/make_from) + . = ..() + ui = new /datum/oracle_ui/themed/nano(src, 330, 190, "disposal_bin") + ui.auto_refresh = TRUE + ui.can_resize = FALSE // attack by item places it in to disposal /obj/machinery/disposal/bin/attackby(obj/item/I, mob/user, params) @@ -275,32 +282,43 @@ STR.remove_from_storage(O,src) T.update_icon() update_icon() + ui.soft_update_fields() else + ui.soft_update_fields() return ..() // handle machine interaction -/obj/machinery/disposal/bin/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ - datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state) +/obj/machinery/disposal/bin/ui_interact(mob/user, state) if(stat & BROKEN) return - ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) - if(!ui) - ui = new(user, src, ui_key, "disposal_unit", name, 300, 200, master_ui, state) - ui.open() + if(user.loc == src) + to_chat(user, "You cannot reach the controls from inside!") + return + ui.render(user) -/obj/machinery/disposal/bin/ui_data(mob/user) +/obj/machinery/disposal/bin/oui_canview(mob/user) + if(user.loc == src) + return FALSE + if(stat & BROKEN) + return FALSE + if(Adjacent(user)) + return TRUE + return ..() + + +/obj/machinery/disposal/bin/oui_data(mob/user) var/list/data = list() - data["flush"] = flush - data["full_pressure"] = full_pressure - data["pressure_charging"] = pressure_charging - data["panel_open"] = panel_open - var/per = CLAMP(100* air_contents.return_pressure() / (SEND_PRESSURE), 0, 100) - data["per"] = round(per, 1) + data["flush"] = flush ? ui.act("Disengage", user, "handle-0", class="active") : ui.act("Engage", user, "handle-1") + data["full_pressure"] = full_pressure ? "Ready" : (pressure_charging ? "Pressurizing" : "Off") + data["pressure_charging"] = pressure_charging ? ui.act("Turn Off", user, "pump-0", class="active", disabled=full_pressure) : ui.act("Turn On", user, "pump-1", disabled=full_pressure) + var/per = full_pressure ? 100 : CLAMP(100* air_contents.return_pressure() / (SEND_PRESSURE), 0, 99) + data["per"] = "[round(per, 1)]%" + data["contents"] = ui.act("Eject Contents", user, "eject", disabled=contents.len < 1) data["isai"] = isAI(user) return data -/obj/machinery/disposal/bin/ui_act(action, params) +/obj/machinery/disposal/bin/oui_act(mob/user, action, list/params) if(..()) return @@ -327,6 +345,7 @@ if("eject") eject() . = TRUE + ui.soft_update_fields() /obj/machinery/disposal/bin/hitby(atom/movable/AM) @@ -346,6 +365,7 @@ full_pressure = FALSE pressure_charging = TRUE update_icon() + ui.soft_update_fields() /obj/machinery/disposal/bin/update_icon() cut_overlays() @@ -389,7 +409,7 @@ do_flush() flush_count = 0 - updateDialog() + ui.soft_update_fields() if(flush && air_contents.return_pressure() >= SEND_PRESSURE) // flush can happen even without power do_flush() diff --git a/code/modules/research/designs/comp_board_designs/comp_board_designs_cargo .dm b/code/modules/research/designs/comp_board_designs/comp_board_designs_cargo .dm index fd548adc76..b11a5ee258 100644 --- a/code/modules/research/designs/comp_board_designs/comp_board_designs_cargo .dm +++ b/code/modules/research/designs/comp_board_designs/comp_board_designs_cargo .dm @@ -32,4 +32,12 @@ id = "mining" build_path = /obj/item/circuitboard/computer/mining category = list("Computer Boards") - departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SECURITY \ No newline at end of file + departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SECURITY + +/datum/design/board/miningshuttle + name = "Computer Design (Mining Shuttle Console)" + desc = "Allows for the construction of circuit boards used to build a Mining Shuttle Console." + id = "miningshuttle" + build_path = /obj/item/circuitboard/computer/mining_shuttle + category = list("Computer Boards") + departmental_flags = DEPARTMENTAL_FLAG_CARGO \ No newline at end of file diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 3a7ef68903..d3db4f75b3 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -554,6 +554,16 @@ category = list("Medical Designs") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL +/datum/design/cybernetic_tongue + name = "Cybernetic tongue" + desc = "A fancy cybernetic tongue." + id = "cybernetic_tongue" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500) + build_path = /obj/item/organ/tongue/cybernetic + category = list("Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + ///////////////////// //Adv Surgery Tools// ///////////////////// @@ -732,6 +742,13 @@ surgery = /datum/surgery/advanced/reconstruction research_icon_state = "surgery_chest" +/datum/design/surgery/surgery_toxinhealing + name = "Body Rejuvenation" + desc = "A surgical procedure that helps deal with oxygen deprecation, and treat toxic damaged. Works on corpses and alive alike without chemicals." + id = "surgery_toxinhealing" + surgery = /datum/surgery/advanced/toxichealing + research_icon_state = "surgery_chest" + /datum/design/surgery/revival name = "Revival" desc = "An experimental surgical procedure which involves reconstruction and reactivation of the patient's brain even long after death. The body must still be able to sustain life." diff --git a/code/modules/research/designs/misc_designs.dm b/code/modules/research/designs/misc_designs.dm index d27c876f88..77eebca696 100644 --- a/code/modules/research/designs/misc_designs.dm +++ b/code/modules/research/designs/misc_designs.dm @@ -1,4 +1,3 @@ - ///////////////////////////////////////// /////////////////HUDs//////////////////// ///////////////////////////////////////// @@ -291,6 +290,16 @@ category = list("Equipment") departmental_flags = DEPARTMENTAL_FLAG_SERVICE +/datum/design/light_replacer + name = "Light Replacer" + desc = "A device to automatically replace lights. Refill with working light bulbs." + id = "light_replacer" + build_type = PROTOLATHE + materials = list(MAT_METAL = 1500, MAT_SILVER = 150, MAT_GLASS = 3000) + build_path = /obj/item/lightreplacer + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SERVICE + /datum/design/blutrash name = "Trashbag of Holding" desc = "An advanced trash bag with bluespace properties; capable of holding a plethora of garbage." @@ -370,6 +379,16 @@ ////////////Tools////////////// /////////////////////////////// +/datum/design/rcd_upgrade + name = "Advanced RCD designs upgrade" + desc = "Adds the computer frame and machine frame to the RCD." + id = "rcd_upgrade" + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_GLASS = 2500, MAT_SILVER = 1500, MAT_TITANIUM = 2000) + build_path = /obj/item/rcd_upgrade + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + /datum/design/exwelder name = "Experimental Welding Tool" desc = "An experimental welder capable of self-fuel generation." @@ -480,6 +499,16 @@ category = list("Equipment") departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING +/datum/design/pHmeter + name = "Chemical Analyser" + desc = "A a electrode attached to a small circuit box that will tell you the pH of a solution." + id = "pHmeter" + build_type = PROTOLATHE + materials = list(MAT_METAL = 1000, MAT_SILVER = 100, MAT_DIAMOND = 100) + build_path = /obj/item/fermichem/pHmeter + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE + ///////////////////////////////////////// ////////////Armour/////////////////////// ///////////////////////////////////////// diff --git a/code/modules/research/designs/power_designs.dm b/code/modules/research/designs/power_designs.dm index f8122c16e3..1dbd111785 100644 --- a/code/modules/research/designs/power_designs.dm +++ b/code/modules/research/designs/power_designs.dm @@ -57,16 +57,6 @@ category = list("Misc","Power Designs") departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING -/datum/design/light_replacer - name = "Light Replacer" - desc = "A device to automatically replace lights. Refill with working light bulbs." - id = "light_replacer" - build_type = PROTOLATHE - materials = list(MAT_METAL = 1500, MAT_SILVER = 150, MAT_GLASS = 3000) - build_path = /obj/item/lightreplacer - category = list("Power Designs") - departmental_flags = DEPARTMENTAL_FLAG_SERVICE - /datum/design/inducer name = "Inducer" desc = "The NT-75 Electromagnetic Power Inducer can wirelessly induce electric charge in an object, allowing you to recharge power cells without having to remove them." diff --git a/code/modules/research/nanites/nanite_programs/healing.dm b/code/modules/research/nanites/nanite_programs/healing.dm index d3a268047e..8aab7f1e2b 100644 --- a/code/modules/research/nanites/nanite_programs/healing.dm +++ b/code/modules/research/nanites/nanite_programs/healing.dm @@ -48,7 +48,7 @@ /datum/nanite_program/purging name = "Blood Purification" - desc = "The nanites purge toxins and chemicals from the host's bloodstream." + desc = "The nanites purge toxins and chemicals from the host's bloodstream, however it is dangerous to slimepeople biology due to inaccuracy." use_rate = 1 rogue_types = list(/datum/nanite_program/suffocating, /datum/nanite_program/necrotic) @@ -93,7 +93,7 @@ /datum/nanite_program/blood_restoring/check_conditions() if(iscarbon(host_mob)) var/mob/living/carbon/C = host_mob - if(C.blood_volume >= BLOOD_VOLUME_SAFE) + if(C.blood_volume >= (BLOOD_VOLUME_SAFE*C.blood_ratio)) return FALSE else return FALSE @@ -143,7 +143,7 @@ /datum/nanite_program/purging_advanced name = "Selective Blood Purification" desc = "The nanites purge toxins and dangerous chemicals from the host's bloodstream, while ignoring beneficial chemicals. \ - The added processing power required to analyze the chemicals severely increases the nanite consumption rate." + The added processing power required to analyze the chemicals severely increases the nanite consumption rate. Due to added complexity, it is safe with slimepeople biology." use_rate = 2 rogue_types = list(/datum/nanite_program/suffocating, /datum/nanite_program/necrotic) @@ -157,7 +157,7 @@ return ..() /datum/nanite_program/purging_advanced/active_effect() - host_mob.adjustToxLoss(-1) + host_mob.adjustToxLoss(-1, forced = TRUE) for(var/datum/reagent/toxin/R in host_mob.reagents.reagent_list) host_mob.reagents.remove_reagent(R.id,1) @@ -256,4 +256,3 @@ log_game("[C] has been successfully defibrillated by nanites.") else playsound(C, 'sound/machines/defib_failed.ogg', 50, 0) - diff --git a/code/modules/research/nanites/nanite_remote.dm b/code/modules/research/nanites/nanite_remote.dm index 60dd78cf94..824d033bf4 100644 --- a/code/modules/research/nanites/nanite_remote.dm +++ b/code/modules/research/nanites/nanite_remote.dm @@ -37,6 +37,7 @@ to_chat(user, "Access denied.") /obj/item/nanite_remote/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return to_chat(user, "You override [src]'s ID lock.") @@ -44,6 +45,7 @@ if(locked) locked = FALSE update_icon() + return TRUE /obj/item/nanite_remote/update_icon() . = ..() diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index cb5062904d..a7d7857a24 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -184,12 +184,14 @@ Nothing else in the console has ID requirements. ..() /obj/machinery/computer/rdconsole/emag_act(mob/user) - if(!(obj_flags & EMAGGED)) - to_chat(user, "You disable the security protocols[locked? " and unlock the console":""].") - playsound(src, "sparks", 75, 1) - obj_flags |= EMAGGED - locked = FALSE - return ..() + . = ..() + if(obj_flags & EMAGGED) + return + to_chat(user, "You disable the security protocols[locked? " and unlock the console":""].") + playsound(src, "sparks", 75, 1) + obj_flags |= EMAGGED + locked = FALSE + return TRUE /obj/machinery/computer/rdconsole/multitool_act(mob/user, obj/item/multitool/I) var/lathe = linked_lathe && linked_lathe.multitool_act(user, I) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 20e05782ef..b3e114d2ad 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -155,8 +155,10 @@ src.updateUsrDialog() /obj/machinery/computer/rdservercontrol/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return playsound(src, "sparks", 75, 1) obj_flags |= EMAGGED to_chat(user, "You disable the security protocols.") + return TRUE diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index c70ee8a16b..3721e7943e 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -69,7 +69,7 @@ display_name = "Advanced Biotechnology" description = "Advanced Biotechnology" prereq_ids = list("biotech") - design_ids = list("piercesyringe", "crewpinpointer", "smoke_machine", "plasmarefiller", "limbgrower", "defibrillator", "meta_beaker", "healthanalyzer_advanced","harvester","holobarrier_med","smartdartgun","medicinalsmartdart") + design_ids = list("piercesyringe", "crewpinpointer", "smoke_machine", "plasmarefiller", "limbgrower", "defibrillator", "meta_beaker", "healthanalyzer_advanced","harvester","holobarrier_med","smartdartgun","medicinalsmartdart", "pHmeter") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) export_price = 5000 @@ -115,7 +115,7 @@ display_name = "Advanced Surgery" description = "When simple medicine doesn't cut it." prereq_ids = list("adv_biotech") - design_ids = list("surgery_lobotomy", "surgery_reconstruction", "organbox") + design_ids = list("surgery_lobotomy", "surgery_reconstruction", "surgery_toxinhealing", "organbox") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) export_price = 5000 @@ -172,7 +172,7 @@ display_name = "Advanced Engineering" description = "Pushing the boundaries of physics, one chainsaw-fist at a time." prereq_ids = list("engineering", "emp_basic") - design_ids = list("engine_goggles", "magboots", "forcefield_projector", "weldingmask", "tray_goggles_prescription", "engine_goggles_prescription", "mesons_prescription") + design_ids = list("engine_goggles", "magboots", "forcefield_projector", "weldingmask", "tray_goggles_prescription", "engine_goggles_prescription", "mesons_prescription", "rcd_upgrade") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 4000) export_price = 5000 @@ -432,7 +432,7 @@ display_name = "Computer Consoles" description = "Computers and how they work." prereq_ids = list("datatheory") - design_ids = list("cargo", "cargorequest", "libraryconsole", "mining", "crewconsole", "rdcamera", "comconsole", "idcardconsole", "seccamera") + design_ids = list("cargo", "cargorequest", "libraryconsole", "mining", "miningshuttle", "crewconsole", "rdcamera", "comconsole", "idcardconsole", "seccamera") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2000) export_price = 5000 @@ -447,15 +447,6 @@ "portadrive_basic", "portadrive_advanced", "portadrive_super", "cardslot", "aislot", "miniprinter", "APClink", "bat_control", "bat_normal", "bat_advanced", "bat_super", "bat_micro", "bat_nano", "cpu_normal", "pcpu_normal", "cpu_small", "pcpu_small") -/datum/techweb_node/computer_board_gaming - id = "computer_board_gaming" - display_name = "Arcade Games" - description = "For the slackers on the station." - prereq_ids = list("comptech") - design_ids = list("arcade_battle", "arcade_orion", "slotmachine") // Magic money - research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1500) - export_price = 2000 - /datum/techweb_node/comp_recordkeeping id = "comp_recordkeeping" display_name = "Computerized Recordkeeping" @@ -526,7 +517,7 @@ display_name = "Cybernetic Organs" description = "We have the technology to rebuild him." prereq_ids = list("adv_biotech") - design_ids = list("cybernetic_heart", "cybernetic_liver", "cybernetic_liver_u", "cybernetic_lungs", "cybernetic_lungs_u") + design_ids = list("cybernetic_heart", "cybernetic_liver", "cybernetic_liver_u", "cybernetic_lungs", "cybernetic_lungs_u", "cybernetic_tongue") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) export_price = 5000 diff --git a/code/modules/research/xenobiology/crossbreeding/_weapons.dm b/code/modules/research/xenobiology/crossbreeding/_weapons.dm index 53857b214c..4753abff97 100644 --- a/code/modules/research/xenobiology/crossbreeding/_weapons.dm +++ b/code/modules/research/xenobiology/crossbreeding/_weapons.dm @@ -15,6 +15,7 @@ recharge_rate = 1 ammo_type = /obj/item/ammo_casing/magic/bloodchill fire_sound = 'sound/effects/attackblob.ogg' + total_mass = TOTAL_MASS_HAND_REPLACEMENT /obj/item/gun/magic/bloodchill/Initialize() . = ..() diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 0c957919a1..946f0fb9a4 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -63,11 +63,13 @@ to_chat(usr, "Unable to comply.") /obj/machinery/computer/shuttle/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return req_access = list() obj_flags |= EMAGGED to_chat(user, "You fried the consoles ID checking system.") + return TRUE /obj/machinery/computer/shuttle/proc/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE) if(port && (shuttleId == initial(shuttleId) || override)) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 020b4b29ab..119023d465 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -134,6 +134,8 @@ . = TRUE /obj/machinery/computer/emergency_shuttle/emag_act(mob/user) + . = ..() + // How did you even get on the shuttle before it go to the station? if(!IS_DOCKED) return @@ -159,6 +161,7 @@ authorized += ID process() + return TRUE /obj/machinery/computer/emergency_shuttle/Destroy() // Our fake IDs that the emag generated are just there for colour @@ -459,10 +462,12 @@ return /obj/machinery/computer/shuttle/pod/emag_act(mob/user) + . = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) if(obj_flags & EMAGGED) return obj_flags |= EMAGGED to_chat(user, "You fry the pod's alert level checking system.") + return TRUE /obj/machinery/computer/shuttle/pod/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE) . = ..() diff --git a/code/modules/shuttle/ferry.dm b/code/modules/shuttle/ferry.dm index 06e38bb3eb..39ab087f9c 100644 --- a/code/modules/shuttle/ferry.dm +++ b/code/modules/shuttle/ferry.dm @@ -12,7 +12,7 @@ /obj/machinery/computer/shuttle/ferry/emag_act(mob/user) if(!allow_emag) to_chat(user, "[src]'s security firewall is far too powerful for you to bypass.") - return FALSE + return SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) return ..() /obj/machinery/computer/shuttle/ferry/attack_ai() diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index a6904c28cc..dd2d7483e3 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -179,7 +179,7 @@ All ShuttleMove procs go here for(var/obj/machinery/door/airlock/A in range(1, src)) // includes src A.shuttledocked = FALSE A.air_tight = TRUE - INVOKE_ASYNC(A, /obj/machinery/door/.proc/close) + addtimer(CALLBACK(A, /obj/machinery/door/.proc/close), 0) /obj/machinery/door/airlock/afterShuttleMove(turf/oldT, list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir, rotation) . = ..() diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index d1435a554c..9bea790957 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -48,7 +48,7 @@ return /obj/machinery/power/emitter/energycannon/magical/emag_act(mob/user) - return + return SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) /obj/structure/table/abductor/wabbajack name = "wabbajack altar" diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index b54fceb3e7..2249f5f10e 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -60,6 +60,10 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( for(var/a in T.GetAllContents()) if(is_type_in_typecache(a, GLOB.blacklisted_cargo_types)) return FALSE + if(istype(a, /obj/structure/closet))//Prevents eigenlockers from ending up at CC + var/obj/structure/closet/c = a + if(c.eigen_teleport == TRUE) + return FALSE return TRUE /obj/docking_port/mobile/supply/request(obj/docking_port/stationary/S) diff --git a/code/modules/spells/spell_types/shapeshift.dm b/code/modules/spells/spell_types/shapeshift.dm index 88c6ce175f..1576c55326 100644 --- a/code/modules/spells/spell_types/shapeshift.dm +++ b/code/modules/spells/spell_types/shapeshift.dm @@ -15,7 +15,6 @@ var/die_with_shapeshifted_form = TRUE var/convert_damage = FALSE //If you want to convert the caster's health to the shift, and vice versa. var/convert_damage_type = BRUTE //Since simplemobs don't have advanced damagetypes, what to convert damage back into. - var/shapeshift_type var/list/possible_shapes = list(/mob/living/simple_animal/mouse,\ /mob/living/simple_animal/pet/dog/corgi,\ @@ -167,4 +166,4 @@ /datum/soullink/shapeshift/sharerDies(gibbed, mob/living/sharer) if(source) - source.shapeDeath(gibbed) \ No newline at end of file + source.shapeDeath(gibbed) diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm index be88d0ecdc..b09dee04c7 100644 --- a/code/modules/station_goals/shield.dm +++ b/code/modules/station_goals/shield.dm @@ -198,9 +198,11 @@ change_meteor_chance(0.5) /obj/machinery/satellite/meteor_shield/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED to_chat(user, "You access the satellite's debug mode, increasing the chance of meteor strikes.") if(active) change_meteor_chance(4) + return TRUE diff --git a/code/modules/surgery/advanced/bioware/nerve_grounding.dm b/code/modules/surgery/advanced/bioware/nerve_grounding.dm index f4b23c89b1..99902ff6d6 100644 --- a/code/modules/surgery/advanced/bioware/nerve_grounding.dm +++ b/code/modules/surgery/advanced/bioware/nerve_grounding.dm @@ -17,10 +17,14 @@ time = 155 /datum/surgery_step/ground_nerves/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] starts splicing together [target]'s nerves.", "You start splicing together [target]'s nerves.") + display_results(user, target, "You start rerouting [target]'s nerves.", + "[user] starts rerouting [target]'s nerves.", + "[user] starts manipulating [target]'s nervous system.") /datum/surgery_step/ground_nerves/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] successfully splices [target]'s nervous system!", "You successfully splice [target]'s nervous system!") + display_results(user, target, "You successfully reroute [target]'s nervous system!", + "[user] successfully reroutes [target]'s nervous system!", + "[user] finishes manipulating [target]'s nervous system.") new /datum/bioware/grounded_nerves(target) return TRUE @@ -37,4 +41,4 @@ /datum/bioware/grounded_nerves/on_lose() ..() - owner.physiology.siemens_coeff = prev_coeff \ No newline at end of file + owner.physiology.siemens_coeff = prev_coeff diff --git a/code/modules/surgery/advanced/bioware/nerve_splicing.dm b/code/modules/surgery/advanced/bioware/nerve_splicing.dm index 6192786cc4..e6e66e1b6e 100644 --- a/code/modules/surgery/advanced/bioware/nerve_splicing.dm +++ b/code/modules/surgery/advanced/bioware/nerve_splicing.dm @@ -10,17 +10,20 @@ /datum/surgery_step/close) possible_locs = list(BODY_ZONE_CHEST) bioware_target = BIOWARE_NERVES - /datum/surgery_step/splice_nerves name = "splice nerves" accept_hand = TRUE time = 155 /datum/surgery_step/splice_nerves/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] starts splicing together [target]'s nerves.", "You start splicing together [target]'s nerves.") + display_results(user, target, "You start splicing together [target]'s nerves.", + "[user] starts splicing together [target]'s nerves.", + "[user] starts manipulating [target]'s nervous system.") /datum/surgery_step/splice_nerves/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] successfully splices [target]'s nervous system!", "You successfully splice [target]'s nervous system!") + display_results(user, target, "You successfully splice [target]'s nervous system!", + "[user] successfully splices [target]'s nervous system!", + "[user] finishes manipulating [target]'s nervous system.") new /datum/bioware/spliced_nerves(target) return TRUE @@ -28,11 +31,9 @@ name = "Spliced Nerves" desc = "Nerves are connected to each other multiple times, greatly reducing the impact of stunning effects." mod_type = BIOWARE_NERVES - /datum/bioware/spliced_nerves/on_gain() ..() owner.physiology.stun_mod *= 0.5 - /datum/bioware/spliced_nerves/on_lose() ..() - owner.physiology.stun_mod *= 2 \ No newline at end of file + owner.physiology.stun_mod *= 2 diff --git a/code/modules/surgery/advanced/bioware/vein_threading.dm b/code/modules/surgery/advanced/bioware/vein_threading.dm index 7a03833c51..fc0868c116 100644 --- a/code/modules/surgery/advanced/bioware/vein_threading.dm +++ b/code/modules/surgery/advanced/bioware/vein_threading.dm @@ -10,17 +10,20 @@ /datum/surgery_step/close) possible_locs = list(BODY_ZONE_CHEST) bioware_target = BIOWARE_CIRCULATION - /datum/surgery_step/thread_veins name = "thread veins" accept_hand = TRUE time = 125 /datum/surgery_step/thread_veins/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] starts weaving [target]'s circulatory system.", "You start weaving [target]'s circulatory system.") + display_results(user, target, "You start weaving [target]'s circulatory system.", + "[user] starts weaving [target]'s circulatory system.", + "[user] starts manipulating [target]'s circulatory system.") /datum/surgery_step/thread_veins/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] weaves [target]'s circulatory system into a resistant mesh!", "You weave [target]'s circulatory system into a resistant mesh!") + display_results(user, target, "You weave [target]'s circulatory system into a resistant mesh!", + "[user] weaves [target]'s circulatory system into a resistant mesh!", + "[user] finishes manipulating [target]'s circulatory system.") new /datum/bioware/threaded_veins(target) return TRUE @@ -28,11 +31,9 @@ name = "Threaded Veins" desc = "The circulatory system is woven into a mesh, severely reducing the amount of blood lost from wounds." mod_type = BIOWARE_CIRCULATION - /datum/bioware/threaded_veins/on_gain() ..() owner.physiology.bleed_mod *= 0.25 - /datum/bioware/threaded_veins/on_lose() ..() - owner.physiology.bleed_mod *= 4 \ No newline at end of file + owner.physiology.bleed_mod *= 4 diff --git a/code/modules/surgery/advanced/brainwashing.dm b/code/modules/surgery/advanced/brainwashing.dm index 23783f1bf2..730a912189 100644 --- a/code/modules/surgery/advanced/brainwashing.dm +++ b/code/modules/surgery/advanced/brainwashing.dm @@ -2,7 +2,6 @@ name = "Brainwashing Surgery Disk" desc = "The disk provides instructions on how to impress an order on a brain, making it the primary objective of the patient." surgeries = list(/datum/surgery/advanced/brainwashing) - /datum/surgery/advanced/brainwashing name = "Brainwashing" desc = "A surgical procedure which directly implants a directive into the patient's brain, making it their absolute priority. It can be cleared using a mindshield implant." @@ -13,10 +12,9 @@ /datum/surgery_step/clamp_bleeders, /datum/surgery_step/brainwash, /datum/surgery_step/close) - + species = list(/mob/living/carbon/human) possible_locs = list(BODY_ZONE_HEAD) - /datum/surgery/advanced/brainwashing/can_start(mob/user, mob/living/carbon/target) if(!..()) return FALSE @@ -24,27 +22,29 @@ if(!B) return FALSE return TRUE - /datum/surgery_step/brainwash name = "brainwash" implements = list(/obj/item/hemostat = 85, TOOL_WIRECUTTER = 50, /obj/item/stack/packageWrap = 35, /obj/item/stack/cable_coil = 15) time = 200 var/objective - /datum/surgery_step/brainwash/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) objective = stripped_input(user, "Choose the objective to imprint on your victim's brain.", "Brainwashing", null, MAX_MESSAGE_LEN) if(!objective) return -1 - user.visible_message("[user] begins to tinker with [target]'s brain.", "You begin to brainwash [target]...") + display_results(user, target, "You begin to brainwash [target]...", + "[user] begins to fix [target]'s brain.", + "[user] begins to perform surgery on [target]'s brain.") /datum/surgery_step/brainwash/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(!target.mind) - user.visible_message("[target] doesn't respond to the brainwashing, as if [target.p_they()] lacked a mind...") + to_chat(user, "[target] doesn't respond to the brainwashing, as if [target.p_they()] lacked a mind...") return FALSE if(HAS_TRAIT(target, TRAIT_MINDSHIELD)) - user.visible_message("You hear a faint buzzing from a device inside [target]'s brain, and the brainwashing is erased.") + to_chat(user, "You hear a faint buzzing from a device inside [target]'s brain, and the brainwashing is erased.") return FALSE - user.visible_message("[user] successfully brainwashes [target]!", "You succeed in brainwashing [target].") + display_results(user, target, "You succeed in brainwashing [target].", + "[user] successfully fixes [target]'s brain!", + "[user] completes the surgery on [target]'s brain.") to_chat(target, "A new compulsion fills your mind... you feel forced to obey it!") brainwash(target, objective) message_admins("[ADMIN_LOOKUPFLW(user)] surgically brainwashed [ADMIN_LOOKUPFLW(target)] with the objective '[objective]'.") @@ -53,8 +53,10 @@ /datum/surgery_step/brainwash/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(target.getorganslot(ORGAN_SLOT_BRAIN)) - user.visible_message("[user] damages some brain tissue!", "You bruise some brain tissue!") + display_results(user, target, "You screw up, bruising the brain tissue!", + "[user] screws up, causing brain damage!", + "[user] completes the surgery on [target]'s brain.") target.adjustBrainLoss(40) else user.visible_message("[user] suddenly notices that the brain [user.p_they()] [user.p_were()] working on is not there anymore.", "You suddenly notice that the brain you were working on is not there anymore.") - return FALSE \ No newline at end of file + return FALSE diff --git a/code/modules/surgery/advanced/lobotomy.dm b/code/modules/surgery/advanced/lobotomy.dm index f74346b193..1c09f5f7da 100644 --- a/code/modules/surgery/advanced/lobotomy.dm +++ b/code/modules/surgery/advanced/lobotomy.dm @@ -12,7 +12,6 @@ species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) possible_locs = list(BODY_ZONE_HEAD) requires_bodypart_type = 0 - /datum/surgery/advanced/lobotomy/can_start(mob/user, mob/living/carbon/target) if(!..()) return FALSE @@ -20,23 +19,25 @@ if(!B) return FALSE return TRUE - /datum/surgery_step/lobotomize name = "perform lobotomy" implements = list(/obj/item/scalpel = 85, /obj/item/melee/transforming/energy/sword = 55, /obj/item/kitchen/knife = 35, /obj/item/shard = 25, /obj/item = 20) time = 100 - /datum/surgery_step/lobotomize/tool_check(mob/user, obj/item/tool) if(implement_type == /obj/item && !tool.is_sharp()) return FALSE return TRUE /datum/surgery_step/lobotomize/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to cut a piece of [target]'s brain.", "You begin to cut a piece of [target]'s brain...") + display_results(user, target, "You begin to perform a lobotomy on [target]'s brain...", + "[user] begins to perform a lobotomy on [target]'s brain.", + "[user] begins to perform surgery on [target]'s brain.") /datum/surgery_step/lobotomize/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] successfully lobotomizes [target]!", "You succeed in lobotomizing [target].") + display_results(user, target, "You succeed in lobotomizing [target].", + "[user] successfully lobotomizes [target]!", + "[user] completes the surgery on [target]'s brain.") target.cure_all_traumas(TRAUMA_RESILIENCE_LOBOTOMY) if(target.mind && target.mind.has_antag_datum(/datum/antagonist/brainwashed)) target.mind.remove_antag_datum(/datum/antagonist/brainwashed) @@ -51,7 +52,9 @@ /datum/surgery_step/lobotomize/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(target.getorganslot(ORGAN_SLOT_BRAIN)) - user.visible_message("[user] removes the wrong part, causing more damage!", "You remove the wrong part, causing more damage!") + display_results(user, target, "You remove the wrong part, causing more damage!", + "[user] successfully lobotomizes [target]!", + "[user] completes the surgery on [target]'s brain.") target.adjustBrainLoss(80) switch(rand(1,3)) if(1) @@ -62,4 +65,4 @@ target.gain_trauma_type(BRAIN_TRAUMA_SPECIAL, TRAUMA_RESILIENCE_MAGIC) else user.visible_message("[user] suddenly notices that the brain [user.p_they()] [user.p_were()] working on is not there anymore.", "You suddenly notice that the brain you were working on is not there anymore.") - return FALSE \ No newline at end of file + return FALSE diff --git a/code/modules/surgery/advanced/necrotic_revival.dm b/code/modules/surgery/advanced/necrotic_revival.dm index a88bb51b31..8c57930252 100644 --- a/code/modules/surgery/advanced/necrotic_revival.dm +++ b/code/modules/surgery/advanced/necrotic_revival.dm @@ -7,9 +7,7 @@ /datum/surgery_step/clamp_bleeders, /datum/surgery_step/bionecrosis, /datum/surgery_step/close) - possible_locs = list(BODY_ZONE_HEAD) - /datum/surgery/advanced/necrotic_revival/can_start(mob/user, mob/living/carbon/target) . = ..() var/obj/item/organ/zombie_infection/ZI = target.getorganslot(ORGAN_SLOT_ZOMBIE) @@ -19,16 +17,21 @@ /datum/surgery_step/bionecrosis name = "start bionecrosis" implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15) + implements = list(/obj/item/reagent_containers/syringe = 100, /obj/item/pen = 30) time = 50 chems_needed = list("zombiepowder", "rezadone") require_all_chems = FALSE /datum/surgery_step/bionecrosis/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to stimulate [target]'s brain.", "You begin to stimulate [target]'s brain...") + display_results(user, target, "You begin to grow a romerol tumor on [target]'s brain...", + "[user] begins to tinker with [target]'s brain...", + "[user] begins to perform surgery on [target]'s brain.") /datum/surgery_step/bionecrosis/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] successfully grows a necrotic tumor on [target]'s brain!", "You succeed in growing a necrotic tumor on [target]'s brain.") + display_results(user, target, "You succeed in growing a romerol tumor on [target]'s brain.", + "[user] successfully grows a romerol tumor on [target]'s brain!", + "[user] completes the surgery on [target]'s brain.") if(!target.getorganslot(ORGAN_SLOT_ZOMBIE)) var/obj/item/organ/zombie_infection/ZI = new() ZI.Insert(target) - return TRUE \ No newline at end of file + return TRUE diff --git a/code/modules/surgery/advanced/pacification.dm b/code/modules/surgery/advanced/pacification.dm index 15e34d003c..d5585d71a8 100644 --- a/code/modules/surgery/advanced/pacification.dm +++ b/code/modules/surgery/advanced/pacification.dm @@ -7,31 +7,34 @@ /datum/surgery_step/clamp_bleeders, /datum/surgery_step/pacify, /datum/surgery_step/close) - species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) possible_locs = list(BODY_ZONE_HEAD) requires_bodypart_type = 0 - /datum/surgery/advanced/pacify/can_start(mob/user, mob/living/carbon/target) . = ..() var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN) if(!B) return FALSE - /datum/surgery_step/pacify name = "rewire brain" implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15) time = 40 /datum/surgery_step/pacify/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to reshape [target]'s brain.", "You begin to reshape [target]'s brain...") + display_results(user, target, "You begin to pacify [target]...", + "[user] begins to fix [target]'s brain.", + "[user] begins to perform surgery on [target]'s brain.") /datum/surgery_step/pacify/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] reshapes [target]'s brain!", "You succeed in reshaping [target]'s brain.") + display_results(user, target, "You succeed in neurologically pacifying [target].", + "[user] successfully fixes [target]'s brain!", + "[user] completes the surgery on [target]'s brain.") target.gain_trauma(/datum/brain_trauma/severe/pacifism, TRAUMA_RESILIENCE_LOBOTOMY) return TRUE /datum/surgery_step/pacify/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] reshapes [target]'s brain!", "You screwed up, and rewired [target]'s brain the wrong way around...") + display_results(user, target, "You screw up, rewiring [target]'s brain the wrong way around...", + "[user] screws up, causing brain damage!", + "[user] completes the surgery on [target]'s brain.") target.gain_trauma_type(BRAIN_TRAUMA_SEVERE, TRAUMA_RESILIENCE_LOBOTOMY) - return FALSE \ No newline at end of file + return FALSE diff --git a/code/modules/surgery/advanced/revival.dm b/code/modules/surgery/advanced/revival.dm index ebda8a04e2..01c30f174a 100644 --- a/code/modules/surgery/advanced/revival.dm +++ b/code/modules/surgery/advanced/revival.dm @@ -8,11 +8,9 @@ /datum/surgery_step/incise, /datum/surgery_step/revive, /datum/surgery_step/close) - species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) possible_locs = list(BODY_ZONE_HEAD) requires_bodypart_type = 0 - /datum/surgery/advanced/revival/can_start(mob/user, mob/living/carbon/target) if(!..()) return FALSE @@ -24,12 +22,10 @@ if(!B) return FALSE return TRUE - /datum/surgery_step/revive name = "electrically stimulate brain" implements = list(/obj/item/twohanded/shockpaddles = 100, /obj/item/abductor/gizmo = 100, /obj/item/melee/baton = 75, /obj/item/organ/cyberimp/arm/baton = 75, /obj/item/organ/cyberimp/arm/gun/taser = 60, /obj/item/gun/energy/e_gun/advtaser = 60, /obj/item/gun/energy/taser = 60) time = 120 - /datum/surgery_step/revive/tool_check(mob/user, obj/item/tool) . = TRUE if(istype(tool, /obj/item/twohanded/shockpaddles)) @@ -51,25 +47,33 @@ return FALSE /datum/surgery_step/revive/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] prepares to shock [target]'s brain with [tool].", "You prepare to give [target]'s brain the spark of life with [tool].") + display_results(user, target, "You prepare to give [target]'s brain the spark of life with [tool].", + "[user] prepares to shock [target]'s brain with [tool].", + "[user] prepares to shock [target]'s brain with [tool].") target.notify_ghost_cloning("Someone is trying to zap your brain. Re-enter your corpse if you want to be revived!", source = target) /datum/surgery_step/revive/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] send a powerful shock to [target]'s brain with [tool]...", "You successfully shock [target]'s brain with [tool]...") + display_results(user, target, "You successfully shock [target]'s brain with [tool]...", + "[user] send a powerful shock to [target]'s brain with [tool]...", + "[user] send a powerful shock to [target]'s brain with [tool]...") playsound(get_turf(target), 'sound/magic/lightningbolt.ogg', 50, 1) target.adjustOxyLoss(-50, 0) target.updatehealth() if(target.revive()) user.visible_message("...[target] wakes up, alive and aware!", "IT'S ALIVE!") + target.visible_message("...[target] wakes up, alive and aware!") target.emote("gasp") target.adjustBrainLoss(50, 199) //MAD SCIENCE return TRUE else user.visible_message("...[target.p_they()] convulses, then lies still.") + target.visible_message("...[target.p_they()] convulses, then lies still.") return FALSE /datum/surgery_step/revive/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] send a powerful shock to [target]'s brain with [tool], but [target.p_they()] doesn't react.", "You shock [target]'s brain with [tool], but [target.p_they()] doesn't react.") + display_results(user, target, "You shock [target]'s brain with [tool], but [target.p_they()] doesn't react.", + "[user] send a powerful shock to [target]'s brain with [tool], but [target.p_they()] doesn't react.", + "[user] send a powerful shock to [target]'s brain with [tool], but [target.p_they()] doesn't react.") playsound(get_turf(target), 'sound/magic/lightningbolt.ogg', 50, 1) target.adjustBrainLoss(15, 199) - return FALSE \ No newline at end of file + return FALSE diff --git a/code/modules/surgery/advanced/toxichealing.dm b/code/modules/surgery/advanced/toxichealing.dm new file mode 100644 index 0000000000..a82287831c --- /dev/null +++ b/code/modules/surgery/advanced/toxichealing.dm @@ -0,0 +1,37 @@ +/datum/surgery/advanced/toxichealing + name = "Body Rejuvenation" + desc = "A surgical procedure that helps deal with oxygen deprecation, and treat toxic damaged. Works on corpses and alive alike without chemicals." + steps = list(/datum/surgery_step/incise, + /datum/surgery_step/incise, + /datum/surgery_step/retract_skin, + /datum/surgery_step/incise, + /datum/surgery_step/clamp_bleeders, + /datum/surgery_step/incise, + /datum/surgery_step/retract_skin, + /datum/surgery_step/toxichealing, + /datum/surgery_step/close) + + species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) + possible_locs = list(BODY_ZONE_CHEST) + requires_bodypart_type = 0 + +/datum/surgery_step/toxichealing + name = "rejuvenate body" + implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15) + repeatable = TRUE + time = 25 + +/datum/surgery_step/toxichealing/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + user.visible_message("[user] starts rejuvenating some of [target]'s flesh back to life.", "You start knitting some of [target]'s flesh back to life.") + +/datum/surgery_step/toxichealing/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + user.visible_message("[user] fixes some of [target]'s wounds.", "You succeed in fixing some of [target]'s wounds.") + target.heal_bodypart_damage(0,0,30) //Heals stam + target.adjustToxLoss(-15, 0, TRUE) + target.adjustOxyLoss(-20, 0) + return TRUE + +/datum/surgery_step/toxichealing/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + user.visible_message("[user] screws up!", "You screwed up!") + target.take_bodypart_damage(25,0) + return FALSE \ No newline at end of file diff --git a/code/modules/surgery/advanced/viral_bonding.dm b/code/modules/surgery/advanced/viral_bonding.dm index 115f8a2eed..b87d5e001c 100644 --- a/code/modules/surgery/advanced/viral_bonding.dm +++ b/code/modules/surgery/advanced/viral_bonding.dm @@ -7,17 +7,14 @@ /datum/surgery_step/incise, /datum/surgery_step/viral_bond, /datum/surgery_step/close) - species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) possible_locs = list(BODY_ZONE_CHEST) - /datum/surgery/advanced/viral_bonding/can_start(mob/user, mob/living/carbon/target) if(!..()) return FALSE if(!LAZYLEN(target.diseases)) return FALSE return TRUE - /datum/surgery_step/viral_bond name = "viral bond" implements = list(/obj/item/cautery = 100, TOOL_WELDER = 50, /obj/item = 30) // 30% success with any hot item. @@ -27,15 +24,18 @@ /datum/surgery_step/viral_bond/tool_check(mob/user, obj/item/tool) if(implement_type == TOOL_WELDER || implement_type == /obj/item) return tool.is_hot() - return TRUE /datum/surgery_step/viral_bond/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] starts heating [target]'s bone marrow with [tool]...", "You start heating [target]'s bone marrow with [tool]...") + display_results(user, target, "You start heating [target]'s bone marrow with [tool]...", + "[user] starts heating [target]'s bone marrow with [tool]...", + "[user] starts heating something in [target]'s chest with [tool]...") /datum/surgery_step/viral_bond/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[target]'s bone marrow begins pulsing slowly.", "[target]'s bone marrow begins pulsing slowly. The viral bonding is complete.") + display_results(user, target, "[target]'s bone marrow begins pulsing slowly. The viral bonding is complete.", + "[target]'s bone marrow begins pulsing slowly.", + "[user] finishes the operation.") for(var/X in target.diseases) var/datum/disease/D = X D.carrier = TRUE - return TRUE \ No newline at end of file + return TRUE diff --git a/code/modules/surgery/amputation.dm b/code/modules/surgery/amputation.dm index 8465a6d332..01cf6ae112 100644 --- a/code/modules/surgery/amputation.dm +++ b/code/modules/surgery/amputation.dm @@ -1,25 +1,25 @@ - /datum/surgery/amputation - name = "amputation" + name = "Amputation" steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/saw, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/sever_limb) species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) possible_locs = list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_HEAD) requires_bodypart_type = 0 - - /datum/surgery_step/sever_limb name = "sever limb" implements = list(/obj/item/scalpel = 100, /obj/item/circular_saw = 100, /obj/item/melee/transforming/energy/sword/cyborg/saw = 100, /obj/item/melee/arm_blade = 80, /obj/item/twohanded/required/chainsaw = 80, /obj/item/mounted_chainsaw = 80, /obj/item/twohanded/fireaxe = 50, /obj/item/hatchet = 40, /obj/item/kitchen/knife/butcher = 25) time = 64 /datum/surgery_step/sever_limb/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to sever [target]'s [parse_zone(target_zone)]!", "You begin to sever [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to sever [target]'s [parse_zone(target_zone)]...", + "[user] begins to sever [target]'s [parse_zone(target_zone)]!", + "[user] begins to sever [target]'s [parse_zone(target_zone)]!") /datum/surgery_step/sever_limb/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) var/mob/living/carbon/human/L = target - user.visible_message("[user] severs [L]'s [parse_zone(target_zone)]!", "You sever [L]'s [parse_zone(target_zone)].") + display_results(user, target, "You sever [L]'s [parse_zone(target_zone)].", + "[user] severs [L]'s [parse_zone(target_zone)]!", + "[user] severs [L]'s [parse_zone(target_zone)]!") if(surgery.operated_bodypart) var/obj/item/bodypart/target_limb = surgery.operated_bodypart target_limb.drop_limb() - - return 1 \ No newline at end of file + return 1 diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index a97a133685..81b491e6de 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -354,7 +354,8 @@ if("mam_body_markings" in S.default_features) var/datum/sprite_accessory/Smark Smark = GLOB.mam_body_markings_list[H.dna.features["mam_body_markings"]] - body_markings_icon = Smark.icon + if(Smark) + body_markings_icon = Smark.icon if(H.dna.features.["mam_body_markings"] != "None") body_markings = lowertext(H.dna.features.["mam_body_markings"]) auxmarking = lowertext(H.dna.features.["mam_body_markings"]) diff --git a/code/modules/surgery/brain_surgery.dm b/code/modules/surgery/brain_surgery.dm index fcd626ad97..e65271576d 100644 --- a/code/modules/surgery/brain_surgery.dm +++ b/code/modules/surgery/brain_surgery.dm @@ -1,5 +1,5 @@ /datum/surgery/brain_surgery - name = "brain surgery" + name = "Brain surgery" steps = list( /datum/surgery_step/incise, /datum/surgery_step/retract_skin, @@ -7,16 +7,13 @@ /datum/surgery_step/clamp_bleeders, /datum/surgery_step/fix_brain, /datum/surgery_step/close) - species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) possible_locs = list(BODY_ZONE_HEAD) requires_bodypart_type = 0 - /datum/surgery_step/fix_brain name = "fix brain" implements = list(/obj/item/hemostat = 85, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15) //don't worry, pouring some alcohol on their open brain will get that chance to 100 time = 120 //long and complicated - /datum/surgery/brain_surgery/can_start(mob/user, mob/living/carbon/target) var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN) if(!B) @@ -24,10 +21,14 @@ return TRUE /datum/surgery_step/fix_brain/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to fix [target]'s brain.", "You begin to fix [target]'s brain...") + display_results(user, target, "You begin to fix [target]'s brain...", + "[user] begins to fix [target]'s brain.", + "[user] begins to perform surgery on [target]'s brain.") /datum/surgery_step/fix_brain/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] successfully fixes [target]'s brain!", "You succeed in fixing [target]'s brain.") + display_results(user, target, "You succeed in fixing [target]'s brain.", + "[user] successfully fixes [target]'s brain!", + "[user] completes the surgery on [target]'s brain.") if(target.mind && target.mind.has_antag_datum(/datum/antagonist/brainwashed)) target.mind.remove_antag_datum(/datum/antagonist/brainwashed) target.adjustBrainLoss(-60) @@ -36,9 +37,11 @@ /datum/surgery_step/fix_brain/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(target.getorganslot(ORGAN_SLOT_BRAIN)) - user.visible_message("[user] screws up, causing more damage!", "You screw up, causing more damage!") + display_results(user, target, "You screw up, causing more damage!", + "[user] screws up, causing brain damage!", + "[user] completes the surgery on [target]'s brain.") target.adjustBrainLoss(60) target.gain_trauma_type(BRAIN_TRAUMA_SEVERE, TRAUMA_RESILIENCE_LOBOTOMY) else user.visible_message("[user] suddenly notices that the brain [user.p_they()] [user.p_were()] working on is not there anymore.", "You suddenly notice that the brain you were working on is not there anymore.") - return FALSE \ No newline at end of file + return FALSE diff --git a/code/modules/surgery/cavity_implant.dm b/code/modules/surgery/cavity_implant.dm index 72874e0308..4c65b56962 100644 --- a/code/modules/surgery/cavity_implant.dm +++ b/code/modules/surgery/cavity_implant.dm @@ -1,30 +1,32 @@ /datum/surgery/cavity_implant - name = "cavity implant" + name = "Cavity implant" steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/incise, /datum/surgery_step/handle_cavity, /datum/surgery_step/close) species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) possible_locs = list(BODY_ZONE_CHEST) - - //handle cavity /datum/surgery_step/handle_cavity name = "implant item" accept_hand = 1 accept_any_item = 1 + implements = list(/obj/item = 100) + repeatable = TRUE time = 32 var/obj/item/IC = null - +/datum/surgery_step/handle_cavity/tool_check(mob/user, obj/item/tool) + if(istype(tool, /obj/item/cautery) || istype(tool, /obj/item/gun/energy/laser)) + return FALSE + return !tool.is_hot() /datum/surgery_step/handle_cavity/preop(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery) var/obj/item/bodypart/chest/CH = target.get_bodypart(BODY_ZONE_CHEST) IC = CH.cavity_item if(tool) - if(istype(tool, /obj/item/surgical_drapes) || istype(tool, /obj/item/bedsheet)) - var/obj/item/inactive = user.get_inactive_held_item() - if(istype(inactive, /obj/item/cautery) || istype(inactive, /obj/item/screwdriver) || iscyborg(user)) - attempt_cancel_surgery(surgery, tool, target, user) - return -1 - user.visible_message("[user] begins to insert [tool] into [target]'s [target_zone].", "You begin to insert [tool] into [target]'s [target_zone]...") + display_results(user, target, "You begin to insert [tool] into [target]'s [target_zone]...", + "[user] begins to insert [tool] into [target]'s [target_zone].", + "[user] begins to insert [tool.w_class > WEIGHT_CLASS_SMALL ? tool : "something"] into [target]'s [target_zone].") else - user.visible_message("[user] checks for items in [target]'s [target_zone].", "You check for items in [target]'s [target_zone]...") + display_results(user, target, "You check for items in [target]'s [target_zone]...", + "[user] checks for items in [target]'s [target_zone].", + "[user] looks for something in [target]'s [target_zone].") /datum/surgery_step/handle_cavity/success(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery) var/obj/item/bodypart/chest/CH = target.get_bodypart(BODY_ZONE_CHEST) @@ -32,18 +34,18 @@ 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 - var/obj/item/electronic_assembly/EA = tool - if(istype(EA) && EA.combat_circuits && tool.w_class > WEIGHT_CLASS_SMALL) - to_chat(user, "[tool] is too dangerous to put in [target]'s [target_zone]! Maybe if it was smaller...") - return 0 else - user.visible_message("[user] stuffs [tool] into [target]'s [target_zone]!", "You stuff [tool] into [target]'s [target_zone].") + display_results(user, target, "You stuff [tool] into [target]'s [target_zone].", + "[user] stuffs [tool] into [target]'s [target_zone]!", + "[user] stuffs [tool.w_class > WEIGHT_CLASS_SMALL ? tool : "something"] into [target]'s [target_zone].") user.transferItemToLoc(tool, target, TRUE) CH.cavity_item = tool return 1 else if(IC) - user.visible_message("[user] pulls [IC] out of [target]'s [target_zone]!", "You pull [IC] out of [target]'s [target_zone].") + display_results(user, target, "You pull [IC] out of [target]'s [target_zone].", + "[user] pulls [IC] out of [target]'s [target_zone]!", + "[user] pulls [IC.w_class > WEIGHT_CLASS_SMALL ? IC : "something"] out of [target]'s [target_zone].") user.put_in_hands(IC) CH.cavity_item = null return 1 diff --git a/code/modules/surgery/core_removal.dm b/code/modules/surgery/core_removal.dm index 7bf888ab40..6243405f8d 100644 --- a/code/modules/surgery/core_removal.dm +++ b/code/modules/surgery/core_removal.dm @@ -1,5 +1,5 @@ /datum/surgery/core_removal - name = "core removal" + name = "Core removal" steps = list(/datum/surgery_step/incise, /datum/surgery_step/extract_core) species = list(/mob/living/simple_animal/slime) possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD) @@ -8,7 +8,6 @@ if(target.stat == DEAD) return 1 return 0 - //extract brain /datum/surgery_step/extract_core name = "extract core" @@ -16,13 +15,17 @@ time = 16 /datum/surgery_step/extract_core/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to extract a core from [target].", "You begin to extract a core from [target]...") + display_results(user, target, "You begin to extract a core from [target]...", + "[user] begins to extract a core from [target].", + "[user] begins to extract a core from [target].") /datum/surgery_step/extract_core/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) var/mob/living/simple_animal/slime/slime = target if(slime.cores > 0) slime.cores-- - user.visible_message("[user] successfully extracts a core from [target]!", "You successfully extract a core from [target]. [slime.cores] core\s remaining.") + display_results(user, target, "You successfully extract a core from [target]. [slime.cores] core\s remaining.", + "[user] successfully extracts a core from [target]!", + "[user] successfully extracts a core from [target]!") new slime.coretype(slime.loc) @@ -33,4 +36,4 @@ return 0 else to_chat(user, "There aren't any cores left in [target]!") - return 1 \ No newline at end of file + return 1 diff --git a/code/modules/surgery/embalming.dm b/code/modules/surgery/embalming.dm new file mode 100644 index 0000000000..f74d864245 --- /dev/null +++ b/code/modules/surgery/embalming.dm @@ -0,0 +1,31 @@ +/datum/surgery/embalming //Fast and easy way to husk bodys + name = "Embalming" + desc = "A surgical procedure that prevents a corps from producing." + steps = list(/datum/surgery_step/incise, + /datum/surgery_step/embalming, + /datum/surgery_step/close) + + species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) + possible_locs = list(BODY_ZONE_CHEST) + requires_bodypart_type = 0 + +/datum/surgery_step/embalming + name = "embalming body" + implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15) + implements = list(/obj/item/reagent_containers/syringe = 100, /obj/item/pen = 30) + time = 10 + chems_needed = list("drying_agent", "sterilizine") + require_all_chems = FALSE + +/datum/surgery_step/embalming/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + user.visible_message("[user] starts to embalm [target]'s body.", "You start embalming [target]'s body.") + +/datum/surgery_step/embalming/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + user.visible_message("[user] embalms [target]'s body.", "You succeed in embalming [target]'s body.") + ADD_TRAIT(target, TRAIT_HUSK, MAGIC_TRAIT) //Husk's prevent body smell + return FALSE + +/datum/surgery_step/embalming/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + user.visible_message("[user] screws up!", "You screwed up!") + ADD_TRAIT(target, TRAIT_NOCLONE, MAGIC_TRAIT) //That body is ruined, but still gives miasma + return FALSE \ No newline at end of file diff --git a/code/modules/surgery/eye_surgery.dm b/code/modules/surgery/eye_surgery.dm index a8cb881326..85142e7bb1 100644 --- a/code/modules/surgery/eye_surgery.dm +++ b/code/modules/surgery/eye_surgery.dm @@ -1,16 +1,14 @@ /datum/surgery/eye_surgery - name = "eye surgery" + name = "Eye surgery" steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/fix_eyes, /datum/surgery_step/close) species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) possible_locs = list(BODY_ZONE_PRECISE_EYES) requires_bodypart_type = 0 - //fix eyes /datum/surgery_step/fix_eyes name = "fix eyes" implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 45, /obj/item/pen = 25) time = 64 - /datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target) var/obj/item/organ/eyes/E = target.getorganslot(ORGAN_SLOT_EYES) if(!E) @@ -19,10 +17,14 @@ return TRUE /datum/surgery_step/fix_eyes/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to fix [target]'s eyes.", "You begin to fix [target]'s eyes...") + display_results(user, target, "You begin to fix [target]'s eyes...", + "[user] begins to fix [target]'s eyes.", + "[user] begins to perform surgery on [target]'s eyes.") /datum/surgery_step/fix_eyes/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] successfully fixes [target]'s eyes!", "You succeed in fixing [target]'s eyes.") + display_results(user, target, "You succeed in fixing [target]'s eyes.", + "[user] successfully fixes [target]'s eyes!", + "[user] completes the surgery on [target]'s eyes.") target.cure_blind(list(EYE_DAMAGE)) target.set_blindness(0) target.cure_nearsighted(list(EYE_DAMAGE)) @@ -32,8 +34,12 @@ /datum/surgery_step/fix_eyes/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(target.getorgan(/obj/item/organ/brain)) - user.visible_message("[user] accidentally stabs [target] right in the brain!", "You accidentally stab [target] right in the brain!") + display_results(user, target, "You accidentally stab [target] right in the brain!", + "[user] accidentally stabs [target] right in the brain!", + "[user] accidentally stabs [target] right in the brain!") target.adjustBrainLoss(70) else - user.visible_message("[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.", "You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.") - return FALSE \ No newline at end of file + display_results(user, target, "You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.", + "[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.", + "[user] accidentally stabs [target] right in the brain!") + return FALSE diff --git a/code/modules/surgery/helpers.dm b/code/modules/surgery/helpers.dm index 1eca915d70..0419a4c73f 100644 --- a/code/modules/surgery/helpers.dm +++ b/code/modules/surgery/helpers.dm @@ -65,7 +65,7 @@ if(S.ignore_clothes || get_location_accessible(M, selected_zone)) var/datum/surgery/procedure = new S.type(M, selected_zone, affecting) - user.visible_message("[user] drapes [I] over [M]'s [parse_zone(selected_zone)] to prepare for \an [procedure.name].", \ + user.visible_message("[user] drapes [I] over [M]'s [parse_zone(selected_zone)] to prepare for surgery.", \ "You drape [I] over [M]'s [parse_zone(selected_zone)] to prepare for \an [procedure.name].") log_combat(user, M, "operated on", null, "(OPERATION TYPE: [procedure.name]) (TARGET AREA: [selected_zone])") @@ -110,15 +110,22 @@ return 0.5 -/proc/get_location_accessible(mob/living/M, location) +/proc/get_location_accessible(mob/M, location) var/covered_locations = 0 //based on body_parts_covered var/face_covered = 0 //based on flags_inv var/eyesmouth_covered = 0 //based on flags_cover - for(var/A in M.get_equipped_items()) - var/obj/item/I = A - covered_locations |= I.body_parts_covered - face_covered |= I.flags_inv - eyesmouth_covered |= I.flags_cover + if(iscarbon(M)) + var/mob/living/carbon/C = M + for(var/obj/item/clothing/I in list(C.back, C.wear_mask, C.head)) + covered_locations |= I.body_parts_covered + face_covered |= I.flags_inv + eyesmouth_covered |= I.flags_cover + if(ishuman(C)) + var/mob/living/carbon/human/H = C + for(var/obj/item/I in list(H.wear_suit, H.w_uniform, H.shoes, H.belt, H.gloves, H.glasses, H.ears)) + covered_locations |= I.body_parts_covered + face_covered |= I.flags_inv + eyesmouth_covered |= I.flags_cover switch(location) if(BODY_ZONE_HEAD) @@ -162,4 +169,3 @@ return 0 return 1 - diff --git a/code/modules/surgery/implant_removal.dm b/code/modules/surgery/implant_removal.dm index 92c5e05246..05119b365d 100644 --- a/code/modules/surgery/implant_removal.dm +++ b/code/modules/surgery/implant_removal.dm @@ -3,27 +3,30 @@ steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/extract_implant, /datum/surgery_step/close) species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) possible_locs = list(BODY_ZONE_CHEST) - - //extract implant /datum/surgery_step/extract_implant name = "extract implant" implements = list(/obj/item/hemostat = 100, TOOL_CROWBAR = 65) time = 64 var/obj/item/implant/I = null - /datum/surgery_step/extract_implant/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) for(var/obj/item/O in target.implants) I = O break if(I) - user.visible_message("[user] begins to extract [I] from [target]'s [target_zone].", "You begin to extract [I] from [target]'s [target_zone]...") + display_results(user, target, "You begin to extract [I] from [target]'s [target_zone]...", + "[user] begins to extract [I] from [target]'s [target_zone].", + "[user] begins to extract something from [target]'s [target_zone].") else - user.visible_message("[user] looks for an implant in [target]'s [target_zone].", "You look for an implant in [target]'s [target_zone]...") + display_results(user, target, "You look for an implant in [target]'s [target_zone]...", + "[user] looks for an implant in [target]'s [target_zone].", + "[user] looks for something in [target]'s [target_zone].") /datum/surgery_step/extract_implant/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(I) - user.visible_message("[user] successfully removes [I] from [target]'s [target_zone]!", "You successfully remove [I] from [target]'s [target_zone].") + display_results(user, target, "You successfully remove [I] from [target]'s [target_zone].", + "[user] successfully removes [I] from [target]'s [target_zone]!", + "[user] successfully removes something from [target]'s [target_zone]!") I.removed(target) var/obj/item/implantcase/case @@ -36,14 +39,15 @@ case.imp = I I.forceMove(case) case.update_icon() - user.visible_message("[user] places [I] into [case]!", "You place [I] into [case].") + display_results(user, target, "You place [I] into [case].", + "[user] places [I] into [case]!", + "[user] places it into [case]!") else qdel(I) else to_chat(user, "You can't find anything in [target]'s [target_zone]!") return 1 - /datum/surgery/implant_removal/mechanic name = "implant removal" requires_bodypart_type = BODYPART_ROBOTIC @@ -53,4 +57,4 @@ /datum/surgery_step/mechanic_unwrench, /datum/surgery_step/extract_implant, /datum/surgery_step/mechanic_wrench, - /datum/surgery_step/mechanic_close) \ No newline at end of file + /datum/surgery_step/mechanic_close) diff --git a/code/modules/surgery/limb_augmentation.dm b/code/modules/surgery/limb_augmentation.dm index 46fe262189..7ba8dbc49d 100644 --- a/code/modules/surgery/limb_augmentation.dm +++ b/code/modules/surgery/limb_augmentation.dm @@ -1,9 +1,5 @@ - /////AUGMENTATION SURGERIES////// - - //SURGERY STEPS - /datum/surgery_step/replace name = "sever muscles" implements = list(/obj/item/scalpel = 100, TOOL_WIRECUTTER = 55) @@ -11,16 +7,15 @@ /datum/surgery_step/replace/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to sever the muscles on [target]'s [parse_zone(user.zone_selected)].", "You begin to sever the muscles on [target]'s [parse_zone(user.zone_selected)]...") - + display_results(user, target, "You begin to sever the muscles on [target]'s [parse_zone(user.zone_selected)]...", + "[user] begins to sever the muscles on [target]'s [parse_zone(user.zone_selected)].", + "[user] begins an incision on [target]'s [parse_zone(user.zone_selected)].") /datum/surgery_step/replace_limb name = "replace limb" implements = list(/obj/item/bodypart = 100, /obj/item/organ_storage = 100) time = 32 var/obj/item/bodypart/L = null // L because "limb" - - /datum/surgery_step/replace_limb/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(istype(tool, /obj/item/organ_storage) && istype(tool.contents[1], /obj/item/bodypart)) tool = tool.contents[1] @@ -33,22 +28,20 @@ return -1 L = surgery.operated_bodypart if(L) - user.visible_message("[user] begins to augment [target]'s [parse_zone(user.zone_selected)].", "You begin to augment [target]'s [parse_zone(user.zone_selected)]...") + display_results(user, target, "You begin to augment [target]'s [parse_zone(user.zone_selected)]...", + "[user] begins to augment [target]'s [parse_zone(user.zone_selected)] with [aug].", + "[user] begins to augment [target]'s [parse_zone(user.zone_selected)].") else user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "You look for [target]'s [parse_zone(user.zone_selected)]...") - //ACTUAL SURGERIES - /datum/surgery/augmentation - name = "augmentation" + name = "Augmentation" steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/replace, /datum/surgery_step/saw, /datum/surgery_step/replace_limb) species = list(/mob/living/carbon/human) possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD) requires_real_bodypart = TRUE - //SURGERY STEP SUCCESSES - /datum/surgery_step/replace_limb/success(mob/user, mob/living/carbon/target, target_zone, obj/item/bodypart/tool, datum/surgery/surgery) if(L) if(istype(tool, /obj/item/organ_storage)) @@ -58,7 +51,9 @@ tool = tool.contents[1] if(istype(tool) && user.temporarilyRemoveItemFromInventory(tool)) tool.replace_limb(target, TRUE) - user.visible_message("[user] successfully augments [target]'s [parse_zone(target_zone)]!", "You successfully augment [target]'s [parse_zone(target_zone)].") + display_results(user, target, "You successfully augment [target]'s [parse_zone(target_zone)].", + "[user] successfully augments [target]'s [parse_zone(target_zone)] with [tool]!", + "[user] successfully augments [target]'s [parse_zone(target_zone)]!") log_combat(user, target, "augmented", addition="by giving him new [parse_zone(target_zone)] INTENT: [uppertext(user.a_intent)]") else to_chat(user, "[target] has no organic [parse_zone(target_zone)] there!") diff --git a/code/modules/surgery/lipoplasty.dm b/code/modules/surgery/lipoplasty.dm index 9967eba663..bb297b4604 100644 --- a/code/modules/surgery/lipoplasty.dm +++ b/code/modules/surgery/lipoplasty.dm @@ -1,14 +1,11 @@ /datum/surgery/lipoplasty - name = "lipoplasty" + name = "Lipoplasty" steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/cut_fat, /datum/surgery_step/remove_fat, /datum/surgery_step/close) possible_locs = list(BODY_ZONE_CHEST) - /datum/surgery/lipoplasty/can_start(mob/user, mob/living/carbon/target) if(HAS_TRAIT(target, TRAIT_FAT)) return 1 return 0 - - //cut fat /datum/surgery_step/cut_fat name = "cut excess fat" @@ -16,10 +13,14 @@ time = 64 /datum/surgery_step/cut_fat/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to cut away [target]'s excess fat.", "You begin to cut away [target]'s excess fat...") + display_results(user, target, "You begin to cut away [target]'s excess fat...", + "[user] begins to cut away [target]'s excess fat.", + "[user] begins to cut [target]'s [target_zone] with [tool].") /datum/surgery_step/cut_fat/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] cuts [target]'s excess fat loose!", "You cut [target]'s excess fat loose.") + display_results(user, target, "You cut [target]'s excess fat loose.", + "[user] cuts [target]'s excess fat loose!", + "[user] finishes the cut on [target]'s [target_zone].") return 1 //remove fat @@ -29,25 +30,27 @@ time = 32 /datum/surgery_step/remove_fat/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to extract [target]'s loose fat!", "You begin to extract [target]'s loose fat...") + display_results(user, target, "You begin to extract [target]'s loose fat...", + "[user] begins to extract [target]'s loose fat!", + "[user] begins to extract something from [target]'s [target_zone].") /datum/surgery_step/remove_fat/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] extracts [target]'s fat!", "You extract [target]'s fat.") + display_results(user, target, "You extract [target]'s fat.", + "[user] extracts [target]'s fat!", + "[user] extracts [target]'s fat!") target.overeatduration = 0 //patient is unfatted var/removednutriment = target.nutrition target.nutrition = NUTRITION_LEVEL_WELL_FED removednutriment -= 450 //whatever was removed goes into the meat var/mob/living/carbon/human/H = target var/typeofmeat = /obj/item/reagent_containers/food/snacks/meat/slab/human - if(H.dna && H.dna.species) typeofmeat = H.dna.species.meat - var/obj/item/reagent_containers/food/snacks/meat/slab/human/newmeat = new typeofmeat newmeat.name = "fatty meat" newmeat.desc = "Extremely fatty tissue taken from a patient." newmeat.subjectname = H.real_name newmeat.subjectjob = H.job - newmeat.reagents.add_reagent ("nutriment", (removednutriment / 15)) //To balance with nutriment_factor of nutriment + newmeat.reagents.add_reagent (/datum/reagent/consumable/nutriment, (removednutriment / 15)) //To balance with nutriment_factor of nutriment newmeat.forceMove(target.loc) - return 1 \ No newline at end of file + return 1 diff --git a/code/modules/surgery/mechanic_steps.dm b/code/modules/surgery/mechanic_steps.dm index 6431770fa9..7d364d9ecf 100644 --- a/code/modules/surgery/mechanic_steps.dm +++ b/code/modules/surgery/mechanic_steps.dm @@ -9,15 +9,14 @@ time = 24 /datum/surgery_step/mechanic_open/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to unscrew the shell of [target]'s [parse_zone(target_zone)].", - "You begin to unscrew the shell of [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to unscrew the shell of [target]'s [parse_zone(target_zone)]...", + "[user] begins to unscrew the shell of [target]'s [parse_zone(target_zone)].", + "[user] begins to unscrew the shell of [target]'s [parse_zone(target_zone)].") /datum/surgery_step/mechanic_incise/tool_check(mob/user, obj/item/tool) if(implement_type == /obj/item && !tool.is_sharp()) return FALSE - return TRUE - //close shell /datum/surgery_step/mechanic_close name = "screw shell" @@ -29,15 +28,14 @@ time = 24 /datum/surgery_step/mechanic_close/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to screw the shell of [target]'s [parse_zone(target_zone)].", - "You begin to screw the shell of [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to screw the shell of [target]'s [parse_zone(target_zone)]...", + "[user] begins to screw the shell of [target]'s [parse_zone(target_zone)].", + "[user] begins to screw the shell of [target]'s [parse_zone(target_zone)].") /datum/surgery_step/mechanic_close/tool_check(mob/user, obj/item/tool) if(implement_type == /obj/item && !tool.is_sharp()) return FALSE - return TRUE - //prepare electronics /datum/surgery_step/prepare_electronics name = "prepare electronics" @@ -47,8 +45,9 @@ time = 24 /datum/surgery_step/prepare_electronics/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to prepare electronics in [target]'s [parse_zone(target_zone)].", - "You begin to prepare electronics in [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to prepare electronics in [target]'s [parse_zone(target_zone)]...", + "[user] begins to prepare electronics in [target]'s [parse_zone(target_zone)].", + "[user] begins to prepare electronics in [target]'s [parse_zone(target_zone)].") //unwrench /datum/surgery_step/mechanic_unwrench @@ -59,8 +58,9 @@ time = 24 /datum/surgery_step/mechanic_unwrench/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to unwrench some bolts in [target]'s [parse_zone(target_zone)].", - "You begin to unwrench some bolts in [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to unwrench some bolts in [target]'s [parse_zone(target_zone)]...", + "[user] begins to unwrench some bolts in [target]'s [parse_zone(target_zone)].", + "[user] begins to unwrench some bolts in [target]'s [parse_zone(target_zone)].") //wrench /datum/surgery_step/mechanic_wrench @@ -71,8 +71,9 @@ time = 24 /datum/surgery_step/mechanic_wrench/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to wrench some bolts in [target]'s [parse_zone(target_zone)].", - "You begin to wrench some bolts in [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to wrench some bolts in [target]'s [parse_zone(target_zone)]...", + "[user] begins to wrench some bolts in [target]'s [parse_zone(target_zone)].", + "[user] begins to wrench some bolts in [target]'s [parse_zone(target_zone)].") //open hatch /datum/surgery_step/open_hatch @@ -81,5 +82,6 @@ time = 10 /datum/surgery_step/open_hatch/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to open the hatch holders in [target]'s [parse_zone(target_zone)].", - "You begin to open the hatch holders in [target]'s [parse_zone(target_zone)]...") \ No newline at end of file + display_results(user, target, "You begin to open the hatch holders in [target]'s [parse_zone(target_zone)]...", + "[user] begins to open the hatch holders in [target]'s [parse_zone(target_zone)].", + "[user] begins to open the hatch holders in [target]'s [parse_zone(target_zone)].") diff --git a/code/modules/surgery/organ_manipulation.dm b/code/modules/surgery/organ_manipulation.dm index 553de45c60..6bffed7452 100644 --- a/code/modules/surgery/organ_manipulation.dm +++ b/code/modules/surgery/organ_manipulation.dm @@ -1,5 +1,5 @@ /datum/surgery/organ_manipulation - name = "organ manipulation" + name = "Organ manipulation" species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD) requires_real_bodypart = 1 @@ -13,7 +13,6 @@ //there should be bone fixing /datum/surgery_step/close ) - /datum/surgery/organ_manipulation/soft possible_locs = list(BODY_ZONE_PRECISE_GROIN, BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM) steps = list( @@ -24,9 +23,8 @@ /datum/surgery_step/manipulate_organs, /datum/surgery_step/close ) - /datum/surgery/organ_manipulation/alien - name = "alien organ manipulation" + name = "Alien organ manipulation" possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD, BODY_ZONE_PRECISE_GROIN, BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM) species = list(/mob/living/carbon/alien/humanoid) steps = list( @@ -37,9 +35,8 @@ /datum/surgery_step/manipulate_organs, /datum/surgery_step/close ) - /datum/surgery/organ_manipulation/mechanic - name = "prosthesis organ manipulation" + name = "Prosthesis organ manipulation" possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD) requires_bodypart_type = BODYPART_ROBOTIC steps = list( @@ -51,7 +48,6 @@ /datum/surgery_step/mechanic_wrench, /datum/surgery_step/mechanic_close ) - /datum/surgery/organ_manipulation/mechanic/soft possible_locs = list(BODY_ZONE_PRECISE_GROIN, BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM) steps = list( @@ -61,7 +57,6 @@ /datum/surgery_step/manipulate_organs, /datum/surgery_step/mechanic_close ) - /datum/surgery_step/manipulate_organs time = 64 name = "manipulate organs" @@ -70,11 +65,9 @@ var/implements_extract = list(/obj/item/hemostat = 100, TOOL_CROWBAR = 55) var/current_type var/obj/item/organ/I = null - /datum/surgery_step/manipulate_organs/New() ..() implements = implements + implements_extract - /datum/surgery_step/manipulate_organs/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) I = null if(istype(tool, /obj/item/organ_storage)) @@ -92,9 +85,9 @@ if(target_zone != I.zone || target.getorganslot(I.slot)) to_chat(user, "There is no room for [I] in [target]'s [parse_zone(target_zone)]!") return -1 - - user.visible_message("[user] begins to insert [tool] into [target]'s [parse_zone(target_zone)].", - "You begin to insert [tool] into [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to insert [tool] into [target]'s [parse_zone(target_zone)]...", + "[user] begins to insert [tool] into [target]'s [parse_zone(target_zone)].", + "[user] begins to insert something into [target]'s [parse_zone(target_zone)].") else if(implement_type in implements_extract) current_type = "extract" @@ -107,21 +100,20 @@ O.on_find(user) organs -= O organs[O.name] = O - I = input("Remove which organ?", "Surgery", null, null) as null|anything in organs if(I && user && target && user.Adjacent(target) && user.get_active_held_item() == tool) I = organs[I] if(!I) return -1 - user.visible_message("[user] begins to extract [I] from [target]'s [parse_zone(target_zone)].", - "You begin to extract [I] from [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to extract [I] from [target]'s [parse_zone(target_zone)]...", + "[user] begins to extract [I] from [target]'s [parse_zone(target_zone)].", + "[user] begins to extract something from [target]'s [parse_zone(target_zone)].") else return -1 else if(istype(tool, /obj/item/reagent_containers/food/snacks/organ)) to_chat(user, "[tool] was bitten by someone! It's too damaged to use!") return -1 - /datum/surgery_step/manipulate_organs/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(current_type == "insert") if(istype(tool, /obj/item/organ_storage)) @@ -134,17 +126,20 @@ I = tool user.temporarilyRemoveItemFromInventory(I, TRUE) I.Insert(target) - user.visible_message("[user] inserts [tool] into [target]'s [parse_zone(target_zone)]!", - "You insert [tool] into [target]'s [parse_zone(target_zone)].") + display_results(user, target, "You insert [tool] into [target]'s [parse_zone(target_zone)].", + "[user] inserts [tool] into [target]'s [parse_zone(target_zone)]!", + "[user] inserts something into [target]'s [parse_zone(target_zone)]!") else if(current_type == "extract") if(I && I.owner == target) - user.visible_message("[user] successfully extracts [I] from [target]'s [parse_zone(target_zone)]!", - "You successfully extract [I] from [target]'s [parse_zone(target_zone)].") + display_results(user, target, "You successfully extract [I] from [target]'s [parse_zone(target_zone)].", + "[user] successfully extracts [I] from [target]'s [parse_zone(target_zone)]!", + "[user] successfully extracts something from [target]'s [parse_zone(target_zone)]!") log_combat(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]") I.Remove(target) I.forceMove(get_turf(target)) else - user.visible_message("[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!", - "You can't extract anything from [target]'s [parse_zone(target_zone)]!") + 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 diff --git a/code/modules/surgery/organic_steps.dm b/code/modules/surgery/organic_steps.dm index 01eb751f39..da03771a27 100644 --- a/code/modules/surgery/organic_steps.dm +++ b/code/modules/surgery/organic_steps.dm @@ -1,4 +1,3 @@ - //make incision /datum/surgery_step/incise name = "make incision" @@ -7,13 +6,22 @@ time = 16 /datum/surgery_step/incise/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to make an incision in [target]'s [parse_zone(target_zone)].", - "You begin to make an incision in [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to make an incision in [target]'s [parse_zone(target_zone)]...", + "[user] begins to make an incision in [target]'s [parse_zone(target_zone)].", + "[user] begins to make an incision in [target]'s [parse_zone(target_zone)].") /datum/surgery_step/incise/tool_check(mob/user, obj/item/tool) if(implement_type == /obj/item && !tool.is_sharp()) return FALSE - + return TRUE +/datum/surgery_step/incise/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + if ishuman(target) + var/mob/living/carbon/human/H = target + if (!(NOBLOOD in H.dna.species.species_traits)) + display_results(user, target, "Blood pools around the incision in [H]'s [parse_zone(target_zone)].", + "Blood pools around the incision in [H]'s [parse_zone(target_zone)].", + "") + H.bleed_rate += 3 return TRUE //clamp bleeders @@ -23,15 +31,17 @@ time = 24 /datum/surgery_step/clamp_bleeders/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to clamp bleeders in [target]'s [parse_zone(target_zone)].", - "You begin to clamp bleeders in [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to clamp bleeders in [target]'s [parse_zone(target_zone)]...", + "[user] begins to clamp bleeders in [target]'s [parse_zone(target_zone)].", + "[user] begins to clamp bleeders in [target]'s [parse_zone(target_zone)].") /datum/surgery_step/clamp_bleeders/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(locate(/datum/surgery_step/saw) in surgery.steps) target.heal_bodypart_damage(20,0) + if (ishuman(target)) + var/mob/living/carbon/human/H = target + H.bleed_rate = max( (H.bleed_rate - 3), 0) return ..() - - //retract skin /datum/surgery_step/retract_skin name = "retract skin" @@ -39,8 +49,9 @@ time = 24 /datum/surgery_step/retract_skin/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to retract the skin in [target]'s [parse_zone(target_zone)].", - "You begin to retract the skin in [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to retract the skin in [target]'s [parse_zone(target_zone)]...", + "[user] begins to retract the skin in [target]'s [parse_zone(target_zone)].", + "[user] begins to retract the skin in [target]'s [parse_zone(target_zone)].") @@ -52,22 +63,21 @@ time = 24 /datum/surgery_step/close/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to mend the incision in [target]'s [parse_zone(target_zone)].", - "You begin to mend the incision in [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to mend the incision in [target]'s [parse_zone(target_zone)]...", + "[user] begins to mend the incision in [target]'s [parse_zone(target_zone)].", + "[user] begins to mend the incision in [target]'s [parse_zone(target_zone)].") /datum/surgery_step/close/tool_check(mob/user, obj/item/tool) if(implement_type == TOOL_WELDER || implement_type == /obj/item) return tool.is_hot() - return TRUE - /datum/surgery_step/close/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(locate(/datum/surgery_step/saw) in surgery.steps) target.heal_bodypart_damage(45,0) + if (ishuman(target)) + var/mob/living/carbon/human/H = target + H.bleed_rate = max( (H.bleed_rate - 3), 0) return ..() - - - //saw bone /datum/surgery_step/saw name = "saw bone" @@ -77,13 +87,15 @@ time = 54 /datum/surgery_step/saw/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to saw through the bone in [target]'s [parse_zone(target_zone)].", - "You begin to saw through the bone in [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to saw through the bone in [target]'s [parse_zone(target_zone)]...", + "[user] begins to saw through the bone in [target]'s [parse_zone(target_zone)].", + "[user] begins to saw through the bone in [target]'s [parse_zone(target_zone)].") /datum/surgery_step/saw/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) target.apply_damage(50, BRUTE, "[target_zone]") - - user.visible_message("[user] saws [target]'s [parse_zone(target_zone)] open!", "You saw [target]'s [parse_zone(target_zone)] open.") + display_results(user, target, "You saw [target]'s [parse_zone(target_zone)] open.", + "[user] saws [target]'s [parse_zone(target_zone)] open!", + "[user] saws [target]'s [parse_zone(target_zone)] open!") return 1 //drill bone @@ -93,10 +105,12 @@ time = 30 /datum/surgery_step/drill/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to drill into the bone in [target]'s [parse_zone(target_zone)].", - "You begin to drill into the bone in [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to drill into the bone in [target]'s [parse_zone(target_zone)]...", + "[user] begins to drill into the bone in [target]'s [parse_zone(target_zone)].", + "[user] begins to drill into the bone in [target]'s [parse_zone(target_zone)].") /datum/surgery_step/drill/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] drills into [target]'s [parse_zone(target_zone)]!", - "You drill into [target]'s [parse_zone(target_zone)].") + display_results(user, target, "You drill into [target]'s [parse_zone(target_zone)].", + "[user] drills into [target]'s [parse_zone(target_zone)]!", + "[user] drills into [target]'s [parse_zone(target_zone)]!") return 1 diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index 33e62d21e4..2489aa0705 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -185,11 +185,12 @@ zone = BODY_ZONE_L_ARM /obj/item/organ/cyberimp/arm/toolset/emag_act() - if(!(locate(/obj/item/kitchen/knife/combat/cyborg) in items_list)) - to_chat(usr, "You unlock [src]'s integrated knife!") - items_list += new /obj/item/kitchen/knife/combat/cyborg(src) - return 1 - return 0 + . = ..() + if(locate(/obj/item/kitchen/knife/combat/cyborg) in items_list) + return + to_chat(usr, "You unlock [src]'s integrated knife!") + items_list += new /obj/item/kitchen/knife/combat/cyborg(src) + return TRUE /obj/item/organ/cyberimp/arm/esword name = "arm-mounted energy blade" diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 55c8d95082..eeaaaf2a03 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -184,7 +184,7 @@ /obj/item/organ/eyes/robotic/glow/proc/terminate_effects() if(owner && active) - deactivate() + deactivate(TRUE) active = FALSE clear_visuals(TRUE) STOP_PROCESSING(SSfastprocess, src) @@ -237,12 +237,6 @@ return deactivate(silent = TRUE) -/obj/item/organ/eyes/robotic/glow/Remove(mob/living/carbon/M) - . = ..() - if(active) - UnregisterSignal(M, COMSIG_ATOM_DIR_CHANGE) - active = FALSE - /obj/item/organ/eyes/robotic/glow/proc/activate(silent = FALSE) start_visuals() if(!silent) diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm index f666fc209b..94973a8e10 100755 --- a/code/modules/surgery/organs/liver.dm +++ b/code/modules/surgery/organs/liver.dm @@ -1,6 +1,7 @@ #define LIVER_DEFAULT_HEALTH 100 //amount of damage required for liver failure #define LIVER_DEFAULT_TOX_TOLERANCE 3 //amount of toxins the liver can filter out #define LIVER_DEFAULT_TOX_LETHALITY 0.01 //lower values lower how harmful toxins are to the liver +#define LIVER_SWELLING_MOVE_MODIFY "pharma" /obj/item/organ/liver name = "liver" @@ -16,6 +17,8 @@ var/toxTolerance = LIVER_DEFAULT_TOX_TOLERANCE//maximum amount of toxins the liver can just shrug off var/toxLethality = LIVER_DEFAULT_TOX_LETHALITY//affects how much damage toxins do to the liver var/filterToxins = TRUE //whether to filter toxins + var/swelling = 0 + var/cachedmoveCalc = 1 /obj/item/organ/liver/on_life() var/mob/living/carbon/C = owner @@ -45,11 +48,40 @@ if(damage > maxHealth)//cap liver damage damage = maxHealth + if(swelling >= 10) + pharmacokinesis() + /obj/item/organ/liver/prepare_eat() var/obj/S = ..() S.reagents.add_reagent("iron", 5) return S +//Just in case +/obj/item/organ/liver/Remove(mob/living/carbon/M, special = 0) + ..() + M.remove_movespeed_modifier(LIVER_SWELLING_MOVE_MODIFY) + M.ResetBloodVol() //At the moment, this shouldn't allow application twice. You either have this OR a thirsty ferret. + sizeMoveMod(1, M) + +//Applies some of the effects to the patient. +/obj/item/organ/liver/proc/pharmacokinesis() + var/moveCalc = 1+((round(swelling) - 9)/3) + if(moveCalc == cachedmoveCalc)//reduce calculations + return + if(prob(5)) + to_chat(owner, "You feel a stange ache in your side, almost like a sitch. This pain is affecting your movements and making you feel lightheaded.") + var/mob/living/carbon/human/H = owner + H.add_movespeed_modifier(LIVER_SWELLING_MOVE_MODIFY, TRUE, 100, NONE, override = TRUE, multiplicative_slowdown = moveCalc) + H.AdjustBloodVol(moveCalc/3) + sizeMoveMod(moveCalc, H) + +/obj/item/organ/liver/proc/sizeMoveMod(var/value, mob/living/carbon/human/H) + if(cachedmoveCalc == value) + return + H.next_move_modifier /= cachedmoveCalc + H.next_move_modifier *= value + cachedmoveCalc = value + /obj/item/organ/liver/fly name = "insectoid liver" icon_state = "liver-x" //xenomorph liver? It's just a black liver so it fits. diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index 64b2c2ee90..cfbb530e69 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -1,3 +1,5 @@ +#define LUNGS_MAX_HEALTH 300 + /obj/item/organ/lungs name = "lungs" icon_state = "lungs" @@ -54,8 +56,40 @@ var/crit_stabilizing_reagent = "epinephrine" + //health + var/maxHealth = LUNGS_MAX_HEALTH + var/damage = 0 + +//TODO: lung health affects lung function +/obj/item/organ/lungs/proc/adjustLungLoss(damage_mod, mob/living/carbon/M) //damage might be too low atm. + if (maxHealth == INFINITY) + return + if(damage+damage_mod < 0) + damage = 0 + return + + damage += damage_mod + if ((damage / maxHealth) > 1) + to_chat(M, "You feel your lungs collapse within your chest as you gasp for air, unable to inflate them anymore!") + M.emote("gasp") + SSblackbox.record_feedback("tally", "fermi_chem", 1, "Lungs lost") + qdel(src) + else if ((damage / maxHealth) > 0.75) + to_chat(M, "It's getting really hard to breathe!!") + M.emote("gasp") + M.Dizzy(3) + else if ((damage / maxHealth) > 0.5) + M.Dizzy(2) + to_chat(M, "Your chest is really starting to hurt.") + M.emote("cough") + else if ((damage / maxHealth) > 0.2) + to_chat(M, "You feel an ache within your chest.") + M.emote("cough") + M.Dizzy(1) /obj/item/organ/lungs/proc/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H) +//TODO: add lung damage = less oxygen gains + var/breathModifier = (5-(5*(damage/maxHealth)/2)) //range 2.5 - 5 if((H.status_flags & GODMODE)) return if(HAS_TRAIT(H, TRAIT_NOBREATH)) @@ -124,7 +158,7 @@ else H.failed_last_breath = FALSE if(H.health >= H.crit_threshold) - H.adjustOxyLoss(-5) + H.adjustOxyLoss(-breathModifier) //More damaged lungs = slower oxy rate up to a factor of half gas_breathed = breath_gases[/datum/gas/oxygen] H.clear_alert("not_enough_oxy") @@ -153,7 +187,7 @@ else H.failed_last_breath = FALSE if(H.health >= H.crit_threshold) - H.adjustOxyLoss(-5) + H.adjustOxyLoss(-breathModifier) gas_breathed = breath_gases[/datum/gas/nitrogen] H.clear_alert("nitro") @@ -190,7 +224,7 @@ else H.failed_last_breath = FALSE if(H.health >= H.crit_threshold) - H.adjustOxyLoss(-5) + H.adjustOxyLoss(-breathModifier) gas_breathed = breath_gases[/datum/gas/carbon_dioxide] H.clear_alert("not_enough_co2") @@ -220,7 +254,7 @@ else H.failed_last_breath = FALSE if(H.health >= H.crit_threshold) - H.adjustOxyLoss(-5) + H.adjustOxyLoss(-breathModifier) gas_breathed = breath_gases[/datum/gas/plasma] H.clear_alert("not_enough_tox") @@ -244,6 +278,9 @@ else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning if(prob(20)) H.emote(pick("giggle", "laugh")) + SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "chemical_euphoria", /datum/mood_event/chemical_euphoria) + else + SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "chemical_euphoria") // BZ @@ -368,10 +405,13 @@ var/cold_modifier = H.dna.species.coldmod if(breath_temperature < cold_level_3_threshold) H.apply_damage_type(cold_level_3_damage*cold_modifier, cold_damage_type) + adjustLungLoss((cold_level_3_damage*cold_modifier*2), H) if(breath_temperature > cold_level_3_threshold && breath_temperature < cold_level_2_threshold) H.apply_damage_type(cold_level_2_damage*cold_modifier, cold_damage_type) + adjustLungLoss((cold_level_2_damage*cold_modifier*2), H) if(breath_temperature > cold_level_2_threshold && breath_temperature < cold_level_1_threshold) H.apply_damage_type(cold_level_1_damage*cold_modifier, cold_damage_type) + adjustLungLoss((cold_level_1_damage*cold_modifier*2), H) if(breath_temperature < cold_level_1_threshold) if(prob(20)) to_chat(H, "You feel [cold_message] in your [name]!") @@ -380,10 +420,13 @@ var/heat_modifier = H.dna.species.heatmod if(breath_temperature > heat_level_1_threshold && breath_temperature < heat_level_2_threshold) H.apply_damage_type(heat_level_1_damage*heat_modifier, heat_damage_type) + adjustLungLoss((heat_level_1_damage*heat_modifier*2), H) if(breath_temperature > heat_level_2_threshold && breath_temperature < heat_level_3_threshold) H.apply_damage_type(heat_level_2_damage*heat_modifier, heat_damage_type) + adjustLungLoss((heat_level_2_damage*heat_modifier*2), H) if(breath_temperature > heat_level_3_threshold) H.apply_damage_type(heat_level_3_damage*heat_modifier, heat_damage_type) + adjustLungLoss((heat_level_3_damage*heat_modifier*2), H) if(breath_temperature > heat_level_1_threshold) if(prob(20)) to_chat(H, "You feel [hot_message] in your [name]!") @@ -402,12 +445,14 @@ safe_oxygen_max = 0 // Like, at all. safe_toxins_min = 16 //We breath THIS! safe_toxins_max = 0 + maxHealth = INFINITY//I don't understand how plamamen work, so I'm not going to try t give them special lungs atm /obj/item/organ/lungs/cybernetic name = "cybernetic lungs" desc = "A cybernetic version of the lungs found in traditional humanoid entities. It functions the same as an organic lung and is merely meant as a replacement." icon_state = "lungs-c" synthetic = TRUE + maxHealth = 400 /obj/item/organ/lungs/cybernetic/emp_act() . = ..() @@ -427,6 +472,7 @@ cold_level_1_threshold = 200 cold_level_2_threshold = 140 cold_level_3_threshold = 100 + maxHealth = 550 /obj/item/organ/lungs/ashwalker name = "ash lungs" diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index b16967b6b0..9f910de9a9 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -153,6 +153,17 @@ // if they have no mutant tongues, give them a regular one T.Insert(src) + else + var/obj/item/organ/tongue/oT = getorganslot(ORGAN_SLOT_TONGUE) + if(oT.name == "fluffy tongue") + var/obj/item/organ/tongue/T + if(dna && dna.species && dna.species.mutanttongue) + T = new dna.species.mutanttongue() + else + T = new() + oT.Remove(src) + qdel(oT) + T.Insert(src) if(!getorganslot(ORGAN_SLOT_EYES)) var/obj/item/organ/eyes/E diff --git a/code/modules/surgery/organs/tongue.dm b/code/modules/surgery/organs/tongue.dm index ccfc21f878..3eaaa8de92 100644 --- a/code/modules/surgery/organs/tongue.dm +++ b/code/modules/surgery/organs/tongue.dm @@ -1,3 +1,5 @@ +#define TONGUE_MAX_HEALTH 60 + /obj/item/organ/tongue name = "tongue" desc = "A fleshy muscle mostly used for lying." @@ -8,6 +10,8 @@ var/list/languages_possible var/say_mod = null var/taste_sensitivity = 15 // lower is more sensitive. + var/maxHealth = TONGUE_MAX_HEALTH + var/damage = 0 var/modifies_speech = FALSE var/static/list/languages_possible_base = typecacheof(list( /datum/language/common, @@ -27,6 +31,29 @@ /obj/item/organ/tongue/proc/handle_speech(datum/source, list/speech_args) +/obj/item/organ/tongue/proc/adjustTongueLoss(mob/living/carbon/M, damage_mod) + if (maxHealth == "alien") + return + if (maxHealth == "bone") + var/target = M.get_bodypart(BODY_ZONE_HEAD) + M.apply_damage(damage_mod, BURN, target) + to_chat(M, "The drink burns your skull! Oof, your bones!") + return + if(damage+damage_mod < 0) + damage = 0 + return + + damage += damage_mod + if ((damage / maxHealth) > 1) + to_chat(M, "Your tongue is singed beyond recognition, and disintegrates!") + SSblackbox.record_feedback("tally", "fermi_chem", 1, "Tongues lost to Fermi") + qdel(src) + else if ((damage / maxHealth) > 0.85) + to_chat(M, "Your tongue feels like it's about to fall out!.") + else if ((damage / maxHealth) > 0.5) + to_chat(M, "Your tongue is really starting to hurt.") + + /obj/item/organ/tongue/Insert(mob/living/carbon/M, special = 0) ..() if(say_mod && M.dna && M.dna.species) @@ -51,6 +78,7 @@ icon_state = "tonguelizard" say_mod = "hisses" taste_sensitivity = 10 // combined nose + tongue, extra sensitive + maxHealth = 40 //extra sensitivity means tongue is more susceptible to damage modifies_speech = TRUE /obj/item/organ/tongue/lizard/handle_speech(datum/source, list/speech_args) @@ -68,6 +96,7 @@ icon_state = "tonguefly" say_mod = "buzzes" taste_sensitivity = 25 // you eat vomit, this is a mercy + maxHealth = 80 //years of eatting trash has made your tongue strong modifies_speech = TRUE /obj/item/organ/tongue/fly/handle_speech(datum/source, list/speech_args) @@ -85,6 +114,7 @@ icon_state = "tongueayylmao" say_mod = "gibbers" taste_sensitivity = 101 // ayys cannot taste anything. + maxHealth = 120 //Ayys probe a lot modifies_speech = TRUE /obj/item/organ/tongue/abductor/handle_speech(datum/source, list/speech_args) @@ -113,6 +143,7 @@ icon_state = "tonguezombie" say_mod = "moans" taste_sensitivity = 32 + maxHealth = 65 //Stop! It's already dead...! modifies_speech = TRUE /obj/item/organ/tongue/zombie/handle_speech(datum/source, list/speech_args) @@ -137,6 +168,7 @@ icon_state = "tonguexeno" say_mod = "hisses" taste_sensitivity = 10 // LIZARDS ARE ALIENS CONFIRMED + maxHealth = "alien" //Their blood is acid, so, no, though a tongueless xeno might be funny modifies_speech = TRUE // not really, they just hiss var/static/list/languages_possible_alien = typecacheof(list( /datum/language/xenocommon, @@ -159,6 +191,7 @@ say_mod = "rattles" attack_verb = list("bitten", "chattered", "chomped", "enamelled", "boned") taste_sensitivity = 101 // skeletons cannot taste anything + maxHealth = "bone" //Take brute damage instead modifies_speech = TRUE var/chattering = FALSE var/phomeme_type = "sans" @@ -181,6 +214,7 @@ name = "plasma bone \"tongue\"" desc = "Like animated skeletons, Plasmamen vibrate their teeth in order to produce speech." icon_state = "tongueplasma" + maxHealth = "alien" modifies_speech = FALSE /obj/item/organ/tongue/robot @@ -192,6 +226,7 @@ attack_verb = list("beeped", "booped") modifies_speech = TRUE taste_sensitivity = 25 // not as good as an organic tongue + maxHealth = 100 //RoboTongue! var/electronics_magic = TRUE /obj/item/organ/tongue/robot/can_speak_in_language(datum/language/dt) @@ -200,8 +235,39 @@ /obj/item/organ/tongue/robot/handle_speech(datum/source, list/speech_args) speech_args[SPEECH_SPANS] |= SPAN_ROBOT +/obj/item/organ/tongue/fluffy + name = "fluffy tongue" + desc = "OwO what's this?" + icon_state = "tonguefluffy" + taste_sensitivity = 10 // extra sensitive and inquisitive uwu + maxHealth = 35 //Sensitive tongue! + modifies_speech = TRUE + +/obj/item/organ/tongue/fluffy/handle_speech(datum/source, list/speech_args) + var/message = speech_args[SPEECH_MESSAGE] + if(copytext(message, 1, 2) != "*") + message = replacetext(message, "ne", "nye") + message = replacetext(message, "nu", "nyu") + message = replacetext(message, "na", "nya") + message = replacetext(message, "no", "nyo") + message = replacetext(message, "ove", "uv") + message = replacetext(message, "l", "w") + message = replacetext(message, "r", "w") + message = lowertext(message) + speech_args[SPEECH_MESSAGE] = message + +/obj/item/organ/tongue/cybernetic + name = "cybernetic tongue" + desc = "A state of the art robotic tongue that can detect the pH of anything drank." + icon_state = "tonguecybernetic" + taste_sensitivity = 10 + maxHealth = 60 //It's robotic! + +/obj/item/organ/tongue/cybernetic/handle_speech(datum/source, list/speech_args) + speech_args[SPEECH_SPANS] |= SPAN_ROBOT + /obj/item/organ/tongue/robot/ipc name = "positronic voicebox" say_mod = "beeps" desc = "A voice synthesizer used by IPCs to smoothly interface with organic lifeforms." - electronics_magic = FALSE \ No newline at end of file + electronics_magic = FALSE diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index ad13de0a01..8103224306 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -575,7 +575,7 @@ cooldown = COOLDOWN_MEME for(var/V in listeners) var/mob/living/carbon/human/H = V - if(H.canbearoused && H.has_dna()) // probably a redundant check but for good measure + if(H.canbearoused && H.has_dna() && HAS_TRAIT(H, TRAIT_NYMPHO)) // probably a redundant check but for good measure H.mob_climax(forced_climax=TRUE) //DAB @@ -608,6 +608,867 @@ return cooldown +////////////////////////////////////// +///////ENTHRAL VELVET CHORDS////////// +////////////////////////////////////// + +//Heavily modified voice of god code +/obj/item/organ/vocal_cords/velvet + name = "Velvet chords" + desc = "The voice spoken from these just make you want to drift off, sleep and obey." + icon_state = "velvet_chords" + actions_types = list(/datum/action/item_action/organ_action/velvet) + spans = list("velvet") + +/datum/action/item_action/organ_action/velvet + name = "Velvet chords" + var/obj/item/organ/vocal_cords/velvet/cords = null + //icon_icon = 'icons/mob/screen_alert.dmi' + //button_icon_state = "velvet_chords" + //icon = 'icons/mob/screen_alert.dmi' + //icon_state = "in_love" + +/datum/action/item_action/organ_action/velvet/New() + ..() + cords = target + +/datum/action/item_action/organ_action/velvet/IsAvailable() + return TRUE + +/datum/action/item_action/organ_action/velvet/Trigger() + . = ..() + var/command = input(owner, "Speak in a sultry tone", "Command") + if(QDELETED(src) || QDELETED(owner)) + return + if(!command) + return + owner.say(".x[command]") + +/obj/item/organ/vocal_cords/velvet/can_speak_with() + return TRUE + +/obj/item/organ/vocal_cords/velvet/handle_speech(message) //actually say the message + owner.say(message, spans = spans, sanitize = FALSE) + velvetspeech(message, owner, 1) + +////////////////////////////////////// +///////////FermiChem////////////////// +////////////////////////////////////// +//Removed span_list from input arguments. +/proc/velvetspeech(message, mob/living/user, base_multiplier = 1, message_admins = FALSE, debug = FALSE) + + if(!user || !user.can_speak() || user.stat) + return 0 //no cooldown + + var/log_message = message + + //FIND THRALLS + message = lowertext(message) + var/mob/living/list/listeners = list() + for(var/mob/living/L in get_hearers_in_view(8, user)) + if(L.can_hear() && !L.anti_magic_check(FALSE, TRUE) && L.stat != DEAD) + if(L.has_status_effect(/datum/status_effect/chem/enthrall))//Check to see if they have the status + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)//Check to see if pet is on cooldown from last command and if the master is right + if(E.master != user) + continue + if(ishuman(L)) + var/mob/living/carbon/human/H = L + if(istype(H.ears, /obj/item/clothing/ears/earmuffs)) + continue + + if (E.cooldown > 0)//If they're on cooldown you can't give them more commands. + continue + listeners += L + + if(!listeners.len) + return 0 + + //POWER CALCULATIONS + + var/power_multiplier = base_multiplier + + // Not sure I want to give extra power to anyone at the moment...? We'll see how it turns out + if(user.mind) + //Chaplains are very good at indoctrinating + if(user.mind.assigned_role == "Chaplain") + power_multiplier *= 1.2 + //Command staff has authority + if(user.mind.assigned_role in GLOB.command_positions) + power_multiplier *= 1.1 + //Why are you speaking + if(user.mind.assigned_role == "Mime") + power_multiplier *= 0.5 + + //Cultists are closer to their gods and are better at indoctrinating + if(iscultist(user)) + power_multiplier *= 1.2 + else if (is_servant_of_ratvar(user)) + power_multiplier *= 1.2 + else if (is_devil(user))//The devil is supposed to be seductive, right? + power_multiplier *= 1.2 + + //range = 0.5 - 1.4~ + //most cases = 1 + + //Try to check if the speaker specified a name or a job to focus on + var/list/specific_listeners = list() + var/found_string = null + + //Get the proper job titles + message = get_full_job_name(message) + + for(var/V in listeners) + var/mob/living/L = V + if(dd_hasprefix(message, L.real_name)) + specific_listeners += L //focus on those with the specified name + //Cut out the name so it doesn't trigger commands + found_string = L.real_name + power_multiplier += 0.5 + + else if(dd_hasprefix(message, L.first_name())) + specific_listeners += L //focus on those with the specified name + //Cut out the name so it doesn't trigger commands + found_string = L.first_name() + power_multiplier += 0.5 + + else if(L.mind && L.mind.assigned_role && dd_hasprefix(message, L.mind.assigned_role)) + specific_listeners += L //focus on those with the specified job + //Cut out the job so it doesn't trigger commands + found_string = L.mind.assigned_role + power_multiplier += 0.25 + + if(specific_listeners.len) + listeners = specific_listeners + //power_multiplier *= (1 + (1/specific_listeners.len)) //Put this is if it becomes OP, power is judged internally on a thrall, so shouldn't be nessicary. + message = copytext(message, 0, 1)+copytext(message, 1 + length(found_string), length(message) + 1)//I have no idea what this does + + var/obj/item/organ/tongue/T = user.getorganslot(ORGAN_SLOT_TONGUE) + if (T.name == "fluffy tongue") //If you sound hillarious, it's hard to take you seriously. This is a way for other players to combat/reduce their effectiveness. + power_multiplier *= 0.75 + + if(debug == TRUE) + to_chat(world, "[user]'s power is [power_multiplier].") + + //Mixables + var/static/regex/enthral_words = regex("relax|obey|love|serve|docile|so easy|ara ara") + var/static/regex/reward_words = regex("good boy|good girl|good pet|good job") + var/static/regex/punish_words = regex("bad boy|bad girl|bad pet|bad job") + //phase 0 + var/static/regex/saymyname_words = regex("say my name|who am i|whoami") + var/static/regex/wakeup_words = regex("revert|awaken|snap") //works + //phase1 + var/static/regex/petstatus_words = regex("how are you|what is your status|are you okay") + var/static/regex/silence_words = regex("shut up|silence|be silent|ssh|quiet|hush") + var/static/regex/speak_words = regex("talk to me|speak") + var/static/regex/antiresist_words = regex("unable to resist|give in")//useful if you think your target is resisting a lot + var/static/regex/resist_words = regex("resist|snap out of it|fight")//useful if two enthrallers are fighting + var/static/regex/forget_words = regex("forget|muddled|awake and forget") + var/static/regex/attract_words = regex("come here|come to me|get over here|attract") + //phase 2 + var/static/regex/orgasm_words = regex("cum|orgasm|climax|squirt|heyo") //wah, lewd + var/static/regex/awoo_words = regex("howl|awoo|bark") + var/static/regex/nya_words = regex("nya|meow|mewl") + var/static/regex/sleep_words = regex("sleep|slumber|rest") + var/static/regex/strip_words = regex("strip|derobe|nude") + var/static/regex/walk_words = regex("slow down|walk") + var/static/regex/run_words = regex("run|speed up") + var/static/regex/liedown_words = regex("lie down") //TO ADD + var/static/regex/knockdown_words = regex("drop|fall|trip|knockdown|kneel") + //phase 3 + var/static/regex/statecustom_words = regex("state triggers|state your triggers") + var/static/regex/custom_words = regex("new trigger|listen to me") + var/static/regex/custom_words_words = regex("speak|echo|shock|cum|kneel|strip|trance")//What a descriptive name! + var/static/regex/custom_echo = regex("obsess|fills your mind|loop") + var/static/regex/instill_words = regex("feel|entice|overwhel") + var/static/regex/recognise_words = regex("recognise me|did you miss me?") + var/static/regex/objective_words = regex("new objective|obey this command|unable to resist|compulsed") + var/static/regex/heal_words = regex("live|heal|survive|mend|life|pets never die") + var/static/regex/stun_words = regex("stop|wait|stand still|hold on|halt") + var/static/regex/hallucinate_words = regex("get high|hallucinate") + var/static/regex/hot_words = regex("heat|hot|hell") + var/static/regex/cold_words = regex("cold|cool down|chill|freeze") + var/static/regex/getup_words = regex("get up") + var/static/regex/pacify_words = regex("more and more docile|complaisant|friendly|pacifist") + var/static/regex/charge_words = regex("charge|oorah|attack") + + var/distancelist = list(2,2,1.5,1.3,1.15,1,0.8,0.6,0.5,0.25) + + //CALLBACKS ARE USED FOR MESSAGES BECAUSE SAY IS HANDLED AFTER THE PROCESSING. + + //Tier 1 + //ENTHRAL mixable (works I think) + if(findtext(message, enthral_words)) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + power_multiplier *= distancelist[get_dist(user, V)+1] + if(L == user) + continue + if(length(message)) + E.enthrallTally += (power_multiplier*(((length(message))/200) + 1)) //encourage players to say more than one word. + else + E.enthrallTally += power_multiplier*1.25 //thinking about it, I don't know how this can proc + if(L.canbearoused) + if(L.client?.prefs.lewdchem) + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "[E.enthrallGender] is so nice to listen to."), 5) + E.cooldown += 1 + + //REWARD mixable works + if(findtext(message, reward_words)) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + power_multiplier *= distancelist[get_dist(user, V)+1] + if(L == user) + continue + if (L.client?.prefs.lewdchem) + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "[E.enthrallGender] has praised me!!"), 5) + if(HAS_TRAIT(L, TRAIT_NYMPHO)) + L.adjustArousalLoss(2*power_multiplier) + if(HAS_TRAIT(L, TRAIT_MASO)) + E.enthrallTally -= power_multiplier + E.resistanceTally += power_multiplier + E.cooldown += 1 + else + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "I've been praised for doing a good job!"), 5) + E.resistanceTally -= power_multiplier + E.enthrallTally += power_multiplier + var/descmessage = "[(L.client?.prefs.lewdchem?"I feel so happy! I'm a good pet who [E.enthrallGender] loves!":"I did a good job!")]" + SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "enthrallpraise", /datum/mood_event/enthrallpraise, descmessage) + E.cooldown += 1 + + //PUNISH mixable works + else if(findtext(message, punish_words)) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + var/descmessage = "[(L.client?.prefs.lewdchem?"I've failed [E.enthrallGender]... What a bad, bad pet!":"I did a bad job...")]" + if(L == user) + continue + if (L.client?.prefs.lewdchem) + if(HAS_TRAIT(L, TRAIT_MASO)) + L.adjustArousalLoss(3*power_multiplier) + descmessage += "And yet, it feels so good..!" //I don't really understand masco, is this the right sort of thing they like? + E.enthrallTally += power_multiplier + E.resistanceTally -= power_multiplier + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "I've let [E.enthrallGender] down...!
"), 5) + else + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "I've let [E.enthrallGender] down...
"), 5) + else + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "I've failed [E.master]..."), 5) + E.resistanceTally += power_multiplier + E.enthrallTally += power_multiplier + E.cooldown += 1 + SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "enthrallscold", /datum/mood_event/enthrallscold, descmessage) + E.cooldown += 1 + + + + //teir 0 + //SAY MY NAME works + if((findtext(message, saymyname_words))) + for(var/V in listeners) + var/mob/living/carbon/C = V + var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall) + REMOVE_TRAIT(C, TRAIT_MUTE, "enthrall") + C.silent = 0 + if(C.client?.prefs.lewdchem) + addtimer(CALLBACK(C, /atom/movable/proc/say, "[E.enthrallGender]"), 5) + else + addtimer(CALLBACK(C, /atom/movable/proc/say, "[E.master]"), 5) + + //WAKE UP + else if((findtext(message, wakeup_words))) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + L.SetSleeping(0)//Can you hear while asleep? + switch(E.phase) + if(0) + E.phase = 3 + E.status = null + user.emote("snap") + if(L.client?.prefs.lewdchem) + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "The snapping of your [E.enthrallGender]'s fingers brings you back to your enthralled state, obedient and ready to serve."), 5) + else + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "The snapping of [E.master]'s fingers brings you back to being under their influence."), 5) + to_chat(user, "You wake up [L]!") + + //tier 1 + + //PETSTATUS i.e. how they are + else if((findtext(message, petstatus_words))) + for(var/V in listeners) + var/mob/living/carbon/human/H = V + var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall) + REMOVE_TRAIT(H, TRAIT_MUTE, "enthrall") + var/speaktrigger = "" + //phase + switch(E.phase) + if(0) + continue + if(1) + addtimer(CALLBACK(H, /atom/movable/proc/say, "I feel happy being with you."), 5) + continue + if(2) + speaktrigger += "[(H.client?.prefs.lewdchem?"I think I'm in love with you... ":"I find you really inspirational, ")]" //' + if(3) + speaktrigger += "[(H.client?.prefs.lewdchem?"I'm devoted to being your pet":"I'm commited to following your cause!")]! " + if(4) + speaktrigger += "[(H.client?.prefs.lewdchem?"You are my whole world and all of my being belongs to you, ":"I cannot think of anything else but aiding your cause, ")] "//Redflags!! + + //mood + GET_COMPONENT_FROM(mood, /datum/component/mood, H) + switch(mood.sanity) + if(SANITY_GREAT to INFINITY) + speaktrigger += "I'm beyond elated!! " //did you mean byond elated? hohoho + if(SANITY_NEUTRAL to SANITY_GREAT) + speaktrigger += "I'm really happy! " + if(SANITY_DISTURBED to SANITY_NEUTRAL) + speaktrigger += "I'm a little sad, " + if(SANITY_UNSTABLE to SANITY_DISTURBED) + speaktrigger += "I'm really upset, " + if(SANITY_CRAZY to SANITY_UNSTABLE) + speaktrigger += "I'm about to fall apart without you! " + if(SANITY_INSANE to SANITY_CRAZY) + speaktrigger += "Hold me, please.. " + + //Withdrawal + switch(E.withdrawalTick) + if(10 to 36) //denial + speaktrigger += "I missed you, " + if(36 to 66) //barganing + speaktrigger += "I missed you, but I knew you'd come back for me! " + if(66 to 90) //anger + speaktrigger += "I couldn't take being away from you like that, " + if(90 to 140) //depression + speaktrigger += "I was so scared you'd never come back, " + if(140 to INFINITY) //acceptance + speaktrigger += "I'm hurt that you left me like that... I felt so alone... " + + //hunger + switch(H.nutrition) + if(0 to NUTRITION_LEVEL_STARVING) + speaktrigger += "I'm famished, please feed me..! " + if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY) + speaktrigger += "I'm so hungry... " + if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED) + speaktrigger += "I'm hungry, " + if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED) + speaktrigger += "I'm sated, " + if(NUTRITION_LEVEL_WELL_FED to NUTRITION_LEVEL_FULL) + speaktrigger += "I've a full belly! " + if(NUTRITION_LEVEL_FULL to INFINITY) + speaktrigger += "I'm fat... " + + //health + switch(H.health) + if(100 to INFINITY) + speaktrigger += "I feel fit, " + if(80 to 99) + speaktrigger += "I ache a little bit, " + if(40 to 80) + speaktrigger += "I'm really hurt, " + if(0 to 40) + speaktrigger += "I'm in a lot of pain, help! " + if(-INFINITY to 0) + speaktrigger += "I'm barely concious and in so much pain, please help me! " + //toxin + switch(H.getToxLoss()) + if(10 to 30) + speaktrigger += "I feel a bit queasy... " + if(30 to 60) + speaktrigger += "I feel nauseous... " + if(60 to INFINITY) + speaktrigger += "My head is pounding and I feel like I'm going to be sick... " + //oxygen + if (H.getOxyLoss() >= 25) + speaktrigger += "I can't breathe! " + //blind + if (HAS_TRAIT(H, TRAIT_BLIND)) + speaktrigger += "I can't see! " + //deaf..? + if (HAS_TRAIT(H, TRAIT_DEAF))//How the heck you managed to get here I have no idea, but just in case! + speaktrigger += "I can barely hear you! " + //And the brain damage. And the brain damage. And the brain damage. And the brain damage. And the brain damage. + switch(H.getBrainLoss()) + if(20 to 40) + speaktrigger += "I have a mild head ache, " + if(40 to 80) + speaktrigger += "I feel disorentated and confused, " + if(80 to 120) + speaktrigger += "My head feels like it's about to explode, " + if(120 to 160) + speaktrigger += "You are the only thing keeping my mind sane, " + if(160 to INFINITY) + speaktrigger += "I feel like I'm on the brink of losing my mind, " + + //horny + if(HAS_TRAIT(H, TRAIT_NYMPHO) && H.canbearoused && H.client?.prefs.lewdchem) + switch(H.getArousalLoss()) + if(40 to 60) + speaktrigger += "I'm feeling a little horny, " + if(60 to 80) + speaktrigger += "I'm feeling horny, " + if(80 to INFINITY) + speaktrigger += "I'm really, really horny, " + + //collar + if(istype(H.wear_neck, /obj/item/clothing/neck/petcollar)) + speaktrigger += "I love the collar you gave me, " + //End + if(H.client?.prefs.lewdchem) + speaktrigger += "[E.enthrallGender]!" + else + speaktrigger += "[user.first_name()]!" + //say it! + addtimer(CALLBACK(H, /atom/movable/proc/say, "[speaktrigger]"), 5) + E.cooldown += 1 + + //SILENCE + else if((findtext(message, silence_words))) + for(var/mob/living/carbon/C in listeners) + var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall) + power_multiplier *= distancelist[get_dist(user, C)+1] + if (E.phase >= 3) //If target is fully enthralled, + ADD_TRAIT(C, TRAIT_MUTE, "enthrall") + else + C.silent += ((10 * power_multiplier) * E.phase) + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "You are unable to speak!"), 5) + to_chat(user, "You silence [C].") + E.cooldown += 3 + + //SPEAK + else if((findtext(message, speak_words)))//fix + for(var/mob/living/carbon/C in listeners) + var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall) + REMOVE_TRAIT(C, TRAIT_MUTE, "enthrall") + C.silent = 0 + E.cooldown += 3 + to_chat(user, "You [(C.client?.prefs.lewdchem?"allow [C] to speak again":"encourage [C] to speak again")].") + + + //Antiresist + else if((findtext(message, antiresist_words))) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + E.status = "Antiresist" + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "Your mind clouds over, as you find yourself unable to resist!"), 5) + E.statusStrength = (1 * power_multiplier * E.phase) + E.cooldown += 15//Too short? yes, made 15 + to_chat(user, "You frustrate [L]'s attempts at resisting.") + + //RESIST + else if((findtext(message, resist_words))) + for(var/mob/living/carbon/C in listeners) + var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall) + power_multiplier *= distancelist[get_dist(user, C)+1] + E.deltaResist += (power_multiplier) + E.owner_resist() + E.cooldown += 2 + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "You are spurred into resisting from [user]'s words!'"), 5) + to_chat(user, "You spark resistance in [C].") + + //FORGET (A way to cancel the process) + else if((findtext(message, forget_words))) + for(var/mob/living/carbon/C in listeners) + var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall) + if(E.phase == 4) + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "You're unable to forget about [(C.client?.prefs.lewdchem?"the dominating presence of [E.enthrallGender]":"[E.master]")]!"), 5) + continue + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "You wake up, forgetting everything that just happened. You must've dozed off..? How embarassing!"), 5) + C.Sleeping(50) + switch(E.phase) + if(1 to 2) + E.phase = -1 + to_chat(C, "You have no recollection of being enthralled by [E.master]!") + to_chat(user, "You revert [C] back to their state before enthrallment.") + if(3) + E.phase = 0 + E.cooldown = 0 + if(C.client?.prefs.lewdchem) + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "You revert to yourself before being enthralled by your [E.enthrallGender], with no memory of what happened."), 5) + else + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "You revert to who you were before, with no memory of what happened with [E.master]."), 5) + to_chat(user, "You put [C] into a sleeper state, ready to turn them back at the snap of your fingers.") + + //ATTRACT + else if((findtext(message, attract_words))) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + L.throw_at(get_step_towards(user,L), 3 * power_multiplier, 1 * power_multiplier) + E.cooldown += 3 + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "You are drawn towards [user]!"), 5) + to_chat(user, "You draw [L] towards you!") + + + //teir 2 + + /* removed for now + //ORGASM + else if((findtext(message, orgasm_words))) + for(var/V in listeners) + var/mob/living/carbon/human/H = V + var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall) + if(E.phase > 1) + if(HAS_TRAIT(H, TRAIT_NYMPHO) && H.canbearoused && H.client?.prefs.lewdchem) // probably a redundant check but for good measure + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, H, "Your [E.enthrallGender] pushes you over the limit, overwhelming your body with pleasure."), 5) + H.mob_climax(forced_climax=TRUE) + H.SetStun(20) + H.setArousalLoss(H.min_arousal) + E.resistanceTally = 0 //makes resistance 0, but resets arousal, resistance buildup is faster unaroused (massively so). + E.enthrallTally += power_multiplier + E.cooldown += 6 + else + H.throw_at(get_step_towards(user,H), 3 * power_multiplier, 1 * power_multiplier) + */ + + + //awoo + else if((findtext(message, awoo_words))) + for(var/V in listeners) + var/mob/living/carbon/human/H = V + var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(2 to INFINITY) + H.say("*awoo") + E.cooldown += 1 + + //Nya + else if((findtext(message, nya_words))) + for(var/V in listeners) + var/mob/living/carbon/human/H = V + var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(2 to INFINITY) + playsound(get_turf(H), pick('sound/effects/meow1.ogg', 'modular_citadel/sound/voice/nya.ogg'), 50, 1, -1) //I'm very tempted to write a Fermis clause that makes them merowr.ogg if it's me. But, I also don't think snowflakism is okay. I would've gotten away for it too, if it wern't for my morals. + H.emote("me", 1, "lets out a nya!") + E.cooldown += 1 + + //SLEEP + else if((findtext(message, sleep_words))) + for(var/mob/living/carbon/C in listeners) + var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(2 to INFINITY) + C.Sleeping(45 * power_multiplier) + E.cooldown += 10 + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "Drowsiness suddenly overwhelms you as you fall asleep!"), 5) + to_chat(user, "You send [C] to sleep.") + + //STRIP + else if((findtext(message, strip_words))) + for(var/V in listeners) + var/mob/living/carbon/human/H = V + var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(2 to INFINITY) + var/items = H.get_contents() + for(var/obj/item/W in items) + if(W == H.wear_suit) + H.dropItemToGround(W, TRUE) + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, H, "Before you can even think about it, you quickly remove your clothes in response to [(H.client?.prefs.lewdchem?"your [E.enthrallGender]'s command'":"[E.master]'s directive'")]."), 5) + E.cooldown += 10 + + //WALK + else if((findtext(message, walk_words))) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(2 to INFINITY) + if(L.m_intent != MOVE_INTENT_WALK) + L.toggle_move_intent() + E.cooldown += 1 + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "You slow down to a walk."), 5) + to_chat(user, "You encourage [L] to slow down.") + + //RUN + else if((findtext(message, run_words))) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(2 to INFINITY) + if(L.m_intent != MOVE_INTENT_RUN) + L.toggle_move_intent() + E.cooldown += 1 + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "You speed up into a jog!"), 5) + to_chat(user, "You encourage [L] to pick up the pace!") + + //LIE DOWN + else if(findtext(message, liedown_words)) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(2 to INFINITY) + L.lay_down() + E.cooldown += 10 + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "[(L.client?.prefs.lewdchem?"You eagerly lie down!":"You suddenly lie down!")]"), 5) + to_chat(user, "You encourage [L] to lie down.") + + //KNOCKDOWN + else if(findtext(message, knockdown_words)) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(2 to INFINITY) + L.Knockdown(30 * power_multiplier * E.phase) + E.cooldown += 8 + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "You suddenly drop to the ground!"), 5) + to_chat(user, "You encourage [L] to drop down to the ground.") + + //tier3 + + //STATE TRIGGERS + else if((findtext(message, statecustom_words)))//doesn't work + for(var/V in listeners) + var/mob/living/carbon/C = V + var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall) + if (E.phase == 3) + var/speaktrigger = "" + C.emote("me", 1, "whispers something quietly.") + if (get_dist(user, C) > 1)//Requires user to be next to their pet. + to_chat(user, "You need to be next to your pet to hear them!") + continue + for (var/trigger in E.customTriggers) + speaktrigger += "[trigger], " + to_chat(user, "[C] whispers, \"[speaktrigger] are my triggers.\"")//So they don't trigger themselves! + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "You whisper your triggers to [(C.client?.prefs.lewdchem?"Your [E.enthrallGender]":"[E.master]")]."), 5) + + + //CUSTOM TRIGGERS + else if((findtext(message, custom_words))) + for(var/V in listeners) + var/mob/living/carbon/human/H = V + var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall) + if(E.phase == 3) + if (get_dist(user, H) > 1)//Requires user to be next to their pet. + to_chat(user, "You need to be next to your pet to give them a new trigger!") + continue + else + user.emote("me", 1, "puts their hands upon [H.name]'s head and looks deep into their eyes, whispering something to them.") + user.SetStun(1000)//Hands are handy, so you have to stay still + H.SetStun(1000) + if (E.mental_capacity >= 5) + var/trigger = html_decode(stripped_input(user, "Enter the trigger phrase", MAX_MESSAGE_LEN)) + var/custom_words_words_list = list("Speak", "Echo", "Shock", "Cum", "Kneel", "Strip", "Trance", "Cancel") + var/trigger2 = input(user, "Pick an effect", "Effects") in custom_words_words_list + trigger2 = lowertext(trigger2) + if ((findtext(trigger2, custom_words_words))) + if (trigger2 == "speak" || trigger2 == "echo") + var/trigger3 = html_decode(stripped_input(user, "Enter the phrase spoken. Abusing this to self antag is bannable.", MAX_MESSAGE_LEN)) + E.customTriggers[trigger] = list(trigger2, trigger3) + log_game("FERMICHEM: [H] has been implanted by [user] with [trigger], triggering [trigger2], to send [trigger3].") + if(findtext(trigger3, "admin")) + message_admins("FERMICHEM: [user] maybe be trying to abuse MKUltra by implanting by [H] with [trigger], triggering [trigger2], to send [trigger3].") + else + E.customTriggers[trigger] = trigger2 + log_game("FERMICHEM: [H] has been implanted by [user] with [trigger], triggering [trigger2].") + E.mental_capacity -= 5 + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, H, "[(H.client?.prefs.lewdchem?"your [E.enthrallGender]":"[E.master]")] whispers you a new trigger."), 5) + to_chat(user, "You sucessfully set the trigger word [trigger] in [H]") + else + to_chat(user, "Your pet looks at you confused, it seems they don't understand that effect!") + else + to_chat(user, "Your pet looks at you with a vacant blase expression, you don't think you can program anything else into them") + user.SetStun(0) + H.SetStun(0) + + //CUSTOM ECHO + else if((findtext(message, custom_echo))) + for(var/V in listeners) + var/mob/living/carbon/human/H = V + var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall) + if(E.phase == 3) + if (get_dist(user, H) > 1)//Requires user to be next to their pet. + to_chat(user, "You need to be next to your pet to give them a new echophrase!") + continue + else + user.emote("me", 1, "puts their hands upon [H.name]'s head and looks deep into their eyes, whispering something to them.") + user.SetStun(1000)//Hands are handy, so you have to stay still + H.SetStun(1000) + var/trigger = stripped_input(user, "Enter the loop phrase", MAX_MESSAGE_LEN) + var/customSpan = list("Notice", "Warning", "Hypnophrase", "Love", "Velvet") + var/trigger2 = input(user, "Pick the style", "Style") in customSpan + trigger2 = lowertext(trigger2) + E.customEcho = trigger + E.customSpan = trigger2 + user.SetStun(0) + H.SetStun(0) + to_chat(user, "You sucessfully set an echoing phrase in [H]") + + //CUSTOM OBJECTIVE + else if((findtext(message, objective_words))) + for(var/V in listeners) + var/mob/living/carbon/human/H = V + var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall) + if(E.phase == 3) + if (get_dist(user, H) > 1)//Requires user to be next to their pet. + to_chat(user, "You need to be next to your pet to give them a new objective!") + continue + else + user.emote("me", 1, "puts their hands upon [H.name]'s head and looks deep into their eyes, whispering something to them.'") + user.SetStun(1000)//So you can't run away! + H.SetStun(1000) + if (E.mental_capacity >= 200) + var/datum/objective/brainwashing/objective = stripped_input(user, "Add an objective to give your pet.", MAX_MESSAGE_LEN) + if(!LAZYLEN(objective)) + to_chat(user, "You can't give your pet an objective to do nothing!") + continue + //Pets don't understand harm + objective = replacetext(lowertext(objective), "kill", "hug") + objective = replacetext(lowertext(objective), "murder", "cuddle") + objective = replacetext(lowertext(objective), "harm", "snuggle") + objective = replacetext(lowertext(objective), "decapitate", "headpat") + objective = replacetext(lowertext(objective), "strangle", "meow at") + objective = replacetext(lowertext(objective), "suicide", "self-love") + message_admins("[H] has been implanted by [user] with the objective [objective].") + log_game("FERMICHEM: [H] has been implanted by [user] with the objective [objective] via MKUltra.") + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, H, "[(H.client?.prefs.lewdchem?"Your [E.enthrallGender]":"[E.master]")] whispers you a new objective."), 5) + brainwash(H, objective) + E.mental_capacity -= 200 + to_chat(user, "You sucessfully give an objective to [H]") + else + to_chat(user, "Your pet looks at you with a vacant blasé expression, you don't think you can program anything else into them") + user.SetStun(0) + H.SetStun(0) + + //INSTILL + else if((findtext(message, instill_words))) + for(var/V in listeners) + var/mob/living/carbon/human/H = V + var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall) + if(E.phase == 3 && H.client?.prefs.lewdchem) + var/instill = stripped_input(user, "Instill an emotion in your [(user.client?.prefs.lewdchem?"Your pet":"listener")].", MAX_MESSAGE_LEN) + to_chat(H, "[instill]") + to_chat(user, "You sucessfully instill a feeling in [H]") + log_game("FERMICHEM: [H] has been instilled by [user] with [instill] via MKUltra.") + E.cooldown += 1 + + //RECOGNISE + else if((findtext(message, recognise_words))) + for(var/V in listeners) + var/mob/living/carbon/human/H = V + var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall) + if(E.phase > 1) + if(user.ckey == E.enthrallID && user.real_name == E.master.real_name) + E.master = user + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, H, "[(H.client?.prefs.lewdchem?"You hear the words of your [E.enthrallGender] again!! They're back!!":"You recognise the voice of [E.master].")]"), 5) + to_chat(user, "[H] looks at you with sparkling eyes, recognising you!") + + //I dunno how to do state objectives without them revealing they're an antag + + //HEAL (maybe make this nap instead?) + else if(findtext(message, heal_words)) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(3)//Tier 3 only + E.status = "heal" + E.statusStrength = (5 * power_multiplier) + E.cooldown += 5 + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "You begin to lick your wounds."), 5) + L.Stun(15 * power_multiplier) + to_chat(user, "[L] begins to lick their wounds.") + + //STUN + else if(findtext(message, stun_words)) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(3 to INFINITY) + L.Stun(40 * power_multiplier) + E.cooldown += 8 + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "Your muscles freeze up!"), 5) + to_chat(user, "You cause [L] to freeze up!") + + //HALLUCINATE + else if(findtext(message, hallucinate_words)) + for(var/V in listeners) + var/mob/living/carbon/C = V + var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(3 to INFINITY) + new /datum/hallucination/delusion(C, TRUE, null,150 * power_multiplier,0) + to_chat(user, "You send [C] on a trip.") + + //HOT + else if(findtext(message, hot_words)) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(3 to INFINITY) + L.adjust_bodytemperature(50 * power_multiplier)//This seems nuts, reduced it, but then it didn't do anything, so I reverted it. + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "You feel your metabolism speed up!"), 5) + to_chat(user, "You speed [L]'s metabolism up!") + + //COLD + else if(findtext(message, cold_words)) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(3 to INFINITY) + L.adjust_bodytemperature(-50 * power_multiplier) + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "You feel your metabolism slow down!"), 5) + to_chat(user, "You slow [L]'s metabolism down!") + + //GET UP + else if(findtext(message, getup_words)) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(3 to INFINITY)//Tier 3 only + if(L.resting) + L.lay_down() //aka get up + L.SetStun(0) + L.SetKnockdown(0) + L.SetUnconscious(0) //i said get up i don't care if you're being tased + E.cooldown += 10 //This could be really strong + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "You jump to your feet from sheer willpower!"), 5) + to_chat(user, "You spur [L] to their feet!") + + //PACIFY + else if(findtext(message, pacify_words)) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(3)//Tier 3 only + E.status = "pacify" + E.cooldown += 10 + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "You feel like never hurting anyone ever again."), 5) + to_chat(user, "You remove any intent to harm from [L]'s mind.") + + //CHARGE + else if(findtext(message, charge_words)) + for(var/V in listeners) + var/mob/living/L = V + var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall) + switch(E.phase) + if(3)//Tier 3 only + E.statusStrength = 2* power_multiplier + E.status = "charge" + E.cooldown += 10 + to_chat(user, "You rally [L], leading them into a charge!") + + if(message_admins || debug)//Do you want this in? + message_admins("[ADMIN_LOOKUPFLW(user)] has said '[log_message]' with a Velvet Voice, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].") + log_game("FERMICHEM: [key_name(user)] ckey: [user.key] has said '[log_message]' with a Velvet Voice, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].") + SSblackbox.record_feedback("tally", "fermi_chem", 1, "Times people have spoken with a velvet voice") + //SSblackbox.record_feedback("tally", "Velvet_voice", 1, log_message) If this is on, it fills the thing up and OOFs the server + + return + #undef COOLDOWN_STUN #undef COOLDOWN_DAMAGE diff --git a/code/modules/surgery/plastic_surgery.dm b/code/modules/surgery/plastic_surgery.dm index 54482ade73..39077ae235 100644 --- a/code/modules/surgery/plastic_surgery.dm +++ b/code/modules/surgery/plastic_surgery.dm @@ -1,8 +1,7 @@ /datum/surgery/plastic_surgery - name = "plastic surgery" + name = "Plastic surgery" steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/reshape_face, /datum/surgery_step/close) possible_locs = list(BODY_ZONE_HEAD) - //reshape_face /datum/surgery_step/reshape_face name = "reshape face" @@ -10,12 +9,16 @@ time = 64 /datum/surgery_step/reshape_face/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to alter [target]'s appearance.", "You begin to alter [target]'s appearance...") + display_results(user, target, "You begin to alter [target]'s appearance...", + "[user] begins to alter [target]'s appearance.", + "[user] begins to make an incision in [target]'s face.") /datum/surgery_step/reshape_face/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(HAS_TRAIT_FROM(target, TRAIT_DISFIGURED, TRAIT_GENERIC)) REMOVE_TRAIT(target, TRAIT_DISFIGURED, TRAIT_GENERIC) - user.visible_message("[user] successfully restores [target]'s appearance!", "You successfully restore [target]'s appearance.") + display_results(user, target, "You successfully restore [target]'s appearance.", + "[user] successfully restores [target]'s appearance!", + "[user] finishes the operation on [target]'s face.") else var/list/names = list() if(!isabductor(user)) @@ -31,8 +34,18 @@ var/oldname = target.real_name target.real_name = chosen_name var/newname = target.real_name //something about how the code handles names required that I use this instead of target.real_name - user.visible_message("[user] alters [oldname]'s appearance completely, [target.p_they()] is now [newname]!", "You alter [oldname]'s appearance completely, [target.p_they()] is now [newname].") + display_results(user, target, "You alter [oldname]'s appearance completely, [target.p_they()] is now [newname].", + "[user] alters [oldname]'s appearance completely, [target.p_they()] is now [newname]!", + "[user] finishes the operation on [target]'s face.") if(ishuman(target)) var/mob/living/carbon/human/H = target H.sec_hud_set_ID() return 1 + return TRUE + +/datum/surgery_step/reshape_face/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + display_results(user, target, "You screw up, leaving [target]'s appearance disfigured!", + "[user] screws up, disfiguring [target]'s appearance!", + "[user] finishes the operation on [target]'s face.") + ADD_TRAIT(target, TRAIT_DISFIGURED, TRAIT_GENERIC) + return FALSE diff --git a/code/modules/surgery/prosthetic_replacement.dm b/code/modules/surgery/prosthetic_replacement.dm index 9032964ae4..fdceb1fb1f 100644 --- a/code/modules/surgery/prosthetic_replacement.dm +++ b/code/modules/surgery/prosthetic_replacement.dm @@ -1,26 +1,21 @@ /datum/surgery/prosthetic_replacement - name = "prosthetic replacement" + name = "Prosthetic replacement" steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/add_prosthetic) species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) possible_locs = list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_HEAD) requires_bodypart = FALSE //need a missing limb requires_bodypart_type = 0 - /datum/surgery/prosthetic_replacement/can_start(mob/user, mob/living/carbon/target) if(!iscarbon(target)) return 0 var/mob/living/carbon/C = target if(!C.get_bodypart(user.zone_selected)) //can only start if limb is missing return 1 - - - /datum/surgery_step/add_prosthetic name = "add prosthetic" implements = list(/obj/item/bodypart = 100, /obj/item/organ_storage = 100, /obj/item/twohanded/required/chainsaw = 100, /obj/item/melee/synthetic_arm_blade = 100) time = 32 var/organ_rejection_dam = 0 - /datum/surgery_step/add_prosthetic/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(istype(tool, /obj/item/organ_storage)) if(!tool.contents.len) @@ -48,16 +43,19 @@ organ_rejection_dam = 30 if(target_zone == BP.body_zone) //so we can't replace a leg with an arm, or a human arm with a monkey arm. - user.visible_message("[user] begins to replace [target]'s [parse_zone(target_zone)].", "You begin to replace [target]'s [parse_zone(target_zone)]...") + display_results(user, target, "You begin to replace [target]'s [parse_zone(target_zone)] with [tool]...", + "[user] begins to replace [target]'s [parse_zone(target_zone)] with [tool].", + "[user] begins to replace [target]'s [parse_zone(target_zone)].") else to_chat(user, "[tool] isn't the right type for [parse_zone(target_zone)].") return -1 else if(target_zone == BODY_ZONE_L_ARM || target_zone == BODY_ZONE_R_ARM) - user.visible_message("[user] begins to attach [tool] onto [target].", "You begin to attach [tool] onto [target]...") + display_results(user, target, "You begin to attach [tool] onto [target]...", + "[user] begins to attach [tool] onto [target]'s [parse_zone(target_zone)].", + "[user] begins to attach something onto [target]'s [parse_zone(target_zone)].") else to_chat(user, "[tool] must be installed onto an arm.") return -1 - /datum/surgery_step/add_prosthetic/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(istype(tool, /obj/item/organ_storage)) tool.icon_state = initial(tool.icon_state) @@ -69,13 +67,17 @@ L.attach_limb(target) if(organ_rejection_dam) target.adjustToxLoss(organ_rejection_dam) - user.visible_message("[user] successfully replaces [target]'s [parse_zone(target_zone)]!", "You succeed in replacing [target]'s [parse_zone(target_zone)].") + display_results(user, target, "You succeed in replacing [target]'s [parse_zone(target_zone)].", + "[user] successfully replaces [target]'s [parse_zone(target_zone)] with [tool]!", + "[user] successfully replaces [target]'s [parse_zone(target_zone)]!") return 1 else var/obj/item/bodypart/L = target.newBodyPart(target_zone, FALSE, FALSE) L.is_pseudopart = TRUE L.attach_limb(target) - user.visible_message("[user] finishes attaching [tool]!", "You attach [tool].") + display_results(user, target, "You attach [tool].", + "[user] finishes attaching [tool]!", + "[user] finishes the attachment procedure!") qdel(tool) if(istype(tool, /obj/item/twohanded/required/chainsaw)) var/obj/item/mounted_chainsaw/new_arm = new(target) @@ -85,4 +87,3 @@ var/obj/item/melee/arm_blade/new_arm = new(target,TRUE,TRUE) target_zone == BODY_ZONE_R_ARM ? target.put_in_r_hand(new_arm) : target.put_in_l_hand(new_arm) return 1 - diff --git a/code/modules/surgery/remove_embedded_object.dm b/code/modules/surgery/remove_embedded_object.dm index 451ae02dac..0c3a3b55a5 100644 --- a/code/modules/surgery/remove_embedded_object.dm +++ b/code/modules/surgery/remove_embedded_object.dm @@ -2,23 +2,20 @@ name = "removal of embedded objects" steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/remove_object) possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD) - - /datum/surgery_step/remove_object name = "remove embedded objects" time = 32 accept_hand = 1 var/obj/item/bodypart/L = null - - /datum/surgery_step/remove_object/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) L = surgery.operated_bodypart if(L) - user.visible_message("[user] looks for objects embedded in [target]'s [parse_zone(user.zone_selected)].", "You look for objects embedded in [target]'s [parse_zone(user.zone_selected)]...") + display_results(user, target, "You look for objects embedded in [target]'s [parse_zone(user.zone_selected)]...", + "[user] looks for objects embedded in [target]'s [parse_zone(user.zone_selected)].", + "[user] looks for something in [target]'s [parse_zone(user.zone_selected)].") else user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "You look for [target]'s [parse_zone(user.zone_selected)]...") - /datum/surgery_step/remove_object/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(L) if(ishuman(target)) @@ -33,11 +30,12 @@ SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "embedded") if(objects > 0) - user.visible_message("[user] successfully removes [objects] objects from [H]'s [L]!", "You successfully remove [objects] objects from [H]'s [L.name].") + display_results(user, target, "You successfully remove [objects] objects from [H]'s [L.name].", + "[user] successfully removes [objects] objects from [H]'s [L]!", + "[user] successfully removes [objects] objects from [H]'s [L]!") else to_chat(user, "You find no objects embedded in [H]'s [L]!") else to_chat(user, "You can't find [target]'s [parse_zone(user.zone_selected)], let alone any objects embedded in it!") - return 1 diff --git a/code/modules/surgery/surgery_step.dm b/code/modules/surgery/surgery_step.dm index f670b80167..c5a944fbb2 100644 --- a/code/modules/surgery/surgery_step.dm +++ b/code/modules/surgery/surgery_step.dm @@ -2,13 +2,12 @@ var/name var/list/implements = list() //format is path = probability of success. alternatively var/implement_type = null //the current type of implement used. This has to be stored, as the actual typepath of the tool may not match the list type. - var/accept_hand = 0 //does the surgery step require an open hand? If true, ignores implements. Compatible with accept_any_item. - var/accept_any_item = 0 //does the surgery step accept any item? If true, ignores implements. Compatible with require_hand. + var/accept_hand = FALSE //does the surgery step require an open hand? If true, ignores implements. Compatible with accept_any_item. + var/accept_any_item = FALSE //does the surgery step accept any item? If true, ignores implements. Compatible with require_hand. var/time = 10 //how long does the step take? - var/repeatable = 0 //can this step be repeated? Make shure it isn't last step, or it used in surgery with `can_cancel = 1`. Or surgion will be stuck in the loop + var/repeatable = FALSE //can this step be repeated? Make shure it isn't last step, or it used in surgery with `can_cancel = 1`. Or surgion will be stuck in the loop var/list/chems_needed = list() //list of chems needed to complete the step. Even on success, the step will have no effect if there aren't the chems required in the mob. var/require_all_chems = TRUE //any on the list or all on the list? - /datum/surgery_step/proc/try_op(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, try_to_fail = FALSE) var/success = FALSE if(accept_hand) @@ -16,104 +15,87 @@ success = TRUE if(iscyborg(user)) success = TRUE - if(accept_any_item) if(tool && tool_check(user, tool)) success = TRUE - else if(tool) for(var/key in implements) var/match = FALSE - if(ispath(key) && istype(tool, key)) match = TRUE else if(tool.tool_behaviour == key) match = TRUE - if(match) implement_type = key if(tool_check(user, tool)) success = TRUE break - if(success) if(target_zone == surgery.location) if(get_location_accessible(target, target_zone) || surgery.ignore_clothes) - initiate(user, target, target_zone, tool, surgery, try_to_fail) - return 1 + return initiate(user, target, target_zone, tool, surgery, try_to_fail) else to_chat(user, "You need to expose [target]'s [parse_zone(target_zone)] to perform surgery on it!") - return 1 //returns 1 so we don't stab the guy in the dick or wherever. - + return TRUE //returns TRUE so we don't stab the guy in the dick or wherever. if(repeatable) var/datum/surgery_step/next_step = surgery.get_surgery_next_step() if(next_step) surgery.status++ if(next_step.try_op(user, target, user.zone_selected, user.get_active_held_item(), surgery)) - return 1 + return TRUE else surgery.status-- - - if(iscyborg(user) && user.a_intent != INTENT_HARM) //to save asimov borgs a LOT of heartache - return 1 - - return 0 - - + return FALSE /datum/surgery_step/proc/initiate(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, try_to_fail = FALSE) - surgery.step_in_progress = 1 - + surgery.step_in_progress = TRUE var/speed_mod = 1 - + var/advance = FALSE if(preop(user, target, target_zone, tool, surgery) == -1) - surgery.step_in_progress = 0 - return - + surgery.step_in_progress = FALSE + return FALSE if(tool) speed_mod = tool.toolspeed - if(do_after(user, time * speed_mod, target = target)) - var/advance = 0 var/prob_chance = 100 - if(implement_type) //this means it isn't a require hand or any item step. prob_chance = implements[implement_type] prob_chance *= surgery.get_propability_multiplier() - if((prob(prob_chance) || iscyborg(user)) && chem_check(target) && !try_to_fail) if(success(user, target, target_zone, tool, surgery)) - advance = 1 + advance = TRUE else if(failure(user, target, target_zone, tool, surgery)) - advance = 1 - + advance = TRUE if(advance && !repeatable) surgery.status++ if(surgery.status > surgery.steps.len) surgery.complete() - - surgery.step_in_progress = 0 + surgery.step_in_progress = FALSE + return advance /datum/surgery_step/proc/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to perform surgery on [target].", "You begin to perform surgery on [target]...") - + display_results(user, target, "You begin to perform surgery on [target]...", + "[user] begins to perform surgery on [target].", + "[user] begins to perform surgery on [target].") /datum/surgery_step/proc/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] succeeds!", "You succeed.") - return 1 + display_results(user, target, "You succeed.", + "[user] succeeds!", + "[user] finishes.") + return TRUE /datum/surgery_step/proc/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] screws up!", "You screw up!") - return 0 + display_results(user, target, "You screw up!", + "[user] screws up!", + "[user] finishes.", TRUE) //By default the patient will notice if the wrong thing has been cut + return FALSE /datum/surgery_step/proc/tool_check(mob/user, obj/item/tool) - return 1 - + return TRUE /datum/surgery_step/proc/chem_check(mob/living/carbon/target) if(!LAZYLEN(chems_needed)) return TRUE - if(require_all_chems) . = TRUE for(var/R in chems_needed) @@ -124,7 +106,6 @@ for(var/R in chems_needed) if(target.reagents.has_reagent(R)) return TRUE - /datum/surgery_step/proc/get_chem_list() if(!LAZYLEN(chems_needed)) return @@ -135,3 +116,11 @@ var/chemname = temp.name chems += chemname return english_list(chems, and_text = require_all_chems ? " and " : " or ") + +//Replaces visible_message during operations so only people looking over the surgeon can tell what they're doing, allowing for shenanigans. +/datum/surgery_step/proc/display_results(mob/user, mob/living/carbon/target, self_message, detailed_message, vague_message, target_detailed = FALSE) + var/list/detailed_mobs = get_hearers_in_view(1, user) //Only the surgeon and people looking over his shoulder can see the operation clearly + if(!target_detailed) + detailed_mobs -= target //The patient can't see well what's going on, unless it's something like getting cut + user.visible_message(detailed_message, self_message, vision_distance = 1, ignored_mobs = target_detailed ? null : target) + user.visible_message(vague_message, "", ignored_mobs = detailed_mobs) diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 38c31a1294..09e955d2f9 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -1269,9 +1269,44 @@ datum/uplink_item/stealthy_weapons/taeclowndo_shoes //Space Suits and Hardsuits /datum/uplink_item/suits - category = "Space Suits and Hardsuits" + category = "Space Suits, Hardsuits and Clothing" surplus = 40 +/datum/uplink_item/suits/turtlenck + name = "Tactical Turtleneck" + desc = "A slightly armored suit that has no sensor on them, if someone sees you in this hope they think its a fake." + item = /obj/item/clothing/under/syndicate + cost = 1 + exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) //They already get these + +/datum/uplink_item/suits/turtlenck_skirt + name = "Tactical Skirtleneck" + desc = "A slightly armored suit that has no sensor on them, if someone sees you in this hope they think its a fake." + item = /obj/item/clothing/under/syndicate/skirt + cost = 1 + exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) //They already get these + +/datum/uplink_item/suits/padding + name = "Soft Padding" + desc = "Padding to add to a jumpsuit to help against melee and bullets." + item = /obj/item/clothing/accessory/padding + cost = 2 + exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/suits/kevlar + name = "Kevlar sheets" + desc = "Kevlar sheets to add to jumpsuit to help against bullets and melee." + item = /obj/item/clothing/accessory/kevlar + cost = 2 + exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/suits/plastic + name = "Plastic sheet" + desc = "Plastic body sheet to add to a jumpsuit to help against laser and energy harm." + item = /obj/item/clothing/accessory/plastics + cost = 2 + exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) + /datum/uplink_item/suits/space_suit name = "Syndicate Space Suit" desc = "This red and black Syndicate space suit is less encumbering than Nanotrasen variants, \ @@ -1325,7 +1360,7 @@ datum/uplink_item/stealthy_weapons/taeclowndo_shoes desc = "A small device intended for recharging Cryptographic Sequencers. Using it will add five extra charges to the Cryptographic Sequencer." item = /obj/item/emagrecharge cost = 2 - + /datum/uplink_item/device_tools/cutouts name = "Adaptive Cardboard Cutouts" desc = "These cardboard cutouts are coated with a thin material that prevents discoloration and makes the images on them appear more lifelike. \ @@ -1424,6 +1459,7 @@ datum/uplink_item/stealthy_weapons/taeclowndo_shoes desc = "A cheap bottle of one use syndicate brand super glue. \ Use on any item to make it undroppable. \ Be careful not to glue an item you're already holding!" + exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) item = /obj/item/syndie_glue cost = 2 @@ -1802,7 +1838,7 @@ datum/uplink_item/stealthy_weapons/taeclowndo_shoes desc = "A single-use autoinjector which contains an experimental serum that causes rapid muscular growth in Hominidae. \ Side-affects may include hypertrichosis, violent outbursts, and an unending affinity for bananas." item = /obj/item/reagent_containers/hypospray/magillitis - cost = 15 + cost = 8 restricted_roles = list("Geneticist", "Chief Medical Officer") /datum/uplink_item/role_restricted/modified_syringe_gun diff --git a/code/modules/vehicles/cars/clowncar.dm b/code/modules/vehicles/cars/clowncar.dm index 63ef4fda5a..e504ea84f2 100644 --- a/code/modules/vehicles/cars/clowncar.dm +++ b/code/modules/vehicles/cars/clowncar.dm @@ -63,11 +63,13 @@ DumpMobs(TRUE) /obj/vehicle/sealed/car/clowncar/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED to_chat(user, "You scramble the clowncar child safety lock and a panel with 6 colorful buttons appears!") initialize_controller_action_type(/datum/action/vehicle/sealed/RollTheDice, VEHICLE_CONTROL_DRIVE) + return TRUE /obj/vehicle/sealed/car/clowncar/Destroy() playsound(src, 'sound/vehicles/clowncar_fart.ogg', 100) diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 410952397d..5165343993 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -65,7 +65,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C var/scan_id = 1 var/obj/item/coin/coin var/obj/item/stack/spacecash/bill - + var/global/vending_cache = list() //used for storing the icons of items being vended var/dish_quants = list() //used by the snack machine's custom compartment to count dishes. @@ -306,10 +306,12 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C . = ..() /obj/machinery/vending/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED to_chat(user, "You short out the product lock on [src].") + return TRUE /obj/machinery/vending/_try_interact(mob/user) if(seconds_electrified && !(stat & NOPOWER)) diff --git a/code/modules/vending/autodrobe.dm b/code/modules/vending/autodrobe.dm index a265a4e907..c577643df3 100644 --- a/code/modules/vending/autodrobe.dm +++ b/code/modules/vending/autodrobe.dm @@ -54,7 +54,7 @@ /obj/item/clothing/head/ushanka = 1, /obj/item/clothing/suit/imperium_monk = 1, /obj/item/clothing/mask/gas/cyborg = 1, - /obj/item/clothing/suit/holidaypriest = 1, + /obj/item/clothing/suit/chaplain/holidaypriest = 1, /obj/item/clothing/head/wizard/marisa/fake = 1, /obj/item/clothing/suit/wizrobe/marisa/fake = 1, /obj/item/clothing/under/sundress = 1, @@ -122,7 +122,7 @@ /obj/item/clothing/shoes/roman = 1, /obj/item/shield/riot/roman/fake = 1, /obj/item/skub = 1, - /obj/item/clothing/under/lobster = 1, // CIT CHANGES + /obj/item/clothing/under/lobster = 1, // CIT CHANGES /obj/item/clothing/head/lobsterhat = 1, /obj/item/clothing/head/drfreezehat = 1, /obj/item/clothing/suit/dracula = 1, diff --git a/code/modules/vending/clothesmate.dm b/code/modules/vending/clothesmate.dm index 1497992fe8..b232184975 100644 --- a/code/modules/vending/clothesmate.dm +++ b/code/modules/vending/clothesmate.dm @@ -99,7 +99,9 @@ /obj/item/clothing/suit/jacket/letterman_red = 3, /obj/item/clothing/ears/headphones = 10, /obj/item/clothing/suit/apron/purple_bartender = 4, - /obj/item/clothing/under/rank/bartender/purple = 4) + /obj/item/clothing/under/rank/bartender/purple = 4, + /obj/item/clothing/accessory/attrocious_pokadots = 8, + /obj/item/clothing/accessory/black_white_pokadots = 8) contraband = list(/obj/item/clothing/under/syndicate/tacticool = 3, /obj/item/clothing/under/syndicate/tacticool/skirt = 3, /obj/item/clothing/mask/balaclava = 3, @@ -109,7 +111,8 @@ /obj/item/clothing/suit/jacket/letterman_syndie = 5, /obj/item/clothing/under/jabroni = 2, /obj/item/clothing/suit/vapeshirt = 2, - /obj/item/clothing/under/geisha = 4) + /obj/item/clothing/under/geisha = 4, + /obj/item/clothing/accessory/syndi_pokadots = 4) premium = list(/obj/item/clothing/under/suit_jacket/checkered = 4, /obj/item/clothing/head/mailman = 2, /obj/item/clothing/under/rank/mailman = 2, @@ -117,7 +120,8 @@ /obj/item/clothing/suit/jacket/leather/overcoat = 4, /obj/item/clothing/under/pants/mustangjeans = 3, /obj/item/clothing/neck/necklace/dope = 5, - /obj/item/clothing/suit/jacket/letterman_nanotrasen = 5) + /obj/item/clothing/suit/jacket/letterman_nanotrasen = 5, + /obj/item/clothing/accessory/nt_pokadots = 5) refill_canister = /obj/item/vending_refill/clothing /obj/item/vending_refill/clothing diff --git a/code/modules/vending/medical.dm b/code/modules/vending/medical.dm index 523606aa6a..44dca6b257 100644 --- a/code/modules/vending/medical.dm +++ b/code/modules/vending/medical.dm @@ -28,7 +28,9 @@ contraband = list(/obj/item/reagent_containers/pill/tox = 3, /obj/item/reagent_containers/pill/morphine = 4, /obj/item/reagent_containers/pill/charcoal = 6) - premium = list(/obj/item/storage/box/hug/medical = 1, + premium = list(/obj/item/reagent_containers/medspray/synthflesh = 2, + /obj/item/storage/box/hug/medical = 1, + /obj/item/storage/pill_bottle/psicodine = 2, /obj/item/reagent_containers/hypospray/medipen = 3, /obj/item/storage/belt/medical = 3, /obj/item/wrench/medical = 1, diff --git a/code/modules/vending/megaseed.dm b/code/modules/vending/megaseed.dm index 4594048256..d230f40af0 100644 --- a/code/modules/vending/megaseed.dm +++ b/code/modules/vending/megaseed.dm @@ -15,6 +15,7 @@ /obj/item/seeds/chili = 3, /obj/item/seeds/cocoapod = 3, /obj/item/seeds/coffee = 3, + /obj/item/seeds/cotton = 3, /obj/item/seeds/corn = 3, /obj/item/seeds/eggplant = 3, /obj/item/seeds/grape = 3, @@ -23,6 +24,7 @@ /obj/item/seeds/lime = 3, /obj/item/seeds/onion = 3, /obj/item/seeds/orange = 3, + /obj/item/seeds/peach = 3, /obj/item/seeds/peanutseed = 3, /obj/item/seeds/pineapple = 3, /obj/item/seeds/potato = 3, @@ -31,7 +33,9 @@ /obj/item/seeds/replicapod = 3, /obj/item/seeds/wheat/rice = 3, /obj/item/seeds/soya = 3, + /obj/item/seeds/sugarcane = 3, /obj/item/seeds/sunflower = 3, + /obj/item/seeds/strawberry = 3, /obj/item/seeds/tea = 3, /obj/item/seeds/tobacco = 3, /obj/item/seeds/tomato = 3, diff --git a/code/modules/vending/wardrobes.dm b/code/modules/vending/wardrobes.dm index e86c8521a6..0cf0069436 100644 --- a/code/modules/vending/wardrobes.dm +++ b/code/modules/vending/wardrobes.dm @@ -317,9 +317,12 @@ /obj/item/clothing/under/rank/chaplain = 2, /obj/item/clothing/under/rank/chaplain/skirt = 2, /obj/item/clothing/shoes/sneakers/black = 2, - /obj/item/clothing/suit/nun = 2, + /obj/item/clothing/suit/chaplain/nun = 2, /obj/item/clothing/head/nun_hood = 2, - /obj/item/clothing/suit/holidaypriest = 2, + /obj/item/clothing/suit/chaplain/holidaypriest = 2, + /obj/item/clothing/suit/chaplain/pharaoh = 2, + /obj/item/clothing/head/nemes = 1, + /obj/item/clothing/head/pharaoh = 1, /obj/item/storage/fancy/candle_box = 3) refill_canister = /obj/item/vending_refill/wardrobe/chap_wardrobe @@ -338,7 +341,8 @@ /obj/item/clothing/suit/toggle/labcoat/chemist = 3, /obj/item/storage/backpack/chemistry = 3, /obj/item/storage/backpack/satchel/chem = 3, - /obj/item/storage/bag/chemistry = 3) + /obj/item/storage/bag/chemistry = 3, + /obj/item/fermichem/pHbooklet = 3)//pH indicator) refill_canister = /obj/item/vending_refill/wardrobe/chem_wardrobe /obj/item/vending_refill/wardrobe/chem_wardrobe diff --git a/code/modules/zombie/items.dm b/code/modules/zombie/items.dm index 9a2455f56d..ae53f29a55 100644 --- a/code/modules/zombie/items.dm +++ b/code/modules/zombie/items.dm @@ -13,6 +13,7 @@ hitsound = 'sound/hallucinations/growl1.ogg' force = 21 // Just enough to break airlocks with melee attacks damtype = "brute" + total_mass = TOTAL_MASS_HAND_REPLACEMENT /obj/item/zombie_hand/Initialize() . = ..() diff --git a/config/admins.txt b/config/admins.txt index 27a2178e2c..1fdf480dd3 100644 --- a/config/admins.txt +++ b/config/admins.txt @@ -1,11 +1,11 @@ -############################################################################################### -# Basically, ckey goes first. Rank goes after the "=" # -# Case is not important for ckey. # -# Case IS important for the rank. # -# All punctuation (spaces etc) EXCEPT '-', '_' and '@' will be stripped from rank names. # -# Ranks can be anything defined in admin_ranks.txt # -# NOTE: if the rank-name cannot be found in admin_ranks.txt, they will not be adminned! ~Carn # -# NOTE: syntax was changed to allow hyphenation of ranknames, since spaces are stripped. # -############################################################################################### - -yourckeygoeshere = Host +############################################################################################### +# Basically, ckey goes first. Rank goes after the "=" # +# Case is not important for ckey. # +# Case IS important for the rank. # +# All punctuation (spaces etc) EXCEPT '-', '_' and '@' will be stripped from rank names. # +# Ranks can be anything defined in admin_ranks.txt # +# NOTE: if the rank-name cannot be found in admin_ranks.txt, they will not be adminned! ~Carn # +# NOTE: syntax was changed to allow hyphenation of ranknames, since spaces are stripped. # +############################################################################################### + +yourckeygoeshere = Host \ No newline at end of file diff --git a/config/config.txt b/config/config.txt index 3bc9f873a9..a01f5424da 100644 --- a/config/config.txt +++ b/config/config.txt @@ -4,6 +4,7 @@ $include game_options.txt $include dbconfig.txt $include comms.txt $include antag_rep.txt +$include donator_groupings.txt # You can use the @ character at the beginning of a config option to lock it from being edited in-game # Example usage: diff --git a/config/donator_groupings.txt b/config/donator_groupings.txt new file mode 100644 index 0000000000..b26d1efe22 --- /dev/null +++ b/config/donator_groupings.txt @@ -0,0 +1,8 @@ +#this is a bad system but I'm lazy so it piggybacks off config loader system. +#Specify group followed by ckey for each ckey. + +#TIER_1_DONATORS test_ckey + +#TIER_2_DONATORS test_ckey + +#TIER_3_DONATORS test_ckey diff --git a/goon/browserassets/css/browserOutput.css b/goon/browserassets/css/browserOutput.css new file mode 100644 index 0000000000..58129ac1cb --- /dev/null +++ b/goon/browserassets/css/browserOutput.css @@ -0,0 +1,876 @@ +/***************************************** +* +* GLOBAL STYLES +* +******************************************/ +html, body { + padding: 0; + margin: 0; + height: 100%; + color: #000000; +} +body { + background: #E0E0E0; /*CIT CHANGE - darkens chatbox a lil*/ + font-family: Verdana, sans-serif; + font-size: 9pt; + line-height: 1.2; + overflow-x: hidden; + overflow-y: scroll; + word-wrap: break-word; +} + +em { + font-style: normal; + font-weight: bold; +} + +img { + margin: 0; + padding: 0; + line-height: 1; + -ms-interpolation-mode: nearest-neighbor; + image-rendering: pixelated; +} +img.icon { + height: 1em; + min-height: 16px; + width: auto; + vertical-align: bottom; +} + + +.r:before { /* "repeated" badge class for combined messages */ + content: 'x'; +} +.r { + display: inline-block; + min-width: 0.5em; + font-size: 0.7em; + padding: 0.2em 0.3em; + line-height: 1; + color: white; + text-align: center; + white-space: nowrap; + vertical-align: middle; + background-color: crimson; + border-radius: 10px; +} + +a {color: #0000ff;} +a.visited {color: #ff00ff;} +a:visited {color: #ff00ff;} +a.popt {text-decoration: none;} + +/***************************************** +* +* OUTPUT NOT RELATED TO ACTUAL MESSAGES +* +******************************************/ +#loading { + position: fixed; + width: 300px; + height: 150px; + text-align: center; + left: 50%; + top: 50%; + margin: -75px 0 0 -150px; +} +#loading i {display: block; padding-bottom: 3px;} + +#messages { + font-size: 13px; + padding: 3px; + margin: 0; + word-wrap: break-word; +} +#newMessages { + position: fixed; + display: block; + bottom: 0; + right: 0; + padding: 8px; + background: #ddd; + text-decoration: none; + font-variant: small-caps; + font-size: 1.1em; + font-weight: bold; + color: #333; +} +#newMessages:hover {background: #ccc;} +#newMessages i {vertical-align: middle; padding-left: 3px;} +#ping { + position: fixed; + top: 0; + right: 80px; + width: 45px; + background: #ddd; + height: 30px; + padding: 8px 0 2px 0; +} +#ping i {display: block; text-align: center;} +#ping .ms { + display: block; + text-align: center; + font-size: 8pt; + padding-top: 2px; +} +#userBar { + position: fixed; + top: 0; + right: 0; +} +#userBar .subCell { + background: #ddd; + height: 30px; + padding: 5px 0; + display: block; + color: #333; + text-decoration: none; + line-height: 28px; + border-top: 1px solid #b4b4b4; +} +#userBar .subCell:hover {background: #ccc;} +#userBar .toggle { + width: 40px; + background: #ccc; + border-top: 0; + float: right; + text-align: center; +} +#userBar .sub {clear: both; display: none; width: 160px;} +#userBar .sub.scroll {overflow-y: scroll;} +#userBar .sub.subCell {padding: 3px 0 3px 8px; line-height: 30px; font-size: 0.9em; clear: both;} +#userBar .sub span { + display: block; + line-height: 30px; + float: left; +} +#userBar .sub i { + display: block; + padding: 0 5px; + font-size: 1.1em; + width: 22px; + text-align: center; + line-height: 30px; + float: right; +} +#userBar .sub input { + position: absolute; + padding: 7px 5px; + width: 121px; + line-height: 30px; + float: left; +} +#userBar .topCell {border-top: 0;} + +/* POPUPS */ +.popup { + position: fixed; + top: 50%; + left: 50%; + background: #ddd; +} +.popup .close { + position: absolute; + background: #aaa; + top: 0; + right: 0; + color: #333; + text-decoration: none; + z-index: 2; + padding: 0 10px; + height: 30px; + line-height: 30px; +} +.popup .close:hover {background: #999;} +.popup .head { + background: #999; + color: #ddd; + padding: 0 10px; + height: 30px; + line-height: 30px; + text-transform: uppercase; + font-size: 0.9em; + font-weight: bold; + border-bottom: 2px solid green; +} +.popup input {border: 1px solid #999; background: #fff; margin: 0; padding: 5px; outline: none; color: #333;} +.popup input[type=text]:hover, .popup input[type=text]:active, .popup input[type=text]:focus {border-color: green;} +.popup input[type=submit] {padding: 5px 10px; background: #999; color: #ddd; text-transform: uppercase; font-size: 0.9em; font-weight: bold;} +.popup input[type=submit]:hover, .popup input[type=submit]:focus, .popup input[type=submit]:active {background: #aaa; cursor: pointer;} + +.changeFont {padding: 10px;} +.changeFont a {display: block; text-decoration: none; padding: 3px; color: #333;} +.changeFont a:hover {background: #ccc;} + +.highlightPopup {padding: 10px; text-align: center;} +.highlightPopup input[type=text] {display: block; width: 215px; text-align: left; margin-top: 5px;} +.highlightPopup input.highlightColor {background-color: #FFFF00;} +.highlightPopup input.highlightTermSubmit {margin-top: 5px;} + +/* ADMIN CONTEXT MENU */ +.contextMenu { + background-color: #ddd; + position: fixed; + margin: 2px; + width: 150px; +} +.contextMenu a { + display: block; + padding: 2px 5px; + text-decoration: none; + color: #333; +} + +.contextMenu a:hover { + background-color: #ccc; +} + +/* ADMIN FILTER MESSAGES MENU */ +.filterMessages {padding: 5px;} +.filterMessages div {padding: 2px 0;} +.filterMessages input {} +.filterMessages label {} + +.icon-stack {height: 1em; line-height: 1em; width: 1em; vertical-align: middle; margin-top: -2px;} + + +/***************************************** +* +* OUTPUT ACTUALLY RELATED TO MESSAGES +* +******************************************/ + +/* MOTD */ +.motd {color: #638500; font-family: Verdana, sans-serif;} +.motd h1, .motd h2, .motd h3, .motd h4, .motd h5, .motd h6 {color: #638500; text-decoration: underline;} +.motd a, .motd a:link, .motd a:visited, .motd a:active, .motd a:hover {color: #638500;} + +/* ADD HERE FOR BOLD */ +.bold, .name, .prefix, .ooc, .looc, .adminooc, .admin, .medal, .yell {font-weight: bold;} + +/* ADD HERE FOR ITALIC */ +.italic, .italics, .emote {font-style: italic;} + +/* OUTPUT COLORS */ +.highlight {background: yellow;} + +h1, h2, h3, h4, h5, h6 {color: #0000ff;font-family: Georgia, Verdana, sans-serif;} +h1.alert, h2.alert {color: #000000;} + +em {font-style: normal; font-weight: bold;} + +.ooc { font-weight: bold;} +.adminobserverooc {color: #0099cc; font-weight: bold;} +.adminooc {color: #700038; font-weight: bold;} + +.adminobserver {color: #996600; font-weight: bold;} +.admin {color: #386aff; font-weight: bold;} + +.name { font-weight: bold;} + +.say {} +.deadsay {color: #5c00e6;} +.binarysay {color: #20c20e; background-color: #000000; display: block;} +.binarysay a {color: #00ff00;} +.binarysay a:active, .binarysay a:visited {color: #88ff88;} +.radio {color: #008000;} +.sciradio {color: #993399;} +.comradio {color: #948f02;} +.secradio {color: #a30000;} +.medradio {color: #337296;} +.engradio {color: #fb5613;} +.suppradio {color: #a8732b;} +.servradio {color: #6eaa2c;} +.syndradio {color: #6d3f40;} +.centcomradio {color: #686868;} +.aiprivradio {color: #ff00ff;} +.redteamradio {color: #ff0000;} +.blueteamradio {color: #0000ff;} + +.yell { font-weight: bold;} + +.alert {color: #ff0000;} +h1.alert, h2.alert {color: #000000;} + +.emote { font-style: italic;} +.selecteddna {color: #ffffff; background-color: #001B1B} + +.attack {color: #ff0000;} +.disarm {color: #990000;} +.passive {color: #660000;} + +.userdanger {color: #ff0000; font-weight: bold; font-size: 24px;} +.danger {color: #ff0000;} +.warning {color: #ff0000; font-style: italic;} +.boldwarning {color: #ff0000; font-style: italic; font-weight: bold} +.announce {color: #228b22; font-weight: bold;} +.boldannounce {color: #ff0000; font-weight: bold;} +.greenannounce {color: #00ff00; font-weight: bold;} +.rose {color: #ff5050;} +.info {color: #0000CC;} +.notice {color: #000099;} +.boldnotice {color: #000099; font-weight: bold;} +.adminnotice {color: #0000ff;} +.adminhelp {color: #ff0000; font-weight: bold;} +.unconscious {color: #0000ff; font-weight: bold;} +.suicide {color: #ff5050; font-style: italic;} +.green {color: #03ff39;} +.nicegreen {color: #14a833;} +.shadowling {color: #3b2769;} +.cult {color: #960000;} + +.cultitalic {color: #960000; font-style: italic;} +.cultbold {color: #960000; font-style: italic; font-weight: bold;} +.cultboldtalic {color: #960000; font-weight: bold; font-size: 24px;} + +.cultlarge {color: #960000; font-weight: bold; font-size: 24px;} +.narsie {color: #960000; font-weight: bold; font-size: 120px;} +.narsiesmall {color: #960000; font-weight: bold; font-size: 48px;} +.colossus {color: #7F282A; font-size: 40px;} +.hierophant {color: #660099; font-weight: bold; font-style: italic;} +.hierophant_warning {color: #660099; font-style: italic;} +.purple {color: #5e2d79;} +.holoparasite {color: #35333a;} + +.revennotice {color: #1d2953;} +.revenboldnotice {color: #1d2953; font-weight: bold;} +.revenbignotice {color: #1d2953; font-weight: bold; font-size: 24px;} +.revenminor {color: #823abb} +.revenwarning {color: #760fbb; font-style: italic;} +.revendanger {color: #760fbb; font-weight: bold; font-size: 24px;} +.umbra {color: #5000A0;} +.umbra_emphasis {color: #5000A0; font-weight: bold; font-style: italic;} +.umbra_large {color: #5000A0; font-size: 24px; font-weight: bold; font-style: italic;} + +.deconversion_message {color: #5000A0; font-size: 24px; font-style: italic;} + +.brass {color: #BE8700;} +.heavy_brass {color: #BE8700; font-weight: bold; font-style: italic;} +.large_brass {color: #BE8700; font-size: 24px;} +.big_brass {color: #BE8700; font-size: 24px; font-weight: bold; font-style: italic;} +.ratvar {color: #BE8700; font-size: 48px; font-weight: bold; font-style: italic;} +.alloy {color: #42474D;} +.heavy_alloy {color: #42474D; font-weight: bold; font-style: italic;} +.nezbere_large {color: #42474D; font-size: 24px; font-weight: bold; font-style: italic;} +.nezbere {color: #42474D; font-weight: bold; font-style: italic;} +.nezbere_small {color: #42474D;} +.sevtug_large {color: #AF0AAF; font-size: 24px; font-weight: bold; font-style: italic;} +.sevtug {color: #AF0AAF; font-weight: bold; font-style: italic;} +.sevtug_small {color: #AF0AAF;} +.inathneq_large {color: #1E8CE1; font-size: 24px; font-weight: bold; font-style: italic;} +.inathneq {color: #1E8CE1; font-weight: bold; font-style: italic;} +.inathneq_small {color: #1E8CE1;} +.nzcrentr_large {color: #DAAA18; font-size: 24px; font-weight: bold; font-style: italic;} +.nzcrentr {color: #DAAA18; font-weight: bold; font-style: italic;} +.nzcrentr_small {color: #DAAA18;} +.neovgre_large {color: #6E001A; font-size: 24px; font-weight: bold; font-style: italic;} +.neovgre {color: #6E001A; font-weight: bold; font-style: italic;} +.neovgre_small {color: #6E001A;} + +.newscaster {color: #800000;} +.ghostalert {color: #5c00e6; font-style: italic; font-weight: bold;} + +.alien {color: #543354;} +.noticealien {color: #00c000;} +.alertalien {color: #00c000; font-weight: bold;} +.changeling {color: #800080; font-style: italic;} + +.spider {color: #4d004d;} + +.interface {color: #330033;} + +.sans {font-family: "Comic Sans MS", cursive, sans-serif;} +.papyrus {font-family: "Papyrus", cursive, sans-serif;} +.robot {font-family: "Courier New", cursive, sans-serif;} + +.command_headset {font-weight: bold; font-size: 24px;} +.small {font-size: 8px;} +.big {font-size: 24px;} +.reallybig {font-size: 32px;} +.extremelybig {font-size: 40px;} +.greentext {color: #00FF00; font-size: 24px;} +.redtext {color: #FF0000; font-size: 24px;} +.clown {color: #FF69Bf; font-size: 24px; font-family: "Comic Sans MS", cursive, sans-serif; font-weight: bold;} +.his_grace {color: #15D512; font-family: "Courier New", cursive, sans-serif; font-style: italic;} +.velvet {color: #660015; font-weight: bold; animation: velvet 5000ms infinite;} +@keyframes velvet { + 0% { color: #400020; } + 40% { color: #FF0000; } + 50% { color: #FF8888; } + 60% { color: #FF0000; } + 100% { color: #400020; } +} + +.hypnophrase {color: #202020; font-weight: bold; animation: hypnocolor 1500ms infinite;} +@keyframes hypnocolor { + 0% { color: #202020; } + 25% { color: #4b02ac; } + 50% { color: #9f41f1; } + 75% { color: #541c9c; } + 100% { color: #7adbf3; } +} + +.phobia {color: #dd0000; font-weight: bold; animation: phobia 750ms infinite;} +@keyframes phobia { + 0% { color: #f75a5a; } + 50% { color: #dd0000; } + 100% { color: #f75a5a; } +} + +.icon {height: 1em; width: auto;} + +.memo {color: #638500; text-align: center;} +.memoedit {text-align: center; font-size: 16px;} +.abductor {color: #800080; font-style: italic;} +.mind_control {color: #A00D6F; font-size: 3; font-weight: bold; font-style: italic;} +.slime {color: #00CED1;} +.drone {color: #848482;} +.monkey {color: #975032;} +.swarmer {color: #2C75FF;} +.resonate {color: #298F85;} + +.monkeyhive {color: #774704;} +.monkeylead {color: #774704; font-size: 2;} + +.connectionClosed, .fatalError {background: red; color: white; padding: 5px;} +.connectionClosed.restored {background: green;} +.internal.boldnshit {color: blue; font-weight: bold;} + +/* HELPER CLASSES */ +.text-normal {font-weight: normal; font-style: normal;} +.hidden {display: none; visibility: hidden;}/***************************************** +* +* GLOBAL STYLES +* +******************************************/ +html, body { + padding: 0; + margin: 0; + height: 100%; + color: #000000; +} +body { + background: #E0E0E0; /*CIT CHANGE - darkens chatbox a lil*/ + font-family: Verdana, sans-serif; + font-size: 9pt; + line-height: 1.2; + overflow-x: hidden; + overflow-y: scroll; + word-wrap: break-word; +} + +em { + font-style: normal; + font-weight: bold; +} + +img { + margin: 0; + padding: 0; + line-height: 1; + -ms-interpolation-mode: nearest-neighbor; + image-rendering: pixelated; +} +img.icon { + height: 1em; + min-height: 16px; + width: auto; + vertical-align: bottom; +} + + +.r:before { /* "repeated" badge class for combined messages */ + content: 'x'; +} +.r { + display: inline-block; + min-width: 0.5em; + font-size: 0.7em; + padding: 0.2em 0.3em; + line-height: 1; + color: white; + text-align: center; + white-space: nowrap; + vertical-align: middle; + background-color: crimson; + border-radius: 10px; +} + +a {color: #0000ff;} +a.visited {color: #ff00ff;} +a:visited {color: #ff00ff;} +a.popt {text-decoration: none;} + +/***************************************** +* +* OUTPUT NOT RELATED TO ACTUAL MESSAGES +* +******************************************/ +#loading { + position: fixed; + width: 300px; + height: 150px; + text-align: center; + left: 50%; + top: 50%; + margin: -75px 0 0 -150px; +} +#loading i {display: block; padding-bottom: 3px;} + +#messages { + font-size: 13px; + padding: 3px; + margin: 0; + word-wrap: break-word; +} +#newMessages { + position: fixed; + display: block; + bottom: 0; + right: 0; + padding: 8px; + background: #ddd; + text-decoration: none; + font-variant: small-caps; + font-size: 1.1em; + font-weight: bold; + color: #333; +} +#newMessages:hover {background: #ccc;} +#newMessages i {vertical-align: middle; padding-left: 3px;} +#ping { + position: fixed; + top: 0; + right: 80px; + width: 45px; + background: #ddd; + height: 30px; + padding: 8px 0 2px 0; +} +#ping i {display: block; text-align: center;} +#ping .ms { + display: block; + text-align: center; + font-size: 8pt; + padding-top: 2px; +} +#userBar { + position: fixed; + top: 0; + right: 0; +} +#userBar .subCell { + background: #ddd; + height: 30px; + padding: 5px 0; + display: block; + color: #333; + text-decoration: none; + line-height: 28px; + border-top: 1px solid #b4b4b4; +} +#userBar .subCell:hover {background: #ccc;} +#userBar .toggle { + width: 40px; + background: #ccc; + border-top: 0; + float: right; + text-align: center; +} +#userBar .sub {clear: both; display: none; width: 160px;} +#userBar .sub.scroll {overflow-y: scroll;} +#userBar .sub.subCell {padding: 3px 0 3px 8px; line-height: 30px; font-size: 0.9em; clear: both;} +#userBar .sub span { + display: block; + line-height: 30px; + float: left; +} +#userBar .sub i { + display: block; + padding: 0 5px; + font-size: 1.1em; + width: 22px; + text-align: center; + line-height: 30px; + float: right; +} +#userBar .sub input { + position: absolute; + padding: 7px 5px; + width: 121px; + line-height: 30px; + float: left; +} +#userBar .topCell {border-top: 0;} + +/* POPUPS */ +.popup { + position: fixed; + top: 50%; + left: 50%; + background: #ddd; +} +.popup .close { + position: absolute; + background: #aaa; + top: 0; + right: 0; + color: #333; + text-decoration: none; + z-index: 2; + padding: 0 10px; + height: 30px; + line-height: 30px; +} +.popup .close:hover {background: #999;} +.popup .head { + background: #999; + color: #ddd; + padding: 0 10px; + height: 30px; + line-height: 30px; + text-transform: uppercase; + font-size: 0.9em; + font-weight: bold; + border-bottom: 2px solid green; +} +.popup input {border: 1px solid #999; background: #fff; margin: 0; padding: 5px; outline: none; color: #333;} +.popup input[type=text]:hover, .popup input[type=text]:active, .popup input[type=text]:focus {border-color: green;} +.popup input[type=submit] {padding: 5px 10px; background: #999; color: #ddd; text-transform: uppercase; font-size: 0.9em; font-weight: bold;} +.popup input[type=submit]:hover, .popup input[type=submit]:focus, .popup input[type=submit]:active {background: #aaa; cursor: pointer;} + +.changeFont {padding: 10px;} +.changeFont a {display: block; text-decoration: none; padding: 3px; color: #333;} +.changeFont a:hover {background: #ccc;} + +.highlightPopup {padding: 10px; text-align: center;} +.highlightPopup input[type=text] {display: block; width: 215px; text-align: left; margin-top: 5px;} +.highlightPopup input.highlightColor {background-color: #FFFF00;} +.highlightPopup input.highlightTermSubmit {margin-top: 5px;} + +/* ADMIN CONTEXT MENU */ +.contextMenu { + background-color: #ddd; + position: fixed; + margin: 2px; + width: 150px; +} +.contextMenu a { + display: block; + padding: 2px 5px; + text-decoration: none; + color: #333; +} + +.contextMenu a:hover { + background-color: #ccc; +} + +/* ADMIN FILTER MESSAGES MENU */ +.filterMessages {padding: 5px;} +.filterMessages div {padding: 2px 0;} +.filterMessages input {} +.filterMessages label {} + +.icon-stack {height: 1em; line-height: 1em; width: 1em; vertical-align: middle; margin-top: -2px;} + + +/***************************************** +* +* OUTPUT ACTUALLY RELATED TO MESSAGES +* +******************************************/ + +/* MOTD */ +.motd {color: #638500; font-family: Verdana, sans-serif;} +.motd h1, .motd h2, .motd h3, .motd h4, .motd h5, .motd h6 {color: #638500; text-decoration: underline;} +.motd a, .motd a:link, .motd a:visited, .motd a:active, .motd a:hover {color: #638500;} + +/* ADD HERE FOR BOLD */ +.bold, .name, .prefix, .ooc, .looc, .adminooc, .admin, .medal, .yell {font-weight: bold;} + +/* ADD HERE FOR ITALIC */ +.italic, .italics, .emote {font-style: italic;} + +/* OUTPUT COLORS */ +.highlight {background: yellow;} + +h1, h2, h3, h4, h5, h6 {color: #0000ff;font-family: Georgia, Verdana, sans-serif;} +h1.alert, h2.alert {color: #000000;} + +em {font-style: normal; font-weight: bold;} + +.ooc { font-weight: bold;} +.adminobserverooc {color: #0099cc; font-weight: bold;} +.adminooc {color: #700038; font-weight: bold;} + +.adminsay {color: #FF4500; font-weight: bold;} +.admin {color: #386aff; font-weight: bold;} + +.name { font-weight: bold;} + +.say {} +.deadsay {color: #5c00e6;} +.binarysay {color: #20c20e; background-color: #000000; display: block;} +.binarysay a {color: #00ff00;} +.binarysay a:active, .binarysay a:visited {color: #88ff88;} +.radio {color: #008000;} +.sciradio {color: #993399;} +.comradio {color: #948f02;} +.secradio {color: #a30000;} +.medradio {color: #337296;} +.engradio {color: #fb5613;} +.suppradio {color: #a8732b;} +.servradio {color: #6eaa2c;} +.syndradio {color: #6d3f40;} +.centcomradio {color: #686868;} +.aiprivradio {color: #ff00ff;} +.redteamradio {color: #ff0000;} +.blueteamradio {color: #0000ff;} + +.yell { font-weight: bold;} + +.alert {color: #ff0000;} +h1.alert, h2.alert {color: #000000;} + +.emote { font-style: italic;} +.selecteddna {color: #ffffff; background-color: #001B1B} + +.attack {color: #ff0000;} +.disarm {color: #990000;} +.passive {color: #660000;} + +.userdanger {color: #ff0000; font-weight: bold; font-size: 24px;} +.danger {color: #ff0000;} +.warning {color: #ff0000; font-style: italic;} +.boldwarning {color: #ff0000; font-style: italic; font-weight: bold} +.announce {color: #228b22; font-weight: bold;} +.boldannounce {color: #ff0000; font-weight: bold;} +.greenannounce {color: #00ff00; font-weight: bold;} +.rose {color: #ff5050;} +.info {color: #0000CC;} +.notice {color: #000099;} +.boldnotice {color: #000099; font-weight: bold;} +.adminnotice {color: #0000ff;} +.adminhelp {color: #ff0000; font-weight: bold;} +.unconscious {color: #0000ff; font-weight: bold;} +.suicide {color: #ff5050; font-style: italic;} +.green {color: #03ff39;} +.nicegreen {color: #14a833;} +.userlove {color: #FF1493; font-style: italic; font-weight: bold; text-shadow: 0 0 6px #ff6dbc;} +.love {color: #ff006a; font-style: italic; text-shadow: 0 0 6px #ff6d6d;} +.shadowling {color: #3b2769;} +.cult {color: #960000;} + +.cultitalic {color: #960000; font-style: italic;} +.cultbold {color: #960000; font-style: italic; font-weight: bold;} +.cultboldtalic {color: #960000; font-weight: bold; font-size: 24px;} + +.cultlarge {color: #960000; font-weight: bold; font-size: 24px;} +.narsie {color: #960000; font-weight: bold; font-size: 120px;} +.narsiesmall {color: #960000; font-weight: bold; font-size: 48px;} +.colossus {color: #7F282A; font-size: 40px;} +.hierophant {color: #660099; font-weight: bold; font-style: italic;} +.hierophant_warning {color: #660099; font-style: italic;} +.purple {color: #5e2d79;} +.holoparasite {color: #35333a;} + +.revennotice {color: #1d2953;} +.revenboldnotice {color: #1d2953; font-weight: bold;} +.revenbignotice {color: #1d2953; font-weight: bold; font-size: 24px;} +.revenminor {color: #823abb} +.revenwarning {color: #760fbb; font-style: italic;} +.revendanger {color: #760fbb; font-weight: bold; font-size: 24px;} +.umbra {color: #5000A0;} +.umbra_emphasis {color: #5000A0; font-weight: bold; font-style: italic;} +.umbra_large {color: #5000A0; font-size: 24px; font-weight: bold; font-style: italic;} + +.deconversion_message {color: #5000A0; font-size: 24px; font-style: italic;} + +.brass {color: #BE8700;} +.heavy_brass {color: #BE8700; font-weight: bold; font-style: italic;} +.large_brass {color: #BE8700; font-size: 24px;} +.big_brass {color: #BE8700; font-size: 24px; font-weight: bold; font-style: italic;} +.ratvar {color: #BE8700; font-size: 48px; font-weight: bold; font-style: italic;} +.alloy {color: #42474D;} +.heavy_alloy {color: #42474D; font-weight: bold; font-style: italic;} +.nezbere_large {color: #42474D; font-size: 24px; font-weight: bold; font-style: italic;} +.nezbere {color: #42474D; font-weight: bold; font-style: italic;} +.nezbere_small {color: #42474D;} +.sevtug_large {color: #AF0AAF; font-size: 24px; font-weight: bold; font-style: italic;} +.sevtug {color: #AF0AAF; font-weight: bold; font-style: italic;} +.sevtug_small {color: #AF0AAF;} +.inathneq_large {color: #1E8CE1; font-size: 24px; font-weight: bold; font-style: italic;} +.inathneq {color: #1E8CE1; font-weight: bold; font-style: italic;} +.inathneq_small {color: #1E8CE1;} +.nzcrentr_large {color: #DAAA18; font-size: 24px; font-weight: bold; font-style: italic;} +.nzcrentr {color: #DAAA18; font-weight: bold; font-style: italic;} +.nzcrentr_small {color: #DAAA18;} +.neovgre_large {color: #6E001A; font-size: 24px; font-weight: bold; font-style: italic;} +.neovgre {color: #6E001A; font-weight: bold; font-style: italic;} +.neovgre_small {color: #6E001A;} + +.newscaster {color: #800000;} +.ghostalert {color: #5c00e6; font-style: italic; font-weight: bold;} + +.alien {color: #543354;} +.noticealien {color: #00c000;} +.alertalien {color: #00c000; font-weight: bold;} +.changeling {color: #800080; font-style: italic;} + +.spider {color: #4d004d;} + +.interface {color: #330033;} + +.sans {font-family: "Comic Sans MS", cursive, sans-serif;} +.papyrus {font-family: "Papyrus", cursive, sans-serif;} +.robot {font-family: "Courier New", cursive, sans-serif;} + +.command_headset {font-weight: bold; font-size: 24px;} +.small {font-size: 8px;} +.big {font-size: 24px;} +.reallybig {font-size: 32px;} +.extremelybig {font-size: 40px;} +.greentext {color: #00FF00; font-size: 24px;} +.redtext {color: #FF0000; font-size: 24px;} +.clown {color: #FF69Bf; font-size: 24px; font-family: "Comic Sans MS", cursive, sans-serif; font-weight: bold;} +.hypnophrase {color: #202020; font-weight: bold; animation: hypnocolor 1500ms infinite;} +@keyframes hypnocolor { + 0% { color: #202020; } + 25% { color: #4b02ac; } + 50% { color: #9f41f1; } + 75% { color: #541c9c; } + 100% { color: #7adbf3; } +} + +.phobia {color: #dd0000; font-weight: bold; animation: phobia 750ms infinite;} +@keyframes phobia { + 0% { color: #f75a5a; } + 50% { color: #dd0000; } + 100% { color: #f75a5a; } +} +.his_grace {color: #15D512; font-family: "Courier New", cursive, sans-serif; font-style: italic;} + +.icon {height: 1em; width: auto;} + +.memo {color: #638500; text-align: center;} +.memoedit {text-align: center; font-size: 16px;} +.abductor {color: #800080; font-style: italic;} +.mind_control {color: #A00D6F; font-size: 3; font-weight: bold; font-style: italic;} +.slime {color: #00CED1;} +.drone {color: #848482;} +.monkey {color: #975032;} +.swarmer {color: #2C75FF;} +.resonate {color: #298F85;} + +.monkeyhive {color: #774704;} +.monkeylead {color: #774704; font-size: 2;} + +.connectionClosed, .fatalError {background: red; color: white; padding: 5px;} +.connectionClosed.restored {background: green;} +.internal.boldnshit {color: blue; font-weight: bold;} + +/* HELPER CLASSES */ +.text-normal {font-weight: normal; font-style: normal;} +.hidden {display: none; visibility: hidden;} diff --git a/html/changelogs/AutoChangeLog-pr-8349.yml b/html/changelogs/AutoChangeLog-pr-8349.yml new file mode 100644 index 0000000000..de4c08624a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8349.yml @@ -0,0 +1,5 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "more bountys" + - rscdel: "Nitryl bounty" diff --git a/html/changelogs/AutoChangeLog-pr-8537.yml b/html/changelogs/AutoChangeLog-pr-8537.yml new file mode 100644 index 0000000000..a537ba1c3a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8537.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Fixes emags wasting charges on un-emaggable & co stuff." diff --git a/html/changelogs/AutoChangeLog-pr-8636.yml b/html/changelogs/AutoChangeLog-pr-8636.yml new file mode 100644 index 0000000000..3b291661b5 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8636.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - bugfix: "fixed airless place" diff --git a/html/changelogs/AutoChangeLog-pr-8649.yml b/html/changelogs/AutoChangeLog-pr-8649.yml new file mode 100644 index 0000000000..c8f61cc24e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8649.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - tweak: "The default amount of z-levels reserved specifically for space ruin generation has been increased from 1 to 2" diff --git a/html/changelogs/AutoChangeLog-pr-8763.yml b/html/changelogs/AutoChangeLog-pr-8763.yml new file mode 100644 index 0000000000..d99b529656 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8763.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - balance: "bone satchles" diff --git a/html/changelogs/AutoChangeLog-pr-8927.yml b/html/changelogs/AutoChangeLog-pr-8927.yml new file mode 100644 index 0000000000..3a87d7652e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8927.yml @@ -0,0 +1,5 @@ +author: "Ghommie" +delete-after: True +changes: + - balance: "toned down the stamina costs of some of the bulkier weapons." + - code_imp: "repathed hypereutactic blades to be a subtype of dual sabers. Way less copypasta." diff --git a/html/changelogs/AutoChangeLog-pr-8932.yml b/html/changelogs/AutoChangeLog-pr-8932.yml new file mode 100644 index 0000000000..d9038ef1a5 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8932.yml @@ -0,0 +1,7 @@ +author: "EmeraldSundisk" +delete-after: True +changes: + - rscadd: "Adds a gun range to Box Station" + - rscadd: "Provides some extra power grid connections" + - rscdel: "Sunglasses and Earmuffs removed from the Warden's Office - they can be found at the range instead" + - tweak: "Rearranges a few objects within the prison as to accommodate the new gun range" diff --git a/html/changelogs/AutoChangeLog-pr-8968.yml b/html/changelogs/AutoChangeLog-pr-8968.yml new file mode 100644 index 0000000000..0a0b0e84d0 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8968.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - bugfix: "oversight in benos" diff --git a/html/changelogs/AutoChangeLog-pr-8992.yml b/html/changelogs/AutoChangeLog-pr-8992.yml new file mode 100644 index 0000000000..299792fee3 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8992.yml @@ -0,0 +1,5 @@ +author: "Chayse" +delete-after: True +changes: + - rscadd: "Assorted space-worthy helmets can now act as masks for internals." + - refactor: "Internals code can now check any item with the ALLOWSINTERNALS flag through the GET_INTERNAL_SLOTS define. For now this only checks head and mask slots, since those are the most realistically speaking usable ones." diff --git a/html/changelogs/AutoChangeLog-pr-9010.yml b/html/changelogs/AutoChangeLog-pr-9010.yml new file mode 100644 index 0000000000..52aed38e2c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9010.yml @@ -0,0 +1,4 @@ +author: "BurgerBB" +delete-after: True +changes: + - balance: "Activating the nuclear device during war-ops informs the crew of the nuke's position." diff --git a/html/changelogs/AutoChangeLog-pr-9052.yml b/html/changelogs/AutoChangeLog-pr-9052.yml new file mode 100644 index 0000000000..a75b6c51ae --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9052.yml @@ -0,0 +1,4 @@ +author: "kevinz000" +delete-after: True +changes: + - balance: "Hierophant now goes sicko mode, but hey, at least you can't be multi-hit by melee waves!" diff --git a/html/changelogs/AutoChangeLog-pr-9054.yml b/html/changelogs/AutoChangeLog-pr-9054.yml new file mode 100644 index 0000000000..5952c9ecfd --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9054.yml @@ -0,0 +1,4 @@ +author: "Sishen1542" +delete-after: True +changes: + - balance: "hugboxing mining loot" diff --git a/html/changelogs/AutoChangeLog-pr-9057.yml b/html/changelogs/AutoChangeLog-pr-9057.yml new file mode 100644 index 0000000000..4df1b23ca7 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9057.yml @@ -0,0 +1,4 @@ +author: "EgoSumStultus" +delete-after: True +changes: + - rscadd: "Adds male AI vox." diff --git a/html/changelogs/AutoChangeLog-pr-9061.yml b/html/changelogs/AutoChangeLog-pr-9061.yml new file mode 100644 index 0000000000..4fc9d10ba5 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9061.yml @@ -0,0 +1,5 @@ +author: "deathride58" +delete-after: True +changes: + - tweak: "The femur breaker now uses `*scream` instead of forced speech. This means that the femur breaker will no longer spam deadchat with \"AAAAAAAAAHHHHHHHHHH!!\"" + - tweak: "The femur breaker will now guarantee that the victim falls into crit, which will make it harder to perform torture scenes with it since the victim can just succumb." diff --git a/html/changelogs/AutoChangeLog-pr-9062.yml b/html/changelogs/AutoChangeLog-pr-9062.yml new file mode 100644 index 0000000000..12102204c3 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9062.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - spellcheck: "less bad wording in slime" diff --git a/html/changelogs/AutoChangeLog-pr-9064.yml b/html/changelogs/AutoChangeLog-pr-9064.yml new file mode 100644 index 0000000000..6e775c1eb4 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9064.yml @@ -0,0 +1,4 @@ +author: "Cebutris" +delete-after: True +changes: + - rscadd: "Hugs of the North Star! Get them from the arcades (if you're lucky) and hug your friends at INCREDIBLE hihg speeds!" diff --git a/html/changelogs/AutoChangeLog-pr-9069.yml b/html/changelogs/AutoChangeLog-pr-9069.yml new file mode 100644 index 0000000000..0439515dd3 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9069.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Fixes clock cult Abscond scripture not dragging pulled mobs into Reebe. Also fixes blood cult tele runes teleporting you from the source turf to the source turf." diff --git a/html/changelogs/AutoChangeLog-pr-9070.yml b/html/changelogs/AutoChangeLog-pr-9070.yml new file mode 100644 index 0000000000..2013550dd2 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9070.yml @@ -0,0 +1,5 @@ +author: "Linzolle" +delete-after: True +changes: + - rscadd: "inhands sprite for rainbow knife" + - tweak: "colour of highlight on the regular knife when held in the right hand" diff --git a/html/changelogs/AutoChangeLog-pr-9071.yml b/html/changelogs/AutoChangeLog-pr-9071.yml new file mode 100644 index 0000000000..40ae43867f --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9071.yml @@ -0,0 +1,4 @@ +author: "Yakumo Chen" +delete-after: True +changes: + - balance: "Autocloning now requires tier 4 parts" diff --git a/html/changelogs/AutoChangeLog-pr-9077.yml b/html/changelogs/AutoChangeLog-pr-9077.yml new file mode 100644 index 0000000000..2f42e36dd6 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9077.yml @@ -0,0 +1,8 @@ +author: "original by actioninja, port by sishen1542" +delete-after: True +changes: + - tweak: "Medical and Security consoles now check access on worn or inhand ID instead of requiring an inserted ID" + - tweak: "mining vendor now reads from ID in hand or on person instead of requiring an inserted ID" + - bugfix: "ORM is functional again (for real this time)" + - tweak: "ORM claim points button transfers points to worn/inhand ID instead of to an inserted ID, no longer accepts insertions" + - tweak: "Same for gulag consoles" diff --git a/html/changelogs/AutoChangeLog-pr-9078.yml b/html/changelogs/AutoChangeLog-pr-9078.yml new file mode 100644 index 0000000000..2e202ec43a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9078.yml @@ -0,0 +1,7 @@ +author: "kappa-sama" +delete-after: True +changes: + - rscdel: "Removed racism" + - tweak: "Teleporter calibration actually matters to all roundstart players" + - balance: "Slows down teleportation with the console/hub/teleporter setup if you care for your species." + - balance: "Dedicated non-humans can now get hulk without having to become human." diff --git a/html/changelogs/AutoChangeLog-pr-9079.yml b/html/changelogs/AutoChangeLog-pr-9079.yml new file mode 100644 index 0000000000..42aa732e16 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9079.yml @@ -0,0 +1,4 @@ +author: "Sishen1542" +delete-after: True +changes: + - balance: "ling blade now has 40 armor pen" diff --git a/html/changelogs/AutoChangeLog-pr-9080.yml b/html/changelogs/AutoChangeLog-pr-9080.yml new file mode 100644 index 0000000000..1ae1e3e2aa --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9080.yml @@ -0,0 +1,4 @@ +author: "Fermis" +delete-after: True +changes: + - rscadd: "Adds 3 new music tracks." diff --git a/html/changelogs/AutoChangeLog-pr-9081.yml b/html/changelogs/AutoChangeLog-pr-9081.yml new file mode 100644 index 0000000000..c66148e446 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9081.yml @@ -0,0 +1,4 @@ +author: "BurgerBB" +delete-after: True +changes: + - balance: "Central Command informs you when a Meteor Storm is about to hit 5 to 10 minutes before it happens." diff --git a/html/changelogs/AutoChangeLog-pr-9083.yml b/html/changelogs/AutoChangeLog-pr-9083.yml new file mode 100644 index 0000000000..74b4d95ca3 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9083.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "strawbarries and such" diff --git a/html/changelogs/AutoChangeLog-pr-9084.yml b/html/changelogs/AutoChangeLog-pr-9084.yml new file mode 100644 index 0000000000..c2569d10b4 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9084.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "fixes clock cult mass recall." diff --git a/html/changelogs/AutoChangeLog-pr-9085.yml b/html/changelogs/AutoChangeLog-pr-9085.yml new file mode 100644 index 0000000000..92f5dc4cf8 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9085.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Fixes underwear colors a bit." diff --git a/html/changelogs/AutoChangeLog-pr-9086.yml b/html/changelogs/AutoChangeLog-pr-9086.yml new file mode 100644 index 0000000000..4dea682d47 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9086.yml @@ -0,0 +1,4 @@ +author: "original by TheChosenEvilOne, port by sishen1542" +delete-after: True +changes: + - rscadd: "Ported dynamic mode from /vg/, originally made by @DeityLink, @Kurfursten and @ShiftyRail" diff --git a/html/changelogs/AutoChangeLog-pr-9089.yml b/html/changelogs/AutoChangeLog-pr-9089.yml new file mode 100644 index 0000000000..dc1e351f25 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9089.yml @@ -0,0 +1,6 @@ +author: "original by Tlaltecuhtli, port by sishen1542" +delete-after: True +changes: + - rscadd: "rcd disk that gives rcd computer frame and machine frame designs" + - rscadd: "upgraded rcd in CE lockers" + - tweak: "moved deconstruction to the upgrade disk, ashwalker rcd comes upgraded" diff --git a/html/changelogs/AutoChangeLog-pr-9097.yml b/html/changelogs/AutoChangeLog-pr-9097.yml new file mode 100644 index 0000000000..941c0e7b98 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9097.yml @@ -0,0 +1,4 @@ +author: "lolman360" +delete-after: True +changes: + - rscadd: "NT has authorized shipments or Cotton to Megaseed Servitors. It's time to start picking, liggers." diff --git a/html/changelogs/AutoChangeLog-pr-9098.yml b/html/changelogs/AutoChangeLog-pr-9098.yml new file mode 100644 index 0000000000..6e11eaeb90 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9098.yml @@ -0,0 +1,4 @@ +author: "Cebutris" +delete-after: True +changes: + - bugfix: "Tea Aspera now properly contains tea powder" diff --git a/html/changelogs/AutoChangeLog-pr-9100.yml b/html/changelogs/AutoChangeLog-pr-9100.yml new file mode 100644 index 0000000000..81141b3b0c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9100.yml @@ -0,0 +1,4 @@ +author: "Cebutris" +delete-after: True +changes: + - tweak: "Breasts no longer lactate by default, lactation is now a preference" diff --git a/html/changelogs/AutoChangeLog-pr-9101.yml b/html/changelogs/AutoChangeLog-pr-9101.yml new file mode 100644 index 0000000000..174619dd49 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9101.yml @@ -0,0 +1,4 @@ +author: "Sishen1542, original by XDTM" +delete-after: True +changes: + - rscadd: "Surgery steps are now shown in detail only to the surgeon and anyone standing adjacent to them; the patient and people watching from further away get a more vague/ambiguous description." diff --git a/html/changelogs/AutoChangeLog-pr-9107.yml b/html/changelogs/AutoChangeLog-pr-9107.yml new file mode 100644 index 0000000000..65a14b9576 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9107.yml @@ -0,0 +1,4 @@ +author: "Bhijn" +delete-after: True +changes: + - bugfix: "You can now actually use the resist hotkey to resist out of handcuffs. Woah, revolutionary" diff --git a/html/changelogs/AutoChangeLog-pr-9113.yml b/html/changelogs/AutoChangeLog-pr-9113.yml new file mode 100644 index 0000000000..1bdae7cab9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9113.yml @@ -0,0 +1,5 @@ +author: "Fermis" +delete-after: True +changes: + - bugfix: "fixes fermichem reactions for tiny volumes work" + - tweak: "makes quantisation level for chemistry finer" diff --git a/html/changelogs/AutoChangeLog-pr-9115.yml b/html/changelogs/AutoChangeLog-pr-9115.yml new file mode 100644 index 0000000000..32c3109c43 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9115.yml @@ -0,0 +1,4 @@ +author: "Thalpy" +delete-after: True +changes: + - bugfix: "fixes message_admins in SDZF" diff --git a/html/changelogs/AutoChangeLog-pr-9119.yml b/html/changelogs/AutoChangeLog-pr-9119.yml new file mode 100644 index 0000000000..756c3edcb2 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9119.yml @@ -0,0 +1,4 @@ +author: "Linzolle" +delete-after: True +changes: + - rscadd: "mining shuttle console can now be printed after computer consoles have been researched" diff --git a/html/changelogs/AutoChangeLog-pr-9126.yml b/html/changelogs/AutoChangeLog-pr-9126.yml new file mode 100644 index 0000000000..c3e54a8f2d --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9126.yml @@ -0,0 +1,4 @@ +author: "original by Skoglol, port by sishen1542" +delete-after: True +changes: + - balance: "Added lots of new virus cures, made cure difficulty scale more consistently. Cures are now picked from a list of possible cures per resistance level, multiple diseases at the same level no longer always share a cure. Looking at you table salt." diff --git a/html/changelogs/AutoChangeLog-pr-9130.yml b/html/changelogs/AutoChangeLog-pr-9130.yml new file mode 100644 index 0000000000..f10e72a6ce --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9130.yml @@ -0,0 +1,9 @@ +author: "Owai-Seek" +delete-after: True +changes: + - rscadd: "custodial cruiser cargo crate" + - tweak: "removed light replacer from power designs and moved to misc designs" + - tweak: "added pimpin ride to custodial locator" + - tweak: "added additional items to janibelt whitelist" + - tweak: "made plant DNA manipulator unwrenchable" + - balance: "reduced janitor premium supply costs" diff --git a/html/changelogs/AutoChangeLog-pr-9132.yml b/html/changelogs/AutoChangeLog-pr-9132.yml new file mode 100644 index 0000000000..f9dee17687 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9132.yml @@ -0,0 +1,4 @@ +author: "Toriate" +delete-after: True +changes: + - imageadd: "Updated the sprites of all the regular crates" diff --git a/html/changelogs/AutoChangeLog-pr-9133.yml b/html/changelogs/AutoChangeLog-pr-9133.yml new file mode 100644 index 0000000000..50bfced879 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9133.yml @@ -0,0 +1,4 @@ +author: "Raptorizer" +delete-after: True +changes: + - tweak: "Doubled peach spawn rate" diff --git a/html/changelogs/AutoChangeLog-pr-9134.yml b/html/changelogs/AutoChangeLog-pr-9134.yml new file mode 100644 index 0000000000..f0be3bdd0a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9134.yml @@ -0,0 +1,4 @@ +author: "Arturlang" +delete-after: True +changes: + - tweak: "Advanced toxin filtration nanites now heal slimes" diff --git a/html/changelogs/AutoChangeLog-pr-9136.yml b/html/changelogs/AutoChangeLog-pr-9136.yml new file mode 100644 index 0000000000..7bb9e3ccf2 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9136.yml @@ -0,0 +1,4 @@ +author: "Sishen1542" +delete-after: True +changes: + - balance: "rebalances strained muscles" diff --git a/html/changelogs/AutoChangeLog-pr-9137.yml b/html/changelogs/AutoChangeLog-pr-9137.yml new file mode 100644 index 0000000000..a61a3dbe6f --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9137.yml @@ -0,0 +1,5 @@ +author: "Sishen1542" +delete-after: True +changes: + - rscadd: "added in the assistant response team" + - bugfix: "fixed up access on the centcom hangar button" diff --git a/html/changelogs/AutoChangeLog-pr-9138.yml b/html/changelogs/AutoChangeLog-pr-9138.yml new file mode 100644 index 0000000000..b78d505c5a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9138.yml @@ -0,0 +1,4 @@ +author: "kappa-sama" +delete-after: True +changes: + - bugfix: "seed" diff --git a/html/changelogs/AutoChangeLog-pr-9141.yml b/html/changelogs/AutoChangeLog-pr-9141.yml new file mode 100644 index 0000000000..86230537de --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9141.yml @@ -0,0 +1,4 @@ +author: "deathride58" +delete-after: True +changes: + - bugfix: "Fixed another runtime in warp whistles." diff --git a/html/changelogs/AutoChangeLog-pr-9142.yml b/html/changelogs/AutoChangeLog-pr-9142.yml new file mode 100644 index 0000000000..75fbfe4155 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9142.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - tweak: "glue uplinks" diff --git a/html/changelogs/AutoChangeLog-pr-9145.yml b/html/changelogs/AutoChangeLog-pr-9145.yml new file mode 100644 index 0000000000..27e5712dd0 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9145.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "RPDs to drones" diff --git a/html/changelogs/AutoChangeLog-pr-9147.yml b/html/changelogs/AutoChangeLog-pr-9147.yml new file mode 100644 index 0000000000..7f1dcb7e7e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9147.yml @@ -0,0 +1,5 @@ +author: "Code-Cygnet" +delete-after: True +changes: + - rscadd: "Added new things - Mind trait, alcohol reagent, chemical reagent, drink sprite and recipe." + - imageadd: "added commander_and_chief sprite to drinks.dmi" diff --git a/html/changelogs/AutoChangeLog-pr-9149.yml b/html/changelogs/AutoChangeLog-pr-9149.yml new file mode 100644 index 0000000000..8a10035d1f --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9149.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "Armor and such" diff --git a/html/changelogs/AutoChangeLog-pr-9150.yml b/html/changelogs/AutoChangeLog-pr-9150.yml new file mode 100644 index 0000000000..585ea0a149 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9150.yml @@ -0,0 +1,5 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "flavor" + - bugfix: "maybe a runtime" diff --git a/html/changelogs/AutoChangeLog-pr-9151.yml b/html/changelogs/AutoChangeLog-pr-9151.yml new file mode 100644 index 0000000000..ed01c0d137 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9151.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "chameloen clothing" diff --git a/html/changelogs/AutoChangeLog-pr-9155.yml b/html/changelogs/AutoChangeLog-pr-9155.yml new file mode 100644 index 0000000000..ad16ff6276 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9155.yml @@ -0,0 +1,4 @@ +author: "Poojawa" +delete-after: True +changes: + - server: "Poly's speech now echos to the chat bot." diff --git a/html/changelogs/AutoChangeLog-pr-9162.yml b/html/changelogs/AutoChangeLog-pr-9162.yml new file mode 100644 index 0000000000..a415ce8bbc --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9162.yml @@ -0,0 +1,5 @@ +author: "Sishen1542" +delete-after: True +changes: + - balance: "storage tweaks for belt briefcase" + - imageadd: "codersprite for belt briefcase" diff --git a/html/changelogs/AutoChangeLog-pr-9164.yml b/html/changelogs/AutoChangeLog-pr-9164.yml new file mode 100644 index 0000000000..08d7ccec18 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9164.yml @@ -0,0 +1,4 @@ +author: "lolman360" +delete-after: True +changes: + - imageadd: "missing durathread sprites" diff --git a/html/changelogs/AutoChangeLog-pr-9168.yml b/html/changelogs/AutoChangeLog-pr-9168.yml new file mode 100644 index 0000000000..2375f6a28a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9168.yml @@ -0,0 +1,4 @@ +author: "Seris02" +delete-after: True +changes: + - rscadd: "Added looc hotkey" diff --git a/html/changelogs/AutoChangeLog-pr-9169.yml b/html/changelogs/AutoChangeLog-pr-9169.yml new file mode 100644 index 0000000000..2a9d3ae34b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9169.yml @@ -0,0 +1,8 @@ +author: "EmeraldSundisk" +delete-after: True +changes: + - rscadd: "Adds a mass driver to Delta Station's chapel" + - rscadd: "Adds a second means of entry into the chapel" + - tweak: "Slightly expands the chapel to make room for the driver, slight adjustment to air systems" + - tweak: "Clears a path in the station exterior for the mass driver to work properly" + - tweak: "Nearby maintenance loot has been relocated to accommodate the chapel expansion, surrounding area has been \"cleaned up\" somewhat" diff --git a/html/changelogs/AutoChangeLog-pr-9172.yml b/html/changelogs/AutoChangeLog-pr-9172.yml new file mode 100644 index 0000000000..751cfa6d26 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9172.yml @@ -0,0 +1,4 @@ +author: "kevinz000" +delete-after: True +changes: + - rscadd: "Racking shotguns is now more threatening." diff --git a/html/changelogs/AutoChangeLog-pr-9175.yml b/html/changelogs/AutoChangeLog-pr-9175.yml new file mode 100644 index 0000000000..d3aa92d42d --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9175.yml @@ -0,0 +1,5 @@ +author: "lolman360" +delete-after: True +changes: + - rscadd: "Added durathread jumpskirt" + - imageadd: "Duraskirt sprites and rolled down jumpsuit sprites." diff --git a/html/changelogs/AutoChangeLog-pr-9177.yml b/html/changelogs/AutoChangeLog-pr-9177.yml new file mode 100644 index 0000000000..4b8a06c8af --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9177.yml @@ -0,0 +1,5 @@ +author: "JTGSZ" +delete-after: True +changes: + - tweak: "Added one more gang boss slot bringing total to 4 from 3" + - bugfix: "Fixed Gang Boss being able to be deconverted" diff --git a/html/changelogs/AutoChangeLog-pr-9178.yml b/html/changelogs/AutoChangeLog-pr-9178.yml new file mode 100644 index 0000000000..2a6de13f5e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9178.yml @@ -0,0 +1,4 @@ +author: "Bhijn" +delete-after: True +changes: + - bugfix: "the `!tgs poly` command now actually works" diff --git a/html/changelogs/AutoChangeLog-pr-9180.yml b/html/changelogs/AutoChangeLog-pr-9180.yml new file mode 100644 index 0000000000..e184ad3205 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9180.yml @@ -0,0 +1,4 @@ +author: "Bhijn" +delete-after: True +changes: + - rscadd: "Poly now has a 0.01% chance per squawk to speak through the TGS relay." diff --git a/html/changelogs/AutoChangeLog-pr-9183.yml b/html/changelogs/AutoChangeLog-pr-9183.yml new file mode 100644 index 0000000000..dc5b5a8bdb --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9183.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Fixes Blood Cult conversion prompts" diff --git a/html/changelogs/AutoChangeLog-pr-9184.yml b/html/changelogs/AutoChangeLog-pr-9184.yml new file mode 100644 index 0000000000..d0b4d1fa7e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9184.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - rscdel: "Removes an obnoxious temporary overlay var." diff --git a/html/changelogs/AutoChangeLog-pr-9186.yml b/html/changelogs/AutoChangeLog-pr-9186.yml new file mode 100644 index 0000000000..f0497ee7c2 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9186.yml @@ -0,0 +1,5 @@ +author: "Sishen1542" +delete-after: True +changes: + - rscadd: "added pharaoh gear to chaplain vendor" + - spellcheck: "fixed typos in pharaoh items" diff --git a/html/changelogs/AutoChangeLog-pr-9194.yml b/html/changelogs/AutoChangeLog-pr-9194.yml new file mode 100644 index 0000000000..24299209ea --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9194.yml @@ -0,0 +1,4 @@ +author: "kappa-sama" +delete-after: True +changes: + - tweak: "added obj/item/key to wallet whitelist" diff --git a/html/changelogs/AutoChangeLog-pr-9199.yml b/html/changelogs/AutoChangeLog-pr-9199.yml new file mode 100644 index 0000000000..bf0219c7d9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9199.yml @@ -0,0 +1,7 @@ +author: "Tupinambis" +delete-after: True +changes: + - balance: "added a small fire delay (3 ticks) to automatic shotguns" + - balance: "Reduced buckshot brute damage by 20%. (12.5 -> 10 brute per pellet) (75 -> 60 brute at close range)" + - balance: "Reduced rubbershot stamina damage by 40% (25 -> 15 stamina per pellet) (150 -> 90 stamina at close range)" + - balance: "Reduced beanbag stamina damage by 12.5% (80 -> 70 stamina per shot)" diff --git a/html/changelogs/AutoChangeLog-pr-9200.yml b/html/changelogs/AutoChangeLog-pr-9200.yml new file mode 100644 index 0000000000..d1be09ee4a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9200.yml @@ -0,0 +1,4 @@ +author: "Owai-Seek" +delete-after: True +changes: + - bugfix: "fixed them strawberries" diff --git a/html/changelogs/AutoChangeLog-pr-9204.yml b/html/changelogs/AutoChangeLog-pr-9204.yml new file mode 100644 index 0000000000..3b70354fd9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9204.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - bugfix: "/cursed from a item path" diff --git a/html/changelogs/AutoChangeLog-pr-9208.yml b/html/changelogs/AutoChangeLog-pr-9208.yml new file mode 100644 index 0000000000..1645164266 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9208.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "colorable socks can be colored again." diff --git a/html/changelogs/AutoChangeLog-pr-9209.yml b/html/changelogs/AutoChangeLog-pr-9209.yml new file mode 100644 index 0000000000..5ed81d6856 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9209.yml @@ -0,0 +1,4 @@ +author: "original by redmoogle, port by sishen1542" +delete-after: True +changes: + - rscadd: "Added support for 3 new gasses; Tritium, Pluoxium, and BZ" diff --git a/html/changelogs/AutoChangeLog-pr-9210.yml b/html/changelogs/AutoChangeLog-pr-9210.yml new file mode 100644 index 0000000000..b02811e7a8 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9210.yml @@ -0,0 +1,7 @@ +author: "EmeraldSundisk" +delete-after: True +changes: + - tweak: "CentCom has noticed the lack of coffins in Delta Station's chapel and provided some, but in exchange for reducing the chapel morgue's capacity." + - tweak: "Fixed a maintenance door the chaplain should have been able to open." + - bugfix: "Fixes space areas outside the driver +removal: CentCom Defense Analysts have ordered the maintenance hatch to the Mass Driver room be removed citing \"security concerns\"." diff --git a/html/changelogs/AutoChangeLog-pr-9212.yml b/html/changelogs/AutoChangeLog-pr-9212.yml new file mode 100644 index 0000000000..48e8b8b4d3 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9212.yml @@ -0,0 +1,5 @@ +author: "dapnee" +delete-after: True +changes: + - rscadd: "Plasmaglass tables, spears, tiny plasmaglass shards" + - bugfix: "Plasmaglass structures now drop plasmaglass shards instead of nothing" diff --git a/html/changelogs/AutoChangeLog-pr-9216.yml b/html/changelogs/AutoChangeLog-pr-9216.yml new file mode 100644 index 0000000000..0be9314dbc --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9216.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - bugfix: "oops not being blacklisted" diff --git a/html/changelogs/AutoChangeLog-pr-9219.yml b/html/changelogs/AutoChangeLog-pr-9219.yml new file mode 100644 index 0000000000..138991e507 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9219.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - bugfix: "ports a fix" diff --git a/html/changelogs/AutoChangeLog-pr-9221.yml b/html/changelogs/AutoChangeLog-pr-9221.yml new file mode 100644 index 0000000000..0256c4a7c9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9221.yml @@ -0,0 +1,9 @@ +author: "Sishen1542" +delete-after: True +changes: + - rscadd: "holy lasrifle, hypertool, divine lightblade, and blessed baseball bat. Four new holy weapons!" + - balance: "stamina and force tweaks for most holy weapons." + - tweak: "prayer beads no longer deconvert after a 10 second timer, now just inject holy water for delayed effect" + - tweak: "cultist runes are now destroyed with a bible or a null rod" + - tweak: "bo-staff now functions as a nerfed sleepy carp staff" + - bugfix: "fixed kevinz code to add in non-null rod child items as holy weapons" diff --git a/html/changelogs/AutoChangeLog-pr-9227.yml b/html/changelogs/AutoChangeLog-pr-9227.yml new file mode 100644 index 0000000000..9f6bfabdc4 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9227.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - bugfix: "Missing sprites with bad ones" diff --git a/html/changelogs/AutoChangeLog-pr-9229.yml b/html/changelogs/AutoChangeLog-pr-9229.yml new file mode 100644 index 0000000000..5c617f6ab0 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9229.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - tweak: "emag charge amount" diff --git a/html/changelogs/AutoChangeLog-pr-9235.yml b/html/changelogs/AutoChangeLog-pr-9235.yml new file mode 100644 index 0000000000..112f34a7f0 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9235.yml @@ -0,0 +1,5 @@ +author: "Yakumo Chen" +delete-after: True +changes: + - rscdel: "Removes autoscan" + - balance: "Scanning people now requires someone to operate the cloning computer regardless of part level." diff --git a/html/changelogs/AutoChangeLog-pr-9238.yml b/html/changelogs/AutoChangeLog-pr-9238.yml new file mode 100644 index 0000000000..b2eb8db233 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9238.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "Surgerys and spays in bags" diff --git a/html/changelogs/AutoChangeLog-pr-9239.yml b/html/changelogs/AutoChangeLog-pr-9239.yml new file mode 100644 index 0000000000..781dcd82b6 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9239.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - tweak: "earthbloods stam regen" diff --git a/html/changelogs/AutoChangeLog-pr-9241.yml b/html/changelogs/AutoChangeLog-pr-9241.yml new file mode 100644 index 0000000000..1cb08cd8d0 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9241.yml @@ -0,0 +1,6 @@ +author: "Alonefromhell" +delete-after: True +changes: + - rscadd: "Ported Oracle UI, a framework for self-updating and neat UI's" + - refactor: "Paper now uses OUI" + - refactor: "Bins now use OUI" diff --git a/html/changelogs/AutoChangeLog-pr-9242.yml b/html/changelogs/AutoChangeLog-pr-9242.yml new file mode 100644 index 0000000000..1e47385e67 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9242.yml @@ -0,0 +1,4 @@ +author: "kappa-sama" +delete-after: True +changes: + - tweak: "blood cult ritual daggers fit in jack/combat boots" diff --git a/html/changelogs/AutoChangeLog-pr-9247.yml b/html/changelogs/AutoChangeLog-pr-9247.yml new file mode 100644 index 0000000000..4f6e0b0875 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9247.yml @@ -0,0 +1,4 @@ +author: "Fermi" +delete-after: True +changes: + - bugfix: "Fixes tiny runaway decimals in reagents system." diff --git a/html/changelogs/AutoChangeLog-pr-9248.yml b/html/changelogs/AutoChangeLog-pr-9248.yml new file mode 100644 index 0000000000..3e6eff727c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9248.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - imageadd: "Red to Blue/Black crosses as questioned by Bhijn" diff --git a/html/changelogs/AutoChangeLog-pr-9249.yml b/html/changelogs/AutoChangeLog-pr-9249.yml new file mode 100644 index 0000000000..b2ef0c2d46 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9249.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - bugfix: "clean bot not cleaning basic cleanables" diff --git a/html/changelogs/AutoChangeLog-pr-9251.yml b/html/changelogs/AutoChangeLog-pr-9251.yml new file mode 100644 index 0000000000..c40c2e05fc --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9251.yml @@ -0,0 +1,5 @@ +author: "Linzolle" +delete-after: True +changes: + - tweak: "all chaplain suits can hold the same items in suit storage" + - code_imp: "improvement to organisation for chaplain suits" diff --git a/html/changelogs/AutoChangeLog-pr-9256.yml b/html/changelogs/AutoChangeLog-pr-9256.yml new file mode 100644 index 0000000000..dcf039a2a0 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9256.yml @@ -0,0 +1,4 @@ +author: "Fermi" +delete-after: True +changes: + - bugfix: "SDGF: Fixes infinite clones." diff --git a/html/changelogs/AutoChangeLog-pr-9260.yml b/html/changelogs/AutoChangeLog-pr-9260.yml new file mode 100644 index 0000000000..f94d9772f9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9260.yml @@ -0,0 +1,4 @@ +author: "dapnee" +delete-after: True +changes: + - rscadd: "Trim lines!" diff --git a/html/changelogs/AutoChangeLog-pr-9275.yml b/html/changelogs/AutoChangeLog-pr-9275.yml new file mode 100644 index 0000000000..cd74273366 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9275.yml @@ -0,0 +1,5 @@ +author: "Fermis" +delete-after: True +changes: + - bugfix: "Fixes analyse function on ChemMasters to correctly display purity." + - bugfix: "Fixes the custom transfer for buffer to beaker button." diff --git a/html/changelogs/AutoChangeLog-pr-9276.yml b/html/changelogs/AutoChangeLog-pr-9276.yml new file mode 100644 index 0000000000..f778c26c13 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9276.yml @@ -0,0 +1,6 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "trash" + - imageadd: "eye bleed +:add: misstakes" diff --git a/html/changelogs/AutoChangeLog-pr-9278.yml b/html/changelogs/AutoChangeLog-pr-9278.yml new file mode 100644 index 0000000000..3ec1eb839a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9278.yml @@ -0,0 +1,4 @@ +author: "deathride58" +delete-after: True +changes: + - bugfix: "Spamming forged packets no longer crashes the server." diff --git a/html/changelogs/AutoChangeLog-pr-9279.yml b/html/changelogs/AutoChangeLog-pr-9279.yml new file mode 100644 index 0000000000..572f40e643 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9279.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Fixed undergarments color preferences resetting each round." diff --git a/html/oracle_ui/content/disposal_bin/index.html b/html/oracle_ui/content/disposal_bin/index.html new file mode 100644 index 0000000000..8f7713b53c --- /dev/null +++ b/html/oracle_ui/content/disposal_bin/index.html @@ -0,0 +1,27 @@ +
+
+ State: +
@{full_pressure}
+
+
+ Pressure: +
+
+
+
@{per}
+
+
+
+
+ Handle: +
@{flush}
+
+
+ Eject: +
@{contents}
+
+
+ Compressor: +
@{pressure_charging}
+
+
\ No newline at end of file diff --git a/html/oracle_ui/editor_tool.html b/html/oracle_ui/editor_tool.html new file mode 100644 index 0000000000..e0ce75bb29 --- /dev/null +++ b/html/oracle_ui/editor_tool.html @@ -0,0 +1,103 @@ + + + + + + OracleUI IDE + + + +
+

Content Template:

+ +
+
+

Data:

+ +
+
+

Output:

+ +
+ + + diff --git a/html/oracle_ui/themes/nano/index.html b/html/oracle_ui/themes/nano/index.html new file mode 100644 index 0000000000..388f6e4ce4 --- /dev/null +++ b/html/oracle_ui/themes/nano/index.html @@ -0,0 +1,19 @@ + + + + + + @{title} + + + + + +
+
@{title}
+
+ @{body} +
+
+ + diff --git a/html/oracle_ui/themes/nano/sui-nano-common.css b/html/oracle_ui/themes/nano/sui-nano-common.css new file mode 100644 index 0000000000..481b81c3e3 --- /dev/null +++ b/html/oracle_ui/themes/nano/sui-nano-common.css @@ -0,0 +1,353 @@ +body +{ + padding: 0; + margin: 0; + background-color: #272727; + font-size: 12px; + color: #ffffff; + line-height: 170%; + cursor: default; + -moz-user-select: none; + -ms-user-select: none; +} + +hr +{ + background-color: #40628a; + height: 1px; +} + +a, a:link, a:visited, a:active, .linkOn, .linkOff +{ + color: #ffffff; + text-decoration: none; + background: #40628a; + border: 1px solid #161616; + padding: 1px 4px 1px 4px; + margin: 0 2px 0 0; + cursor:default; +} + +a:hover +{ + color: #40628a; + background: #ffffff; +} + +a.white, a.white:link, a.white:visited, a.white:active +{ + color: #40628a; + text-decoration: none; + background: #ffffff; + border: 1px solid #161616; + padding: 1px 4px 1px 4px; + margin: 0 2px 0 0; + cursor:default; +} + +a.white:hover +{ + color: #ffffff; + background: #40628a; +} + +.active, a.active:link, a.active:visited, a.active:active, a.active:hover +{ + color: #ffffff; + background: #2f943c; + border-color: #24722e; +} + +.disabled, a.disabled:link, a.disabled:visited, a.disabled:active, a.disabled:hover +{ + color: #ffffff; + background: #999999; + border-color: #666666; +} + +a.icon, .linkOn.icon, .linkOff.icon +{ + position: relative; + padding: 1px 4px 2px 20px; +} + +a.icon img, .linkOn.icon img +{ + position: absolute; + top: 0; + left: 0; + width: 18px; + height: 18px; +} + +ul +{ + padding: 4px 0 0 10px; + margin: 0; + list-style-type: none; +} + +li +{ + padding: 0 0 2px 0; +} + +img, a img +{ + border-style:none; +} + +h1, h2, h3, h4, h5, h6 +{ + margin: 0; + padding: 16px 0 8px 0; + color: #517087; +} + +h1 +{ + font-size: 15px; +} + +h2 +{ + font-size: 14px; +} + +h3 +{ + font-size: 13px; +} + +h4 +{ + font-size: 12px; +} + +.uiWrapper +{ + + width: 100%; + height: 100%; +} + +.uiTitle +{ + clear: both; + padding: 6px 8px 6px 8px; + border-bottom: 2px solid #161616; + background: #383838; + color: #98B0C3; + font-size: 16px; +} + +.uiTitle.icon +{ + padding: 6px 8px 6px 42px; + background-position: 2px 50%; + background-repeat: no-repeat; +} + +.uiContent +{ + clear: both; + padding: 8px; + font-family: Verdana, Geneva, sans-serif; +} + +.good +{ + color: #00ff00; +} + +.average +{ + color: #d09000; +} + +.bad +{ + color: #ff0000; +} + +.highlight +{ + color: #8BA5C4; +} + +.dark +{ + color: #272727; +} + +.notice +{ + position: relative; + background: #E9C183; + color: #15345A; + font-size: 10px; + font-style: italic; + padding: 2px 4px 0 4px; + margin: 4px; +} + +.notice.icon +{ + padding: 2px 4px 0 20px; +} + +.notice img +{ + position: absolute; + top: 0; + left: 0; + width: 16px; + height: 16px; +} + +div.notice +{ + clear: both; +} + +.statusDisplay +{ + background: #000000; + color: #ffffff; + border: 1px solid #40628a; + padding: 4px; + margin: 3px 0; +} + +.statusLabel +{ + width: 138px; + float: left; + overflow: hidden; + color: #98B0C3; +} + +.statusValue +{ + float: left; +} + +.block +{ + padding: 8px; + margin: 10px 4px 4px 4px; + border: 1px solid #40628a; + background-color: #202020; +} + +.block h3 +{ + padding: 0; +} + +.progressBar +{ + position: relative; + width: 185px; + height: 14px; + border: 1px solid #666666; + float: left; + overflow: hidden; + padding: 1px; +} + +.progressLabel +{ + top: -2px; + height: 100%; + position: absolute; + right: 4px; + text-align: right; +} + +.progressFill +{ + width: 100%; + height: 100%; + background: #40628a; + overflow: hidden; + transition: width 2.2s linear; +} + +.progressFill.good +{ + color: #ffffff; + background: #00ff00; +} + +.progressFill.average +{ + color: #ffffff; + background: #d09000; +} + +.progressFill.bad +{ + color: #ffffff; + background: #ff0000; +} + +.progressFill.highlight +{ + color: #ffffff; + background: #8BA5C4; +} + +.clearBoth +{ + clear: both; +} + +.clearLeft +{ + clear: left; +} + +.clearRight +{ + clear: right; +} + +.line +{ + width: 100%; + clear: both; +} + +section .label, section .content +{ + display: table-cell; + margin: 0; + text-align: left; + vertical-align: middle; + padding: 3px 2px +} + +section .label +{ + width: 1%; + padding-right: 32px; + white-space: nowrap; + color: #8ba5c4; +} + +section +{ + display: table-row; + width: 100% +} + +.display { + width: calc(100% - 8px); + padding: 4px; + background-color: #000; + background-color: rgba(0, 0, 0, .33); + box-shadow: inset 0 0 5px rgba(0, 0, 0, .5); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr=#54000000,endColorStr=#54000000)"; + filter: progid: DXImageTransform.Microsoft.gradient(startColorStr=#54000000, endColorStr=#54000000); +} \ No newline at end of file diff --git a/html/oracle_ui/themes/nano/sui-nano-common.js b/html/oracle_ui/themes/nano/sui-nano-common.js new file mode 100644 index 0000000000..716891a53f --- /dev/null +++ b/html/oracle_ui/themes/nano/sui-nano-common.js @@ -0,0 +1,47 @@ +function replaceContent(body) { + var maincontent = document.getElementById('maincontent'); + if(maincontent) { + maincontent.innerHTML = body; + } +} + +function updateProgressLabels() { + var progressBars = document.getElementsByClassName("progressBar"); + for(var i = 0; i < progressBars.length; i++) { + var progressBar = progressBars[i]; + if(!progressBar) + continue; + var progressFill = progressBar.getElementsByClassName("progressFill")[0]; + if(!progressFill) + continue; + var width = parseInt(getComputedStyle(progressFill).width); + var maxWidth = parseInt(getComputedStyle(progressBar).width); + var progressLabel = progressBar.getElementsByClassName("progressLabel")[0]; + if(progressLabel) + progressLabel.innerHTML = Math.round((width / maxWidth) * 100) + '%'; + } +} + +if(getComputedStyle) { setInterval(updateProgressLabels, 50); } //Fallback + +function updateFields(json) { + var fields = JSON.parse(json); + for (var key in fields) { + let value = fields[key]; + var element = document.getElementById(key); + if(element == null) { + continue; + } else if(element.classList.contains('progressBar')) { + var progressFill = element.getElementsByClassName("progressFill")[0]; + if(progressFill) + progressFill.style["width"] = value; + if(!getComputedStyle) { //Fallback + var progressLabel = element.getElementsByClassName("progressLabel")[0]; + if(progressLabel) + progressLabel.innerHTML = value; + } + } else { + element.innerHTML = value; + } + } +} \ No newline at end of file diff --git a/html/oracle_ui/themes/nano/sui-nano-jquery.min.js b/html/oracle_ui/themes/nano/sui-nano-jquery.min.js new file mode 100644 index 0000000000..645c5adc18 --- /dev/null +++ b/html/oracle_ui/themes/nano/sui-nano-jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; + if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("