diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm index 1d57752822..3e569c22f6 100644 --- a/_maps/map_files/BoxStation/BoxStation.dmm +++ b/_maps/map_files/BoxStation/BoxStation.dmm @@ -260,6 +260,11 @@ /obj/structure/chair/stool, /turf/open/floor/plasteel, /area/security/prison) +"aaK" = ( +/obj/structure/table/wood, +/mob/living/simple_animal/pet/fox/Renault, +/turf/open/floor/carpet, +/area/crew_quarters/heads/captain) "aaN" = ( /obj/structure/chair/sofa/right, /turf/open/floor/plasteel, @@ -21528,10 +21533,6 @@ /obj/structure/table, /turf/open/floor/wood, /area/bridge/meeting_room) -"bbZ" = ( -/obj/structure/table/wood, -/turf/open/floor/carpet, -/area/crew_quarters/heads/captain) "bca" = ( /turf/open/floor/carpet, /area/bridge/meeting_room) @@ -90412,7 +90413,7 @@ aYo aZV bao baP -bbZ +aaK bcP cBo bgS diff --git a/_maps/map_files/KiloStation/KiloStation.dmm b/_maps/map_files/KiloStation/KiloStation.dmm index a04260249a..73386e6e1e 100644 --- a/_maps/map_files/KiloStation/KiloStation.dmm +++ b/_maps/map_files/KiloStation/KiloStation.dmm @@ -2284,7 +2284,6 @@ /area/maintenance/port/aft) "aea" = ( /obj/structure/bed, -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/cobweb, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/blood/old, @@ -2646,7 +2645,6 @@ /turf/open/floor/plasteel/dark, /area/security/courtroom) "aeN" = ( -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/cobweb, /obj/structure/closet/firecloset, @@ -2859,7 +2857,6 @@ /obj/structure/closet/secure_closet/injection{ name = "Justice Injections" }, -/obj/effect/turf_decal/bot, /obj/machinery/atmospherics/components/unary/vent_pump/on, /obj/machinery/button/door{ id = "SecJusticeChamber"; @@ -3423,7 +3420,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, -/obj/effect/turf_decal/bot, /turf/open/floor/plasteel/dark, /area/security/warden) "afS" = ( @@ -3431,7 +3427,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plasteel/dark, /area/security/warden) @@ -3839,7 +3834,6 @@ /turf/open/floor/plasteel/dark, /area/science/xenobiology) "agw" = ( -/obj/effect/turf_decal/bot, /obj/structure/closet/emcloset, /obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plating, @@ -3895,7 +3889,6 @@ }, /area/maintenance/starboard/fore) "agC" = ( -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/structure/closet, /obj/item/cardboard_cutout{ @@ -4204,7 +4197,6 @@ /area/security/execution/education) "ahe" = ( /obj/effect/landmark/secequipment, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -4213,7 +4205,6 @@ /area/security/main) "ahf" = ( /obj/effect/landmark/secequipment, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -4977,7 +4968,6 @@ /turf/open/floor/plasteel/showroomfloor, /area/science/server) "ail" = ( -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/structure/closet/emcloset, /turf/open/floor/plating, @@ -5336,7 +5326,6 @@ /area/security/main) "aiM" = ( /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/bot, /obj/structure/closet{ name = "chapel locker" }, @@ -5448,7 +5437,6 @@ /obj/effect/turf_decal/tile/neutral, /obj/effect/decal/cleanable/blood/old, /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/box/corners, /turf/open/floor/plasteel/dark, /area/maintenance/port/fore) "aiW" = ( @@ -5597,9 +5585,6 @@ dir = 8 }, /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/box/corners{ - dir = 8 - }, /turf/open/floor/plasteel/dark, /area/maintenance/port/fore) "aji" = ( @@ -5774,7 +5759,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 4 }, -/obj/effect/turf_decal/bot, /turf/open/floor/plasteel/dark, /area/security/warden) "ajv" = ( @@ -6032,7 +6016,6 @@ /area/maintenance/port/aft) "ajU" = ( /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/delivery, /obj/structure/closet/emcloset, /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 @@ -6556,7 +6539,6 @@ "akU" = ( /obj/structure/closet/crate/coffin, /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 4 @@ -6617,7 +6599,6 @@ /obj/machinery/light{ dir = 1 }, -/obj/effect/turf_decal/box, /obj/structure/extinguisher_cabinet{ pixel_x = -26 }, @@ -6635,7 +6616,6 @@ "akZ" = ( /obj/structure/closet/crate/coffin, /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral{ dir = 8 }, @@ -6968,12 +6948,9 @@ /turf/open/floor/plasteel/dark, /area/ai_monitored/security/armory) "alw" = ( -/obj/effect/turf_decal/tile/neutral{ - dir = 4 - }, /obj/effect/decal/cleanable/blood/old, /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/box/corners{ +/obj/effect/turf_decal/tile/neutral{ dir = 4 }, /turf/open/floor/plasteel/dark, @@ -7040,7 +7017,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/machinery/status_display/evac{ pixel_y = 32 }, @@ -7127,11 +7103,8 @@ /turf/open/floor/plasteel/showroomfloor, /area/security/brig) "alH" = ( -/obj/effect/turf_decal/tile/neutral{ - dir = 1 - }, /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/box/corners{ +/obj/effect/turf_decal/tile/neutral{ dir = 1 }, /turf/open/floor/plasteel/dark, @@ -7228,7 +7201,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 4 }, -/obj/effect/turf_decal/delivery, /turf/open/floor/plasteel/dark, /area/ai_monitored/security/armory) "alQ" = ( @@ -8034,7 +8006,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /turf/open/floor/plasteel/dark, /area/security/warden) @@ -8299,7 +8270,6 @@ /area/space/nearstation) "anI" = ( /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/bot, /obj/structure/closet{ name = "bible locker" }, @@ -8616,7 +8586,6 @@ /area/space/nearstation) "aog" = ( /obj/effect/landmark/secequipment, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -9298,7 +9267,6 @@ }, /area/ai_monitored/turret_protected/ai) "apo" = ( -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/structure/closet{ name = "science locker" @@ -9353,7 +9321,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 1 }, -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/machinery/light/small, /turf/open/floor/plasteel/dark, @@ -9399,7 +9366,6 @@ }, /obj/effect/turf_decal/delivery, /obj/structure/closet/crate/engineering, -/obj/item/hand_tele, /turf/open/floor/plasteel/dark, /area/teleporter) "apw" = ( @@ -9560,7 +9526,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/item/gun/energy/e_gun/advtaser, /turf/open/floor/plasteel/dark, /area/security/brig) @@ -9586,11 +9551,8 @@ /obj/effect/turf_decal/tile/neutral{ dir = 4 }, -/obj/structure/rack, -/obj/item/storage/toolbox/emergency, -/obj/item/wrench, -/obj/item/stack/packageWrap, -/obj/item/hand_labeler, +/obj/structure/table, +/obj/item/hand_tele, /turf/open/floor/plasteel/dark, /area/teleporter) "apL" = ( @@ -9697,7 +9659,6 @@ /area/bridge) "apU" = ( /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/bot, /obj/structure/closet/firecloset, /turf/open/floor/plating, /area/maintenance/port/fore) @@ -9715,7 +9676,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer1{ dir = 8 @@ -11430,7 +11390,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/structure/cable{ icon_state = "1-2" }, @@ -12746,7 +12705,6 @@ /turf/open/floor/plating, /area/crew_quarters/heads/hop) "auH" = ( -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/structure/closet/firecloset, /turf/open/floor/plating, @@ -13040,7 +12998,6 @@ /turf/open/floor/plasteel/dark, /area/maintenance/port/fore) "avm" = ( -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/structure/closet/emcloset, /turf/open/floor/plating, @@ -13665,7 +13622,6 @@ /turf/open/floor/plating, /area/maintenance/port/fore) "awf" = ( -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/item/storage/backpack/cultpack{ pixel_x = 4; @@ -13709,7 +13665,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/item/gun/energy/e_gun/advtaser, /turf/open/floor/plasteel/dark, @@ -14536,7 +14491,6 @@ /turf/open/floor/grass, /area/medical/genetics) "axD" = ( -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/structure/closet{ name = "skirt closet" @@ -14899,7 +14853,6 @@ /area/engine/break_room) "ayl" = ( /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/bot, /obj/structure/closet/l3closet/virology, /turf/open/floor/plating, /area/maintenance/starboard) @@ -16498,7 +16451,6 @@ /area/science/robotics/lab) "aAG" = ( /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/bot, /obj/structure/closet, /obj/item/storage/backpack/duffelbag{ pixel_y = 4 @@ -16835,12 +16787,10 @@ /area/engine/engineering) "aBh" = ( /obj/structure/closet/secure_closet/RD, -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral{ dir = 8 }, /obj/effect/turf_decal/tile/neutral, -/obj/item/gun/energy/e_gun/mini, /obj/structure/extinguisher_cabinet{ pixel_y = 28 }, @@ -17956,7 +17906,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, -/obj/effect/turf_decal/delivery, /obj/machinery/light{ dir = 1 }, @@ -19296,7 +19245,6 @@ /turf/open/floor/engine/vacuum, /area/engine/atmos) "aFg" = ( -/obj/effect/turf_decal/delivery, /obj/structure/closet/radiation, /obj/item/clothing/glasses/meson, /obj/machinery/power/apc/highcap/ten_k{ @@ -19527,7 +19475,6 @@ name = "Labor Shuttle Dock APC"; pixel_x = -26 }, -/obj/effect/turf_decal/bot, /obj/structure/closet/secure_closet/evidence, /turf/open/floor/plasteel/dark, /area/security/processing) @@ -19590,7 +19537,6 @@ /area/maintenance/starboard) "aFF" = ( /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/bot, /obj/structure/closet/emcloset, /turf/open/floor/plating, /area/maintenance/starboard) @@ -20044,7 +19990,6 @@ /obj/effect/turf_decal/tile/yellow, /obj/machinery/portable_atmospherics/scrubber, /obj/machinery/atmospherics/components/unary/portables_connector/visible, -/obj/effect/turf_decal/box, /turf/open/floor/plasteel/showroomfloor, /area/engine/atmos) "aGx" = ( @@ -20543,7 +20488,6 @@ "aHv" = ( /obj/effect/decal/cleanable/dirt, /obj/structure/closet/secure_closet/exile, -/obj/effect/turf_decal/bot, /obj/machinery/light_switch{ pixel_y = -24 }, @@ -20985,7 +20929,6 @@ /turf/open/floor/plating, /area/maintenance/port/fore) "aId" = ( -/obj/effect/turf_decal/delivery, /obj/structure/closet/secure_closet/CMO, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ @@ -20998,7 +20941,6 @@ /obj/structure/extinguisher_cabinet{ pixel_x = -26 }, -/obj/item/gun/energy/e_gun/mini, /turf/open/floor/plasteel/dark, /area/crew_quarters/heads/cmo) "aIe" = ( @@ -23366,7 +23308,6 @@ /turf/open/floor/plasteel/showroomfloor, /area/science/mixing) "aLT" = ( -/obj/effect/turf_decal/bot, /obj/structure/closet, /obj/item/clothing/under/rank/bartender/purple{ pixel_x = 4; @@ -23545,7 +23486,6 @@ /area/science/mixing/chamber) "aMh" = ( /obj/structure/closet/secure_closet/security/engine, -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -23983,7 +23923,6 @@ /area/storage/tech) "aMK" = ( /obj/effect/landmark/secequipment, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -24086,21 +24025,11 @@ }, /area/hallway/primary/fore) "aMV" = ( -/obj/effect/turf_decal/tile/blue{ - dir = 4 - }, -/obj/effect/turf_decal/tile/blue{ - dir = 8 - }, -/obj/effect/turf_decal/tile/yellow{ +/obj/effect/turf_decal/loading_area{ dir = 1 }, -/obj/effect/turf_decal/tile/yellow, -/obj/machinery/portable_atmospherics/pump, -/obj/machinery/atmospherics/components/unary/portables_connector/visible, -/obj/effect/turf_decal/box, -/turf/open/floor/plasteel/showroomfloor, -/area/engine/atmos) +/turf/closed/wall/r_wall, +/area/maintenance/port/aft) "aMW" = ( /obj/structure/reflector/single/anchored{ dir = 9 @@ -24374,7 +24303,6 @@ "aNs" = ( /obj/structure/closet/cardboard, /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -25158,7 +25086,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 1 }, -/obj/effect/turf_decal/bot, /obj/structure/sign/warning/securearea{ name = "EMERGENCY STORAGE"; pixel_y = -32 @@ -25963,7 +25890,6 @@ /obj/structure/closet/secure_closet/medical3, /obj/item/storage/belt/medical, /obj/item/clothing/neck/stethoscope, -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral{ dir = 4 }, @@ -26298,7 +26224,6 @@ /obj/structure/closet/secure_closet/medical3, /obj/item/storage/belt/medical, /obj/item/clothing/neck/stethoscope, -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral{ dir = 4 }, @@ -27142,7 +27067,6 @@ pixel_x = -24; pixel_y = 24 }, -/obj/effect/turf_decal/delivery, /turf/open/floor/plasteel/dark, /area/security/checkpoint/science/research) "aRA" = ( @@ -27370,7 +27294,6 @@ /turf/open/floor/plasteel/dark, /area/medical/chemistry) "aRP" = ( -/obj/effect/turf_decal/bot, /obj/structure/closet{ name = "medical locker" }, @@ -27652,7 +27575,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, -/obj/effect/turf_decal/delivery, /obj/item/radio/intercom{ pixel_y = 22 }, @@ -31346,7 +31268,6 @@ /turf/open/floor/plasteel/dark, /area/science/mixing) "aXB" = ( -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -33468,7 +33389,6 @@ /area/science/mixing) "baT" = ( /obj/structure/closet/secure_closet/security/med, -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 4 @@ -34857,7 +34777,6 @@ /turf/open/floor/plating, /area/maintenance/central) "bcZ" = ( -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/red{ dir = 1 }, @@ -35287,7 +35206,6 @@ /turf/open/floor/engine, /area/science/xenobiology) "bdE" = ( -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/structure/closet{ name = "kitchen closet" @@ -36156,7 +36074,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 1 }, -/obj/effect/turf_decal/bot, /obj/structure/closet/firecloset, /turf/open/floor/plasteel/dark, /area/hallway/primary/starboard) @@ -36305,7 +36222,6 @@ /area/maintenance/port) "bfc" = ( /obj/effect/decal/cleanable/cobweb/cobweb2, -/obj/effect/turf_decal/bot, /obj/structure/closet/l3closet, /turf/open/floor/plasteel/dark, /area/maintenance/port) @@ -36467,7 +36383,6 @@ /obj/structure/cable{ icon_state = "0-2" }, -/obj/effect/turf_decal/box, /obj/machinery/light{ dir = 1 }, @@ -38196,7 +38111,6 @@ /turf/open/floor/plating, /area/maintenance/port) "bib" = ( -/obj/effect/turf_decal/bot, /obj/structure/closet/l3closet, /turf/open/floor/plasteel/dark, /area/maintenance/port) @@ -38400,7 +38314,6 @@ /area/medical/virology) "biq" = ( /obj/structure/closet/wardrobe/miner, -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -38458,7 +38371,6 @@ /turf/open/floor/plasteel/dark, /area/quartermaster/miningoffice) "biu" = ( -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -38902,7 +38814,6 @@ /area/quartermaster/qm) "bja" = ( /obj/structure/closet/secure_closet/quartermaster, -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 4 @@ -39184,7 +39095,6 @@ /area/quartermaster/office) "bju" = ( /obj/structure/closet/secure_closet/miner, -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -39196,7 +39106,6 @@ /area/quartermaster/miningoffice) "bjv" = ( /obj/structure/closet/secure_closet/miner, -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -40003,7 +39912,6 @@ /area/security/checkpoint/supply) "bkK" = ( /obj/structure/closet/secure_closet/miner, -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -41261,8 +41169,12 @@ /turf/open/floor/plasteel/dark, /area/hallway/primary/aft) "bmA" = ( -/obj/machinery/smartfridge, -/turf/closed/wall, +/obj/structure/table/reinforced, +/obj/machinery/door/poddoor/shutters/preopen{ + id = "kitchen"; + name = "Serving Hatch" + }, +/turf/open/floor/plating, /area/crew_quarters/kitchen) "bmB" = ( /obj/machinery/status_display/evac, @@ -41325,7 +41237,6 @@ /turf/open/floor/plasteel/dark, /area/hydroponics) "bmH" = ( -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/red{ dir = 1 }, @@ -41465,7 +41376,6 @@ id = "kitchen_2"; name = "Hallway Hatch" }, -/obj/structure/window/reinforced, /turf/open/floor/plating, /area/crew_quarters/kitchen) "bmT" = ( @@ -41663,7 +41573,6 @@ "bnk" = ( /obj/structure/disposalpipe/segment, /obj/structure/closet/wardrobe/white, -/obj/effect/turf_decal/bot, /turf/open/floor/plasteel/dark, /area/crew_quarters/locker) "bnl" = ( @@ -41762,7 +41671,6 @@ /turf/open/floor/grass, /area/hydroponics) "bnr" = ( -/obj/effect/turf_decal/bot, /obj/structure/closet/secure_closet/personal, /obj/item/storage/backpack, /obj/item/storage/backpack/satchel, @@ -42556,7 +42464,6 @@ /turf/open/floor/plating, /area/maintenance/central) "boz" = ( -/obj/effect/turf_decal/bot, /obj/structure/closet/secure_closet/hydroponics, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -42721,7 +42628,6 @@ /turf/open/floor/plasteel/dark, /area/crew_quarters/kitchen) "boJ" = ( -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/red{ dir = 1 }, @@ -42801,7 +42707,6 @@ "boO" = ( /obj/structure/disposalpipe/segment, /obj/structure/closet/wardrobe/grey, -/obj/effect/turf_decal/bot, /obj/machinery/light{ dir = 8 }, @@ -42841,7 +42746,6 @@ /turf/open/floor/plasteel/dark, /area/crew_quarters/kitchen) "boR" = ( -/obj/effect/turf_decal/bot, /obj/structure/closet/secure_closet/personal, /obj/item/storage/backpack, /obj/item/storage/backpack/satchel, @@ -42970,7 +42874,6 @@ /turf/open/floor/plasteel/dark, /area/crew_quarters/kitchen) "bpc" = ( -/obj/effect/turf_decal/bot, /obj/structure/closet/firecloset, /turf/open/floor/plating, /area/maintenance/port) @@ -43138,7 +43041,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 4 }, -/obj/effect/turf_decal/delivery, /obj/structure/closet/firecloset, /turf/open/floor/plasteel/dark, /area/hallway/primary/port) @@ -43448,7 +43350,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 4 }, -/obj/effect/turf_decal/delivery, /obj/structure/closet/emcloset, /turf/open/floor/plasteel/dark, /area/hallway/primary/port) @@ -44133,7 +44034,6 @@ /turf/open/floor/plasteel/dark, /area/crew_quarters/kitchen) "bqQ" = ( -/obj/effect/turf_decal/bot, /obj/structure/closet/secure_closet/hydroponics, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -45527,7 +45427,6 @@ /area/crew_quarters/bar) "bsV" = ( /obj/structure/closet/secure_closet/security/cargo, -/obj/effect/turf_decal/delivery, /obj/item/crowbar, /obj/item/book/manual/wiki/security_space_law, /obj/effect/turf_decal/tile/neutral, @@ -47528,7 +47427,6 @@ }, /area/hallway/primary/port) "bwg" = ( -/obj/effect/turf_decal/bot, /obj/structure/closet, /obj/item/stack/rods/ten, /obj/item/stock_parts/matter_bin, @@ -49072,7 +48970,6 @@ dir = 8 }, /obj/structure/closet/secure_closet/captains, -/obj/effect/turf_decal/delivery, /obj/machinery/airalarm{ dir = 8; pixel_x = 24 @@ -49082,7 +48979,6 @@ "byF" = ( /obj/structure/closet/secure_closet/engineering_personal, /obj/item/clothing/suit/hooded/wintercoat/engineering, -/obj/effect/turf_decal/delivery, /obj/machinery/newscaster{ pixel_y = 30 }, @@ -49364,7 +49260,6 @@ "byZ" = ( /obj/structure/disposalpipe/segment, /obj/structure/closet/wardrobe/black, -/obj/effect/turf_decal/bot, /obj/item/clothing/under/trendy_fit, /obj/item/clothing/under/trendy_fit, /turf/open/floor/plasteel/dark, @@ -49536,7 +49431,6 @@ /turf/open/floor/plating, /area/ai_monitored/turret_protected/ai_upload) "bzn" = ( -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -52750,7 +52644,6 @@ dir = 1 }, /obj/structure/closet/secure_closet/hop, -/obj/effect/turf_decal/bot, /obj/machinery/airalarm{ dir = 4; pixel_x = -22 @@ -53093,7 +52986,6 @@ dir = 1 }, /obj/structure/closet/firecloset, -/obj/effect/turf_decal/delivery, /turf/open/floor/plasteel/dark, /area/hallway/primary/aft) "bEM" = ( @@ -54624,7 +54516,6 @@ dir = 1 }, /obj/structure/closet/emcloset, -/obj/effect/turf_decal/delivery, /turf/open/floor/plasteel/dark, /area/hallway/primary/aft) "bHn" = ( @@ -56582,10 +56473,6 @@ pixel_x = -4; pixel_y = 4 }, -/obj/item/megaphone{ - pixel_x = 4; - pixel_y = 4 - }, /obj/item/pen, /obj/effect/decal/cleanable/cobweb/cobweb2, /obj/effect/turf_decal/tile/neutral{ @@ -56669,7 +56556,6 @@ /obj/effect/turf_decal/tile/red{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/structure/sink{ dir = 8; pixel_x = -12; @@ -56682,7 +56568,6 @@ dir = 1 }, /obj/effect/decal/cleanable/cobweb, -/obj/effect/decal/cleanable/blood/gibs/limb, /obj/machinery/atmospherics/components/unary/vent_pump/on, /turf/open/floor/plasteel/showroomfloor, /area/security/prison) @@ -56745,7 +56630,6 @@ /obj/effect/turf_decal/tile/red{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/machinery/door_timer{ id = "Cell 3"; name = "Cell 3"; @@ -56765,7 +56649,6 @@ /turf/open/floor/plasteel/dark, /area/security/warden) "bKA" = ( -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/structure/closet{ name = "detective closet" @@ -56828,7 +56711,6 @@ /area/crew_quarters/locker) "bKD" = ( /obj/structure/closet/boxinggloves, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral{ dir = 8 }, @@ -56867,7 +56749,6 @@ /area/crew_quarters/toilet/restrooms) "bKH" = ( /obj/structure/closet/masks, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral{ dir = 8 }, @@ -56939,7 +56820,6 @@ /area/maintenance/port/aft) "bKN" = ( /obj/structure/closet/athletic_mixed, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral{ dir = 8 }, @@ -56957,7 +56837,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 1 }, -/obj/effect/turf_decal/bot, /obj/structure/closet/emcloset, /obj/structure/sign/warning/securearea{ name = "EMERGENCY STORAGE"; @@ -57772,7 +57651,6 @@ }, /obj/effect/decal/cleanable/blood/old, /obj/effect/decal/cleanable/dirt, -/obj/effect/decal/remains/human, /obj/machinery/atmospherics/pipe/manifold/supply/hidden, /obj/machinery/airalarm{ dir = 1; @@ -58252,12 +58130,12 @@ /turf/open/floor/plasteel, /area/hallway/primary/starboard) "bMz" = ( -/obj/machinery/computer/prisoner, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 8 }, /obj/effect/turf_decal/bot, +/obj/machinery/computer/prisoner, /turf/open/floor/plasteel/dark, /area/security/prison) "bMA" = ( @@ -59029,7 +58907,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/machinery/light/small{ dir = 8 }, @@ -59911,7 +59788,6 @@ "bPa" = ( /obj/structure/flora/ausbushes/ywflowers, /obj/effect/decal/cleanable/blood/old, -/mob/living/simple_animal/butterfly, /turf/open/floor/grass, /area/security/prison) "bPb" = ( @@ -60030,7 +59906,6 @@ /obj/effect/turf_decal/tile/red{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/structure/sink{ dir = 8; pixel_x = -12; @@ -61759,7 +61634,6 @@ /obj/structure/closet/secure_closet/brig{ name = "Prisoner Locker" }, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -61781,7 +61655,6 @@ /area/hallway/secondary/exit/departure_lounge) "bRG" = ( /obj/structure/closet/secure_closet/warden, -/obj/effect/turf_decal/delivery, /obj/machinery/power/apc/highcap/five_k{ areastring = "/area/security/warden"; dir = 8; @@ -61818,7 +61691,6 @@ /obj/structure/closet/secure_closet/brig{ name = "Prisoner Locker" }, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -61842,7 +61714,6 @@ /obj/structure/closet/secure_closet/brig{ name = "Prisoner Locker" }, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -62701,7 +62572,6 @@ /obj/structure/closet/l3closet/security, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/cobweb/cobweb2, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral{ dir = 4 }, @@ -62750,7 +62620,6 @@ "bTa" = ( /obj/structure/closet/secure_closet/evidence, /obj/effect/turf_decal/tile/neutral, -/obj/effect/turf_decal/bot, /obj/machinery/light/small{ dir = 1 }, @@ -63117,7 +62986,6 @@ /obj/effect/turf_decal/tile/red{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/structure/sink{ dir = 8; pixel_x = -12; @@ -63195,7 +63063,6 @@ /turf/open/floor/plasteel/showroomfloor, /area/security/prison) "bTL" = ( -/obj/effect/turf_decal/bot, /obj/structure/closet{ name = "security locker" }, @@ -63673,7 +63540,6 @@ }, /area/hallway/primary/aft) "bUB" = ( -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -64158,8 +64024,6 @@ dir = 4 }, /obj/effect/turf_decal/tile/neutral, -/obj/effect/decal/cleanable/blood/old, -/obj/effect/decal/cleanable/blood/gibs/limb, /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 }, @@ -64492,7 +64356,6 @@ "bVP" = ( /obj/effect/decal/cleanable/dirt, /obj/structure/closet/bombcloset/security, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral{ dir = 8 }, @@ -64845,7 +64708,6 @@ /obj/effect/turf_decal/tile/red{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/machinery/door_timer{ id = "Cell 6"; name = "Cell 6"; @@ -64896,7 +64758,6 @@ /obj/effect/turf_decal/tile/red{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/machinery/door_timer{ id = "Cell 5"; name = "Cell 5"; @@ -64915,7 +64776,6 @@ /obj/effect/turf_decal/tile/red{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/machinery/door_timer{ id = "Cell 4"; name = "Cell 4"; @@ -65068,7 +64928,6 @@ /obj/effect/turf_decal/tile/red{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/machinery/door_timer{ id = "Cell 2"; name = "Cell 2"; @@ -65093,7 +64952,6 @@ /obj/effect/turf_decal/tile/red{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/machinery/door_timer{ id = "Cell 1"; name = "Cell 1"; @@ -67208,7 +67066,6 @@ /turf/open/floor/plasteel/dark/corner, /area/hallway/primary/starboard) "bZL" = ( -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -67288,7 +67145,6 @@ "bZQ" = ( /obj/structure/closet/l3closet/janitor, /obj/structure/window/reinforced, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 4 @@ -68259,8 +68115,6 @@ /area/maintenance/starboard) "cbo" = ( /obj/structure/closet/secure_closet/engineering_chief, -/obj/effect/turf_decal/delivery, -/obj/item/gun/energy/e_gun/mini, /obj/structure/extinguisher_cabinet{ pixel_x = 24 }, @@ -68965,7 +68819,7 @@ /area/maintenance/starboard) "ccv" = ( /obj/structure/sign/warning/securearea, -/turf/closed/wall, +/turf/closed/wall/r_wall, /area/security/main) "ccw" = ( /obj/effect/turf_decal/tile/yellow{ @@ -69011,7 +68865,6 @@ /turf/closed/mineral/random/labormineral, /area/space/nearstation) "ccB" = ( -/obj/effect/turf_decal/bot, /obj/structure/closet/firecloset, /obj/effect/decal/cleanable/dirt, /turf/open/floor/plasteel/dark, @@ -69644,7 +69497,6 @@ }, /obj/effect/turf_decal/tile/red, /obj/structure/closet/secure_closet/engineering_electrical, -/obj/effect/turf_decal/box, /turf/open/floor/plasteel, /area/engine/break_room) "cdO" = ( @@ -70940,7 +70792,6 @@ /obj/effect/turf_decal/tile/yellow, /obj/effect/turf_decal/tile/red, /obj/structure/closet/secure_closet/engineering_welding, -/obj/effect/turf_decal/box, /turf/open/floor/plasteel, /area/engine/break_room) "cfI" = ( @@ -71072,7 +70923,6 @@ /turf/closed/wall/r_wall/rust, /area/ai_monitored/storage/satellite) "cgb" = ( -/obj/effect/turf_decal/bot, /obj/structure/closet/emcloset, /obj/effect/decal/cleanable/dirt, /turf/open/floor/plasteel/dark, @@ -71177,7 +71027,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 1 }, -/obj/effect/turf_decal/delivery, /turf/open/floor/plasteel, /area/crew_quarters/heads/hos) "cgq" = ( @@ -71591,7 +71440,6 @@ "cgW" = ( /obj/structure/closet/secure_closet/engineering_personal, /obj/item/clothing/suit/hooded/wintercoat/engineering, -/obj/effect/turf_decal/delivery, /obj/machinery/light{ dir = 1 }, @@ -71618,7 +71466,6 @@ "cgY" = ( /obj/structure/closet/crate/coffin, /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 4 @@ -74485,7 +74332,6 @@ }, /area/maintenance/starboard) "clB" = ( -/obj/effect/turf_decal/delivery, /obj/structure/closet/radiation, /obj/item/clothing/glasses/meson, /turf/open/floor/plasteel/dark, @@ -74690,13 +74536,11 @@ /turf/closed/wall/r_wall, /area/engine/gravity_generator) "clV" = ( -/obj/effect/turf_decal/delivery, /obj/structure/closet/radiation, /obj/item/clothing/glasses/meson, /turf/open/floor/plasteel/dark, /area/engine/gravity_generator) "clW" = ( -/obj/effect/turf_decal/delivery, /obj/structure/closet/radiation, /obj/item/clothing/glasses/meson, /obj/machinery/power/apc{ @@ -75556,7 +75400,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 1 }, -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/machinery/firealarm{ dir = 4; @@ -78861,6 +78704,9 @@ }, /obj/structure/barricade/wooden/crude, /obj/effect/decal/cleanable/dirt, +/obj/effect/turf_decal/loading_area{ + dir = 1 + }, /turf/open/floor/plasteel/dark, /area/maintenance/port/fore) "ctj" = ( @@ -80488,6 +80334,9 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 }, +/obj/effect/turf_decal/loading_area{ + dir = 1 + }, /turf/open/floor/plasteel/dark, /area/maintenance/port/fore) "cwh" = ( @@ -80500,6 +80349,9 @@ icon_state = "1-2" }, /obj/machinery/atmospherics/pipe/simple/supply/hidden, +/obj/effect/turf_decal/loading_area{ + dir = 1 + }, /turf/open/floor/plasteel/dark, /area/maintenance/port/fore) "cwi" = ( @@ -80885,6 +80737,9 @@ }, /obj/structure/barricade/wooden/crude, /obj/machinery/atmospherics/pipe/simple/supply/hidden, +/obj/effect/turf_decal/loading_area{ + dir = 1 + }, /turf/open/floor/plasteel/dark, /area/maintenance/port/fore) "cwR" = ( @@ -80893,7 +80748,6 @@ }, /obj/effect/decal/cleanable/cobweb/cobweb2, /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/bot, /obj/structure/closet, /obj/item/stack/packageWrap, /obj/item/storage/bag/trash, @@ -81247,7 +81101,6 @@ }, /area/maintenance/port/fore) "cxL" = ( -/obj/effect/turf_decal/bot, /obj/structure/closet{ name = "engineering locker" }, @@ -81526,6 +81379,9 @@ "cyu" = ( /obj/effect/decal/cleanable/dirt, /obj/structure/barricade/wooden/crude, +/obj/effect/turf_decal/loading_area{ + dir = 1 + }, /turf/open/floor/plating{ icon_state = "platingdmg3" }, @@ -81558,7 +81414,6 @@ /turf/closed/wall, /area/maintenance/port/aft) "cyz" = ( -/obj/effect/turf_decal/bot, /obj/structure/rack, /obj/item/crowbar/red, /obj/item/restraints/handcuffs, @@ -82027,7 +81882,6 @@ /obj/structure/closet/crate/coffin, /obj/effect/decal/cleanable/cobweb/cobweb2, /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/tile/neutral{ dir = 8 }, @@ -82044,6 +81898,9 @@ /obj/structure/cable{ icon_state = "1-2" }, +/obj/effect/turf_decal/loading_area{ + dir = 1 + }, /turf/open/floor/plasteel/dark, /area/maintenance/port/fore) "czL" = ( @@ -82053,6 +81910,9 @@ /obj/structure/barricade/wooden/crude, /obj/machinery/atmospherics/pipe/simple/supply/hidden, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1, +/obj/effect/turf_decal/loading_area{ + dir = 1 + }, /turf/open/floor/plasteel/dark, /area/maintenance/port/fore) "czP" = ( @@ -82186,7 +82046,6 @@ "cAi" = ( /obj/structure/closet/crate/coffin, /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 4 @@ -82204,7 +82063,6 @@ "cAk" = ( /obj/structure/closet/crate/coffin, /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral{ dir = 8 }, @@ -82219,7 +82077,6 @@ /turf/open/floor/plasteel/dark, /area/chapel/office) "cAo" = ( -/obj/effect/turf_decal/bot, /obj/structure/frame/computer{ anchored = 1 }, @@ -82234,7 +82091,6 @@ /turf/closed/wall/rust, /area/chapel/office) "cAq" = ( -/obj/effect/turf_decal/bot, /obj/structure/frame/computer{ anchored = 1 }, @@ -82553,7 +82409,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/machinery/light{ dir = 8 }, @@ -82902,7 +82757,6 @@ "cCr" = ( /obj/effect/decal/cleanable/cobweb, /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -82931,7 +82785,6 @@ /obj/effect/turf_decal/tile/neutral{ dir = 8 }, -/obj/effect/turf_decal/bot, /obj/effect/decal/cleanable/dirt, /obj/item/clothing/gloves/color/white, /obj/item/clothing/under/maid{ @@ -83807,7 +83660,6 @@ "cEB" = ( /obj/effect/decal/cleanable/cobweb/cobweb2, /obj/effect/decal/cleanable/dirt, -/obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral{ dir = 8 @@ -85018,8 +84870,10 @@ }, /area/maintenance/aft) "cIe" = ( -/obj/machinery/door/airlock/maintenance{ - name = "xenobiology maintenance"; +/obj/machinery/door/airlock/research{ + glass = 1; + name = "Slime Euthanization Chamber"; + opacity = 0; req_access_txt = "55" }, /turf/open/floor/plasteel/dark, @@ -86190,7 +86044,6 @@ /obj/machinery/light/small{ dir = 1 }, -/obj/effect/turf_decal/bot, /turf/open/floor/plating, /area/maintenance/starboard/aft) "cKY" = ( @@ -87349,10 +87202,6 @@ "dis" = ( /turf/closed/wall/r_wall/rust, /area/bridge) -"dww" = ( -/obj/effect/decal/cleanable/dirt, -/turf/open/floor/plating/asteroid/airless, -/area/space/nearstation) "dxq" = ( /obj/effect/turf_decal/bot, /obj/effect/turf_decal/tile/neutral{ @@ -88060,8 +87909,13 @@ /turf/closed/wall/rust, /area/crew_quarters/heads/hor) "nJw" = ( -/obj/machinery/smartfridge, -/turf/closed/wall/rust, +/obj/structure/table/reinforced, +/obj/machinery/door/firedoor, +/obj/machinery/door/poddoor/shutters/preopen{ + id = "kitchen"; + name = "Serving Hatch" + }, +/turf/open/floor/plating, /area/crew_quarters/kitchen) "nNA" = ( /turf/closed/wall/rust, @@ -106127,10 +105981,10 @@ cDB cfb aey ajx +aMV +ajx +ajx ajx -ajd -ajd -ajd anZ cmt cko @@ -118204,7 +118058,7 @@ bGJ cdr bGG awu -aMV +cgF chz ciA aGl diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index 0a64f01a43..6604811d34 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -2,32 +2,57 @@ #define CHECK_DNA_AND_SPECIES(C) if((!(C.dna)) || (!(C.dna.species))) return -//Defines copying names of mutations in all cases, make sure to change this if you change mutation's name -#define HULK "Hulk" -#define XRAY "X Ray Vision" -#define COLDRES "Cold Resistance" -#define TK "Telekinesis" -#define NERVOUS "Nervousness" -#define EPILEPSY "Epilepsy" -#define MUTATE "Unstable DNA" -#define COUGH "Cough" -#define DWARFISM "Dwarfism" -#define CLOWNMUT "Clumsiness" -#define TOURETTES "Tourettes Syndrome" -#define DEAFMUT "Deafness" -#define BLINDMUT "Blindness" -#define RACEMUT "Monkified" -#define BADSIGHT "Near Sightness" -#define LASEREYES "Laser Eyes" -#define CHAMELEON "Chameleon" -#define WACKY "Wacky" -#define MUT_MUTE "Mute" -#define SMILE "Smile" -#define STONER "Stoner" -#define UNINTELLIGIBLE "Unintelligible" -#define SWEDISH "Swedish" -#define CHAV "Chav" -#define ELVIS "Elvis" +//Defines copying names of mutations in all cases, make sure to change this if you change mutation's type +#define HULK /datum/mutation/human/hulk +#define XRAY /datum/mutation/human/thermal/x_ray +#define SPACEMUT /datum/mutation/human/space_adaptation +#define TK /datum/mutation/human/telekinesis +#define NERVOUS /datum/mutation/human/nervousness +#define EPILEPSY /datum/mutation/human/epilepsy +#define MUTATE /datum/mutation/human/bad_dna +#define COUGH /datum/mutation/human/cough +#define DWARFISM /datum/mutation/human/dwarfism +#define GIGANTISM /datum/mutation/human/gigantism +#define CLOWNMUT /datum/mutation/human/clumsy +#define TOURETTES /datum/mutation/human/tourettes +#define DEAFMUT /datum/mutation/human/deaf +#define BLINDMUT /datum/mutation/human/blind +#define RACEMUT /datum/mutation/human/race +#define BADSIGHT /datum/mutation/human/nearsight +#define LASEREYES /datum/mutation/human/laser_eyes +#define CHAMELEON /datum/mutation/human/chameleon +#define WACKY /datum/mutation/human/wacky +#define MUT_MUTE /datum/mutation/human/mute +#define SMILE /datum/mutation/human/smile +#define STONER /datum/mutation/human/stoner +#define UNINTELLIGIBLE /datum/mutation/human/unintelligible +#define SWEDISH /datum/mutation/human/swedish +#define CHAV /datum/mutation/human/chav +#define ELVIS /datum/mutation/human/elvis +#define RADIOACTIVE /datum/mutation/human/radioactive +#define GLOWY /datum/mutation/human/glow +#define ANTIGLOWY /datum/mutation/human/glow/anti +#define TELEPATHY /datum/mutation/human/telepathy +#define FIREBREATH /datum/mutation/human/firebreath +#define VOID /datum/mutation/human/void +#define TONGUESPIKE /datum/mutation/human/tongue_spike +#define TONGUESPIKECHEM /datum/mutation/human/tongue_spike/chem +#define STRONG /datum/mutation/human/strong +#define STIMMED /datum/mutation/human/stimmed +#define FIRESWEAT /datum/mutation/human/fire +#define THERMAL /datum/mutation/human/thermal +#define ANTENNA /datum/mutation/human/antenna +#define PARANOIA /datum/mutation/human/paranoia +#define MINDREAD /datum/mutation/human/mindreader +#define INSULATED /datum/mutation/human/insulated +#define SHOCKTOUCH /datum/mutation/human/shock +#define OLFACTION /datum/mutation/human/olfaction +#define ACIDFLESH /datum/mutation/human/acidflesh +#define BADBLINK /datum/mutation/human/badblink +#define SPASTIC /datum/mutation/human/spastic +#define GELADIKINESIS /datum/mutation/human/geladikinesis +#define CRYOKINESIS /datum/mutation/human/cryokinesis +#define SPIDER_WEB /datum/mutation/human/webbing #define UI_CHANGED "ui changed" #define UE_CHANGED "ue changed" @@ -39,10 +64,12 @@ //Types of usual mutations #define POSITIVE 1 #define NEGATIVE 2 -#define MINOR_NEGATIVE 3 +#define MINOR_NEGATIVE 4 -//Mutations that cant be taken from genetics and are not in SE -#define NON_SCANNABLE -1 +//Mutation classes. Normal being on them, extra being additional mutations with instability and other being stuff you dont want people to fuck with like wizard mutate +#define MUT_NORMAL 1 +#define MUT_EXTRA 2 +#define MUT_OTHER 3 //DNA - Because fuck you and your magic numbers being all over the codebase. #define DNA_BLOCK_SIZE 3 @@ -63,7 +90,8 @@ #define DNA_MUTANTMARKING_BLOCK 13 #define DNA_TAUR_BLOCK 14 -#define DNA_STRUC_ENZYMES_BLOCKS 18 +#define DNA_SEQUENCE_LENGTH 4 +#define DNA_MUTATION_BLOCKS 8 #define DNA_UNIQUE_ENZYMES_LEN 32 //Transformation proc stuff @@ -141,7 +169,13 @@ #define STANDARD_ORGAN_HEALING (1/(15 MINUTES / (2 SECONDS))) #define STANDARD_ORGAN_DECAY (1/(15 MINUTES / (2 SECONDS))) //designed to fail organs when left to decay for ~15 minutes. 2 SECOND is SSmobs tickrate. + +//used for the can_chromosome var on mutations +#define CHROMOSOME_NEVER 0 +#define CHROMOSOME_NONE 1 +#define CHROMOSOME_USED 2 + #define G_MALE 1 #define G_FEMALE 2 #define G_PLURAL 3 -#define G_NEUTER 4 +#define G_NEUTER 4 \ No newline at end of file diff --git a/code/__DEFINES/antagonists.dm b/code/__DEFINES/antagonists.dm index 7a3f872666..ea380cf49b 100644 --- a/code/__DEFINES/antagonists.dm +++ b/code/__DEFINES/antagonists.dm @@ -1,3 +1,6 @@ +#define TRAITOR_HUMAN /datum/traitor_class/human/freeform +#define TRAITOR_AI /datum/traitor_class/ai + #define NUKE_RESULT_FLUKE 0 #define NUKE_RESULT_NUKE_WIN 1 #define NUKE_RESULT_CREW_WIN 2 @@ -74,6 +77,7 @@ #define MARTIALART_HUNTER "hunter-fu" //Blob -/// blob gets a free reroll every X time -#define BLOB_REROLL_TIME 2400 +#define BLOB_REROLL_TIME 2400 // blob gets a free reroll every X time +#define BLOB_SPREAD_COST 4 +#define BLOB_ATTACK_REFUND 2 //blob refunds this much if it attacks and doesn't spread #define BLOB_REFLECTOR_COST 15 \ No newline at end of file diff --git a/code/__DEFINES/dcs/flags.dm b/code/__DEFINES/dcs/flags.dm new file mode 100644 index 0000000000..128c9f1938 --- /dev/null +++ b/code/__DEFINES/dcs/flags.dm @@ -0,0 +1,41 @@ +/// Return this from `/datum/component/Initialize` or `datum/component/OnTransfer` to have the component be deleted if it's applied to an incorrect type. +/// `parent` must not be modified if this is to be returned. +/// This will be noted in the runtime logs +#define COMPONENT_INCOMPATIBLE 1 +/// Returned in PostTransfer to prevent transfer, similar to `COMPONENT_INCOMPATIBLE` +#define COMPONENT_NOTRANSFER 2 + +/// Return value to cancel attaching +#define ELEMENT_INCOMPATIBLE 1 + +// /datum/element flags +/// Causes the detach proc to be called when the host object is being deleted +#define ELEMENT_DETACH (1 << 0) +/** + * Only elements created with the same arguments given after `id_arg_index` share an element instance + * The arguments are the same when the text and number values are the same and all other values have the same ref + */ +#define ELEMENT_BESPOKE (1 << 1) + +// How multiple components of the exact same type are handled in the same datum +/// old component is deleted (default) +#define COMPONENT_DUPE_HIGHLANDER 0 +/// duplicates allowed +#define COMPONENT_DUPE_ALLOWED 1 +/// new component is deleted +#define COMPONENT_DUPE_UNIQUE 2 +/// old component is given the initialization args of the new +#define COMPONENT_DUPE_UNIQUE_PASSARGS 4 +/// each component of the same type is consulted as to whether the duplicate should be allowed +#define COMPONENT_DUPE_SELECTIVE 5 + +//Redirection component init flags +#define REDIRECT_TRANSFER_WITH_TURF 1 + +//Arch +#define ARCH_PROB "probability" //Probability for each item +#define ARCH_MAXDROP "max_drop_amount" //each item's max drop amount + +//Ouch my toes! +#define CALTROP_BYPASS_SHOES 1 +#define CALTROP_IGNORE_WALKERS 2 diff --git a/code/__DEFINES/dcs/helpers.dm b/code/__DEFINES/dcs/helpers.dm new file mode 100644 index 0000000000..b13530cdf7 --- /dev/null +++ b/code/__DEFINES/dcs/helpers.dm @@ -0,0 +1,16 @@ +/// Used to trigger signals and call procs registered for that signal +/// The datum hosting the signal is automaticaly added as the first argument +/// Returns a bitfield gathered from all registered procs +/// Arguments given here are packaged in a list and given to _SendSignal +#define SEND_SIGNAL(target, sigtype, arguments...) ( !target.comp_lookup || !target.comp_lookup[sigtype] ? NONE : target._SendSignal(sigtype, list(target, ##arguments)) ) + +#define SEND_GLOBAL_SIGNAL(sigtype, arguments...) ( SEND_SIGNAL(SSdcs, sigtype, ##arguments) ) + +/// A wrapper for _AddElement that allows us to pretend we're using normal named arguments +#define AddElement(arguments...) _AddElement(list(##arguments)) + +/// A wrapper for _RemoveElement that allows us to pretend we're using normal named arguments +#define RemoveElement(arguments...) _RemoveElement(list(##arguments)) + +/// A wrapper for _AddComponent that allows us to pretend we're using normal named arguments +#define AddComponent(arguments...) _AddComponent(list(##arguments)) \ No newline at end of file diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/dcs/signals.dm similarity index 94% rename from code/__DEFINES/components.dm rename to code/__DEFINES/dcs/signals.dm index 7f01762baf..e0ea4094e2 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -1,28 +1,3 @@ -#define SEND_SIGNAL(target, sigtype, arguments...) ( !target.comp_lookup || !target.comp_lookup[sigtype] ? NONE : target._SendSignal(sigtype, list(target, ##arguments)) ) - -#define SEND_GLOBAL_SIGNAL(sigtype, arguments...) ( SEND_SIGNAL(SSdcs, sigtype, ##arguments) ) - -#define COMPONENT_INCOMPATIBLE 1 -#define COMPONENT_NOTRANSFER 2 - -#define ELEMENT_INCOMPATIBLE 1 // Return value to cancel attaching - -// /datum/element flags -/// Causes the detach proc to be called when the host object is being deleted -#define ELEMENT_DETACH (1 << 0) -/** - * Only elements created with the same arguments given after `id_arg_index` share an element instance - * The arguments are the same when the text and number values are the same and all other values have the same ref - */ -#define ELEMENT_BESPOKE (1 << 1) - -// How multiple components of the exact same type are handled in the same datum - -#define COMPONENT_DUPE_HIGHLANDER 0 //old component is deleted (default) -#define COMPONENT_DUPE_ALLOWED 1 //duplicates allowed -#define COMPONENT_DUPE_UNIQUE 2 //new component is deleted -#define COMPONENT_DUPE_UNIQUE_PASSARGS 4 //old component is given the initialization args of the new - // All signals. Format: // When the signal is called: (signal arguments) // All signals send the source datum of the signal as the first argument @@ -306,7 +281,7 @@ #define COMSIG_HUMAN_MELEE_UNARMED_ATTACKBY "human_melee_unarmed_attackby" //from mob/living/carbon/human/UnarmedAttack(): (mob/living/carbon/human/attacker) #define COMSIG_HUMAN_DISARM_HIT "human_disarm_hit" //Hit by successful disarm attack (mob/living/carbon/human/attacker,zone_targeted) #define COMSIG_HUMAN_PREFS_COPIED_TO "human_prefs_copied_to" //from datum/preferences/copy_to(): (datum/preferences, icon_updates, roundstart_checks) -#define COMSIG_HUMAN_HARDSET_DNA "human_hardset_dna" //from mob/living/carbon/human/hardset_dna(): (ui, se, newreal_name, newblood_type, datum/species, newfeatures) +#define COMSIG_HUMAN_HARDSET_DNA "human_hardset_dna" //from mob/living/carbon/human/hardset_dna(): (ui, list/mutation_index, newreal_name, newblood_type, datum/species, newfeatures) #define COMSIG_HUMAN_ON_RANDOMIZE "humman_on_randomize" //from base of proc/randomize_human() // /datum/species signals @@ -374,19 +349,6 @@ #define COMSIG_ACTION_TRIGGER "action_trigger" //from base of datum/action/proc/Trigger(): (datum/action) #define COMPONENT_ACTION_BLOCK_TRIGGER 1 -/*******Non-Signal Component Related Defines*******/ - -//Redirection component init flags -#define REDIRECT_TRANSFER_WITH_TURF 1 - -//Arch -#define ARCH_PROB "probability" //Probability for each item -#define ARCH_MAXDROP "max_drop_amount" //each item's max drop amount - -//Ouch my toes! -#define CALTROP_BYPASS_SHOES 1 -#define CALTROP_IGNORE_WALKERS 2 - //Xenobio hotkeys #define COMSIG_XENO_SLIME_CLICK_CTRL "xeno_slime_click_ctrl" //from slime CtrlClickOn(): (/mob) #define COMSIG_XENO_SLIME_CLICK_ALT "xeno_slime_click_alt" //from slime AltClickOn(): (/mob) diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index 9d09714cc0..ef86db07cb 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -118,3 +118,4 @@ #define STATUS_EFFECT_RAINBOWPROTECTION /datum/status_effect/rainbow_protection //Invulnerable and pacifistic #define STATUS_EFFECT_SLIMESKIN /datum/status_effect/slimeskin //Increased armor +#define STATUS_EFFECT_DNA_MELT /datum/status_effect/dna_melt //usually does something horrible to you when you hit 100 genetic instability diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 373945d951..ba96b7cc7f 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -83,6 +83,7 @@ #define TRAIT_DISFIGURED "disfigured" #define TRAIT_XENO_HOST "xeno_host" //Tracks whether we're gonna be a baby alien's mummy. #define TRAIT_STUNIMMUNE "stun_immunity" +#define TRAIT_TASED_RESISTANCE "tased_resistance" //prevents you from suffering most of the effects of being tased #define TRAIT_SLEEPIMMUNE "sleep_immunity" #define TRAIT_PUSHIMMUNE "push_immunity" #define TRAIT_SHOCKIMMUNE "shock_immunity" @@ -194,6 +195,8 @@ #define TRAIT_AUTO_CATCH_ITEM "auto_catch_item" #define TRAIT_CLOWN_MENTALITY "clown_mentality" // The future is now, clownman. #define TRAIT_FREESPRINT "free_sprinting" +#define TRAIT_XRAY_VISION "xray_vision" +#define TRAIT_THERMAL_VISION "thermal_vision" #define TRAIT_NO_TELEPORT "no-teleport" //you just can't #define TRAIT_NO_INTERNALS "no-internals" #define TRAIT_NO_ALCOHOL "alcohol_intolerance" diff --git a/code/__HELPERS/dna.dm b/code/__HELPERS/dna.dm new file mode 100644 index 0000000000..bb0c89d1f3 --- /dev/null +++ b/code/__HELPERS/dna.dm @@ -0,0 +1,12 @@ +////////////////////////////////////////////////////////// +//A bunch of helpers to make genetics less of a headache// +////////////////////////////////////////////////////////// + +#define GET_INITIALIZED_MUTATION(A) GLOB.all_mutations[A] +#define GET_GENE_STRING(A, B) (B.mutation_index[A]) +#define GET_SEQUENCE(A) (GLOB.full_sequences[A]) + +#define GET_MUTATION_STABILIZER(A) ((A.stabilizer_coeff < 0) ? 1 : A.stabilizer_coeff) +#define GET_MUTATION_SYNCHRONIZER(A) ((A.synchronizer_coeff < 0) ? 1 : A.synchronizer_coeff) +#define GET_MUTATION_POWER(A) ((A.power_coeff < 0) ? 1 : A.power_coeff) +#define GET_MUTATION_ENERGY(A) ((A.energy_coeff < 0) ? 1 : A.energy_coeff) \ No newline at end of file diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 034b5d1825..7703b13018 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -425,7 +425,7 @@ candidates -= M /proc/pollGhostCandidates(Question, jobbanType, datum/game_mode/gametypeCheck, be_special_flag = 0, poll_time = 300, ignore_category = null, flashwindow = TRUE) - var/datum/element/ghost_role_eligibility/eligibility = SSdcs.GetElement(/datum/element/ghost_role_eligibility) + var/datum/element/ghost_role_eligibility/eligibility = SSdcs.GetElement(list(/datum/element/ghost_role_eligibility)) var/list/candidates = eligibility.get_all_ghost_role_eligible() return pollCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category, flashwindow, candidates) diff --git a/code/_globalvars/genetics.dm b/code/_globalvars/genetics.dm index 7016415d48..39702fd62f 100644 --- a/code/_globalvars/genetics.dm +++ b/code/_globalvars/genetics.dm @@ -21,8 +21,11 @@ GLOBAL_LIST(op_se_blocks) GLOBAL_VAR(NULLED_SE) GLOBAL_VAR(NULLED_UI) -GLOBAL_LIST_EMPTY(global_mutations) // list of hidden mutation things +GLOBAL_LIST_EMPTY(all_mutations) +GLOBAL_LIST_EMPTY(full_sequences) GLOBAL_LIST_EMPTY(bad_mutations) GLOBAL_LIST_EMPTY(good_mutations) -GLOBAL_LIST_EMPTY(not_good_mutations) \ No newline at end of file +GLOBAL_LIST_EMPTY(not_good_mutations) + +GLOBAL_LIST_EMPTY(mutation_recipes) \ No newline at end of file diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index cba53eb4a5..2fa2a8e85f 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -125,11 +125,7 @@ if(prob(33)) I.add_mob_blood(src) var/turf/location = get_turf(src) - if(iscarbon(src)) - var/mob/living/carbon/C = src - C.bleed(totitemdamage) - else - add_splatter_floor(location) + add_splatter_floor(location) if(totitemdamage >= 10 && get_dist(user, src) <= 1) //people with TK won't get smeared with blood user.add_mob_blood(src) return TRUE //successful attack diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm index 974a0c0e88..f1db37d9fa 100644 --- a/code/controllers/configuration/configuration.dm +++ b/code/controllers/configuration/configuration.dm @@ -371,19 +371,18 @@ for(var/T in storyteller_cache) var/datum/dynamic_storyteller/S = T var/config_tag = initial(S.config_tag) - var/final_weight = initial(S.weight) - if(probabilities[config_tag]<=0) + var/probability = (config_tag in probabilities) ? probabilities[config_tag] : initial(S.weight) + if(probability <= 0) continue - final_weight = probabilities[config_tag] - if(SSpersistence.saved_storytellers.len == 3 && repeated_mode_adjust.len == 3) + if(SSpersistence.saved_storytellers.len == repeated_mode_adjust.len) var/name = initial(S.name) var/recent_round = min(SSpersistence.saved_storytellers.Find(name),3) var/adjustment = 0 while(recent_round) adjustment += repeated_mode_adjust[recent_round] recent_round = SSpersistence.saved_modes.Find(name,recent_round+1,0) - final_weight *= ((100-adjustment)/100) - runnable_storytellers[S] = final_weight + probability *= ((100-adjustment)/100) + runnable_storytellers[S] = probability return runnable_storytellers diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index 2d9264adf5..a1f8f098d3 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -82,17 +82,23 @@ config_entry_value = 600 min_val = 0 -/datum/config_entry/number/vote_autotransfer_initial //length of time before the first autotransfer vote is called (deciseconds, default 2 hours) +/// Length of time before the first autotransfer vote is called (deciseconds, default 2 hours) +/// Set to 0 to disable the subsystem altogether. +/datum/config_entry/number/vote_autotransfer_initial config_entry_value = 72000 min_val = 0 -/datum/config_entry/number/vote_autotransfer_interval //length of time to wait before subsequent autotransfer votes (deciseconds, default 30 minutes) +///length of time to wait before subsequent autotransfer votes (deciseconds, default 30 minutes) +/datum/config_entry/number/vote_autotransfer_interval config_entry_value = 18000 min_val = 0 -/datum/config_entry/number/vote_autotransfer_maximum // maximum extensions until the round autoends +/// maximum extensions until the round autoends. +/// Set to 0 to force automatic crew transfer after the 'vote_autotransfer_initial' elapsed. +/// Set to -1 to disable the maximum extensions cap. +/datum/config_entry/number/vote_autotransfer_maximum config_entry_value = 4 - min_val = 0 + min_val = -1 /datum/config_entry/flag/default_no_vote // vote does not default to nochange/norestart @@ -459,3 +465,6 @@ /datum/config_entry/number/max_bunker_days config_entry_value = 7 min_val = 1 + +/datum/config_entry/flag/minimaps_enabled + config_entry_value = TRUE diff --git a/code/controllers/subsystem/atoms.dm b/code/controllers/subsystem/atoms.dm index d94526e658..35feab6648 100644 --- a/code/controllers/subsystem/atoms.dm +++ b/code/controllers/subsystem/atoms.dm @@ -16,7 +16,7 @@ SUBSYSTEM_DEF(atoms) /datum/controller/subsystem/atoms/Initialize(timeofday) GLOB.fire_overlay.appearance_flags = RESET_COLOR - setupGenetics() //to set the mutations' place in structural enzymes, so monkey.initialize() knows where to put the monkey mutation. + setupGenetics() //to set the mutations' sequence. initialized = INITIALIZATION_INNEW_MAPLOAD InitializeAtoms() return ..() @@ -108,16 +108,19 @@ SUBSYSTEM_DEF(atoms) BadInitializeCalls = SSatoms.BadInitializeCalls /datum/controller/subsystem/atoms/proc/setupGenetics() - var/list/avnums = new /list(DNA_STRUC_ENZYMES_BLOCKS) - for(var/i=1, i<=DNA_STRUC_ENZYMES_BLOCKS, i++) - avnums[i] = i - CHECK_TICK - - for(var/A in subtypesof(/datum/mutation/human)) - var/datum/mutation/human/B = new A() - if(B.dna_block == NON_SCANNABLE) + var/list/mutations = subtypesof(/datum/mutation/human) + shuffle_inplace(mutations) + for(var/A in subtypesof(/datum/generecipe)) + var/datum/generecipe/GR = A + GLOB.mutation_recipes[initial(GR.required)] = initial(GR.result) + for(var/i in 1 to LAZYLEN(mutations)) + var/path = mutations[i] //byond gets pissy when we do it in one line + var/datum/mutation/human/B = new path () + B.alias = "Mutation #[i]" + GLOB.all_mutations[B.type] = B + GLOB.full_sequences[B.type] = generate_gene_sequence(B.blocks) + if(B.locked) continue - B.dna_block = pick_n_take(avnums) if(B.quality == POSITIVE) GLOB.good_mutations |= B else if(B.quality == NEGATIVE) diff --git a/code/controllers/subsystem/autotransfer.dm b/code/controllers/subsystem/autotransfer.dm index 4f8fc3631d..ece203abba 100644 --- a/code/controllers/subsystem/autotransfer.dm +++ b/code/controllers/subsystem/autotransfer.dm @@ -1,3 +1,5 @@ +#define NO_MAXVOTES_CAP -1 + SUBSYSTEM_DEF(autotransfer) name = "Autotransfer Vote" flags = SS_KEEP_TIMING | SS_BACKGROUND @@ -7,21 +9,32 @@ SUBSYSTEM_DEF(autotransfer) var/targettime var/voteinterval var/maxvotes - var/curvotes + var/curvotes = 0 /datum/controller/subsystem/autotransfer/Initialize(timeofday) + var/init_vote = CONFIG_GET(number/vote_autotransfer_initial) + if(!init_vote) //Autotransfer voting disabled. + can_fire = FALSE + return ..() starttime = world.time - targettime = starttime + CONFIG_GET(number/vote_autotransfer_initial) + targettime = starttime + init_vote voteinterval = CONFIG_GET(number/vote_autotransfer_interval) maxvotes = CONFIG_GET(number/vote_autotransfer_maximum) - curvotes = 0 return ..() +/datum/controller/subsystem/autotransfer/Recover() + starttime = SSautotransfer.starttime + voteinterval = SSautotransfer.voteinterval + curvotes = SSautotransfer.curvotes + /datum/controller/subsystem/autotransfer/fire() - if(maxvotes > curvotes) - if(world.time > targettime) - SSvote.initiate_vote("transfer",null) //TODO figure out how to not use null as the user - targettime = targettime + voteinterval - curvotes += 1 + if(world.time < targettime) + return + if(maxvotes == NO_MAXVOTES_CAP || maxvotes > curvotes) + SSvote.initiate_vote("transfer","server") + targettime = targettime + voteinterval + curvotes++ else SSshuttle.autoEnd() + +#undef NO_MAXVOTES_CAP \ No newline at end of file diff --git a/code/controllers/subsystem/dcs.dm b/code/controllers/subsystem/dcs.dm index faf95fd319..8b068e5d67 100644 --- a/code/controllers/subsystem/dcs.dm +++ b/code/controllers/subsystem/dcs.dm @@ -1,27 +1,53 @@ PROCESSING_SUBSYSTEM_DEF(dcs) name = "Datum Component System" flags = SS_NO_INIT + var/list/elements_by_type = list() /datum/controller/subsystem/processing/dcs/Recover() comp_lookup = SSdcs.comp_lookup -/datum/controller/subsystem/processing/dcs/proc/GetElement(datum/element/eletype, ...) +/datum/controller/subsystem/processing/dcs/proc/GetElement(list/arguments) + var/datum/element/eletype = arguments[1] var/element_id = eletype + if(!ispath(eletype, /datum/element)) + CRASH("Attempted to instantiate [eletype] as a /datum/element") + if(initial(eletype.element_flags) & ELEMENT_BESPOKE) - var/list/fullid = list("[eletype]") - for(var/i in initial(eletype.id_arg_index) to length(args)) - var/argument = args[i] - if(istext(argument) || isnum(argument)) - fullid += "[argument]" - else - fullid += "[REF(argument)]" - element_id = fullid.Join("&") + element_id = GetIdFromArguments(arguments) . = elements_by_type[element_id] if(.) return - if(!ispath(eletype, /datum/element)) - CRASH("Attempted to instantiate [eletype] as a /datum/element") - . = elements_by_type[element_id] = new eletype \ No newline at end of file + . = elements_by_type[element_id] = new eletype + +/**** + * Generates an id for bespoke elements when given the argument list + * Generating the id here is a bit complex because we need to support named arguments + * Named arguments can appear in any order and we need them to appear after ordered arguments + * We assume that no one will pass in a named argument with a value of null + **/ +/datum/controller/subsystem/processing/dcs/proc/GetIdFromArguments(list/arguments) + var/datum/element/eletype = arguments[1] + var/list/fullid = list("[eletype]") + var/list/named_arguments = list() + for(var/i in initial(eletype.id_arg_index) to length(arguments)) + var/key = arguments[i] + var/value + if(istext(key)) + value = arguments[key] + if(!(istext(key) || isnum(key))) + key = REF(key) + key = "[key]" // Key is stringified so numbers dont break things + if(!isnull(value)) + if(!(istext(value) || isnum(value))) + value = REF(value) + named_arguments["[key]"] = value + else + fullid += "[key]" + + if(length(named_arguments)) + named_arguments = sortList(named_arguments) + fullid += named_arguments + return list2params(fullid) diff --git a/code/controllers/subsystem/minimaps.dm b/code/controllers/subsystem/minimaps.dm new file mode 100644 index 0000000000..75de71ca96 --- /dev/null +++ b/code/controllers/subsystem/minimaps.dm @@ -0,0 +1,20 @@ +SUBSYSTEM_DEF(minimaps) + name = "Minimaps" + flags = SS_NO_FIRE + var/list/station_minimaps + var/datum/minimap_group/station_minimap + +/datum/controller/subsystem/minimaps/Initialize() + if(!CONFIG_GET(flag/minimaps_enabled)) + to_chat(world, "Minimaps disabled! Skipping init.") + return ..() + build_minimaps() + return ..() + +/datum/controller/subsystem/minimaps/proc/build_minimaps() + station_minimaps = list() + for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION)) + var/datum/space_level/SL = SSmapping.get_level(z) + var/name = (SL.name == initial(SL.name))? "[z] - Station" : "[z] - [SL.name]" + station_minimaps += new /datum/minimap(z, name = name) + station_minimap = new(station_minimaps, "Station") diff --git a/code/controllers/subsystem/processing/quirks.dm b/code/controllers/subsystem/processing/quirks.dm index 10655981e5..5aeaf43bab 100644 --- a/code/controllers/subsystem/processing/quirks.dm +++ b/code/controllers/subsystem/processing/quirks.dm @@ -85,7 +85,7 @@ PROCESSING_SUBSYSTEM_DEF(quirks) our_quirks -= i cut += i pointscut += quirk_points_by_name(i) - if (pointscut >= 0) //with how it works, it needs to be above zero, not below, as points for positive is positive, and negative is negative, we only want it to break if it's above zero, ie. we cut more positive than negative + if (pointscut >= 0) break /* //Code to automatically reduce positive quirks until balance is even. var/points_used = total_points(our_quirks) @@ -102,7 +102,7 @@ PROCESSING_SUBSYSTEM_DEF(quirks) */ //Nah, let's null all non-neutrals out. - if (pointscut != 0)// only if the pointscutting didn't work. + if (pointscut < 0)// only if the pointscutting didn't work. if(cut.len) for(var/i in our_quirks) if(quirk_points_by_name(i) != 0) diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 20e0d647c5..e7e5754f6b 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -89,20 +89,6 @@ SUBSYSTEM_DEF(vote) choices[GLOB.master_mode] += non_voters.len if(choices[GLOB.master_mode] >= greatest_votes) greatest_votes = choices[GLOB.master_mode] - else if(mode == "transfer") // austation begin -- Crew autotransfer vote - var/factor = 1 - switch(world.time / (1 MINUTES)) - if(0 to 60) - factor = 0.5 - if(61 to 120) - factor = 0.8 - if(121 to 240) - factor = 1 - if(241 to 300) - factor = 1.2 - else - factor = 1.4 - choices["Initiate Crew Transfer"] += round(non_voters.len * factor) // austation end //get all options with that many votes and return them in a list . = list() if(greatest_votes) @@ -370,7 +356,7 @@ SUBSYSTEM_DEF(vote) var/list/runnable_storytellers = config.get_runnable_storytellers() for(var/T in runnable_storytellers) var/datum/dynamic_storyteller/S = T - runnable_storytellers[S] *= stored_gamemode_votes[initial(S.name)] + runnable_storytellers[S] *= round(stored_gamemode_votes[initial(S.name)]*100000,1) var/datum/dynamic_storyteller/S = pickweightAllowZero(runnable_storytellers) GLOB.dynamic_storyteller_type = S if("map") @@ -457,7 +443,7 @@ SUBSYSTEM_DEF(vote) var/admin = FALSE var/ckey = ckey(initiator_key) - if(GLOB.admin_datums[ckey]) + if(GLOB.admin_datums[ckey] || initiator_key == "server") admin = TRUE if(next_allowed_time > world.time && !admin) diff --git a/code/datums/components/README.md b/code/datums/components/README.md index 05ce057721..509630bb0a 100644 --- a/code/datums/components/README.md +++ b/code/datums/components/README.md @@ -4,132 +4,6 @@ Loosely adapted from /vg/. This is an entity component system for adding behaviours to datums when inheritance doesn't quite cut it. By using signals and events instead of direct inheritance, you can inject behaviours without hacky overloads. It requires a different method of thinking, but is not hard to use correctly. If a behaviour can have application across more than one thing. Make it generic, make it a component. Atom/mob/obj event? Give it a signal, and forward it's arguments with a `SendSignal()` call. Now every component that want's to can also know about this happening. -### In the code +See [this thread](https://tgstation13.org/phpBB/viewtopic.php?f=5&t=22674) for an introduction to the system as a whole. -#### Slippery things - -At the time of this writing, every object that is slippery overrides atom/Crossed does some checks, then slips the mob. Instead of all those Crossed overrides they could add a slippery component to all these objects. And have the checks in one proc that is run by the Crossed event - -#### Powercells - -A lot of objects have powercells. The `get_cell()` proc was added to give generic access to the cell var if it had one. This is just a specific use case of `GetComponent()` - -#### Radios - -The radio object as it is should not exist, given that more things use the _concept_ of radios rather than the object itself. The actual function of the radio can exist in a component which all the things that use it (Request consoles, actual radios, the SM shard) can add to themselves. - -#### Standos - -Stands have a lot of procs which mimic mob procs. Rather than inserting hooks for all these procs in overrides, the same can be accomplished with signals - -## API - -### Defines - -1. `COMPONENT_INCOMPATIBLE` Return this from `/datum/component/Initialize` or `datum/component/OnTransfer` to have the component be deleted if it's applied to an incorrect type. `parent` must not be modified if this is to be returned. This will be noted in the runtime logs - -### Vars - -1. `/datum/var/list/datum_components` (private) - * Lazy associated list of type -> component/list of components. -1. `/datum/var/list/comp_lookup` (private) - * Lazy associated list of signal -> registree/list of registrees -1. `/datum/var/list/signal_procs` (private) - * Associated lazy list of signals -> `/datum/callback`s that will be run when the parent datum receives that signal -1. `/datum/var/signal_enabled` (protected, boolean) - * If the datum is signal enabled. If not, it will not react to signals - * `FALSE` by default, set to `TRUE` when a signal is registered -1. `/datum/component/var/dupe_mode` (protected, enum) - * How duplicate component types are handled when added to the datum. - * `COMPONENT_DUPE_HIGHLANDER` (default): Old component will be deleted, new component will first have `/datum/component/proc/InheritComponent(datum/component/old, FALSE)` on it - * `COMPONENT_DUPE_ALLOWED`: The components will be treated as separate, `GetComponent()` will return the first added - * `COMPONENT_DUPE_UNIQUE`: New component will be deleted, old component will first have `/datum/component/proc/InheritComponent(datum/component/new, TRUE)` on it - * `COMPONENT_DUPE_UNIQUE_PASSARGS`: New component will never exist and instead its initialization arguments will be passed on to the old component. -1. `/datum/component/var/dupe_type` (protected, type) - * Definition of a duplicate component type - * `null` means exact match on `type` (default) - * Any other type means that and all subtypes -1. `/datum/component/var/datum/parent` (protected, read-only) - * The datum this component belongs to - * Never `null` in child procs -1. `report_signal_origin` (protected, boolean) - * If `TRUE`, will invoke the callback when signalled with the signal type as the first argument. - * `FALSE` by default. - -### Procs - -1. `/datum/proc/GetComponent(component_type(type)) -> datum/component?` (public, final) - * Returns a reference to a component of component_type if it exists in the datum, null otherwise -1. `/datum/proc/GetComponents(component_type(type)) -> list` (public, final) - * Returns a list of references to all components of component_type that exist in the datum -1. `/datum/proc/GetExactComponent(component_type(type)) -> datum/component?` (public, final) - * Returns a reference to a component whose type MATCHES component_type if that component exists in the datum, null otherwise -1. `GET_COMPONENT(varname, component_type)` OR `GET_COMPONENT_FROM(varname, component_type, src)` - * Shorthand for `var/component_type/varname = src.GetComponent(component_type)` -1. `SEND_SIGNAL(target, sigtype, ...)` (public, final) - * Use to send signals to target datum - * Extra arguments are to be specified in the signal definition - * Returns a bitflag with signal specific information assembled from all activated components - * Arguments are packaged in a list and handed off to _SendSignal() -1. `/datum/proc/AddComponent(component_type(type), ...) -> datum/component` (public, final) - * Creates an instance of `component_type` in the datum and passes `...` to its `Initialize()` call - * Sends the `COMSIG_COMPONENT_ADDED` signal to the datum - * All components a datum owns are deleted with the datum - * Returns the component that was created. Or the old component in a dupe situation where `COMPONENT_DUPE_UNIQUE` was set - * If this tries to add an component to an incompatible type, the component will be deleted and the result will be `null`. This is very unperformant, try not to do it - * Properly handles duplicate situations based on the `dupe_mode` var -1. `/datum/proc/LoadComponent(component_type(type), ...) -> datum/component` (public, final) - * Equivalent to calling `GetComponent(component_type)` where, if the result would be `null`, returns `AddComponent(component_type, ...)` instead -1. `/datum/proc/ComponentActivated(datum/component/C)` (abstract, async) - * Called on a component's `parent` after a signal received causes it to activate. `src` is the parameter - * Will only be called if a component's callback returns `TRUE` -1. `/datum/proc/TakeComponent(datum/component/C)` (public, final) - * Properly transfers ownership of a component from one datum to another - * Signals `COMSIG_COMPONENT_REMOVING` on the parent - * Called on the datum you want to own the component with another datum's component -1. `/datum/proc/_SendSignal(signal, list/arguments)` (private, final) - * Handles most of the actual signaling procedure - * Will runtime if used on datums with an empty component list -1. `/datum/proc/RegisterSignal(datum/target, signal(string/list of strings), proc_ref(type), override(boolean))` (protected, final) - * If signal is a list it will be as if RegisterSignal was called for each of the entries with the same following arguments - * Makes the datum listen for the specified `signal` on it's `parent` datum. - * When that signal is received `proc_ref` will be called on the component, along with associated arguments - * Example proc ref: `.proc/OnEvent` - * If a previous registration is overwritten by the call, a runtime occurs. Setting `override` to TRUE prevents this - * These callbacks run asyncronously - * Returning `TRUE` from these callbacks will trigger a `TRUE` return from the `SendSignal()` that initiated it -1. `/datum/component/New(datum/parent, ...)` (private, final) - * Runs internal setup for the component - * Extra arguments are passed to `Initialize()` -1. `/datum/component/Initialize(...)` (abstract, no-sleep) - * Called by `New()` with the same argments excluding `parent` - * Component does not exist in `parent`'s `datum_components` list yet, although `parent` is set and may be used - * Signals will not be received while this function is running - * Component may be deleted after this function completes without being attached - * Do not call `qdel(src)` from this function -1. `/datum/component/Destroy(force(bool), silent(bool))` (virtual, no-sleep) - * Sends the `COMSIG_COMPONENT_REMOVING` signal to the parent datum if the `parent` isn't being qdeleted - * Properly removes the component from `parent` and cleans up references - * Setting `force` makes it not check for and remove the component from the parent - * Setting `silent` deletes the component without sending a `COMSIG_COMPONENT_REMOVING` signal -1. `/datum/component/proc/InheritComponent(datum/component/C, i_am_original(boolean))` (abstract, no-sleep) - * Called on a component when a component of the same type was added to the same parent - * See `/datum/component/var/dupe_mode` - * `C`'s type will always be the same of the called component -1. `/datum/component/proc/AfterComponentActivated()` (abstract, async) - * Called on a component that was activated after it's `parent`'s `ComponentActivated()` is called -1. `/datum/component/proc/OnTransfer(datum/new_parent)` (abstract, no-sleep) - * Called before `new_parent` is assigned to `parent` in `TakeComponent()` - * Allows the component to react to ownership transfers -1. `/datum/component/proc/_RemoveFromParent()` (private, final) - * Clears `parent` and removes the component from it's component list -1. `/datum/component/proc/_JoinParent` (private, final) - * Tries to add the component to it's `parent`s `datum_components` list -1. `/datum/component/proc/RegisterWithParent` (abstract, no-sleep) - * Used to register the signals that should be on the `parent` object - * Use this if you plan on the component transfering between parents -1. `/datum/component/proc/UnregisterFromParent` (abstract, no-sleep) - * Counterpart to `RegisterWithParent()` - * Used to unregister the signals that should only be on the `parent` object - -### See/Define signals and their arguments in __DEFINES\components.dm +### See/Define signals and their arguments in [__DEFINES\components.dm](..\..\__DEFINES\components.dm) diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index 0baf7d7d1b..7f7440daf4 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -1,21 +1,71 @@ +/** + * # Component + * + * The component datum + * + * A component should be a single standalone unit + * of functionality, that works by receiving signals from it's parent + * object to provide some single functionality (i.e a slippery component) + * that makes the object it's attached to cause people to slip over. + * Useful when you want shared behaviour independent of type inheritance + */ /datum/component + /// Defines how duplicate existing components are handled when added to a datum + /// See `COMPONENT_DUPE_*` definitions for available options var/dupe_mode = COMPONENT_DUPE_HIGHLANDER + + /// The type to check for duplication + /// `null` means exact match on `type` (default) + /// Any other type means that and all subtypes var/dupe_type + + /// The datum this components belongs to var/datum/parent - //only set to true if you are able to properly transfer this component - //At a minimum RegisterWithParent and UnregisterFromParent should be used - //Make sure you also implement PostTransfer for any post transfer handling + + /// Only set to true if you are able to properly transfer this component + /// At a minimum RegisterWithParent and UnregisterFromParent should be used + /// Make sure you also implement PostTransfer for any post transfer handling var/can_transfer = FALSE -/datum/component/New(datum/P, ...) - parent = P - var/list/arguments = args.Copy(2) +/** + * Create a new component. + * Additional arguments are passed to `Initialize()` + * + * Arguments: + * * datum/P the parent datum this component reacts to signals from + */ +/datum/component/New(list/raw_args) + parent = raw_args[1] + var/list/arguments = raw_args.Copy(2) if(Initialize(arglist(arguments)) == COMPONENT_INCOMPATIBLE) qdel(src, TRUE, TRUE) - CRASH("Incompatible [type] assigned to a [P.type]! args: [json_encode(arguments)]") + CRASH("Incompatible [type] assigned to a [parent.type]! args: [json_encode(arguments)]") - _JoinParent(P) + _JoinParent(parent) +/** + * Called during component creation with the same arguments as in new excluding parent. + * Do not call `qdel(src)` from this function, `return COMPONENT_INCOMPATIBLE` instead + */ +/datum/component/proc/Initialize(...) + return + +/** + * Properly removes the component from `parent` and cleans up references + * Setting `force` makes it not check for and remove the component from the parent + * Setting `silent` deletes the component without sending a `COMSIG_COMPONENT_REMOVING` signal + */ +/datum/component/Destroy(force=FALSE, silent=FALSE) + if(!force && parent) + _RemoveFromParent() + if(!silent) + SEND_SIGNAL(parent, COMSIG_COMPONENT_REMOVING, src) + parent = null + return ..() + +/** + * Internal proc to handle behaviour of components when joining a parent + */ /datum/component/proc/_JoinParent() var/datum/P = parent //lazy init the parent's dc list @@ -51,21 +101,9 @@ RegisterWithParent() -// If you want/expect to be moving the component around between parents, use this to register on the parent for signals -/datum/component/proc/RegisterWithParent() - SEND_SIGNAL(src, COMSIG_COMPONENT_REGISTER_PARENT) //CITADEL EDIT - -/datum/component/proc/Initialize(...) - return - -/datum/component/Destroy(force=FALSE, silent=FALSE) - if(!force && parent) - _RemoveFromParent() - if(!silent) - SEND_SIGNAL(parent, COMSIG_COMPONENT_REMOVING, src) - parent = null - return ..() - +/** + * Internal proc to handle behaviour when being removed from a parent + */ /datum/component/proc/_RemoveFromParent() var/datum/P = parent var/list/dc = P.datum_components @@ -84,9 +122,38 @@ UnregisterFromParent() -/datum/component/proc/UnregisterFromParent() - SEND_SIGNAL(src, COMSIG_COMPONENT_UNREGISTER_PARENT) //CITADEL EDIT +/** + * Register the component with the parent object + * + * Use this proc to register with your parent object + * Overridable proc that's called when added to a new parent + */ +/datum/component/proc/RegisterWithParent() + return +/** + * Unregister from our parent object + * + * Use this proc to unregister from your parent object + * Overridable proc that's called when removed from a parent + * * + */ +/datum/component/proc/UnregisterFromParent() + return + +/** + * Register to listen for a signal from the passed in target + * + * This sets up a listening relationship such that when the target object emits a signal + * the source datum this proc is called upon, will recieve a callback to the given proctype + * Return values from procs registered must be a bitfield + * + * Arguments: + * * datum/target The target to listen for signals from + * * sig_type_or_types Either a string signal name, or a list of signal names (strings) + * * proctype The proc to call back when the signal is emitted + * * override If a previous registration exists you must explicitly set this + */ /datum/proc/RegisterSignal(datum/target, sig_type_or_types, proctype, override = FALSE) if(QDELETED(src) || QDELETED(target)) return @@ -119,6 +186,16 @@ signal_enabled = TRUE +/** + * Stop listening to a given signal from target + * + * Breaks the relationship between target and source datum, removing the callback when the signal fires + * Doesn't care if a registration exists or not + * + * Arguments: + * * datum/target Datum to stop listening to signals from + * * sig_typeor_types Signal string key or list of signal keys to stop listening to specifically + */ /datum/proc/UnregisterSignal(datum/target, sig_type_or_types) var/list/lookup = target.comp_lookup if(!signal_procs || !signal_procs[target] || !lookup) @@ -126,6 +203,8 @@ if(!islist(sig_type_or_types)) sig_type_or_types = list(sig_type_or_types) for(var/sig in sig_type_or_types) + if(!signal_procs[target][sig]) + continue switch(length(lookup[sig])) if(2) lookup[sig] = (lookup[sig]-src)[1] @@ -148,15 +227,47 @@ if(!signal_procs[target].len) signal_procs -= target +/** + * Called on a component when a component of the same type was added to the same parent + * See `/datum/component/var/dupe_mode` + * `C`'s type will always be the same of the called component + */ /datum/component/proc/InheritComponent(datum/component/C, i_am_original) return + +/** + * Called on a component when a component of the same type was added to the same parent with COMPONENT_DUPE_SELECTIVE + * See `/datum/component/var/dupe_mode` + * `C`'s type will always be the same of the called component + * return TRUE if you are absorbing the component, otherwise FALSE if you are fine having it exist as a duplicate component + */ +/datum/component/proc/CheckDupeComponent(datum/component/C, ...) + return + + +/** + * Callback Just before this component is transferred + * + * Use this to do any special cleanup you might need to do before being deregged from an object + * + */ /datum/component/proc/PreTransfer() return +/** + * Callback Just after a component is transferred + * + * Use this to do any special setup you need to do after being moved to a new object + * Do not call `qdel(src)` from this function, `return COMPONENT_INCOMPATIBLE` instead + * + */ /datum/component/proc/PostTransfer() return COMPONENT_INCOMPATIBLE //Do not support transfer by default as you must properly support it +/** + * Internal proc to create a list of our type and all parent types + */ /datum/component/proc/_GetInverseTypeList(our_type = type) //we can do this one simple trick var/current_type = parent_type @@ -166,6 +277,11 @@ current_type = type2parent(current_type) . += current_type +/** + * Internal proc to handle most all of the signaling procedure + * Will runtime if used on datums with an empty component list + * Use the `SEND_SIGNAL` define instead + */ /datum/proc/_SendSignal(sigtype, list/arguments) var/target = comp_lookup[sigtype] if(!length(target)) @@ -183,9 +299,16 @@ . |= CallAsync(C, proctype, arguments) // The type arg is casted so initial works, you shouldn't be passing a real instance into this +/** + * Return any component assigned to this datum of the given type + * This will throw an error if it's possible to have more than one component of that type on the parent + * + * Arguments: + * * datum/component/c_type The typepath of the component you want to get a reference to + */ /datum/proc/GetComponent(datum/component/c_type) RETURN_TYPE(c_type) - if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED) + if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED || initial(c_type.dupe_mode) == COMPONENT_DUPE_SELECTIVE) stack_trace("GetComponent was called to get a component of which multiple copies could be on an object. This can easily break and should be changed. Type: \[[c_type]\]") var/list/dc = datum_components if(!dc) @@ -194,7 +317,18 @@ if(length(.)) return .[1] -/datum/proc/GetExactComponent(c_type) +// The type arg is casted so initial works, you shouldn't be passing a real instance into this +/** + * Return any component assigned to this datum of the exact given type + * This will throw an error if it's possible to have more than one component of that type on the parent + * + * Arguments: + * * datum/component/c_type The typepath of the component you want to get a reference to + */ +/datum/proc/GetExactComponent(datum/component/c_type) + RETURN_TYPE(c_type) + if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED || initial(c_type.dupe_mode) == COMPONENT_DUPE_SELECTIVE) + stack_trace("GetComponent was called to get a component of which multiple copies could be on an object. This can easily break and should be changed. Type: \[[c_type]\]") var/list/dc = datum_components if(!dc) return null @@ -206,6 +340,12 @@ return C return null +/** + * Get all components of a given type that are attached to this datum + * + * Arguments: + * * c_type The component type path + */ /datum/proc/GetComponents(c_type) var/list/dc = datum_components if(!dc) @@ -214,7 +354,15 @@ if(!length(.)) return list(.) -/datum/proc/AddComponent(new_type, ...) +/** + * Creates an instance of `new_type` in the datum and attaches to it as parent + * Sends the `COMSIG_COMPONENT_ADDED` signal to the datum + * Returns the component that was created. Or the old component in a dupe situation where `COMPONENT_DUPE_UNIQUE` was set + * If this tries to add an component to an incompatible type, the component will be deleted and the result will be `null`. This is very unperformant, try not to do it + * Properly handles duplicate situations based on the `dupe_mode` var + */ +/datum/proc/_AddComponent(list/raw_args) + var/new_type = raw_args[1] var/datum/component/nt = new_type var/dm = initial(nt.dupe_mode) var/dt = initial(nt.dupe_type) @@ -229,7 +377,7 @@ new_comp = nt nt = new_comp.type - args[1] = src + raw_args[1] = src if(dm != COMPONENT_DUPE_ALLOWED) if(!dt) @@ -240,37 +388,62 @@ switch(dm) if(COMPONENT_DUPE_UNIQUE) if(!new_comp) - new_comp = new nt(arglist(args)) + new_comp = new nt(raw_args) if(!QDELETED(new_comp)) old_comp.InheritComponent(new_comp, TRUE) QDEL_NULL(new_comp) if(COMPONENT_DUPE_HIGHLANDER) if(!new_comp) - new_comp = new nt(arglist(args)) + new_comp = new nt(raw_args) if(!QDELETED(new_comp)) new_comp.InheritComponent(old_comp, FALSE) QDEL_NULL(old_comp) if(COMPONENT_DUPE_UNIQUE_PASSARGS) if(!new_comp) - var/list/arguments = args.Copy(2) - old_comp.InheritComponent(null, TRUE, arguments) + var/list/arguments = raw_args.Copy(2) + arguments.Insert(1, null, TRUE) + old_comp.InheritComponent(arglist(arguments)) else old_comp.InheritComponent(new_comp, TRUE) + if(COMPONENT_DUPE_SELECTIVE) + var/list/arguments = raw_args.Copy() + arguments[1] = new_comp + var/make_new_component = TRUE + for(var/i in GetComponents(new_type)) + var/datum/component/C = i + if(C.CheckDupeComponent(arglist(arguments))) + make_new_component = FALSE + QDEL_NULL(new_comp) + break + if(!new_comp && make_new_component) + new_comp = new nt(raw_args) else if(!new_comp) - new_comp = new nt(arglist(args)) // There's a valid dupe mode but there's no old component, act like normal + new_comp = new nt(raw_args) // There's a valid dupe mode but there's no old component, act like normal else if(!new_comp) - new_comp = new nt(arglist(args)) // Dupes are allowed, act like normal + new_comp = new nt(raw_args) // Dupes are allowed, act like normal if(!old_comp && !QDELETED(new_comp)) // Nothing related to duplicate components happened and the new component is healthy SEND_SIGNAL(src, COMSIG_COMPONENT_ADDED, new_comp) return new_comp return old_comp +/** + * Get existing component of type, or create it and return a reference to it + * + * Use this if the item needs to exist at the time of this call, but may not have been created before now + * + * Arguments: + * * component_type The typepath of the component to create or return + * * ... additional arguments to be passed when creating the component if it does not exist + */ /datum/proc/LoadComponent(component_type, ...) . = GetComponent(component_type) if(!.) - return AddComponent(arglist(args)) + return _AddComponent(args) +/** + * Removes the component from parent, ends up with a null parent + */ /datum/component/proc/RemoveComponent() if(!parent) return @@ -280,6 +453,14 @@ parent = null SEND_SIGNAL(old_parent, COMSIG_COMPONENT_REMOVING, src) +/** + * Transfer this component to another parent + * + * Component is taken from source datum + * + * Arguments: + * * datum/component/target Target datum to transfer to + */ /datum/proc/TakeComponent(datum/component/target) if(!target || target.parent == src) return @@ -296,6 +477,14 @@ if(target == AddComponent(target)) target._JoinParent() +/** + * Transfer all components to target + * + * All components from source datum are taken + * + * Arguments: + * * /datum/target the target to move the components to + */ /datum/proc/TransferComponents(datum/target) var/list/dc = datum_components if(!dc) @@ -310,5 +499,8 @@ if(C.can_transfer) target.TakeComponent(comps) +/** + * Return the object that is the host of any UI's that this component has + */ /datum/component/ui_host() return parent diff --git a/code/datums/components/fantasy/_fantasy.dm b/code/datums/components/fantasy/_fantasy.dm index 9e8493b6f4..a203264fae 100644 --- a/code/datums/components/fantasy/_fantasy.dm +++ b/code/datums/components/fantasy/_fantasy.dm @@ -30,26 +30,23 @@ return ..() /datum/component/fantasy/RegisterWithParent() - . = ..() var/obj/item/master = parent originalName = master.name modify() /datum/component/fantasy/UnregisterFromParent() - . = ..() unmodify() -/datum/component/fantasy/InheritComponent(datum/component/fantasy/newComp, original, list/arguments) +/datum/component/fantasy/InheritComponent(datum/component/fantasy/newComp, original, quality, list/affixes, canFail, announce) unmodify() if(newComp) - quality += newComp.quality - canFail = newComp.canFail - announce = newComp.announce + src.quality += newComp.quality + src.canFail = newComp.canFail + src.announce = newComp.announce else - arguments.len = 5 // This is done to replicate what happens when an arglist smaller than the necessary arguments is given - quality += arguments[1] - canFail = arguments[4] || canFail - announce = arguments[5] || announce + src.quality += quality + src.canFail = canFail || src.canFail + src.announce = announce || src.announce modify() /datum/component/fantasy/proc/randomQuality() diff --git a/code/datums/components/nanites.dm b/code/datums/components/nanites.dm index 49b2e437d4..7aacb745b6 100644 --- a/code/datums/components/nanites.dm +++ b/code/datums/components/nanites.dm @@ -101,11 +101,11 @@ host_mob = null return ..() -/datum/component/nanites/InheritComponent(datum/component/nanites/new_nanites, i_am_original, list/arguments) +/datum/component/nanites/InheritComponent(datum/component/nanites/new_nanites, i_am_original, amount, cloud) if(new_nanites) adjust_nanites(null, new_nanites.nanite_volume) else - adjust_nanites(null, arguments[1]) //just add to the nanite volume + adjust_nanites(null, amount) //just add to the nanite volume /datum/component/nanites/process() adjust_nanites(null, regen_rate) diff --git a/code/datums/components/orbiter.dm b/code/datums/components/orbiter.dm index 05174c196b..2be22d01e5 100644 --- a/code/datums/components/orbiter.dm +++ b/code/datums/components/orbiter.dm @@ -41,9 +41,9 @@ orbiters = null return ..() -/datum/component/orbiter/InheritComponent(datum/component/orbiter/newcomp, original, list/arguments) - if(arguments) - begin_orbit(arglist(arguments)) +/datum/component/orbiter/InheritComponent(datum/component/orbiter/newcomp, original, atom/movable/orbiter, radius, clockwise, rotation_speed, rotation_segments, pre_rotation) + if(!newcomp) + begin_orbit(arglist(args.Copy(3))) return // The following only happens on component transfers orbiters += newcomp.orbiters diff --git a/code/datums/components/radioactive.dm b/code/datums/components/radioactive.dm index 240eed7747..2853f800f5 100644 --- a/code/datums/components/radioactive.dm +++ b/code/datums/components/radioactive.dm @@ -47,7 +47,7 @@ if(strength <= RAD_BACKGROUND_RADIATION) return PROCESS_KILL -/datum/component/radioactive/InheritComponent(datum/component/C, i_am_original, list/arguments) +/datum/component/radioactive/InheritComponent(datum/component/C, i_am_original, _strength, _source, _half_life, _can_contaminate) if(!i_am_original) return if(!hl3_release_date) // Permanently radioactive things don't get to grow stronger @@ -56,7 +56,7 @@ var/datum/component/radioactive/other = C strength = max(strength, other.strength) else - strength = max(strength, arguments[1]) + strength = max(strength, _strength) /datum/component/radioactive/proc/rad_examine(datum/source, mob/user, list/examine_list) var/atom/master = parent diff --git a/code/datums/components/remote_materials.dm b/code/datums/components/remote_materials.dm index 245e89bd0c..ca62a70ee5 100644 --- a/code/datums/components/remote_materials.dm +++ b/code/datums/components/remote_materials.dm @@ -53,11 +53,21 @@ handles linking back and forth. /datum/component/remote_materials/proc/_MakeLocal() silo = null - mat_container = parent.AddComponent(/datum/component/material_container, - list(/datum/material/iron, /datum/material/glass, /datum/material/silver, /datum/material/gold, /datum/material/diamond, /datum/material/plasma, /datum/material/uranium, /datum/material/bananium, /datum/material/titanium, /datum/material/bluespace, /datum/material/plastic), - local_size, - FALSE, - /obj/item/stack) + var/static/list/allowed_mats = list( + /datum/material/iron, + /datum/material/glass, + /datum/material/silver, + /datum/material/gold, + /datum/material/diamond, + /datum/material/plasma, + /datum/material/uranium, + /datum/material/bananium, + /datum/material/titanium, + /datum/material/bluespace, + /datum/material/plastic, + ) + + mat_container = parent.AddComponent(/datum/component/material_container, allowed_mats, local_size, allowed_types=/obj/item/stack) /datum/component/remote_materials/proc/set_local_size(size) local_size = size diff --git a/code/datums/components/riding.dm b/code/datums/components/riding.dm index 750120976f..e7f25a7724 100644 --- a/code/datums/components/riding.dm +++ b/code/datums/components/riding.dm @@ -341,7 +341,7 @@ var/mob/living/parent var/selfdeleting = FALSE -/obj/item/riding_offhand/dropped() +/obj/item/riding_offhand/dropped(mob/user) selfdeleting = TRUE . = ..() diff --git a/code/datums/components/stationloving.dm b/code/datums/components/stationloving.dm index 91928656e1..13267e74c3 100644 --- a/code/datums/components/stationloving.dm +++ b/code/datums/components/stationloving.dm @@ -15,13 +15,13 @@ src.allow_death = allow_death check_in_bounds() // Just in case something is being created outside of station/centcom -/datum/component/stationloving/InheritComponent(datum/component/stationloving/newc, original, list/arguments) +/datum/component/stationloving/InheritComponent(datum/component/stationloving/newc, original, inform_admins, allow_death) if (original) - if (istype(newc)) + if (newc) inform_admins = newc.inform_admins allow_death = newc.allow_death - else if (LAZYLEN(arguments)) - inform_admins = arguments[1] + else + inform_admins = inform_admins /datum/component/stationloving/proc/relocate() var/targetturf = find_safe_turf() diff --git a/code/datums/components/thermite.dm b/code/datums/components/thermite.dm index 916b3ed3b2..53323f1e3f 100644 --- a/code/datums/components/thermite.dm +++ b/code/datums/components/thermite.dm @@ -43,13 +43,13 @@ master.cut_overlay(overlay) return ..() -/datum/component/thermite/InheritComponent(datum/component/thermite/newC, i_am_original, list/arguments) +/datum/component/thermite/InheritComponent(datum/component/thermite/newC, i_am_original, _amount) if(!i_am_original) return if(newC) amount += newC.amount else - amount += arguments[1] + amount += _amount /datum/component/thermite/proc/thermite_melt(mob/user) var/turf/master = parent diff --git a/code/datums/components/uplink.dm b/code/datums/components/uplink.dm index a8e03946b6..e73465d785 100644 --- a/code/datums/components/uplink.dm +++ b/code/datums/components/uplink.dm @@ -28,7 +28,7 @@ GLOBAL_LIST_EMPTY(uplinks) var/compact_mode = FALSE var/debug = FALSE -/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20, datum/ui_state/_checkstate) +/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20, datum/ui_state/_checkstate, datum/traitor_class/traitor_class) if(!isitem(parent)) return COMPONENT_INCOMPATIBLE @@ -47,7 +47,11 @@ GLOBAL_LIST_EMPTY(uplinks) RegisterSignal(parent, COMSIG_PEN_ROTATED, .proc/pen_rotation) GLOB.uplinks += src - uplink_items = get_uplink_items(gamemode, TRUE, allow_restricted) + var/list/filters = list() + if(istype(traitor_class)) + filters = traitor_class.uplink_filters + starting_tc = traitor_class.TC + uplink_items = get_uplink_items(gamemode, TRUE, allow_restricted, filters) if(_owner) owner = _owner diff --git a/code/datums/components/wet_floor.dm b/code/datums/components/wet_floor.dm index 550ff95324..20f2c1bbb5 100644 --- a/code/datums/components/wet_floor.dm +++ b/code/datums/components/wet_floor.dm @@ -12,9 +12,9 @@ var/permanent = FALSE var/last_process = 0 -/datum/component/wet_floor/InheritComponent(datum/newcomp, orig, argslist) +/datum/component/wet_floor/InheritComponent(datum/newcomp, orig, strength, duration_minimum, duration_add, duration_maximum, _permanent) if(!newcomp) //We are getting passed the arguments of a would-be new component, but not a new component - add_wet(arglist(argslist)) + add_wet(arglist(args.Copy(3))) else //We are being passed in a full blown component var/datum/component/wet_floor/WF = newcomp //Lets make an assumption if(WF.gc()) //See if it's even valid, still. Also does LAZYLEN and stuff for us. diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 1622cc9dbf..84ea6b6458 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -287,7 +287,6 @@ G.fields["gender"] = "Other" L.fields["blood_type"] = H.dna.blood_type L.fields["b_dna"] = H.dna.unique_enzymes - L.fields["enzymes"] = H.dna.struc_enzymes L.fields["identity"] = H.dna.uni_identity L.fields["species"] = H.dna.species.type L.fields["features"] = H.dna.features diff --git a/code/datums/datum.dm b/code/datums/datum.dm index 34e4e7ac14..a856f2392d 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -1,12 +1,42 @@ +/** + * The absolute base class for everything + * + * A datum instantiated has no physical world prescence, use an atom if you want something + * that actually lives in the world + * + * Be very mindful about adding variables to this class, they are inherited by every single + * thing in the entire game, and so you can easily cause memory usage to rise a lot with careless + * use of variables at this level + */ /datum + /** + * Tick count time when this object was destroyed. + * + * If this is non zero then the object has been garbage collected and is awaiting either + * a hard del by the GC subsystme, or to be autocollected (if it has no references) + */ var/gc_destroyed //Time when this object was destroyed. - var/list/active_timers //for SStimer - var/list/datum_components //for /datum/components + + /// Active timers with this datum as the target + var/list/active_timers + /// Status traits attached to this datum var/list/status_traits + /// Components attached to this datum + /// Lazy associated list in the structure of `type:component/list of components` + var/list/datum_components + /// Any datum registered to receive signals from this datum is in this list + /// Lazy associated list in the structure of `signal:registree/list of registrees` var/list/comp_lookup //it used to be for looking up components which had registered a signal but now anything can register + /// Lazy associated list in the structure of `signals:proctype` that are run when the datum receives that signal var/list/list/datum/callback/signal_procs + /// Is this datum capable of sending signals? + /// Set to true when a signal has been registered var/signal_enabled = FALSE + + /// Datum level flags var/datum_flags = NONE + + /// A weak reference to another datum var/datum/weakref/weak_reference #ifdef TESTING @@ -18,9 +48,22 @@ var/list/cached_vars #endif -// Default implementation of clean-up code. -// This should be overridden to remove all references pointing to the object being destroyed. -// Return the appropriate QDEL_HINT; in most cases this is QDEL_HINT_QUEUE. +/** + * Default implementation of clean-up code. + * + * This should be overridden to remove all references pointing to the object being destroyed, if + * you do override it, make sure to call the parent and return it's return value by default + * + * Return an appropriate QDEL_HINT to modify handling of your deletion; + * in most cases this is QDEL_HINT_QUEUE. + * + * The base case is responsible for doing the following + * * Erasing timers pointing to this datum + * * Erasing compenents on this datum + * * Notifying datums listening to signals from this datum that we are going away + * + * Returns QDEL_HINT_QUEUE + */ /datum/proc/Destroy(force=FALSE, ...) tag = null datum_flags &= ~DF_USE_TAG //In case something tries to REF us diff --git a/code/datums/diseases/advance/symptoms/genetics.dm b/code/datums/diseases/advance/symptoms/genetics.dm index f6780df3fa..9f19de7244 100644 --- a/code/datums/diseases/advance/symptoms/genetics.dm +++ b/code/datums/diseases/advance/symptoms/genetics.dm @@ -61,12 +61,12 @@ Bonus symptom_delay_max = 60 if(A.properties["resistance"] >= 8) //mutate twice power = 2 - possible_mutations = (GLOB.bad_mutations | GLOB.not_good_mutations) - GLOB.mutations_list[RACEMUT] + possible_mutations = (GLOB.bad_mutations | GLOB.not_good_mutations) - GLOB.all_mutations[RACEMUT] var/mob/living/carbon/M = A.affected_mob if(M) if(!M.has_dna()) return - archived_dna = M.dna.struc_enzymes + archived_dna = M.dna.mutation_index // Give them back their old DNA when cured. /datum/symptom/genetic_mutation/End(datum/disease/advance/A) @@ -77,5 +77,5 @@ Bonus if(M && archived_dna) if(!M.has_dna()) return - M.dna.struc_enzymes = archived_dna + M.dna.mutation_index = archived_dna M.domutcheck() diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm index 84d652b77d..59afe163b4 100644 --- a/code/datums/diseases/advance/symptoms/heal.dm +++ b/code/datums/diseases/advance/symptoms/heal.dm @@ -257,6 +257,8 @@ /datum/symptom/heal/coma/End(datum/disease/advance/A) if(!..()) return + if(active_coma) + uncoma() REMOVE_TRAIT(A.affected_mob, TRAIT_NOCRITDAMAGE, DISEASE_TRAIT) /datum/symptom/heal/coma/CanHeal(datum/disease/advance/A) @@ -277,7 +279,7 @@ /datum/symptom/heal/coma/proc/coma(mob/living/M) if(deathgasp) M.emote("deathgasp") - M.fakedeath("regenerative_coma") + M.fakedeath("regenerative_coma", TRUE) M.update_stat() M.update_mobility() addtimer(CALLBACK(src, .proc/uncoma, M), 300) diff --git a/code/datums/dna.dm b/code/datums/dna.dm index 2973a44a68..05a6e4f060 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -2,7 +2,6 @@ /////////////////////////// DNA DATUM /datum/dna var/unique_enzymes - var/struc_enzymes var/uni_identity var/blood_type var/datum/species/species = new /datum/species/human //The type of mutant race the player is if applicable (i.e. potato-man) @@ -11,10 +10,13 @@ var/nameless = FALSE var/custom_species //siiiiigh I guess this is important var/list/mutations = list() //All mutations are from now on here - var/list/temporary_mutations = list() //Timers for temporary mutations + var/list/temporary_mutations = list() //Temporary changes to the UE var/list/previous = list() //For temporary name/ui/ue/blood_type modifications var/mob/living/holder var/delete_species = TRUE //Set to FALSE when a body is scanned by a cloner to fix #38875 + var/mutation_index[DNA_MUTATION_BLOCKS] //List of which mutations this carbon has and its assigned block + var/stability = 100 + var/scrambled = FALSE //Did we take something like mutagen? In that case we cant get our genes scanned to instantly cheese all the powers. /datum/dna/New(mob/living/new_holder) if(istype(new_holder)) @@ -42,8 +44,8 @@ destination.dna.unique_enzymes = unique_enzymes destination.dna.uni_identity = uni_identity destination.dna.blood_type = blood_type - destination.dna.features = features.Copy() destination.set_species(species.type, icon_update=0) + destination.dna.features = features.Copy() destination.dna.real_name = real_name destination.dna.nameless = nameless destination.dna.custom_species = custom_species @@ -52,13 +54,13 @@ var/mob/living/carbon/human/H = destination H.give_genitals(TRUE)//This gives the body the genitals of this DNA. Used for any transformations based on DNA if(transfer_SE) - destination.dna.struc_enzymes = struc_enzymes + destination.dna.mutation_index = mutation_index SEND_SIGNAL(destination, COMSIG_CARBON_IDENTITY_TRANSFERRED_TO, src, transfer_SE) /datum/dna/proc/copy_dna(datum/dna/new_dna) new_dna.unique_enzymes = unique_enzymes - new_dna.struc_enzymes = struc_enzymes + new_dna.mutation_index = mutation_index new_dna.uni_identity = uni_identity new_dna.blood_type = blood_type new_dna.features = features.Copy() @@ -68,26 +70,32 @@ new_dna.custom_species = custom_species new_dna.mutations = mutations.Copy() -/datum/dna/proc/add_mutation(mutation_name) - var/datum/mutation/human/HM = GLOB.mutations_list[mutation_name] - HM.on_acquiring(holder) +//See mutation.dm for what 'class' does. 'time' is time till it removes itself in decimals. 0 for no timer +/datum/dna/proc/add_mutation(mutation, class = MUT_OTHER, time) + var/mutation_type = mutation + if(istype(mutation, /datum/mutation/human)) + var/datum/mutation/human/HM = mutation + mutation_type = HM.type + if(get_mutation(mutation_type)) + return + return force_give(new mutation_type (class, time, copymut = mutation)) -/datum/dna/proc/remove_mutation(mutation_name) - var/datum/mutation/human/HM = GLOB.mutations_list[mutation_name] - HM.on_losing(holder) +/datum/dna/proc/remove_mutation(mutation_type) + return force_lose(get_mutation(mutation_type)) -/datum/dna/proc/check_mutation(mutation_name) - var/datum/mutation/human/HM = GLOB.mutations_list[mutation_name] - return mutations.Find(HM) +/datum/dna/proc/check_mutation(mutation_type) + return get_mutation(mutation_type) -/datum/dna/proc/remove_all_mutations() - remove_mutation_group(mutations) +/datum/dna/proc/remove_all_mutations(list/classes = list(MUT_NORMAL, MUT_EXTRA, MUT_OTHER), mutadone = FALSE) + remove_mutation_group(mutations, classes, mutadone) + scrambled = FALSE -/datum/dna/proc/remove_mutation_group(list/group) +/datum/dna/proc/remove_mutation_group(list/group, list/classes = list(MUT_NORMAL, MUT_EXTRA, MUT_OTHER), mutadone = FALSE) if(!group) return for(var/datum/mutation/human/HM in group) - HM.force_lose(holder) + if((HM.class in classes) && !(HM.mutadone_proof && mutadone)) + force_lose(HM) /datum/dna/proc/generate_uni_identity() . = "" @@ -137,19 +145,49 @@ . += random_string(DNA_BLOCK_SIZE,GLOB.hex_characters) return . -/datum/dna/proc/generate_struc_enzymes() - var/list/sorting = new /list(DNA_STRUC_ENZYMES_BLOCKS) - var/result = "" - for(var/datum/mutation/human/A in GLOB.good_mutations + GLOB.bad_mutations + GLOB.not_good_mutations) - if(A.name == RACEMUT && ismonkey(holder)) - sorting[A.dna_block] = num2hex(A.lowest_value + rand(0, 256 * 6), DNA_BLOCK_SIZE) - mutations |= A - else - sorting[A.dna_block] = random_string(DNA_BLOCK_SIZE, list("0","1","2","3","4","5","6")) +/datum/dna/proc/generate_dna_blocks() + var/bonus + if(species && species.inert_mutation) + bonus = GET_INITIALIZED_MUTATION(species.inert_mutation) + var/list/mutations_temp = GLOB.good_mutations + GLOB.bad_mutations + GLOB.not_good_mutations + bonus + if(!LAZYLEN(mutations_temp)) + return + mutation_index.Cut() + shuffle_inplace(mutations_temp) + if(ismonkey(holder)) + mutations |= new RACEMUT(MUT_NORMAL) + mutation_index[RACEMUT] = GET_SEQUENCE(RACEMUT) + else + mutation_index[RACEMUT] = create_sequence(RACEMUT, FALSE) + for(var/i in 2 to DNA_MUTATION_BLOCKS) + var/datum/mutation/human/M = mutations_temp[i] + mutation_index[M.type] = create_sequence(M.type, FALSE,M.difficulty) + shuffle_inplace(mutation_index) - for(var/B in sorting) - result += B - return result +//Used to generate original gene sequences for every mutation +/proc/generate_gene_sequence(length=4) + var/static/list/active_sequences = list("AT","TA","GC","CG") + var/sequence + for(var/i in 1 to length*DNA_SEQUENCE_LENGTH) + sequence += pick(active_sequences) + return sequence + +//Used to create a chipped gene sequence +/proc/create_sequence(mutation, active, difficulty) + if(!difficulty) + var/datum/mutation/human/A = GET_INITIALIZED_MUTATION(mutation) //leaves the possibility to change difficulty mid-round + if(!A) + return + difficulty = A.difficulty + difficulty += rand(-2,4) + var/sequence = GET_SEQUENCE(mutation) + if(active) + return sequence + while(difficulty) + var/randnum = rand(1, length(sequence)) + sequence = copytext(sequence, 1, randnum) + "X" + copytext(sequence, randnum+1, length(sequence)+1) + difficulty-- + return sequence /datum/dna/proc/generate_unique_enzymes() . = "" @@ -202,12 +240,57 @@ if(DNA_TAUR_BLOCK) construct_block(GLOB.taur_list.Find(features["taur"]), GLOB.taur_list.len) +//Please use add_mutation or activate_mutation instead +/datum/dna/proc/force_give(datum/mutation/human/HM) + if(holder && HM) + if(HM.class == MUT_NORMAL) + set_se(1, HM) + . = HM.on_acquiring(holder) + if(.) + qdel(HM) + update_instability() + +//Use remove_mutation instead +/datum/dna/proc/force_lose(datum/mutation/human/HM) + if(holder && (HM in mutations)) + set_se(0, HM) + . = HM.on_losing(holder) + update_instability(FALSE) + return + /datum/dna/proc/is_same_as(datum/dna/D) - if(uni_identity == D.uni_identity && struc_enzymes == D.struc_enzymes && real_name == D.real_name && nameless == D.nameless && custom_species == D.custom_species) + if(uni_identity == D.uni_identity && mutation_index == D.mutation_index && real_name == D.real_name && nameless == D.nameless && custom_species == D.custom_species) if(species.type == D.species.type && features == D.features && blood_type == D.blood_type) return 1 return 0 +/datum/dna/proc/update_instability(alert=TRUE) + stability = 100 + for(var/datum/mutation/human/M in mutations) + if(M.class == MUT_EXTRA) + stability -= M.instability * GET_MUTATION_STABILIZER(M) + if(holder) + var/message + if(alert) + switch(stability) + if(70 to 90) + message = "You shiver." + if(60 to 69) + message = "You feel cold." + if(40 to 59) + message = "You feel sick." + if(20 to 39) + message = "It feels like your skin is moving." + if(1 to 19) + message = "You can feel your cells burning." + if(-INFINITY to 0) + message = "You can feel your DNA exploding, we need to do something fast!" + if(stability <= 0) + holder.apply_status_effect(STATUS_EFFECT_DNA_MELT) + if(message) + to_chat(holder, message) + + //used to update dna UI, UE, and dna.real_name. /datum/dna/proc/update_dna_identity() uni_identity = generate_uni_identity() @@ -218,7 +301,7 @@ blood_type = newblood_type unique_enzymes = generate_unique_enzymes() uni_identity = generate_uni_identity() - struc_enzymes = generate_struc_enzymes() + generate_dna_blocks() features = random_features(species?.id) @@ -233,10 +316,10 @@ /datum/dna/stored/check_mutation(mutation_name) return -/datum/dna/stored/remove_all_mutations() +/datum/dna/stored/remove_all_mutations(list/classes = list(MUT_NORMAL, MUT_EXTRA, MUT_OTHER), mutadone = FALSE) return -/datum/dna/stored/remove_mutation_group(list/group) +/datum/dna/stored/remove_mutation_group(list/group, list/classes = list(MUT_NORMAL, MUT_EXTRA, MUT_OTHER), mutadone = FALSE) return /////////////////////////// DNA MOB-PROCS ////////////////////// @@ -271,6 +354,7 @@ if(icon_update) update_body() update_hair() + update_body_parts() update_mutations_overlay()// no lizard with human hulk overlay please. @@ -281,7 +365,7 @@ return dna -/mob/living/carbon/human/proc/hardset_dna(ui, se, newreal_name, newblood_type, datum/species/mrace, newfeatures) +/mob/living/carbon/human/proc/hardset_dna(ui, list/mutation_index, newreal_name, newblood_type, datum/species/mrace, newfeatures) if(newfeatures) dna.features = newfeatures @@ -302,11 +386,11 @@ dna.uni_identity = ui updateappearance(icon_update=0) - if(se) - dna.struc_enzymes = se + if(LAZYLEN(mutation_index)) + dna.mutation_index = mutation_index.Copy() domutcheck() - SEND_SIGNAL(src, COMSIG_HUMAN_HARDSET_DNA, ui, se, newreal_name, newblood_type, mrace, newfeatures) + SEND_SIGNAL(src, COMSIG_HUMAN_HARDSET_DNA, ui, mutation_index, newreal_name, newblood_type, mrace, newfeatures) if(mrace || newfeatures || ui) update_body() @@ -357,19 +441,63 @@ /mob/proc/domutcheck() return -/mob/living/carbon/domutcheck(force_powers=0) //Set force_powers to 1 to bypass the power chance +/mob/living/carbon/domutcheck() if(!has_dna()) return - for(var/datum/mutation/human/A in GLOB.good_mutations | GLOB.bad_mutations | GLOB.not_good_mutations) - if(ismob(A.check_block(src, force_powers))) + for(var/mutation in dna.mutation_index) + if(ismob(dna.check_block(mutation))) return //we got monkeyized/humanized, this mob will be deleted, no need to continue. update_mutations_overlay() +/datum/dna/proc/check_block(mutation) + var/datum/mutation/human/HM = get_mutation(mutation) + if(check_block_string(mutation)) + if(!HM) + . = add_mutation(mutation, MUT_NORMAL) + return + return force_lose(HM) + +//Return the active mutation of a type if there is one +/datum/dna/proc/get_mutation(A) + for(var/datum/mutation/human/HM in mutations) + if(HM.type == A) + return HM + +/datum/dna/proc/check_block_string(mutation) + if((LAZYLEN(mutation_index) > DNA_MUTATION_BLOCKS) || !(mutation in mutation_index)) + return 0 + return is_gene_active(mutation) + +/datum/dna/proc/is_gene_active(mutation) + return (mutation_index[mutation] == GET_SEQUENCE(mutation)) + +/datum/dna/proc/set_se(on=TRUE, datum/mutation/human/HM) + if(!HM || !(HM.type in mutation_index) || (LAZYLEN(mutation_index) < DNA_MUTATION_BLOCKS)) + return + . = TRUE + if(on) + mutation_index[HM.type] = GET_SEQUENCE(HM.type) + else if(GET_SEQUENCE(HM.type) == mutation_index[HM.type]) + mutation_index[HM.type] = create_sequence(HM.type, FALSE, HM.difficulty) + +/datum/dna/proc/activate_mutation(mutation) //note that this returns a boolean and not a new mob + if(!mutation) + return FALSE + var/mutation_type = mutation + if(istype(mutation, /datum/mutation/human)) + var/datum/mutation/human/M = mutation + mutation_type = M.type + if(!mutation_in_sequence(mutation_type)) //cant activate what we dont have, use add_mutation + return FALSE + add_mutation(mutation, MUT_NORMAL) + return TRUE + /////////////////////////// DNA HELPER-PROCS ////////////////////////////// + /proc/getleftblocks(input,blocknumber,blocksize) if(blocknumber > 1) return copytext_char(input,1,((blocksize*blocknumber)-(blocksize-1))) @@ -386,29 +514,47 @@ return 0 return getleftblocks(istring, blocknumber, blocksize) + replacement + getrightblocks(istring, blocknumber, blocksize) +/datum/dna/proc/mutation_in_sequence(mutation) + if(!mutation) + return + if(istype(mutation, /datum/mutation/human)) + var/datum/mutation/human/HM = mutation + if(HM.type in mutation_index) + return TRUE + else if(mutation in mutation_index) + return TRUE + /mob/living/carbon/proc/randmut(list/candidates, difficulty = 2) if(!has_dna()) return - var/datum/mutation/human/num = pick(candidates) - . = num.force_give(src) + var/mutation = pick(candidates) + . = dna.add_mutation(mutation) -/mob/living/carbon/proc/randmutb() +/mob/living/carbon/proc/easy_randmut(quality = POSITIVE + NEGATIVE + MINOR_NEGATIVE, scrambled = TRUE, sequence = TRUE, exclude_monkey = TRUE) if(!has_dna()) return - var/datum/mutation/human/HM = pick((GLOB.bad_mutations | GLOB.not_good_mutations) - GLOB.mutations_list[RACEMUT]) - . = HM.force_give(src) + var/list/mutations = list() + if(quality & POSITIVE) + mutations += GLOB.good_mutations + if(quality & NEGATIVE) + mutations += GLOB.bad_mutations + if(quality & MINOR_NEGATIVE) + mutations += GLOB.not_good_mutations + var/list/possible = list() + for(var/datum/mutation/human/A in mutations) + if((!sequence || dna.mutation_in_sequence(A.type)) && !dna.get_mutation(A.type)) + possible += A.type + if(exclude_monkey) + possible.Remove(RACEMUT) + if(LAZYLEN(possible)) + var/mutation = pick(possible) + . = dna.activate_mutation(mutation) + if(scrambled) + var/datum/mutation/human/HM = dna.get_mutation(mutation) + if(HM) + HM.scrambled = TRUE + return TRUE -/mob/living/carbon/proc/randmutg() - if(!has_dna()) - return - var/datum/mutation/human/HM = pick(GLOB.good_mutations) - . = HM.force_give(src) - -/mob/living/carbon/proc/randmutvg() - if(!has_dna()) - return - var/datum/mutation/human/HM = pick((GLOB.good_mutations) - GLOB.mutations_list[HULK] - GLOB.mutations_list[DWARFISM]) - . = HM.force_give(src) /mob/living/carbon/proc/randmuti() if(!has_dna()) @@ -431,9 +577,9 @@ if(!M.has_dna()) return 0 if(se) - for(var/i=1, i<=DNA_STRUC_ENZYMES_BLOCKS, i++) + for(var/i=1, i<=DNA_MUTATION_BLOCKS, i++) if(prob(probability)) - M.dna.struc_enzymes = setblock(M.dna.struc_enzymes, i, random_string(DNA_BLOCK_SIZE, GLOB.hex_characters)) + M.dna.generate_dna_blocks() M.domutcheck() if(ui) for(var/i=1, i<=DNA_UNI_IDENTITY_BLOCKS, i++) @@ -460,3 +606,41 @@ return value /////////////////////////// DNA HELPER-PROCS + +/mob/living/carbon/human/proc/something_horrible() + if(!has_dna()) //shouldn't ever happen anyway so it's just in really weird cases + return + if(dna.stability > 0) + return + var/instability = -dna.stability + dna.remove_all_mutations() + dna.stability = 100 + if(prob(max(70-instability,0))) + switch(rand(0,3)) //not complete and utter death + if(0) + monkeyize() + if(1) + gain_trauma(/datum/brain_trauma/severe/paralysis) + if(2) + corgize() + if(3) + to_chat(src, "Oh, we actually feel quite alright!") + else + switch(rand(0,3)) + if(0) + gib() + if(1) + dust() + + if(2) + death() + petrify(INFINITY) + if(3) + if(prob(90)) + var/obj/item/bodypart/BP = get_bodypart(pick(BODY_ZONE_CHEST,BODY_ZONE_HEAD)) + if(BP) + BP.dismember() + else + gib() + else + set_species(/datum/species/dullahan) diff --git a/code/datums/elements/_element.dm b/code/datums/elements/_element.dm index 17e2b12232..f74dcd0b6e 100644 --- a/code/datums/elements/_element.dm +++ b/code/datums/elements/_element.dm @@ -1,4 +1,11 @@ +/** + * A holder for simple behaviour that can be attached to many different types + * + * Only one element of each type is instanced during game init. + * Otherwise acts basically like a lightweight component. + */ /datum/element + /// Option flags for element behaviour var/element_flags = NONE /** * The index of the first attach argument to consider for duplicate elements @@ -7,13 +14,17 @@ */ var/id_arg_index = INFINITY +/// Activates the functionality defined by the element on the given target datum /datum/element/proc/Attach(datum/target) + SHOULD_CALL_PARENT(1) if(type == /datum/element) return ELEMENT_INCOMPATIBLE if(element_flags & ELEMENT_DETACH) RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/Detach, override = TRUE) +/// Deactivates the functionality defines by the element on the given datum /datum/element/proc/Detach(datum/source, force) + SHOULD_CALL_PARENT(1) UnregisterSignal(source, COMSIG_PARENT_QDELETING) /datum/element/Destroy(force) @@ -24,16 +35,17 @@ //DATUM PROCS -/datum/proc/AddElement(eletype, ...) - var/datum/element/ele = SSdcs.GetElement(arglist(args)) - args[1] = src - if(ele.Attach(arglist(args)) == ELEMENT_INCOMPATIBLE) - CRASH("Incompatible [eletype] assigned to a [type]! args: [json_encode(args)]") +/// Finds the singleton for the element type given and attaches it to src +/datum/proc/_AddElement(list/arguments) + var/datum/element/ele = SSdcs.GetElement(arguments) + arguments[1] = src + if(ele.Attach(arglist(arguments)) == ELEMENT_INCOMPATIBLE) + CRASH("Incompatible [arguments[1]] assigned to a [type]! args: [json_encode(args)]") /** * Finds the singleton for the element type given and detaches it from src * You only need additional arguments beyond the type if you're using ELEMENT_BESPOKE */ -/datum/proc/RemoveElement(eletype, ...) - var/datum/element/ele = SSdcs.GetElement(arglist(args)) +/datum/proc/_RemoveElement(list/arguments) + var/datum/element/ele = SSdcs.GetElement(arguments) ele.Detach(src) diff --git a/code/datums/elements/flavor_text.dm b/code/datums/elements/flavor_text.dm index 54729d5f83..f5ad72e731 100644 --- a/code/datums/elements/flavor_text.dm +++ b/code/datums/elements/flavor_text.dm @@ -60,9 +60,9 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code return var/msg = replacetext(text, "\n", " ") if(length_char(msg) <= 40) - examine_list += "[html_encode(msg)]" + examine_list += "[msg]" else - examine_list += "[html_encode(copytext_char(msg, 1, 37))]... More..." + examine_list += "[copytext_char(msg, 1, 37)]... More..." /datum/element/flavor_text/Topic(href, href_list) . = ..() diff --git a/code/datums/elements/ghost_role_eligibility.dm b/code/datums/elements/ghost_role_eligibility.dm index ab87d7f1d2..28567c579b 100644 --- a/code/datums/elements/ghost_role_eligibility.dm +++ b/code/datums/elements/ghost_role_eligibility.dm @@ -17,9 +17,10 @@ penalty += roundstart_quit_limit - world.time if(penalty) penalty += world.realtime - var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes - if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime) - penalty = CANT_REENTER_ROUND + if(SSautotransfer.can_fire && SSautotransfer.maxvotes) + var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes + if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime) + penalty = CANT_REENTER_ROUND if(!(M.ckey in timeouts)) timeouts += M.ckey timeouts[M.ckey] = 0 @@ -41,7 +42,7 @@ return candidates /mob/proc/can_reenter_round(silent = FALSE) - var/datum/element/ghost_role_eligibility/eli = SSdcs.GetElement(/datum/element/ghost_role_eligibility) + var/datum/element/ghost_role_eligibility/eli = SSdcs.GetElement(list(/datum/element/ghost_role_eligibility)) return eli.can_reenter_round(src,silent) /datum/element/ghost_role_eligibility/proc/can_reenter_round(var/mob/M,silent = FALSE) diff --git a/code/datums/elements/mob_holder.dm b/code/datums/elements/mob_holder.dm index 06ff0c1386..3cd5367f65 100644 --- a/code/datums/elements/mob_holder.dm +++ b/code/datums/elements/mob_holder.dm @@ -8,18 +8,18 @@ var/inv_slots var/proctype //if present, will be invoked on headwear generation. -/datum/element/mob_holder/Attach(datum/target, _worn_state, _alt_worn, _right_hand, _left_hand, _inv_slots = NONE, _proctype) +/datum/element/mob_holder/Attach(datum/target, worn_state, alt_worn, right_hand, left_hand, inv_slots = NONE, proctype) . = ..() if(!isliving(target)) return ELEMENT_INCOMPATIBLE - worn_state = _worn_state - alt_worn = _alt_worn - right_hand = _right_hand - left_hand = _left_hand - inv_slots = _inv_slots - proctype = _proctype + src.worn_state = worn_state + src.alt_worn = alt_worn + src.right_hand = right_hand + src.left_hand = left_hand + src.inv_slots = inv_slots + src.proctype = proctype RegisterSignal(target, COMSIG_CLICK_ALT, .proc/mob_try_pickup) RegisterSignal(target, COMSIG_PARENT_EXAMINE, .proc/on_examine) @@ -138,7 +138,7 @@ destination = get_turf(loc) AM.forceMove(destination) -/obj/item/clothing/head/mob_holder/dropped() +/obj/item/clothing/head/mob_holder/dropped(mob/user) . = ..() if(held_mob && isturf(loc))//don't release on soft-drops release() diff --git a/code/datums/martial.dm b/code/datums/martial/_martial.dm similarity index 60% rename from code/datums/martial.dm rename to code/datums/martial/_martial.dm index cf2adfce8c..7b7975bedb 100644 --- a/code/datums/martial.dm +++ b/code/datums/martial/_martial.dm @@ -5,23 +5,20 @@ var/id = "" //ID, used by mind/has_martialartcode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proccode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proccode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proccode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proccode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proc var/current_target var/datum/martial_art/base // The permanent style. This will be null unless the martial art is temporary - var/deflection_chance = 0 //Chance to deflect projectiles - var/reroute_deflection = FALSE //Delete the bullet, or actually deflect it in some direction? var/block_chance = 0 //Chance to block melee attacks using items while on throw mode. - var/dodge_chance = 0 var/restraining = 0 //used in cqc's disarm_act to check if the disarmed is being restrained and so whether they should be put in a chokehold or not var/help_verb var/pacifism_check = TRUE //are the martial arts combos/attacks unable to be used by pacifist. var/allow_temp_override = TRUE //if this martial art can be overridden by temporary martial arts /datum/martial_art/proc/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D) - return 0 + return FALSE /datum/martial_art/proc/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D) - return 0 + return FALSE /datum/martial_art/proc/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D) - return 0 + return FALSE /datum/martial_art/proc/can_use(mob/living/carbon/human/H) return TRUE @@ -38,51 +35,6 @@ current_target = new_target streak = "" -/datum/martial_art/proc/basic_hit(mob/living/carbon/human/A,mob/living/carbon/human/D) - - var/damage = rand(A.dna.species.punchdamagelow, A.dna.species.punchdamagehigh) - - var/atk_verb = A.dna.species.attack_verb - if(D.lying) - atk_verb = "kick" - - switch(atk_verb) - if("kick") - A.do_attack_animation(D, ATTACK_EFFECT_KICK) - if("slash") - A.do_attack_animation(D, ATTACK_EFFECT_CLAW) - if("smash") - A.do_attack_animation(D, ATTACK_EFFECT_SMASH) - else - A.do_attack_animation(D, ATTACK_EFFECT_PUNCH) - - if(!damage) - playsound(D.loc, A.dna.species.miss_sound, 25, 1, -1) - D.visible_message("[A] has attempted to [atk_verb] [D]!", \ - "[A] has attempted to [atk_verb] [D]!", null, COMBAT_MESSAGE_RANGE) - log_combat(A, D, "attempted to [atk_verb]") - return 0 - - var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected)) - var/armor_block = D.run_armor_check(affecting, "melee") - - playsound(D.loc, A.dna.species.attack_sound, 25, 1, -1) - D.visible_message("[A] has [atk_verb]ed [D]!", \ - "[A] has [atk_verb]ed [D]!", null, COMBAT_MESSAGE_RANGE) - - D.apply_damage(damage, BRUTE, affecting, armor_block) - - log_combat(A, D, "punched") - - if((D.stat != DEAD) && damage >= A.dna.species.punchstunthreshold) - D.visible_message("[A] has knocked [D] down!!", \ - "[A] has knocked [D] down!") - D.apply_effect(40, EFFECT_KNOCKDOWN, armor_block) - D.forcesay(GLOB.hit_appends) - else if(D.lying) - D.forcesay(GLOB.hit_appends) - return 1 - /datum/martial_art/proc/teach(mob/living/carbon/human/H, make_temporary = FALSE) if(!istype(H) || !H.mind) return FALSE @@ -121,3 +73,7 @@ if(help_verb) H.verbs -= help_verb return + +///Gets called when a projectile hits the owner. Returning anything other than BULLET_ACT_HIT will stop the projectile from hitting the mob. +/datum/martial_art/proc/on_projectile_hit(mob/living/carbon/human/A, obj/item/projectile/P, def_zone) + return BULLET_ACT_HIT \ No newline at end of file diff --git a/code/datums/martial/plasma_fist.dm b/code/datums/martial/plasma_fist.dm index e38a011db0..71fb00c467 100644 --- a/code/datums/martial/plasma_fist.dm +++ b/code/datums/martial/plasma_fist.dm @@ -12,16 +12,16 @@ if(findtext(streak,TORNADO_COMBO)) streak = "" Tornado(A,D) - return 1 + return TRUE if(findtext(streak,THROWBACK_COMBO)) streak = "" Throwback(A,D) - return 1 + return TRUE if(findtext(streak,PLASMA_COMBO)) streak = "" Plasma(A,D) - return 1 - return 0 + return TRUE + return FALSE /datum/martial_art/plasma_fist/proc/TornadoAnimate(mob/living/carbon/human/A) set waitfor = FALSE @@ -66,23 +66,20 @@ /datum/martial_art/plasma_fist/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D) add_to_streak("H",D) if(check_streak(A,D)) - return 1 - basic_hit(A,D) - return 1 + return TRUE + return FALSE /datum/martial_art/plasma_fist/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D) add_to_streak("D",D) if(check_streak(A,D)) - return 1 - basic_hit(A,D) - return 1 + return TRUE + return FALSE /datum/martial_art/plasma_fist/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D) add_to_streak("G",D) if(check_streak(A,D)) - return 1 - basic_hit(A,D) - return 1 + return TRUE + return FALSE /mob/living/carbon/human/proc/plasma_fist_help() set name = "Recall Teachings" diff --git a/code/datums/martial/psychotic_brawl.dm b/code/datums/martial/psychotic_brawl.dm index be8659949d..75053dbbfc 100644 --- a/code/datums/martial/psychotic_brawl.dm +++ b/code/datums/martial/psychotic_brawl.dm @@ -61,8 +61,8 @@ D.throw_at(throwtarget, 4, 2, A)//So stuff gets tossed around at the same time. D.DefaultCombatKnockdown(60) if(7,8) - basic_hit(A,D) + return FALSE if(atk_verb) log_combat(A, D, "[atk_verb] (Psychotic Brawling)") - return 1 \ No newline at end of file + return TRUE \ No newline at end of file diff --git a/code/datums/martial/rising_bass.dm b/code/datums/martial/rising_bass.dm index 22605e5624..8055bd54e9 100644 --- a/code/datums/martial/rising_bass.dm +++ b/code/datums/martial/rising_bass.dm @@ -7,7 +7,6 @@ /datum/martial_art/the_rising_bass name = "The Rising Bass" id = MARTIALART_RISINGBASS - dodge_chance = 100 allow_temp_override = FALSE help_verb = /mob/living/carbon/human/proc/rising_bass_help var/datum/action/risingbassmove/sidekick = new/datum/action/risingbassmove/sidekick() @@ -18,24 +17,24 @@ if(findtext(streak,SIDE_KICK_COMBO)) streak = "" sideKick(A,D) - return 1 + return TRUE if(findtext(streak,SHOULDER_FLIP_COMBO)) streak = "" shoulderFlip(A,D) - return 1 + return TRUE if(findtext(streak,REPULSE_PUNCH_COMBO)) streak = "" repulsePunch(A,D) - return 1 + return TRUE if(findtext(streak,FOOT_SMASH_COMBO)) streak = "" footSmash(A,D) - return 1 + return TRUE if(findtext(streak,DEFT_SWITCH_COMBO)) streak = "" deftSwitch(A,D) - return 1 - return 0 + return TRUE + return FALSE //Repulse Punch - Slams the opponent far away from you. @@ -94,7 +93,7 @@ D.forceMove(L) log_combat(A, D, "side kicked (Rising Bass)") return TRUE - return basic_hit(A,D) + return TRUE /datum/martial_art/the_rising_bass/proc/shoulderFlip(mob/living/carbon/human/A, mob/living/carbon/human/D) if(CHECK_MOBILITY(D, MOBILITY_STAND)) @@ -112,7 +111,7 @@ D.forceMove(L) log_combat(A, D, "shoulder flipped (Rising Bass)") return TRUE - return basic_hit(A,D) + return FALSE /datum/martial_art/the_rising_bass/proc/repulsePunch(mob/living/carbon/human/A, mob/living/carbon/human/D) if(CHECK_MOBILITY(D, MOBILITY_STAND) && repulsecool < world.time) @@ -127,7 +126,7 @@ log_combat(A, D, "repulse punched (Rising Bass)") repulsecool = world.time + 3 SECONDS return TRUE - return basic_hit(A,D) + return FALSE /datum/martial_art/the_rising_bass/proc/footSmash(mob/living/carbon/human/A, mob/living/carbon/human/D) if(CHECK_MOBILITY(D, MOBILITY_STAND)) @@ -139,7 +138,7 @@ D.dropItemToGround(D.get_active_held_item()) log_combat(A, D, "foot smashed (Rising Bass)") return TRUE - return basic_hit(A,D) + return FALSE /datum/martial_art/the_rising_bass/proc/deftSwitch(mob/living/carbon/human/A, mob/living/carbon/human/D) if(CHECK_MOBILITY(D, MOBILITY_STAND)) @@ -158,19 +157,19 @@ /datum/martial_art/the_rising_bass/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D) add_to_streak("D",D) if(check_streak(A,D)) - return 1 + return TRUE return ..() /datum/martial_art/the_rising_bass/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D) add_to_streak("H",D) if(check_streak(A,D)) - return 1 + return TRUE return ..() /datum/martial_art/the_rising_bass/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D) add_to_streak("G",D) if(check_streak(A,D)) - return 1 + return TRUE return ..() /datum/martial_art/the_rising_bass/add_to_streak(element,mob/living/carbon/human/D) @@ -178,6 +177,20 @@ return . = ..() +/datum/martial_art/the_rising_bass/on_projectile_hit(mob/living/carbon/human/A, obj/item/projectile/P, def_zone) + . = ..() + if(A.incapacitated(FALSE, TRUE)) //NO STUN + return BULLET_ACT_HIT + if(!(A.mobility_flags & MOBILITY_USE)) //NO UNABLE TO USE + return BULLET_ACT_HIT + if(A.dna && A.dna.check_mutation(HULK)) //NO HULK + return BULLET_ACT_HIT + if(!isturf(A.loc)) //NO MOTHERFLIPPIN MECHS! + return BULLET_ACT_HIT + A.visible_message("[A] dodges the projectile cleanly, they're immune to ranged weapons!", "You dodge out of the way of the projectile!") + playsound(get_turf(A), pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, TRUE) + return BULLET_ACT_FORCE_PIERCE + /mob/living/carbon/human/proc/rising_bass_help() set name = "Recall Teachings" set desc = "Remember the martial techniques of the Rising Bass clan." diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index 464c362a44..2b7d9e0a09 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -1,141 +1,101 @@ -#define WRIST_WRENCH_COMBO "DD" -#define BACK_KICK_COMBO "HG" -#define STOMACH_KNEE_COMBO "GH" -#define HEAD_KICK_COMBO "DHH" -#define ELBOW_DROP_COMBO "HDHDH" +#define STRONG_PUNCH_COMBO "HH" +#define LAUNCH_KICK_COMBO "HD" +#define DROP_KICK_COMBO "HG" /datum/martial_art/the_sleeping_carp name = "The Sleeping Carp" id = MARTIALART_SLEEPINGCARP - deflection_chance = 100 - reroute_deflection = TRUE allow_temp_override = FALSE help_verb = /mob/living/carbon/human/proc/sleeping_carp_help - var/old_grab_state = null /datum/martial_art/the_sleeping_carp/proc/check_streak(mob/living/carbon/human/A, mob/living/carbon/human/D) - if(findtext(streak,WRIST_WRENCH_COMBO)) + if(findtext(streak,STRONG_PUNCH_COMBO)) streak = "" - wristWrench(A,D) + strongPunch(A,D) return TRUE - if(findtext(streak,BACK_KICK_COMBO)) + if(findtext(streak,LAUNCH_KICK_COMBO)) streak = "" - backKick(A,D) + launchKick(A,D) return TRUE - if(findtext(streak,STOMACH_KNEE_COMBO)) + if(findtext(streak,DROP_KICK_COMBO)) streak = "" - kneeStomach(A,D) - return TRUE - if(findtext(streak,HEAD_KICK_COMBO)) - streak = "" - headKick(A,D) - return TRUE - if(findtext(streak,ELBOW_DROP_COMBO)) - streak = "" - elbowDrop(A,D) + dropKick(A,D) return TRUE return FALSE -/datum/martial_art/the_sleeping_carp/proc/wristWrench(mob/living/carbon/human/A, mob/living/carbon/human/D) - if(CHECK_MOBILITY(D, MOBILITY_USE)) - log_combat(A, D, "wrist wrenched (Sleeping Carp)") - A.do_attack_animation(D, ATTACK_EFFECT_PUNCH) - D.visible_message("[A] grabs [D]'s wrist and wrenches it sideways!", \ - "[A] grabs your wrist and violently wrenches it to the side!") - playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - D.emote("scream") - D.dropItemToGround(D.get_active_held_item()) - D.apply_damage(5, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) - D.DefaultCombatKnockdown(60)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun() - return TRUE - return basic_hit(A,D) +///Gnashing Teeth: Harm Harm, consistent 20 force punch on every second harm punch, has a chance to crit +/datum/martial_art/the_sleeping_carp/proc/strongPunch(mob/living/carbon/human/A, mob/living/carbon/human/D) + ///this var is so that the strong punch is always aiming for the body part the user is targeting and not trying to apply to the chest before deviating + var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected)) + A.do_attack_animation(D, ATTACK_EFFECT_PUNCH) + var/atk_verb = pick("precisely kick", "brutally chop", "cleanly hit", "viciously slam") + ///this is the critical hit damage added to the attack if it rolls, it starts at 0 because it'll be changed when rolled + var/crit_damage = 0 + D.visible_message("[A] [atk_verb]s [D]!", \ + "[A] [atk_verb]s you!", null, null, A) + to_chat(A, "You [atk_verb] [D]!") + if(prob(10)) + crit_damage += 20 + playsound(get_turf(D), 'sound/weapons/bite.ogg', 50, TRUE, -1) + D.visible_message("[D] sputters blood as the blow strikes them with inhuman force!", "You are struck with incredible precision by [A]!") + log_combat(A, D, "critcal strong punched (Sleeping Carp)")//log it here because a critical can swing for 40 force and it's important for the sake of how hard they hit + else + playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, TRUE, -1) + log_combat(A, D, "strong punched (Sleeping Carp)")//so as to not double up on logging + D.apply_damage(20 + crit_damage, BRUTE, affecting) + return -/datum/martial_art/the_sleeping_carp/proc/backKick(mob/living/carbon/human/A, mob/living/carbon/human/D) - if(CHECK_MOBILITY(D, MOBILITY_STAND)) - if(A.dir == D.dir) - log_combat(A, D, "back-kicked (Sleeping Carp)") - A.do_attack_animation(D, ATTACK_EFFECT_PUNCH) - D.visible_message("[A] kicks [D] in the back!", \ - "[A] kicks you in the back, making you stumble and fall!") - step_to(D,get_step(D,D.dir),1) - D.DefaultCombatKnockdown(80) - playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1) - return TRUE - else - log_combat(A, D, "missed a back-kick (Sleeping Carp) on") - D.visible_message("[A] tries to kick [D] in the back, but misses!", \ - "[A] tries to kick you in the back, but misses!") - return basic_hit(A,D) +///Crashing Wave Kick: Harm Disarm combo, throws people seven tiles backwards +/datum/martial_art/the_sleeping_carp/proc/launchKick(mob/living/carbon/human/A, mob/living/carbon/human/D) + A.do_attack_animation(D, ATTACK_EFFECT_KICK) + D.visible_message("[A] kicks [D] square in the chest, sending them flying!", \ + "You are kicked square in the chest by [A], sending you flying!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, A) + playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, TRUE, -1) + var/atom/throw_target = get_edge_target_turf(D, A.dir) + D.throw_at(throw_target, 7, 14, A) + D.apply_damage(15, BRUTE, BODY_ZONE_CHEST) + log_combat(A, D, "launchkicked (Sleeping Carp)") + return -/datum/martial_art/the_sleeping_carp/proc/kneeStomach(mob/living/carbon/human/A, mob/living/carbon/human/D) - if(CHECK_MOBILITY(D, MOBILITY_STAND)) - log_combat(A, D, "stomach kneed (Sleeping Carp)") - A.do_attack_animation(D, ATTACK_EFFECT_KICK) - D.visible_message("[A] knees [D] in the stomach!", \ - "[A] winds you with a knee in the stomach!") - D.audible_message("[D] gags!") - D.losebreath += 3 - D.DefaultCombatKnockdown(40)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun() - playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1) - return TRUE - return basic_hit(A,D) - -/datum/martial_art/the_sleeping_carp/proc/headKick(mob/living/carbon/human/A, mob/living/carbon/human/D) - if(CHECK_MOBILITY(D, MOBILITY_STAND)) - log_combat(A, D, "head kicked (Sleeping Carp)") - A.do_attack_animation(D, ATTACK_EFFECT_KICK) - D.visible_message("[A] kicks [D] in the head!", \ - "[A] kicks you in the jaw!") - D.apply_damage(20, BRUTE, BODY_ZONE_HEAD) +///Keelhaul: Harm Grab combo, knocks people down, deals stamina damage while they're on the floor +/datum/martial_art/the_sleeping_carp/proc/dropKick(mob/living/carbon/human/A, mob/living/carbon/human/D) + A.do_attack_animation(D, ATTACK_EFFECT_KICK) + playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, TRUE, -1) + if((D.mobility_flags & MOBILITY_STAND)) + D.apply_damage(10, BRUTE, BODY_ZONE_HEAD) + D.DefaultCombatKnockdown(50) + D.adjustStaminaLoss(40) //A cit specific change form the tg port to really punish anyone who tries to stand up + D.visible_message("[A] kicks [D] in the head, sending them face first into the floor!", \ + "You are kicked in the head by [A], sending you crashing to the floor!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, A) + if(!(D.mobility_flags & MOBILITY_STAND)) + D.apply_damage(5, BRUTE, BODY_ZONE_HEAD) + D.adjustStaminaLoss(40) D.drop_all_held_items() - playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1) - D.DefaultCombatKnockdown(80)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun() - return TRUE - return basic_hit(A,D) - -/datum/martial_art/the_sleeping_carp/proc/elbowDrop(mob/living/carbon/human/A, mob/living/carbon/human/D) - if(!CHECK_MOBILITY(D, MOBILITY_STAND)) - log_combat(A, D, "elbow dropped (Sleeping Carp)") - A.do_attack_animation(D, ATTACK_EFFECT_PUNCH) - D.visible_message("[A] elbow drops [D]!", \ - "[A] piledrives you with their elbow!") - if(D.stat) - D.death() //FINISH HIM! - D.apply_damage(50, BRUTE, BODY_ZONE_CHEST) - playsound(get_turf(D), 'sound/weapons/punch1.ogg', 75, 1, -1) - return TRUE - return basic_hit(A,D) + D.visible_message("[A] kicks [D] in the head!", \ + "You are kicked in the head by [A]!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, A) + log_combat(A, D, "dropkicked (Sleeping Carp)") + return /datum/martial_art/the_sleeping_carp/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D) - if(A.a_intent == INTENT_GRAB && A!=D) // A!=D prevents grabbing yourself - add_to_streak("G",D) - if(check_streak(A,D)) //if a combo is made no grab upgrade is done - return TRUE - old_grab_state = A.grab_state - D.grabbedby(A, 1) - if(old_grab_state == GRAB_PASSIVE) - D.drop_all_held_items() - A.setGrabState(GRAB_AGGRESSIVE) //Instant agressive grab if on grab intent - log_combat(A, D, "grabbed", addition="aggressively") - D.visible_message("[A] violently grabs [D]!", \ - "[A] violently grabs you!") + add_to_streak("G",D) + if(check_streak(A,D)) return TRUE - return FALSE + log_combat(A, D, "grabbed (Sleeping Carp)") + return ..() /datum/martial_art/the_sleeping_carp/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D) add_to_streak("H",D) if(check_streak(A,D)) return TRUE + var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected)) A.do_attack_animation(D, ATTACK_EFFECT_PUNCH) - var/atk_verb = pick("punches", "kicks", "chops", "hits", "slams") - D.visible_message("[A] [atk_verb] [D]!", \ - "[A] [atk_verb] you!") - D.apply_damage(rand(10,15), BRUTE) - playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, 1, -1) - if(prob(D.getBruteLoss()) && !D.lying) - D.visible_message("[D] stumbles and falls!", "The blow sends you to the ground!") - D.DefaultCombatKnockdown(80) - log_combat(A, D, "[atk_verb] (Sleeping Carp)") + var/atk_verb = pick("kick", "chop", "hit", "slam") + D.visible_message("[A] [atk_verb]s [D]!", \ + "[A] [atk_verb]s you!", null, null, A) + to_chat(A, "You [atk_verb] [D]!") + D.apply_damage(rand(10,15), BRUTE, affecting) + playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, TRUE, -1) + log_combat(A, D, "punched (Sleeping Carp)") return TRUE @@ -143,17 +103,58 @@ add_to_streak("D",D) if(check_streak(A,D)) return TRUE + log_combat(A, D, "disarmed (Sleeping Carp)") return ..() +/datum/martial_art/the_sleeping_carp/on_projectile_hit(mob/living/carbon/human/A, obj/item/projectile/P, def_zone) + . = ..() + if(A.incapacitated(FALSE, TRUE)) //NO STUN + return BULLET_ACT_HIT + if(!(A.mobility_flags & MOBILITY_USE)) //NO UNABLE TO USE + return BULLET_ACT_HIT + if(A.dna && A.dna.check_mutation(HULK)) //NO HULK + return BULLET_ACT_HIT + if(!isturf(A.loc)) //NO MOTHERFLIPPIN MECHS! + return BULLET_ACT_HIT + if(A.in_throw_mode) + A.visible_message("[A] effortlessly swats the projectile aside! They can deflect projectile with their bare hands!", "You deflect the projectile!") + playsound(get_turf(A), pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, TRUE) + P.firer = A + P.setAngle(rand(0, 360))//SHING + return BULLET_ACT_FORCE_PIERCE + return BULLET_ACT_HIT + /datum/martial_art/the_sleeping_carp/teach(mob/living/carbon/human/H, make_temporary = FALSE) . = ..() if(!.) return ADD_TRAIT(H, TRAIT_NOGUNS, SLEEPING_CARP_TRAIT) + ADD_TRAIT(H, TRAIT_PIERCEIMMUNE, SLEEPING_CARP_TRAIT) + ADD_TRAIT(H, TRAIT_NODISMEMBER, SLEEPING_CARP_TRAIT) + H.physiology.brute_mod *= 0.4 //brute is really not gonna cut it + H.physiology.burn_mod *= 0.7 //burn is distinctly more useful against them than brute but they're still resistant + H.physiology.stamina_mod *= 0.5 //stun batons prove to be one of the few ways to fight them. They have stun resistance already, so I think doubling down too hard on this resistance is a bit much. + H.physiology.stun_mod *= 0.3 //for those rare stuns + H.physiology.pressure_mod *= 0.3 //go hang out with carp + H.physiology.cold_mod *= 0.3 //cold mods are different to burn mods, they do stack however + H.physiology.heat_mod *= 2 //this is mostly so sleeping carp has a viable weakness. Cooking them alive. Setting them on fire and heating them will be their biggest weakness. The reason for this is....filet jokes. + + H.faction |= "carp" //:D /datum/martial_art/the_sleeping_carp/on_remove(mob/living/carbon/human/H) . = ..() REMOVE_TRAIT(H, TRAIT_NOGUNS, SLEEPING_CARP_TRAIT) + REMOVE_TRAIT(H, TRAIT_PIERCEIMMUNE, SLEEPING_CARP_TRAIT) + REMOVE_TRAIT(H, TRAIT_NODISMEMBER, SLEEPING_CARP_TRAIT) + H.physiology.brute_mod = initial(H.physiology.brute_mod) + H.physiology.burn_mod = initial(H.physiology.burn_mod) + H.physiology.stamina_mod = initial(H.physiology.stamina_mod) + H.physiology.stun_mod = initial(H.physiology.stun_mod) + H.physiology.pressure_mod = initial(H.physiology.pressure_mod) //no more carpies + H.physiology.cold_mod = initial(H.physiology.cold_mod) + H.physiology.heat_mod = initial(H.physiology.heat_mod) + + H.faction -= "carp" //:( /mob/living/carbon/human/proc/sleeping_carp_help() set name = "Recall Teachings" @@ -162,11 +163,10 @@ to_chat(usr, "You retreat inward and recall the teachings of the Sleeping Carp...") - to_chat(usr, "Wrist Wrench: Disarm Disarm. Forces opponent to drop item in hand.") - to_chat(usr, "Back Kick: Harm Grab. Opponent must be facing away. Knocks down.") - to_chat(usr, "Stomach Knee: Grab Harm. Knocks the wind out of opponent and stuns.") - to_chat(usr, "Head Kick: Disarm Harm Harm. Decent damage, forces opponent to drop item in hand.") - to_chat(usr, "Elbow Drop: Harm Disarm Harm Disarm Harm. Opponent must be on the ground. Deals huge damage, instantly kills anyone in critical condition.") + to_chat(usr, "Gnashing Teeth: Harm Harm. Deal additional damage every second punch, with a chance for even more damage!") + to_chat(usr, "Crashing Wave Kick: Harm Disarm. Launch people brutally across rooms, and away from you.") + to_chat(usr, "Keelhaul: Harm Grab. Kick opponents to the floor. Against prone targets, deal additional stamina damage and disarm them.") + to_chat(usr, "In addition, your body has become incredibly resilient to most forms of attack. Weapons cannot readily pierce your hardened skin, and you are highly resistant to stuns and knockdowns, and can block all projectiles in Throw Mode. However, you are not invincible, and sustained damage will take it's toll. Avoid heat at all costs!") /obj/item/twohanded/bostaff name = "bo staff" diff --git a/code/datums/materials/basemats.dm b/code/datums/materials/basemats.dm index 6511950c87..c006f97bff 100644 --- a/code/datums/materials/basemats.dm +++ b/code/datums/materials/basemats.dm @@ -93,12 +93,12 @@ Unless you know what you're doing, only use the first three numbers. They're in /datum/material/plasma/on_applied(atom/source, amount, material_flags) . = ..() if(ismovableatom(source)) - source.AddElement(/datum/element/firestacker) + source.AddElement(/datum/element/firestacker, amount=1) source.AddComponent(/datum/component/explodable, 0, 0, amount / 2500, amount / 1250) /datum/material/plasma/on_removed(atom/source, material_flags) . = ..() - source.RemoveElement(/datum/element/firestacker) + source.RemoveElement(/datum/element/firestacker, amount=1) qdel(source.GetComponent(/datum/component/explodable)) ///Can cause bluespace effects on use. (Teleportation) (Not yet implemented) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 29bb694a6f..edd5c25e2e 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -256,9 +256,11 @@ remove_rev() SSticker.mode.update_cult_icons_removed(src) -/datum/mind/proc/equip_traitor(employer = "The Syndicate", silent = FALSE, datum/antagonist/uplink_owner) +/datum/mind/proc/equip_traitor(datum/traitor_class/traitor_class, silent = FALSE, datum/antagonist/uplink_owner) if(!current) return + if(!traitor_class) + traitor_class = GLOB.traitor_classes[TRAITOR_HUMAN] var/mob/living/carbon/human/traitor_mob = current if (!istype(traitor_mob)) return @@ -306,21 +308,21 @@ if (!uplink_loc) if(!silent) - to_chat(traitor_mob, "Unfortunately, [employer] wasn't able to get you an Uplink.") + to_chat(traitor_mob, "Unfortunately, [traitor_class.employer] wasn't able to get you an Uplink.") . = 0 else . = uplink_loc - var/datum/component/uplink/U = uplink_loc.AddComponent(/datum/component/uplink, traitor_mob.key) + var/datum/component/uplink/U = uplink_loc.AddComponent(/datum/component/uplink, traitor_mob.key,traitor_class) if(!U) CRASH("Uplink creation failed.") U.setup_unlock_code() if(!silent) if(uplink_loc == R) - to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [R.name]. Simply dial the frequency [format_frequency(U.unlock_code)] to unlock its hidden features.") + to_chat(traitor_mob, "[traitor_class.employer] has cunningly disguised a Syndicate Uplink as your [R.name]. Simply dial the frequency [format_frequency(U.unlock_code)] to unlock its hidden features.") else if(uplink_loc == PDA) - to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [PDA.name]. Simply enter the code \"[U.unlock_code]\" into the ringtone select to unlock its hidden features.") + to_chat(traitor_mob, "[traitor_class.employer] has cunningly disguised a Syndicate Uplink as your [PDA.name]. Simply enter the code \"[U.unlock_code]\" into the ringtone select to unlock its hidden features.") else if(uplink_loc == P) - to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [P.name]. Simply twist the top of the pen [U.unlock_code] from its starting position to unlock its hidden features.") + to_chat(traitor_mob, "[traitor_class.employer] has cunningly disguised a Syndicate Uplink as your [P.name]. Simply twist the top of the pen [U.unlock_code] from its starting position to unlock its hidden features.") if(uplink_owner) uplink_owner.antag_memory += U.unlock_note + "
" diff --git a/code/datums/mutations.dm b/code/datums/mutations.dm index 6397bbe66b..9234e124c5 100644 --- a/code/datums/mutations.dm +++ b/code/datums/mutations.dm @@ -1,58 +1,55 @@ -GLOBAL_LIST_EMPTY(mutations_list) - /datum/mutation var/name -/datum/mutation/New() - GLOB.mutations_list[name] = src - /datum/mutation/human - var/dna_block + name = "mutation" + var/desc = "A mutation." + var/locked var/quality var/get_chance = 100 var/lowest_value = 256 * 8 var/text_gain_indication = "" var/text_lose_indication = "" var/list/mutable_appearance/visual_indicators = list() + var/obj/effect/proc_holder/spell/power var/layer_used = MUTATIONS_LAYER //which mutation layer to use var/list/species_allowed = list() //to restrict mutation to only certain species var/health_req //minimum health required to acquire the mutation var/limb_req //required limbs to acquire this mutation var/time_coeff = 1 //coefficient for timed mutations + var/datum/dna/dna + var/mob/living/carbon/human/owner + var/instability = 0 //instability the holder gets when the mutation is not native + var/blocks = 4 //Amount of those big blocks with gene sequences + var/difficulty = 8 //Amount of missing sequences. Sometimes it removes an entire pair for 2 points + var/timed = FALSE //Boolean to easily check if we're going to self destruct + var/alias //'Mutation #49', decided every round to get some form of distinction between undiscovered mutations + var/scrambled = FALSE //Wheter we can read it if it's active. To avoid cheesing with mutagen + var/class //Decides player accesibility, sorta + //MUT_NORMAL - A mutation that can be activated and deactived by completing a sequence + //MUT_EXTRA - A mutation that is in the mutations tab, and can be given and taken away through though the DNA console. Has a 0 before it's name in the mutation section of the dna console + //MUT_OTHER Cannot be interacted with by players through normal means. I.E. wizards mutate -/datum/mutation/human/proc/force_give(mob/living/carbon/human/owner) - set_block(owner) - . = on_acquiring(owner) + var/can_chromosome = CHROMOSOME_NONE //can we take chromosomes? 0: CHROMOSOME_NEVER never, 1:CHROMOSOME_NONE yeah, 2: CHROMOSOME_USED no, already have one + var/chromosome_name //purely cosmetic + var/modified = FALSE //ugly but we really don't want chromosomes and on_acquiring to overlap and apply double the powers + var/mutadone_proof = FALSE -/datum/mutation/human/proc/force_lose(mob/living/carbon/human/owner) - set_block(owner, 0) - . = on_losing(owner) + //Chromosome stuff - set to -1 to prevent people from changing it. Example: It'd be a waste to decrease cooldown on mutism + var/stabilizer_coeff = 1 //genetic stability coeff + var/synchronizer_coeff = -1 //makes the mutation hurt the user less + var/power_coeff = -1 //boosts mutation strength + var/energy_coeff = -1 //lowers mutation cooldown -/datum/mutation/human/proc/set_se(se_string, on = 1) - if(!se_string || length(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE) - return - var/before = copytext_char(se_string, 1, ((dna_block - 1) * DNA_BLOCK_SIZE) + 1) - var/injection = num2hex(on ? rand(lowest_value, (256 * 16) - 1) : rand(0, lowest_value - 1), DNA_BLOCK_SIZE) - var/after = copytext_char(se_string, (dna_block * DNA_BLOCK_SIZE) + 1, 0) - return before + injection + after - -/datum/mutation/human/proc/set_block(mob/living/carbon/owner, on = 1) - if(owner && owner.has_dna()) - owner.dna.struc_enzymes = set_se(owner.dna.struc_enzymes, on) - -/datum/mutation/human/proc/check_block_string(se_string) - if(!se_string || length(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE) - return 0 - if(hex2num(getblock(se_string, dna_block)) >= lowest_value) - return 1 - -/datum/mutation/human/proc/check_block(mob/living/carbon/human/owner, force_powers=0) - if(check_block_string(owner.dna.struc_enzymes)) - if(prob(get_chance)||force_powers) - . = on_acquiring(owner) - else - . = on_losing(owner) +/datum/mutation/human/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut) + . = ..() + class = class_ + if(timer) + addtimer(CALLBACK(src, .proc/remove), timer) + timed = TRUE + if(copymut && istype(copymut, /datum/mutation/human)) + copy_mutation(copymut) /datum/mutation/human/proc/on_acquiring(mob/living/carbon/human/owner) if(!owner || !istype(owner) || owner.stat == DEAD || (src in owner.dna.mutations)) @@ -63,7 +60,8 @@ GLOBAL_LIST_EMPTY(mutations_list) return TRUE if(limb_req && !owner.get_bodypart(limb_req)) return TRUE - owner.dna.mutations.Add(src) + dna = owner.dna + dna.mutations += src if(text_gain_indication) to_chat(owner, text_gain_indication) if(visual_indicators.len) @@ -75,6 +73,10 @@ GLOBAL_LIST_EMPTY(mutations_list) owner.overlays_standing[layer_used] = mut_overlay owner.apply_overlay(layer_used) + grant_spell(owner) + if(!modified) + addtimer(CALLBACK(src, .proc/modify, 5)) //gonna want children calling ..() to run first + /datum/mutation/human/proc/get_visual_indicator(mob/living/carbon/human/owner) return @@ -102,26 +104,80 @@ GLOBAL_LIST_EMPTY(mutations_list) mut_overlay.Remove(get_visual_indicator(owner)) owner.overlays_standing[layer_used] = mut_overlay owner.apply_overlay(layer_used) + if(power) + owner.RemoveSpell(power) + qdel(src) return 0 return 1 +/datum/mutation/human/proc/say_mod(message) + if(message) + return message + +/datum/mutation/human/proc/get_spans() + return list() + /mob/living/carbon/proc/update_mutations_overlay() return /mob/living/carbon/human/update_mutations_overlay() for(var/datum/mutation/human/CM in dna.mutations) if(CM.species_allowed.len && !CM.species_allowed.Find(dna.species.id)) - CM.force_lose(src) //shouldn't have that mutation at all + dna.force_lose(CM) //shouldn't have that mutation at all continue if(CM.visual_indicators.len) var/list/mut_overlay = list() if(overlays_standing[CM.layer_used]) mut_overlay = overlays_standing[CM.layer_used] - var/mutable_appearance/V = CM.get_visual_indicator(src) + var/mutable_appearance/V = CM.get_visual_indicator() if(!mut_overlay.Find(V)) //either we lack the visual indicator or we have the wrong one remove_overlay(CM.layer_used) - for(var/mutable_appearance/MA in CM.visual_indicators) + for(var/mutable_appearance/MA in CM.visual_indicators[CM.type]) mut_overlay.Remove(MA) mut_overlay |= V overlays_standing[CM.layer_used] = mut_overlay apply_overlay(CM.layer_used) + + +/datum/mutation/human/proc/modify() //called when a genome is applied so we can properly update some stats without having to remove and reapply the mutation from someone + if(modified || !power || !owner) + return + power.charge_max *= GET_MUTATION_ENERGY(src) + power.charge_counter *= GET_MUTATION_ENERGY(src) + modified = TRUE + +/datum/mutation/human/proc/copy_mutation(datum/mutation/human/HM) + if(!HM) + return + chromosome_name = HM.chromosome_name + stabilizer_coeff = HM.stabilizer_coeff + synchronizer_coeff = HM.synchronizer_coeff + power_coeff = HM.power_coeff + energy_coeff = HM.energy_coeff + mutadone_proof = HM.mutadone_proof + can_chromosome = HM.can_chromosome + +/datum/mutation/human/proc/remove_chromosome() + stabilizer_coeff = initial(stabilizer_coeff) + synchronizer_coeff = initial(synchronizer_coeff) + power_coeff = initial(power_coeff) + energy_coeff = initial(energy_coeff) + mutadone_proof = initial(mutadone_proof) + can_chromosome = initial(can_chromosome) + chromosome_name = null + +/datum/mutation/human/proc/remove() + if(dna) + dna.force_lose(src) + else + qdel(src) + +/datum/mutation/human/proc/grant_spell(mob/living/carbon/human/owner) + if(!ispath(power) || !owner) + return FALSE + + power = new power() + power.action_background_icon_state = "bg_tech_blue_on" + power.panel = "Genetic" + owner.AddSpell(power) + return TRUE \ No newline at end of file diff --git a/code/datums/mutations/actions.dm b/code/datums/mutations/actions.dm new file mode 100644 index 0000000000..9074b4e0c5 --- /dev/null +++ b/code/datums/mutations/actions.dm @@ -0,0 +1,503 @@ +/datum/mutation/human/telepathy + name = "Telepathy" + desc = "A rare mutation that allows the user to telepathically communicate to others." + quality = POSITIVE + text_gain_indication = "You can hear your own voice echoing in your mind!" + text_lose_indication = "You don't hear your mind echo anymore." + difficulty = 12 + power = /obj/effect/proc_holder/spell/targeted/telepathy/genetic + instability = 10 + energy_coeff = 1 + +/datum/mutation/human/telepathy/on_acquiring(mob/living/carbon/human/owner) + . = ..() + +/datum/mutation/human/telepathy/on_losing(mob/living/carbon/human/owner) + . = ..() + +/obj/effect/proc_holder/spell/targeted/telepathy/genetic + magic_check = FALSE + +/datum/mutation/human/firebreath + name = "Fire Breath" + desc = "An ancient mutation that gives lizards breath of fire." + quality = POSITIVE + difficulty = 12 + locked = TRUE + text_gain_indication = "Your throat is burning!" + text_lose_indication = "Your throat is cooling down." + power = /obj/effect/proc_holder/spell/aimed/firebreath + instability = 30 + energy_coeff = 1 + power_coeff = 1 + +/datum/mutation/human/firebreath/modify() + if(power) + var/obj/effect/proc_holder/spell/aimed/firebreath/S = power + S.strength = 4 + GET_MUTATION_POWER(src) + +/obj/effect/proc_holder/spell/aimed/firebreath + name = "Fire Breath" + desc = "You can breathe fire at a target." + school = "evocation" + charge_max = 1200 + clothes_req = FALSE + range = 20 + base_icon_state = "fireball" + action_icon_state = "fireball0" + sound = 'sound/magic/demon_dies.ogg' //horrifying lizard noises + active_msg = "You built up heat in your mouth." + deactive_msg = "You swallow the flame." + var/strength = 4 + +/obj/effect/proc_holder/spell/aimed/firebreath/before_cast(list/targets) + . = ..() + if(iscarbon(usr)) + var/mob/living/carbon/C = usr + if(C.is_mouth_covered()) + C.adjust_fire_stacks(2) + C.IgniteMob() + to_chat(C,"Something in front of your mouth caught fire!") + return FALSE + +/obj/effect/proc_holder/spell/aimed/firebreath/cast(list/targets, mob/living/user) + var/turf/T = user.loc + if(!isturf(T)) + return FALSE + firecone(T,user.dir,strength) + remove_ranged_ability() + charge_counter = 0 + start_recharge() + on_deactivation(user) + +/proc/firecone(loc,dir,length) + var/addsides = FALSE + var/list/turf/recentturf = list(loc) + for (var/i = 0;i < length;i++) + var/list/turf/h = list() + for (var/turf/g in recentturf) + var/frontturf = get_step(g,dir) + if (addsides) + var/rightturf = get_step(frontturf,turn(dir,90)) + var/leftturf = get_step(frontturf,turn(dir,270)) + if (!(rightturf in h)) + h += rightturf + if (!(leftturf in h)) + h += leftturf + if (!(frontturf in h)) + h += frontturf + for (var/turf/j in h) + if (j.blocks_air) + h -= j + continue + for (var/obj/o in j) + if (o.CanAtmosPass == ATMOS_PASS_PROC ? !o.CanAtmosPass(loc) : !o.CanAtmosPass) + h -= j + continue + for (var/turf/l in h) + new /obj/effect/hotspot(l) + l.hotspot_expose(700,50,1) + sleep(1) + recentturf = h + addsides = !addsides + +/datum/mutation/human/void + name = "Void Magnet" + desc = "A rare genome that attracts odd forces not usually observed." + quality = MINOR_NEGATIVE //upsides and downsides + text_gain_indication = "You feel a heavy, dull force just beyond the walls watching you." + instability = 30 + power = /obj/effect/proc_holder/spell/self/void + energy_coeff = 1 + synchronizer_coeff = 1 + +/datum/mutation/human/void/on_life(mob/living/carbon/human/owner) + if(!isturf(owner.loc)) + return + if(prob((0.5+((100-dna.stability)/20))) * GET_MUTATION_SYNCHRONIZER(src)) //very rare, but enough to annoy you hopefully. +0.5 probability for every 10 points lost in stability + new /obj/effect/immortality_talisman/void(get_turf(owner), owner) + +/obj/effect/proc_holder/spell/self/void + name = "Convoke Void" //magic the gathering joke here + desc = "A rare genome that attracts odd forces not usually observed. May sometimes pull you in randomly." + school = "evocation" + clothes_req = FALSE + charge_max = 600 + invocation = "DOOOOOOOOOOOOOOOOOOOOM!!!" + invocation_type = "shout" + action_icon_state = "void_magnet" + var/in_use = FALSE //so it doesnt cast while you are already deep innit + +/obj/effect/proc_holder/spell/self/void/can_cast(mob/user = usr) + . = ..() + if(!isturf(user.loc)) + return FALSE + +/obj/effect/proc_holder/spell/self/void/cast(mob/user = usr) + . = ..() + new /obj/effect/immortality_talisman/void(get_turf(user), user) + +/datum/mutation/human/shock + name = "Shock Touch" + desc = "The affected can channel excess electricity through their hands without shocking themselves, allowing them to shock others." + quality = POSITIVE + locked = TRUE + difficulty = 16 + text_gain_indication = "You feel power flow through your hands." + text_lose_indication = "The energy in your hands subsides." + power = /obj/effect/proc_holder/spell/targeted/touch/shock + instability = 30 + +/obj/effect/proc_holder/spell/targeted/touch/shock + name = "Shock Touch" + desc = "Channel electricity to your hand to shock people with." + drawmessage = "You channel electricity into your hand." + dropmessage = "You let the electricity from your hand dissipate." + hand_path = /obj/item/melee/touch_attack/shock + charge_max = 400 + clothes_req = FALSE + action_icon_state = "zap" + +/obj/item/melee/touch_attack/shock + name = "\improper shock touch" + desc = "This is kind of like when you rub your feet on a shag rug so you can zap your friends, only a lot less safe." + catchphrase = null + on_use_sound = 'sound/weapons/zapbang.ogg' + icon_state = "zapper" + item_state = "zapper" + +/obj/item/melee/touch_attack/shock/afterattack(atom/target, mob/living/carbon/user, proximity) + if(!proximity || !isliving(target)) + return + if(iscarbon(target)) + var/mob/living/carbon/C = target + if(C.electrocute_act(15, user, 1, SHOCK_NOSTUN))//doesnt stun. never let this stun + C.dropItemToGround(C.get_active_held_item()) + C.dropItemToGround(C.get_inactive_held_item()) + C.confused += 10 + C.visible_message("[user] electrocutes [target]!","[user] electrocutes you!") + return ..() + else + user.visible_message("[user] fails to electrocute [target]!") + return ..() + else if(isliving(target)) + var/mob/living/L = target + L.electrocute_act(15, user, 1, SHOCK_NOSTUN) + L.visible_message("[user] electrocutes [target]!","[user] electrocutes you!") + return ..() + else + to_chat(user,"The electricity doesn't seem to affect [target]...") + return ..() + + +/datum/mutation/human/olfaction + name = "Transcendent Olfaction" + desc = "Your sense of smell is comparable to that of a canine." + quality = POSITIVE + difficulty = 12 + text_gain_indication = "Smells begin to make more sense..." + text_lose_indication = "Your sense of smell goes back to normal." + power = /obj/effect/proc_holder/spell/targeted/olfaction + instability = 30 + synchronizer_coeff = 1 + var/reek = 200 + +/datum/mutation/human/olfaction/modify() + if(power) + var/obj/effect/proc_holder/spell/targeted/olfaction/S = power + S.sensitivity = GET_MUTATION_SYNCHRONIZER(src) + +/obj/effect/proc_holder/spell/targeted/olfaction + name = "Remember the Scent" + desc = "Get a scent off of the item you're currently holding to track it. With an empty hand, you'll track the scent you've remembered." + charge_max = 100 + clothes_req = FALSE + range = -1 + include_user = TRUE + action_icon_state = "nose" + var/mob/living/carbon/tracking_target + var/list/mob/living/carbon/possible = list() + var/sensitivity = 1 + +/obj/effect/proc_holder/spell/targeted/olfaction/cast(list/targets, mob/living/user = usr) + //can we sniff? is there miasma in the air? + var/datum/gas_mixture/air = user.loc.return_air() + var/list/cached_gases = air.gases + + if(cached_gases[/datum/gas/miasma]) + user.adjust_disgust(sensitivity * 45) + to_chat(user, "With your overly sensitive nose, you get a whiff of stench and feel sick! Try moving to a cleaner area!") + return + + var/atom/sniffed = user.get_active_held_item() + if(sniffed) + var/old_target = tracking_target + possible = list() + for(var/mob/living/carbon/human/H in GLOB.alive_mob_list) + if(md5(H.dna.uni_identity) in sniffed.fingerprints) + possible |= H + if(!length(possible)) + to_chat(user,"Despite your best efforts, there are no scents to be found on [sniffed]...") + return + tracking_target = input(user, "Choose a scent to remember.", "Scent Tracking") as null|anything in sortNames(possible) + if(!tracking_target) + if(!old_target) + to_chat(user,"You decide against remembering any scents. Instead, you notice your own nose in your peripheral vision. This goes on to remind you of that one time you started breathing manually and couldn't stop. What an awful day that was.") + return + tracking_target = old_target + on_the_trail(user) + return + to_chat(user,"You pick up the scent of [tracking_target]. The hunt begins.") + on_the_trail(user) + return + + if(!tracking_target) + to_chat(user,"You're not holding anything to smell, and you haven't smelled anything you can track. You smell your skin instead; it's kinda salty.") + return + + on_the_trail(user) + +/obj/effect/proc_holder/spell/targeted/olfaction/proc/on_the_trail(mob/living/user) + if(!tracking_target) + to_chat(user,"You're not tracking a scent, but the game thought you were. Something's gone wrong! Report this as a bug.") + return + if(tracking_target == user) + to_chat(user,"You smell out the trail to yourself. Yep, it's you.") + return + if(usr.z < tracking_target.z) + to_chat(user,"The trail leads... way up above you? Huh. They must be really, really far away.") + return + else if(usr.z > tracking_target.z) + to_chat(user,"The trail leads... way down below you? Huh. They must be really, really far away.") + return + var/direction_text = "[dir2text(get_dir(usr, tracking_target))]" + if(direction_text) + to_chat(user,"You consider [tracking_target]'s scent. The trail leads [direction_text].") + + +/datum/mutation/human/self_amputation + name = "Autotomy" + desc = "Allows a creature to voluntary discard a random appendage." + quality = POSITIVE + text_gain_indication = "Your joints feel loose." + instability = 30 + power = /obj/effect/proc_holder/spell/self/self_amputation + + energy_coeff = 1 + synchronizer_coeff = 1 + +/obj/effect/proc_holder/spell/self/self_amputation + name = "Drop a limb" + desc = "Concentrate to make a random limb pop right off your body." + clothes_req = FALSE + human_req = FALSE + charge_max = 100 + action_icon_state = "autotomy" + +/obj/effect/proc_holder/spell/self/self_amputation/cast(list/targets, mob/user = usr) + if(!iscarbon(user)) + return + + var/mob/living/carbon/C = user + if(HAS_TRAIT(C, TRAIT_NODISMEMBER)) + return + + var/list/parts = list() + for(var/X in C.bodyparts) + var/obj/item/bodypart/BP = X + if(BP.body_part != HEAD && BP.body_part != CHEST) + if(BP.dismemberable) + parts += BP + if(!parts.len) + to_chat(usr, "You can't shed any more limbs!") + return + + var/obj/item/bodypart/BP = pick(parts) + BP.dismember() + +//spider webs +/datum/mutation/human/webbing + name = "Webbing Production" + desc = "Allows the user to lay webbing, and travel through it." + quality = POSITIVE + text_gain_indication = "Your skin feels webby." + instability = 15 + power = /obj/effect/proc_holder/spell/self/lay_genetic_web + +/obj/effect/proc_holder/spell/self/lay_genetic_web + name = "Lay Web" + desc = "Drops a web. Only you will be able to traverse your web easily, making it pretty good for keeping you safe." + clothes_req = FALSE + human_req = FALSE + charge_max = 4 SECONDS //the same time to lay a web + action_icon = 'icons/mob/actions/actions_genetic.dmi' + action_icon_state = "lay_web" + +/obj/effect/proc_holder/spell/self/lay_genetic_web/cast(list/targets, mob/user = usr) + var/failed = FALSE + if(!isturf(user.loc)) + to_chat(user, "You can't lay webs here!") + failed = TRUE + var/turf/T = get_turf(user) + var/obj/structure/spider/stickyweb/genetic/W = locate() in T + if(W) + to_chat(user, "There's already a web here!") + failed = TRUE + if(failed) + revert_cast(user) + return FALSE + + user.visible_message("[user] begins to secrete a sticky substance.","You begin to lay a web.") + if(!do_after(user, 4 SECONDS, target = T)) + to_chat(user, "Your web spinning was interrupted!") + return + else + new /obj/structure/spider/stickyweb/genetic(T, user) + + +/datum/mutation/human/tongue_spike + name = "Tongue Spike" + desc = "Allows a creature to voluntary shoot their tongue out as a deadly weapon." + quality = POSITIVE + text_gain_indication = "Your feel like you can throw your voice." + instability = 15 + power = /obj/effect/proc_holder/spell/self/tongue_spike + + energy_coeff = 1 + synchronizer_coeff = 1 + +/obj/effect/proc_holder/spell/self/tongue_spike + name = "Launch spike" + desc = "Shoot your tongue out in the direction you're facing, embedding it and dealing damage until they remove it." + clothes_req = FALSE + human_req = TRUE + charge_max = 100 + action_icon = 'icons/mob/actions/actions_genetic.dmi' + action_icon_state = "spike" + var/spike_path = /obj/item/hardened_spike + +/obj/effect/proc_holder/spell/self/tongue_spike/cast(list/targets, mob/user = usr) + if(!iscarbon(user)) + return + + var/mob/living/carbon/C = user + if(HAS_TRAIT(C, TRAIT_NODISMEMBER)) + return + var/obj/item/organ/tongue/tongue + for(var/org in C.internal_organs) + if(istype(org, /obj/item/organ/tongue)) + tongue = org + break + + if(!tongue) + to_chat(C, "You don't have a tongue to shoot!") + return + + tongue.Remove(C, special = TRUE) + var/obj/item/hardened_spike/spike = new spike_path(get_turf(C), C) + tongue.forceMove(spike) + spike.throw_at(get_edge_target_turf(C,C.dir), 14, 4, C) + +/obj/item/hardened_spike + name = "biomass spike" + desc = "Hardened biomass, shaped into a spike. Very pointy!" + icon_state = "tonguespike" + force = 2 + throwforce = 15 //15 + 2 (WEIGHT_CLASS_SMALL) * 4 (EMBEDDED_IMPACT_PAIN_MULTIPLIER) = i didnt do the math + throw_speed = 4 + embedding = list("embedded_pain_multiplier" = 4, "embed_chance" = 100, "embedded_fall_chance" = 0) + w_class = WEIGHT_CLASS_SMALL + sharpness = IS_SHARP + var/mob/living/carbon/human/fired_by + +/obj/item/hardened_spike/Initialize(mapload, firedby) + . = ..() + fired_by = firedby + addtimer(CALLBACK(src, .proc/checkembedded), 5 SECONDS) + +/obj/item/hardened_spike/proc/checkembedded() + if(ishuman(loc)) + var/mob/living/carbon/human/embedtest = loc + for(var/l in embedtest.bodyparts) + var/obj/item/bodypart/limb = l + if(src in limb.embedded_objects) + return limb + unembedded() + +/obj/item/hardened_spike/unembedded() + var/turf/T = get_turf(src) + visible_message("[src] cracks and twists, changing shape!") + for(var/i in contents) + var/obj/o = i + o.forceMove(T) + qdel(src) + +/datum/mutation/human/tongue_spike/chem + name = "Chem Spike" + desc = "Allows a creature to voluntary shoot their tongue out as biomass, allowing a long range transfer of chemicals." + quality = POSITIVE + text_gain_indication = "Your feel like you can really connect with people by throwing your voice." + instability = 15 + locked = TRUE + power = /obj/effect/proc_holder/spell/self/tongue_spike/chem + energy_coeff = 1 + synchronizer_coeff = 1 + +/obj/effect/proc_holder/spell/self/tongue_spike/chem + name = "Launch chem spike" + desc = "Shoot your tongue out in the direction you're facing, embedding it for a very small amount of damage. While the other person has the spike embedded, you can transfer your chemicals to them." + action_icon_state = "spikechem" + spike_path = /obj/item/hardened_spike/chem + +/obj/item/hardened_spike/chem + name = "chem spike" + desc = "Hardened biomass, shaped into... something." + icon_state = "tonguespikechem" + throwforce = 2 //2 + 2 (WEIGHT_CLASS_SMALL) * 0 (EMBEDDED_IMPACT_PAIN_MULTIPLIER) = i didnt do the math again but very low or smthin + embedding = list("embedded_pain_multiplier" = 0, "embed_chance" = 100, "embedded_fall_chance" = 0, "embedded_pain_chance" = 0, "embedded_ignore_throwspeed_threshold" = TRUE) //never hurts once it's in you + var/been_places = FALSE + var/datum/action/innate/send_chems/chems + +/obj/item/hardened_spike/chem/embedded(mob/living/carbon/human/embedded_mob) + if(been_places) + return + been_places = TRUE + chems = new + chems.transfered = embedded_mob + chems.spikey = src + to_chat(fired_by, "Link established! Use the \"Transfer Chemicals\" ability to send your chemicals to the linked target!") + chems.Grant(fired_by) + +/obj/item/hardened_spike/chem/unembedded() + to_chat(fired_by, "Link lost!") + QDEL_NULL(chems) + ..() + +/datum/action/innate/send_chems + icon_icon = 'icons/mob/actions/actions_genetic.dmi' + background_icon_state = "bg_spell" + check_flags = AB_CHECK_CONSCIOUS + button_icon_state = "spikechemswap" + name = "Transfer Chemicals" + desc = "Send all of your reagents into whomever the chem spike is embedded in. One use." + var/obj/item/hardened_spike/chem/spikey + var/mob/living/carbon/human/transfered + +/datum/action/innate/send_chems/Activate() + if(!ishuman(transfered) || !ishuman(owner)) + return + var/mob/living/carbon/human/transferer = owner + + to_chat(transfered, "You feel a tiny prick!") + transferer.reagents.trans_to(transfered, transferer.reagents.total_volume, 1, 1, 0) + + var/obj/item/bodypart/L = spikey.checkembedded() + + L.embedded_objects -= spikey + //this is where it would deal damage, if it transfers chems it removes itself so no damage + spikey.forceMove(get_turf(L)) + transfered.visible_message("[spikey] falls out of [transfered]!") + if(!transfered.has_embedded_objects()) + transfered.clear_alert("embeddedobject") + SEND_SIGNAL(transfered, COMSIG_CLEAR_MOOD_EVENT, "embedded") + spikey.unembedded() diff --git a/code/datums/mutations/antenna.dm b/code/datums/mutations/antenna.dm new file mode 100644 index 0000000000..a2700f7862 --- /dev/null +++ b/code/datums/mutations/antenna.dm @@ -0,0 +1,108 @@ +/datum/mutation/human/antenna + name = "Antenna" + desc = "The affected person sprouts an antenna. This is known to allow them to access common radio channels passively." + quality = POSITIVE + text_gain_indication = "You feel an antenna sprout from your forehead." + text_lose_indication = "Your antenna shrinks back down." + instability = 5 + difficulty = 8 + var/obj/item/implant/radio/antenna/linked_radio + +/obj/item/implant/radio/antenna + name = "internal antenna organ" + desc = "The internal organ part of the antenna. Science has not yet given it a good name." + icon = 'icons/obj/radio.dmi'//maybe make a unique sprite later. not important + icon_state = "walkietalkie" + +/obj/item/implant/radio/antenna/Initialize(mapload) + ..() + if (radio) + radio.name = "internal antenna" + +/datum/mutation/human/antenna/on_acquiring(mob/living/carbon/human/owner) + if(..()) + return + linked_radio = new(owner) + linked_radio.implant(owner, null, TRUE, TRUE) + +/datum/mutation/human/antenna/on_losing(mob/living/carbon/human/owner) + if(..()) + return + if(linked_radio) + linked_radio.Destroy() + +/datum/mutation/human/antenna/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut) + ..() + if(!(type in visual_indicators)) + visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "antenna", -FRONT_MUTATIONS_LAYER+1))//-MUTATIONS_LAYER+1 + +/datum/mutation/human/antenna/get_visual_indicator(mob/living/carbon/human/owner) + return visual_indicators[type][1] + +/datum/mutation/human/mindreader + name = "Mind Reader" + desc = "The affected person can look into the recent memories of others." + quality = POSITIVE + text_gain_indication = "You hear distant voices at the corners of your mind." + text_lose_indication = "The distant voices fade." + power = /obj/effect/proc_holder/spell/targeted/mindread + instability = 40 + difficulty = 8 + locked = TRUE + +/obj/effect/proc_holder/spell/targeted/mindread + name = "Mindread" + desc = "Read the target's mind." + charge_max = 300 + range = 7 + clothes_req = FALSE + action_icon_state = "mindread" + +/obj/effect/proc_holder/spell/targeted/mindread/cast(list/targets, mob/living/carbon/human/user = usr) + for(var/mob/living/M in targets) + if(usr.anti_magic_check(FALSE, FALSE, TRUE, 0) || M.anti_magic_check(FALSE, FALSE, TRUE, 0)) + to_chat(usr, "As you reach out with your mind, you're suddenly stopped by a vision of a massive tinfoil wall that streches beyond visible range. It seems you've been foiled.") + return + if(M.stat == DEAD) + to_chat(user, "[M] is dead!") + return + if(M.mind) + to_chat(user, "You plunge into [M]'s mind...") + if(prob(20)) + to_chat(M, "You feel something foreign enter your mind.")//chance to alert the read-ee + var/list/recent_speech = list() + var/list/say_log = list() + var/log_source = M.logging + for(var/log_type in log_source)//this whole loop puts the read-ee's say logs into say_log in an easy to access way + var/nlog_type = text2num(log_type) + if(nlog_type & LOG_SAY) + var/list/reversed = log_source[log_type] + if(islist(reversed)) + say_log = reverseRange(reversed.Copy()) + break + if(LAZYLEN(say_log)) + for(var/spoken_memory in say_log) + if(recent_speech.len >= 3)//up to 3 random lines of speech, favoring more recent speech + break + if(prob(50)) + recent_speech[spoken_memory] = say_log[spoken_memory] + if(recent_speech.len) + to_chat(user, "You catch some drifting memories of their past conversations...") + for(var/spoken_memory in recent_speech) + to_chat(user, "[recent_speech[spoken_memory]]") + if(iscarbon(M)) + var/mob/living/carbon/human/H = M + to_chat(user, "You find that their intent is to [H.a_intent]...") + var/datum/dna/the_dna = H.has_dna() + if(the_dna) + to_chat(user, "You uncover that [H.p_their()] true identity is [the_dna.real_name].") + else + to_chat(user, "You can't find a mind to read inside of [M]!") + +/datum/mutation/human/mindreader/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut) + ..() + if(!(type in visual_indicators)) + visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "antenna", -FRONT_MUTATIONS_LAYER+1)) + +/datum/mutation/human/mindreader/get_visual_indicator(mob/living/carbon/human/owner) + return visual_indicators[type][1] diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm index a32220aa43..e229fdde9a 100644 --- a/code/datums/mutations/body.dm +++ b/code/datums/mutations/body.dm @@ -3,16 +3,19 @@ //Epilepsy gives a very small chance to have a seizure every life tick, knocking you unconscious. /datum/mutation/human/epilepsy name = "Epilepsy" + desc = "A genetic defect that sporadically causes seizures." quality = NEGATIVE text_gain_indication = "You get a headache." + synchronizer_coeff = 1 + power_coeff = 1 /datum/mutation/human/epilepsy/on_life(mob/living/carbon/human/owner) - if(prob(1) && owner.stat == CONSCIOUS) + if(prob(1 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS) owner.visible_message("[owner] starts having a seizure!", "You have a seizure!") - owner.Unconscious(200) - owner.Jitter(1000) + owner.Unconscious(200 * GET_MUTATION_POWER(src)) + owner.Jitter(1000 * GET_MUTATION_POWER(src)) SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "epilepsy", /datum/mood_event/epilepsy) - addtimer(CALLBACK(src, .proc/jitter_less, owner), 90) + addtimer(CALLBACK(src, .proc/jitter_less), 90) /datum/mutation/human/epilepsy/proc/jitter_less(mob/living/carbon/human/owner) if(owner) @@ -22,19 +25,23 @@ //Unstable DNA induces random mutations! /datum/mutation/human/bad_dna name = "Unstable DNA" + desc = "Strange mutation that causes the holder to randomly mutate." quality = NEGATIVE text_gain_indication = "You feel strange." + locked = TRUE /datum/mutation/human/bad_dna/on_acquiring(mob/living/carbon/human/owner) + if(..()) + return to_chat(owner, text_gain_indication) var/mob/new_mob if(prob(95)) if(prob(50)) - new_mob = owner.randmutb() + new_mob = owner.easy_randmut(NEGATIVE + MINOR_NEGATIVE) else new_mob = owner.randmuti() else - new_mob = owner.randmutg() + new_mob = owner.easy_randmut(POSITIVE) if(new_mob && ismob(new_mob)) owner = new_mob . = owner @@ -44,21 +51,31 @@ //Cough gives you a chronic cough that causes you to drop items. /datum/mutation/human/cough name = "Cough" + desc = "A chronic cough." quality = MINOR_NEGATIVE text_gain_indication = "You start coughing." + synchronizer_coeff = 1 + power_coeff = 1 /datum/mutation/human/cough/on_life(mob/living/carbon/human/owner) - if(prob(5) && owner.stat == CONSCIOUS) + if(prob(5 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS) owner.drop_all_held_items() owner.emote("cough") + if(GET_MUTATION_POWER(src) > 1) + var/cough_range = GET_MUTATION_POWER(src) * 4 + var/turf/target = get_ranged_target_turf(owner, turn(owner.dir, 180), cough_range) + owner.throw_at(target, cough_range, GET_MUTATION_POWER(src)) + //Dwarfism shrinks your body and lets you pass tables. /datum/mutation/human/dwarfism name = "Dwarfism" + desc = "A mutation believed to be the cause of dwarfism." quality = POSITIVE - get_chance = 15 - lowest_value = 256 * 12 + difficulty = 16 + instability = 5 + locked = TRUE // Default intert species for now, so locked from regular pool. /datum/mutation/human/dwarfism/on_acquiring(mob/living/carbon/human/owner) if(..()) @@ -78,6 +95,7 @@ //Clumsiness has a very large amount of small drawbacks depending on item. /datum/mutation/human/clumsy name = "Clumsiness" + desc = "A genome that inhibits certain brain functions, causing the holder to appear clumsy. Honk" quality = MINOR_NEGATIVE text_gain_indication = "You feel lightheaded." @@ -95,11 +113,13 @@ //Tourettes causes you to randomly stand in place and shout. /datum/mutation/human/tourettes name = "Tourette's Syndrome" + desc = "A chronic twitch that forces the user to use colorful language." quality = NEGATIVE text_gain_indication = "You twitch." + synchronizer_coeff = 1 /datum/mutation/human/tourettes/on_life(mob/living/carbon/human/owner) - if(prob(10) && owner.stat == CONSCIOUS && !owner.IsStun()) + if(prob(10 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS && !owner.IsStun()) owner.Stun(200) switch(rand(1, 3)) if(1) @@ -117,6 +137,7 @@ //Deafness makes you deaf. /datum/mutation/human/deaf name = "Deafness" + desc = "The holder of this genome is completely deaf." quality = NEGATIVE text_gain_indication = "You can't seem to hear anything." @@ -134,8 +155,10 @@ //Monified turns you into a monkey. /datum/mutation/human/race name = "Monkified" + desc = "A strange genome, believing to be what differentiates monkeys from humans." quality = NEGATIVE time_coeff = 2 + locked = TRUE //Species specific, keep out of actual gene pool /datum/mutation/human/race/on_acquiring(mob/living/carbon/human/owner) if(..()) @@ -145,3 +168,202 @@ /datum/mutation/human/race/on_losing(mob/living/carbon/monkey/owner) if(owner && istype(owner) && owner.stat != DEAD && (owner.dna.mutations.Remove(src))) . = owner.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_KEEPSE) + + +/datum/mutation/human/glow + name = "Glowy" + desc = "You permanently emit a light with a random color and intensity." + quality = POSITIVE + text_gain_indication = "Your skin begins to glow softly." + instability = 5 + var/obj/effect/dummy/luminescent_glow/glowth //shamelessly copied from luminescents + var/glow = 1.5 + power_coeff = 1 + +/datum/mutation/human/glow/on_acquiring(mob/living/carbon/human/owner) + if(..()) + return + glowth = new(owner) + glowth.set_light(glow, glow, dna.features["mcolor"]) + +/datum/mutation/human/glow/modify(mob/living/carbon/human/owner) + if(glowth) + glowth.set_light(glow + GET_MUTATION_POWER(src) , glow + GET_MUTATION_POWER(src), dna.features["mcolor"]) + +/datum/mutation/human/glow/on_losing(mob/living/carbon/human/owner) + if(..()) + return + qdel(glowth) + +/datum/mutation/human/strong + name = "Strength" + desc = "The user's muscles slightly expand." + quality = POSITIVE + text_gain_indication = "You feel strong." + difficulty = 16 + +/datum/mutation/human/fire + name = "Fiery Sweat" + desc = "The user's skin will randomly combust, but is generally alot more resilient to burning." + quality = NEGATIVE + text_gain_indication = "You feel hot." + text_lose_indication = "You feel a lot cooler." + difficulty = 14 + synchronizer_coeff = 1 + power_coeff = 1 + +/datum/mutation/human/fire/on_life(mob/living/carbon/human/owner) + if(prob((1+(100-dna.stability)/10)) * GET_MUTATION_SYNCHRONIZER(src)) + owner.adjust_fire_stacks(2 * GET_MUTATION_POWER(src)) + owner.IgniteMob() + +/datum/mutation/human/fire/on_acquiring(mob/living/carbon/human/owner) + if(..()) + return + owner.physiology.burn_mod *= 0.5 + +/datum/mutation/human/fire/on_losing(mob/living/carbon/human/owner) + if(..()) + return + owner.physiology.burn_mod *= 2 + +/datum/mutation/human/insulated + name = "Insulated" + desc = "The affected person does not conduct electricity." + quality = POSITIVE + text_gain_indication = "Your fingertips go numb." + text_lose_indication = "Your fingertips regain feeling." + difficulty = 16 + instability = 25 + +/datum/mutation/human/insulated/on_acquiring(mob/living/carbon/human/owner) + if(..()) + return + ADD_TRAIT(owner, TRAIT_SHOCKIMMUNE, "genetics") + +/datum/mutation/human/insulated/on_losing(mob/living/carbon/human/owner) + if(..()) + return + REMOVE_TRAIT(owner, TRAIT_SHOCKIMMUNE, "genetics") + + +/datum/mutation/human/glow/anti + name = "Anti-Glow" + desc = "Your skin seems to attract and absorb nearby light creating 'darkness' around you." + text_gain_indication = "Your light around you seems to disappear." + glow = -3.5 //Slightly stronger, since negating light tends to be harder than making it. + locked = TRUE + +/datum/mutation/human/stimmed + name = "Stimmed" + desc = "The user's chemical balance is more robust." + quality = POSITIVE + text_gain_indication = "You feel stimmed." + difficulty = 16 + +/datum/mutation/human/paranoia + name = "Paranoia" + desc = "Subject is easily terrified, and may suffer from hallucinations." + quality = NEGATIVE + text_gain_indication = "You feel screams echo through your mind..." + text_lose_indication = "The screaming in your mind fades." + +/datum/mutation/human/paranoia/on_life(mob/living/carbon/human/owner) + if(prob(5) && owner.stat == CONSCIOUS) + owner.emote("scream") + owner.jitteriness = min(max(0, owner.jitteriness + 5), 30) + if(prob(25)) + to_chat(owner,"You feel someone creeping in on you...") + owner.hallucination += 20 + + +/datum/mutation/human/badblink + name = "Spatial Instability" + desc = "The victim of the mutation has a very weak link to spatial reality, and may be displaced. Often causes extreme nausea." + quality = NEGATIVE + text_gain_indication = "The space around you twists sickeningly." + text_lose_indication = "The space around you settles back to normal." + difficulty = 18//high so it's hard to unlock and abuse + instability = 10 + synchronizer_coeff = 1 + energy_coeff = 1 + power_coeff = 1 + var/warpchance = 0 + +/datum/mutation/human/badblink/on_life() + if (!owner) + return + if(prob(warpchance)) + var/warpmessage = pick( + "With a sickening 720-degree twist of [owner.p_their()] back, [owner] vanishes into thin air.", + "[owner] does some sort of strange backflip into another dimension. It looks pretty painful.", + "[owner] does a jump to the left, a step to the right, and warps out of reality.", + "[owner]'s torso starts folding inside out until it vanishes from reality, taking [owner] with it.", + "One moment, you see [owner]. The next, [owner] is gone.") + owner.visible_message(warpmessage, "You feel a wave of nausea as you fall through reality!") + var/warpdistance = rand(10,15) * GET_MUTATION_POWER(src) + do_teleport(owner, get_turf(owner), warpdistance, channel = TELEPORT_CHANNEL_FREE) + owner.adjust_disgust(GET_MUTATION_SYNCHRONIZER(src) * (warpchance * warpdistance)) + warpchance = 0 + owner.visible_message("[owner] appears out of nowhere!") + else + warpchance += 0.25 * GET_MUTATION_ENERGY(src) + +/datum/mutation/human/acidflesh + name = "Acidic Flesh" + desc = "Subject has acidic chemicals building up underneath the skin. This is often lethal." + quality = NEGATIVE + text_gain_indication = "A horrible burning sensation envelops you as your flesh turns to acid!" + text_lose_indication = "A feeling of relief fills you as your flesh goes back to normal." + difficulty = 18//high so it's hard to unlock and use on others + var/msgcooldown = 0 + +/datum/mutation/human/acidflesh/on_life() + if(prob(25)) + if(world.time > msgcooldown) + to_chat(owner, "Your acid flesh bubbles...") + msgcooldown = world.time + 200 + if(prob(15)) + owner.acid_act(rand(30,50), 10) + owner.visible_message("[owner]'s skin bubbles and pops.", "Your bubbling flesh pops! It burns!") + playsound(owner,'sound/weapons/sear.ogg', 50, TRUE) + +/datum/mutation/human/gigantism + name = "Gigantism"//negative version of dwarfism + desc = "The cells within the subject spread out to cover more area, making the subject appear larger." + quality = MINOR_NEGATIVE + difficulty = 12 + +/datum/mutation/human/gigantism/on_acquiring(mob/living/carbon/human/owner) + if(..()) + return + owner.resize = 1.25 + owner.update_transform() + owner.visible_message("[owner] suddenly grows!", "Everything around you seems to shrink..") + +/datum/mutation/human/gigantism/on_losing(mob/living/carbon/human/owner) + if(..()) + return + owner.resize = 0.8 + owner.update_transform() + owner.visible_message("[owner] suddenly shrinks!", "Everything around you seems to grow..") + +/datum/mutation/human/spastic + name = "Spastic" + desc = "Subject suffers from muscle spasms." + quality = NEGATIVE + text_gain_indication = "You flinch." + text_lose_indication = "Your flinching subsides." + difficulty = 16 + +/datum/mutation/human/spastic/on_acquiring() + if(..()) + return + if (owner) + owner.apply_status_effect(STATUS_EFFECT_SPASMS) + +/datum/mutation/human/spastic/on_losing() + if(..()) + return + if (owner) + owner.remove_status_effect(STATUS_EFFECT_SPASMS) diff --git a/code/datums/mutations/chameleon.dm b/code/datums/mutations/chameleon.dm index da10510970..7682351ebf 100644 --- a/code/datums/mutations/chameleon.dm +++ b/code/datums/mutations/chameleon.dm @@ -1,12 +1,13 @@ //Chameleon causes the owner to slowly become transparent when not moving. /datum/mutation/human/chameleon name = "Chameleon" + desc = "A genome that causes the holder's skin to become transparent over time." quality = POSITIVE - get_chance = 20 - lowest_value = 256 * 12 + difficulty = 16 text_gain_indication = "You feel one with your surroundings." text_lose_indication = "You feel oddly exposed." time_coeff = 5 + instability = 25 /datum/mutation/human/chameleon/on_acquiring(mob/living/carbon/human/owner) if(..()) diff --git a/code/datums/mutations/cold.dm b/code/datums/mutations/cold.dm new file mode 100644 index 0000000000..55dc309eae --- /dev/null +++ b/code/datums/mutations/cold.dm @@ -0,0 +1,43 @@ +/datum/mutation/human/geladikinesis + name = "Geladikinesis" + desc = "Allows the user to concentrate moisture and sub-zero forces into snow." + quality = POSITIVE + text_gain_indication = "Your hand feels cold." + instability = 10 + difficulty = 10 + synchronizer_coeff = 1 + power = /obj/effect/proc_holder/spell/targeted/conjure_item/snow + +/obj/effect/proc_holder/spell/targeted/conjure_item/snow + name = "Create Snow" + desc = "Concentrates cryokinetic forces to create snow, useful for snow-like construction." + item_type = /obj/item/stack/sheet/mineral/snow + charge_max = 50 + action_icon_state = "snow" + delete_old = FALSE + + +/datum/mutation/human/cryokinesis + name = "Cryokinesis" + desc = "Draws negative energy from the sub-zero void to freeze surrounding temperatures at subject's will." + quality = POSITIVE //upsides and downsides + text_gain_indication = "Your hand feels cold." + instability = 20 + difficulty = 12 + synchronizer_coeff = 1 + power = /obj/effect/proc_holder/spell/aimed/cryo + +/obj/effect/proc_holder/spell/aimed/cryo + name = "Cryobeam" + desc = "This power fires a frozen bolt at a target." + charge_max = 150 + cooldown_min = 150 + clothes_req = FALSE + range = 3 + projectile_type = /obj/item/projectile/temp/cryo + base_icon_state = "icebeam" + action_icon_state = "icebeam" + active_msg = "You focus your cryokinesis!" + deactive_msg = "You relax." + active = FALSE + diff --git a/code/datums/mutations/cold_resistance.dm b/code/datums/mutations/cold_resistance.dm deleted file mode 100644 index 3d8fbababa..0000000000 --- a/code/datums/mutations/cold_resistance.dm +++ /dev/null @@ -1,32 +0,0 @@ -//Cold Resistance gives your entire body an orange halo, and makes you immune to the effects of vacuum and cold. -/datum/mutation/human/cold_resistance - name = "Cold Resistance" - quality = POSITIVE - get_chance = 25 - lowest_value = 256 * 12 - text_gain_indication = "Your body feels warm!" - time_coeff = 5 - -/datum/mutation/human/cold_resistance/New() - ..() - visual_indicators |= mutable_appearance('icons/effects/genetics.dmi', "fire", -MUTATIONS_LAYER) - -/datum/mutation/human/cold_resistance/get_visual_indicator(mob/living/carbon/human/owner) - return visual_indicators[1] - -/datum/mutation/human/cold_resistance/on_acquiring(mob/living/carbon/human/owner) - if(..()) - return - ADD_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance") -// ADD_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance") CITADEL CHANGE - -/datum/mutation/human/cold_resistance/on_losing(mob/living/carbon/human/owner) - if(..()) - return - REMOVE_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance") -// REMOVE_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance") CITADEL CHANGE - -/datum/mutation/human/cold_resistance/on_life(mob/living/carbon/human/owner) - if(owner.getFireLoss()) - if(prob(1)) - owner.heal_bodypart_damage(0,1) //Is this really needed? diff --git a/code/datums/mutations/combined.dm b/code/datums/mutations/combined.dm new file mode 100644 index 0000000000..5fc9df7550 --- /dev/null +++ b/code/datums/mutations/combined.dm @@ -0,0 +1,32 @@ +/datum/generecipe + var/required = "" //it hurts so bad but initial is not compatible with lists + var/result = null + +/proc/get_mixed_mutation(mutation1, mutation2) + if(!mutation1 || !mutation2) + return FALSE + if(mutation1 == mutation2) //this could otherwise be bad + return FALSE + for(var/A in GLOB.mutation_recipes) + if(findtext(A, "[mutation1]") && findtext(A, "[mutation2]")) + return GLOB.mutation_recipes[A] + +/datum/generecipe/x_ray + required = "/datum/mutation/human/thermal; /datum/mutation/human/radioactive" + result = /datum/mutation/human/thermal/x_ray + +/datum/generecipe/shock + required = "/datum/mutation/human/insulated; /datum/mutation/human/radioactive" + result = SHOCKTOUCH + +/datum/generecipe/mindread + required = "/datum/mutation/human/antenna; /datum/mutation/human/paranoia" + result = MINDREAD + +/datum/generecipe/antiglow + required = "/datum/mutation/human/glow; /datum/mutation/human/void" + result = ANTIGLOWY + +/datum/generecipe/tonguechem + required = "/datum/mutation/human/tongue_spike; /datum/mutation/human/stimmed" + result = TONGUESPIKECHEM \ No newline at end of file diff --git a/code/datums/mutations/hulk.dm b/code/datums/mutations/hulk.dm index c536196e95..eb6c9665f3 100644 --- a/code/datums/mutations/hulk.dm +++ b/code/datums/mutations/hulk.dm @@ -1,12 +1,13 @@ //Hulk turns your skin green, and allows you to punch through walls. /datum/mutation/human/hulk name = "Hulk" + desc = "A poorly understood genome that causes the holder's muscles to expand, inhibit speech and gives the person a bad skin condition." quality = POSITIVE - get_chance = 15 - lowest_value = 256 * 12 + locked = TRUE + difficulty = 16 text_gain_indication = "Your muscles hurt!" - species_allowed = list("fly") //no skeleton/lizard hulk health_req = 25 + instability = 40 /datum/mutation/human/hulk/on_acquiring(mob/living/carbon/human/owner) if(..()) @@ -18,7 +19,7 @@ SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "hulk", /datum/mood_event/hulk) RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech) -/datum/mutation/human/hulk/on_attack_hand(mob/living/carbon/human/owner, atom/target, proximity) +/datum/mutation/human/hulk/on_attack_hand(mob/living/carbon/human/owner,atom/target, proximity) if(proximity) //no telekinetic hulk attack return target.attack_hulk(owner) @@ -32,7 +33,7 @@ return REMOVE_TRAIT(owner, TRAIT_STUNIMMUNE, TRAIT_HULK) REMOVE_TRAIT(owner, TRAIT_PUSHIMMUNE, TRAIT_HULK) - ADD_TRAIT(owner, TRAIT_CHUNKYFINGERS, TRAIT_HULK) + REMOVE_TRAIT(owner, TRAIT_CHUNKYFINGERS, TRAIT_HULK) owner.update_body_parts() SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "hulk") UnregisterSignal(owner, COMSIG_MOB_SAY) diff --git a/code/datums/mutations/radioactive.dm b/code/datums/mutations/radioactive.dm new file mode 100644 index 0000000000..f76e6885d0 --- /dev/null +++ b/code/datums/mutations/radioactive.dm @@ -0,0 +1,19 @@ +/datum/mutation/human/radioactive + name = "Radioactivity" + desc = "A volatile mutation that causes the host to sent out deadly beta radiation. This affects both the hosts and their surroundings." + quality = NEGATIVE + text_gain_indication = "You can feel it in your bones!" + time_coeff = 5 + instability = 5 + difficulty = 8 + +/datum/mutation/human/radioactive/on_life(mob/living/carbon/human/owner) + radiation_pulse(owner, 20) + +/datum/mutation/human/radioactive/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut) + ..() + if(!(type in visual_indicators)) + visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "radiation", -MUTATIONS_LAYER)) + +/datum/mutation/human/radioactive/get_visual_indicator() + return visual_indicators[type][1] \ No newline at end of file diff --git a/code/datums/mutations/sight.dm b/code/datums/mutations/sight.dm index 1f23a92906..c8bc1a1597 100644 --- a/code/datums/mutations/sight.dm +++ b/code/datums/mutations/sight.dm @@ -1,6 +1,7 @@ //Nearsightedness restricts your vision by several tiles. /datum/mutation/human/nearsight name = "Near Sightness" + desc = "The holder of this mutation has poor eyesight." quality = MINOR_NEGATIVE text_gain_indication = "You can't see very well." @@ -18,6 +19,7 @@ //Blind makes you blind. Who knew? /datum/mutation/human/blind name = "Blindness" + desc = "Renders the subject completely blind." quality = NEGATIVE text_gain_indication = "You can't seem to see anything." @@ -32,43 +34,58 @@ owner.cure_blind(GENETIC_MUTATION) -//X-ray Vision lets you see through walls. -/datum/mutation/human/x_ray - name = "X Ray Vision" +///Thermal Vision lets you see mobs through walls +/datum/mutation/human/thermal + name = "Thermal Vision" + desc = "The user of this genome can visually percieve the unique human thermal signature." quality = POSITIVE - get_chance = 25 - lowest_value = 256 * 12 - text_gain_indication = "The walls suddenly disappear!" + difficulty = 18 + text_gain_indication = "You can see the heat rising off of your skin..." time_coeff = 2 + instability = 25 + var/visionflag = TRAIT_THERMAL_VISION -/datum/mutation/human/x_ray/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/human/thermal/on_acquiring(mob/living/carbon/human/owner) if(..()) return + ADD_TRAIT(owner, visionflag, GENETIC_MUTATION) owner.update_sight() -/datum/mutation/human/x_ray/on_losing(mob/living/carbon/human/owner) +/datum/mutation/human/thermal/on_losing(mob/living/carbon/human/owner) if(..()) return + REMOVE_TRAIT(owner, visionflag, GENETIC_MUTATION) owner.update_sight() +///X-ray Vision lets you see through walls. +/datum/mutation/human/thermal/x_ray + name = "X Ray Vision" + desc = "A strange genome that allows the user to see between the spaces of walls." //actual x-ray would mean you'd constantly be blasting rads, wich might be fun for later //hmb + text_gain_indication = "The walls suddenly disappear!" + instability = 35 + locked = TRUE + visionflag = TRAIT_XRAY_VISION + //Laser Eyes lets you shoot lasers from your eyes! /datum/mutation/human/laser_eyes name = "Laser Eyes" + desc = "Reflects concentrated light back from the eyes." quality = POSITIVE - dna_block = NON_SCANNABLE + locked = TRUE + difficulty = 16 text_gain_indication = "You feel pressure building up behind your eyes." layer_used = FRONT_MUTATIONS_LAYER limb_req = BODY_ZONE_HEAD -/datum/mutation/human/laser_eyes/New() +/datum/mutation/human/laser_eyes/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut) ..() visual_indicators |= mutable_appearance('icons/effects/genetics.dmi', "lasereyes", -FRONT_MUTATIONS_LAYER) -/datum/mutation/human/laser_eyes/get_visual_indicator(mob/living/carbon/human/owner) +/datum/mutation/human/laser_eyes/get_visual_indicator() return visual_indicators[1] -/datum/mutation/human/laser_eyes/on_ranged_attack(mob/living/carbon/human/owner, atom/target, mouseparams) +/datum/mutation/human/laser_eyes/on_ranged_attack(atom/target, mouseparams) if(owner.a_intent == INTENT_HARM) owner.LaserEyes(target, mouseparams) diff --git a/code/datums/mutations/space_adaptation.dm b/code/datums/mutations/space_adaptation.dm new file mode 100644 index 0000000000..90535fbf6e --- /dev/null +++ b/code/datums/mutations/space_adaptation.dm @@ -0,0 +1,30 @@ +//Cold Resistance gives your entire body an orange halo, and makes you immune to the effects of vacuum and cold. +/datum/mutation/human/space_adaptation + name = "Space Adaptation" + desc = "A strange mutation that renders the host immune to the vacuum if space. Will still need an oxygen supply." + quality = POSITIVE + difficulty = 16 + text_gain_indication = "Your body feels warm!" + time_coeff = 5 + instability = 30 + +/datum/mutation/human/space_adaptation/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut) + ..() + if(!(type in visual_indicators)) + visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "fire", -MUTATIONS_LAYER)) + +/datum/mutation/human/space_adaptation/get_visual_indicator(mob/living/carbon/human/owner) + return visual_indicators[type][1] + +/datum/mutation/human/space_adaptation/on_acquiring(mob/living/carbon/human/owner) + if(..()) + return + ADD_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance") + ADD_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance") + +/datum/mutation/human/space_adaptation/on_losing(mob/living/carbon/human/owner) + if(..()) + return + REMOVE_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance") + REMOVE_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance") + diff --git a/code/datums/mutations/speech.dm b/code/datums/mutations/speech.dm index 82138e6e34..5716b2595b 100644 --- a/code/datums/mutations/speech.dm +++ b/code/datums/mutations/speech.dm @@ -3,6 +3,7 @@ /datum/mutation/human/nervousness name = "Nervousness" + desc = "Causes the holder to stutter." quality = MINOR_NEGATIVE text_gain_indication = "You feel nervous." @@ -13,6 +14,7 @@ /datum/mutation/human/wacky name = "Wacky" + desc = "Unknown." quality = MINOR_NEGATIVE text_gain_indication = "You feel an off sensation in your voicebox." text_lose_indication = "The off sensation passes." @@ -34,6 +36,7 @@ /datum/mutation/human/mute name = "Mute" + desc = "Completely inhibits the vocal section of the brain." quality = NEGATIVE text_gain_indication = "You feel unable to express yourself at all." text_lose_indication = "You feel able to speak freely again." @@ -53,8 +56,8 @@ /datum/mutation/human/smile name = "Smile" + desc = "Causes the user to be in constant mania." quality = MINOR_NEGATIVE - dna_block = NON_SCANNABLE text_gain_indication = "You feel so happy. Nothing can be wrong with anything. :)" text_lose_indication = "Everything is terrible again. :(" @@ -95,7 +98,6 @@ message = replacetext(message," ugly "," beautiful ") message = replacetext(message," douchbag "," nice guy ") message = replacetext(message," whore "," lady ") - message = replacetext(message," gamer "," intellectual ") message = replacetext(message," nerd "," smarty pants ") message = replacetext(message," moron "," fun person ") message = replacetext(message," IT'S LOOSE "," EVERYTHING IS FINE ") @@ -121,8 +123,8 @@ /datum/mutation/human/unintelligible name = "Unintelligible" + desc = "Partially inhibits the vocal center of the brain, severely distorting speech." quality = NEGATIVE - dna_block = NON_SCANNABLE text_gain_indication = "You can't seem to form any coherent thoughts!" text_lose_indication = "Your mind feels more clear." @@ -141,8 +143,9 @@ /datum/mutation/human/swedish name = "Swedish" + desc = "A horrible mutation originating from the distant past. Thought to be eradicated after the incident in 2037." quality = MINOR_NEGATIVE - dna_block = NON_SCANNABLE + locked = TRUE text_gain_indication = "You feel Swedish, however that works." text_lose_indication = "The feeling of Swedishness passes." @@ -173,8 +176,8 @@ /datum/mutation/human/chav name = "Chav" + desc = "Unknown" quality = MINOR_NEGATIVE - dna_block = NON_SCANNABLE text_gain_indication = "Ye feel like a reet prat like, innit?" text_lose_indication = "You no longer feel like being rude and sassy." @@ -220,12 +223,13 @@ /datum/mutation/human/elvis name = "Elvis" + desc = "A terrifying mutation named after its 'patient-zero'." quality = MINOR_NEGATIVE - dna_block = NON_SCANNABLE + locked = TRUE text_gain_indication = "You feel pretty good, honeydoll." text_lose_indication = "You feel a little less conversation would be great." -/datum/mutation/human/elvis/on_life(mob/living/carbon/human/owner) +/datum/mutation/human/elvis/on_life() switch(pick(1,2)) if(1) if(prob(15)) @@ -266,8 +270,9 @@ /datum/mutation/human/stoner name = "Stoner" + desc = "A common mutation that severely decreases intelligence." quality = NEGATIVE - dna_block = NON_SCANNABLE + locked = TRUE text_gain_indication = "You feel...totally chill, man!" text_lose_indication = "You feel like you have a better sense of time." diff --git a/code/datums/mutations/telekinesis.dm b/code/datums/mutations/telekinesis.dm index a5b15eacb8..b03ac04027 100644 --- a/code/datums/mutations/telekinesis.dm +++ b/code/datums/mutations/telekinesis.dm @@ -1,18 +1,20 @@ //Telekinesis lets you interact with objects from range, and gives you a light blue halo around your head. /datum/mutation/human/telekinesis name = "Telekinesis" + desc = "A strange mutation that allows the holder to interact with objects through thought." quality = POSITIVE - get_chance = 20 - lowest_value = 256 * 12 + difficulty = 18 text_gain_indication = "You feel smarter!" limb_req = BODY_ZONE_HEAD + instability = 30 -/datum/mutation/human/telekinesis/New() +/datum/mutation/human/telekinesis/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut) ..() - visual_indicators |= mutable_appearance('icons/effects/genetics.dmi', "telekinesishead", -MUTATIONS_LAYER) + if(!(type in visual_indicators)) + visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "telekinesishead", -MUTATIONS_LAYER)) /datum/mutation/human/telekinesis/get_visual_indicator(mob/living/carbon/human/owner) - return visual_indicators[1] + return visual_indicators[type][1] /datum/mutation/human/telekinesis/on_ranged_attack(mob/living/carbon/human/owner, atom/target) - target.attack_tk(owner) + target.attack_tk(owner) \ No newline at end of file diff --git a/code/datums/ruins/lavaland.dm b/code/datums/ruins/lavaland.dm index 02c12a34f4..06d62dfd96 100644 --- a/code/datums/ruins/lavaland.dm +++ b/code/datums/ruins/lavaland.dm @@ -168,7 +168,8 @@ id = "alien-nest" description = "Not even Necropolis is safe from alien infestation. The competition for hosts has locked the legion and aliens in an endless conflict that can only be resolved by a PKA." suffix = "lavaland_surface_alien_nest.dmm" - cost = 20 + cost = 10 + allow_duplicates = FALSE /datum/map_template/ruin/lavaland/fountain name = "Fountain Hall" @@ -176,6 +177,7 @@ description = "The fountain has a warning on the side. DANGER: May have undeclared side effects that only become obvious when implemented." suffix = "lavaland_surface_fountain_hall.dmm" cost = 5 + allow_duplicates = FALSE /datum/map_template/ruin/lavaland/survivalcapsule name = "Survival Capsule Ruins" @@ -198,7 +200,7 @@ description = "A place of vile worship, the scrawling of blood in the middle glowing eerily. A demonic laugh echoes throughout the caverns" suffix = "lavaland_surface_cultaltar.dmm" allow_duplicates = FALSE - cost = 10 + cost = 5 /datum/map_template/ruin/lavaland/hermit name = "Makeshift Shelter" @@ -244,6 +246,7 @@ description = "A strange tumor which houses a powerful beast..." suffix = "lavaland_surface_elite_tumor.dmm" cost = 5 + placement_weight = 3 always_place = TRUE allow_duplicates = TRUE @@ -255,4 +258,4 @@ suffix = "miningbase.dmm" cost = 0 always_place = TRUE - unpickable = TRUE \ No newline at end of file + unpickable = TRUE diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index d04cf3939f..ce71bdb212 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -128,6 +128,7 @@ /datum/status_effect/electrode id = "tased" + alert_type = null var/slowdown = 1.5 var/slowdown_priority = 50 //to make sure the stronger effect overrides var/affect_crawl = FALSE @@ -155,7 +156,11 @@ /datum/status_effect/electrode/tick() var/diff = world.time - last_tick if(owner) - owner.adjustStaminaLoss(max(0, stamdmg_per_ds * diff)) //if you really want to try to stamcrit someone with a taser alone, you can, but it'll take time and good timing. + var/mob/living/carbon/C = owner + if(HAS_TRAIT(C, TRAIT_TASED_RESISTANCE)) + qdel(src) + else + C.adjustStaminaLoss(max(0, stamdmg_per_ds * diff)) //if you really want to try to stamcrit someone with a taser alone, you can, but it'll take time and good timing. last_tick = world.time /datum/status_effect/electrode/nextmove_modifier() //why is this a proc. its no big deal since this doesnt get called often at all but literally w h y @@ -172,6 +177,8 @@ . = ..() if(iscarbon(owner)) var/mob/living/carbon/C = owner + if(HAS_TRAIT(C, TRAIT_TASED_RESISTANCE)) + return if(C.combatmode) C.toggle_combat_mode(TRUE) @@ -794,3 +801,26 @@ datum/status_effect/pacify to_chat(owner, "Your arm spasms!") owner.log_message("threw [I] due to a Muscle Spasm", LOG_ATTACK) owner.throw_item(pick(targets)) + +/datum/status_effect/dna_melt + id = "dna_melt" + duration = 600 + status_type = STATUS_EFFECT_REPLACE + alert_type = /obj/screen/alert/status_effect/dna_melt + var/kill_either_way = FALSE //no amount of removing mutations is gonna save you now + +/datum/status_effect/dna_melt/on_creation(mob/living/new_owner, set_duration, updating_canmove) + . = ..() + to_chat(new_owner, "My body can't handle the mutations! I need to get my mutations removed fast!") + +/datum/status_effect/dna_melt/on_remove() + if(!ishuman(owner)) + owner.gib() //fuck you in particular + return + var/mob/living/carbon/human/H = owner + H.something_horrible(kill_either_way) + +/obj/screen/alert/status_effect/dna_melt + name = "Genetic Breakdown" + desc = "I don't feel so good. Your body can't handle the mutations! You have one minute to remove your mutations, or you will be met with a horrible fate." + icon_state = "dna_melt" \ No newline at end of file diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 00dc0d98d6..ac56d6f17c 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -63,6 +63,9 @@ var/xenobiology_compatible = FALSE //Can the Xenobio management console transverse this area by default? var/list/canSmoothWithAreas //typecache to limit the areas that atoms in this area can smooth with + /// Color on minimaps, if it's null (which is default) it makes one at random. + var/minimap_color + /** * These two vars allow for multiple unique areas to be linked to a master area * and share some functionalities such as APC powernet nodes, fire alarms etc, without sacrificing @@ -96,7 +99,14 @@ GLOBAL_LIST_EMPTY(teleportlocs) // === /area/New() - // This interacts with the map loader, so it needs to be set immediately + if(!minimap_color) // goes in New() because otherwise it doesn't fucking work + // generate one using the icon_state + if(icon_state && icon_state != "unknown") + var/icon/I = new(icon, icon_state, dir) + I.Scale(1,1) + minimap_color = I.GetPixel(1,1) + else // no icon state? use random. + minimap_color = rgb(rand(50,70),rand(50,70),rand(50,70)) // This interacts with the map loader, so it needs to be set immediately // rather than waiting for atoms to initialize. if (unique) GLOB.areas_by_type[type] = src diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_events.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_events.dm index 23e94c4065..1ee226875b 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_events.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_events.dm @@ -2,6 +2,7 @@ ruletype = "Event" var/typepath // typepath of the event var/triggering + var/earliest_start = 20 MINUTES /datum/dynamic_ruleset/event/get_blackbox_info() var/list/ruleset_data = list() @@ -25,8 +26,10 @@ return E -/datum/dynamic_ruleset/event/ready(forced = FALSE) // same as midround cause we're still using enemy system +/datum/dynamic_ruleset/event/ready(forced = FALSE) if (!forced) + if(earliest_start >= world.time-SSticker.round_start_time) + return FALSE var/job_check = 0 if (enemy_roles.len > 0) for (var/mob/M in mode.current_players[CURRENT_LIVING_PLAYERS]) @@ -56,6 +59,7 @@ required_enemies = list(2,2,1,1,0,0,0,0,0,0) weight = 5 cost = 10 + earliest_start = 30 MINUTES blocking_rules = list(/datum/dynamic_ruleset/roundstart/nuclear,/datum/dynamic_ruleset/midround/from_ghosts/nuclear) requirements = list(70,60,50,50,40,40,40,30,20,15) property_weights = list("story_potential" = 1, "trust" = 1, "chaos" = 1) @@ -157,17 +161,18 @@ required_enemies = list(3,3,3,3,3,3,3,3,3,3) cost = 15 weight = 3 + earliest_start = 25 MINUTES repeatable_weight_decrease = 2 requirements = list(60,50,40,30,30,30,30,30,30,30) high_population_requirement = 30 property_weights = list("extended" = -2) /datum/dynamic_ruleset/event/meteor_wave/ready() - if(mode.threat_level > 40 && mode.threat >= 25 && prob(20)) + if(world.time-SSticker.round_start_time > 35 MINUTES && mode.threat_level > 40 && mode.threat >= 25 && prob(30)) name = "Meteor Wave: Threatening" cost = 25 typepath = /datum/round_event/meteor_wave/threatening - else if(mode.threat_level > 50 && mode.threat >= 40 && prob(30)) + else if(world.time-SSticker.round_start_time > 45 MINUTES && mode.threat_level > 50 && mode.threat >= 40 && prob(30)) name = "Meteor Wave: Catastrophic" cost = 40 typepath = /datum/round_event/meteor_wave/catastrophic @@ -280,6 +285,7 @@ cost = 4 requirements = list(10,10,10,10,10,10,10,10,10,10) high_population_requirement = 10 + earliest_start = 10 MINUTES repeatable = TRUE property_weights = list("extended" = 1) @@ -324,6 +330,7 @@ requirements = list(5,5,5,5,5,5,5,5,5,5) high_population_requirement = 5 repeatable = TRUE + earliest_start = 0 MINUTES property_weights = list("extended" = 1) always_max_weight = TRUE @@ -381,3 +388,67 @@ requirements = list(5,5,5,5,5,5,5,5,5,5) high_population_requirement = 5 property_weights = list("extended" = 1,"chaos" = 1) + +/datum/dynamic_ruleset/event/portal_storm_syndicate + name = "Portal Storm" + config_tag = "portal_storm" + typepath = /datum/round_event/portal_storm/syndicate_shocktroop + cost = 10 + weight = 1 + enemy_roles = list("Head of Security","Security Officer","AI","Captain","Shaft Miner") + required_enemies = list(2,2,2,2,2,2,2,2,2,2) + requirements = list(101,101,101,30,30,30,30,30,30,30) + high_population_requirement = 30 + earliest_start = 30 MINUTES + property_weights = list("teamwork" = 1,"chaos" = 1, "extended" = -1) + +/datum/dynamic_ruleset/event/wormholes + name = "Wormholes" + config_tag = "wormhole" + typepath = /datum/round_event/wormholes + cost = 3 + weight = 4 + enemy_roles = list("AI","Medical Doctor","Station Engineer","Head of Personnel","Captain") + required_enemies = list(2,2,2,2,2,2,2,2,2,2) + requirements = list(5,5,5,5,5,5,5,5,5,5) + high_population_requirement = 5 + property_weights = list("extended" = 1) + +/datum/dynamic_ruleset/event/swarmers + name = "Swarmers" + config_tag = "swarmer" + typepath = /datum/round_event/spawn_swarmer + cost = 10 + weight = 1 + earliest_start = 30 MINUTES + enemy_roles = list("AI","Security Officer","Head of Security","Captain","Station Engineer","Atmos Technician","Chief Engineer") + required_enemies = list(4,4,4,4,3,3,2,2,1,1) + requirements = list(101,101,101,101,101,101,101,101,101,101) + high_population_requirement = 5 + property_weights = list("extended" = -2) + +/datum/dynamic_ruleset/event/sentient_disease + name = "Sentient Disease" + config_tag = "sentient_disease" + typepath = /datum/round_event/ghost_role/sentient_disease + enemy_roles = list("Virologist","Chief Medical Officer","Captain","Chemist") + required_enemies = list(2,1,1,1,0,0,0,0,0,0) + required_candidates = 1 + weight = 4 + cost = 5 + requirements = list(30,30,20,20,15,10,10,10,10,5) // yes, it can even happen in "extended"! + property_weights = list("story_potential" = 1, "extended" = 1, "valid" = -2) + high_population_requirement = 5 + +/datum/dynamic_ruleset/event/revenant + name = "Revenant" + config_tag = "revenant" + typepath = /datum/round_event/ghost_role/revenant + enemy_roles = list("Chief Engineer","Station Engineer","Captain","Chaplain","AI") + required_enemies = list(2,1,1,1,0,0,0,0,0,0) + required_candidates = 1 + weight = 4 + cost = 5 + requirements = list(30,30,30,30,20,15,15,15,15,15) + high_population_requirement = 15 + property_weights = list("story_potential" = -2, "extended" = -1) diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm index 6d1933c0fd..e0ad2b8bbc 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm @@ -34,7 +34,7 @@ living_players = trim_list(mode.current_players[CURRENT_LIVING_PLAYERS]) living_antags = trim_list(mode.current_players[CURRENT_LIVING_ANTAGS]) list_observers = trim_list(mode.current_players[CURRENT_OBSERVERS]) - var/datum/element/ghost_role_eligibility/eligibility = SSdcs.GetElement(/datum/element/ghost_role_eligibility) + var/datum/element/ghost_role_eligibility/eligibility = SSdcs.GetElement(list(/datum/element/ghost_role_eligibility)) ghost_eligible = trim_list(eligibility.get_all_ghost_role_eligible()) /datum/dynamic_ruleset/midround/proc/trim_list(list/L = list()) @@ -273,10 +273,14 @@ var/ion_announce = 33 var/removeDontImproveChance = 10 +/datum/dynamic_ruleset/midround/malf/ready() + if(!candidates || !candidates.len) + return FALSE + return ..() + /datum/dynamic_ruleset/midround/malf/trim_candidates() ..() - living_players = candidates[CURRENT_LIVING_PLAYERS] - for(var/mob/living/player in candidates) + for(var/mob/living/player in living_players) if(!isAI(player)) candidates -= player continue @@ -287,8 +291,6 @@ candidates -= player /datum/dynamic_ruleset/midround/malf/execute() - if(!candidates || !candidates.len) - return FALSE var/mob/living/silicon/ai/M = pick_n_take(candidates) assigned += M.mind var/datum/antagonist/traitor/AI = new @@ -337,6 +339,7 @@ /datum/dynamic_ruleset/midround/from_ghosts/wizard/finish_setup(mob/new_character, index) ..() new_character.forceMove(pick(GLOB.wizardstart)) + wizard = new_character.mind /datum/dynamic_ruleset/midround/from_ghosts/wizard/rule_process() // i can literally copy this from are_special_antags_dead it's great if(isliving(wizard.current) && wizard.current.stat!=DEAD) @@ -447,9 +450,7 @@ property_weights = list("story_potential" = -1, "trust" = 1, "chaos" = 2, "extended" = -2, "valid" = 2) var/list/vents = list() -/datum/dynamic_ruleset/midround/from_ghosts/xenomorph/execute() - // 50% chance of being incremented by one - required_candidates += prob(50) +/datum/dynamic_ruleset/midround/from_ghosts/xenomorph/ready() for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines) if(QDELETED(temp_vent)) continue @@ -463,6 +464,12 @@ vents += temp_vent if(!vents.len) return FALSE + return ..() + + +/datum/dynamic_ruleset/midround/from_ghosts/xenomorph/execute() + // 50% chance of being incremented by one + required_candidates += prob(50) . = ..() /datum/dynamic_ruleset/midround/from_ghosts/xenomorph/generate_ruleset_body(mob/applicant) @@ -497,7 +504,7 @@ property_weights = list("story_potential" = 1, "trust" = 1, "extended" = 1, "valid" = 2, "integrity" = 1) var/list/spawn_locs = list() -/datum/dynamic_ruleset/midround/from_ghosts/nightmare/execute() +/datum/dynamic_ruleset/midround/from_ghosts/nightmare/ready() for(var/X in GLOB.xeno_spawn) var/turf/T = X var/light_amount = T.get_lumcount() @@ -505,7 +512,7 @@ spawn_locs += T if(!spawn_locs.len) return FALSE - . = ..() + return ..() /datum/dynamic_ruleset/midround/from_ghosts/nightmare/generate_ruleset_body(mob/applicant) var/datum/mind/player_mind = new /datum/mind(applicant.key) @@ -523,88 +530,6 @@ log_game("DYNAMIC: [key_name(S)] was spawned as a Nightmare by the midround ruleset.") return S -////////////////////////////////////////////// -// // -// SENTIENT DISEASE // -// // -////////////////////////////////////////////// - - -/datum/dynamic_ruleset/midround/from_ghosts/sentient_disease - name = "Sentient Disease" - config_tag = "sentient_disease" - antag_flag = ROLE_ALIEN - enemy_roles = list("Virologist","Chief Medical Officer","Captain","Chemist") - required_enemies = list(2,1,1,1,0,0,0,0,0,0) - required_candidates = 1 - weight = 4 - cost = 5 - requirements = list(30,30,20,20,15,10,10,10,10,5) // yes, it can even happen in "extended"! - property_weights = list("story_potential" = 1, "extended" = 1, "valid" = -2) - high_population_requirement = 5 - -/datum/dynamic_ruleset/midround/from_ghosts/sentient_disease/generate_ruleset_body(mob/applicant) - var/mob/camera/disease/virus = new /mob/camera/disease(SSmapping.get_station_center()) - applicant.transfer_ckey(virus, FALSE) - INVOKE_ASYNC(virus, /mob/camera/disease/proc/pick_name) - message_admins("[ADMIN_LOOKUPFLW(virus)] has been made into a sentient disease by the midround ruleset.") - log_game("[key_name(virus)] was spawned as a sentient disease by the midround ruleset.") - return virus - -////////////////////////////////////////////// -// // -// REVENANT // -// // -////////////////////////////////////////////// - - -/datum/dynamic_ruleset/midround/from_ghosts/revenant - name = "Revenant" - config_tag = "revenant" - antag_flag = ROLE_REVENANT - enemy_roles = list("Chief Engineer","Station Engineer","Captain","Chaplain","AI") - required_enemies = list(2,1,1,1,0,0,0,0,0,0) - required_candidates = 1 - weight = 4 - cost = 5 - requirements = list(30,30,30,30,20,15,15,15,15,15) - high_population_requirement = 15 - property_weights = list("story_potential" = -2, "extended" = -1) - var/list/spawn_locs = list() - -/datum/dynamic_ruleset/midround/from_ghosts/revenant/acceptable(population = 0,threat = 0) - var/deadMobs = 0 - for(var/mob/M in GLOB.dead_mob_list) - deadMobs++ - if(deadMobs < REVENANT_SPAWN_THRESHOLD) - return FALSE - return ..() - -/datum/dynamic_ruleset/midround/from_ghosts/revenant/ready(forced = FALSE) - for(var/mob/living/L in GLOB.dead_mob_list) //look for any dead bodies - var/turf/T = get_turf(L) - if(T && is_station_level(T.z)) - spawn_locs += T - if(!spawn_locs.len || spawn_locs.len < 15) //look for any morgue trays, crematoriums, ect if there weren't alot of dead bodies on the station to pick from - for(var/obj/structure/bodycontainer/bc in GLOB.bodycontainers) - var/turf/T = get_turf(bc) - if(T && is_station_level(T.z)) - spawn_locs += T - if(!spawn_locs.len) //If we can't find any valid spawnpoints, try the carp spawns - for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list) - if(isturf(L.loc)) - spawn_locs += L.loc - if(!spawn_locs.len) //If we can't find THAT, then just give up and cry - return FALSE - return ..() - -/datum/dynamic_ruleset/midround/from_ghosts/revenant/generate_ruleset_body(mob/applicant) - var/mob/living/simple_animal/revenant/revvie = new(pick(spawn_locs)) - applicant.transfer_ckey(revvie, FALSE) - message_admins("[ADMIN_LOOKUPFLW(revvie)] has been made into a revenant by the midround ruleset.") - log_game("[key_name(revvie)] was spawned as a revenant by the midround ruleset.") - return revvie - ////////////////////////////////////////////// // // // SLAUGHTER DEMON // @@ -668,11 +593,11 @@ required_candidates = 2 weight = 8 cost = 10 - requirements = list(101,101,70,50,40,30,30,20,15,15) + requirements = list(101,101,70,50,40,30,30,30,30,30) blocking_rules = list(/datum/dynamic_ruleset/roundstart/nuclear,/datum/dynamic_ruleset/midround/from_ghosts/nuclear) high_population_requirement = 15 var/datum/team/abductor_team/team - property_weights = list("story_potential" = 1, "extended" = -2, "valid" = 1, "trust" = -1, "chaos" = 2) + property_weights = list("extended" = -2, "valid" = 1, "trust" = -1, "chaos" = 2) repeatable_weight_decrease = 4 repeatable = TRUE @@ -742,7 +667,8 @@ var/datum/antagonist/ninja/ninjadatum = new ninjadatum.helping_station = pick(TRUE,FALSE) if(ninjadatum.helping_station) - mode.refund_threat(5) + mode.refund_threat(cost+5) + mode.log_threat("Ninja was helping station; [cost+5] cost refunded.") Mind.add_antag_datum(ninjadatum) if(Ninja.mind != Mind) //something has gone wrong! diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm index abd40a1756..2527c83077 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm @@ -623,8 +623,7 @@ config_tag = "clownops" 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 + weight = 1 property_weights = list("trust" = 2, "chaos" = 2, "extended" = -2, "story_potential" = 2, "valid" = 2) diff --git a/code/game/gamemodes/dynamic/dynamic_storytellers.dm b/code/game/gamemodes/dynamic/dynamic_storytellers.dm index 069c73a421..d25416a4d1 100644 --- a/code/game/gamemodes/dynamic/dynamic_storytellers.dm +++ b/code/game/gamemodes/dynamic/dynamic_storytellers.dm @@ -1,16 +1,22 @@ /datum/dynamic_storyteller - var/name = "none" - var/config_tag = null - var/desc = "A coder's idiocy." - var/list/property_weights = list() - var/curve_centre = 0 - var/curve_width = 1.8 + var/name = "none" // Name for voting. + var/config_tag = null // Config tag for config weights. + var/desc = "A coder's idiocy." // Description for voting. + var/list/property_weights = list() // See below. + var/curve_centre = 0 // As GLOB.dynamic_curve_centre. + var/curve_width = 1.8 // As GLOB.dynamic_curve_width. var/forced_threat_level = -1 + /* + NO_ASSASSIN: Will not have permanent assassination targets. + WAROPS_ALWAYS_ALLOWED: Can always do warops, regardless of threat level. + USE_PREF_WEIGHTS: Will use peoples' preferences to change the threat centre. + */ var/flags = 0 - var/weight = 3 // how many rounds need to have been recently played for this storyteller to be left out of the vote - var/event_frequency_lower = 6 MINUTES - var/event_frequency_upper = 20 MINUTES - var/datum/game_mode/dynamic/mode = null + var/weight = 3 // Weights for randomly picking storyteller. Multiplied by score after voting. + var/event_frequency_lower = 6 MINUTES // How rare events will be, at least. + var/event_frequency_upper = 20 MINUTES // How rare events will be, at most. + var/pop_antag_ratio = 5 // How many non-antags there should be vs antags. + var/datum/game_mode/dynamic/mode = null // Cached as soon as it's made, by dynamic. /** Property weights are: @@ -80,7 +86,7 @@ Property weights are: 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 = (mode.current_players[CURRENT_LIVING_PLAYERS].len >= GLOB.dynamic_high_pop_limit) - var/max_pop_per_antag = max(5,15 - round(mode.threat_level/10) - round(mode.current_players[CURRENT_LIVING_PLAYERS].len/(high_pop_factor ? 10 : 5))) + var/max_pop_per_antag = max(pop_antag_ratio,15 - round(mode.threat_level/10) - round(mode.current_players[CURRENT_LIVING_PLAYERS].len/(high_pop_factor ? 10 : 5))) if (!mode.current_players[CURRENT_LIVING_ANTAGS].len) chance += 80 // No antags at all? let's boost those odds! else @@ -173,12 +179,13 @@ Property weights are: name = "Chaotic" config_tag = "chaotic" curve_centre = 10 - desc = "Chaos: high. Variation: high. Likely antags: clock cult, revs, wizard." + desc = "High chaos modes. Revs, wizard, clock cult. Multiple antags at once. Chaos is kept up all round." property_weights = list("extended" = -1, "chaos" = 10) weight = 1 event_frequency_lower = 2 MINUTES event_frequency_upper = 10 MINUTES flags = WAROPS_ALWAYS_ALLOWED + pop_antag_ratio = 4 var/refund_cooldown = 0 /datum/dynamic_storyteller/cowabunga/get_midround_cooldown() @@ -189,14 +196,14 @@ Property weights are: /datum/dynamic_storyteller/cowabunga/do_process() if(refund_cooldown < world.time) - mode.refund_threat(20) - mode.log_threat("Cowabunga it is. Refunded 20 threat. Threat is now [mode.threat].") - refund_cooldown = world.time + 600 SECONDS + mode.refund_threat(40) + mode.log_threat("Chaotic storyteller refunded 40 threat. Threat is now [mode.threat].") + refund_cooldown = world.time + 1200 SECONDS /datum/dynamic_storyteller/team name = "Teamwork" config_tag = "teamwork" - desc = "Chaos: high. Variation: low. Likely antags: nukies, clockwork cult, wizard, blob, xenomorph." + desc = "Modes where the crew must band together. Nukies, xenos, blob. Only one antag threat at once." curve_centre = 2 curve_width = 1.5 weight = 2 @@ -209,56 +216,71 @@ Property weights are: /datum/dynamic_storyteller/conversion name = "Conversion" config_tag = "conversion" - desc = "Chaos: high. Variation: medium. Likely antags: cults, bloodsuckers, revs." + desc = "Conversion antags. Cults, revs." curve_centre = 3 curve_width = 1 - weight = 2 + weight = 0 flags = WAROPS_ALWAYS_ALLOWED property_weights = list("valid" = 1, "conversion" = 20) /datum/dynamic_storyteller/classic name = "Random" config_tag = "random" - desc = "Chaos: varies. Variation: highest. No special weights attached." - weight = 6 - flags = USE_PREF_WEIGHTS + desc = "No special weights attached. Anything goes." + weight = 4 curve_width = 4 + pop_antag_ratio = 7 + flags = USE_PREF_WEIGHTS -/datum/dynamic_storyteller/memes +/datum/dynamic_storyteller/story name = "Story" config_tag = "story" - desc = "Chaos: varies. Variation: high. Likely antags: abductors, nukies, wizard, traitor." - weight = 4 - flags = USE_PREF_WEIGHTS - curve_width = 4 + desc = "Antags with options for loadouts and gimmicks. Traitor, wizard, nukies." + weight = 2 + curve_width = 2 + pop_antag_ratio = 7 property_weights = list("story_potential" = 10) /datum/dynamic_storyteller/suspicion name = "Intrigue" config_tag = "intrigue" - desc = "Chaos: low. Variation: high. Likely antags: traitor, bloodsucker. Rare: revs, blood cult." - weight = 4 - flags = USE_PREF_WEIGHTS - curve_width = 4 + desc = "Antags that instill distrust in the crew. Traitors, bloodsuckers." + weight = 2 + curve_width = 2 + pop_antag_ratio = 7 property_weights = list("trust" = -5) /datum/dynamic_storyteller/liteextended name = "Calm" config_tag = "calm" - desc = "Chaos: low. Variation: medium. Likely antags: bloodsuckers, traitors, sentient disease, revenant." + desc = "Low-chaos round. Few antags. No conversion." + curve_centre = -3 + curve_width = 0.5 + flags = NO_ASSASSIN + weight = 1 + pop_antag_ratio = 10 + property_weights = list("extended" = 1, "chaos" = -1, "valid" = -1, "story_potential" = 1, "conversion" = -10) + +/datum/dynamic_storyteller/no_antag + name = "Extended" + config_tag = "semiextended" + desc = "No standard antags. Threatening events may still spawn." curve_centre = -5 curve_width = 0.5 flags = NO_ASSASSIN - weight = 2 - property_weights = list("extended" = 1, "chaos" = -1, "valid" = -1, "story_potential" = 1, "conversion" = -10) + weight = 1 + property_weights = list("extended" = 2) -/datum/dynamic_storyteller/liteextended/get_injection_chance(dry_run = FALSE) - return ..()/2 +/datum/dynamic_storyteller/no_antag/roundstart_draft() + return list() + +/datum/dynamic_storyteller/no_antag/get_injection_chance(dry_run) + return 0 /datum/dynamic_storyteller/extended - name = "Extended" + name = "Super Extended" config_tag = "extended" - desc = "Chaos: none. Variation: none. Likely antags: none." + desc = "No antags. No dangerous events." curve_centre = -20 weight = 0 curve_width = 0.5 diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index a4b1f68265..b42b41aba4 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -1163,12 +1163,17 @@ GLOBAL_LIST_EMPTY(possible_sabotages) var/payout = 0 var/payout_bonus = 0 var/area/dropoff = null + var/static/list/blacklisted_areas = typecacheof(list(/area/ai_monitored/turret_protected, + /area/solar/, + /area/ruin/, //thank you station space ruins + /area/science/test_area/, + /area/shuttle/)) /datum/objective/contract/proc/generate_dropoff() // Generate a random valid area on the station that the dropoff will happen. var/found = FALSE while(!found) var/area/dropoff_area = pick(GLOB.sortedAreas) - if(dropoff_area && is_station_level(dropoff_area.z) && !dropoff_area.outdoors && !istype(dropoff_area, /area/shuttle/)) + if(dropoff_area && is_station_level(dropoff_area.z) && !dropoff_area.outdoors && !is_type_in_typecache(dropoff_area, blacklisted_areas)) dropoff = dropoff_area found = TRUE diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index b74e4303e5..6fa7fa30c0 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -47,8 +47,8 @@ ) /obj/machinery/autolathe/Initialize() - AddComponent(/datum/component/material_container, - list(/datum/material/iron, + var/static/list/allowed_types = list( + /datum/material/iron, /datum/material/glass, /datum/material/gold, /datum/material/silver, @@ -62,10 +62,9 @@ /datum/material/plastic, /datum/material/adamantine, /datum/material/mythril - ), - 0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert)) + ) + AddComponent(/datum/component/material_container, allowed_types, _show_on_examine=TRUE, _after_insert=CALLBACK(src, .proc/AfterMaterialInsert)) . = ..() - wires = new /datum/wires/autolathe(src) stored_research = new /datum/techweb/specialized/autounlocking/autolathe matching_designs = list() diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 426e68c17b..eac94081cb 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -77,6 +77,8 @@ name = "cloning data disk" icon_state = "datadisk0" //Gosh I hope syndies don't mistake them for the nuke disk. var/list/fields = list() + var/list/mutations = list() + var/max_mutations = 6 var/read_only = 0 //Well,it's still a floppy disk //Disk stuff. @@ -129,7 +131,7 @@ return examine(user) //Start growing a human clone in the pod! -/obj/machinery/clonepod/proc/growclone(ckey, clonename, ui, se, mindref, datum/species/mrace, list/features, factions, list/quirks) +/obj/machinery/clonepod/proc/growclone(ckey, clonename, ui, mutation_index, mindref, datum/species/mrace, list/features, factions, list/quirks) if(panel_open) return FALSE if(mess || attempting) @@ -165,8 +167,9 @@ var/mob/living/carbon/human/H = new /mob/living/carbon/human(src) - H.hardset_dna(ui, se, H.real_name, null, mrace, features) - H.randmutb() //100% bad mutation. Can be cured with mutadone. + H.hardset_dna(ui, mutation_index, H.real_name, null, mrace, features) + + H.easy_randmut(NEGATIVE+MINOR_NEGATIVE) //100% bad mutation. Can be cured with mutadone. H.silent = 20 //Prevents an extreme edge case where clones could speak if they said something at exactly the right moment. occupant = H diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 4d21ae77b0..07cc252b87 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -485,7 +485,7 @@ R.fields["id"] = copytext_char(md5(mob_occupant.real_name), 2, 6) R.fields["UE"] = dna.unique_enzymes R.fields["UI"] = dna.uni_identity - R.fields["SE"] = dna.struc_enzymes + R.fields["SE"] = dna.mutation_index R.fields["blood_type"] = dna.blood_type R.fields["features"] = dna.features R.fields["factions"] = mob_occupant.faction diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index 5049a10d2b..5662737ff7 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -1,14 +1,16 @@ #define INJECTOR_TIMEOUT 100 -#define REJUVENATORS_INJECT 15 -#define REJUVENATORS_MAX 90 #define NUMBER_OF_BUFFERS 3 +#define SCRAMBLE_TIMEOUT 600 +#define JOKER_TIMEOUT 12000 //20 minutes +#define JOKER_UPGRADE 1800 #define RADIATION_STRENGTH_MAX 15 -#define RADIATION_STRENGTH_MULTIPLIER 1 //larger has a more range +#define RADIATION_STRENGTH_MULTIPLIER 1 //larger has more range #define RADIATION_DURATION_MAX 30 #define RADIATION_ACCURACY_MULTIPLIER 3 //larger is less accurate + #define RADIATION_IRRADIATION_MULTIPLIER 1 //multiplier for how much radiation a test subject receives #define SCANNER_ACTION_SE 1 @@ -23,22 +25,44 @@ icon_keyboard = "med_key" density = TRUE circuit = /obj/item/circuitboard/computer/scan_consolenew - var/radduration = 2 - var/radstrength = 1 - var/list/buffer[NUMBER_OF_BUFFERS] - - var/injectorready = 0 //world timer cooldown var - var/current_screen = "mainmenu" - var/obj/machinery/dna_scannernew/connected = null - var/obj/item/disk/data/diskette = null - var/list/delayed_action = null use_power = IDLE_POWER_USE idle_power_usage = 10 active_power_usage = 400 - light_color = LIGHT_COLOR_BLUE + var/datum/techweb/stored_research + var/max_storage = 6 + var/combine + var/radduration = 2 + var/radstrength = 1 + var/max_chromosomes = 6 + + ///Amount of mutations we can store + var/list/buffer[NUMBER_OF_BUFFERS] + ///mutations we have stored + var/list/stored_mutations = list() + ///chromosomes we have stored + var/list/stored_chromosomes = list() + ///combinations of injectors for the 'injector selection'. format is list("Elsa" = list(Cryokinesis, Geladikinesis), "The Hulk" = list(Hulk, Gigantism), etc) Glowy and the gang being an initialized datum + var/list/injector_selection = list() + ///max amount of selections you can make + var/max_injector_selections = 2 + ///hard-cap on the advanced dna injector + var/max_injector_mutations = 10 + ///the max instability of the advanced injector. + var/max_injector_instability = 50 + + var/injectorready = 0 //world timer cooldown var + var/jokerready = 0 + var/scrambleready = 0 + var/current_screen = "mainmenu" + var/current_mutation //what block are we inspecting? only used when screen = "info" + var/current_storage //what storage block are we looking at? + var/obj/machinery/dna_scannernew/connected = null + var/obj/item/disk/data/diskette = null + var/list/delayed_action = null + /obj/machinery/computer/scan_consolenew/attackby(obj/item/I, mob/user, params) if (istype(I, /obj/item/disk/data)) //INSERT SOME DISKETTES if (!src.diskette) @@ -48,6 +72,28 @@ to_chat(user, "You insert [I].") src.updateUsrDialog() return + if (istype(I, /obj/item/chromosome)) + if(LAZYLEN(stored_chromosomes) < max_chromosomes) + I.forceMove(src) + stored_chromosomes += I + to_chat(user, "You insert [I].") + else + to_chat(user, "You cannot store any more chromosomes!") + return + if(istype(I, /obj/item/dnainjector/activator)) + var/obj/item/dnainjector/activator/A = I + if(A.used) + to_chat(user,"Recycled [I].") + if(A.research) + var/c_typepath = generate_chromosome() + var/obj/item/chromosome/CM = new c_typepath (drop_location()) + to_chat(user,"Recycled [I].") + if((LAZYLEN(stored_chromosomes) < max_chromosomes) && prob(60)) + CM.forceMove(src) + stored_chromosomes += CM + to_chat(user,"[capitalize(CM.name)] added to storage.") + qdel(I) + return else return ..() @@ -58,12 +104,26 @@ if(!isnull(connected)) break injectorready = world.time + INJECTOR_TIMEOUT + scrambleready = world.time + SCRAMBLE_TIMEOUT + jokerready = world.time + JOKER_TIMEOUT + + stored_research = SSresearch.science_tech + +/obj/machinery/computer/scan_consolenew/examine(mob/user) + . = ..() + if(jokerready < world.time) + . += "JOKER algorithm available." + else + . += "JOKER algorithm available in about [round(0.00166666667 * (jokerready - world.time))] minutes." /obj/machinery/computer/scan_consolenew/ui_interact(mob/user, last_change) . = ..() if(!user) return var/datum/browser/popup = new(user, "scannernew", "DNA Modifier Console", 800, 630) // Set up the popup browser window + if(user.client) + var/datum/asset/simple/assets = get_asset_datum(/datum/asset/simple/genetics) + assets.send(user.client) if(!(in_range(src, user) || hasSiliconAccessInArea(user))) popup.close() return @@ -88,8 +148,6 @@ occupant_status += "" occupant_status += "
Health:
[viable_occupant.health] %
" occupant_status += "
Radiation Level:
[viable_occupant.radiation/(RAD_MOB_SAFE/100)] %
" - var/rejuvenators = viable_occupant.reagents.get_reagent_amount(/datum/reagent/medicine/potass_iodide) - occupant_status += "
Rejuvenators:
[rejuvenators] units
" occupant_status += "
Unique Enzymes :
[viable_occupant.dna.unique_enzymes]
" occupant_status += "
Last Operation:
[last_change ? last_change : "----"]
" else @@ -147,28 +205,61 @@ buttons += "[connected.locked ? "Unlock" : "Lock"] Scanner" else buttons += "Open Scanner Lock Scanner" - if(viable_occupant) - buttons += "Inject Rejuvenators" + if(viable_occupant && (scrambleready < world.time)) + buttons += "Scramble DNA" else - buttons += "Inject Rejuvenators" + buttons += "Scramble DNA" if(diskette) - buttons += "Eject Disk" + buttons += "Disk" else - buttons += "Eject Disk" - if(current_screen == "buffer") - buttons += "Radiation Emitter Menu" + buttons += "Disk" + if(current_screen == "mutations") + buttons += "Mutations" else - buttons += "Buffer Menu" - + buttons += "Mutations" + if((current_screen == "mainmenu") || !current_screen) + buttons += "Genetic Sequencer" + else + buttons += "Genetic Sequencer" + if(current_screen == "ui") + buttons += "Unique Identifiers" + else + buttons += "Unique Identifiers" + if(current_screen == "advinjector") + buttons += "Adv. Injectors" + else + buttons += "Adv. Injectors" switch(current_screen) if("working") temp_html += status temp_html += "

System Busy

" temp_html += "Working ... Please wait ([DisplayTimeText(radduration*10)])" - if("buffer") + if("ui") temp_html += status temp_html += buttons - temp_html += "

Buffer Menu

" + temp_html += "

Unique Identifiers

" + temp_html += "-- Output Level ++" + temp_html += "
-- Pulse Duration ++" + temp_html += "

Irradiate Subject

" + temp_html += "
Unique Identifier:
" + var/max_line_len = 7*DNA_BLOCK_SIZE + if(viable_occupant) + temp_html += "
1
" + var/char = "" + var/ui_text = viable_occupant.dna.uni_identity + var/len_byte = length(ui_text) + var/char_it = 0 + for(var/byte_it = 1, byte_it <= len_byte, byte_it += length(char)) + char_it++ + char = ui_text[byte_it] + temp_html += "[char]" + if((char_it % max_line_len) == 0) + temp_html += "
" + if((char_it % DNA_BLOCK_SIZE) == 0 && byte_it < len_byte) + temp_html += "
[(char_it / DNA_BLOCK_SIZE) + 1]
" + else + temp_html += "---------" + temp_html += "

Buffer Menu

" if(istype(buffer)) for(var/i=1, i<=buffer.len, i++) @@ -188,7 +279,6 @@ temp_html += "Save to Disk" else var/ui = buffer_slot["UI"] - var/se = buffer_slot["SE"] var/ue = buffer_slot["UE"] var/name = buffer_slot["name"] var/label = buffer_slot["label"] @@ -234,19 +324,6 @@ temp_html += "UI+UE Injector" else temp_html += "UI+UE Injector" - if(se) - temp_html += "
\tSE: [se] " - if(viable_occupant) - temp_html += "Occupant" - else - temp_html += "Occupant" - temp_html += "Occupant:Delayed" - if(injectorready < world.time ) - temp_html += "Injector" - else - temp_html += "Injector" - else - temp_html += "
\tSE: No Data" if(viable_occupant) temp_html += "
Save to Buffer" else @@ -260,58 +337,225 @@ temp_html += "Save to Disk" else temp_html += "Save to Disk" + if("disk") + temp_html += status + temp_html += buttons + if(diskette) + temp_html += "

[diskette.name]


" + temp_html += "Eject Disk
" + if(LAZYLEN(diskette.mutations)) + temp_html += "" + for(var/datum/mutation/human/A in diskette.mutations) + temp_html += "" + temp_html += "" + if(LAZYLEN(stored_mutations) < max_storage) + temp_html += "" + else + temp_html += "" + temp_html += "" + temp_html += "
[A.name]DeleteImportImport
" + else + temp_html += "
Load diskette to start ----------" + if("info") + if(LAZYLEN(stored_mutations)) + if(LAZYLEN(stored_mutations) >= current_storage) + var/datum/mutation/human/HM = stored_mutations[current_storage] + if(HM) + temp_html += display_sequence(HM.type, current_storage) + else + current_screen = "mainmenu" + if("mutations") + temp_html += status + temp_html += buttons + temp_html += "

Mutation Storage:

" + temp_html += "" + for(var/datum/mutation/human/HM in stored_mutations) + var/i = stored_mutations.Find(HM) + temp_html += "" + temp_html += "" + temp_html += "" + if(combine == HM.type) + temp_html += "" + else + temp_html += "" + temp_html += "
[HM.name]ExportDeleteCombine
Combine

" + temp_html += "

Chromosome Storage:

" + temp_html += "" + for(var/i in 1 to stored_chromosomes.len) + var/obj/item/chromosome/CM = stored_chromosomes[i] + temp_html += "
" + temp_html += "
[CM.name]
" + if("advinjector") + temp_html += status + temp_html += buttons + temp_html += "
Advanced Injectors:

" + temp_html += "" + for(var/A in injector_selection) + temp_html += "
[A]" + var/list/true_selection = injector_selection[A] + temp_html += "
" + for(var/B in true_selection) + var/datum/mutation/human/HM = B + var/mutcolor + switch(HM.quality) + if(POSITIVE) + mutcolor = "good" + if(MINOR_NEGATIVE) + mutcolor = "average" + if(NEGATIVE) + mutcolor = "bad" + temp_html += "
[HM.name] " + temp_html += "Remove
" + if (injectorready < world.time) + temp_html += "
Print Advanced Injector" + else + temp_html += "
Print Advanced Injector" + temp_html += "Remove Injector
" + temp_html += "
" else temp_html += status temp_html += buttons - temp_html += "

Radiation Emitter Menu

" - - temp_html += "-- Output Level ++" - temp_html += "
-- Pulse Duration ++" - - temp_html += "

Irradiate Subject

" - temp_html += "
Unique Identifier:
" - - var/max_line_len = 7*DNA_BLOCK_SIZE + temp_html += "
Genetic Sequence:

" if(viable_occupant) - temp_html += "
1
" - var/char = "" - var/ui_text = viable_occupant.dna.uni_identity - var/len_byte = length(ui_text) - var/char_it = 0 - for(var/byte_it = 1, byte_it <= len_byte, byte_it += length(char)) - char_it++ - char = ui_text[byte_it] - temp_html += "[char]" - if((char_it % max_line_len) == 0) - temp_html += "
" - if((char_it % DNA_BLOCK_SIZE) == 0 && byte_it < len_byte) - temp_html += "
[(char_it / DNA_BLOCK_SIZE) + 1]
" + if(viable_occupant) + for(var/A in get_mutation_list()) + temp_html += display_inactive_sequence(A) + temp_html += "
" + else + temp_html += "----" + if(viable_occupant && (current_mutation in get_mutation_list(viable_occupant))) + temp_html += display_sequence(current_mutation) + temp_html += "

" else - temp_html += "----" - temp_html += "

" - - temp_html += "
Structural Enzymes:
" - if(viable_occupant) - temp_html += "
1
" - var/char = "" - var/se_text = viable_occupant.dna.struc_enzymes - var/len_byte = length(se_text) - var/char_it = 0 - for(var/byte_it = 1, byte_it <= len_byte, byte_it += length(char)) - char_it++ - char = se_text[byte_it] - temp_html += "[char]" - if((char_it % max_line_len) == 0) - temp_html += "
" - if((char_it % DNA_BLOCK_SIZE) == 0 && byte_it < len_byte) - temp_html += "
[(char_it / DNA_BLOCK_SIZE) + 1]
" - else - temp_html += "----" - temp_html += "
" + temp_html += "----------" popup.set_content(temp_html.Join()) popup.open() +/obj/machinery/computer/scan_consolenew/proc/display_inactive_sequence(mutation) + var/temp_html = "" + var/class = "unselected" + var/mob/living/carbon/viable_occupant = get_viable_occupant() + if(!viable_occupant) + return + + var/location = viable_occupant.dna.mutation_index.Find(mutation) //We do this because we dont want people using sysexp or similair tools to just read the mutations. + + if(!location) //Do this only when needed, dont make a list with mutations for every iteration if you dont need to + var/list/mutations = get_mutation_list(TRUE) + if(mutation in mutations) + location = mutations.Find(mutation) + if(mutation == current_mutation) + class = "selected" + if(location > DNA_MUTATION_BLOCKS) + temp_html += "Extra Mutation" + else if(mutation in stored_research.discovered_mutations) + temp_html += "Discovered Mutation" + else + temp_html += "Undiscovered" + return temp_html + +/obj/machinery/computer/scan_consolenew/proc/display_sequence(mutation, storage_slot) //Storage slot is for when viewing from the stored mutations + var/temp_html = "" + if(!mutation) + temp_html += "ERR-" + return + var/mut_name = "Unknown gene" + var/mut_desc = "No information available." + var/alias + var/discovered = FALSE + var/active = FALSE + var/scrambled = FALSE + var/instability + var/mob/living/carbon/viable_occupant = get_viable_occupant() + var/datum/mutation/human/HM = get_valid_mutation(mutation) + + if(viable_occupant) + var/datum/mutation/human/M = viable_occupant.dna.get_mutation(mutation) + if(M) + scrambled = M.scrambled + active = TRUE + var/datum/mutation/human/A = GET_INITIALIZED_MUTATION(mutation) + alias = A.alias + if(active && !scrambled) + discover(mutation) + if(stored_research && (mutation in stored_research.discovered_mutations)) + mut_name = A.name + mut_desc = A.desc + discovered = TRUE + instability = A.instability + var/extra + if(viable_occupant && !(storage_slot || viable_occupant.dna.mutation_in_sequence(mutation))) + extra = TRUE + + if(discovered && !scrambled) + var/mutcolor + switch(A.quality) + if(POSITIVE) + mutcolor = "good" + if(MINOR_NEGATIVE) + mutcolor = "average" + if(NEGATIVE) + mutcolor = "bad" + if(HM) + instability *= GET_MUTATION_STABILIZER(HM) + temp_html += "
[mut_name] ([alias])
" + temp_html += "
Instability : [round(instability)]
" + else + temp_html += "
[alias]
" + temp_html += "
[mut_desc]
" + if(active && !storage_slot) + if(HM?.can_chromosome && (HM in viable_occupant.dna.mutations)) + var/i = viable_occupant.dna.mutations.Find(HM) + var/chromosome_name = "----" + if(HM.chromosome_name) + chromosome_name = HM.chromosome_name + temp_html += "
Chromosome status: [chromosome_name]
" + temp_html += "
Sequence:

" + if(!scrambled) + for(var/block in 1 to A.blocks) + var/whole_sequence = get_valid_gene_string(mutation) + var/sequence = copytext(whole_sequence, 1+(block-1)*(DNA_SEQUENCE_LENGTH*2),(DNA_SEQUENCE_LENGTH*2*block+1)) + temp_html += "
" + for(var/i in 1 to DNA_SEQUENCE_LENGTH) + var/num = 1+(i-1)*2 + var/genenum = num+(DNA_SEQUENCE_LENGTH*2*(block-1)) + temp_html += "" + temp_html += "" + for(var/i in 1 to DNA_SEQUENCE_LENGTH) + temp_html += "" + temp_html += "" + for(var/i in 1 to DNA_SEQUENCE_LENGTH) + var/num = i*2 + var/genenum = num+(DNA_SEQUENCE_LENGTH*2*(block-1)) + temp_html += "" + temp_html += "
|
" + temp_html += "




" + else + temp_html = "
Sequence unreadable due to unpredictable mutation.
" + if((active || storage_slot) && (injectorready < world.time) && !scrambled) + temp_html += "Print Activator" + temp_html += "Print Mutator" + else + temp_html += "Print Activator" + temp_html += "Print Mutator" + temp_html += "
" + if(storage_slot) + temp_html += "Delete" + if((LAZYLEN(stored_mutations) < max_storage) && diskette && !diskette.read_only) + temp_html += "Export" + else + temp_html += "Export" + temp_html += "Back" + else if(active && !scrambled) + temp_html += "Store" + temp_html += "Adv. Injector" + if(extra || scrambled) + temp_html += "Nullify" + else + temp_html += "Nullify" + temp_html += "
" + return temp_html /obj/machinery/computer/scan_consolenew/Topic(href, href_list) if(..()) @@ -350,13 +594,15 @@ radstrength = WRAP(num, 1, RADIATION_STRENGTH_MAX+1) if("screen") current_screen = href_list["text"] - if("rejuv") - if(viable_occupant && viable_occupant.reagents) - var/potassiodide_amount = viable_occupant.reagents.get_reagent_amount(/datum/reagent/medicine/potass_iodide) - var/can_add = max(min(REJUVENATORS_MAX - potassiodide_amount, REJUVENATORS_INJECT), 0) - viable_occupant.reagents.add_reagent(/datum/reagent/medicine/potass_iodide, can_add) + if("scramble") + if(viable_occupant && (scrambleready < world.time)) + viable_occupant.dna.remove_all_mutations(list(MUT_NORMAL, MUT_EXTRA)) + viable_occupant.dna.generate_dna_blocks() + scrambleready = world.time + SCRAMBLE_TIMEOUT + to_chat(usr,"DNA scrambled.") + viable_occupant.radiation += RADIATION_STRENGTH_MULTIPLIER*50/(connected.damage_coeff ** 2) if("setbufferlabel") - var/text = sanitize(input(usr, "Input a new label:", "Input an Text", null) as text|null) + var/text = sanitize(input(usr, "Input a new label:", "Input a Text", null) as text|null) if(num && text) num = CLAMP(num, 1, NUMBER_OF_BUFFERS) var/list/buffer_slot = buffer[num] @@ -368,7 +614,6 @@ buffer[num] = list( "label"="Buffer[num]:[viable_occupant.real_name]", "UI"=viable_occupant.dna.uni_identity, - "SE"=viable_occupant.dna.struc_enzymes, "UE"=viable_occupant.dna.unique_enzymes, "name"=viable_occupant.real_name, "blood_type"=viable_occupant.dna.blood_type @@ -382,8 +627,6 @@ if("transferbuffer") if(num && viable_occupant) switch(href_list["text"]) //Numbers are this high because other way upgrading laser is just not worth the hassle, and i cant think of anything better to inmrove - if("se") - apply_buffer(SCANNER_ACTION_SE,num) if("ui") apply_buffer(SCANNER_ACTION_UI,num) if("ue") @@ -397,28 +640,6 @@ if(istype(buffer_slot)) var/obj/item/dnainjector/timed/I switch(href_list["text"]) - if("se") - if(buffer_slot["SE"]) - I = new /obj/item/dnainjector/timed(loc) - var/powers = 0 - for(var/datum/mutation/human/HM in GLOB.good_mutations + GLOB.bad_mutations + GLOB.not_good_mutations) - if(HM.check_block_string(buffer_slot["SE"])) - I.add_mutations.Add(HM) - if(HM in GLOB.good_mutations) - powers += 1 - if(HM in GLOB.bad_mutations + GLOB.not_good_mutations) - powers -= 1 //To prevent just unlocking everything to get all powers to a syringe for max tech - else - I.remove_mutations.Add(HM) - var/time_coeff - for(var/datum/mutation/human/HM in I.add_mutations) - if(!time_coeff) - time_coeff = HM.time_coeff - continue - time_coeff = min(time_coeff,HM.time_coeff) - if(connected) - I.duration = I.duration * time_coeff * connected.damage_coeff - I.damage_coeff = connected.damage_coeff if("ui") if(buffer_slot["UI"]) I = new /obj/item/dnainjector/timed(loc) @@ -457,7 +678,7 @@ if("setdelayed") if(num) delayed_action = list("action"=text2num(href_list["delayaction"]),"buffer"=num) - if("pulseui","pulsese") + if("pulseui") if(num && viable_occupant && connected) radduration = WRAP(radduration, 1, RADIATION_DURATION_MAX+1) radstrength = WRAP(radstrength, 1, RADIATION_STRENGTH_MAX+1) @@ -469,7 +690,7 @@ ui_interact(usr) sleep(radduration*10) - current_screen = "mainmenu" + current_screen = "ui" if(viable_occupant && connected && connected.occupant==viable_occupant) viable_occupant.radiation += (RADIATION_IRRADIATION_MULTIPLIER*radduration*radstrength)/(connected.damage_coeff ** 2) //Read comment in "transferbuffer" section above for explanation @@ -478,7 +699,7 @@ var/len = length_char(viable_occupant.dna.uni_identity) num = WRAP(num, 1, len+1) num = randomize_radiation_accuracy(num, radduration + (connected.precision_coeff ** 2), len) //Each manipulator level above 1 makes randomization as accurate as selected time + manipulator lvl^2 - //Value is this high for the same reason as with laser - not worth the hassle of upgrading if the bonus is low + //Value is this high for the same reason as with laser - not worth the hassle of upgrading if the bonus is low var/block = round((num-1)/DNA_BLOCK_SIZE)+1 var/subblock = num - block*DNA_BLOCK_SIZE last_change = "UI #[block]-[subblock]; " @@ -490,35 +711,229 @@ viable_occupant.dna.uni_identity = copytext_char(viable_occupant.dna.uni_identity, 1, num) + hex + copytext_char(viable_occupant.dna.uni_identity, num + 1) viable_occupant.updateappearance(mutations_overlay_update=1) - if("pulsese") - var/len = length(viable_occupant.dna.struc_enzymes) - num = WRAP(num, 1, len+1) - num = randomize_radiation_accuracy(num, radduration + (connected.precision_coeff ** 2), len) - - var/block = round((num-1)/DNA_BLOCK_SIZE)+1 - var/subblock = num - block*DNA_BLOCK_SIZE - last_change = "SE #[block]-[subblock]; " - - var/hex = copytext_char(viable_occupant.dna.struc_enzymes, num, num+1) - last_change += "[hex]" - hex = scramble(hex, radstrength, radduration) - last_change += "->[hex]" - - viable_occupant.dna.struc_enzymes = copytext_char(viable_occupant.dna.struc_enzymes, 1, num) + hex + copytext_char(viable_occupant.dna.struc_enzymes, num + 1) - viable_occupant.domutcheck() else current_screen = "mainmenu" if(connected) connected.locked = locked_state + if("inspect") + if(viable_occupant) + var/list/mutations = get_mutation_list(TRUE) + if(current_mutation == mutations[num]) + current_mutation = null + else + current_mutation = mutations[num] + + if("inspectstorage") + current_storage = num + current_screen = "info" + if("savemut") + if(viable_occupant) + var/succes + if(LAZYLEN(stored_mutations) < max_storage) + var/mutation = text2path(href_list["path"]) + if(ispath(mutation, /datum/mutation/human)) //sanity checks + var/datum/mutation/human/HM = viable_occupant.dna.get_mutation(mutation) + if(HM) + var/datum/mutation/human/A = new HM.type() + A.copy_mutation(HM) + succes = TRUE + stored_mutations += A + to_chat(usr,"Mutation succesfully stored.") + if(!succes) //we can exactly return here + to_chat(usr,"Mutation storage is full.") + if("deletemut") + var/datum/mutation/human/HM = stored_mutations[num] + if(HM) + stored_mutations.Remove(HM) + qdel(HM) + current_screen = "mutations" + if("activator") + if(injectorready < world.time) + var/mutation = text2path(href_list["path"]) + if(ispath(mutation, /datum/mutation/human)) + var/datum/mutation/human/HM = get_valid_mutation(mutation) + if(HM) + var/obj/item/dnainjector/activator/I = new /obj/item/dnainjector/activator(loc) + I.add_mutations += new HM.type (copymut = HM) + I.name = "[HM.name] activator" + I.research = TRUE + if(connected) + I.damage_coeff = connected.damage_coeff*4 + injectorready = world.time + INJECTOR_TIMEOUT * (1 - 0.1 * connected.precision_coeff) //precision_coeff being the matter bin rating + else + injectorready = world.time + INJECTOR_TIMEOUT + if("mutator") + if(injectorready < world.time) + var/mutation = text2path(href_list["path"]) + if(ispath(mutation, /datum/mutation/human)) + var/datum/mutation/human/HM = get_valid_mutation(mutation) + if(HM) + var/obj/item/dnainjector/activator/I = new /obj/item/dnainjector/activator(loc) + I.add_mutations += new HM.type (copymut = HM) + I.doitanyway = TRUE + I.name = "[HM.name] injector" + if(connected) + I.damage_coeff = connected.damage_coeff + injectorready = world.time + INJECTOR_TIMEOUT * 5 * (1 - 0.1 * connected.precision_coeff) + else + injectorready = world.time + INJECTOR_TIMEOUT * 5 + + if("advinjector") + var/selection = href_list["injector"] + if(injectorready < world.time) + if(injector_selection.Find(selection)) + var/list/true_selection = injector_selection[selection] + if(LAZYLEN(injector_selection)) + var/obj/item/dnainjector/activator/I = new /obj/item/dnainjector/activator(loc) + for(var/A in true_selection) + var/datum/mutation/human/HM = A + I.add_mutations += new HM.type (copymut = HM) + I.doitanyway = TRUE + I.name = "Advanced [selection] injector" + if(connected) + I.damage_coeff = connected.damage_coeff + injectorready = world.time + INJECTOR_TIMEOUT * 8 * (1 - 0.1 * connected.precision_coeff) + else + injectorready = world.time + INJECTOR_TIMEOUT * 8 + if("nullify") + if(viable_occupant) + var/datum/mutation/human/A = viable_occupant.dna.get_mutation(current_mutation) + if(A && (!viable_occupant.dna.mutation_in_sequence(current_mutation) || A.scrambled)) + viable_occupant.dna.remove_mutation(current_mutation) + current_screen = "mainmenu" + current_mutation = null + if("pulsegene") + if(current_screen != "info") + var/path = text2path(href_list["path"]) + if(viable_occupant && num && (path in viable_occupant.dna.mutation_index)) + var/list/genes = list("A","T","G","C","X") + if(jokerready < world.time) + genes += "JOKER" + var/sequence = GET_GENE_STRING(path, viable_occupant.dna) + var/original = sequence[num] + var/new_gene = input("From [original] to-", "New block", original) as null|anything in genes + if(!new_gene) + new_gene = original + if(viable_occupant == get_viable_occupant()) //No cheesing + if((new_gene == "JOKER") && (jokerready < world.time)) + var/true_genes = GET_SEQUENCE(current_mutation) + new_gene = true_genes[num] + jokerready = world.time + JOKER_TIMEOUT - (JOKER_UPGRADE * (connected.precision_coeff-1)) + sequence = copytext(sequence, 1, num) + new_gene + copytext(sequence, num+1, length(sequence)+1) + viable_occupant.dna.mutation_index[path] = sequence + viable_occupant.radiation += RADIATION_STRENGTH_MULTIPLIER/connected.damage_coeff + viable_occupant.domutcheck() + if("exportdiskmut") + if(diskette && !diskette.read_only) + var/path = text2path(href_list["path"]) + if(ispath(path, /datum/mutation/human)) + var/datum/mutation/human/A = get_valid_mutation(path) + if(A && diskette && (LAZYLEN(diskette.mutations) < diskette.max_mutations)) + var/datum/mutation/human/HM = new A.type() + diskette.mutations += HM + HM.copy_mutation(A) + to_chat(usr, "Succesfully written [A.name] to [diskette.name].") + if("deletediskmut") + if(diskette && !diskette.read_only) + if(num && (LAZYLEN(diskette.mutations) >= num)) + var/datum/mutation/human/A = diskette.mutations[num] + diskette.mutations.Remove(A) + qdel(A) + if("importdiskmut") + if(diskette && (LAZYLEN(diskette.mutations) >= num)) + if(LAZYLEN(stored_mutations) < max_storage) + var/datum/mutation/human/A = diskette.mutations[num] + var/datum/mutation/human/HM = new A.type() + HM.copy_mutation(A) + stored_mutations += HM + to_chat(usr,"Succesfully written [A.name] to storage.") + if("combine") + if(num && (LAZYLEN(stored_mutations) >= num)) + if(LAZYLEN(stored_mutations) < max_storage) + var/datum/mutation/human/A = stored_mutations[num] + var/path = A.type + if(combine) + var/result_path = get_mixed_mutation(combine, path) + if(result_path) + stored_mutations += new result_path() + to_chat(usr, "Succes! New mutation has been added to storage") + discover(result_path) + combine = null + else + to_chat(usr, "Failed. No mutation could be created.") + combine = null + else + combine = path + to_chat(usr,"Selected [A.name] for combining") + else + to_chat(usr, "Not enough space to store potential mutation.") + if("ejectchromosome") + if(LAZYLEN(stored_chromosomes) <= num) + var/obj/item/chromosome/CM = stored_chromosomes[num] + CM.forceMove(drop_location()) + adjust_item_drop_location(CM) + stored_chromosomes -= CM + if("applychromosome") + if(viable_occupant && (LAZYLEN(viable_occupant.dna.mutations) <= num)) + var/datum/mutation/human/HM = viable_occupant.dna.mutations[num] + var/list/chromosomes = list() + for(var/obj/item/chromosome/CM in stored_chromosomes) + if(CM.can_apply(HM)) + chromosomes += CM + if(chromosomes.len) + var/obj/item/chromosome/CM = input("Select a chromosome to apply", "Apply Chromosome") as null|anything in sortNames(chromosomes) + if(CM) + to_chat(usr, "You apply [CM] to [HM.name].") + stored_chromosomes -= CM + CM.apply(HM) + if("expand_advinjector") + var/mutation = text2path(href_list["path"]) + var/datum/mutation/human/HM = get_valid_mutation(mutation) + if(HM && LAZYLEN(injector_selection)) + var/which_injector = input(usr, "Select Adv. Injector", "Advanced Injectors") as null|anything in injector_selection + if(injector_selection.Find(which_injector)) + var/list/true_selection = injector_selection[which_injector] + var/total_instability + for(var/B in true_selection) + var/datum/mutation/human/mootacion = B + total_instability += mootacion.instability + total_instability += HM.instability + if((total_instability > max_injector_instability) || (true_selection.len + 1) > max_injector_mutations) + to_chat(usr, "Adding more mutations would make the advanced injector too unstable!") + else + true_selection += HM //reminder that this works. because I keep forgetting this works + if("remove_from_advinjector") + var/mutation = text2path(href_list["path"]) + var/selection = href_list["injector"] + if(injector_selection.Find(selection)) + var/list/true_selection = injector_selection[selection] + for(var/B in true_selection) + var/datum/mutation/human/HM = B + if(HM.type == mutation) + true_selection -= HM + break + + if("remove_advinjector") + var/selection = href_list["injector"] + for(selection in injector_selection) + if(selection == selection) + injector_selection.Remove(selection) + + if("add_advinjector") + if(LAZYLEN(injector_selection) < max_injector_selections) + var/new_selection = input(usr, "Enter Adv. Injector name", "Advanced Injectors") as text|null + if(new_selection && !(new_selection in injector_selection)) + injector_selection[new_selection] = list() + ui_interact(usr,last_change) -/obj/machinery/computer/scan_consolenew/proc/scramble(input,rs,rd) +/obj/machinery/computer/scan_consolenew/proc/scramble(input,rs,rd) //hexadecimal genetics. dont confuse with scramble button var/length = length(input) var/ran = gaussian(0, rs*RADIATION_STRENGTH_MULTIPLIER) if(ran == 0) - ran = pick(-1,1) //hacky, statistically should almost never happen. 0-change makes people mad though + ran = pick(-1,1) //hacky, statistically should almost never happen. 0-chance makes people mad though else if(ran < 0) ran = round(ran) //negative, so floor it else @@ -547,10 +962,6 @@ //Each laser level reduces damage by lvl^2, so no effect on 1 lvl, 4 times less damage on 2 and 9 times less damage on 3 //Numbers are this high because other way upgrading laser is just not worth the hassle, and i cant think of anything better to inmrove switch(action) - if(SCANNER_ACTION_SE) - if(buffer_slot["SE"]) - viable_occupant.dna.struc_enzymes = buffer_slot["SE"] - viable_occupant.domutcheck() if(SCANNER_ACTION_UI) if(buffer_slot["UI"]) viable_occupant.dna.uni_identity = buffer_slot["UI"] @@ -572,15 +983,54 @@ viable_occupant.dna.blood_type = buffer_slot["blood_type"] /obj/machinery/computer/scan_consolenew/proc/on_scanner_close() - if(delayed_action && connected) + if(delayed_action && get_viable_occupant()) to_chat(connected.occupant, "[src] activates!") apply_buffer(delayed_action["action"],delayed_action["buffer"]) delayed_action = null //or make it stick + reset button ? +/obj/machinery/computer/scan_consolenew/proc/get_valid_mutation(mutation) + var/mob/living/carbon/C = get_viable_occupant() + if(C) + var/datum/mutation/human/HM = C.dna.get_mutation(mutation) + if(HM) + return HM + for(var/datum/mutation/human/A in stored_mutations) + if(A.type == mutation) + return A + + +/obj/machinery/computer/scan_consolenew/proc/get_mutation_list(include_storage) //Returns a list of the mutation index types and any extra mutations + var/mob/living/carbon/viable_occupant = get_viable_occupant() + var/list/paths = list() + if(viable_occupant) + for(var/A in viable_occupant.dna.mutation_index) + paths += A + for(var/datum/mutation/human/A in viable_occupant.dna.mutations) + if(A.class == MUT_EXTRA) + paths += A.type + if(include_storage) + for(var/datum/mutation/human/A in stored_mutations) + paths += A.type + return paths + +/obj/machinery/computer/scan_consolenew/proc/get_valid_gene_string(mutation) + var/mob/living/carbon/C = get_viable_occupant() + if(C && (mutation in C.dna.mutation_index)) + return GET_GENE_STRING(mutation, C.dna) + else if(C && (LAZYLEN(C.dna.mutations))) + for(var/datum/mutation/human/A in C.dna.mutations) + if(A.type == mutation) + return GET_SEQUENCE(mutation) + for(var/datum/mutation/human/A in stored_mutations) + if(A.type == mutation) + return GET_SEQUENCE(mutation) + +/obj/machinery/computer/scan_consolenew/proc/discover(mutation) + if(stored_research && !(mutation in stored_research.discovered_mutations)) + stored_research.discovered_mutations += mutation + return TRUE /////////////////////////// DNA MACHINES #undef INJECTOR_TIMEOUT -#undef REJUVENATORS_INJECT -#undef REJUVENATORS_MAX #undef NUMBER_OF_BUFFERS #undef RADIATION_STRENGTH_MAX diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index ed61e13596..4b2ba85d11 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -22,7 +22,7 @@ precision_coeff = 0 for(var/obj/item/stock_parts/scanning_module/P in component_parts) scan_level += P.rating - for(var/obj/item/stock_parts/manipulator/P in component_parts) + for(var/obj/item/stock_parts/matter_bin/P in component_parts) precision_coeff = P.rating for(var/obj/item/stock_parts/micro_laser/P in component_parts) damage_coeff = P.rating diff --git a/code/game/machinery/exp_cloner.dm b/code/game/machinery/exp_cloner.dm index 25e5948b51..a88cba851f 100644 --- a/code/game/machinery/exp_cloner.dm +++ b/code/game/machinery/exp_cloner.dm @@ -9,7 +9,7 @@ internal_radio = FALSE //Start growing a human clone in the pod! -/obj/machinery/clonepod/experimental/growclone(ckey, clonename, ui, se, datum/species/mrace, list/features, factions) +/obj/machinery/clonepod/experimental/growclone(clonename, ui, mutation_index, mindref, last_death, blood_type, datum/species/mrace, list/features, factions, list/quirks) if(panel_open) return FALSE if(mess || attempting) @@ -20,15 +20,15 @@ var/mob/living/carbon/human/H = new /mob/living/carbon/human(src) - H.hardset_dna(ui, se, H.real_name, null, mrace, features) + H.hardset_dna(ui, mutation_index, H.real_name, blood_type, mrace, features) if(efficiency > 2) var/list/unclean_mutations = (GLOB.not_good_mutations|GLOB.bad_mutations) H.dna.remove_mutation_group(unclean_mutations) if(efficiency > 5 && prob(20)) - H.randmutvg() + H.easy_randmut(POSITIVE) if(efficiency < 3 && prob(50)) - var/mob/M = H.randmutb() + var/mob/M = H.easy_randmut(NEGATIVE+MINOR_NEGATIVE) if(ismob(M)) H = M @@ -42,18 +42,17 @@ icon_state = "pod_1" //Get the clone body ready maim_clone(H) - ADD_TRAIT(H, TRAIT_STABLEHEART, CLONING_POD_TRAIT) - ADD_TRAIT(H, TRAIT_STABLELIVER, CLONING_POD_TRAIT) - ADD_TRAIT(H, TRAIT_EMOTEMUTE, CLONING_POD_TRAIT) - ADD_TRAIT(H, TRAIT_MUTE, CLONING_POD_TRAIT) - ADD_TRAIT(H, TRAIT_NOBREATH, CLONING_POD_TRAIT) - ADD_TRAIT(H, TRAIT_NOCRITDAMAGE, CLONING_POD_TRAIT) + ADD_TRAIT(H, TRAIT_STABLEHEART, "cloning") + ADD_TRAIT(H, TRAIT_EMOTEMUTE, "cloning") + ADD_TRAIT(H, TRAIT_MUTE, "cloning") + ADD_TRAIT(H, TRAIT_NOBREATH, "cloning") + ADD_TRAIT(H, TRAIT_NOCRITDAMAGE, "cloning") H.Unconscious(80) - var/list/candidates = pollCandidatesForMob("Do you want and agree to play as a [clonename]'s defective clone, respect their character and not engage in ERP without permission from the original?", null, null, null, 100, H, POLL_IGNORE_CLONE) + var/list/candidates = pollCandidatesForMob("Do you want to play as [clonename]'s defective clone?", null, null, null, 100, H) if(LAZYLEN(candidates)) var/mob/dead/observer/C = pick(candidates) - C.transfer_ckey(H) + H.key = C.key if(grab_ghost_when == CLONER_FRESH_CLONE) H.grab_ghost() @@ -293,6 +292,7 @@ temp = "Cloning cycle already in progress." playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0) else - pod.growclone(null, mob_occupant.real_name, dna.uni_identity, dna.struc_enzymes, clone_species, dna.features, mob_occupant.faction) + pod.growclone(mob_occupant.real_name, dna.uni_identity, dna.mutation_index, null, null, dna.blood_type, clone_species, dna.features, mob_occupant.faction) temp = "[mob_occupant.real_name] => Cloning data sent to pod." playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) + diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 8b6c2180d9..97c89c9168 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -63,7 +63,7 @@ Buildable meters if(make_from.flipped) do_a_flip() -/obj/item/pipe/dropped() +/obj/item/pipe/dropped(mob/user) if(loc) setPipingLayer(piping_layer) return ..() @@ -225,7 +225,7 @@ Buildable meters to_chat(user, "You fasten the meter to the [loc.name].") qdel(src) -/obj/item/pipe_meter/dropped() +/obj/item/pipe_meter/dropped(mob/user) . = ..() if(loc) setAttachLayer(piping_layer) diff --git a/code/game/machinery/toylathe.dm b/code/game/machinery/toylathe.dm index 87ab3cadd8..c679f3f983 100644 --- a/code/game/machinery/toylathe.dm +++ b/code/game/machinery/toylathe.dm @@ -46,7 +46,12 @@ ) /obj/machinery/autoylathe/Initialize() - AddComponent(/datum/component/material_container, list(/datum/material/iron, /datum/material/glass, /datum/material/plastic), 0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert)) + var/static/list/allowed_materials = list( + /datum/material/iron, + /datum/material/glass, + /datum/material/plastic + ) + AddComponent(/datum/component/material_container, allowed_materials, 0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert)) . = ..() wires = new /datum/wires/autoylathe(src) diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm index 38ef518f49..4ddb5281ea 100644 --- a/code/game/mecha/equipment/tools/other_tools.dm +++ b/code/game/mecha/equipment/tools/other_tools.dm @@ -283,13 +283,13 @@ /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_charge() if(equip_ready) //disabled return - var/area/A = get_base_area(chassis) - var/pow_chan = get_power_channel(A) + var/area/A = get_area(chassis) + var/pow_chan = get_MUTATION_POWER_channel(A) if(pow_chan) return 1000 //making magic -/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_power_channel(var/area/A) +/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_MUTATION_POWER_channel(var/area/A) var/pow_chan if(A) for(var/c in use_channels) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index f9b8f31bca..2ebb2f6ded 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -35,9 +35,19 @@ ) /obj/machinery/mecha_part_fabricator/Initialize() - var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, - list(/datum/material/iron, /datum/material/glass, /datum/material/silver, /datum/material/gold, /datum/material/diamond, /datum/material/plasma, /datum/material/uranium, /datum/material/bananium, /datum/material/titanium, /datum/material/bluespace), 0, - TRUE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) + var/static/list/allowed_types = list( + /datum/material/iron, + /datum/material/glass, + /datum/material/silver, + /datum/material/gold, + /datum/material/diamond, + /datum/material/plasma, + /datum/material/uranium, + /datum/material/bananium, + /datum/material/titanium, + /datum/material/bluespace + ) + var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, allowed_types, 0, TRUE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) materials.precise_insertion = TRUE stored_research = new return ..() diff --git a/code/game/mecha/mecha_defense.dm b/code/game/mecha/mecha_defense.dm index 08843c9202..581283d339 100644 --- a/code/game/mecha/mecha_defense.dm +++ b/code/game/mecha/mecha_defense.dm @@ -320,11 +320,7 @@ clearInternalDamage(MECHA_INT_CONTROL_LOST) /obj/mecha/narsie_act() - if(occupant) - var/mob/living/L = occupant - go_out(TRUE) - if(L) - L.narsie_act() + emp_act(EMP_HEAVY) /obj/mecha/ratvar_act() if((GLOB.ratvar_awakens || GLOB.clockwork_gateway_activated) && occupant) diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 20c85f37a1..48fba2687d 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -28,6 +28,7 @@ take_damage(5, BURN, 0, 0) /obj/structure/spider/stickyweb + var/genetic = FALSE icon_state = "stickyweb1" /obj/structure/spider/stickyweb/Initialize() @@ -36,6 +37,8 @@ . = ..() /obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target) + if (genetic) + return if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider)) return TRUE else if(isliving(mover)) @@ -48,6 +51,27 @@ return prob(30) return TRUE +/obj/structure/spider/stickyweb/genetic //for the spider genes in genetics + genetic = TRUE + var/mob/living/allowed_mob + +/obj/structure/spider/stickyweb/genetic/Initialize(mapload, allowedmob) + allowed_mob = allowedmob + . = ..() + +/obj/structure/spider/stickyweb/genetic/CanPass(atom/movable/mover, turf/target) + . = ..() //this is the normal spider web return aka a spider would make this TRUE + if(mover == allowed_mob) + return TRUE + else if(isliving(mover)) //we change the spider to not be able to go through here + if(mover.pulledby == allowed_mob) + return TRUE + if(prob(50)) + to_chat(mover, "You get stuck in \the [src] for a moment.") + return FALSE + else if(istype(mover, /obj/item/projectile)) + return prob(30) + /obj/structure/spider/eggcluster name = "egg cluster" desc = "They seem to pulse slightly with an inner life." diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index fd6ae1bb43..5c2f151e38 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -850,3 +850,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) if (HAS_TRAIT(src, TRAIT_NODROP)) return return ..() + +/obj/item/proc/embedded(mob/living/carbon/human/embedded_mob) + return + +/obj/item/proc/unembedded() + return \ No newline at end of file diff --git a/code/game/objects/items/RCL.dm b/code/game/objects/items/RCL.dm index 9513519fa9..72e6ccbbe2 100644 --- a/code/game/objects/items/RCL.dm +++ b/code/game/objects/items/RCL.dm @@ -117,7 +117,7 @@ . = ..() if(!isinhands || !(loaded?.amount)) return - var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[CEILING(loaded.amount/(max_amount/3), 1)]") + var/mutable_appearance/cable_overlay = mutable_appearance(icon_file, "rcl-[CEILING(loaded.amount/(max_amount/3), 1)]") cable_overlay.color = GLOB.cable_colors[colors[current_color_index]] . += cable_overlay diff --git a/code/game/objects/items/chromosome.dm b/code/game/objects/items/chromosome.dm new file mode 100644 index 0000000000..1340e7f35b --- /dev/null +++ b/code/game/objects/items/chromosome.dm @@ -0,0 +1,92 @@ +/obj/item/chromosome + name = "blank chromosome" + icon = 'icons/obj/chromosomes.dmi' + icon_state = "" + desc = "A tube holding chromosomic data." + force = 0 + w_class = WEIGHT_CLASS_SMALL + + var/stabilizer_coeff = 1 //lower is better, affects genetic stability + var/synchronizer_coeff = 1 //lower is better, affects chance to backfire + var/power_coeff = 1 //higher is better, affects "strength" + var/energy_coeff = 1 //lower is better. affects recharge time + + var/weight = 5 + +/obj/item/chromosome/proc/can_apply(datum/mutation/human/HM) + if(!HM || !(HM.can_chromosome == CHROMOSOME_NONE)) + return FALSE + if((stabilizer_coeff != 1) && (HM.stabilizer_coeff != -1)) //if the chromosome is 1, we dont change anything. If the mutation is -1, we cant change it. sorry + return TRUE + if((synchronizer_coeff != 1) && (HM.synchronizer_coeff != -1)) + return TRUE + if((power_coeff != 1) && (HM.power_coeff != -1)) + return TRUE + if((energy_coeff != 1) && (HM.energy_coeff != -1)) + return TRUE + +/obj/item/chromosome/proc/apply(datum/mutation/human/HM) + if(HM.stabilizer_coeff != -1) + HM.stabilizer_coeff = stabilizer_coeff + if(HM.synchronizer_coeff != -1) + HM.synchronizer_coeff = synchronizer_coeff + if(HM.power_coeff != -1) + HM.power_coeff = power_coeff + if(HM.energy_coeff != -1) + HM.energy_coeff = energy_coeff + HM.can_chromosome = 2 + HM.chromosome_name = name + HM.modify() + qdel(src) + +/proc/generate_chromosome() + var/static/list/chromosomes + if(!chromosomes) + chromosomes = list() + for(var/A in subtypesof(/obj/item/chromosome)) + var/obj/item/chromosome/CM = A + if(!initial(CM.weight)) + break + chromosomes[A] = initial(CM.weight) + return pickweight(chromosomes) + + +/obj/item/chromosome/stabilizer + name = "stabilizer chromosome" + desc = "A chromosome that adjusts to the body to reduce genetic damage by 20%." + icon_state = "stabilizer" + stabilizer_coeff = 0.8 + weight = 1 + +/obj/item/chromosome/synchronizer + name = "synchronizer chromosome" + desc = "A chromosome that gives the mind more controle over the mutation, reducing knockback and downsides by 50%." + icon_state = "synchronizer" + synchronizer_coeff = 0.5 + +/obj/item/chromosome/power + name = "power chromosome" + desc = "A power chromosome for boosting certain mutation's power by 50%." + icon_state = "power" + power_coeff = 1.5 + +/obj/item/chromosome/energy + name = "energetic chromosome" + desc = "A chromosome that reduces cooldown on action based mutations by 50%." + icon_state = "energy" + energy_coeff = 0.5 + +/obj/item/chromosome/reinforcer + name = "reinforcement chromosome" + desc = "Renders the mutation immune to mutadone." + icon_state = "reinforcer" + weight = 3 + +/obj/item/chromosome/reinforcer/can_apply(datum/mutation/human/HM) + if(!HM || !(HM.can_chromosome == CHROMOSOME_NONE)) + return FALSE + return !HM.mutadone_proof + +/obj/item/chromosome/reinforcer/apply(datum/mutation/human/HM) + HM.mutadone_proof = TRUE + ..() \ No newline at end of file diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm index 7b8c53484a..6b3428698b 100644 --- a/code/game/objects/items/chrono_eraser.dm +++ b/code/game/objects/items/chrono_eraser.dm @@ -18,15 +18,11 @@ /obj/item/chrono_eraser/proc/pass_mind(datum/mind/M) erased_minds += M -/obj/item/chrono_eraser/dropped() +/obj/item/chrono_eraser/dropped(mob/user) ..() if(PA) qdel(PA) -/obj/item/chrono_eraser/Destroy() - dropped() - return ..() - /obj/item/chrono_eraser/ui_action_click(mob/user) if(iscarbon(user)) var/mob/living/carbon/C = user diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm index df0a4e6cf3..b13cfd9f64 100644 --- a/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -74,7 +74,7 @@ build_path = /obj/machinery/dna_scannernew req_components = list( /obj/item/stock_parts/scanning_module = 1, - /obj/item/stock_parts/manipulator = 1, + /obj/item/stock_parts/matter_bin = 1, /obj/item/stock_parts/micro_laser = 1, /obj/item/stack/sheet/glass = 1, /obj/item/stack/cable_coil = 2) diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index e87987600a..57443de973 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -21,7 +21,7 @@ var/obj/item/cigbutt/butt = /obj/item/cigbutt saved_appearance = initial(butt.appearance) -/obj/item/chameleon/dropped() +/obj/item/chameleon/dropped(mob/user) ..() disrupt() diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index 9eb51ffaeb..5cab9e33de 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -218,7 +218,7 @@ /obj/item/geiger_counter/cyborg/proc/redirect_rad_act(datum/source, amount) rad_act(amount) -/obj/item/geiger_counter/cyborg/dropped() +/obj/item/geiger_counter/cyborg/dropped(mob/user) . = ..() if(listeningTo) UnregisterSignal(listeningTo, COMSIG_ATOM_RAD_ACT) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 556080168f..8802698b5d 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -150,7 +150,10 @@ SLIME SCANNER msg += "\n\tSubject appears to have [M.getCloneLoss() > 30 ? "Severe" : "Minor"] cellular damage." if(advanced) msg += "\n\tCellular Damage Level: [M.getCloneLoss()]." - + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(advanced && H.has_dna()) + msg += "\n\tGenetic Stability: [H.dna.stability]%." to_chat(user, msg) msg = "" @@ -326,8 +329,8 @@ SLIME SCANNER breathes = FALSE if(NOBLOOD in C.dna.species.species_traits) blooded = FALSE - var/has_liver = (!(NOLIVER in C.dna.species.species_traits)) - var/has_stomach = (!(NOSTOMACH in C.dna.species.species_traits)) + var/has_liver = C.dna && !(NOLIVER in C.dna.species.species_traits) + var/has_stomach = C.dna && !(NOSTOMACH in C.dna.species.species_traits) if(!M.getorganslot(ORGAN_SLOT_EYES)) msg += "\tSubject does not have eyes.\n" if(!M.getorganslot(ORGAN_SLOT_EARS)) @@ -776,3 +779,104 @@ SLIME SCANNER var/response = SEND_SIGNAL(M, COMSIG_NANITE_SCAN, user, TRUE) if(!response) to_chat(user, "No nanites detected in the subject.") + +/obj/item/sequence_scanner + name = "genetic sequence scanner" + icon = 'icons/obj/device.dmi' + icon_state = "gene" + item_state = "healthanalyzer" + lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + desc = "A hand-held scanner for analyzing someones gene sequence on the fly. Hold near a DNA console to update the internal database." + flags_1 = CONDUCT_1 + item_flags = NOBLUDGEON + slot_flags = ITEM_SLOT_BELT + throwforce = 3 + w_class = WEIGHT_CLASS_TINY + throw_speed = 3 + throw_range = 7 + custom_materials = list(/datum/material/iron=200) + var/list/discovered = list() //hit a dna console to update the scanners database + var/list/buffer + var/ready = TRUE + var/cooldown = 200 + +/obj/item/sequence_scanner/attack(mob/living/M, mob/living/carbon/human/user) + add_fingerprint(user) + if (!HAS_TRAIT(M, TRAIT_RADIMMUNE)) //no scanning if its a husk or DNA-less Species + user.visible_message("[user] analyzes [M]'s genetic sequence.", \ + "You analyze [M]'s genetic sequence.") + gene_scan(M, user) + + else + user.visible_message("[user] failed to analyse [M]'s genetic sequence.", "[M] has no readable genetic sequence!") + +/obj/item/sequence_scanner/attack_self(mob/user) + display_sequence(user) + +/obj/item/sequence_scanner/attack_self_tk(mob/user) + return + +/obj/item/sequence_scanner/afterattack(obj/O, mob/user, proximity) + . = ..() + if(!istype(O) || !proximity) + return + + if(istype(O, /obj/machinery/computer/scan_consolenew)) + var/obj/machinery/computer/scan_consolenew/C = O + if(C.stored_research) + to_chat(user, "[name] linked to central research database.") + discovered = C.stored_research.discovered_mutations + else + to_chat(user,"No database to update from.") + +/obj/item/sequence_scanner/proc/gene_scan(mob/living/carbon/C, mob/living/user) + if(!iscarbon(C) || !C.has_dna()) + return + buffer = C.dna.mutation_index + to_chat(user, "Subject [C.name]'s DNA sequence has been saved to buffer.") + if(LAZYLEN(buffer)) + for(var/A in buffer) + to_chat(user, "[get_display_name(A)]") + + +/obj/item/sequence_scanner/proc/display_sequence(mob/living/user) + if(!LAZYLEN(buffer) || !ready) + return + var/list/options = list() + for(var/A in buffer) + options += get_display_name(A) + + var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sortList(options) + if(answer && ready && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + var/sequence + for(var/A in buffer) //this physically hurts but i dont know what anything else short of an assoc list + if(get_display_name(A) == answer) + sequence = buffer[A] + break + + if(sequence) + var/display + for(var/i in 0 to length_char(sequence) / DNA_MUTATION_BLOCKS-1) + if(i) + display += "-" + display += copytext_char(sequence, 1 + i*DNA_MUTATION_BLOCKS, DNA_MUTATION_BLOCKS*(1+i) + 1) + + to_chat(user, "[display]
") + + ready = FALSE + icon_state = "[icon_state]_recharging" + addtimer(CALLBACK(src, .proc/recharge), cooldown, TIMER_UNIQUE) + +/obj/item/sequence_scanner/proc/recharge() + icon_state = initial(icon_state) + ready = TRUE + +/obj/item/sequence_scanner/proc/get_display_name(mutation) + var/datum/mutation/human/HM = GET_INITIALIZED_MUTATION(mutation) + if(!HM) + return "ERROR" + if(mutation in discovered) + return "[HM.name] ([HM.alias])" + else + return HM.alias \ No newline at end of file diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 2c101b0ec5..b929642f33 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -63,10 +63,10 @@ if(attached_device) attached_device.holder_movement() -/obj/item/transfer_valve/dropped() +/obj/item/transfer_valve/dropped(mob/user) . = ..() if(attached_device) - attached_device.dropped() + attached_device.dropped(user) /obj/item/transfer_valve/on_found(mob/finder) if(attached_device) diff --git a/code/game/objects/items/dna_injector.dm b/code/game/objects/items/dna_injector.dm index a03447c0f0..60b1e81c94 100644 --- a/code/game/objects/items/dna_injector.dm +++ b/code/game/objects/items/dna_injector.dm @@ -14,33 +14,25 @@ var/list/add_mutations = list() var/list/remove_mutations = list() - var/list/add_mutations_static = list() - var/list/remove_mutations_static = list() - var/used = 0 /obj/item/dnainjector/attack_paw(mob/user) return attack_hand(user) -/obj/item/dnainjector/proc/prepare() - for(var/mut_key in add_mutations_static) - add_mutations.Add(GLOB.mutations_list[mut_key]) - for(var/mut_key in remove_mutations_static) - remove_mutations.Add(GLOB.mutations_list[mut_key]) - /obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user) - prepare() - if(M.has_dna() && !HAS_TRAIT(M, TRAIT_RADIMMUNE) && !HAS_TRAIT(M, TRAIT_NOCLONE)) M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2)) var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]" - for(var/datum/mutation/human/HM in remove_mutations) - HM.force_lose(M) - for(var/datum/mutation/human/HM in add_mutations) - if(HM.name == RACEMUT) + for(var/HM in remove_mutations) + M.dna.remove_mutation(HM) + for(var/HM in add_mutations) + if(HM == RACEMUT) message_admins("[ADMIN_LOOKUPFLW(user)] injected [key_name_admin(M)] with the [name] (MONKEY)") log_msg += " (MONKEY)" - HM.force_give(M) + if(M.dna.mutation_in_sequence(HM)) + M.dna.activate_mutation(HM) + else + M.dna.add_mutation(HM, MUT_EXTRA) if(fields) if(fields["name"] && fields["UE"] && fields["blood_type"]) M.real_name = fields["name"] @@ -90,123 +82,123 @@ /obj/item/dnainjector/antihulk name = "\improper DNA injector (Anti-Hulk)" desc = "Cures green skin." - remove_mutations_static = list(HULK) + remove_mutations = list(HULK) /obj/item/dnainjector/hulkmut name = "\improper DNA injector (Hulk)" desc = "This will make you big and strong, but give you a bad skin condition." - add_mutations_static = list(HULK) + add_mutations = list(HULK) /obj/item/dnainjector/xraymut name = "\improper DNA injector (X-ray)" desc = "Finally you can see what the Captain does." - add_mutations_static = list(XRAY) + add_mutations = list(XRAY) /obj/item/dnainjector/antixray name = "\improper DNA injector (Anti-X-ray)" desc = "It will make you see harder." - remove_mutations_static = list(XRAY) + remove_mutations = list(XRAY) ///////////////////////////////////// /obj/item/dnainjector/antiglasses name = "\improper DNA injector (Anti-Glasses)" desc = "Toss away those glasses!" - remove_mutations_static = list(BADSIGHT) + remove_mutations = list(BADSIGHT) /obj/item/dnainjector/glassesmut name = "\improper DNA injector (Glasses)" desc = "Will make you need dorkish glasses." - add_mutations_static = list(BADSIGHT) + add_mutations = list(BADSIGHT) /obj/item/dnainjector/epimut name = "\improper DNA injector (Epi.)" desc = "Shake shake shake the room!" - add_mutations_static = list(EPILEPSY) + add_mutations = list(EPILEPSY) /obj/item/dnainjector/antiepi name = "\improper DNA injector (Anti-Epi.)" desc = "Will fix you up from shaking the room." - remove_mutations_static = list(EPILEPSY) + remove_mutations = list(EPILEPSY) //////////////////////////////////// /obj/item/dnainjector/anticough name = "\improper DNA injector (Anti-Cough)" desc = "Will stop that awful noise." - remove_mutations_static = list(COUGH) + remove_mutations = list(COUGH) /obj/item/dnainjector/coughmut name = "\improper DNA injector (Cough)" desc = "Will bring forth a sound of horror from your throat." - add_mutations_static = list(COUGH) + add_mutations = list(COUGH) /obj/item/dnainjector/antidwarf name = "\improper DNA injector (Anti-Dwarfism)" desc = "Helps you grow big and strong." - remove_mutations_static = list(DWARFISM) + remove_mutations = list(DWARFISM) /obj/item/dnainjector/dwarf name = "\improper DNA injector (Dwarfism)" desc = "It's a small world after all." - add_mutations_static = list(DWARFISM) + add_mutations = list(DWARFISM) /obj/item/dnainjector/clumsymut name = "\improper DNA injector (Clumsy)" desc = "Makes clown minions." - add_mutations_static = list(CLOWNMUT) + add_mutations = list(CLOWNMUT) /obj/item/dnainjector/anticlumsy name = "\improper DNA injector (Anti-Clumsy)" desc = "Apply this for Security Clown." - remove_mutations_static = list(CLOWNMUT) + remove_mutations = list(CLOWNMUT) /obj/item/dnainjector/antitour name = "\improper DNA injector (Anti-Tour.)" desc = "Will cure Tourette's." - remove_mutations_static = list(TOURETTES) + remove_mutations = list(TOURETTES) /obj/item/dnainjector/tourmut name = "\improper DNA injector (Tour.)" desc = "Gives you a nasty case of Tourette's." - add_mutations_static = list(TOURETTES) + add_mutations = list(TOURETTES) /obj/item/dnainjector/stuttmut name = "\improper DNA injector (Stutt.)" desc = "Makes you s-s-stuttterrr." - add_mutations_static = list(NERVOUS) + add_mutations = list(NERVOUS) /obj/item/dnainjector/antistutt name = "\improper DNA injector (Anti-Stutt.)" desc = "Fixes that speaking impairment." - remove_mutations_static = list(NERVOUS) + remove_mutations = list(NERVOUS) /obj/item/dnainjector/antifire name = "\improper DNA injector (Anti-Fire)" desc = "Cures fire." - remove_mutations_static = list(COLDRES) + remove_mutations = list(SPACEMUT) /obj/item/dnainjector/firemut name = "\improper DNA injector (Fire)" desc = "Gives you fire." - add_mutations_static = list(COLDRES) + add_mutations = list(SPACEMUT) /obj/item/dnainjector/blindmut name = "\improper DNA injector (Blind)" desc = "Makes you not see anything." - add_mutations_static = list(BLINDMUT) + add_mutations = list(BLINDMUT) /obj/item/dnainjector/antiblind name = "\improper DNA injector (Anti-Blind)" desc = "IT'S A MIRACLE!!!" - remove_mutations_static = list(BLINDMUT) + remove_mutations = list(BLINDMUT) /obj/item/dnainjector/antitele name = "\improper DNA injector (Anti-Tele.)" desc = "Will make you not able to control your mind." - remove_mutations_static = list(TK) + remove_mutations = list(TK) /obj/item/dnainjector/telemut name = "\improper DNA injector (Tele.)" desc = "Super brain man!" - add_mutations_static = list(TK) + add_mutations = list(TK) /obj/item/dnainjector/telemut/darkbundle name = "\improper DNA injector" @@ -215,100 +207,258 @@ /obj/item/dnainjector/deafmut name = "\improper DNA injector (Deaf)" desc = "Sorry, what did you say?" - add_mutations_static = list(DEAFMUT) + add_mutations = list(DEAFMUT) /obj/item/dnainjector/antideaf name = "\improper DNA injector (Anti-Deaf)" desc = "Will make you hear once more." - remove_mutations_static = list(DEAFMUT) + remove_mutations = list(DEAFMUT) /obj/item/dnainjector/h2m name = "\improper DNA injector (Human > Monkey)" desc = "Will make you a flea bag." - add_mutations_static = list(RACEMUT) + add_mutations = list(RACEMUT) /obj/item/dnainjector/m2h name = "\improper DNA injector (Monkey > Human)" desc = "Will make you...less hairy." - remove_mutations_static = list(RACEMUT) + remove_mutations = list(RACEMUT) /obj/item/dnainjector/antichameleon name = "\improper DNA injector (Anti-Chameleon)" - remove_mutations_static = list(CHAMELEON) + remove_mutations = list(CHAMELEON) /obj/item/dnainjector/chameleonmut name = "\improper DNA injector (Chameleon)" - add_mutations_static = list(CHAMELEON) + add_mutations = list(CHAMELEON) /obj/item/dnainjector/antiwacky name = "\improper DNA injector (Anti-Wacky)" - remove_mutations_static = list(WACKY) + remove_mutations = list(WACKY) /obj/item/dnainjector/wackymut name = "\improper DNA injector (Wacky)" - add_mutations_static = list(WACKY) + add_mutations = list(WACKY) /obj/item/dnainjector/antimute name = "\improper DNA injector (Anti-Mute)" - remove_mutations_static = list(MUT_MUTE) + remove_mutations = list(MUT_MUTE) /obj/item/dnainjector/mutemut name = "\improper DNA injector (Mute)" - add_mutations_static = list(MUT_MUTE) + add_mutations = list(MUT_MUTE) /obj/item/dnainjector/antismile name = "\improper DNA injector (Anti-Smile)" - remove_mutations_static = list(SMILE) + remove_mutations = list(SMILE) /obj/item/dnainjector/smilemut name = "\improper DNA injector (Smile)" - add_mutations_static = list(SMILE) + add_mutations = list(SMILE) /obj/item/dnainjector/unintelligiblemut name = "\improper DNA injector (Unintelligible)" - add_mutations_static = list(UNINTELLIGIBLE) + add_mutations = list(UNINTELLIGIBLE) /obj/item/dnainjector/antiunintelligible name = "\improper DNA injector (Anti-Unintelligible)" - remove_mutations_static = list(UNINTELLIGIBLE) + remove_mutations = list(UNINTELLIGIBLE) /obj/item/dnainjector/swedishmut name = "\improper DNA injector (Swedish)" - add_mutations_static = list(SWEDISH) + add_mutations = list(SWEDISH) /obj/item/dnainjector/antiswedish name = "\improper DNA injector (Anti-Swedish)" - remove_mutations_static = list(SWEDISH) + remove_mutations = list(SWEDISH) /obj/item/dnainjector/chavmut name = "\improper DNA injector (Chav)" - add_mutations_static = list(CHAV) + add_mutations = list(CHAV) /obj/item/dnainjector/antichav name = "\improper DNA injector (Anti-Chav)" - remove_mutations_static = list(CHAV) + remove_mutations = list(CHAV) /obj/item/dnainjector/elvismut name = "\improper DNA injector (Elvis)" - add_mutations_static = list(ELVIS) + add_mutations = list(ELVIS) /obj/item/dnainjector/antielvis name = "\improper DNA injector (Anti-Elvis)" - remove_mutations_static = list(ELVIS) + remove_mutations = list(ELVIS) /obj/item/dnainjector/lasereyesmut name = "\improper DNA injector (Laser Eyes)" - add_mutations_static = list(LASEREYES) + add_mutations = list(LASEREYES) /obj/item/dnainjector/antilasereyes name = "\improper DNA injector (Anti-Laser Eyes)" - remove_mutations_static = list(LASEREYES) + remove_mutations = list(LASEREYES) + +/obj/item/dnainjector/void + name = "\improper DNA injector (Void)" + add_mutations = list(VOID) + +/obj/item/dnainjector/antivoid + name = "\improper DNA injector (Anti-Void)" + remove_mutations = list(VOID) + +/obj/item/dnainjector/antenna + name = "\improper DNA injector (Antenna)" + add_mutations = list(ANTENNA) + +/obj/item/dnainjector/antiantenna + name = "\improper DNA injector (Anti-Antenna)" + remove_mutations = list(ANTENNA) + +/obj/item/dnainjector/paranoia + name = "\improper DNA injector (Paranoia)" + add_mutations = list(PARANOIA) + +/obj/item/dnainjector/antiparanoia + name = "\improper DNA injector (Anti-Paranoia)" + remove_mutations = list(PARANOIA) + +/obj/item/dnainjector/mindread + name = "\improper DNA injector (Mindread)" + add_mutations = list(MINDREAD) + +/obj/item/dnainjector/antimindread + name = "\improper DNA injector (Anti-Mindread)" + remove_mutations = list(MINDREAD) + +/obj/item/dnainjector/radioactive + name = "\improper DNA injector (Radioactive)" + add_mutations = list(RADIOACTIVE) + +/obj/item/dnainjector/antiradioactive + name = "\improper DNA injector (Anti-Radioactive)" + remove_mutations = list(RADIOACTIVE) +/obj/item/dnainjector/olfaction + name = "\improper DNA injector (Olfaction)" + add_mutations = list(OLFACTION) + +/obj/item/dnainjector/antiolfaction + name = "\improper DNA injector (Anti-Olfaction)" + remove_mutations = list(OLFACTION) + +/obj/item/dnainjector/insulated + name = "\improper DNA injector (Insulated)" + add_mutations = list(INSULATED) + +/obj/item/dnainjector/antiinsulated + name = "\improper DNA injector (Anti-Insulated)" + remove_mutations = list(INSULATED) + +/obj/item/dnainjector/shock + name = "\improper DNA injector (Shock Touch)" + add_mutations = list(SHOCKTOUCH) + +/obj/item/dnainjector/antishock + name = "\improper DNA injector (Anti-Shock Touch)" + remove_mutations = list(SHOCKTOUCH) + +/obj/item/dnainjector/spacialinstability + name = "\improper DNA injector (Spacial Instability)" + add_mutations = list(BADBLINK) + +/obj/item/dnainjector/antispacialinstability + name = "\improper DNA injector (Anti-Spacial Instability)" + remove_mutations = list(BADBLINK) + +/obj/item/dnainjector/acidflesh + name = "\improper DNA injector (Acid Flesh)" + add_mutations = list(ACIDFLESH) + +/obj/item/dnainjector/antiacidflesh + name = "\improper DNA injector (Acid Flesh)" + remove_mutations = list(ACIDFLESH) + +/obj/item/dnainjector/gigantism + name = "\improper DNA injector (Gigantism)" + add_mutations = list(GIGANTISM) + +/obj/item/dnainjector/antigigantism + name = "\improper DNA injector (Anti-Gigantism)" + remove_mutations = list(GIGANTISM) + +/obj/item/dnainjector/spastic + name = "\improper DNA injector (Spastic)" + add_mutations = list(SPASTIC) + +/obj/item/dnainjector/antispastic + name = "\improper DNA injector (Anti-Spastic)" + remove_mutations = list(SPASTIC) + +/obj/item/dnainjector/geladikinesis + name = "\improper DNA injector (Geladikinesis)" + add_mutations = list(GELADIKINESIS) + +/obj/item/dnainjector/antigeladikinesis + name = "\improper DNA injector (Anti-Geladikinesis)" + remove_mutations = list(GELADIKINESIS) + +/obj/item/dnainjector/cryokinesis + name = "\improper DNA injector (Cryokinesis)" + add_mutations = list(CRYOKINESIS) + +/obj/item/dnainjector/anticryokinesis + name = "\improper DNA injector (Anti-Cryokinesis)" + remove_mutations = list(CRYOKINESIS) + +/obj/item/dnainjector/thermal + name = "\improper DNA injector (Thermal Vision)" + add_mutations = list(THERMAL) + +/obj/item/dnainjector/antithermal + name = "\improper DNA injector (Anti-Thermal Vision)" + remove_mutations = list(THERMAL) + +/obj/item/dnainjector/glow + name = "\improper DNA injector (Glowy)" + add_mutations = list(GLOWY) + +/obj/item/dnainjector/removeglow + name = "\improper DNA injector (Anti-Glowy)" + remove_mutations = list(GLOWY) + +/obj/item/dnainjector/antiglow + name = "\improper DNA injector (Antiglowy)" + add_mutations = list(ANTIGLOWY) + +/obj/item/dnainjector/removeantiglow + name = "\improper DNA injector (Anti-Antiglowy)" + remove_mutations = list(ANTIGLOWY) + +/obj/item/dnainjector/firebreath + name = "\improper DNA injector (Firebreath)" + add_mutations = list(FIREBREATH) + +/obj/item/dnainjector/antifirebreath + name = "\improper DNA injector (Anti-Firebreath)" + remove_mutations = list(FIREBREATH) + +/obj/item/dnainjector/tonguespike + name = "\improper DNA injector (Tongue Spike)" + add_mutations = list(TONGUESPIKE) + +/obj/item/dnainjector/antitonguespike + name = "\improper DNA injector (Anti-Tongue Spike)" + remove_mutations = list(TONGUESPIKE) + +/obj/item/dnainjector/spiderweb + name = "\improper DNA injector (Spider Web)" + add_mutations = list(SPIDER_WEB) + +/obj/item/dnainjector/antispiderweb + name = "\improper DNA injector (Anti-Spider Web)" + remove_mutations = list(SPIDER_WEB) /obj/item/dnainjector/timed var/duration = 600 /obj/item/dnainjector/timed/inject(mob/living/carbon/M, mob/user) - prepare() if(M.stat == DEAD) //prevents dead people from having their DNA changed to_chat(user, "You can't modify [M]'s DNA while [M.p_theyre()] dead.") return FALSE @@ -317,23 +467,22 @@ M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2)) var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]" var/endtime = world.time+duration - for(var/datum/mutation/human/HM in remove_mutations) - if(HM.name == RACEMUT) + for(var/mutation in remove_mutations) + if(mutation == RACEMUT) if(ishuman(M)) continue - M = HM.force_lose(M) + M = M.dna.remove_mutation(mutation) else - HM.force_lose(M) - for(var/datum/mutation/human/HM in add_mutations) - if((HM in M.dna.mutations) && !(M.dna.temporary_mutations[HM.name])) + M.dna.remove_mutation(mutation) + for(var/mutation in add_mutations) + if(M.dna.get_mutation(mutation)) continue //Skip permanent mutations we already have. - if(HM.name == RACEMUT && ishuman(M)) + if(mutation == RACEMUT && ishuman(M)) message_admins("[ADMIN_LOOKUPFLW(user)] injected [key_name_admin(M)] with the [name] (MONKEY)") log_msg += " (MONKEY)" - M = HM.force_give(M) + M = M.dna.add_mutation(mutation, MUT_OTHER, endtime) else - HM.force_give(M) - M.dna.temporary_mutations[HM.name] = endtime + M.dna.add_mutation(mutation, MUT_OTHER, endtime) if(fields) if(fields["name"] && fields["UE"] && fields["blood_type"]) if(!M.dna.previous["name"]) @@ -361,9 +510,41 @@ /obj/item/dnainjector/timed/hulk name = "\improper DNA injector (Hulk)" desc = "This will make you big and strong, but give you a bad skin condition." - add_mutations_static = list(HULK) + add_mutations = list(HULK) /obj/item/dnainjector/timed/h2m name = "\improper DNA injector (Human > Monkey)" desc = "Will make you a flea bag." - add_mutations_static = list(RACEMUT) + add_mutations = list(RACEMUT) + +/obj/item/dnainjector/activator + name = "\improper DNA activator" + desc = "Activates the current mutation on injection, if the subject has it." + var/doitanyway = FALSE + var/research = FALSE //Set to true to get expended and filled injectors for chromosomes + var/filled = FALSE + +/obj/item/dnainjector/activator/inject(mob/living/carbon/M, mob/user) + if(M.has_dna() && !HAS_TRAIT(M, TRAIT_RADIMMUNE) && !HAS_TRAIT(M,TRAIT_NOCLONE)) + M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2)) + var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]" + for(var/mutation in add_mutations) + var/datum/mutation/human/HM = mutation + if(istype(HM, /datum/mutation/human)) + mutation = HM.type + if(!M.dna.activate_mutation(HM)) + if(!doitanyway) + log_msg += "(FAILED)" + else + M.dna.add_mutation(HM, MUT_EXTRA) + name = "expended [name]" + else if(research && M.client) + filled = TRUE + name = "filled [name]" + else + name = "expended [name]" + log_msg += "([mutation])" + log_attack("[log_msg] [loc_name(user)]") + return TRUE + return FALSE + diff --git a/code/game/objects/items/granters.dm b/code/game/objects/items/granters.dm index 0907a18fdd..9749bae313 100644 --- a/code/game/objects/items/granters.dm +++ b/code/game/objects/items/granters.dm @@ -11,7 +11,7 @@ /obj/item/book/granter/proc/turn_page(mob/user) playsound(user, pick('sound/effects/pageturn1.ogg','sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg'), 30, 1) - if(do_after(user,50, user)) + if(do_after(user,50, TRUE, user)) if(remarks.len) to_chat(user, "[pick(remarks)]") else @@ -53,7 +53,7 @@ on_reading_stopped() reading = FALSE return - if(do_after(user,50, user)) + if(do_after(user,50, TRUE, user)) on_reading_finished(user) reading = FALSE return TRUE @@ -402,10 +402,11 @@ martialname = "sleeping carp" desc = "A scroll filled with strange markings. It seems to be drawings of some sort of martial art." greet = "You have learned the ancient martial art of the Sleeping Carp! Your hand-to-hand combat has become much more effective, and you are now able to deflect any projectiles \ - directed toward you. However, you are also unable to use any ranged weaponry. You can learn more about your newfound art by using the Recall Teachings verb in the Sleeping Carp tab." + directed toward you while in Throw Mode. Your body is also honed to protect you from damage and punctures, and even briefly survive space. \ + However, you are also unable to use any ranged weaponry, and some medical supplies will prove useless to you. You can learn more about your newfound art by using the Recall Teachings verb in the Sleeping Carp tab.
" icon = 'icons/obj/wizard.dmi' icon_state = "scroll2" - remarks = list("I must prove myself worthy to the masters of the sleeping carp...", "Stance means everything...", "Focus... And you'll be able to incapacitate any foe in seconds...", "I must pierce armor for maximum damage...", "I don't think this would combine with other martial arts...", "Grab them first so they don't retaliate...", "I must prove myself worthy of this power...") + remarks = list("Wait, a high protein diet is really all it takes to become bulletproof...?", "Overwhelming force, immovable object...", "Focus... And you'll be able to incapacitate any foe in seconds...", "I must pierce armor for maximum damage...", "I don't think this would combine with other martial arts...", "Become one with the carp...", "Glub...") /obj/item/book/granter/martial/carp/onlearned(mob/living/carbon/user) ..() diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 32e07284ec..fe1f3ebd6c 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -357,7 +357,7 @@ /obj/item/borg/lollipop/equipped() check_amount() -/obj/item/borg/lollipop/dropped() +/obj/item/borg/lollipop/dropped(mob/user) check_amount() /obj/item/borg/lollipop/proc/check_amount() //Doesn't even use processing ticks. @@ -620,7 +620,7 @@ return host.loc return null -/obj/item/borg/projectile_dampen/dropped() +/obj/item/borg/projectile_dampen/dropped(mob/user) . = ..() host = loc diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 56af03139a..28a93a7a83 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -462,7 +462,7 @@ desc = "An upgrade to the Medical module's hypospray, containing \ stronger versions of existing chemicals." additional_reagents = list(/datum/reagent/medicine/oxandrolone, /datum/reagent/medicine/sal_acid, - /datum/reagent/medicine/rezadone, /datum/reagent/medicine/pen_acid) + /datum/reagent/medicine/rezadone, /datum/reagent/medicine/pen_acid, /datum/reagent/medicine/prussian_blue) /obj/item/borg/upgrade/piercing_hypospray name = "cyborg piercing hypospray" diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index 7a6e1e3db6..103dabdeec 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -132,7 +132,7 @@ RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/Pickup_ores) listeningTo = user -/obj/item/storage/bag/ore/dropped() +/obj/item/storage/bag/ore/dropped(mob/user) . = ..() if(listeningTo) UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm index 0ff20f16c5..c9c686414d 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -525,14 +525,6 @@ desc = "A kit containing a Deluxe hypospray and Vials." icon_state = "tactical-mini" -/obj/item/storage/hypospraykit/cmo/ComponentInitialize() - . = ..() - var/datum/component/storage/STR = GetComponent(/datum/component/storage) - STR.max_items = 6 - STR.can_hold = typecacheof(list( - /obj/item/hypospray/mkii, - /obj/item/reagent_containers/glass/bottle/vial)) - /obj/item/storage/hypospraykit/cmo/PopulateContents() if(empty) return diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index 3079c3cad9..78ba6d4f5f 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -25,7 +25,7 @@ /obj/item/melee/baton/examine(mob/user) . = ..() - . += "Right click attack while in combat mode or attack while in disarm intent to disarm instead of stun." + . += "Right click attack while in combat mode to disarm instead of stun." /obj/item/melee/baton/get_cell() . = cell @@ -149,8 +149,6 @@ //return TRUE to interrupt attack chain. /obj/item/melee/baton/proc/common_baton_melee(mob/M, mob/living/user, disarming = FALSE) - if(user.a_intent == INTENT_DISARM) - disarming = TRUE //override if they're in disarm intent. if(iscyborg(M) || !isliving(M)) //can't baton cyborgs return FALSE if(status && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index 11a06e149d..57fc99c663 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -246,11 +246,11 @@ user.visible_message("[user] axes [user.p_them()]self from head to toe! It looks like [user.p_theyre()] trying to commit suicide!") return (BRUTELOSS) -/obj/item/twohanded/fireaxe/afterattack(atom/A, mob/user, proximity) +/obj/item/twohanded/fireaxe/afterattack(atom/A, mob/living/user, proximity) . = ..() - if(!proximity) + if(!proximity || (user.getStaminaLoss() > STAMINA_SOFTCRIT)) return - if(wielded) //destroys windows and grilles in one hit + if(wielded) //destroys windows and grilles in one hit (or more if it has a ton of health like plasmaglass) if(istype(A, /obj/structure/window)) var/obj/structure/window/W = A W.take_damage(200, BRUTE, "melee", 0) @@ -1217,7 +1217,7 @@ target.lastattackerckey = user.ckey target.visible_message("[user] has shocked [target] with [src]!", \ "[user] has shocked you with [src]!") - log_combat(user, user, "stunned with an electrostaff") + log_combat(user, target, "stunned with an electrostaff") playsound(src, 'sound/weapons/staff.ogg', 50, 1, -1) target.apply_status_effect(stun_status_effect, stun_status_duration) if(ishuman(user)) @@ -1242,9 +1242,9 @@ if(user) target.lastattacker = user.real_name target.lastattackerckey = user.ckey - target.visible_message("[user] has seared [user] with [src]!", \ + target.visible_message("[user] has seared [target] with [src]!", \ "[user] has seared you with [src]!") - log_combat(user, user, "burned with an electrostaff") + log_combat(user, target, "burned with an electrostaff") playsound(src, 'sound/weapons/sear.ogg', 50, 1, -1) return TRUE diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 3fc183edc6..c92bbdc996 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -127,11 +127,10 @@ if ((M.client && M.machine == src)) is_in_use = TRUE ui_interact(M) - if(isAI(usr) || iscyborg(usr) || IsAdminGhost(usr) || hasSiliconAccessInArea(usr)) - if (!(usr in nearby)) - if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh. - is_in_use = TRUE - ui_interact(usr) + if(usr && hasSiliconAccessInArea(usr) && !(usr in nearby)) + if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh. + is_in_use = TRUE + ui_interact(usr) // check for TK users diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 531367585e..04c3909696 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -315,13 +315,8 @@ /obj/structure/windoor_assembly/ComponentInitialize() . = ..() - AddComponent( - /datum/component/simple_rotation, - ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS, - null, - CALLBACK(src, .proc/can_be_rotated), - CALLBACK(src,.proc/after_rotation) - ) + var/static/rotation_flags = ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS + AddComponent(/datum/component/simple_rotation, rotation_flags, can_be_rotated=CALLBACK(src, .proc/can_be_rotated), after_rotation=CALLBACK(src,.proc/after_rotation)) /obj/structure/windoor_assembly/proc/can_be_rotated(mob/user,rotation_type) if(anchored) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 6abf2d3f1b..51c2ba4fc6 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1732,7 +1732,7 @@ var/mob/M = locate(href_list["makeeligible"]) if(!ismob(M)) to_chat(usr, "this can only be used on instances of type /mob.") - var/datum/element/ghost_role_eligibility/eli = SSdcs.GetElement(/datum/element/ghost_role_eligibility) + var/datum/element/ghost_role_eligibility/eli = SSdcs.GetElement(list(/datum/element/ghost_role_eligibility)) if(M.ckey in eli.timeouts) eli.timeouts -= M.ckey diff --git a/code/modules/antagonists/blob/blob/blobs/shield.dm b/code/modules/antagonists/blob/blob/blobs/shield.dm index 481c5e6c8d..bc4e517ced 100644 --- a/code/modules/antagonists/blob/blob/blobs/shield.dm +++ b/code/modules/antagonists/blob/blob/blobs/shield.dm @@ -47,7 +47,7 @@ icon_state = "blob_glow" flags_1 = CHECK_RICOCHET_1 point_return = 8 - max_integrity = 50 + max_integrity = 100 brute_resist = 1 explosion_block = 2 diff --git a/code/modules/antagonists/blob/blob/powers.dm b/code/modules/antagonists/blob/blob/powers.dm index 641019ef33..73d0c97476 100644 --- a/code/modules/antagonists/blob/blob/powers.dm +++ b/code/modules/antagonists/blob/blob/powers.dm @@ -71,7 +71,7 @@ var/list/nodes = list() for(var/i in 1 to GLOB.blob_nodes.len) var/obj/structure/blob/node/B = GLOB.blob_nodes[i] - nodes["Blob Node #[i] ([B.overmind ? "[B.overmind.blobstrain.name]":"No Strain"])"] = B + nodes["Blob Node #[i] ([get_area_name(B)])"] = B var/node_name = input(src, "Choose a node to jump to.", "Node Jump") in nodes var/obj/structure/blob/node/chosen_node = nodes[node_name] if(chosen_node) @@ -120,13 +120,13 @@ /mob/camera/blob/proc/create_shield(turf/T) var/obj/structure/blob/shield/S = locate(/obj/structure/blob/shield) in T if(S) - if(!can_buy(15)) + if(!can_buy(BLOB_REFLECTOR_COST)) return if(S.obj_integrity < S.max_integrity * 0.5) add_points(BLOB_REFLECTOR_COST) to_chat(src, "This shield blob is too damaged to be modified properly!") return - to_chat(src, "You secrete a reflective ooze over the shield blob, allowing it to reflect projectiles at the cost of reduced intregrity.") + to_chat(src, "You secrete a reflective ooze over the shield blob, allowing it to reflect projectiles at the cost of reduced integrity.") S.change_to(/obj/structure/blob/shield/reflective, src) else createSpecial(15, /obj/structure/blob/shield, 0, 0, T) @@ -247,8 +247,8 @@ /mob/camera/blob/verb/expand_blob_power() set category = "Blob" - set name = "Expand/Attack Blob (4)" - set desc = "Attempts to create a new blob in this tile. If the tile isn't clear, instead attacks it, damaging mobs and objects." + set name = "Expand/Attack Blob ([BLOB_SPREAD_COST])" + set desc = "Attempts to create a new blob in this tile. If the tile isn't clear, instead attacks it, damaging mobs and objects and refunding [BLOB_ATTACK_REFUND] points." var/turf/T = get_turf(src) expand_blob(T) @@ -261,7 +261,7 @@ if(!possibleblobs.len) to_chat(src, "There is no blob adjacent to the target tile!") return - if(can_buy(4)) + if(can_buy(BLOB_SPREAD_COST)) var/attacksuccess = FALSE for(var/mob/living/L in T) if(ROLE_BLOB in L.faction) //no friendly/dead fire @@ -271,11 +271,11 @@ blobstrain.attack_living(L) var/obj/structure/blob/B = locate() in T if(B) - if(attacksuccess) //if we successfully attacked a turf with a blob on it, don't refund shit + if(attacksuccess) //if we successfully attacked a turf with a blob on it, only give an attack refund B.blob_attack_animation(T, src) else to_chat(src, "There is a blob there!") - add_points(4) //otherwise, refund all of the cost + add_points(BLOB_SPREAD_COST) //otherwise, refund all of the cost else var/list/cardinalblobs = list() var/list/diagonalblobs = list() @@ -288,14 +288,15 @@ var/obj/structure/blob/OB if(cardinalblobs.len) OB = pick(cardinalblobs) - OB.expand(T, src) + if(!OB.expand(T, src)) + add_points(BLOB_ATTACK_REFUND) //assume it's attacked SOMETHING, possibly a structure else OB = pick(diagonalblobs) if(attacksuccess) OB.blob_attack_animation(T, src) playsound(OB, 'sound/effects/splat.ogg', 50, 1) else - add_points(4) //if we're attacking diagonally and didn't hit anything, refund + add_points(BLOB_SPREAD_COST) //if we're attacking diagonally and didn't hit anything, refund if(attacksuccess) last_attack = world.time + CLICK_CD_MELEE else diff --git a/code/modules/antagonists/bloodsucker/bloodsucker_objectives.dm b/code/modules/antagonists/bloodsucker/bloodsucker_objectives.dm index a2a0238df1..0c80ce0dee 100644 --- a/code/modules/antagonists/bloodsucker/bloodsucker_objectives.dm +++ b/code/modules/antagonists/bloodsucker/bloodsucker_objectives.dm @@ -43,7 +43,7 @@ // EXPLANATION /datum/objective/bloodsucker/lair/update_explanation_text() - explanation_text = "Create a lair by claiming a coffin, and protect it until the end of the shift"// Make sure to keep it safe!" + explanation_text = "Create a lair by claiming a coffin, and protect it until the end of the shift."// Make sure to keep it safe!" // WIN CONDITIONS? /datum/objective/bloodsucker/lair/check_completion() @@ -228,7 +228,7 @@ if (SC && SC.lastgen > 0 && SC.connected_panels.len > 0 && SC.connected_tracker) return FALSE return TRUE -*/ +*/ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -250,15 +250,15 @@ // WIN CONDITIONS? /datum/objective/bloodsucker/heartthief/check_completion() // -Must have a body. - if (!owner.current) + if(!owner.current) return FALSE // Taken from /steal in objective.dm var/list/all_items = owner.current.GetAllContents() // Includes items inside other items. var/itemcount = FALSE for(var/obj/I in all_items) //Check for items - if(I == /obj/item/organ/heart) - itemcount ++ - if (itemcount >= target_amount) // Got the right amount? + if(istype(I, /obj/item/organ/heart/)) + itemcount++ + if(itemcount >= target_amount) // Got the right amount? return TRUE return FALSE diff --git a/code/modules/antagonists/bloodsucker/items/bloodsucker_stake.dm b/code/modules/antagonists/bloodsucker/items/bloodsucker_stake.dm index b69b851990..4c377f4b82 100644 --- a/code/modules/antagonists/bloodsucker/items/bloodsucker_stake.dm +++ b/code/modules/antagonists/bloodsucker/items/bloodsucker_stake.dm @@ -90,6 +90,7 @@ user.dropItemToGround(src, TRUE) //user.drop_item() // "drop item" doesn't seem to exist anymore. New proc is user.dropItemToGround() but it doesn't seem like it's needed now? var/obj/item/bodypart/B = C.get_bodypart("chest") // This was all taken from hitby() in human_defense.dm B.embedded_objects |= src + embedded() add_mob_blood(target)//Place blood on the stake loc = C // Put INSIDE the character B.receive_damage(w_class * embedding.embedded_impact_pain_multiplier) diff --git a/code/modules/antagonists/changeling/powers/chameleon_skin.dm b/code/modules/antagonists/changeling/powers/chameleon_skin.dm index b7545353b2..03f3aab473 100644 --- a/code/modules/antagonists/changeling/powers/chameleon_skin.dm +++ b/code/modules/antagonists/changeling/powers/chameleon_skin.dm @@ -13,17 +13,14 @@ var/mob/living/carbon/human/H = user //SHOULD always be human, because req_human = 1 if(!istype(H)) // req_human could be done in can_sting stuff. return - var/datum/mutation/human/HM = GLOB.mutations_list[CHAMELEON] - if(HM in H.dna.mutations) - HM.force_lose(H) + if(H.dna.get_mutation(CHAMELEON)) + H.dna.remove_mutation(CHAMELEON) else - HM.force_give(H) + H.dna.add_mutation(CHAMELEON) return TRUE /obj/effect/proc_holder/changeling/chameleon_skin/on_refund(mob/user) action.Remove(user) if(user.has_dna()) var/mob/living/carbon/C = user - var/datum/mutation/human/HM = GLOB.mutations_list[CHAMELEON] - if(HM in C.dna.mutations) - HM.force_lose(C) \ No newline at end of file + C.dna.remove_mutation(CHAMELEON) \ No newline at end of file diff --git a/code/modules/antagonists/swarmer/swarmer_event.dm b/code/modules/antagonists/swarmer/swarmer_event.dm index 8e385f6674..6ef35fdbaa 100644 --- a/code/modules/antagonists/swarmer/swarmer_event.dm +++ b/code/modules/antagonists/swarmer/swarmer_event.dm @@ -5,6 +5,7 @@ max_occurrences = 0 earliest_start = 30 MINUTES min_players = 15 + gamemode_blacklist = list("dynamic") /datum/round_event/spawn_swarmer diff --git a/code/modules/antagonists/traitor/IAA/internal_affairs.dm b/code/modules/antagonists/traitor/IAA/internal_affairs.dm index caf2f644df..19144d67c9 100644 --- a/code/modules/antagonists/traitor/IAA/internal_affairs.dm +++ b/code/modules/antagonists/traitor/IAA/internal_affairs.dm @@ -120,7 +120,7 @@ /datum/antagonist/traitor/internal_affairs/reinstate_escape_objective() ..() - var/objtype = traitor_kind == TRAITOR_HUMAN ? /datum/objective/escape : /datum/objective/survive + var/objtype = !istype(traitor_kind,TRAITOR_AI) ? /datum/objective/escape : /datum/objective/survive var/datum/objective/escape_objective = new objtype escape_objective.owner = owner add_objective(escape_objective) @@ -215,20 +215,12 @@ kill_objective.target = target_mind kill_objective.update_explanation_text() add_objective(kill_objective) - - //Optional traitor objective - if(prob(PROB_ACTUAL_TRAITOR)) - employer = "The Syndicate" - owner.special_role = TRAITOR_AGENT_ROLE - special_role = TRAITOR_AGENT_ROLE - syndicate = TRUE - forge_single_objective() return /datum/antagonist/traitor/internal_affairs/forge_traitor_objectives() forge_iaa_objectives() - var/objtype = traitor_kind == TRAITOR_HUMAN ? /datum/objective/escape : /datum/objective/survive + var/objtype = !istype(traitor_kind,TRAITOR_AI) ? /datum/objective/escape : /datum/objective/survive var/datum/objective/escape_objective = new objtype escape_objective.owner = owner add_objective(escape_objective) diff --git a/code/modules/antagonists/traitor/classes/ai.dm b/code/modules/antagonists/traitor/classes/ai.dm new file mode 100644 index 0000000000..fac1efeb49 --- /dev/null +++ b/code/modules/antagonists/traitor/classes/ai.dm @@ -0,0 +1,68 @@ +/datum/traitor_class/ai // this one is special, so has no weight + name = "Malfunctioning AI" + +/datum/traitor_class/ai/forge_objectives(datum/antagonist/traitor/T) + var/objective_count = 0 + + if(prob(30)) + objective_count += forge_single_objective() + + for(var/i = objective_count, i < CONFIG_GET(number/traitor_objectives_amount), i++) + var/datum/objective/assassinate/kill_objective = new + kill_objective.owner = T.owner + kill_objective.find_target() + T.add_objective(kill_objective) + + var/datum/objective/survive/exist/exist_objective = new + exist_objective.owner = T.owner + T.add_objective(exist_objective) + +/datum/traitor_class/ai/forge_single_objective(datum/antagonist/traitor/T) + .=1 + var/special_pick = rand(1,4) + switch(special_pick) + if(1) + var/datum/objective/block/block_objective = new + block_objective.owner = T.owner + T.add_objective(block_objective) + if(2) + var/datum/objective/purge/purge_objective = new + purge_objective.owner = T.owner + T.add_objective(purge_objective) + if(3) + var/datum/objective/robot_army/robot_objective = new + robot_objective.owner = T.owner + T.add_objective(robot_objective) + if(4) //Protect and strand a target + var/datum/objective/protect/yandere_one = new + yandere_one.owner = T.owner + T.add_objective(yandere_one) + yandere_one.find_target() + var/datum/objective/maroon/yandere_two = new + yandere_two.owner = T.owner + yandere_two.target = yandere_one.target + yandere_two.update_explanation_text() // normally called in find_target() + T.add_objective(yandere_two) + .=2 + +/datum/traitor_class/ai/on_removal(datum/antagonist/traitor/T) + var/mob/living/silicon/ai/A = T.owner.current + A.set_zeroth_law("") + A.verbs -= /mob/living/silicon/ai/proc/choose_modules + A.malf_picker.remove_malf_verbs(A) + qdel(A.malf_picker) + + +/datum/traitor_class/ai/apply_innate_effects(mob/living/M) + var/mob/living/silicon/ai/A = M + A.hack_software = TRUE + +/datum/traitor_class/ai/remove_innate_effects(mob/living/M) + var/mob/living/silicon/ai/A = M + A.hack_software = FALSE + +/datum/traitor_class/ai/finalize_traitor(datum/antagonist/traitor/T) + T.add_law_zero() + T.owner.current.playsound_local(get_turf(T.owner.current), 'sound/ambience/antag/malf.ogg', 100, FALSE, pressure_affected = FALSE) + T.owner.current.grant_language(/datum/language/codespeak) + return FALSE diff --git a/code/modules/antagonists/traitor/classes/assassin.dm b/code/modules/antagonists/traitor/classes/assassin.dm new file mode 100644 index 0000000000..0c1d950f57 --- /dev/null +++ b/code/modules/antagonists/traitor/classes/assassin.dm @@ -0,0 +1,37 @@ +/datum/traitor_class/human/assassin + name = "Donk Co Operative" + employer = "Donk Corporation" + weight = 0 + chaos = 1 + cost = 2 + +/datum/traitor_class/human/assassin/forge_single_objective(datum/antagonist/traitor/T) + .=1 + var/permakill_prob = 20 + var/is_dynamic = FALSE + var/datum/game_mode/dynamic/mode + if(istype(SSticker.mode,/datum/game_mode/dynamic)) + mode = SSticker.mode + is_dynamic = TRUE + permakill_prob = max(0,mode.threat_level-50) + var/list/active_ais = active_ais() + if(active_ais.len && prob(100/GLOB.joined_player_list.len)) + var/datum/objective/destroy/destroy_objective = new + destroy_objective.owner = T.owner + destroy_objective.find_target() + T.add_objective(destroy_objective) + else if(prob(30) || (is_dynamic && (mode.storyteller.flags & NO_ASSASSIN))) + var/datum/objective/maroon/maroon_objective = new + maroon_objective.owner = T.owner + maroon_objective.find_target() + T.add_objective(maroon_objective) + else if(prob(permakill_prob)) + var/datum/objective/assassinate/kill_objective = new + kill_objective.owner = T.owner + kill_objective.find_target() + T.add_objective(kill_objective) + else + var/datum/objective/assassinate/once/kill_objective = new + kill_objective.owner = T.owner + kill_objective.find_target() + T.add_objective(kill_objective) diff --git a/code/modules/antagonists/traitor/classes/freeform.dm b/code/modules/antagonists/traitor/classes/freeform.dm new file mode 100644 index 0000000000..f84eadb9f6 --- /dev/null +++ b/code/modules/antagonists/traitor/classes/freeform.dm @@ -0,0 +1,12 @@ +/datum/traitor_class/human/freeform + name = "Waffle Co Agent" + employer = "Waffle Company" + weight = 16 + chaos = 0 + +/datum/traitor_class/human/freeform/forge_objectives(datum/antagonist/traitor/T) + var/datum/objective/escape/O = new + O.explanation_text = "You have no goals! Whatever you can do do antagonize Nanotrasen, do it! The gimmickier, the better! Make sure to escape alive, though!" + O.owner = T.owner + T.add_objective(O) + return diff --git a/code/modules/antagonists/traitor/classes/hijack.dm b/code/modules/antagonists/traitor/classes/hijack.dm new file mode 100644 index 0000000000..e89eda1dcf --- /dev/null +++ b/code/modules/antagonists/traitor/classes/hijack.dm @@ -0,0 +1,18 @@ +/datum/traitor_class/human/hijack + name = "Gorlex Marauder" + employer = "The Gorlex Marauders" + weight = 3 + chaos = 5 + cost = 5 + uplink_filters = list(/datum/uplink_item/stealthy_weapons/romerol_kit) + +/datum/traitor_class/human/hijack/forge_objectives(datum/antagonist/traitor/T) + var/datum/objective/hijack/O = new + O.explanation_text = "The Gorlex Marauders are letting you do what you want, with one condition: the shuttle must be hijacked by hacking its navigational protocols through the control console (alt click emergency shuttle console)." + O.owner = T.owner + T.add_objective(O) + return + +/datum/traitor_class/human/hijack/finalize_traitor(datum/antagonist/traitor/T) + T.hijack_speed=1 + return TRUE diff --git a/code/modules/antagonists/traitor/classes/human.dm b/code/modules/antagonists/traitor/classes/human.dm new file mode 100644 index 0000000000..4e096390c0 --- /dev/null +++ b/code/modules/antagonists/traitor/classes/human.dm @@ -0,0 +1,82 @@ +/datum/traitor_class/human + name = "Syndicate Agent" + chaos = 0 + +/datum/traitor_class/human/forge_objectives(datum/antagonist/traitor/T) + var/objective_count = 0 //Hijacking counts towards number of objectives + if(!SSticker.mode.exchange_blue && SSticker.mode.traitors.len >= 8) //Set up an exchange if there are enough traitors + if(!SSticker.mode.exchange_red) + SSticker.mode.exchange_red = T.owner + else + SSticker.mode.exchange_blue = T.owner + T.assign_exchange_role(SSticker.mode.exchange_red) + T.assign_exchange_role(SSticker.mode.exchange_blue) + objective_count += 1 //Exchange counts towards number of objectives + var/toa = CONFIG_GET(number/traitor_objectives_amount) + for(var/i = objective_count, i < toa, i++) + forge_single_objective(T) + if(!(locate(/datum/objective/escape) in T.objectives)) + var/datum/objective/escape/escape_objective = new + escape_objective.owner = T.owner + T.add_objective(escape_objective) + return + +/datum/traitor_class/human/forge_single_objective(datum/antagonist/traitor/T) + .=1 + var/assassin_prob = 50 + var/is_dynamic = FALSE + var/datum/game_mode/dynamic/mode + if(istype(SSticker.mode,/datum/game_mode/dynamic)) + mode = SSticker.mode + is_dynamic = TRUE + assassin_prob = max(0,mode.threat_level-20) + if(prob(assassin_prob)) + if(is_dynamic) + var/threat_spent = CONFIG_GET(number/dynamic_assassinate_cost) + mode.spend_threat(threat_spent) + mode.log_threat("[T.owner.name] spent [threat_spent] on an assassination target.") + var/list/active_ais = active_ais() + if(active_ais.len && prob(100/GLOB.joined_player_list.len)) + var/datum/objective/destroy/destroy_objective = new + destroy_objective.owner = T.owner + destroy_objective.find_target() + T.add_objective(destroy_objective) + else if(prob(30) || (is_dynamic && (mode.storyteller.flags & NO_ASSASSIN))) + var/datum/objective/maroon/maroon_objective = new + maroon_objective.owner = T.owner + maroon_objective.find_target() + T.add_objective(maroon_objective) + else if(prob(max(0,assassin_prob-20))) + var/datum/objective/assassinate/kill_objective = new + kill_objective.owner = T.owner + kill_objective.find_target() + T.add_objective(kill_objective) + else + var/datum/objective/assassinate/once/kill_objective = new + kill_objective.owner = T.owner + kill_objective.find_target() + T.add_objective(kill_objective) + else + if(prob(15) && !(locate(/datum/objective/download) in T.objectives) && !(T.owner.assigned_role in list("Research Director", "Scientist", "Roboticist"))) + var/datum/objective/download/download_objective = new + download_objective.owner = T.owner + download_objective.gen_amount_goal() + T.add_objective(download_objective) + else if(prob(40)) // cum. not counting download: 40%. + var/datum/objective/steal/steal_objective = new + steal_objective.owner = T.owner + steal_objective.find_target() + T.add_objective(steal_objective) + else if(prob(100/3)) // cum. not counting download: 20%. + var/datum/objective/sabotage/sabotage_objective = new + sabotage_objective.owner = T.owner + sabotage_objective.find_target() + T.add_objective(sabotage_objective) + else // cum. not counting download: 40% + var/datum/objective/flavor/traitor/flavor_objective = new + flavor_objective.owner = T.owner + flavor_objective.forge_objective() + T.add_objective(flavor_objective) + +/datum/traitor_class/human/greet(datum/antagonist/traitor/T) + to_chat(T.owner.current, "You are under contract with [employer]. They have given you your objectives.") diff --git a/code/modules/antagonists/traitor/classes/martyr.dm b/code/modules/antagonists/traitor/classes/martyr.dm new file mode 100644 index 0000000000..78f8bf9b0c --- /dev/null +++ b/code/modules/antagonists/traitor/classes/martyr.dm @@ -0,0 +1,14 @@ +/datum/traitor_class/human/martyr + name = "Tiger Cooperator" + employer = "The Tiger Cooperative" + weight = 2 + chaos = 5 + cost = 5 + uplink_filters = list(/datum/uplink_item/stealthy_weapons/romerol_kit,/datum/uplink_item/bundles_TC/contract_kit) + +/datum/traitor_class/human/martyr/forge_objectives(datum/antagonist/traitor/T) + var/datum/objective/martyr/O = new + O.explanation_text = "The tiger cooperative have given you free reign. You may do as you wish, as long as you die a glorious death!" + O.owner = T.owner + T.add_objective(O) + return diff --git a/code/modules/antagonists/traitor/classes/subterfuge.dm b/code/modules/antagonists/traitor/classes/subterfuge.dm new file mode 100644 index 0000000000..ae43f11fe7 --- /dev/null +++ b/code/modules/antagonists/traitor/classes/subterfuge.dm @@ -0,0 +1,40 @@ +/datum/traitor_class/human/subterfuge + name = "MI13 Operative" + employer = "MI13" + weight = 20 + chaos = -5 + +/datum/traitor_class/human/subterfuge/forge_single_objective(datum/antagonist/traitor/T) + .=1 + var/assassin_prob = 30 + var/datum/game_mode/dynamic/mode + if(istype(SSticker.mode,/datum/game_mode/dynamic)) + mode = SSticker.mode + assassin_prob = max(0,mode.threat_level-40) + if(prob(assassin_prob)) + if(prob(assassin_prob)) + var/datum/objective/assassinate/once/kill_objective = new + kill_objective.owner = T.owner + kill_objective.find_target() + T.add_objective(kill_objective) + else + var/datum/objective/maroon/maroon_objective = new + maroon_objective.owner = T.owner + maroon_objective.find_target() + T.add_objective(maroon_objective) + else + if(prob(15) && !(locate(/datum/objective/download) in T.objectives) && !(T.owner.assigned_role in list("Research Director", "Scientist", "Roboticist"))) + var/datum/objective/download/download_objective = new + download_objective.owner = T.owner + download_objective.gen_amount_goal() + T.add_objective(download_objective) + else if(prob(70)) // cum. not counting download: 40%. + var/datum/objective/steal/steal_objective = new + steal_objective.owner = T.owner + steal_objective.find_target() + T.add_objective(steal_objective) + else + var/datum/objective/sabotage/sabotage_objective = new + sabotage_objective.owner = T.owner + sabotage_objective.find_target() + T.add_objective(sabotage_objective) diff --git a/code/modules/antagonists/traitor/classes/traitor_class.dm b/code/modules/antagonists/traitor/classes/traitor_class.dm new file mode 100644 index 0000000000..3df9dec929 --- /dev/null +++ b/code/modules/antagonists/traitor/classes/traitor_class.dm @@ -0,0 +1,40 @@ +GLOBAL_LIST_EMPTY(traitor_classes) + +/datum/traitor_class + var/name = "Bad Coders Ltd." + var/employer = "The Syndicate" + var/weight = 0 + var/chaos = 0 + var/cost = 0 + var/TC = 20 + var/list/uplink_filters + +/datum/traitor_class/New() + ..() + if(src.type in GLOB.traitor_classes) + qdel(src) + else + GLOB.traitor_classes += src.type + GLOB.traitor_classes[src.type] = src + +/datum/traitor_class/proc/forge_objectives(datum/antagonist/traitor/T) + // Like the old forge_human_objectives. Makes all the objectives for this traitor class. + +/datum/traitor_class/proc/forge_single_objective(datum/antagonist/traitor/T) + // As forge_single_objective. + +/datum/traitor_class/proc/on_removal(datum/antagonist/traitor/T) + // What this does to the antag datum on removal. Called before proper removal, obviously. + +/datum/traitor_class/proc/apply_innate_effects(mob/living/M) + // What innate effects it should have. See: AI. + +/datum/traitor_class/proc/remove_innate_effects(mob/living/M) + // Cleaning up the innate effects. + +/datum/traitor_class/proc/greet(datum/antagonist/traitor/T) + // Message upon creation. Not necessary, but can be useful. + +/datum/traitor_class/proc/finalize_traitor(datum/antagonist/traitor/T) + // Finalization. Return TRUE if should play standard traitor sound/equip, return FALSE if both are special case + return TRUE diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index 0352272f70..a9dee81a6c 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -1,6 +1,3 @@ -#define TRAITOR_HUMAN "human" -#define TRAITOR_AI "AI" - /datum/antagonist/traitor name = "Traitor" roundend_category = "traitors" @@ -12,43 +9,52 @@ var/give_objectives = TRUE var/should_give_codewords = TRUE var/should_equip = TRUE - var/traitor_kind = TRAITOR_HUMAN //Set on initial assignment + var/datum/traitor_class/traitor_kind var/datum/contractor_hub/contractor_hub hijack_speed = 0.5 //10 seconds per hijack stage by default +/datum/antagonist/traitor/New() + ..() + if(!GLOB.traitor_classes.len)//Only need to fill the list when it's needed. + for(var/I in subtypesof(/datum/traitor_class)) + new I + +/datum/antagonist/traitor/proc/set_traitor_kind(var/kind) + traitor_kind = GLOB.traitor_classes[kind] + if(istype(SSticker.mode, /datum/game_mode/dynamic)) + var/datum/game_mode/dynamic/mode = SSticker.mode + if(traitor_kind.cost) + mode.spend_threat(traitor_kind.cost) + mode.log_threat("[traitor_kind.cost] was spent due to [owner.name] being a [traitor_kind.name].") + /datum/antagonist/traitor/on_gain() if(owner.current && isAI(owner.current)) - traitor_kind = TRAITOR_AI - + set_traitor_kind(TRAITOR_AI) + else + var/chaos_weight = 0 + if(istype(SSticker.mode,/datum/game_mode/dynamic)) + var/datum/game_mode/dynamic/mode = SSticker.mode + chaos_weight = (mode.threat - 50)/50 + var/list/weights = list() + for(var/C in GLOB.traitor_classes) + var/datum/traitor_class/class = GLOB.traitor_classes[C] + var/weight = (1.5*class.weight)/(0.5+NUM_E**(-chaos_weight*class.chaos)) // just a logistic function + weights[C] = weight + var/choice = pickweightAllowZero(weights) + if(!choice) + choice = GLOB.traitor_classes[TRAITOR_HUMAN] + set_traitor_kind(pickweightAllowZero(weights)) + traitor_kind.weight *= 0.8 // less likely this round SSticker.mode.traitors += owner owner.special_role = special_role if(give_objectives) - forge_traitor_objectives() + traitor_kind.forge_objectives(src) finalize_traitor() ..() -/datum/antagonist/traitor/apply_innate_effects() - if(owner.assigned_role == "Clown") - var/mob/living/carbon/human/traitor_mob = owner.current - if(traitor_mob && istype(traitor_mob)) - if(!silent) - to_chat(traitor_mob, "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself.") - traitor_mob.dna.remove_mutation(CLOWNMUT) - -/datum/antagonist/traitor/remove_innate_effects() - if(owner.assigned_role == "Clown") - var/mob/living/carbon/human/traitor_mob = owner.current - if(traitor_mob && istype(traitor_mob)) - traitor_mob.dna.add_mutation(CLOWNMUT) - /datum/antagonist/traitor/on_removal() //Remove malf powers. - if(traitor_kind == TRAITOR_AI && owner.current && isAI(owner.current)) - var/mob/living/silicon/ai/A = owner.current - A.set_zeroth_law("") - A.verbs -= /mob/living/silicon/ai/proc/choose_modules - A.malf_picker.remove_malf_verbs(A) - qdel(A.malf_picker) + traitor_kind.on_removal(src) SSticker.mode.traitors -= owner if(!silent && owner.current) to_chat(owner.current," You are no longer the [special_role]! ") @@ -69,192 +75,11 @@ objectives -= O /datum/antagonist/traitor/proc/forge_traitor_objectives() - switch(traitor_kind) - if(TRAITOR_AI) - forge_ai_objectives() - else - forge_human_objectives() - -/datum/antagonist/traitor/proc/forge_human_objectives() - var/is_hijacker = FALSE - var/datum/game_mode/dynamic/mode - var/is_dynamic = FALSE - var/hijack_prob = 0 - if(istype(SSticker.mode,/datum/game_mode/dynamic)) - mode = SSticker.mode - is_dynamic = TRUE - if(mode.threat >= CONFIG_GET(number/dynamic_hijack_cost)) - hijack_prob = CLAMP(mode.threat_level-50,0,20) - if(GLOB.joined_player_list.len>=GLOB.dynamic_high_pop_limit) - is_hijacker = (prob(hijack_prob) && mode.threat_level > CONFIG_GET(number/dynamic_hijack_high_population_requirement)) - else - var/indice_pop = min(10,round(GLOB.joined_player_list.len/mode.pop_per_requirement)+1) - is_hijacker = (prob(hijack_prob) && (mode.threat_level >= CONFIG_GET(number_list/dynamic_hijack_requirements)[indice_pop])) - if(mode.storyteller.flags & NO_ASSASSIN) - is_hijacker = FALSE - else if (GLOB.joined_player_list.len >= 30) // Less murderboning on lowpop thanks - hijack_prob = 10 - is_hijacker = prob(10) - var/martyr_chance = prob(hijack_prob*2) - var/objective_count = is_hijacker //Hijacking counts towards number of objectives - if(!SSticker.mode.exchange_blue && SSticker.mode.traitors.len >= 8) //Set up an exchange if there are enough traitors - if(!SSticker.mode.exchange_red) - SSticker.mode.exchange_red = owner - else - SSticker.mode.exchange_blue = owner - assign_exchange_role(SSticker.mode.exchange_red) - assign_exchange_role(SSticker.mode.exchange_blue) - objective_count += 1 //Exchange counts towards number of objectives - var/toa = CONFIG_GET(number/traitor_objectives_amount) - for(var/i = objective_count, i < toa, i++) - forge_single_objective() - - if(is_hijacker && objective_count <= toa) //Don't assign hijack if it would exceed the number of objectives set in config.traitor_objectives_amount - if (!(locate(/datum/objective/hijack) in objectives)) - var/datum/objective/hijack/hijack_objective = new - hijack_objective.owner = owner - add_objective(hijack_objective) - if(is_dynamic) - var/threat_spent = CONFIG_GET(number/dynamic_hijack_cost) - mode.spend_threat(threat_spent) - mode.log_threat("[owner.name] spent [threat_spent] on hijack.") - return - - - var/martyr_compatibility = 1 //You can't succeed in stealing if you're dead. - for(var/datum/objective/O in objectives) - if(!O.martyr_compatible) - martyr_compatibility = 0 - break - - if(martyr_compatibility && martyr_chance) - var/datum/objective/martyr/martyr_objective = new - martyr_objective.owner = owner - add_objective(martyr_objective) - if(is_dynamic) - var/threat_spent = CONFIG_GET(number/dynamic_hijack_cost) - mode.spend_threat(threat_spent) - mode.log_threat("[owner.name] spent [threat_spent] on glorious death.") - return - - else - if(!(locate(/datum/objective/escape) in objectives)) - var/datum/objective/escape/escape_objective = new - escape_objective.owner = owner - add_objective(escape_objective) - return - -/datum/antagonist/traitor/proc/forge_ai_objectives() - var/objective_count = 0 - - if(prob(30)) - objective_count += forge_single_objective() - - for(var/i = objective_count, i < CONFIG_GET(number/traitor_objectives_amount), i++) - var/datum/objective/assassinate/kill_objective = new - kill_objective.owner = owner - kill_objective.find_target() - add_objective(kill_objective) - - var/datum/objective/survive/exist/exist_objective = new - exist_objective.owner = owner - add_objective(exist_objective) - - -/datum/antagonist/traitor/proc/forge_single_objective() - switch(traitor_kind) - if(TRAITOR_AI) - return forge_single_AI_objective() - else - return forge_single_human_objective() - -/datum/antagonist/traitor/proc/forge_single_human_objective() //Returns how many objectives are added - .=1 - var/assassin_prob = 50 - var/is_dynamic = FALSE - var/datum/game_mode/dynamic/mode - if(istype(SSticker.mode,/datum/game_mode/dynamic)) - mode = SSticker.mode - is_dynamic = TRUE - assassin_prob = max(0,mode.threat_level-20) - if(prob(assassin_prob)) - if(is_dynamic) - var/threat_spent = CONFIG_GET(number/dynamic_assassinate_cost) - mode.spend_threat(threat_spent) - mode.log_threat("[owner.name] spent [threat_spent] on an assassination target.") - var/list/active_ais = active_ais() - if(active_ais.len && prob(100/GLOB.joined_player_list.len)) - var/datum/objective/destroy/destroy_objective = new - destroy_objective.owner = owner - destroy_objective.find_target() - add_objective(destroy_objective) - else if(prob(30) || (is_dynamic && (mode.storyteller.flags & NO_ASSASSIN))) - var/datum/objective/maroon/maroon_objective = new - maroon_objective.owner = owner - maroon_objective.find_target() - add_objective(maroon_objective) - else if(prob(max(0,assassin_prob-20))) - var/datum/objective/assassinate/kill_objective = new - kill_objective.owner = owner - kill_objective.find_target() - add_objective(kill_objective) - else - var/datum/objective/assassinate/once/kill_objective = new - kill_objective.owner = owner - kill_objective.find_target() - add_objective(kill_objective) - else - if(prob(15) && !(locate(/datum/objective/download) in objectives) && !(owner.assigned_role in list("Research Director", "Scientist", "Roboticist"))) - var/datum/objective/download/download_objective = new - download_objective.owner = owner - download_objective.gen_amount_goal() - add_objective(download_objective) - else if(prob(40)) // cum. not counting download: 40%. - var/datum/objective/steal/steal_objective = new - steal_objective.owner = owner - steal_objective.find_target() - add_objective(steal_objective) - else if(prob(100/3)) // cum. not counting download: 20%. - var/datum/objective/sabotage/sabotage_objective = new - sabotage_objective.owner = owner - sabotage_objective.find_target() - add_objective(sabotage_objective) - else // cum. not counting download: 40% - var/datum/objective/flavor/traitor/flavor_objective = new - flavor_objective.owner = owner - flavor_objective.forge_objective() - add_objective(flavor_objective) - -/datum/antagonist/traitor/proc/forge_single_AI_objective() - .=1 - var/special_pick = rand(1,4) - switch(special_pick) - if(1) - var/datum/objective/block/block_objective = new - block_objective.owner = owner - add_objective(block_objective) - if(2) - var/datum/objective/purge/purge_objective = new - purge_objective.owner = owner - add_objective(purge_objective) - if(3) - var/datum/objective/robot_army/robot_objective = new - robot_objective.owner = owner - add_objective(robot_objective) - if(4) //Protect and strand a target - var/datum/objective/protect/yandere_one = new - yandere_one.owner = owner - add_objective(yandere_one) - yandere_one.find_target() - var/datum/objective/maroon/yandere_two = new - yandere_two.owner = owner - yandere_two.target = yandere_one.target - yandere_two.update_explanation_text() // normally called in find_target() - add_objective(yandere_two) - .=2 + traitor_kind.forge_objectives(src) /datum/antagonist/traitor/greet() to_chat(owner.current, "You are the [owner.special_role].") + traitor_kind.greet(src) owner.announce_objectives() if(should_give_codewords) give_codewords() @@ -270,32 +95,33 @@ set_antag_hud(owner.current, null) /datum/antagonist/traitor/proc/finalize_traitor() - switch(traitor_kind) - if(TRAITOR_AI) - add_law_zero() - owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/malf.ogg', 100, FALSE, pressure_affected = FALSE) - owner.current.grant_language(/datum/language/codespeak) - if(TRAITOR_HUMAN) - if(should_equip) - equip(silent) - owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/tatoralert.ogg', 100, FALSE, pressure_affected = FALSE) + if(traitor_kind.finalize_traitor(src)) + if(should_equip) + equip(silent) + owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/tatoralert.ogg', 100, FALSE, pressure_affected = FALSE) /datum/antagonist/traitor/apply_innate_effects(mob/living/mob_override) . = ..() update_traitor_icons_added() var/mob/M = mob_override || owner.current - if(isAI(M) && traitor_kind == TRAITOR_AI) - var/mob/living/silicon/ai/A = M - A.hack_software = TRUE + traitor_kind.apply_innate_effects(M) + if(owner.assigned_role == "Clown") + var/mob/living/carbon/human/H = M + if(istype(H)) + if(!silent) + to_chat(H, "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself.") + H.dna.remove_mutation(CLOWNMUT) RegisterSignal(M, COMSIG_MOVABLE_HEAR, .proc/handle_hearing) /datum/antagonist/traitor/remove_innate_effects(mob/living/mob_override) . = ..() update_traitor_icons_removed() var/mob/M = mob_override || owner.current - if(isAI(M) && traitor_kind == TRAITOR_AI) - var/mob/living/silicon/ai/A = M - A.hack_software = FALSE + traitor_kind.remove_innate_effects(M) + if(owner.assigned_role == "Clown") + var/mob/living/carbon/human/H = M + if(istype(H)) + H.dna.add_mutation(CLOWNMUT) UnregisterSignal(M, COMSIG_MOVABLE_HEAR) /datum/antagonist/traitor/proc/give_codewords() @@ -326,8 +152,7 @@ killer.add_malf_picker() /datum/antagonist/traitor/proc/equip(var/silent = FALSE) - if(traitor_kind == TRAITOR_HUMAN) - owner.equip_traitor(employer, silent, src) + owner.equip_traitor(traitor_kind, silent, src) /datum/antagonist/traitor/proc/assign_exchange_role() //set faction diff --git a/code/modules/antagonists/wishgranter/wishgranter.dm b/code/modules/antagonists/wishgranter/wishgranter.dm index d22d1b5e39..15ec78692f 100644 --- a/code/modules/antagonists/wishgranter/wishgranter.dm +++ b/code/modules/antagonists/wishgranter/wishgranter.dm @@ -24,5 +24,5 @@ return H.dna.add_mutation(HULK) H.dna.add_mutation(XRAY) - H.dna.add_mutation(COLDRES) + H.dna.add_mutation(SPACEMUT) H.dna.add_mutation(TK) \ No newline at end of file diff --git a/code/modules/antagonists/wizard/equipment/spellbook.dm b/code/modules/antagonists/wizard/equipment/spellbook.dm index da76356ebe..ecb861f93d 100644 --- a/code/modules/antagonists/wizard/equipment/spellbook.dm +++ b/code/modules/antagonists/wizard/equipment/spellbook.dm @@ -375,6 +375,8 @@ desc = "A collection of wands that allow for a wide variety of utility. Wands have a limited number of charges, so be conservative in use. Comes in a handy belt." item_path = /obj/item/storage/belt/wands/full category = "Defensive" + dynamic_requirement = 60 + dynamic_cost = 10 /datum/spellbook_entry/item/armor name = "Mastercrafted Armor Set" diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index 3dfc0d859d..a40a4c1a42 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -103,10 +103,10 @@ bombassembly.setDir(dir) bombassembly.Move() -/obj/item/onetankbomb/dropped() +/obj/item/onetankbomb/dropped(mob/user) . = ..() if(bombassembly) - bombassembly.dropped() + bombassembly.dropped(user) diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index d7c184de92..c960a7f039 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -83,9 +83,9 @@ /obj/item/assembly_holder/dropped(mob/user) . = ..() if(a_left) - a_left.dropped() + a_left.dropped(user) if(a_right) - a_right.dropped() + a_right.dropped(user) /obj/item/assembly_holder/attack_hand()//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess . = ..() diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index d19666077d..33c6d46045 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -20,13 +20,8 @@ /obj/item/assembly/infra/ComponentInitialize() . = ..() - AddComponent( - /datum/component/simple_rotation, - ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_FLIP | ROTATION_VERBS, - null, - null, - CALLBACK(src,.proc/after_rotation) - ) + var/static/rotation_flags = ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_FLIP | ROTATION_VERBS + AddComponent(/datum/component/simple_rotation, rotation_flags, after_rotation=CALLBACK(src,.proc/after_rotation)) /obj/item/assembly/infra/proc/after_rotation() refreshBeam() @@ -74,7 +69,7 @@ holder.update_icon() return -/obj/item/assembly/infra/dropped() +/obj/item/assembly/infra/dropped(mob/user) . = ..() if(holder) holder_movement() //sync the dir of the device as well if it's contained in a TTV or an assembly holder diff --git a/code/modules/awaymissions/capture_the_flag.dm b/code/modules/awaymissions/capture_the_flag.dm index c4bb6e8cdd..594eae5d46 100644 --- a/code/modules/awaymissions/capture_the_flag.dm +++ b/code/modules/awaymissions/capture_the_flag.dm @@ -379,7 +379,7 @@ force = 75 mag_type = /obj/item/ammo_box/magazine/m50/ctf -/obj/item/gun/ballistic/automatic/pistol/deagle/ctf/dropped() +/obj/item/gun/ballistic/automatic/pistol/deagle/ctf/dropped(mob/user) . = ..() addtimer(CALLBACK(GLOBAL_PROC, /proc/ctf_floor_vanish, src), 1) @@ -402,14 +402,14 @@ desc = "This looks like it could really hurt in melee." force = 50 -/obj/item/gun/ballistic/automatic/laser/ctf/dropped() +/obj/item/gun/ballistic/automatic/laser/ctf/dropped(mob/user) . = ..() addtimer(CALLBACK(GLOBAL_PROC, /proc/ctf_floor_vanish, src), 1) /obj/item/ammo_box/magazine/recharge/ctf ammo_type = /obj/item/ammo_casing/caseless/laser/ctf -/obj/item/ammo_box/magazine/recharge/ctf/dropped() +/obj/item/ammo_box/magazine/recharge/ctf/dropped(mob/user) . = ..() addtimer(CALLBACK(GLOBAL_PROC, /proc/ctf_floor_vanish, src), 1) @@ -475,7 +475,7 @@ return TRUE return ..() -/obj/item/claymore/ctf/dropped() +/obj/item/claymore/ctf/dropped(mob/user) . = ..() addtimer(CALLBACK(GLOBAL_PROC, /proc/ctf_floor_vanish, src), 1) diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm index ac1a4077ec..505b9a1edc 100644 --- a/code/modules/awaymissions/mission_code/wildwest.dm +++ b/code/modules/awaymissions/mission_code/wildwest.dm @@ -94,7 +94,7 @@ to_chat(user, "Your wish is granted, but at a terrible cost...") to_chat(user, "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart.") user.dna.add_mutation(LASEREYES) - user.dna.add_mutation(COLDRES) + user.dna.add_mutation(SPACEMUT) user.dna.add_mutation(XRAY) user.set_species(/datum/species/shadow) if("Wealth") diff --git a/code/modules/cargo/packs/misc.dm b/code/modules/cargo/packs/misc.dm index d9c9794bd8..80d6f76910 100644 --- a/code/modules/cargo/packs/misc.dm +++ b/code/modules/cargo/packs/misc.dm @@ -89,32 +89,17 @@ /datum/supply_pack/misc/paper_work name = "Freelance Paper work" - desc = "The Nanotrasen Primary Bureaucratic Database Intelligence (PDBI) reports that the station has not completed its funding and grant paperwork this solar cycle. In order to gain further funding, your station is required to fill out (20) ten of these forms or no additional capital will be disbursed. We have sent you ten copies of the following form and we expect every one to be up to Nanotrasen Standards." // Disbursement. It's not a typo, look it up. - cost = 700 // Net of 0 credits but makes (120 x 20 = 2400) + desc = "The Nanotrasen Primary Bureaucratic Database Intelligence (PDBI) reports that the station has not completed its funding and grant paperwork this solar cycle. In order to gain further funding, your station is required to fill out (10) ten of these forms or no additional capital will be disbursed. We have sent you ten copies of the following form and we expect every one to be up to Nanotrasen Standards." // Disbursement. It's not a typo, look it up. + cost = 700 // Net of 0 credits but makes (120 x 10 = 1200) contains = list(/obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, - /obj/item/folder/paperwork, /obj/item/pen/fountain ) crate_name = "Paperwork" +/datum/supply_pack/misc/paper_work/generate() + . = ..() + for(var/i in 1 to 9) + new /obj/item/folder/paperwork(.) ////////////////////////////////////////////////////////////////////////////// //////////////////////////////// Entertainment /////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -123,16 +108,14 @@ name = "Bedsheet Crate (R)" desc = "Snuggle up in some sweet sheets with this assorted bedsheet crate. Each set comes with eight random bedsheets for your slumbering pleasure!" cost = 2000 - contains = list(/obj/item/bedsheet/random, - /obj/item/bedsheet/random, - /obj/item/bedsheet/random, - /obj/item/bedsheet/random, - /obj/item/bedsheet/random, - /obj/item/bedsheet/random, - /obj/item/bedsheet/random, - /obj/item/bedsheet/random) //I'm lazy, and I copy paste stuff. + contains = list(/obj/item/bedsheet/random) crate_name = "random bedsheet crate" +/datum/supply_pack/misc/randombedsheets/generate() + . = ..() + for(var/i in 1 to 7) + new /obj/item/bedsheet/random(.) + /datum/supply_pack/misc/coloredsheets name = "Bedsheet Crate (C)" desc = "Give your night life a splash of color with this crate filled with bedsheets! Contains a total of nine different-colored sheets." @@ -208,13 +191,14 @@ name = "Dueling Pistols" desc = "Resolve all your quarrels with some nonlethal fun." cost = 2000 - contains = list(/obj/item/storage/lockbox/dueling/hugbox/stamina, - /obj/item/storage/lockbox/dueling/hugbox/stamina, - /obj/item/storage/lockbox/dueling/hugbox/stamina, - /obj/item/storage/lockbox/dueling/hugbox/stamina, - /obj/item/storage/lockbox/dueling/hugbox/stamina) + contains = list(/obj/item/storage/lockbox/dueling/hugbox/stamina) crate_name = "dueling pistols" +/datum/supply_pack/misc/dueling_stam/generate() + . = ..() + for(var/i in 1 to 3) + new /obj/item/storage/lockbox/dueling/hugbox/stamina(.) + /datum/supply_pack/misc/dueling_lethal name = "Lethal Dueling Pistols" desc = "Settle your differences the true spaceman way." @@ -240,12 +224,7 @@ cost = 12000 var/num_contained = 3 contains = list(/obj/item/ammo_box/a357, - /obj/item/ammo_box/a357, - /obj/item/ammo_box/a357, /obj/item/ammo_box/magazine/pistolm9mm, - /obj/item/ammo_box/magazine/pistolm9mm, - /obj/item/ammo_box/magazine/pistolm9mm, - /obj/item/ammo_box/magazine/m45/kitchengun, /obj/item/ammo_box/magazine/m45/kitchengun) crate_name = "crate" diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index 902b442403..7bafefcf53 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -703,3 +703,10 @@ GLOBAL_LIST_EMPTY(asset_datums) Insert(initial(D.id), I) return ..() + +/datum/asset/simple/genetics + assets = list( + "dna_discovered.gif" = 'html/dna_discovered.gif', + "dna_undiscovered.gif" = 'html/dna_undiscovered.gif', + "dna_extra.gif" = 'html/dna_extra.gif' +) \ No newline at end of file diff --git a/code/modules/client/verbs/minimap.dm b/code/modules/client/verbs/minimap.dm new file mode 100644 index 0000000000..3d213dc210 --- /dev/null +++ b/code/modules/client/verbs/minimap.dm @@ -0,0 +1,10 @@ +/client/verb/show_station_minimap() + set category = "OOC" + set name = "Show Station Minimap" + set desc = "Shows a minimap of the currently loaded station map." + + if(!CONFIG_GET(flag/minimaps_enabled)) + to_chat(usr, "Minimap generation is not enabled in the server's configuration.") + return + + SSminimaps.station_minimap.show(src) diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm index cb169f4f62..19ff6bc8b2 100644 --- a/code/modules/clothing/head/soft_caps.dm +++ b/code/modules/clothing/head/soft_caps.dm @@ -9,10 +9,10 @@ var/flipped = 0 -/obj/item/clothing/head/soft/dropped() - src.icon_state = "[item_color]soft" - src.flipped=0 - ..() +/obj/item/clothing/head/soft/dropped(mob/user) + icon_state = "[item_color]soft" + flipped = FALSE + return ..() /obj/item/clothing/head/soft/verb/flipcap() set category = "Object" diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 84990f9660..c743f26363 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -247,6 +247,30 @@ /obj/item/clothing/mask/bandana/attack_self(mob/user) adjustmask(user) +/obj/item/clothing/mask/bandana/AltClick(mob/user) + . = ..() + if(iscarbon(user)) + var/mob/living/carbon/C = user + if((C.get_item_by_slot(SLOT_HEAD == src)) || (C.get_item_by_slot(SLOT_WEAR_MASK) == src)) + to_chat(user, "You can't tie [src] while wearing it!") + return + if(slot_flags & ITEM_SLOT_HEAD) + to_chat(user, "You must undo [src] before you can tie it into a neckerchief!") + else + if(user.is_holding(src)) + var/obj/item/clothing/neck/neckerchief/nk = new(src) + nk.name = "[name] neckerchief" + nk.desc = "[desc] It's tied up like a neckerchief." + nk.icon_state = icon_state + nk.sourceBandanaType = src.type + var/currentHandIndex = user.get_held_index_of_item(src) + user.transferItemToLoc(src, null) + user.put_in_hand(nk, currentHandIndex) + user.visible_message("You tie [src] up like a neckerchief.", "[user] ties [src] up like a neckerchief.") + qdel(src) + else + to_chat(user, "You must be holding [src] in order to tie it!") + /obj/item/clothing/mask/bandana/red name = "red bandana" desc = "A fine red bandana with nanotech lining." diff --git a/code/modules/clothing/neck/_neck.dm b/code/modules/clothing/neck/_neck.dm index 2b43460257..530af7777d 100644 --- a/code/modules/clothing/neck/_neck.dm +++ b/code/modules/clothing/neck/_neck.dm @@ -291,3 +291,36 @@ icon = 'icons/obj/clothing/neck.dmi' icon_state = "bling" item_color = "bling" + +////////////////////////////////// +//VERY SUPER BADASS NECKERCHIEFS// +////////////////////////////////// + +obj/item/clothing/neck/neckerchief + icon = 'icons/obj/clothing/masks.dmi' //In order to reuse the bandana sprite + w_class = WEIGHT_CLASS_TINY + var/sourceBandanaType + +/obj/item/clothing/neck/neckerchief/worn_overlays(isinhands) + . = ..() + if(!isinhands) + var/mutable_appearance/realOverlay = mutable_appearance('icons/mob/mask.dmi', icon_state) + realOverlay.pixel_y = -3 + . += realOverlay + +/obj/item/clothing/neck/neckerchief/AltClick(mob/user) + . = ..() + if(iscarbon(user)) + var/mob/living/carbon/C = user + if(C.get_item_by_slot(SLOT_NECK) == src) + to_chat(user, "You can't untie [src] while wearing it!") + return + if(user.is_holding(src)) + var/obj/item/clothing/mask/bandana/newBand = new sourceBandanaType(user) + var/currentHandIndex = user.get_held_index_of_item(src) + var/oldName = src.name + qdel(src) + user.put_in_hand(newBand, currentHandIndex) + user.visible_message("You untie [oldName] back into a [newBand.name]", "[user] unties [oldName] back into a [newBand.name]") + else + to_chat(user, "You must be holding [src] in order to untie it!") diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm index 81fedcf57c..4311aa5166 100644 --- a/code/modules/clothing/spacesuits/chronosuit.dm +++ b/code/modules/clothing/spacesuits/chronosuit.dm @@ -8,16 +8,11 @@ resistance_flags = FIRE_PROOF | ACID_PROOF var/obj/item/clothing/suit/space/chronos/suit = null -/obj/item/clothing/head/helmet/space/chronos/dropped() +/obj/item/clothing/head/helmet/space/chronos/dropped(mob/user) if(suit) suit.deactivate(1, 1) ..() -/obj/item/clothing/head/helmet/space/chronos/Destroy() - dropped() - return ..() - - /obj/item/clothing/suit/space/chronos name = "Chronosuit" desc = "An advanced spacesuit equipped with time-bluespace teleportation and anti-compression technology." @@ -57,15 +52,11 @@ else deactivate() -/obj/item/clothing/suit/space/chronos/dropped() +/obj/item/clothing/suit/space/chronos/dropped(mob/user) if(activated) deactivate() ..() -/obj/item/clothing/suit/space/chronos/Destroy() - dropped() - return ..() - /obj/item/clothing/suit/space/chronos/emp_act(severity) . = ..() if(. & EMP_PROTECT_SELF) diff --git a/code/modules/clothing/spacesuits/flightsuit.dm b/code/modules/clothing/spacesuits/flightsuit.dm index 2f9ded7848..89644667d0 100644 --- a/code/modules/clothing/spacesuits/flightsuit.dm +++ b/code/modules/clothing/spacesuits/flightsuit.dm @@ -805,7 +805,8 @@ . += "Its maintainence panel is [maint_panel ? "OPEN" : "CLOSED"]" /obj/item/clothing/suit/space/hardsuit/flightsuit/Destroy() - dropped() + if(ismob(loc)) + dropped(loc) QDEL_NULL(pack) QDEL_NULL(shoes) return ..() @@ -834,7 +835,7 @@ return FALSE return ..() -/obj/item/clothing/suit/space/hardsuit/flightsuit/dropped() +/obj/item/clothing/suit/space/hardsuit/flightsuit/dropped(mob/the_user) if(deployedpack) retract_flightpack(TRUE) if(deployedshoes) diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 4df7061991..1f23569a9c 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -707,7 +707,7 @@ RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/on_mob_move) listeningTo = user -/obj/item/clothing/suit/space/hardsuit/ancient/dropped() +/obj/item/clothing/suit/space/hardsuit/ancient/dropped(mob/user) . = ..() if(listeningTo) UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) diff --git a/code/modules/clothing/suits/toggles.dm b/code/modules/clothing/suits/toggles.dm index 79b221a807..cbbd64ebcc 100644 --- a/code/modules/clothing/suits/toggles.dm +++ b/code/modules/clothing/suits/toggles.dm @@ -45,7 +45,7 @@ var/datum/action/A = X A.UpdateButtonIcon() -/obj/item/clothing/suit/hooded/dropped() +/obj/item/clothing/suit/hooded/dropped(mob/user) ..() RemoveHood() @@ -76,7 +76,7 @@ suit = null return ..() -/obj/item/clothing/head/hooded/dropped() +/obj/item/clothing/head/hooded/dropped(mob/user) ..() if(suit) suit.RemoveHood() @@ -174,7 +174,7 @@ else helmet.forceMove(src) -/obj/item/clothing/suit/space/hardsuit/dropped() +/obj/item/clothing/suit/space/hardsuit/dropped(mob/user) ..() RemoveHelmet() diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index 68c5d8c5c8..490cd0ff21 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -59,7 +59,7 @@ var/datum/disease/dnaspread/DS = D DS.strain_data["name"] = H.real_name DS.strain_data["UI"] = H.dna.uni_identity - DS.strain_data["SE"] = H.dna.struc_enzymes + DS.strain_data["SE"] = H.dna.mutation_index else D = new virus_type() else diff --git a/code/modules/events/portal_storm.dm b/code/modules/events/portal_storm.dm index 5ef30d0030..457b5bd4ec 100644 --- a/code/modules/events/portal_storm.dm +++ b/code/modules/events/portal_storm.dm @@ -4,6 +4,7 @@ weight = 2 min_players = 15 earliest_start = 30 MINUTES + gamemode_blacklist = list("dynamic") /datum/round_event/portal_storm/syndicate_shocktroop boss_types = list(/mob/living/simple_animal/hostile/syndicate/melee/space/stormtrooper = 2) diff --git a/code/modules/events/wormholes.dm b/code/modules/events/wormholes.dm index 9dbe1443d1..b7f8b8f911 100644 --- a/code/modules/events/wormholes.dm +++ b/code/modules/events/wormholes.dm @@ -4,6 +4,7 @@ max_occurrences = 3 weight = 2 min_players = 2 + gamemode_blacklist = list("dynamic") /datum/round_event/wormholes diff --git a/code/modules/fields/fields.dm b/code/modules/fields/fields.dm index 5b0b4bc1f8..8710282021 100644 --- a/code/modules/fields/fields.dm +++ b/code/modules/fields/fields.dm @@ -312,7 +312,7 @@ else if(!operating) QDEL_NULL(current) -/obj/item/multitool/field_debug/dropped() +/obj/item/multitool/field_debug/dropped(mob/user) . = ..() if(listeningTo) UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) diff --git a/code/modules/hydroponics/grown/banana.dm b/code/modules/hydroponics/grown/banana.dm index 7668d17ac1..0411a80443 100644 --- a/code/modules/hydroponics/grown/banana.dm +++ b/code/modules/hydroponics/grown/banana.dm @@ -151,7 +151,7 @@ spawn(30) if(!QDELETED(src)) var/mob/living/simple_animal/banana_spider/S = new /mob/living/simple_animal/banana_spider(get_turf(src.loc)) - S.speed += round(10 / seed.potency) + S.speed += round(10 / max(seed.potency, 1), 1) S.visible_message("The banana spider chitters as it stretches its legs.") qdel(src) diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm index 3183a6d0e6..d1cd852651 100644 --- a/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -402,11 +402,22 @@ power_draw_per_use = 40 ext_cooldown = 1 cooldown_per_use = 10 - var/list/mtypes = list(/datum/material/iron, /datum/material/glass, /datum/material/silver, /datum/material/gold, /datum/material/diamond, /datum/material/uranium, /datum/material/plasma, /datum/material/bluespace, /datum/material/bananium, /datum/material/titanium, /datum/material/plastic) + var/static/list/mtypes = list( + /datum/material/iron, + /datum/material/glass, + /datum/material/silver, + /datum/material/gold, + /datum/material/diamond, + /datum/material/uranium, + /datum/material/plasma, + /datum/material/bluespace, + /datum/material/bananium, + /datum/material/titanium, + /datum/material/plastic + ) -/obj/item/integrated_circuit/manipulation/matman/Initialize() - var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, - mtypes, 100000, FALSE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) +/obj/item/integrated_circuit/manipulation/matman/ComponentInitialize() + var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, mtypes, 100000, FALSE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) materials.precise_insertion = TRUE .=..() diff --git a/code/modules/jobs/job_types/geneticist.dm b/code/modules/jobs/job_types/geneticist.dm index d7f59ff883..6efa95cd91 100644 --- a/code/modules/jobs/job_types/geneticist.dm +++ b/code/modules/jobs/job_types/geneticist.dm @@ -32,4 +32,5 @@ backpack = /obj/item/storage/backpack/genetics satchel = /obj/item/storage/backpack/satchel/gen duffelbag = /obj/item/storage/backpack/duffelbag/med + l_pocket = /obj/item/sequence_scanner diff --git a/code/modules/mapping/mapping_helpers/_mapping_helpers.dm b/code/modules/mapping/mapping_helpers/_mapping_helpers.dm index 99184b1c3e..4de16ba350 100644 --- a/code/modules/mapping/mapping_helpers/_mapping_helpers.dm +++ b/code/modules/mapping/mapping_helpers/_mapping_helpers.dm @@ -97,7 +97,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava) if(target_type && !istype(A,target_type)) continue var/cargs = build_args() - A.AddComponent(arglist(cargs)) + A._AddComponent(cargs) qdel(src) return diff --git a/code/modules/mapping/minimaps.dm b/code/modules/mapping/minimaps.dm new file mode 100644 index 0000000000..c347a8d7a6 --- /dev/null +++ b/code/modules/mapping/minimaps.dm @@ -0,0 +1,155 @@ +/datum/minimap + var/name + var/icon/map_icon + var/icon/meta_icon + var/icon/overlay_icon + var/list/color_area_names = list() + var/minx + var/maxx + var/miny + var/maxy + var/z_level + var/id = 0 + var/static/next_id = 0 + +/datum/minimap/New(z, x1 = 1, y1 = 1, x2 = world.maxx, y2 = world.maxy, name) + src.name = name + id = ++next_id + z_level = z + + var/crop_x1 = x2 + var/crop_x2 = x1 + var/crop_y1 = y2 + var/crop_y2 = y1 + + // do the generating + map_icon = new('html/blank.png') + meta_icon = new('html/blank.png') + map_icon.Scale(x2-x1+1, y2-y1+1) // arrays start at 1 + meta_icon.Scale(x2-x1+1, y2-y1+1) + var/list/area_to_color = list() + for(var/turf/T in block(locate(x1,y1,z),locate(x2,y2,z))) + var/area/A = T.loc + var/img_x = T.x - x1 + 1 // arrays start at 1 + var/img_y = T.y - y1 + 1 + if(!istype(A, /area/space) || istype(T, /turf/closed/wall)) + crop_x1 = min(crop_x1, T.x) + crop_x2 = max(crop_x2, T.x) + crop_y1 = min(crop_y1, T.y) + crop_y2 = max(crop_y2, T.y) + var/meta_color = area_to_color[A] + if(!meta_color) + meta_color = rgb(rand(0,255),rand(0,255),rand(0,255)) // technically conflicts could happen but it's like very unlikely and it's not that big of a deal if one happens + area_to_color[A] = meta_color + color_area_names[meta_color] = A.name + meta_icon.DrawBox(meta_color, img_x, img_y) + if(istype(T, /turf/closed/wall)) + map_icon.DrawBox("#000000", img_x, img_y) + else if(!istype(A, /area/space)) + var/color = A.minimap_color || "#FF00FF" + if(locate(/obj/machinery/power/solar) in T) + color = "#02026a" + if((locate(/obj/effect/spawner/structure/window) in T) || (locate(/obj/structure/grille) in T)) + color = BlendRGB(color, "#000000", 0.5) + map_icon.DrawBox(color, img_x, img_y) + map_icon.Crop(crop_x1, crop_y1, crop_x2, crop_y2) + meta_icon.Crop(crop_x1, crop_y1, crop_x2, crop_y2) + minx = crop_x1 + maxx = crop_x2 + miny = crop_y1 + maxy = crop_y2 + overlay_icon = new(map_icon) + overlay_icon.Scale(16, 16) + +/datum/minimap/proc/send(mob/user) + register_asset("minimap-[id].png", map_icon) + register_asset("minimap-[id]-meta.png", meta_icon) + send_asset_list(user, list("minimap-[id].png" = map_icon, "minimap-[id]-meta.png" = meta_icon), verify=FALSE) + +/datum/minimap_group + var/list/minimaps + var/static/next_id = 0 + var/id + var/name + +/datum/minimap_group/New(list/maps, name) + id = ++next_id + src.name = name + minimaps = maps || list() + +/datum/minimap_group/proc/show(mob/user) + if(!length(minimaps)) + to_chat(user, "ERROR: Attempted to access an empty datum/minimap_group. This should probably not happen.") + return + var/list/datas = list() + var/list/info = list() + var/datum/minimap/first_map = minimaps[1] + for(var/i in 1 to length(minimaps)) + var/datum/minimap/M = minimaps[i] + M.send(user) + info += "
" + datas += json_encode(M.color_area_names); + info = info.Join() + + var/html = {" + + + + + + +[name] + +[info] +"} + + user << browse(html, "window=minimap_[id];size=768x[round(768 / first_map.map_icon.Width() * first_map.map_icon.Height() + 50)]") diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 5faa465b8c..bf25bb9da8 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -463,30 +463,45 @@ if(cooldown < world.time) SSblackbox.record_feedback("amount", "immortality_talisman_uses", 1) cooldown = world.time + 600 - user.visible_message("[user] vanishes from reality, leaving a hole in [user.p_their()] place!") - var/obj/effect/immortality_talisman/Z = new(get_turf(src.loc)) - Z.name = "hole in reality" - Z.desc = "It's shaped an awful lot like [user.name]." - Z.setDir(user.dir) - user.forceMove(Z) - user.notransform = 1 - user.status_flags |= GODMODE - addtimer(CALLBACK(src, .proc/return_to_reality, user, Z), 100) + new /obj/effect/immortality_talisman(get_turf(user), user) else to_chat(user, "[src] is not ready yet!") -/obj/item/immortality_talisman/proc/return_to_reality(mob/user, obj/effect/immortality_talisman/Z) - user.status_flags &= ~GODMODE - user.notransform = 0 - user.forceMove(get_turf(Z)) - user.visible_message("[user] pops back into reality!") - Z.can_destroy = TRUE - qdel(Z) - /obj/effect/immortality_talisman + name = "hole in reality" + desc = "It's shaped an awful lot like a person." icon_state = "blank" icon = 'icons/effects/effects.dmi' - var/can_destroy = FALSE + var/vanish_description = "vanishes from reality" + var/can_destroy = TRUE + +/obj/effect/immortality_talisman/Initialize(mapload, mob/new_user) + . = ..() + if(new_user) + vanish(new_user) + +/obj/effect/immortality_talisman/proc/vanish(mob/user) + user.visible_message("[user] [vanish_description], leaving a hole in [user.p_their()] place!") + + desc = "It's shaped an awful lot like [user.name]." + setDir(user.dir) + + user.forceMove(src) + user.notransform = TRUE + user.status_flags |= GODMODE + + can_destroy = FALSE + + addtimer(CALLBACK(src, .proc/unvanish, user), 10 SECONDS) + +/obj/effect/immortality_talisman/proc/unvanish(mob/user) + user.status_flags &= ~GODMODE + user.notransform = FALSE + user.forceMove(get_turf(src)) + + user.visible_message("[user] pops back into reality!") + can_destroy = TRUE + qdel(src) /obj/effect/immortality_talisman/attackby() return @@ -503,6 +518,9 @@ else . = ..() +/obj/effect/immortality_talisman/void + vanish_description = "is dragged into the void" + //Shared Bag @@ -957,7 +975,7 @@ if(1) new /obj/item/mayhem(src) if(2) - new /obj/item/blood_contract(src) + new /obj/item/gun/ballistic/revolver/doublebarrel/super(src) if(3) new /obj/item/gun/magic/staff/spellblade(src) @@ -1028,6 +1046,17 @@ log_combat(user, L, "took out a blood contract on", src) qdel(src) +/obj/item/gun/ballistic/revolver/doublebarrel/super + name = "super combat shotgun" + desc = "From the belly of the beast - or rather, demon. Twice as lethal as a less-than-super shotgun, but a tad bulkier." + icon_state = "heckgun" + slot_flags = null + mag_type = /obj/item/ammo_box/magazine/internal/shot/dual/heck + burst_size = 2 + burst_shot_delay = 0 + unique_reskin = null + sawn_off = TRUE + //Colossus /obj/structure/closet/crate/necropolis/colossus name = "colossus chest" diff --git a/code/modules/mining/machine_silo.dm b/code/modules/mining/machine_silo.dm index c0eba668f1..c0356dd1ab 100644 --- a/code/modules/mining/machine_silo.dm +++ b/code/modules/mining/machine_silo.dm @@ -15,14 +15,20 @@ GLOBAL_LIST_EMPTY(silo_access_logs) /obj/machinery/ore_silo/Initialize(mapload) . = ..() - AddComponent(/datum/component/material_container, - list(/datum/material/iron, /datum/material/glass, /datum/material/silver, /datum/material/gold, /datum/material/diamond, /datum/material/plasma, /datum/material/uranium, /datum/material/bananium, /datum/material/titanium, /datum/material/bluespace, /datum/material/plastic), - INFINITY, - FALSE, - /obj/item/stack, - null, - null, - TRUE) + var/static/list/materials_list = list( + /datum/material/iron, + /datum/material/glass, + /datum/material/silver, + /datum/material/gold, + /datum/material/diamond, + /datum/material/plasma, + /datum/material/uranium, + /datum/material/bananium, + /datum/material/titanium, + /datum/material/bluespace, + /datum/material/plastic, + ) + AddComponent(/datum/component/material_container, materials_list, INFINITY, allowed_types=/obj/item/stack, _disable_attackby=TRUE) if (!GLOB.ore_silo_default && mapload && is_station_level(z)) GLOB.ore_silo_default = src diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 87c8598541..c201f437e4 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -292,9 +292,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/roundstart_quit_limit = CONFIG_GET(number/roundstart_suicide_time_limit) MINUTES if(world.time < roundstart_quit_limit) penalty += roundstart_quit_limit - world.time - var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes - if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime) - penalty = CANT_REENTER_ROUND + if(SSautotransfer.can_fire && SSautotransfer.maxvotes) + var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes + if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime) + penalty = CANT_REENTER_ROUND if(SEND_SIGNAL(src, COMSIG_MOB_GHOSTIZE, (stat == DEAD) ? TRUE : FALSE, FALSE, (stat == DEAD)? penalty : 0, (stat == DEAD)? TRUE : FALSE) & COMPONENT_BLOCK_GHOSTING) return @@ -327,9 +328,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/roundstart_quit_limit = CONFIG_GET(number/roundstart_suicide_time_limit) MINUTES if(world.time < roundstart_quit_limit) penalty += roundstart_quit_limit - world.time - var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes - if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime) - penalty = CANT_REENTER_ROUND + if(SSautotransfer.can_fire && SSautotransfer.maxvotes) + var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes + if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime) + penalty = CANT_REENTER_ROUND var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty == CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body") if(response != "Ghost") diff --git a/code/modules/mob/living/brain/brain.dm b/code/modules/mob/living/brain/brain.dm index e7b8250494..4bca3e7f62 100644 --- a/code/modules/mob/living/brain/brain.dm +++ b/code/modules/mob/living/brain/brain.dm @@ -40,7 +40,7 @@ return ..() /mob/living/brain/update_mobility() - return ((mobility_flags = (in_contents_of(/obj/mecha)? MOBILITY_FLAGS_DEFAULT : NONE))) + return ((mobility_flags = (container?.in_contents_of(/obj/mecha)? MOBILITY_FLAGS_DEFAULT : NONE))) /mob/living/brain/ex_act() //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up. return diff --git a/code/modules/mob/living/brain/posibrain.dm b/code/modules/mob/living/brain/posibrain.dm index 224b5ad807..173b68fc3c 100644 --- a/code/modules/mob/living/brain/posibrain.dm +++ b/code/modules/mob/living/brain/posibrain.dm @@ -28,6 +28,34 @@ GLOBAL_VAR(posibrain_notify_cooldown) var/list/possible_names //If you leave this blank, it will use the global posibrain names var/picked_name +/obj/item/mmi/posibrain/Initialize() + . = ..() + brainmob = new(src) + var/new_name + if(!LAZYLEN(possible_names)) + new_name = pick(GLOB.posibrain_names) + else + new_name = pick(possible_names) + brainmob.name = "[new_name]-[rand(100, 999)]" + brainmob.real_name = brainmob.name + brainmob.forceMove(src) + brainmob.container = src + if(autoping) + ping_ghosts("created", TRUE) + GLOB.poi_list |= src + LAZYADD(GLOB.mob_spawners[name], src) + +/obj/item/mmi/posibrain/Destroy() + latejoin_remove() + return ..() + +/obj/item/mmi/posibrain/proc/latejoin_remove() + GLOB.poi_list -= src + var/init_name = initial(name) + LAZYREMOVE(GLOB.mob_spawners[init_name], src) + if(!LAZYLEN(GLOB.mob_spawners[init_name])) + GLOB.mob_spawners -= init_name + /obj/item/mmi/posibrain/Topic(href, href_list) if(href_list["activate"]) var/mob/dead/observer/ghost = usr @@ -97,15 +125,6 @@ GLOBAL_VAR(posibrain_notify_cooldown) transfer_personality(user) latejoin_remove() -/obj/item/mmi/posibrain/Destroy() - latejoin_remove() - return ..() - -/obj/item/mmi/posibrain/proc/latejoin_remove() - GLOB.poi_list -= src - LAZYREMOVE(GLOB.mob_spawners[name], src) - if(!LAZYLEN(GLOB.mob_spawners[name])) - GLOB.mob_spawners -= name /obj/item/mmi/posibrain/transfer_identity(mob/living/carbon/C) name = "[initial(name)] ([C])" @@ -163,23 +182,6 @@ GLOBAL_VAR(posibrain_notify_cooldown) . += msg -/obj/item/mmi/posibrain/Initialize() - . = ..() - brainmob = new(src) - var/new_name - if(!LAZYLEN(possible_names)) - new_name = pick(GLOB.posibrain_names) - else - new_name = pick(possible_names) - brainmob.name = "[new_name]-[rand(100, 999)]" - brainmob.real_name = brainmob.name - brainmob.forceMove(src) - brainmob.container = src - if(autoping) - ping_ghosts("created", TRUE) - GLOB.poi_list |= src - LAZYADD(GLOB.mob_spawners[name], src) - /obj/item/mmi/posibrain/attackby(obj/item/O, mob/user) return diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index dfd409ef8f..5bb1e6d17d 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -632,6 +632,13 @@ if(M.name == XRAY) sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) see_in_dark = max(see_in_dark, 8) + if(HAS_TRAIT(src, TRAIT_THERMAL_VISION)) + sight |= (SEE_MOBS) + lighting_alpha = min(lighting_alpha, LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE) + + if(HAS_TRAIT(src, TRAIT_XRAY_VISION)) + sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) + see_in_dark = max(see_in_dark, 8) if(see_override) see_invisible = see_override diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 1ea2fa1130..8bd1a35e07 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -71,6 +71,7 @@ L.embedded_objects |= I I.add_mob_blood(src)//it embedded itself in you, of course it's bloody! I.forceMove(src) + I.embedded() L.receive_damage(I.w_class*I.embedding.embedded_impact_pain_multiplier) visible_message("[I] embeds itself in [src]'s [L.name]!","[I] embeds itself in your [L.name]!") SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "embedded", /datum/mood_event/embedded) @@ -104,7 +105,8 @@ var/basebloodychance = affecting.brute_dam + totitemdamage if(prob(basebloodychance)) I.add_mob_blood(src) - bleed(totitemdamage) + var/turf/location = get_turf(src) + add_splatter_floor(location) if(totitemdamage >= 10 && get_dist(user, src) <= 1) //people with TK won't get smeared with blood user.add_mob_blood(src) @@ -262,11 +264,11 @@ jitteriness += 1000 //High numbers for violent convulsions do_jitter_animation(jitteriness) stuttering += 2 - if((!(flags & SHOCK_TESLA) || siemens_coeff > 0.5) && (flags & SHOCK_NOSTUN)) + if((!(flags & SHOCK_TESLA) || siemens_coeff > 0.5) && !(flags & SHOCK_NOSTUN)) Stun(40) spawn(20) jitteriness = max(jitteriness - 990, 10) //Still jittery, but vastly less - if((!(flags & SHOCK_TESLA) || siemens_coeff > 0.5) && (flags & SHOCK_NOSTUN)) + if((!(flags & SHOCK_TESLA) || siemens_coeff > 0.5) && !(flags & SHOCK_NOSTUN)) DefaultCombatKnockdown(60) return shock_damage diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 4ef5a3ca04..1fc43f0d41 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -45,31 +45,11 @@ if(spec_return) return spec_return - if(mind) - if (mind.martial_art && mind.martial_art.dodge_chance) - if(!lying && dna && !dna.check_mutation(HULK)) - if(prob(mind.martial_art.dodge_chance)) - var/static/dodgemessages = list("dodges under",0,-4,"dodges to the right of",-4,0,"dodges to the left of",4,0,"jumps over",0,4) - var/pick = pick(1,4,7,10) - var/oldx = pixel_x - var/oldy = pixel_y - animate(src,pixel_x = pixel_x + dodgemessages[pick+1],pixel_y = pixel_y + dodgemessages[pick+2],time=3) - animate(src,pixel_x = oldx,pixel_y = oldy,time=2) - visible_message("[src] [dodgemessages[pick]] the projectile!", "You dodge the projectile!") - return BULLET_ACT_FORCE_PIERCE - if(mind.martial_art && !incapacitated(FALSE, TRUE) && mind.martial_art.can_use(src) && mind.martial_art.deflection_chance) //Some martial arts users can deflect projectiles! - if(prob(mind.martial_art.deflection_chance)) - if(!lying && dna && !dna.check_mutation(HULK)) //But only if they're not lying down, and hulks can't do it - if(mind.martial_art.deflection_chance >= 100) //if they can NEVER be hit, lets clue sec in ;) - visible_message("[src] deflects the projectile; [p_they()] can't be hit with ranged weapons!", "You deflect the projectile!") - else - visible_message("[src] deflects the projectile!", "You deflect the projectile!") - playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1) - if(mind.martial_art.reroute_deflection) - P.firer = src - P.setAngle(rand(0, 360))//SHING - return BULLET_ACT_FORCE_PIERCE - + if(mind) //martial art stuff + if(mind.martial_art && mind.martial_art.can_use(src)) //Some martial arts users can deflect projectiles! + var/martial_art_result = mind.martial_art.on_projectile_hit(src, P, def_zone) + if(!(martial_art_result == BULLET_ACT_HIT)) + return martial_art_result return ..() /mob/living/carbon/human/check_reflect(def_zone) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 7507067597..9316a36e6b 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -316,6 +316,7 @@ BP.receive_damage(I.w_class*I.embedding.embedded_fall_pain_multiplier) BP.embedded_objects -= I I.forceMove(drop_location()) + I.unembedded() visible_message("[I] falls out of [name]'s [BP.name]!","[I] falls out of your [BP.name]!") if(!has_embedded_objects()) clear_alert("embeddedobject") diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 1cb30a657b..b428f49578 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -69,6 +69,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) var/siemens_coeff = 1 //base electrocution coefficient var/damage_overlay_type = "human" //what kind of damage overlays (if any) appear on our species when wounded? var/fixed_mut_color = "" //to use MUTCOLOR with a fixed color that's independent of dna.feature["mcolor"] + var/inert_mutation = DWARFISM var/list/special_step_sounds //Sounds to override barefeet walkng var/grab_sound //Special sound for grabbing var/datum/outfit/outfit_important_for_life // A path to an outfit that is important for species life e.g. plasmaman outfit @@ -356,6 +357,14 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) else C.type_of_meat = initial(meat) + //If their inert mutation is not the same, swap it out + if((inert_mutation != new_species.inert_mutation) && LAZYLEN(C.dna.mutation_index) && (inert_mutation in C.dna.mutation_index)) + C.dna.remove_mutation(inert_mutation) + //keep it at the right spot, so we can't have people taking shortcuts + var/location = C.dna.mutation_index.Find(inert_mutation) + C.dna.mutation_index[location] = new_species.inert_mutation + C.dna.mutation_index[new_species.inert_mutation] = create_sequence(new_species.inert_mutation) + SEND_SIGNAL(C, COMSIG_SPECIES_LOSS, src) /datum/species/proc/handle_hair(mob/living/carbon/human/H, forced_colour) @@ -1394,7 +1403,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) if(radiation > RAD_MOB_MUTATE) if(prob(1)) to_chat(H, "You mutate!") - H.randmutb() + H.easy_randmut(NEGATIVE+MINOR_NEGATIVE) H.emote("gasp") H.domutcheck() @@ -1710,7 +1719,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) bloody = 1 var/turf/location = H.loc if(istype(location)) - H.bleed(totitemdamage) + H.add_splatter_floor(location) if(get_dist(user, H) <= 1) //people with TK won't get smeared with blood user.add_mob_blood(H) diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm index dfa1725026..6468bd1544 100644 --- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm @@ -23,6 +23,7 @@ exotic_bloodtype = "L" disliked_food = GRAIN | DAIRY liked_food = GROSS | MEAT + inert_mutation = FIREBREATH /datum/species/lizard/after_equip_job(datum/job/J, mob/living/carbon/human/H) H.grant_language(/datum/language/draconic) diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm index d2d4c6c658..7ccccd588d 100644 --- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm @@ -61,9 +61,9 @@ H.DefaultCombatKnockdown(100) H.visible_message("[H] writhes in pain as [H.p_their()] vacuoles boil.", "You writhe in pain as your vacuoles boil!", "You hear the crunching of leaves.") if(prob(80)) - H.randmutb() + H.easy_randmut(NEGATIVE+MINOR_NEGATIVE) else - H.randmutg() + H.easy_randmut(POSITIVE) H.domutcheck() else H.adjustFireLoss(rand(5,15)) diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index 24acccdd2e..50801e1c0d 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -122,9 +122,9 @@ update_inv_wear_mask() /mob/living/carbon/wear_mask_update(obj/item/clothing/C, toggle_off = 1) - if(C.tint || initial(C.tint)) + if(isclothing(C) && (C.tint || initial(C.tint))) update_tint() - update_inv_wear_mask() + return ..() //handle stuff to update when a mob equips/unequips a headgear. /mob/living/carbon/proc/head_update(obj/item/I, forced) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 639cfc40e2..4aae10c444 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -427,7 +427,6 @@ /mob/living/carbon/handle_mutations_and_radiation() if(dna && dna.temporary_mutations.len) - var/datum/mutation/human/HM for(var/mut in dna.temporary_mutations) if(dna.temporary_mutations[mut] < world.time) if(mut == UI_CHANGED) @@ -450,9 +449,9 @@ dna.previous.Remove("blood_type") dna.temporary_mutations.Remove(mut) continue - HM = GLOB.mutations_list[mut] - HM.force_lose(src) - dna.temporary_mutations.Remove(mut) + for(var/datum/mutation/human/HM in dna.mutations) + if(HM && HM.timed) + dna.remove_mutation(HM.type) radiation -= min(radiation, RAD_LOSS_PER_TICK) if(radiation > RAD_MOB_SAFE) diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index ef2f4b80c7..3d567b0eff 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -42,7 +42,7 @@ if(radiation > RAD_MOB_MUTATE) if(prob(1)) to_chat(src, "You mutate!") - randmutb() + easy_randmut(NEGATIVE+MINOR_NEGATIVE) emote("gasp") domutcheck() if(radiation > RAD_MOB_VOMIT && prob(RAD_MOB_VOMIT_PROB)) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index e48fc722cd..86b9826c12 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -43,7 +43,7 @@ /mob/living/carbon/monkey/ComponentInitialize() . = ..() - AddElement(/datum/element/mob_holder, "monkey", null, null, null, ITEM_SLOT_HEAD) + AddElement(/datum/element/mob_holder, worn_state = "monkey", inv_slots = ITEM_SLOT_HEAD) /mob/living/carbon/monkey/Destroy() diff --git a/code/modules/mob/living/silicon/pai/pai_shell.dm b/code/modules/mob/living/silicon/pai/pai_shell.dm index c6710141f9..63fb82082f 100644 --- a/code/modules/mob/living/silicon/pai/pai_shell.dm +++ b/code/modules/mob/living/silicon/pai/pai_shell.dm @@ -97,8 +97,7 @@ resist_a_rest(FALSE, TRUE) update_icon() if(possible_chassis[old_chassis]) - var/datum/element/mob_holder/M = SSdcs.GetElement(/datum/element/mob_holder, old_chassis, 'icons/mob/pai_item_head.dmi', 'icons/mob/pai_item_rh.dmi', 'icons/mob/pai_item_lh.dmi', ITEM_SLOT_HEAD) - M.Detach(src) + RemoveElement(/datum/element/mob_holder, old_chassis, 'icons/mob/pai_item_head.dmi', 'icons/mob/pai_item_rh.dmi', 'icons/mob/pai_item_lh.dmi', ITEM_SLOT_HEAD) if(possible_chassis[chassis]) AddElement(/datum/element/mob_holder, chassis, 'icons/mob/pai_item_head.dmi', 'icons/mob/pai_item_rh.dmi', 'icons/mob/pai_item_lh.dmi', ITEM_SLOT_HEAD) to_chat(src, "You switch your holochassis projection composite to [chassis]") diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index 46cdc755db..4bf8aa5e23 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -363,10 +363,8 @@ icon_dead = "old_corgi_dead" desc = "At a ripe old age of [record_age] Ian's not as spry as he used to be, but he'll always be the HoP's beloved corgi." //RIP turns_per_move = 20 - var/datum/element/mob_holder/ele = SSdcs.GetElement(/datum/element/mob_holder, held_icon) - if(ele) - ele.Detach(src) - AddElement(/datum/element/mob_holder, "old_corgi") + RemoveElement(/datum/element/mob_holder, held_icon) + AddElement(/datum/element/mob_holder, "old_corgi") /mob/living/simple_animal/pet/dog/corgi/Ian/Life() if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved) diff --git a/code/modules/mob/living/simple_animal/friendly/lizard.dm b/code/modules/mob/living/simple_animal/friendly/lizard.dm index dbcaed1ba2..9ae46f29e5 100644 --- a/code/modules/mob/living/simple_animal/friendly/lizard.dm +++ b/code/modules/mob/living/simple_animal/friendly/lizard.dm @@ -26,7 +26,7 @@ /mob/living/simple_animal/hostile/lizard/ComponentInitialize() . = ..() - AddElement(/datum/element/mob_holder, "lizard", null, null, null, ITEM_SLOT_HEAD) //you can hold lizards now. + AddElement(/datum/element/mob_holder, worn_state = "lizard", inv_slots = ITEM_SLOT_HEAD) //you can hold lizards now. /mob/living/simple_animal/hostile/lizard/CanAttack(atom/the_target)//Can we actually attack a possible target? if(see_invisible < the_target.invisibility)//Target's invisible to us, forget it diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index c5a4fa6e1e..370442d4c4 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -64,7 +64,7 @@ ..() /mob/living/simple_animal/mouse/handle_automated_action() - if(isbelly(loc)) + if(!isturf(loc)) return if(prob(chew_probability)) @@ -76,7 +76,7 @@ visible_message("[src] chews through the [C]. It's toast!") playsound(src, 'sound/effects/sparks2.ogg', 100, 1) C.deconstruct() - death(toast=1) + death(toast=TRUE) else C.deconstruct() visible_message("[src] chews through the [C].") diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index 83abde2fca..b50ebfe160 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -17,7 +17,7 @@ From these blood pools Bubblegum may summon slaughterlings - weak, low-damage mi When Bubblegum dies, it leaves behind a H.E.C.K. suit+helmet as well as a chest that can contain three things: 1. A spellblade that can slice off limbs at range 2. A bottle that, when activated, drives everyone nearby into a frenzy - 3. A contract that marks for death the chosen target + 3. A super double-barrel shotgun that shoots both shells at the same time. Difficulty: Hard diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 15937873e3..cc7744eee0 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -123,7 +123,7 @@ Difficulty: Very Hard if(ishuman(L)) var/mob/living/carbon/human/H = L if(H.mind) - if(H.mind.martial_art && prob(H.mind.martial_art.deflection_chance)) + if(istype(H.mind.martial_art, /datum/martial_art/the_sleeping_carp) & istype(H.mind.martial_art, /datum/martial_art/the_rising_bass)) . = TRUE /mob/living/simple_animal/hostile/megafauna/colossus/proc/alternating_dir_shots() diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm index 56d112237e..d940305080 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm @@ -84,10 +84,12 @@ pass_flags = PASSTABLE | PASSMOB //they shouldn't get stuck behind hivelords. density = FALSE del_on_death = 1 + var/swarming = FALSE /mob/living/simple_animal/hostile/asteroid/hivelordbrood/Initialize() . = ..() - AddComponent(/datum/component/swarming) //oh god not the bees + if(swarming) + AddComponent(/datum/component/swarming) //oh god not the bees addtimer(CALLBACK(src, .proc/death), 100) //Legion @@ -184,6 +186,7 @@ del_on_death = TRUE stat_attack = UNCONSCIOUS robust_searching = 1 + swarming = TRUE var/can_infest_dead = FALSE /mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/Life() diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm index 12379bce91..10abf460c6 100644 --- a/code/modules/mob/status_procs.dm +++ b/code/modules/mob/status_procs.dm @@ -19,9 +19,15 @@ /mob/proc/set_dizziness(amount) dizziness = max(amount, 0) -///Blind a mobs eyes by amount +/** + * Sets a mob's blindness to an amount if it was not above it already, similar to how status effects work + */ /mob/proc/blind_eyes(amount) - adjust_blindness(amount) + var/old_blind = eye_blind || HAS_TRAIT(src, TRAIT_BLIND) + eye_blind = max(eye_blind, amount) + var/new_blind = eye_blind || HAS_TRAIT(src, TRAIT_BLIND) + if(old_blind != new_blind) + update_blindness() /** * Adjust a mobs blindness by an amount diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 4b360df8c7..42aaa110c8 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -49,9 +49,8 @@ O.updateappearance(icon_update=0) if(tr_flags & TR_KEEPSE) - O.dna.struc_enzymes = dna.struc_enzymes - var/datum/mutation/human/race/R = GLOB.mutations_list[RACEMUT] - O.dna.struc_enzymes = R.set_se(O.dna.struc_enzymes, on=1)//we don't want to keep the race block inactive + O.dna.mutation_index = dna.mutation_index + O.dna.set_se(1, GET_INITIALIZED_MUTATION(RACEMUT)) if(suiciding) O.suiciding = suiciding @@ -208,9 +207,8 @@ O.name = O.real_name if(tr_flags & TR_KEEPSE) - O.dna.struc_enzymes = dna.struc_enzymes - var/datum/mutation/human/race/R = GLOB.mutations_list[RACEMUT] - O.dna.struc_enzymes = R.set_se(O.dna.struc_enzymes, on=0)//we don't want to keep the race block active + O.dna.mutation_index = dna.mutation_index + O.dna.set_se(0, GET_INITIALIZED_MUTATION(RACEMUT)) O.domutcheck() if(suiciding) diff --git a/code/modules/modular_computers/computers/item/tablet.dm b/code/modules/modular_computers/computers/item/tablet.dm index bc9d62acbe..a371e97ec6 100644 --- a/code/modules/modular_computers/computers/item/tablet.dm +++ b/code/modules/modular_computers/computers/item/tablet.dm @@ -24,11 +24,11 @@ /obj/item/modular_computer/tablet/syndicate_contract_uplink name = "contractor tablet" icon = 'icons/obj/contractor_tablet.dmi' - icon_state = "tablet-red" + icon_state = "tablet" icon_state_unpowered = "tablet" icon_state_powered = "tablet" icon_state_menu = "assign" w_class = WEIGHT_CLASS_SMALL slot_flags = ITEM_SLOT_ID | ITEM_SLOT_BELT comp_light_luminosity = 6.3 - has_variants = FALSE \ No newline at end of file + has_variants = FALSE diff --git a/code/modules/projectiles/boxes_magazines/internal/shotgun.dm b/code/modules/projectiles/boxes_magazines/internal/shotgun.dm index 09d056a5f2..eb2572187c 100644 --- a/code/modules/projectiles/boxes_magazines/internal/shotgun.dm +++ b/code/modules/projectiles/boxes_magazines/internal/shotgun.dm @@ -37,6 +37,10 @@ name = "double-barrel shotgun internal magazine" max_ammo = 2 +/obj/item/ammo_box/magazine/internal/shot/dual/heck + name = "heckgun internal magazine" + ammo_type = /obj/item/ammo_casing/shotgun/buckshot + /obj/item/ammo_box/magazine/internal/shot/improvised name = "improvised shotgun internal magazine" ammo_type = /obj/item/ammo_casing/shotgun/improvised diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index 0ff0c79f1e..39428275c8 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -39,7 +39,6 @@ magazine = AM if(oldmag) to_chat(user, "You perform a tactical reload on \the [src], replacing the magazine.") - oldmag.dropped() oldmag.forceMove(get_turf(src.loc)) oldmag.update_icon() else diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm index 571525d8f0..7f01db466f 100644 --- a/code/modules/projectiles/guns/ballistic/shotgun.dm +++ b/code/modules/projectiles/guns/ballistic/shotgun.dm @@ -171,7 +171,7 @@ pump() gun_type = type -/obj/item/gun/ballistic/shotgun/boltaction/enchanted/dropped() +/obj/item/gun/ballistic/shotgun/boltaction/enchanted/dropped(mob/user) ..() guns_left = 0 diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index 6cd567ce16..c5660624a2 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -34,7 +34,7 @@ righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi' ammo_type = list(/obj/item/ammo_casing/energy/kinetic/premium) -/obj/item/gun/energy/kinetic_accelerator/premiumka/dropped() +/obj/item/gun/energy/kinetic_accelerator/premiumka/dropped(mob/user) . = ..() if(!QDELING(src) && !holds_charge) // Put it on a delay because moving item from slot to hand @@ -137,7 +137,7 @@ if(!can_shoot()) attempt_reload() -/obj/item/gun/energy/kinetic_accelerator/dropped() +/obj/item/gun/energy/kinetic_accelerator/dropped(mob/user) . = ..() if(!QDELING(src) && !holds_charge) // Put it on a delay because moving item from slot to hand diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm index 098395e0d4..c295adde60 100644 --- a/code/modules/projectiles/guns/misc/beam_rifle.dm +++ b/code/modules/projectiles/guns/misc/beam_rifle.dm @@ -47,7 +47,7 @@ var/mob/current_user = null var/list/obj/effect/projectile/tracer/current_tracers - var/structure_piercing = 1 + var/structure_piercing = 0 var/structure_bleed_coeff = 0.7 var/wall_pierce_amount = 0 var/wall_devastate = 0 @@ -60,7 +60,7 @@ var/impact_structure_damage = 75 var/projectile_damage = 40 var/projectile_stun = 0 - var/projectile_setting_pierce = TRUE + var/projectile_setting_pierce = FALSE var/delay = 30 var/lastfire = 0 @@ -160,6 +160,9 @@ add_overlay(drained_overlay) /obj/item/gun/energy/beam_rifle/attack_self(mob/user) + if(!structure_piercing) + projectile_setting_pierce = FALSE + return projectile_setting_pierce = !projectile_setting_pierce to_chat(user, "You set \the [src] to [projectile_setting_pierce? "pierce":"impact"] mode.") aiming_beam() @@ -402,7 +405,7 @@ /obj/item/ammo_casing/energy/beam_rifle/hitscan projectile_type = /obj/item/projectile/beam/beam_rifle/hitscan select_name = "beam" - e_cost = 5000 + e_cost = 10000 fire_sound = 'sound/weapons/beam_sniper.ogg' /obj/item/projectile/beam/beam_rifle @@ -557,9 +560,4 @@ hitscan_light_color_override = "#99ff99" /obj/item/projectile/beam/beam_rifle/hitscan/aiming_beam/prehit(atom/target) - qdel(src) return FALSE - -/obj/item/projectile/beam/beam_rifle/hitscan/aiming_beam/on_hit() - qdel(src) - return BULLET_ACT_HIT diff --git a/code/modules/projectiles/projectile/energy/stun.dm b/code/modules/projectiles/projectile/energy/stun.dm index 3bb1b3794e..6ae6564671 100644 --- a/code/modules/projectiles/projectile/energy/stun.dm +++ b/code/modules/projectiles/projectile/energy/stun.dm @@ -27,7 +27,7 @@ C.IgniteMob() if(C.dna && C.dna.check_mutation(HULK)) C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk") - else if(tase_duration && (C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE)) + else if(tase_duration && (C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE) && !HAS_TRAIT(C, TRAIT_TASED_RESISTANCE)) C.apply_status_effect(strong_tase? STATUS_EFFECT_TASED : STATUS_EFFECT_TASED_WEAK, tase_duration) addtimer(CALLBACK(C, /mob/living/carbon.proc/do_jitter_animation, jitter), 5) diff --git a/code/modules/projectiles/projectile/special/temperature.dm b/code/modules/projectiles/projectile/special/temperature.dm index dae7d5f8b3..c17fd0a447 100644 --- a/code/modules/projectiles/projectile/special/temperature.dm +++ b/code/modules/projectiles/projectile/special/temperature.dm @@ -16,3 +16,8 @@ /obj/item/projectile/temp/hot name = "heat beam" temperature = 400 + +/obj/item/projectile/temp/cryo + name = "cryo beam" + range = 3 + temperature = -240 // Single slow shot reduces temp greatly \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index 04e7c0a74e..0b634ba2d8 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -171,9 +171,11 @@ /datum/reagent/drug/methamphetamine/on_mob_metabolize(mob/living/L) ..() L.ignore_slowdown(type) + ADD_TRAIT(L, TRAIT_TASED_RESISTANCE, type) /datum/reagent/drug/methamphetamine/on_mob_end_metabolize(mob/living/L) L.unignore_slowdown(type) + REMOVE_TRAIT(L, TRAIT_TASED_RESISTANCE, type) ..() /datum/reagent/drug/methamphetamine/on_mob_life(mob/living/carbon/M) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 4b2c1447c5..46002287dd 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -218,7 +218,8 @@ . = ..() if(iscarbon(M)) var/mob/living/carbon/patient = M - if(reac_volume >= 5 && HAS_TRAIT_FROM(patient, TRAIT_HUSK, "burn") && patient.getFireLoss() < THRESHOLD_UNHUSK) //One carp yields 12u rezadone. + var/vol = reac_volume + M.reagents.get_reagent_amount(/datum/reagent/medicine/rezadone) + if(vol >= 5 && HAS_TRAIT_FROM(patient, TRAIT_HUSK, "burn") && patient.getFireLoss() < THRESHOLD_UNHUSK) //One carp yields 12u rezadone. patient.cure_husk("burn") patient.visible_message("[patient]'s body rapidly absorbs moisture from the enviroment, taking on a more healthy appearance.") @@ -425,7 +426,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) overdose_threshold = 40 value = 6 -/datum/reagent/medicine/synthflesh/reaction_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1) +/datum/reagent/medicine/synthflesh/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) if(iscarbon(M)) if (M.stat == DEAD) show_message = 0 @@ -442,8 +443,9 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) 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) + var/vol = reac_volume + M.reagents.get_reagent_amount(/datum/reagent/medicine/synthflesh) //Has to be at less than THRESHOLD_UNHUSK burn damage and have 100 synthflesh before unhusking. Corpses dont metabolize. - if(HAS_TRAIT_FROM(M, TRAIT_HUSK, "burn") && M.getFireLoss() < THRESHOLD_UNHUSK && M.reagents.has_reagent(/datum/reagent/medicine/synthflesh, 100)) + if(HAS_TRAIT_FROM(M, TRAIT_HUSK, "burn") && M.getFireLoss() < THRESHOLD_UNHUSK && (vol > 100)) M.cure_husk("burn") M.visible_message("Most of [M]'s burnt off or charred flesh has been restored.") ..() @@ -957,7 +959,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) /datum/reagent/medicine/mutadone/on_mob_life(mob/living/carbon/M) M.jitteriness = 0 if(M.has_dna()) - M.dna.remove_all_mutations() + M.dna.remove_all_mutations(mutadone = TRUE) if(!QDELETED(M)) //We were a monkey, now a human ..() @@ -992,9 +994,11 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) /datum/reagent/medicine/stimulants/on_mob_metabolize(mob/living/L) ..() L.add_movespeed_modifier(type, update=TRUE, priority=100, multiplicative_slowdown=-0.5, blacklisted_movetypes=(FLYING|FLOATING)) + ADD_TRAIT(L, TRAIT_TASED_RESISTANCE, type) /datum/reagent/medicine/stimulants/on_mob_end_metabolize(mob/living/L) L.remove_movespeed_modifier(type) + REMOVE_TRAIT(L, TRAIT_TASED_RESISTANCE, type) ..() /datum/reagent/medicine/stimulants/on_mob_life(mob/living/carbon/M) @@ -1299,6 +1303,14 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) color = "#918e53" overdose_threshold = 30 +/datum/reagent/medicine/changelingadrenaline/on_mob_metabolize(mob/living/L) + ..() + ADD_TRAIT(L, TRAIT_TASED_RESISTANCE, type) + +/datum/reagent/medicine/changelingadrenaline/on_mob_end_metabolize(mob/living/L) + REMOVE_TRAIT(L, TRAIT_TASED_RESISTANCE, type) + ..() + /datum/reagent/medicine/changelingadrenaline/on_mob_life(mob/living/carbon/M as mob) M.AdjustUnconscious(-20, 0) M.AdjustAllImmobility(-20, 0) diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 025587bc2a..cfb0588f8f 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -40,9 +40,9 @@ if((method==VAPOR && prob(min(33, reac_volume))) || method==INGEST || method==PATCH || method==INJECT) M.randmuti() if(prob(98)) - M.randmutb() + M.easy_randmut(NEGATIVE+MINOR_NEGATIVE) else - M.randmutg() + M.easy_randmut(POSITIVE) M.updateappearance() M.domutcheck() ..() diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm index 57748acb1a..ce1940994d 100644 --- a/code/modules/reagents/chemistry/recipes/others.dm +++ b/code/modules/reagents/chemistry/recipes/others.dm @@ -75,6 +75,28 @@ for(var/i = 1, i <= multiplier, i++) new /obj/item/stack/sheet/mineral/gold(location) +/datum/chemical_reaction/uraniumsolidification + name = "Solid Uranium" + id = "soliduranium" + required_reagents = list(/datum/reagent/consumable/frostoil = 5, /datum/reagent/uranium = 20, /datum/reagent/bromine = 1) + mob_react = FALSE + +/datum/chemical_reaction/uraniumsolidification/on_reaction(datum/reagents/holder, multiplier) + var/location = get_turf(holder.my_atom) + for(var/i = 1, i <= multiplier, i++) + new /obj/item/stack/sheet/mineral/uranium(location) + +/datum/chemical_reaction/bluespacecrystalifaction + name = "Crystal Bluespace" + id = "crystalbluespace" + required_reagents = list(/datum/reagent/consumable/frostoil = 5, /datum/reagent/bluespace = 20, /datum/reagent/iron = 1) + mob_react = FALSE + +/datum/chemical_reaction/bluespacecrystalifaction/on_reaction(datum/reagents/holder, multiplier) + var/location = get_turf(holder.my_atom) + for(var/i = 1, i <= multiplier, i++) + new /obj/item/stack/sheet/bluespace_crystal(location) + /datum/chemical_reaction/capsaicincondensation name = "Capsaicincondensation" id = /datum/reagent/consumable/condensedcapsaicin diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 73d0c5eafa..170ff64138 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -28,7 +28,7 @@ Borg Hypospray var/list/datum/reagents/reagent_list = list() var/list/reagent_ids = list(/datum/reagent/medicine/dexalin, /datum/reagent/medicine/kelotane, /datum/reagent/medicine/bicaridine, /datum/reagent/medicine/antitoxin, - /datum/reagent/medicine/epinephrine, /datum/reagent/medicine/spaceacillin, /datum/reagent/medicine/salglu_solution, /datum/reagent/medicine/insulin) + /datum/reagent/medicine/epinephrine, /datum/reagent/medicine/spaceacillin, /datum/reagent/medicine/salglu_solution, /datum/reagent/medicine/insulin, /datum/reagent/medicine/potass_iodide) var/accepts_reagent_upgrades = TRUE //If upgrades can increase number of reagents dispensed. var/list/modes = list() //Basically the inverse of reagent_ids. Instead of having numbers as "keys" and strings as values it has strings as keys and numbers as values. //Used as list for input() in shakers. @@ -164,7 +164,7 @@ Borg Hypospray icon_state = "borghypo_s" charge_cost = 20 recharge_time = 2 - reagent_ids = list(/datum/reagent/medicine/syndicate_nanites, /datum/reagent/medicine/potass_iodide, /datum/reagent/medicine/morphine, /datum/reagent/medicine/insulin) + reagent_ids = list(/datum/reagent/medicine/syndicate_nanites, /datum/reagent/medicine/prussian_blue, /datum/reagent/medicine/morphine, /datum/reagent/medicine/insulin) bypass_protection = 1 accepts_reagent_upgrades = FALSE @@ -261,5 +261,5 @@ Borg Shaker /obj/item/reagent_containers/borghypo/epi name = "Stabilizer injector" desc = "An advanced chemical synthesizer and injection system, designed to stabilize patients." - reagent_ids = list(/datum/reagent/medicine/epinephrine, /datum/reagent/medicine/insulin) + reagent_ids = list(/datum/reagent/medicine/epinephrine, /datum/reagent/medicine/insulin, /datum/reagent/medicine/potass_iodide) accepts_reagent_upgrades = FALSE diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index c0d48301e1..6b3ba6fe28 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -162,6 +162,16 @@ category = list("Medical Designs") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL +/datum/design/genescanner + name = "Genetic Sequence Analyzer" + desc = "A handy hand-held analyzers for quickly determining mutations and collecting the full sequence." + id = "genescanner" + build_path = /obj/item/sequence_scanner + build_type = PROTOLATHE + materials = list(/datum/material/iron = 1000, /datum/material/glass = 500) + category = list("Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + /datum/design/healthanalyzer_advanced name = "Advanced Health Analyzer" desc = "A hand-held body scanner able to distinguish vital signs of the subject with high accuracy." diff --git a/code/modules/research/nanites/nanite_cloud_controller.dm b/code/modules/research/nanites/nanite_cloud_controller.dm index 0731d3067c..439d0c5750 100644 --- a/code/modules/research/nanites/nanite_cloud_controller.dm +++ b/code/modules/research/nanites/nanite_cloud_controller.dm @@ -48,7 +48,7 @@ return var/datum/nanite_cloud_backup/backup = new(src) - var/datum/component/nanites/cloud_copy = new(backup) + var/datum/component/nanites/cloud_copy = backup.AddComponent(/datum/component/nanites) backup.cloud_id = cloud_id backup.nanites = cloud_copy investigate_log("[key_name(user)] created a new nanite cloud backup with id #[cloud_id]", INVESTIGATE_NANITES) @@ -213,7 +213,7 @@ var/datum/component/nanites/nanites = backup.nanites var/datum/nanite_program/P = nanites.programs[text2num(params["program_id"])] var/datum/nanite_rule/rule = rule_template.make_rule(P) - + investigate_log("[key_name(usr)] added rule [rule.display()] to program [P.name] in cloud #[current_view]", INVESTIGATE_NANITES) . = TRUE if("remove_rule") @@ -224,7 +224,7 @@ var/datum/nanite_program/P = nanites.programs[text2num(params["program_id"])] var/datum/nanite_rule/rule = P.rules[text2num(params["rule_id"])] rule.remove() - + investigate_log("[key_name(usr)] removed rule [rule.display()] from program [P.name] in cloud #[current_view]", INVESTIGATE_NANITES) . = TRUE diff --git a/code/modules/research/nanites/nanite_programs/suppression.dm b/code/modules/research/nanites/nanite_programs/suppression.dm index dcc9521798..3b0d6d0d06 100644 --- a/code/modules/research/nanites/nanite_programs/suppression.dm +++ b/code/modules/research/nanites/nanite_programs/suppression.dm @@ -107,7 +107,7 @@ /datum/nanite_program/fake_death/enable_passive_effect() . = ..() host_mob.emote("deathgasp") - host_mob.fakedeath("nanites") + host_mob.fakedeath("nanites", TRUE) /datum/nanite_program/fake_death/disable_passive_effect() . = ..() diff --git a/code/modules/research/techweb/_techweb.dm b/code/modules/research/techweb/_techweb.dm index 9a55e53659..388fa3785c 100644 --- a/code/modules/research/techweb/_techweb.dm +++ b/code/modules/research/techweb/_techweb.dm @@ -20,6 +20,7 @@ var/largest_bomb_value = 0 var/organization = "Third-Party" //Organization name, used for display. var/list/last_bitcoins = list() //Current per-second production, used for display only. + var/list/discovered_mutations = list() //Mutations discovered by genetics, this way they are shared and cant be destroyed by destroying a single console var/list/tiers = list() //Assoc list, id = number, 1 is available, 2 is all reqs are 1, so on /datum/techweb/New() diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index 5c7b6b57d1..b0d95a87d7 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -71,7 +71,7 @@ display_name = "Biological Technology" description = "What makes us tick." //the MC, silly! prereq_ids = list("base") - design_ids = list("medicalkit", "chem_heater", "chem_master", "chem_dispenser", "sleeper", "vr_sleeper", "pandemic", "defibrillator", "defibmount", "operating", "soda_dispenser", "beer_dispenser", "healthanalyzer", "blood_bag", "bloodbankgen", "telescopiciv", "medspray") + design_ids = list("medicalkit", "chem_heater", "chem_master", "chem_dispenser", "sleeper", "vr_sleeper", "pandemic", "defibrillator", "defibmount", "operating", "soda_dispenser", "beer_dispenser", "healthanalyzer", "blood_bag", "bloodbankgen", "telescopiciv", "medspray","genescanner") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) /datum/techweb_node/adv_biotech diff --git a/code/modules/spells/spell_types/conjure.dm b/code/modules/spells/spell_types/conjure.dm index b34d4d1258..b609655526 100644 --- a/code/modules/spells/spell_types/conjure.dm +++ b/code/modules/spells/spell_types/conjure.dm @@ -80,11 +80,11 @@ school = "conjuration" charge_max = 150 cooldown_min = 10 + var/delete_old = TRUE /obj/effect/proc_holder/spell/targeted/conjure_item/cast(list/targets, mob/user = usr) - if (item && !QDELETED(item)) - qdel(item) - item = null + if (delete_old && item && !QDELETED(item)) + QDEL_NULL(item) else for(var/mob/living/carbon/C in targets) if(C.dropItemToGround(C.get_active_held_item())) diff --git a/code/modules/spells/spell_types/mime.dm b/code/modules/spells/spell_types/mime.dm index 2697bd3e1a..a3bb81ae55 100644 --- a/code/modules/spells/spell_types/mime.dm +++ b/code/modules/spells/spell_types/mime.dm @@ -128,6 +128,49 @@ invocation_type ="none" ..() +/obj/effect/proc_holder/spell/targeted/touch/mimerope + name = "Invisible Rope" + desc = "Form an invisible rope to tie people or trip people with." + school = "mime" + panel = "Mime" + invocation_type = "emote" + invocation_emote_self = "You start fabricate an invisible rope." + charge_max = 700 + sound = null + clothes_req = 0 + range = -1 + include_user = 1 + action_icon_state = "mime" + action_background_icon_state = "bg_mime" + hand_path = /obj/item/melee/touch_attack/mimerope + +/obj/effect/proc_holder/spell/targeted/touch/mimerope/Click() + if(usr && usr.mind) + if(!usr.mind.miming) + to_chat(usr, "You must dedicate yourself to silence first.") + return + if (usr.get_active_held_item()) + to_chat(usr, "Your hands must be free to create the invisible rope.") + return + invocation = "[usr.real_name] is twirling an invisible rope in [usr.p_their()] hands." + else + invocation_type ="none" + +/obj/effect/proc_holder/spell/targeted/touch/mimerope/cast(list/targets,mob/user = usr) + + usr.put_in_hands() + +/obj/item/melee/touch_attack/mimerope + item_state = "" + icon_state = "" + name = "mime rope" + desc = "An invisible rope." + +/obj/item/restraints/handcuffs/cable/mime + name = "mime restraints" + desc = "An invisible rope." + item_state = "" + icon_state = "" /obj/item/book/granter/spell/mimery_blockade spell = /obj/effect/proc_holder/spell/targeted/forcewall/mime diff --git a/code/modules/spells/spell_types/touch_attacks.dm b/code/modules/spells/spell_types/touch_attacks.dm index b0d348751f..a23e16cf88 100644 --- a/code/modules/spells/spell_types/touch_attacks.dm +++ b/code/modules/spells/spell_types/touch_attacks.dm @@ -1,6 +1,8 @@ /obj/effect/proc_holder/spell/targeted/touch var/hand_path = /obj/item/melee/touch_attack var/obj/item/melee/touch_attack/attached_hand = null + var/drawmessage = "You channel the power of the spell to your hand." + var/dropmessage = "You draw the power out of your hand." invocation_type = "none" //you scream on connecting, not summoning include_user = 1 range = -1 @@ -21,7 +23,7 @@ /obj/effect/proc_holder/spell/targeted/touch/cast(list/targets,mob/user = usr) if(!QDELETED(attached_hand)) remove_hand(TRUE) - to_chat(user, "You draw the power out of your hand.") + to_chat(user, "[dropmessage]") return for(var/mob/living/carbon/C in targets) @@ -43,7 +45,7 @@ remove_hand(TRUE) to_chat(user, "Your hands are full!") return FALSE - to_chat(user, "You channel the power of the spell to your hand.") + to_chat(user, "[drawmessage]") return TRUE diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm index f97bc1d7c3..276d4893de 100644 --- a/code/modules/surgery/bodyparts/dismemberment.dm +++ b/code/modules/surgery/bodyparts/dismemberment.dm @@ -103,6 +103,7 @@ for(var/obj/item/I in embedded_objects) embedded_objects -= I I.forceMove(src) + I.unembedded() if(!C.has_embedded_objects()) C.clear_alert("embeddedobject") SEND_SIGNAL(C, COMSIG_CLEAR_MOOD_EVENT, "embedded") @@ -112,7 +113,7 @@ for(var/X in C.dna.mutations) //some mutations require having specific limbs to be kept. var/datum/mutation/human/MT = X if(MT.limb_req && MT.limb_req == body_zone) - MT.force_lose(C) + C.dna.force_lose(MT) for(var/X in C.internal_organs) //internal organs inside the dismembered limb are dropped. var/obj/item/organ/O = X diff --git a/code/modules/surgery/bodyparts/helpers.dm b/code/modules/surgery/bodyparts/helpers.dm index eed8f62e10..aaca33685b 100644 --- a/code/modules/surgery/bodyparts/helpers.dm +++ b/code/modules/surgery/bodyparts/helpers.dm @@ -161,6 +161,7 @@ for(var/obj/item/I in L.embedded_objects) L.embedded_objects -= I I.forceMove(T) + I.unembedded() clear_alert("embeddedobject") SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "embedded") diff --git a/code/modules/surgery/remove_embedded_object.dm b/code/modules/surgery/remove_embedded_object.dm index 0c3a3b55a5..7d7cd2df63 100644 --- a/code/modules/surgery/remove_embedded_object.dm +++ b/code/modules/surgery/remove_embedded_object.dm @@ -25,6 +25,7 @@ objects++ I.forceMove(get_turf(H)) L.embedded_objects -= I + I.unembedded() if(!H.has_embedded_objects()) H.clear_alert("embeddedobject") SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "embedded") diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 52f6efd3df..bbfa186a48 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -1,4 +1,4 @@ -/proc/get_uplink_items(datum/game_mode/gamemode, allow_sales = TRUE, allow_restricted = TRUE) +/proc/get_uplink_items(datum/game_mode/gamemode, allow_sales = TRUE, allow_restricted = TRUE, other_filter = list()) var/list/filtered_uplink_items = GLOB.uplink_categories.Copy() // list of uplink categories without associated values. var/list/sale_items = list() @@ -18,7 +18,8 @@ continue if (I.restricted && !allow_restricted) continue - + if (I.type in other_filter) + continue LAZYSET(filtered_uplink_items[I.category], I.name, I) if(I.limited_stock < 0 && !I.cant_discount && I.item && I.cost > 1) diff --git a/code/modules/uplink/uplink_items/uplink_stealth.dm b/code/modules/uplink/uplink_items/uplink_stealth.dm index 0ad06e7418..80aba02e2e 100644 --- a/code/modules/uplink/uplink_items/uplink_stealth.dm +++ b/code/modules/uplink/uplink_items/uplink_stealth.dm @@ -48,7 +48,7 @@ /datum/uplink_item/stealthy_weapons/martialarts name = "Sleeping Carp Scroll" desc = "This scroll contains the secrets of an ancient martial arts technique. You will master unarmed combat, \ - deflecting all ranged weapon fire, but you also refuse to use dishonorable ranged weaponry." + gain skin as hard as steel and swat bullets from the air, but you also refuse to use dishonorable ranged weaponry." item = /obj/item/book/granter/martial/carp cost = 17 surplus = 0 diff --git a/config/config.txt b/config/config.txt index 1d987070dd..306d1d9a6d 100644 --- a/config/config.txt +++ b/config/config.txt @@ -185,12 +185,15 @@ VOTE_DELAY 6000 VOTE_PERIOD 600 ## autovote initial delay (deciseconds) before first automatic transfer vote call (default 120 minutes) +## Set to 0 to disable the subsystem altogether. VOTE_AUTOTRANSFER_INITIAL 72000 ## autovote delay (deciseconds) before sequential automatic transfer votes are called (default 30 minutes) VOTE_AUTOTRANSFER_INTERVAL 18000 -## autovote maximum votes until automatic transfer call (default 4) +## autovote maximum votes until automatic transfer call. (default 4) +## Set to 0 to force automatic crew transfer after the 'vote_autotransfer_initial' elapsed. +## Set to -1 to disable the maximum votes cap. VOTE_AUTOTRANSFER_MAXIMUM 4 ## prevents dead players from voting or starting votes diff --git a/html/blank.png b/html/blank.png new file mode 100644 index 0000000000..86c9630485 Binary files /dev/null and b/html/blank.png differ diff --git a/html/browser/scannernew.css b/html/browser/scannernew.css index 0e809a6760..6746a61a0d 100644 --- a/html/browser/scannernew.css +++ b/html/browser/scannernew.css @@ -16,3 +16,24 @@ float: left; } +img.selected +{ + border: 1px solid blue; +} +img.unselected +{ + border: 2px solid black; +} +div>table { + float: left; +} +td +{ + text-align: center; +} +a.clean +{ + background: none; + border: none; + marging: none; +} \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-10327.yml b/html/changelogs/AutoChangeLog-pr-10327.yml new file mode 100644 index 0000000000..3e43dbe1fd --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-10327.yml @@ -0,0 +1,4 @@ +author: "Seris02" +delete-after: True +changes: + - rscadd: "tg genetics" diff --git a/html/changelogs/AutoChangeLog-pr-11290.yml b/html/changelogs/AutoChangeLog-pr-11290.yml new file mode 100644 index 0000000000..726a8ee797 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11290.yml @@ -0,0 +1,4 @@ +author: "Putnam3145" +delete-after: True +changes: + - rscadd: "Traitor classes for traitors: a new way for traitors to have objectives assigned." diff --git a/html/changelogs/AutoChangeLog-pr-11307.yml b/html/changelogs/AutoChangeLog-pr-11307.yml new file mode 100644 index 0000000000..5b70dd7b0c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11307.yml @@ -0,0 +1,5 @@ +author: "kappa-sama" +delete-after: True +changes: + - balance: "removed (mostly aesthetic) requirement to become hulk" + - bugfix: "changed add to remove on crit" diff --git a/html/changelogs/AutoChangeLog-pr-11373.yml b/html/changelogs/AutoChangeLog-pr-11373.yml new file mode 100644 index 0000000000..f6b8401fce --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11373.yml @@ -0,0 +1,5 @@ +author: "kappa-sama" +delete-after: True +changes: + - rscadd: "a super combat shotgun that loads and fires 2 shells at a time" + - balance: "replaces bubblegum's blood contract drop with the super shotgun" diff --git a/html/changelogs/AutoChangeLog-pr-11406.yml b/html/changelogs/AutoChangeLog-pr-11406.yml new file mode 100644 index 0000000000..b46e346378 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11406.yml @@ -0,0 +1,4 @@ +author: "kevinz000" +delete-after: True +changes: + - rscadd: "Minimaps, accessible via a button on OOC." diff --git a/html/changelogs/AutoChangeLog-pr-11408.yml b/html/changelogs/AutoChangeLog-pr-11408.yml new file mode 100644 index 0000000000..d6cf71f643 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11408.yml @@ -0,0 +1,5 @@ +author: "necromanceranne" +delete-after: True +changes: + - rscadd: "Ports New Sleeping Carp" + - refactor: "Ports the martial arts refactors, which includes things like moving martial into the martial subfolder and renaming it _martial, and cleans up human_defense rising bass/sleeping carp exclusive code." diff --git a/html/changelogs/AutoChangeLog-pr-11409.yml b/html/changelogs/AutoChangeLog-pr-11409.yml new file mode 100644 index 0000000000..6da52ae2fa --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11409.yml @@ -0,0 +1,5 @@ +author: "necromanceranne" +delete-after: True +changes: + - balance: "Particle Defender is now a much more sane weapon." + - balance: "Tasers are no longer ignoring stimulants." diff --git a/html/changelogs/AutoChangeLog-pr-11410.yml b/html/changelogs/AutoChangeLog-pr-11410.yml new file mode 100644 index 0000000000..14a78979f4 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11410.yml @@ -0,0 +1,4 @@ +author: "necromanceranne" +delete-after: True +changes: + - bugfix: "Blood beam can't create harvesters out of mech pilots." diff --git a/html/changelogs/AutoChangeLog-pr-11414.yml b/html/changelogs/AutoChangeLog-pr-11414.yml new file mode 100644 index 0000000000..e323cf115e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11414.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Joining in as a positronic brain won't break the spawner menu anymore." diff --git a/html/changelogs/AutoChangeLog-pr-11416.yml b/html/changelogs/AutoChangeLog-pr-11416.yml new file mode 100644 index 0000000000..3a76a9b2f5 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11416.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "Soidifaction of and uranium can be done as well as making new bluespace shards" diff --git a/html/changelogs/AutoChangeLog-pr-11422.yml b/html/changelogs/AutoChangeLog-pr-11422.yml new file mode 100644 index 0000000000..085d767bcd --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11422.yml @@ -0,0 +1,5 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - balance: "Xeno and Fountain Hall will no longer spawn more then once" + - tweak: "Makes the game want to spawn in more then one tumor maybe" diff --git a/html/changelogs/AutoChangeLog-pr-11424.yml b/html/changelogs/AutoChangeLog-pr-11424.yml new file mode 100644 index 0000000000..2ab88177a4 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11424.yml @@ -0,0 +1,4 @@ +author: "necromanceranne" +delete-after: True +changes: + - code_imp: "Some minor fixes to fakedeath and a tg fix port." diff --git a/html/changelogs/AutoChangeLog-pr-11425.yml b/html/changelogs/AutoChangeLog-pr-11425.yml new file mode 100644 index 0000000000..82cf14d567 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11425.yml @@ -0,0 +1,4 @@ +author: "kevinz000" +delete-after: True +changes: + - bugfix: "synthflesh and rezadone now take total amounts of both applied and existing reagents rather than only existing and only applied respectively." diff --git a/html/changelogs/AutoChangeLog-pr-11429.yml b/html/changelogs/AutoChangeLog-pr-11429.yml new file mode 100644 index 0000000000..3562f3b130 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11429.yml @@ -0,0 +1,12 @@ +author: "Putnam" +delete-after: True +changes: + - tweak: "Swarmers, portal storm, wormholes are now controlled by dynamic." + - tweak: "Dynamic-controlled events can now have a minimum start time." + - balance: "Threatening meteors are more common (though still have pretty strict requirements)" + - balance: "Different storytellers now balance around different expected players-per-antag; default was 5, now intrigue/story/random have 7 and calm has 10." + - rscadd: "Clown ops is now available as a roundstart antag in dynamic." + - balance: "Sentient disease and revenant are now in the event pool rather than the antag pool (with the logic that they're both completely useless and unfun to play if people are actually playing against them)." + - rscadd: "A new formulation of extended was added to the storytellers; no antags, but still spending threat on events." + - bugfix: "Fixed a runtime in dynamic due to my misunderstanding pickweightAllowZero" + - rscdel: "Made conversion storyteller 0-weight-by-default." diff --git a/html/changelogs/AutoChangeLog-pr-11430.yml b/html/changelogs/AutoChangeLog-pr-11430.yml new file mode 100644 index 0000000000..9afe29f3ca --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11430.yml @@ -0,0 +1,4 @@ +author: "Putnam3145" +delete-after: True +changes: + - tweak: "Autotransfer vote now requires actual transfer votes to transfer." diff --git a/html/changelogs/AutoChangeLog-pr-11431.yml b/html/changelogs/AutoChangeLog-pr-11431.yml new file mode 100644 index 0000000000..f80f8c8585 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11431.yml @@ -0,0 +1,4 @@ +author: "Useroth" +delete-after: True +changes: + - bugfix: "contractor tablets spawned with invalid icon_state" diff --git a/html/changelogs/AutoChangeLog-pr-11432.yml b/html/changelogs/AutoChangeLog-pr-11432.yml new file mode 100644 index 0000000000..f0c0572ca3 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11432.yml @@ -0,0 +1,4 @@ +author: "kevinz000" +delete-after: True +changes: + - balance: "reverts bubblegum bloodling swarming." diff --git a/html/changelogs/AutoChangeLog-pr-11436.yml b/html/changelogs/AutoChangeLog-pr-11436.yml new file mode 100644 index 0000000000..26ddaa7f69 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11436.yml @@ -0,0 +1,4 @@ +author: "MrJWhit" +delete-after: True +changes: + - tweak: "Removed egun in every head locker, replaces RPD with air pump in science, fixes a computer in sec, moves hand teleporter, and removes decals under lockers." diff --git a/html/changelogs/AutoChangeLog-pr-11437.yml b/html/changelogs/AutoChangeLog-pr-11437.yml new file mode 100644 index 0000000000..4bb865e6f9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11437.yml @@ -0,0 +1,8 @@ +author: "keronshb" +delete-after: True +changes: + - balance: "blobs now receive a 50% cost refund on attacks that don't spread" + - balance: "reflector blobs are considerably tougher" + - bugfix: "fixed an integrity" + - bugfix: "attempting to turn a damaged strong blob into a reflector blob now refunds points" + - bugfix: "also fixes blob node camera jump (from another PR)" diff --git a/html/changelogs/AutoChangeLog-pr-11447.yml b/html/changelogs/AutoChangeLog-pr-11447.yml new file mode 100644 index 0000000000..4ada92210c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11447.yml @@ -0,0 +1,4 @@ +author: "spookydonut" +delete-after: True +changes: + - code_imp: "adds selective duplicate component mode" diff --git a/html/changelogs/AutoChangeLog-pr-11448.yml b/html/changelogs/AutoChangeLog-pr-11448.yml new file mode 100644 index 0000000000..de94aa1e0d --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11448.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "The autotransfer subsystem is slightly more modulable now." diff --git a/html/changelogs/AutoChangeLog-pr-11450.yml b/html/changelogs/AutoChangeLog-pr-11450.yml new file mode 100644 index 0000000000..748c1f94c2 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11450.yml @@ -0,0 +1,4 @@ +author: "zeroisthebiggay" +delete-after: True +changes: + - rscadd: "Space Fashion has discovered a new way to wear bandannas. With some simple minor adjustments and ties, bandannas can be made into fashionable neckerchiefs!" diff --git a/html/changelogs/AutoChangeLog-pr-11451.yml b/html/changelogs/AutoChangeLog-pr-11451.yml new file mode 100644 index 0000000000..bc3acb86ea --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11451.yml @@ -0,0 +1,4 @@ +author: "Putnam3145" +delete-after: True +changes: + - bugfix: "More dynamic fixes" diff --git a/html/changelogs/AutoChangeLog-pr-11452.yml b/html/changelogs/AutoChangeLog-pr-11452.yml new file mode 100644 index 0000000000..8ec140d5b0 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11452.yml @@ -0,0 +1,4 @@ +author: "Linzolle" +delete-after: True +changes: + - tweak: "cmo hypokit now holds the same amount of items as normal kits" diff --git a/html/changelogs/AutoChangeLog-pr-11453.yml b/html/changelogs/AutoChangeLog-pr-11453.yml new file mode 100644 index 0000000000..0113ea3dd6 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11453.yml @@ -0,0 +1,4 @@ +author: "necromanceranne" +delete-after: True +changes: + - bugfix: "Bleeding out all your blood from getting love tapped by a toolbox." diff --git a/html/changelogs/AutoChangeLog-pr-11455.yml b/html/changelogs/AutoChangeLog-pr-11455.yml new file mode 100644 index 0000000000..a54556673e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11455.yml @@ -0,0 +1,5 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - tweak: "Number of paper work in the crate \"freelance paperwork\" is half" + - code_imp: "A few cases were something their is unneeded copy past replaced with many 1 in spawns" diff --git a/html/changelogs/AutoChangeLog-pr-11456.yml b/html/changelogs/AutoChangeLog-pr-11456.yml new file mode 100644 index 0000000000..b5a9353d33 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11456.yml @@ -0,0 +1,4 @@ +author: "bunny232" +delete-after: True +changes: + - rscadd: "Box station captain office now has a standard issue renault" diff --git a/html/changelogs/AutoChangeLog-pr-11458.yml b/html/changelogs/AutoChangeLog-pr-11458.yml new file mode 100644 index 0000000000..14e8d7d650 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11458.yml @@ -0,0 +1,5 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "Potass Iodide has been fitted into standered borgs as well as medical ones. Upgraded hypos now have Prussian Blue as well." + - tweak: "Syndi borgs Potass Iodide has been swapped for Prussian Blue" diff --git a/html/changelogs/AutoChangeLog-pr-11460.yml b/html/changelogs/AutoChangeLog-pr-11460.yml new file mode 100644 index 0000000000..1c8fb3e3fa --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11460.yml @@ -0,0 +1,4 @@ +author: "Kraseo" +delete-after: True +changes: + - bugfix: "Mice don't chew on wires anymore while they're on your person." diff --git a/html/changelogs/AutoChangeLog-pr-11461.yml b/html/changelogs/AutoChangeLog-pr-11461.yml new file mode 100644 index 0000000000..547a2c58e1 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11461.yml @@ -0,0 +1,4 @@ +author: "Kraseo" +delete-after: True +changes: + - bugfix: "Bloodsucker heart theft objective now completes successfully." diff --git a/html/changelogs/AutoChangeLog-pr-11464.yml b/html/changelogs/AutoChangeLog-pr-11464.yml new file mode 100644 index 0000000000..cc59b44a30 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11464.yml @@ -0,0 +1,4 @@ +author: "Putnam3145" +delete-after: True +changes: + - bugfix: "Server-run votes aren't subject to vote cooldown" diff --git a/html/changelogs/AutoChangeLog-pr-11466.yml b/html/changelogs/AutoChangeLog-pr-11466.yml new file mode 100644 index 0000000000..c5d60c84c2 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11466.yml @@ -0,0 +1,4 @@ +author: "Seris02" +delete-after: True +changes: + - bugfix: "quirk blacklist fixing" diff --git a/html/changelogs/AutoChangeLog-pr-11467.yml b/html/changelogs/AutoChangeLog-pr-11467.yml new file mode 100644 index 0000000000..5b59fc2e7b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11467.yml @@ -0,0 +1,4 @@ +author: "Kraseo" +delete-after: True +changes: + - tweak: "Blacklists turret protected areas, the toxins test range, asteroid ruins, and solars from being valid dropoff locations for contracts." diff --git a/html/changelogs/AutoChangeLog-pr-11477.yml b/html/changelogs/AutoChangeLog-pr-11477.yml new file mode 100644 index 0000000000..dcbb8368a9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11477.yml @@ -0,0 +1,4 @@ +author: "kevinz000" +delete-after: True +changes: + - balance: "Beam rifles shot count 10 --> 5 and can no longer pierce. Also renders properly for reflections against blobs and some other things." diff --git a/html/dna_discovered.gif b/html/dna_discovered.gif new file mode 100644 index 0000000000..bc6b75f2f9 Binary files /dev/null and b/html/dna_discovered.gif differ diff --git a/html/dna_extra.gif b/html/dna_extra.gif new file mode 100644 index 0000000000..c92218a661 Binary files /dev/null and b/html/dna_extra.gif differ diff --git a/html/dna_undiscovered.gif b/html/dna_undiscovered.gif new file mode 100644 index 0000000000..a3c182a4a1 Binary files /dev/null and b/html/dna_undiscovered.gif differ diff --git a/icons/effects/genetics.dmi b/icons/effects/genetics.dmi index a9f5f433d5..373a9de623 100644 Binary files a/icons/effects/genetics.dmi and b/icons/effects/genetics.dmi differ diff --git a/icons/mob/actions/actions_genetic.dmi b/icons/mob/actions/actions_genetic.dmi new file mode 100644 index 0000000000..1b1bf8dc23 Binary files /dev/null and b/icons/mob/actions/actions_genetic.dmi differ diff --git a/icons/mob/actions/actions_spells.dmi b/icons/mob/actions/actions_spells.dmi index 072bfc8fe3..72e72ad6f3 100644 Binary files a/icons/mob/actions/actions_spells.dmi and b/icons/mob/actions/actions_spells.dmi differ diff --git a/icons/obj/chromosomes.dmi b/icons/obj/chromosomes.dmi new file mode 100644 index 0000000000..a8ff6186d8 Binary files /dev/null and b/icons/obj/chromosomes.dmi differ diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index 28fc29cd71..c58fb5d940 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/icons/obj/guns/projectile.dmi b/icons/obj/guns/projectile.dmi index f859e8b1e7..79045ac92b 100644 Binary files a/icons/obj/guns/projectile.dmi and b/icons/obj/guns/projectile.dmi differ diff --git a/modular_citadel/code/game/machinery/wishgranter.dm b/modular_citadel/code/game/machinery/wishgranter.dm index 48024a2228..7758c0d613 100644 --- a/modular_citadel/code/game/machinery/wishgranter.dm +++ b/modular_citadel/code/game/machinery/wishgranter.dm @@ -17,7 +17,7 @@ to_chat(user, "Your head pounds for a moment, before your vision clears. The Wish Granter, sensing the darkness in your heart, has given you limitless power, and it's all yours!") user.dna.add_mutation(HULK) user.dna.add_mutation(XRAY) - user.dna.add_mutation(COLDRES) + user.dna.add_mutation(SPACEMUT) user.dna.add_mutation(TK) user.next_move_modifier *= 0.5 //half the delay between attacks! to_chat(user, "Things around you feel slower!") diff --git a/modular_citadel/code/modules/mob/living/carbon/human/human.dm b/modular_citadel/code/modules/mob/living/carbon/human/human.dm index ee88fcb277..390cac3646 100644 --- a/modular_citadel/code/modules/mob/living/carbon/human/human.dm +++ b/modular_citadel/code/modules/mob/living/carbon/human/human.dm @@ -19,6 +19,7 @@ L.embedded_objects -= I L.receive_damage(I.embedding.embedded_unsafe_removal_pain_multiplier*I.w_class*painmul)//It hurts to rip it out, get surgery you dingus. And if you're ripping it out quickly via resist, it's gonna hurt even more I.forceMove(get_turf(src)) + I.unembedded() user.put_in_hands(I) user.emote("scream") user.visible_message("[user] rips [I] out of [user.p_their()] [L.name]!","You remove [I] from your [L.name].") diff --git a/modular_citadel/code/modules/projectiles/guns/pumpenergy.dm b/modular_citadel/code/modules/projectiles/guns/pumpenergy.dm index f7c0b343c3..0850a95c47 100644 --- a/modular_citadel/code/modules/projectiles/guns/pumpenergy.dm +++ b/modular_citadel/code/modules/projectiles/guns/pumpenergy.dm @@ -185,10 +185,13 @@ name = "electron blast" icon_state = "stunjectile" color = null - nodamage = 1 + nodamage = TRUE knockdown = 100 - stamina = 5 + knockdown_stamoverride = 0 + knockdown_stam_max = 0 + stamina = 18 stutter = 5 jitter = 20 hitsound = 'sound/weapons/taserhit.ogg' - range = 7 + range = 3 + strong_tase = FALSE diff --git a/tgstation.dme b/tgstation.dme old mode 100755 new mode 100644 index bd9b6284ed..a22e9ce28d --- a/tgstation.dme +++ b/tgstation.dme @@ -36,7 +36,6 @@ #include "code\__DEFINES\clockcult.dm" #include "code\__DEFINES\colors.dm" #include "code\__DEFINES\combat.dm" -#include "code\__DEFINES\components.dm" #include "code\__DEFINES\configuration.dm" #include "code\__DEFINES\construction.dm" #include "code\__DEFINES\contracts.dm" @@ -118,6 +117,9 @@ #include "code\__DEFINES\vv.dm" #include "code\__DEFINES\wall_dents.dm" #include "code\__DEFINES\wires.dm" +#include "code\__DEFINES\dcs\flags.dm" +#include "code\__DEFINES\dcs\helpers.dm" +#include "code\__DEFINES\dcs\signals.dm" #include "code\__HELPERS\_cit_helpers.dm" #include "code\__HELPERS\_lists.dm" #include "code\__HELPERS\_logging.dm" @@ -127,6 +129,7 @@ #include "code\__HELPERS\cmp.dm" #include "code\__HELPERS\custom_holoforms.dm" #include "code\__HELPERS\dates.dm" +#include "code\__HELPERS\dna.dm" #include "code\__HELPERS\donator_groupings.dm" #include "code\__HELPERS\files.dm" #include "code\__HELPERS\game.dm" @@ -268,6 +271,7 @@ #include "code\controllers\subsystem\mapping.dm" #include "code\controllers\subsystem\materials.dm" #include "code\controllers\subsystem\medals.dm" +#include "code\controllers\subsystem\minimaps.dm" #include "code\controllers\subsystem\minor_mapping.dm" #include "code\controllers\subsystem\mobs.dm" #include "code\controllers\subsystem\moods.dm" @@ -331,7 +335,6 @@ #include "code\datums\holocall.dm" #include "code\datums\hud.dm" #include "code\datums\map_config.dm" -#include "code\datums\martial.dm" #include "code\datums\mind.dm" #include "code\datums\mutable_appearance.dm" #include "code\datums\mutations.dm" @@ -515,6 +518,7 @@ #include "code\datums\looping_sounds\item_sounds.dm" #include "code\datums\looping_sounds\machinery_sounds.dm" #include "code\datums\looping_sounds\weather.dm" +#include "code\datums\martial\_martial.dm" #include "code\datums\martial\boxing.dm" #include "code\datums\martial\cqc.dm" #include "code\datums\martial\krav_maga.dm" @@ -533,11 +537,16 @@ #include "code\datums\mood_events\generic_positive_events.dm" #include "code\datums\mood_events\mood_event.dm" #include "code\datums\mood_events\needs_events.dm" +#include "code\datums\mutations\actions.dm" +#include "code\datums\mutations\antenna.dm" #include "code\datums\mutations\body.dm" #include "code\datums\mutations\chameleon.dm" -#include "code\datums\mutations\cold_resistance.dm" +#include "code\datums\mutations\cold.dm" +#include "code\datums\mutations\combined.dm" #include "code\datums\mutations\hulk.dm" +#include "code\datums\mutations\radioactive.dm" #include "code\datums\mutations\sight.dm" +#include "code\datums\mutations\space_adaptation.dm" #include "code\datums\mutations\speech.dm" #include "code\datums\mutations\telekinesis.dm" #include "code\datums\ruins\lavaland.dm" @@ -880,6 +889,7 @@ #include "code\game\objects\items\cardboard_cutouts.dm" #include "code\game\objects\items\cards_ids.dm" #include "code\game\objects\items\charter.dm" +#include "code\game\objects\items\chromosome.dm" #include "code\game\objects\items\chrono_eraser.dm" #include "code\game\objects\items\cigs_lighters.dm" #include "code\game\objects\items\clown_items.dm" @@ -1490,6 +1500,14 @@ #include "code\modules\antagonists\swarmer\swarmer_event.dm" #include "code\modules\antagonists\traitor\datum_traitor.dm" #include "code\modules\antagonists\traitor\syndicate_contract.dm" +#include "code\modules\antagonists\traitor\classes\ai.dm" +#include "code\modules\antagonists\traitor\classes\assassin.dm" +#include "code\modules\antagonists\traitor\classes\freeform.dm" +#include "code\modules\antagonists\traitor\classes\hijack.dm" +#include "code\modules\antagonists\traitor\classes\human.dm" +#include "code\modules\antagonists\traitor\classes\martyr.dm" +#include "code\modules\antagonists\traitor\classes\subterfuge.dm" +#include "code\modules\antagonists\traitor\classes\traitor_class.dm" #include "code\modules\antagonists\traitor\equipment\contractor.dm" #include "code\modules\antagonists\traitor\equipment\Malf_Modules.dm" #include "code\modules\antagonists\traitor\IAA\internal_affairs.dm" @@ -1673,6 +1691,7 @@ #include "code\modules\client\verbs\aooc.dm" #include "code\modules\client\verbs\etips.dm" #include "code\modules\client\verbs\looc.dm" +#include "code\modules\client\verbs\minimap.dm" #include "code\modules\client\verbs\ooc.dm" #include "code\modules\client\verbs\ping.dm" #include "code\modules\client\verbs\suicide.dm" @@ -2069,6 +2088,7 @@ #include "code\modules\lighting\lighting_turf.dm" #include "code\modules\mapping\dmm_suite.dm" #include "code\modules\mapping\map_template.dm" +#include "code\modules\mapping\minimaps.dm" #include "code\modules\mapping\preloader.dm" #include "code\modules\mapping\reader.dm" #include "code\modules\mapping\ruins.dm" diff --git a/tgui/package-lock.json b/tgui/package-lock.json index 470e5c2d23..d2567aba36 100644 --- a/tgui/package-lock.json +++ b/tgui/package-lock.json @@ -5480,9 +5480,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-rIqbOrKb8GJmx/5bc2M0QchhUouMXSpd1RTclXsB41JdL+VtnojfaJR+h7F9k18/4kHUsBFgk80Uk+q569vjPA==" }, "mixin-deep": { "version": "1.3.2", diff --git a/tgui/package.json b/tgui/package.json index dd81c3b318..85d47ecfe7 100644 --- a/tgui/package.json +++ b/tgui/package.json @@ -35,7 +35,7 @@ "html5shiv": "3.7.3", "ie8": "0.8.1", "lodash": "^4.17.15", - "minimist": "1.2.0", + "minimist": "1.2.2", "paths-js": "0.4.10", "pleeease-filters": "2.0.0", "postcss": "7.0.18",