From f6921291632ec875d10fefde8e07f5fb1d760c0f Mon Sep 17 00:00:00 2001 From: Therealdoooc213 Date: Fri, 29 Nov 2024 01:29:18 +0800 Subject: [PATCH 01/49] Toilet direction fixes, bathroom changes. (#11932) * yeaah * meta --- _maps/map_files/BoxStation/BoxStation.dmm | 10 ++-- _maps/map_files/CorgStation/CorgStation.dmm | 2 - .../map_files/Deltastation/DeltaStation2.dmm | 38 ++++++--------- _maps/map_files/EchoStation/EchoStation.dmm | 18 +++---- _maps/map_files/FlandStation/FlandStation.dmm | 18 +++---- _maps/map_files/KiloStation/KiloStation.dmm | 10 ++-- _maps/map_files/MetaStation/MetaStation.dmm | 48 ++++++++----------- 7 files changed, 64 insertions(+), 80 deletions(-) diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm index b87ba1499ed4a..347535d43cc9f 100644 --- a/_maps/map_files/BoxStation/BoxStation.dmm +++ b/_maps/map_files/BoxStation/BoxStation.dmm @@ -4243,12 +4243,12 @@ /turf/open/floor/plating, /area/maintenance/port) "aZt" = ( -/obj/structure/toilet{ - pixel_y = 8 - }, /obj/machinery/light/small{ dir = 8 }, +/obj/structure/toilet{ + dir = 4 + }, /turf/open/floor/iron/freezer, /area/crew_quarters/toilet/locker) "aZv" = ( @@ -35009,13 +35009,15 @@ /turf/open/floor/plating, /area/maintenance/starboard) "kCr" = ( -/obj/structure/toilet, /obj/machinery/status_display/door_timer{ id = "cell"; name = "Solitary confinement timer"; pixel_y = 32 }, /obj/machinery/camera/directional/west, +/obj/structure/toilet{ + dir = 4 + }, /turf/open/floor/iron/tech, /area/security/prison/shielded) "kCJ" = ( diff --git a/_maps/map_files/CorgStation/CorgStation.dmm b/_maps/map_files/CorgStation/CorgStation.dmm index 1023d7e472dc3..4fa2a4d792e2e 100644 --- a/_maps/map_files/CorgStation/CorgStation.dmm +++ b/_maps/map_files/CorgStation/CorgStation.dmm @@ -11808,7 +11808,6 @@ /obj/structure/mirror{ pixel_x = 28 }, -/obj/machinery/camera/directional/east, /turf/open/floor/iron/white, /area/crew_quarters/toilet) "dJE" = ( @@ -39173,7 +39172,6 @@ /area/hallway/primary/central) "myE" = ( /obj/machinery/airalarm/directional/south, -/obj/machinery/camera/directional/south, /turf/open/floor/iron/white, /area/crew_quarters/toilet) "myH" = ( diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 04e68fe7c0881..c21e103cbb22f 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -4246,38 +4246,38 @@ "aAm" = ( /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/vomit/old, -/obj/structure/toilet{ - dir = 8 - }, /obj/machinery/newscaster{ pixel_x = -32 }, /obj/machinery/light/small, +/obj/structure/toilet{ + dir = 1 + }, /turf/open/floor/plating, /area/crew_quarters/toilet/auxiliary) "aAn" = ( /obj/effect/decal/cleanable/dirt, -/obj/structure/toilet{ - dir = 8 - }, /obj/machinery/newscaster{ pixel_x = -32 }, /obj/machinery/light/small, /obj/effect/turf_decal/bot, +/obj/structure/toilet{ + dir = 1 + }, /turf/open/floor/iron, /area/crew_quarters/toilet/auxiliary) "aAo" = ( /obj/effect/decal/cleanable/dirt, -/obj/structure/toilet{ - dir = 8 - }, /obj/machinery/newscaster{ pixel_x = -32 }, /obj/machinery/light/small, /obj/effect/landmark/start/assistant, /obj/effect/turf_decal/bot, +/obj/structure/toilet{ + dir = 1 + }, /turf/open/floor/iron, /area/crew_quarters/toilet/auxiliary) "aAp" = ( @@ -21456,27 +21456,27 @@ /area/crew_quarters/toilet/restrooms) "cIb" = ( /obj/effect/decal/cleanable/dirt, -/obj/structure/toilet{ - dir = 8 - }, /obj/machinery/newscaster{ pixel_x = -32 }, /obj/machinery/light/small, /obj/effect/turf_decal/bot, +/obj/structure/toilet{ + dir = 1 + }, /turf/open/floor/iron, /area/crew_quarters/toilet/restrooms) "cIc" = ( /obj/effect/decal/cleanable/dirt, -/obj/structure/toilet{ - dir = 8 - }, /obj/machinery/newscaster{ pixel_x = -32 }, /obj/machinery/light/small, /obj/effect/landmark/start/assistant, /obj/effect/turf_decal/bot, +/obj/structure/toilet{ + dir = 1 + }, /turf/open/floor/iron, /area/crew_quarters/toilet/restrooms) "cId" = ( @@ -31358,10 +31358,6 @@ /area/security/prison) "ekz" = ( /obj/item/kirbyplants/random, -/obj/machinery/camera/directional/north{ - c_tag = "Auxiliary Restroom"; - name = "restroom camera" - }, /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2{ dir = 4 }, @@ -42246,10 +42242,6 @@ /obj/structure/cable/yellow{ icon_state = "0-2" }, -/obj/machinery/camera/directional/north{ - c_tag = "Primary Restroom"; - name = "restroom camera" - }, /obj/machinery/power/apc/auto_name/directional/north, /obj/effect/turf_decal/tile/neutral{ dir = 1 diff --git a/_maps/map_files/EchoStation/EchoStation.dmm b/_maps/map_files/EchoStation/EchoStation.dmm index d18607d0676c8..0135d3308f926 100644 --- a/_maps/map_files/EchoStation/EchoStation.dmm +++ b/_maps/map_files/EchoStation/EchoStation.dmm @@ -29145,10 +29145,6 @@ /turf/open/floor/wood/broken, /area/library/abandoned) "oxd" = ( -/obj/structure/toilet{ - pixel_x = -1; - pixel_y = 6 - }, /obj/machinery/button/door{ id = "Toilet 2"; name = "Toilet Bolt Control"; @@ -29159,6 +29155,11 @@ /obj/effect/decal/cleanable/dirt/dust, /obj/machinery/light/small, /obj/machinery/newscaster/directional/east, +/obj/structure/toilet{ + dir = 8; + pixel_x = -1; + pixel_y = 6 + }, /turf/open/floor/iron/techmaint/planetary, /area/hallway/primary/fore) "oxj" = ( @@ -44049,10 +44050,6 @@ /turf/open/floor/plating, /area/quartermaster/storage) "vXe" = ( -/obj/structure/toilet{ - pixel_x = -1; - pixel_y = 6 - }, /obj/machinery/button/door{ id = "Toilet 1"; name = "Toilet Bolt Control"; @@ -44061,6 +44058,11 @@ specialfunctions = 4 }, /obj/machinery/light/small, +/obj/structure/toilet{ + dir = 8; + pixel_x = -1; + pixel_y = 6 + }, /turf/open/floor/iron/techmaint/planetary, /area/hallway/primary/fore) "vXg" = ( diff --git a/_maps/map_files/FlandStation/FlandStation.dmm b/_maps/map_files/FlandStation/FlandStation.dmm index 7fe81bb27318e..846372a48fe1d 100644 --- a/_maps/map_files/FlandStation/FlandStation.dmm +++ b/_maps/map_files/FlandStation/FlandStation.dmm @@ -28098,9 +28098,6 @@ /turf/open/floor/iron/tech, /area/bridge) "hgA" = ( -/obj/structure/toilet{ - pixel_y = 8 - }, /obj/machinery/light/small{ dir = 8 }, @@ -28115,6 +28112,9 @@ /obj/machinery/newscaster{ pixel_y = -28 }, +/obj/structure/toilet{ + dir = 4 + }, /turf/open/floor/iron/freezer, /area/crew_quarters/toilet/restrooms) "hgB" = ( @@ -46657,9 +46657,6 @@ /turf/open/floor/iron/dark, /area/storage/primary) "lNe" = ( -/obj/structure/toilet{ - pixel_y = 8 - }, /obj/machinery/light/small{ dir = 8 }, @@ -46673,6 +46670,9 @@ /obj/machinery/newscaster{ pixel_y = -28 }, +/obj/structure/toilet{ + dir = 4 + }, /turf/open/floor/iron/freezer, /area/crew_quarters/toilet/restrooms) "lNt" = ( @@ -53698,9 +53698,6 @@ /turf/open/floor/iron, /area/medical/break_room) "nGN" = ( -/obj/structure/toilet{ - pixel_y = 8 - }, /obj/machinery/light/small{ dir = 8 }, @@ -53715,6 +53712,9 @@ /obj/machinery/newscaster{ pixel_y = -28 }, +/obj/structure/toilet{ + dir = 4 + }, /turf/open/floor/iron/freezer, /area/crew_quarters/toilet/restrooms) "nGO" = ( diff --git a/_maps/map_files/KiloStation/KiloStation.dmm b/_maps/map_files/KiloStation/KiloStation.dmm index 0fa19ccdd5f49..f6703df89aec3 100644 --- a/_maps/map_files/KiloStation/KiloStation.dmm +++ b/_maps/map_files/KiloStation/KiloStation.dmm @@ -46008,10 +46008,6 @@ name = "Restrooms APC"; pixel_y = -24 }, -/obj/machinery/camera/directional/south{ - c_tag = "Restrooms"; - name = "recreation camera" - }, /obj/structure/disposalpipe/segment{ dir = 4 }, @@ -82227,9 +82223,6 @@ /turf/open/floor/iron, /area/hallway/primary/starboard) "ylX" = ( -/obj/structure/toilet{ - dir = 8 - }, /obj/structure/mirror{ pixel_x = -28 }, @@ -82257,6 +82250,9 @@ pixel_y = -8 }, /obj/effect/landmark/start/assistant, +/obj/structure/toilet{ + dir = 1 + }, /turf/open/floor/iron/showroomfloor, /area/crew_quarters/toilet/restrooms) diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 7c2811765f642..aac17a7ef0c3d 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -16743,9 +16743,6 @@ /turf/open/floor/iron/white, /area/medical/virology) "cot" = ( -/obj/structure/toilet{ - pixel_y = 8 - }, /obj/machinery/light/small{ dir = 8 }, @@ -16760,6 +16757,9 @@ specialfunctions = 4 }, /obj/effect/landmark/start/assistant, +/obj/structure/toilet{ + dir = 4 + }, /turf/open/floor/iron/freezer, /area/crew_quarters/toilet/restrooms) "cow" = ( @@ -20030,9 +20030,6 @@ /turf/open/floor/iron, /area/hallway/primary/central) "cUA" = ( -/obj/structure/toilet{ - pixel_y = 8 - }, /obj/machinery/light/small{ dir = 4 }, @@ -20046,6 +20043,9 @@ /obj/machinery/newscaster{ pixel_y = -32 }, +/obj/structure/toilet{ + dir = 8 + }, /turf/open/floor/iron, /area/crew_quarters/toilet/auxiliary) "cUL" = ( @@ -31997,9 +31997,6 @@ /turf/open/floor/iron, /area/hallway/primary/aft) "hfX" = ( -/obj/structure/toilet{ - pixel_y = 8 - }, /obj/machinery/light/small{ dir = 8 }, @@ -32014,6 +32011,9 @@ pixel_x = -25; specialfunctions = 4 }, +/obj/structure/toilet{ + dir = 4 + }, /turf/open/floor/iron/freezer, /area/crew_quarters/toilet/restrooms) "hgr" = ( @@ -37012,9 +37012,6 @@ dir = 4; pixel_x = -24 }, -/obj/machinery/camera/directional/west{ - c_tag = "Restrooms" - }, /turf/open/floor/iron/freezer, /area/crew_quarters/toilet/restrooms) "iUh" = ( @@ -45170,13 +45167,13 @@ /turf/open/floor/plating, /area/maintenance/aft) "lZZ" = ( -/obj/structure/toilet{ - dir = 8 - }, /obj/machinery/light/small, /obj/machinery/newscaster{ pixel_x = -32 }, +/obj/structure/toilet{ + dir = 1 + }, /turf/open/floor/iron, /area/medical/break_room) "maH" = ( @@ -53800,9 +53797,6 @@ /turf/open/floor/iron, /area/gateway) "pgu" = ( -/obj/structure/toilet{ - pixel_y = 8 - }, /obj/machinery/light/small{ dir = 4 }, @@ -53816,6 +53810,9 @@ /obj/machinery/newscaster{ pixel_y = -32 }, +/obj/structure/toilet{ + dir = 8 + }, /turf/open/floor/iron, /area/crew_quarters/toilet/auxiliary) "pgA" = ( @@ -60501,9 +60498,6 @@ /area/crew_quarters/heads/hop) "rFe" = ( /obj/machinery/light/small, -/obj/machinery/camera/directional/west{ - c_tag = "Auxilary Restrooms" - }, /turf/open/floor/plating, /area/crew_quarters/toilet/auxiliary) "rFh" = ( @@ -60657,9 +60651,6 @@ /turf/open/floor/engine, /area/science/xenobiology) "rIr" = ( -/obj/structure/toilet{ - dir = 4 - }, /obj/machinery/light/small{ dir = 4 }, @@ -60674,6 +60665,9 @@ specialfunctions = 4 }, /obj/effect/landmark/start/assistant, +/obj/structure/toilet{ + dir = 1 + }, /turf/open/floor/iron/freezer, /area/crew_quarters/toilet/restrooms) "rIV" = ( @@ -76880,9 +76874,6 @@ /turf/open/floor/plating, /area/maintenance/department/medical/central) "xwS" = ( -/obj/structure/toilet{ - pixel_y = 8 - }, /obj/machinery/light/small{ dir = 8 }, @@ -76897,6 +76888,9 @@ pixel_x = -25; specialfunctions = 4 }, +/obj/structure/toilet{ + dir = 4 + }, /turf/open/floor/iron/freezer, /area/crew_quarters/toilet/restrooms) "xxc" = ( From badb35045b90330f7fbc5266eba543f731abe379 Mon Sep 17 00:00:00 2001 From: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:38:02 -0600 Subject: [PATCH 02/49] Automatic changelog generation for PR #11932 [ci skip] --- html/changelogs/AutoChangeLog-pr-11932.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-11932.yml diff --git a/html/changelogs/AutoChangeLog-pr-11932.yml b/html/changelogs/AutoChangeLog-pr-11932.yml new file mode 100644 index 0000000000000..5f6cbe87ee2e6 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11932.yml @@ -0,0 +1,5 @@ +author: Therealdoooc213 +delete-after: true +changes: + - bugfix: toilets face the right way now + - tweak: bathrooms no longer spawn with cameras From e1d164459248e2b50f5a15c533e4ad2a060b89ce Mon Sep 17 00:00:00 2001 From: RDS88-beeman <66409077+RDS88-beeman@users.noreply.github.com> Date: Thu, 28 Nov 2024 17:30:41 +0000 Subject: [PATCH 03/49] Update cat_butcher.dm (#11898) --- code/modules/mob/living/simple_animal/hostile/cat_butcher.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm b/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm index bcc21f0e9ab6b..5cfd76035d47b 100644 --- a/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm +++ b/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm @@ -60,7 +60,7 @@ var/obj/item/organ/tail/cat/newtail = new newtail.Insert(L) return - else if(!L.has_trauma_type(/datum/brain_trauma/severe/pacifism) && L.getorgan(/obj/item/organ/ears/cat) && L.getorgan(/obj/item/organ/tail/cat)) //still does damage. This also lacks a Stat check- felinids beware. + else if(!L.has_trauma_type(/datum/brain_trauma/severe/pacifism) && L.getorgan(/obj/item/organ/ears/cat) && L.getorgan(/obj/item/organ/tail/cat) && L.stat) //still does damage. visible_message("[src] drills a hole in [L]'s skull!", "You pacify [L]. Another successful creation.") if(L.stat) L.emote("scream") From 4eb2ffbf88fa6ac624c15de842860ca687cf68ef Mon Sep 17 00:00:00 2001 From: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:52:36 -0600 Subject: [PATCH 04/49] Automatic changelog generation for PR #11898 [ci skip] --- html/changelogs/AutoChangeLog-pr-11898.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-11898.yml diff --git a/html/changelogs/AutoChangeLog-pr-11898.yml b/html/changelogs/AutoChangeLog-pr-11898.yml new file mode 100644 index 0000000000000..36c53fbbfcb0b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11898.yml @@ -0,0 +1,5 @@ +author: RDS88-beeman +delete-after: true +changes: + - balance: The cat surgeon can no longer extendo-grip around blocks to pacify conscious + felinids. From d8efad1c03ed77b77da7fdc364f7023cfb185ae5 Mon Sep 17 00:00:00 2001 From: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Thu, 28 Nov 2024 18:04:18 +0000 Subject: [PATCH 05/49] Automatic changelog compile [ci skip] --- html/changelog.html | 9 +++++++++ html/changelogs/.all_changelog.yml | 6 ++++++ html/changelogs/AutoChangeLog-pr-11898.yml | 5 ----- html/changelogs/AutoChangeLog-pr-11932.yml | 5 ----- 4 files changed, 15 insertions(+), 10 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-11898.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11932.yml diff --git a/html/changelog.html b/html/changelog.html index 9e2c5f19d0ea1..965c3cd47c6e1 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -57,6 +57,15 @@

28 November 2024

+

RDS88-beeman updated:

+ +

Therealdoooc213 updated:

+

Tsar-Salat updated:

GoonStation 13 Development Team From c2aae523f0d18d9f4f73f0d3bd276c29ff7d93ad Mon Sep 17 00:00:00 2001 From: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Sat, 30 Nov 2024 00:14:12 +0000 Subject: [PATCH 07/49] Automatic changelog compile [ci skip] --- html/changelog.html | 69 --------------------------------------------- 1 file changed, 69 deletions(-) diff --git a/html/changelog.html b/html/changelog.html index c5313d083a2d4..07ffcdfa8effc 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -969,75 +969,6 @@

rkz, Mothblocks, jacklecroy, kierany9, itseasytosee updated:<
  • Adds a stamina indicator hud
  • fixes 'ghost' item overlays
  • - -

    28 September 2024

    -

    Aramix updated:

    - -

    HowToLoLu updated:

    - -

    Mothblocks, ktlwjec updated:

    - -

    PestoVerde322 updated:

    - -

    PowerfulBacon updated:

    - -

    Therealdoooc updated:

    - -

    XeonMations updated:

    - -

    ktlwjec updated:

    - -

    mystery3525 updated:

    - -

    rkz, GoldenAlpharex, Haukeschauemann updated:

    - -

    rkz, jlsnow301, Jacquerel, Mothblocks updated:

    - -

    rkz, tralezab, coiax updated:

    - GoonStation 13 Development Team From 4180bfbc115858ab5a75ccbe57cddc682ae3d676 Mon Sep 17 00:00:00 2001 From: Therealdoooc213 Date: Sat, 30 Nov 2024 17:50:34 +0800 Subject: [PATCH 08/49] yeah (#11956) --- code/game/objects/structures/reflector.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/structures/reflector.dm b/code/game/objects/structures/reflector.dm index d36251a9f3001..f5ad2451ef83c 100644 --- a/code/game/objects/structures/reflector.dm +++ b/code/game/objects/structures/reflector.dm @@ -242,7 +242,7 @@ anchored = TRUE /obj/structure/reflector/box/auto_reflect(obj/projectile/P) - P.set_angle(rotation_angle) + P.set_angle_centered(rotation_angle) return ..() /obj/structure/reflector/ex_act() From 62f24ad093ad13ed9a7616ccdf987f0d066397c9 Mon Sep 17 00:00:00 2001 From: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Sat, 30 Nov 2024 03:59:10 -0600 Subject: [PATCH 09/49] Automatic changelog generation for PR #11956 [ci skip] --- html/changelogs/AutoChangeLog-pr-11956.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-11956.yml diff --git a/html/changelogs/AutoChangeLog-pr-11956.yml b/html/changelogs/AutoChangeLog-pr-11956.yml new file mode 100644 index 0000000000000..34f09ee84271e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11956.yml @@ -0,0 +1,4 @@ +author: Therealdoooc213 +delete-after: true +changes: + - bugfix: emitters fire correctly now From b86d99011afd93ca8198a759e7dd73ca8cdecbb4 Mon Sep 17 00:00:00 2001 From: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Sat, 30 Nov 2024 10:06:59 +0000 Subject: [PATCH 10/49] Automatic changelog compile [ci skip] --- html/changelog.html | 6 ++++++ html/changelogs/.all_changelog.yml | 3 +++ html/changelogs/AutoChangeLog-pr-11956.yml | 4 ---- 3 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-11956.yml diff --git a/html/changelog.html b/html/changelog.html index 07ffcdfa8effc..d668cc7e4021a 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,12 @@ -->
    +

    30 November 2024

    +

    Therealdoooc213 updated:

    +
      +
    • emitters fire correctly now
    • +
    +

    28 November 2024

    RDS88-beeman updated:

      diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index b7b4ace0a673f..8c280e03e49ca 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -45088,3 +45088,6 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. - tweak: bathrooms no longer spawn with cameras Tsar-Salat: - code_imp: fix duplicate waterbottle typepath +2024-11-30: + Therealdoooc213: + - bugfix: emitters fire correctly now diff --git a/html/changelogs/AutoChangeLog-pr-11956.yml b/html/changelogs/AutoChangeLog-pr-11956.yml deleted file mode 100644 index 34f09ee84271e..0000000000000 --- a/html/changelogs/AutoChangeLog-pr-11956.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: Therealdoooc213 -delete-after: true -changes: - - bugfix: emitters fire correctly now From 4d51a932d2d0ebca6168f2809a3ff56672ed94e9 Mon Sep 17 00:00:00 2001 From: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Date: Sat, 30 Nov 2024 04:51:41 -0500 Subject: [PATCH 11/49] Refactors ebows and kpa's to the same parent (#11939) * recharging energy weps * that too * oops --- _maps/RuinGeneration/17x17_charliecrew.dmm | 2 +- _maps/shuttles/hunter/hunter_bounty.dmm | 2 +- beestation.dme | 1 + code/game/objects/items/storage/belt.dm | 2 +- .../game/objects/items/storage/uplink_kits.dm | 2 +- .../role_preference/role_antagonists.dm | 2 +- code/modules/clothing/outfits/standard.dm | 2 +- code/modules/clothing/spacesuits/hardsuit.dm | 8 +- code/modules/clothing/suits/cloaks.dm | 2 +- code/modules/clothing/suits/wintercoats.dm | 2 +- code/modules/jobs/job_types/shaft_miner.dm | 4 +- .../modules/mining/equipment/explorer_gear.dm | 4 +- code/modules/mining/machine_vending.dm | 2 +- code/modules/mining/mine_items.dm | 2 +- code/modules/mining/minebot.dm | 2 +- .../mob/living/silicon/robot/robot_modules.dm | 2 +- code/modules/projectiles/gun.dm | 2 +- .../guns/energy/kinetic_accelerator.dm | 166 +++++------------- .../projectiles/guns/energy/recharge.dm | 147 ++++++++++++++++ .../projectiles/guns/energy/special.dm | 44 ----- .../research/designs/weapon_designs.dm | 2 +- .../spells/spell_types/rightandwrong.dm | 4 +- code/modules/uplink/uplink_items.dm | 4 +- 23 files changed, 221 insertions(+), 189 deletions(-) create mode 100644 code/modules/projectiles/guns/energy/recharge.dm diff --git a/_maps/RuinGeneration/17x17_charliecrew.dmm b/_maps/RuinGeneration/17x17_charliecrew.dmm index c51fd1c848505..d21194279512e 100644 --- a/_maps/RuinGeneration/17x17_charliecrew.dmm +++ b/_maps/RuinGeneration/17x17_charliecrew.dmm @@ -116,7 +116,7 @@ /turf/open/floor/iron, /area/ruin/unpowered) "hQ" = ( -/obj/item/gun/energy/kinetic_accelerator, +/obj/item/gun/energy/recharge/kinetic_accelerator, /obj/structure/rack, /obj/effect/turf_decal/tile/purple, /turf/open/floor/iron/white, diff --git a/_maps/shuttles/hunter/hunter_bounty.dmm b/_maps/shuttles/hunter/hunter_bounty.dmm index 30b300768d265..b59efb7fe7381 100644 --- a/_maps/shuttles/hunter/hunter_bounty.dmm +++ b/_maps/shuttles/hunter/hunter_bounty.dmm @@ -68,7 +68,7 @@ }, /obj/item/gun/energy/e_gun/mini, /obj/item/gun/energy/e_gun/mini, -/obj/item/gun/energy/kinetic_accelerator/crossbow/large{ +/obj/item/gun/energy/recharge/ebow/large{ pixel_y = -8; pin = /obj/item/firing_pin }, diff --git a/beestation.dme b/beestation.dme index 0bf66503a6aec..91f6f964e1b09 100644 --- a/beestation.dme +++ b/beestation.dme @@ -3622,6 +3622,7 @@ #include "code\modules\projectiles\guns\energy\laser_gatling.dm" #include "code\modules\projectiles\guns\energy\mounted.dm" #include "code\modules\projectiles\guns\energy\pulse.dm" +#include "code\modules\projectiles\guns\energy\recharge.dm" #include "code\modules\projectiles\guns\energy\special.dm" #include "code\modules\projectiles\guns\energy\stun.dm" #include "code\modules\projectiles\guns\magic\staff.dm" diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index ac463a578ca7e..455251c530167 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -468,7 +468,7 @@ /obj/item/skeleton_key, /obj/item/discovery_scanner, /obj/item/gun/energy/e_gun/mini/exploration, - /obj/item/gun/energy/kinetic_accelerator, + /obj/item/gun/energy/recharge/kinetic_accelerator, /obj/item/gun/energy/plasmacutter, /obj/item/grenade/exploration, /obj/item/exploration_detonator, diff --git a/code/game/objects/items/storage/uplink_kits.dm b/code/game/objects/items/storage/uplink_kits.dm index bfde721929f7c..83c65bd81ca00 100644 --- a/code/game/objects/items/storage/uplink_kits.dm +++ b/code/game/objects/items/storage/uplink_kits.dm @@ -32,7 +32,7 @@ new /obj/item/chameleon(src) // 7 tc if("stealth") - new /obj/item/gun/energy/kinetic_accelerator/crossbow(src) + new /obj/item/gun/energy/recharge/ebow(src) new /obj/item/pen/sleepy(src) new /obj/item/healthanalyzer/rad_laser(src) new /obj/item/chameleon(src) diff --git a/code/modules/antagonists/role_preference/role_antagonists.dm b/code/modules/antagonists/role_preference/role_antagonists.dm index 55c885ceb53a0..44111cecfddfe 100644 --- a/code/modules/antagonists/role_preference/role_antagonists.dm +++ b/code/modules/antagonists/role_preference/role_antagonists.dm @@ -32,7 +32,7 @@ gloves = /obj/item/clothing/gloves/combat mask = /obj/item/clothing/mask/gas l_hand = /obj/item/melee/transforming/energy/sword - r_hand = /obj/item/gun/energy/kinetic_accelerator/crossbow + r_hand = /obj/item/gun/energy/recharge/ebow /datum/outfit/traitor/post_equip(mob/living/carbon/human/H, visualsOnly) var/obj/item/melee/transforming/energy/sword/sword = locate() in H.held_items diff --git a/code/modules/clothing/outfits/standard.dm b/code/modules/clothing/outfits/standard.dm index 1d21dce3b330b..c215d0e44b4a2 100644 --- a/code/modules/clothing/outfits/standard.dm +++ b/code/modules/clothing/outfits/standard.dm @@ -219,7 +219,7 @@ qdel(briefcase_item) for(var/i = 3 to 0 step -1) SEND_SIGNAL(sec_briefcase, COMSIG_TRY_STORAGE_INSERT, new /obj/item/stack/spacecash/c1000, null, TRUE, TRUE) - SEND_SIGNAL(sec_briefcase, COMSIG_TRY_STORAGE_INSERT, new /obj/item/gun/energy/kinetic_accelerator/crossbow, null, TRUE, TRUE) + SEND_SIGNAL(sec_briefcase, COMSIG_TRY_STORAGE_INSERT, new /obj/item/gun/energy/recharge/ebow, null, TRUE, TRUE) SEND_SIGNAL(sec_briefcase, COMSIG_TRY_STORAGE_INSERT, new /obj/item/gun/ballistic/revolver/mateba, null, TRUE, TRUE) SEND_SIGNAL(sec_briefcase, COMSIG_TRY_STORAGE_INSERT, new /obj/item/ammo_box/a357, null, TRUE, TRUE) SEND_SIGNAL(sec_briefcase, COMSIG_TRY_STORAGE_INSERT, new /obj/item/grenade/plastic/x4, null, TRUE, TRUE) diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 2a17d4a2f90a0..bb3793fd174d5 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -351,7 +351,7 @@ heat_protection = HEAD armor = list(MELEE = 30, BULLET = 5, LASER = 10, ENERGY = 15, BOMB = 50, BIO = 100, RAD = 50, FIRE = 50, ACID = 75, STAMINA = 40, BLEED = 70) light_range = 7 - allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/recharge/kinetic_accelerator) high_pressure_multiplier = 0.6 /obj/item/clothing/head/helmet/space/hardsuit/mining/Initialize(mapload) @@ -386,7 +386,7 @@ heat_protection = HEAD armor = list(MELEE = 35, BULLET = 15, LASER = 20, ENERGY = 10, BOMB = 50, BIO = 100, RAD = 50, FIRE = 50, ACID = 75, STAMINA = 20, BLEED = 70) light_range = 6 - allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/recharge/kinetic_accelerator) actions_types = list( /datum/action/item_action/toggle_helmet_light, /datum/action/item_action/toggle_beacon_hud/explorer @@ -888,7 +888,7 @@ icon_state = "hardsuit0-ancient" item_state = "anc_helm" armor = list(MELEE = 30, BULLET = 5, LASER = 5, ENERGY = 10, BOMB = 50, BIO = 100, RAD = 100, FIRE = 100, ACID = 75, STAMINA = 30, BLEED = 70) - allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/gun/energy/plasmacutter, /obj/item/gun/energy/plasmacutter/adv, /obj/item/gun/energy/laser/retro, /obj/item/gun/energy/laser/retro/old, /obj/item/gun/energy/e_gun/old) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/recharge/kinetic_accelerator, /obj/item/gun/energy/plasmacutter, /obj/item/gun/energy/plasmacutter/adv, /obj/item/gun/energy/laser/retro, /obj/item/gun/energy/laser/retro/old, /obj/item/gun/energy/e_gun/old) hardsuit_type = "ancient" resistance_flags = FIRE_PROOF @@ -898,7 +898,7 @@ icon_state = "hardsuit-ancient" item_state = "anc_hardsuit" armor = list(MELEE = 30, BULLET = 5, LASER = 5, ENERGY = 10, BOMB = 50, BIO = 100, RAD = 100, FIRE = 100, ACID = 75, STAMINA = 30, BLEED = 70) - allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/storage/bag/ore, /obj/item/pickaxe, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/gun/energy/laser/retro, /obj/item/gun/energy/laser/retro/old, /obj/item/gun/energy/e_gun/old) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/storage/bag/ore, /obj/item/pickaxe, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/recharge/kinetic_accelerator, /obj/item/gun/energy/laser/retro, /obj/item/gun/energy/laser/retro/old, /obj/item/gun/energy/e_gun/old) slowdown = 3 helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ancient resistance_flags = FIRE_PROOF diff --git a/code/modules/clothing/suits/cloaks.dm b/code/modules/clothing/suits/cloaks.dm index 2e2214d96b77f..cd1322e2543bb 100644 --- a/code/modules/clothing/suits/cloaks.dm +++ b/code/modules/clothing/suits/cloaks.dm @@ -81,7 +81,7 @@ name = "drake armour" icon_state = "dragon" desc = "A suit of armour fashioned from the remains of an ash drake." - allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe, /obj/item/spear) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/recharge/kinetic_accelerator, /obj/item/pickaxe, /obj/item/spear) armor = list(MELEE = 70, BULLET = 30, LASER = 50, ENERGY = 40, BOMB = 70, BIO = 60, RAD = 50, FIRE = 100, ACID = 100, STAMINA = 30, BLEED = 50) hoodtype = /obj/item/clothing/head/hooded/cloakhood/drake heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS diff --git a/code/modules/clothing/suits/wintercoats.dm b/code/modules/clothing/suits/wintercoats.dm index 7a65f42337de7..5423c6961e8fa 100644 --- a/code/modules/clothing/suits/wintercoats.dm +++ b/code/modules/clothing/suits/wintercoats.dm @@ -362,7 +362,7 @@ /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, - /obj/item/gun/energy/kinetic_accelerator, + /obj/item/gun/energy/recharge/kinetic_accelerator, /obj/item/reagent_containers/cup/glass/bottle, /obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, diff --git a/code/modules/jobs/job_types/shaft_miner.dm b/code/modules/jobs/job_types/shaft_miner.dm index 1c3ad34cdf10c..c22955627c696 100644 --- a/code/modules/jobs/job_types/shaft_miner.dm +++ b/code/modules/jobs/job_types/shaft_miner.dm @@ -52,7 +52,7 @@ duffelbag = /obj/item/storage/backpack/duffelbag box = /obj/item/storage/box/survival/mining - chameleon_extras = /obj/item/gun/energy/kinetic_accelerator + chameleon_extras = /obj/item/gun/energy/recharge/kinetic_accelerator /datum/outfit/job/miner/equipped name = "Shaft Miner (Equipment)" @@ -66,7 +66,7 @@ /obj/item/knife/combat/survival=1, /obj/item/mining_voucher=1, /obj/item/t_scanner/adv_mining_scanner/lesser=1, - /obj/item/gun/energy/kinetic_accelerator=1,\ + /obj/item/gun/energy/recharge/kinetic_accelerator=1,\ /obj/item/stack/marker_beacon/ten=1) /datum/outfit/job/miner/equipped/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm index 080ee5fad139e..467d6464a9af5 100644 --- a/code/modules/mining/equipment/explorer_gear.dm +++ b/code/modules/mining/equipment/explorer_gear.dm @@ -19,7 +19,7 @@ /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, - /obj/item/gun/energy/kinetic_accelerator, + /obj/item/gun/energy/recharge/kinetic_accelerator, /obj/item/pickaxe ) resistance_flags = FIRE_PROOF @@ -84,7 +84,7 @@ resistance_flags = FIRE_PROOF | LAVA_PROOF slowdown = 0 armor = list(MELEE = 70, BULLET = 40, LASER = 20, ENERGY = 20, BOMB = 50, BIO = 100, RAD = 100, FIRE = 100, ACID = 100, STAMINA = 40, BLEED = 50) - allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/recharge/kinetic_accelerator, /obj/item/pickaxe) high_pressure_multiplier = 0.6 /obj/item/clothing/suit/space/hostile_environment/Initialize(mapload) diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index 85c8da179e38d..319673f7c94c4 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -157,7 +157,7 @@ icon_deny = "mining-deny" prize_list = list( //if you add something to this, please, for the love of god, sort it by price/type. use tabs and not spaces. //Direct mining tools go here - new /datum/data/vendor_equipment("Proto-Kinetic Accelerator", /obj/item/gun/energy/kinetic_accelerator, 500), + new /datum/data/vendor_equipment("Proto-Kinetic Accelerator", /obj/item/gun/energy/recharge/kinetic_accelerator, 500), new /datum/data/vendor_equipment("Proto-Kinetic Crusher", /obj/item/kinetic_crusher, 800), new /datum/data/vendor_equipment("Mining Conscription Kit", /obj/item/storage/backpack/duffelbag/mining_conscript, 1000), new /datum/data/vendor_equipment("Plasma Cutter", /obj/item/gun/energy/plasmacutter, 2000), diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 63cb84d979023..7b92133cf8d0c 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -63,7 +63,7 @@ new /obj/item/storage/bag/plants(src) new /obj/item/storage/bag/ore(src) new /obj/item/t_scanner/adv_mining_scanner/lesser(src) - new /obj/item/gun/energy/kinetic_accelerator(src) + new /obj/item/gun/energy/recharge/kinetic_accelerator(src) new /obj/item/clothing/glasses/meson(src) new /obj/item/survivalcapsule(src) new /obj/item/assault_pod/mining(src) diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm index 8d203c326d6e2..22541a75e7d9d 100644 --- a/code/modules/mining/minebot.dm +++ b/code/modules/mining/minebot.dm @@ -53,7 +53,7 @@ var/mode = MODE_MINING /// What mode the minebot is in var/mining_enabled = FALSE /// Whether or not the minebot will mine new ores while in mining mode. var/list/installed_upgrades /// A list of all the minebot's installed upgrades - var/obj/item/gun/energy/kinetic_accelerator/minebot/stored_pka /// The minebot's stored PKA + var/obj/item/gun/energy/recharge/kinetic_accelerator/minebot/stored_pka /// The minebot's stored PKA var/obj/item/gun/energy/plasmacutter/stored_cutter /// The minebot's stored plasma cutter var/obj/item/pickaxe/drill/stored_drill /// The minebot's stored drill var/obj/item/t_scanner/adv_mining_scanner/stored_scanner /// The minebot's stored mining scanner diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 3a3cd3f151ba2..3e15fb60590f4 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -592,7 +592,7 @@ /obj/item/weldingtool/cyborg/mini, /obj/item/extinguisher/mini, /obj/item/storage/bag/sheetsnatcher/borg, - /obj/item/gun/energy/kinetic_accelerator/cyborg, + /obj/item/gun/energy/recharge/kinetic_accelerator/cyborg, /obj/item/gps/cyborg, /obj/item/stack/marker_beacon) emag_modules = list(/obj/item/borg/stun) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index b98d0f1e51171..a122e86690b80 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -231,7 +231,7 @@ return loc != user ? TRUE : FALSE /obj/item/gun/proc/shoot_with_empty_chamber(mob/living/user as mob|obj) - balloon_alert(user, "[src] clicks.") + balloon_alert_to_viewers("*click*") playsound(src, dry_fire_sound, 30, TRUE) /obj/item/gun/proc/fire_sounds() diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index 4311e4548f739..ab643adb8de73 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -1,37 +1,28 @@ -/obj/item/gun/energy/kinetic_accelerator +/obj/item/gun/energy/recharge/kinetic_accelerator name = "proto-kinetic accelerator" desc = "A self recharging, ranged mining tool that does increased damage in low pressure." - automatic_charge_overlays = FALSE icon_state = "kineticgun" item_state = "kineticgun" ammo_type = list(/obj/item/ammo_casing/energy/kinetic) - cell_type = /obj/item/stock_parts/cell/emproof item_flags = NONE obj_flags = UNIQUE_RENAME weapon_weight = WEAPON_LIGHT - automatic_charge_overlays = FALSE - var/overheat_time = 16 - var/holds_charge = FALSE - var/unique_frequency = FALSE // modified by KA modkits - var/overheat = FALSE can_bayonet = TRUE knife_x_offset = 20 knife_y_offset = 12 has_weapon_slowdown = FALSE - + var/mob/holder var/max_mod_capacity = 100 var/list/modkits = list() - var/recharge_timerid - -/obj/item/gun/energy/kinetic_accelerator/add_seclight_point() +/obj/item/gun/energy/recharge/kinetic_accelerator/add_seclight_point() AddComponent(/datum/component/seclite_attachable, \ light_overlay_icon = 'icons/obj/guns/flashlights.dmi', \ light_overlay = "flight", \ overlay_x = 15, \ overlay_y = 9) -/obj/item/gun/energy/kinetic_accelerator/examine(mob/user) +/obj/item/gun/energy/recharge/kinetic_accelerator/examine(mob/user) . = ..() if(max_mod_capacity) . += "[get_remaining_mod_capacity()]% mod capacity remaining." @@ -39,7 +30,7 @@ var/obj/item/borg/upgrade/modkit/M = A . += "[icon2html(M, user)] There is \a [M] installed, using [M.cost]% capacity." -/obj/item/gun/energy/kinetic_accelerator/crowbar_act(mob/living/user, obj/item/I) +/obj/item/gun/energy/recharge/kinetic_accelerator/crowbar_act(mob/living/user, obj/item/I) . = TRUE if(modkits.len) to_chat(user, "You pry the modifications out.") @@ -49,113 +40,44 @@ else to_chat(user, "There are no modifications currently installed.") -/obj/item/gun/energy/kinetic_accelerator/attackby(obj/item/I, mob/user) +/obj/item/gun/energy/recharge/kinetic_accelerator/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/borg/upgrade/modkit)) var/obj/item/borg/upgrade/modkit/MK = I MK.install(src, user) else ..() -/obj/item/gun/energy/kinetic_accelerator/proc/get_remaining_mod_capacity() +/obj/item/gun/energy/recharge/kinetic_accelerator/proc/get_remaining_mod_capacity() var/current_capacity_used = 0 for(var/A in get_modkits()) var/obj/item/borg/upgrade/modkit/M = A current_capacity_used += M.cost return max_mod_capacity - current_capacity_used -/obj/item/gun/energy/kinetic_accelerator/proc/get_modkits() +/obj/item/gun/energy/recharge/kinetic_accelerator/proc/get_modkits() . = list() for(var/A in modkits) . += A -/obj/item/gun/energy/kinetic_accelerator/proc/modify_projectile(obj/projectile/kinetic/K) +/obj/item/gun/energy/recharge/kinetic_accelerator/proc/modify_projectile(obj/projectile/kinetic/K) K.kinetic_gun = src //do something special on-hit, easy! for(var/A in get_modkits()) var/obj/item/borg/upgrade/modkit/M = A M.modify_projectile(K) -/obj/item/gun/energy/kinetic_accelerator/cyborg +/obj/item/gun/energy/recharge/kinetic_accelerator/cyborg holds_charge = TRUE unique_frequency = TRUE requires_wielding = FALSE max_mod_capacity = 80 -/obj/item/gun/energy/kinetic_accelerator/minebot +/obj/item/gun/energy/recharge/kinetic_accelerator/minebot trigger_guard = TRIGGER_GUARD_ALLOW_ALL - overheat_time = 20 + recharge_time = 2 SECONDS holds_charge = TRUE requires_wielding = FALSE unique_frequency = TRUE -/obj/item/gun/energy/kinetic_accelerator/Initialize(mapload) - . = ..() - if(!holds_charge) - empty() - -/obj/item/gun/energy/kinetic_accelerator/shoot_live_shot(mob/user) - . = ..() - attempt_reload(user) - -/obj/item/gun/energy/kinetic_accelerator/equipped(mob/user) - . = ..() - if(!can_shoot()) - attempt_reload(user) - -/obj/item/gun/energy/kinetic_accelerator/dropped() - ..() - if(!QDELING(src) && !holds_charge) - // Put it on a delay because moving item from slot to hand - // calls dropped(). - addtimer(CALLBACK(src, PROC_REF(empty_if_not_held)), 2) - -/obj/item/gun/energy/kinetic_accelerator/proc/empty_if_not_held() - if(!ismob(loc)) - empty() - -/obj/item/gun/energy/kinetic_accelerator/proc/empty() - if(cell) - cell.use(cell.charge) - update_icon() - -/obj/item/gun/energy/kinetic_accelerator/proc/attempt_reload(mob/user, recharge_time) - if(!cell) - return - if(overheat) - return - if(!recharge_time) - recharge_time = overheat_time - overheat = TRUE - - var/carried = 0 - if(!unique_frequency) - for(var/obj/item/gun/energy/kinetic_accelerator/K in loc.GetAllContents()) - if(!K.unique_frequency) - carried++ - - carried = max(carried, 1) - else - carried = 1 - - // If we are overriding a crosshair, then clear it - if (deltimer(recharge_timerid)) - user?.client.clear_cooldown_cursor() - recharge_timerid = addtimer(CALLBACK(src, PROC_REF(reload)), recharge_time * carried, TIMER_STOPPABLE) - user?.client?.give_cooldown_cursor(recharge_time * carried + 1) - -/obj/item/gun/energy/kinetic_accelerator/proc/reload() - cell.give(cell.maxcharge) - if(!suppressed) - playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1) - else - to_chat(loc, "[src] silently charges up.") - update_icon() - overheat = FALSE - -/obj/item/gun/energy/kinetic_accelerator/update_overlays() - . = ..() - if(!can_shoot()) - . += "[icon_state]_empty" - //Casing /obj/item/ammo_casing/energy/kinetic projectile_type = /obj/projectile/kinetic @@ -165,8 +87,8 @@ /obj/item/ammo_casing/energy/kinetic/ready_proj(atom/target, mob/living/user, quiet, zone_override = "") ..() - if(loc && istype(loc, /obj/item/gun/energy/kinetic_accelerator)) - var/obj/item/gun/energy/kinetic_accelerator/KA = loc + if(loc && istype(loc, /obj/item/gun/energy/recharge/kinetic_accelerator)) + var/obj/item/gun/energy/recharge/kinetic_accelerator/KA = loc KA.modify_projectile(BB) //Projectiles @@ -181,7 +103,7 @@ var/pressure_decrease_active = FALSE var/pressure_decrease = 0.5 - var/obj/item/gun/energy/kinetic_accelerator/kinetic_gun + var/obj/item/gun/energy/recharge/kinetic_accelerator/kinetic_gun /obj/projectile/kinetic/Destroy() kinetic_gun = null @@ -252,7 +174,7 @@ . += "Occupies [cost]% of mod capacity." /obj/item/borg/upgrade/modkit/attackby(obj/item/A, mob/user) - if(istype(A, /obj/item/gun/energy/kinetic_accelerator) && !issilicon(user)) + if(istype(A, /obj/item/gun/energy/recharge/kinetic_accelerator) && !issilicon(user)) install(A, user) else ..() @@ -260,10 +182,10 @@ /obj/item/borg/upgrade/modkit/action(mob/living/silicon/robot/R) . = ..() if (.) - for(var/obj/item/gun/energy/kinetic_accelerator/cyborg/H in R.module.modules) + for(var/obj/item/gun/energy/recharge/kinetic_accelerator/cyborg/H in R.module.modules) return install(H, usr) -/obj/item/borg/upgrade/modkit/proc/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user) +/obj/item/borg/upgrade/modkit/proc/install(obj/item/gun/energy/recharge/kinetic_accelerator/KA, mob/user) . = TRUE if(restricted_mod_type) var/restricted_mod_count = 0 @@ -290,10 +212,10 @@ /obj/item/borg/upgrade/modkit/deactivate(mob/living/silicon/robot/R, user = usr) . = ..() if (.) - for(var/obj/item/gun/energy/kinetic_accelerator/cyborg/KA in R.module.modules) + for(var/obj/item/gun/energy/recharge/kinetic_accelerator/cyborg/KA in R.module.modules) uninstall(KA) -/obj/item/borg/upgrade/modkit/proc/uninstall(obj/item/gun/energy/kinetic_accelerator/KA) +/obj/item/borg/upgrade/modkit/proc/uninstall(obj/item/gun/energy/recharge/kinetic_accelerator/KA) forceMove(get_turf(KA)) KA.modkits -= src @@ -302,11 +224,11 @@ /obj/item/borg/upgrade/modkit/proc/modify_projectile(obj/projectile/kinetic/K) //use this one for effects you want to trigger before any damage is done at all and before damage is decreased by pressure -/obj/item/borg/upgrade/modkit/proc/projectile_prehit(obj/projectile/kinetic/K, atom/target, obj/item/gun/energy/kinetic_accelerator/KA) +/obj/item/borg/upgrade/modkit/proc/projectile_prehit(obj/projectile/kinetic/K, atom/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) //use this one for effects you want to trigger before mods that do damage -/obj/item/borg/upgrade/modkit/proc/projectile_strike_predamage(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA) +/obj/item/borg/upgrade/modkit/proc/projectile_strike_predamage(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) //and this one for things that don't need to trigger before other damage-dealing mods -/obj/item/borg/upgrade/modkit/proc/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA) +/obj/item/borg/upgrade/modkit/proc/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) //Range /obj/item/borg/upgrade/modkit/range @@ -335,13 +257,13 @@ modifier = 3.2 restricted_mod_type = /obj/item/borg/upgrade/modkit/cooldown/repeater -/obj/item/borg/upgrade/modkit/cooldown/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user) +/obj/item/borg/upgrade/modkit/cooldown/install(obj/item/gun/energy/recharge/kinetic_accelerator/KA, mob/user) . = ..() if(.) - KA.overheat_time -= modifier + KA.recharge_time -= modifier -/obj/item/borg/upgrade/modkit/cooldown/uninstall(obj/item/gun/energy/kinetic_accelerator/KA) - KA.overheat_time += modifier +/obj/item/borg/upgrade/modkit/cooldown/uninstall(obj/item/gun/energy/recharge/kinetic_accelerator/KA) + KA.recharge_time += modifier ..() @@ -353,7 +275,7 @@ restricted_mod_type = /obj/item/borg/upgrade/modkit/aoe maximum_of_type = 2 -/obj/item/borg/upgrade/modkit/aoe/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user) +/obj/item/borg/upgrade/modkit/aoe/install(obj/item/gun/energy/recharge/kinetic_accelerator/KA, mob/user) . = ..() if(.) for(var/obj/item/borg/upgrade/modkit/aoe/AOE in KA.modkits) //make sure only one of the aoe modules has values if somebody has multiple @@ -365,7 +287,7 @@ AOE.turf_aoe = FALSE AOE.stats_stolen = TRUE -/obj/item/borg/upgrade/modkit/aoe/uninstall(obj/item/gun/energy/kinetic_accelerator/KA) +/obj/item/borg/upgrade/modkit/aoe/uninstall(obj/item/gun/energy/recharge/kinetic_accelerator/KA) ..() modifier = initial(modifier) //get our modifiers back turf_aoe = initial(turf_aoe) @@ -374,7 +296,7 @@ /obj/item/borg/upgrade/modkit/aoe/modify_projectile(obj/projectile/kinetic/K) K.name = "kinetic explosion" -/obj/item/borg/upgrade/modkit/aoe/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA) +/obj/item/borg/upgrade/modkit/aoe/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) if(stats_stolen) return new /obj/effect/temp_visual/explosion/fast(target_turf) @@ -418,7 +340,7 @@ modifier = -14 //Makes the cooldown 3 seconds(with no cooldown mods) if you miss. Don't miss. cost = 50 -/obj/item/borg/upgrade/modkit/cooldown/repeater/projectile_strike_predamage(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA) +/obj/item/borg/upgrade/modkit/cooldown/repeater/projectile_strike_predamage(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) var/valid_repeat = FALSE if(isliving(target)) var/mob/living/L = target @@ -427,8 +349,8 @@ if(ismineralturf(target_turf)) valid_repeat = TRUE if(valid_repeat) - KA.overheat = FALSE - KA.attempt_reload(K.firer, KA.overheat_time * 0.25) //If you hit, the cooldown drops to 0.75 seconds. + KA.cell.use(KA.cell.charge) + KA.attempt_reload(K.firer, KA.recharge_time * 0.25) //If you hit, the cooldown drops to 0.75 seconds. /obj/item/borg/upgrade/modkit/lifesteal name = "lifesteal crystal" @@ -438,7 +360,7 @@ cost = 0 //Obtained only from chests in limited quantities var/static/list/damage_heal_order = list(BRUTE, BURN, OXY) -/obj/item/borg/upgrade/modkit/lifesteal/projectile_prehit(obj/projectile/kinetic/K, atom/target, obj/item/gun/energy/kinetic_accelerator/KA) +/obj/item/borg/upgrade/modkit/lifesteal/projectile_prehit(obj/projectile/kinetic/K, atom/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) if(isliving(target) && isliving(K.firer)) var/mob/living/L = target if(L.stat == DEAD) @@ -452,7 +374,7 @@ restricted_mod_type = /obj/item/borg/upgrade/modkit/resonator_blasts modifier = 0.25 //A bonus 15 damage if you burst the field on a target, 60 if you lure them into it. -/obj/item/borg/upgrade/modkit/resonator_blasts/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA) +/obj/item/borg/upgrade/modkit/resonator_blasts/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) if(target_turf && !ismineralturf(target_turf)) //Don't make fields on mineral turfs. var/obj/effect/temp_visual/resonance/R = locate(/obj/effect/temp_visual/resonance) in target_turf if(R) @@ -469,7 +391,7 @@ var/maximum_bounty = 25 var/list/bounties_reaped = list() -/obj/item/borg/upgrade/modkit/bounty/projectile_prehit(obj/projectile/kinetic/K, atom/target, obj/item/gun/energy/kinetic_accelerator/KA) +/obj/item/borg/upgrade/modkit/bounty/projectile_prehit(obj/projectile/kinetic/K, atom/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) if(isliving(target)) var/mob/living/L = target var/list/existing_marks = L.has_status_effect_list(STATUS_EFFECT_SYPHONMARK) @@ -480,7 +402,7 @@ qdel(SM) L.apply_status_effect(STATUS_EFFECT_SYPHONMARK, src) -/obj/item/borg/upgrade/modkit/bounty/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA) +/obj/item/borg/upgrade/modkit/bounty/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) if(isliving(target)) var/mob/living/L = target if(bounties_reaped[L.type]) @@ -518,12 +440,12 @@ cost = 0 restricted_mod_type = /obj/item/borg/upgrade/modkit/trigger_guard -/obj/item/borg/upgrade/modkit/trigger_guard/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user) +/obj/item/borg/upgrade/modkit/trigger_guard/install(obj/item/gun/energy/recharge/kinetic_accelerator/KA, mob/user) . = ..() if(.) KA.trigger_guard = TRIGGER_GUARD_ALLOW_ALL -/obj/item/borg/upgrade/modkit/trigger_guard/uninstall(obj/item/gun/energy/kinetic_accelerator/KA) +/obj/item/borg/upgrade/modkit/trigger_guard/uninstall(obj/item/gun/energy/recharge/kinetic_accelerator/KA) KA.trigger_guard = TRIGGER_GUARD_NORMAL ..() @@ -538,15 +460,21 @@ var/chassis_icon = "kineticgun_u" var/chassis_name = "super-kinetic accelerator" -/obj/item/borg/upgrade/modkit/chassis_mod/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user) +/obj/item/borg/upgrade/modkit/chassis_mod/install(obj/item/gun/energy/recharge/kinetic_accelerator/KA, mob/user) . = ..() if(.) KA.icon_state = chassis_icon KA.name = chassis_name + if(iscarbon(KA.loc)) + var/mob/living/carbon/holder = KA.loc + holder.update_inv_hands() -/obj/item/borg/upgrade/modkit/chassis_mod/uninstall(obj/item/gun/energy/kinetic_accelerator/KA) +/obj/item/borg/upgrade/modkit/chassis_mod/uninstall(obj/item/gun/energy/recharge/kinetic_accelerator/KA) KA.icon_state = initial(KA.icon_state) KA.name = initial(KA.name) + if(iscarbon(KA.loc)) + var/mob/living/carbon/holder = KA.loc + holder.update_inv_hands() ..() /obj/item/borg/upgrade/modkit/chassis_mod/orange diff --git a/code/modules/projectiles/guns/energy/recharge.dm b/code/modules/projectiles/guns/energy/recharge.dm new file mode 100644 index 0000000000000..75db236aba82f --- /dev/null +++ b/code/modules/projectiles/guns/energy/recharge.dm @@ -0,0 +1,147 @@ + + +//Recharge subtype - used by stuff like protokinetic accelerators and ebows, one shot at a time, recharges. +/obj/item/gun/energy/recharge + icon_state = "kineticgun" + base_icon_state = "kineticgun" + desc = "A self recharging gun. Holds one shot at a time." + automatic_charge_overlays = FALSE + cell_type = /obj/item/stock_parts/cell/emproof + /// If set to something, instead of an overlay, sets the icon_state directly. + var/no_charge_state + /// Does it hold charge when not put away? + var/holds_charge = FALSE + /// How much time we need to recharge + var/recharge_time = 1.6 SECONDS + /// Sound we use when recharged + var/recharge_sound = 'sound/weapons/kenetic_reload.ogg' + /// An ID for our recharging timer. + var/recharge_timerid + /// Do we recharge slower with more of our type? + var/unique_frequency = FALSE + +/obj/item/gun/energy/recharge/Initialize(mapload) + . = ..() + if(!holds_charge) + empty() + +/obj/item/gun/energy/recharge/shoot_live_shot(mob/living/user, pointblank = 0, atom/pbtarget = null, message = 1) + . = ..() + attempt_reload() + +/obj/item/gun/energy/recharge/equipped(mob/user) + . = ..() + if(!can_shoot()) + attempt_reload() + +/obj/item/gun/energy/recharge/dropped() + . = ..() + if(!QDELING(src) && !holds_charge) + // Put it on a delay because moving item from slot to hand + // calls dropped(). + addtimer(CALLBACK(src, PROC_REF(empty_if_not_held)), 0.1 SECONDS) + +/obj/item/gun/energy/recharge/process_chamber() + . = ..() + attempt_reload() + +/obj/item/gun/energy/recharge/proc/empty_if_not_held() + if(!ismob(loc)) + empty() + deltimer(recharge_timerid) + +/obj/item/gun/energy/recharge/proc/empty() + if(cell) + cell.use(cell.charge) + update_appearance() + +/obj/item/gun/energy/recharge/proc/attempt_reload(mob/user, set_recharge_time) + if(!cell) + return + if(cell.charge == cell.maxcharge) + return + if(!set_recharge_time) + set_recharge_time = recharge_time + var/carried = 0 + if(!unique_frequency) + for(var/obj/item/gun/energy/recharge/recharging_gun in loc.GetAllContents()) + if(recharging_gun.type != type || recharging_gun.unique_frequency) + continue + carried++ + carried = max(carried, 1) + + // If we are overriding a crosshair, then clear it + if (deltimer(recharge_timerid)) + user?.client.clear_cooldown_cursor() + recharge_timerid = addtimer(CALLBACK(src, PROC_REF(reload)), set_recharge_time * carried, TIMER_STOPPABLE) + user?.client?.give_cooldown_cursor(set_recharge_time * carried + 1) + +/obj/item/gun/energy/recharge/emp_act(severity) + return + +/obj/item/gun/energy/recharge/proc/reload() + cell.give(cell.maxcharge) + if(!suppressed && recharge_sound) + playsound(src.loc, recharge_sound, 60, TRUE) + else + to_chat(loc, "[src] silently charges up.") + update_appearance() + +/obj/item/gun/energy/recharge/update_overlays() + . = ..() + if(!no_charge_state && !can_shoot()) + . += "[base_icon_state]_empty" + +/obj/item/gun/energy/recharge/update_icon_state() + . = ..() + if(no_charge_state && !can_shoot()) + icon_state = no_charge_state + +/obj/item/gun/energy/recharge/ebow + name = "mini energy crossbow" + desc = "A weapon favored by syndicate stealth specialists." + icon_state = "crossbow" + base_icon_state = "crossbow" + item_state = "crossbow" + no_charge_state = "crossbow_empty" + w_class = WEIGHT_CLASS_SMALL + custom_materials = list(/datum/material/iron=2000) + suppressed = TRUE + ammo_type = list(/obj/item/ammo_casing/energy/bolt) + recharge_time = 2 SECONDS + holds_charge = TRUE + unique_frequency = TRUE + can_bayonet = TRUE + knife_x_offset = 20 + knife_y_offset = 12 + +/obj/item/gun/energy/recharge/ebow/halloween + name = "candy corn crossbow" + desc = "A weapon favored by Syndicate trick-or-treaters." + icon_state = "crossbow_halloween" + base_icon_state = "crossbow_halloween" + no_charge_state = "crossbow_halloween_empty" + ammo_type = list(/obj/item/ammo_casing/energy/bolt/halloween) + +/obj/item/gun/energy/recharge/ebow/large + name = "energy crossbow" + desc = "A reverse engineered weapon using syndicate technology." + icon_state = "crossbowlarge" + base_icon_state = "crossbowlarge" + no_charge_state = "crossbowlarge_empty" + w_class = WEIGHT_CLASS_NORMAL + custom_materials = list(/datum/material/iron=4000) + suppressed = null + ammo_type = list(/obj/item/ammo_casing/energy/bolt/large) + pin = null + +/obj/item/gun/energy/recharge/ebow/radbow + name = "gamma bow" + desc = "A weapon favored by Madmen." + icon_state = "crossbow" + item_state = "crossbow" + ammo_type = list(/obj/item/ammo_casing/energy/bolt/radbolt) + recharge_time = 250 + +/obj/item/gun/energy/recharge/ebow/add_seclight_point() + return diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 416c973ddfaf4..6fa3812ad6a64 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -97,50 +97,6 @@ ammo_type = list(/obj/item/ammo_casing/energy/mindflayer) ammo_x_offset = 2 -/obj/item/gun/energy/kinetic_accelerator/crossbow - name = "mini energy crossbow" - desc = "A weapon favored by syndicate stealth specialists." - icon_state = "crossbow" - item_state = "crossbow" - w_class = WEIGHT_CLASS_SMALL - custom_materials = list(/datum/material/iron=2000) - suppressed = TRUE - ammo_type = list(/obj/item/ammo_casing/energy/bolt) - weapon_weight = WEAPON_LIGHT - obj_flags = 0 - overheat_time = 20 - holds_charge = TRUE - unique_frequency = TRUE - max_mod_capacity = 0 - -/obj/item/gun/energy/kinetic_accelerator/crossbow/add_seclight_point() - return - -/obj/item/gun/energy/kinetic_accelerator/crossbow/halloween - name = "candy corn crossbow" - desc = "A weapon favored by Syndicate trick-or-treaters." - icon_state = "crossbow_halloween" - item_state = "crossbow" - ammo_type = list(/obj/item/ammo_casing/energy/bolt/halloween) - -/obj/item/gun/energy/kinetic_accelerator/crossbow/large - name = "energy crossbow" - desc = "A reverse engineered weapon using syndicate technology." - icon_state = "crossbowlarge" - w_class = WEIGHT_CLASS_NORMAL - custom_materials = list(/datum/material/iron=4000) - suppressed = null - ammo_type = list(/obj/item/ammo_casing/energy/bolt/large) - pin = null - -/obj/item/gun/energy/kinetic_accelerator/crossbow/radbow - name = "gamma bow" - desc = "A weapon favored by Madmen." - icon_state = "crossbow" - item_state = "crossbow" - ammo_type = list(/obj/item/ammo_casing/energy/bolt/radbolt) - overheat_time = 250 - /obj/item/gun/energy/plasmacutter name = "plasma cutter" desc = "A mining tool capable of expelling concentrated plasma bursts. You could use it to cut limbs off xenos! Or, you know, mine stuff." diff --git a/code/modules/research/designs/weapon_designs.dm b/code/modules/research/designs/weapon_designs.dm index 4fe37792e9299..c43da8e7f5985 100644 --- a/code/modules/research/designs/weapon_designs.dm +++ b/code/modules/research/designs/weapon_designs.dm @@ -396,7 +396,7 @@ id = "largecrossbow" build_type = PROTOLATHE materials = list(/datum/material/iron = 5000, /datum/material/glass = 1500, /datum/material/uranium = 1500, /datum/material/silver = 1500) - build_path = /obj/item/gun/energy/kinetic_accelerator/crossbow/large + build_path = /obj/item/gun/energy/recharge/ebow/large category = list("Weapons") departmental_flags = DEPARTMENTAL_FLAG_SECURITY diff --git a/code/modules/spells/spell_types/rightandwrong.dm b/code/modules/spells/spell_types/rightandwrong.dm index 7e5371b6d878a..c301093154e1a 100644 --- a/code/modules/spells/spell_types/rightandwrong.dm +++ b/code/modules/spells/spell_types/rightandwrong.dm @@ -23,7 +23,7 @@ GLOBAL_LIST_INIT(summoned_guns, list( /obj/item/pneumatic_cannon/speargun, /obj/item/gun/ballistic/automatic/mini_uzi, /obj/item/gun/energy/lasercannon, - /obj/item/gun/energy/kinetic_accelerator/crossbow/large, + /obj/item/gun/energy/recharge/ebow/large, /obj/item/gun/energy/e_gun/nuclear, /obj/item/gun/ballistic/automatic/proto, /obj/item/gun/ballistic/automatic/c20r, @@ -35,7 +35,7 @@ GLOBAL_LIST_INIT(summoned_guns, list( /obj/item/gun/energy/pulse/carbine, /obj/item/gun/energy/decloner, /obj/item/gun/energy/mindflayer, - /obj/item/gun/energy/kinetic_accelerator, + /obj/item/gun/energy/recharge/kinetic_accelerator, /obj/item/gun/energy/plasmacutter/adv, /obj/item/gun/energy/wormhole_projector, /obj/item/gun/ballistic/automatic/wt550, diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index b98bdcc0cff5c..750ed038d02c4 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -832,7 +832,7 @@ GLOBAL_LIST_INIT(illegal_tech_blacklist, typecacheof(list( and fire bolts tipped with dangerous toxins that will disorient and \ irradiate targets. It can produce an infinite number of bolts \ which automatically recharge roughly 25 seconds after each shot." - item = /obj/item/gun/energy/kinetic_accelerator/crossbow/radbow + item = /obj/item/gun/energy/recharge/ebow/radbow cost = 8 surplus = 50 @@ -844,7 +844,7 @@ GLOBAL_LIST_INIT(illegal_tech_blacklist, typecacheof(list( toxin that will damage and disorient targets, causing them to \ slur as if inebriated. It can produce an infinite number \ of bolts, but takes a small amount of time to automatically recharge after each shot." - item = /obj/item/gun/energy/kinetic_accelerator/crossbow + item = /obj/item/gun/energy/recharge/ebow cost = 12 surplus = 50 purchasable_from = ~(UPLINK_NUKE_OPS | UPLINK_CLOWN_OPS) From fa7ecac4fa973b48885086d71295cff67c72df8f Mon Sep 17 00:00:00 2001 From: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Sat, 30 Nov 2024 04:20:34 -0600 Subject: [PATCH 12/49] Automatic changelog generation for PR #11939 [ci skip] --- html/changelogs/AutoChangeLog-pr-11939.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-11939.yml diff --git a/html/changelogs/AutoChangeLog-pr-11939.yml b/html/changelogs/AutoChangeLog-pr-11939.yml new file mode 100644 index 0000000000000..494681790117d --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11939.yml @@ -0,0 +1,5 @@ +author: rkz, Fikou +delete-after: true +changes: + - refactor: refactored pkas and ebows. There should be no discernable behavior changes. + - tweak: changes the empty chamber gun alert to be more succinct From 9cfcc2866ce6bebe1c687cc7dea4ffe09a74c14e Mon Sep 17 00:00:00 2001 From: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Sat, 30 Nov 2024 11:03:14 +0000 Subject: [PATCH 13/49] Automatic changelog compile [ci skip] --- html/changelog.html | 5 +++++ html/changelogs/.all_changelog.yml | 3 +++ html/changelogs/AutoChangeLog-pr-11939.yml | 5 ----- 3 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-11939.yml diff --git a/html/changelog.html b/html/changelog.html index d668cc7e4021a..b0edc6fcb803d 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -61,6 +61,11 @@

      Therealdoooc213 updated:

      • emitters fire correctly now
      +

      rkz, Fikou updated:

      +
        +
      • refactored pkas and ebows. There should be no discernable behavior changes.
      • +
      • changes the empty chamber gun alert to be more succinct
      • +

      28 November 2024

      RDS88-beeman updated:

      diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 8c280e03e49ca..e46b8048a752d 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -45091,3 +45091,6 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. 2024-11-30: Therealdoooc213: - bugfix: emitters fire correctly now + rkz, Fikou: + - refactor: refactored pkas and ebows. There should be no discernable behavior changes. + - tweak: changes the empty chamber gun alert to be more succinct diff --git a/html/changelogs/AutoChangeLog-pr-11939.yml b/html/changelogs/AutoChangeLog-pr-11939.yml deleted file mode 100644 index 494681790117d..0000000000000 --- a/html/changelogs/AutoChangeLog-pr-11939.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: rkz, Fikou -delete-after: true -changes: - - refactor: refactored pkas and ebows. There should be no discernable behavior changes. - - tweak: changes the empty chamber gun alert to be more succinct From d08335a67132a9db24d7e23671c1e9a02cbdc1d5 Mon Sep 17 00:00:00 2001 From: Lucy Date: Sat, 30 Nov 2024 06:25:14 -0500 Subject: [PATCH 14/49] a lotta tgui improvements (#11949) --- .../tgui-panel/chat/ChatPageSettings.js | 72 ++++- tgui/packages/tgui-panel/chat/ChatTabs.js | 2 +- tgui/packages/tgui-panel/chat/actions.js | 3 + tgui/packages/tgui-panel/chat/middleware.js | 10 +- tgui/packages/tgui-panel/chat/model.js | 1 + tgui/packages/tgui-panel/chat/reducer.js | 48 +++- tgui/packages/tgui-panel/chat/renderer.js | 41 ++- .../tgui-panel/chat/replaceInTextNode.js | 2 +- tgui/packages/tgui-panel/reconnect.tsx | 8 +- .../tgui-panel/settings/SettingsPanel.js | 259 +++++++++--------- tgui/packages/tgui-panel/settings/model.js | 1 + tgui/packages/tgui-panel/settings/reducer.js | 6 + .../styles/components/Notifications.scss | 2 +- .../tgui/styles/components/Button.scss | 3 +- 14 files changed, 303 insertions(+), 155 deletions(-) diff --git a/tgui/packages/tgui-panel/chat/ChatPageSettings.js b/tgui/packages/tgui-panel/chat/ChatPageSettings.js index bf78f9ee4f2d7..462abd590c27c 100644 --- a/tgui/packages/tgui-panel/chat/ChatPageSettings.js +++ b/tgui/packages/tgui-panel/chat/ChatPageSettings.js @@ -6,7 +6,7 @@ import { useDispatch, useSelector } from 'common/redux'; import { Button, Collapsible, Divider, Input, Section, Stack } from 'tgui/components'; -import { removeChatPage, toggleAcceptedType, updateChatPage } from './actions'; +import { moveChatPageLeft, moveChatPageRight, removeChatPage, toggleAcceptedType, updateChatPage } from './actions'; import { MESSAGE_TYPES } from './constants'; import { selectCurrentChatPage } from './selectors'; @@ -16,9 +16,9 @@ export const ChatPageSettings = (props, context) => { return (
      - + dispatch( @@ -31,19 +31,71 @@ export const ChatPageSettings = (props, context) => { /> - + } + /> + {!page.isMain ? ( + + + + ) : ( + '' + )} + + + + {!page.isMain ? ( + + Reorder Chat:  + + + + ) : ( + '' + )}
      diff --git a/tgui/packages/tgui-panel/chat/ChatTabs.js b/tgui/packages/tgui-panel/chat/ChatTabs.js index 97270333a129c..f4658015cee87 100644 --- a/tgui/packages/tgui-panel/chat/ChatTabs.js +++ b/tgui/packages/tgui-panel/chat/ChatTabs.js @@ -36,7 +36,7 @@ export const ChatTabs = (props, context) => { 0 && } + rightSlot={!page.hideUnreadCount && page.unreadCount > 0 && } onClick={() => dispatch( changeChatPage({ diff --git a/tgui/packages/tgui-panel/chat/actions.js b/tgui/packages/tgui-panel/chat/actions.js index e9919fcfa2b87..0bd64fba90169 100644 --- a/tgui/packages/tgui-panel/chat/actions.js +++ b/tgui/packages/tgui-panel/chat/actions.js @@ -9,6 +9,7 @@ import { createPage } from './model'; export const loadChat = createAction('chat/load'); export const rebuildChat = createAction('chat/rebuild'); +export const clearChat = createAction('chat/clear'); export const updateMessageCount = createAction('chat/updateMessageCount'); export const addChatPage = createAction('chat/addPage', () => ({ payload: createPage(), @@ -19,3 +20,5 @@ export const toggleAcceptedType = createAction('chat/toggleAcceptedType'); export const removeChatPage = createAction('chat/removePage'); export const changeScrollTracking = createAction('chat/changeScrollTracking'); export const saveChatToDisk = createAction('chat/saveToDisk'); +export const moveChatPageLeft = createAction('chat/movePageLeft'); +export const moveChatPageRight = createAction('chat/movePageRight'); diff --git a/tgui/packages/tgui-panel/chat/middleware.js b/tgui/packages/tgui-panel/chat/middleware.js index 780b61a1aa3a1..8d5962bc9edfc 100644 --- a/tgui/packages/tgui-panel/chat/middleware.js +++ b/tgui/packages/tgui-panel/chat/middleware.js @@ -8,7 +8,7 @@ import DOMPurify from 'dompurify'; import { storage } from 'common/storage'; import { loadSettings, updateSettings, addHighlightSetting, removeHighlightSetting, updateHighlightSetting } from '../settings/actions'; import { selectSettings } from '../settings/selectors'; -import { addChatPage, changeChatPage, changeScrollTracking, loadChat, rebuildChat, removeChatPage, saveChatToDisk, toggleAcceptedType, updateMessageCount } from './actions'; +import { addChatPage, changeChatPage, changeScrollTracking, clearChat, loadChat, moveChatPageLeft, moveChatPageRight, rebuildChat, removeChatPage, saveChatToDisk, toggleAcceptedType, updateMessageCount } from './actions'; import { MAX_PERSISTED_MESSAGES, MESSAGE_SAVE_INTERVAL } from './constants'; import { createMessage, serializeMessage } from './model'; import { chatRenderer } from './renderer'; @@ -124,7 +124,9 @@ export const chatMiddleware = (store) => { type === changeChatPage.type || type === addChatPage.type || type === removeChatPage.type || - type === toggleAcceptedType.type + type === toggleAcceptedType.type || + type === moveChatPageLeft.type || + type === moveChatPageRight.type ) { next(action); const page = selectCurrentChatPage(store.getState()); @@ -159,6 +161,10 @@ export const chatMiddleware = (store) => { chatRenderer.saveToDisk(); return; } + if (type === clearChat.type) { + chatRenderer.clearChat(); + return; + } return next(action); }; }; diff --git a/tgui/packages/tgui-panel/chat/model.js b/tgui/packages/tgui-panel/chat/model.js index ed7213018434e..a84ce4fc9b96a 100644 --- a/tgui/packages/tgui-panel/chat/model.js +++ b/tgui/packages/tgui-panel/chat/model.js @@ -21,6 +21,7 @@ export const createPage = (obj) => { name: 'New Tab', acceptedTypes: acceptedTypes, unreadCount: 0, + hideUnreadCount: false, createdAt: Date.now(), ...obj, }; diff --git a/tgui/packages/tgui-panel/chat/reducer.js b/tgui/packages/tgui-panel/chat/reducer.js index b727a7c1babc3..40035db2533a3 100644 --- a/tgui/packages/tgui-panel/chat/reducer.js +++ b/tgui/packages/tgui-panel/chat/reducer.js @@ -4,7 +4,7 @@ * @license MIT */ -import { addChatPage, changeChatPage, loadChat, removeChatPage, toggleAcceptedType, updateChatPage, updateMessageCount, changeScrollTracking } from './actions'; +import { addChatPage, changeChatPage, loadChat, moveChatPageLeft, moveChatPageRight, removeChatPage, toggleAcceptedType, updateChatPage, updateMessageCount, changeScrollTracking } from './actions'; import { canPageAcceptType, createMainPage } from './model'; const mainPage = createMainPage(); @@ -179,5 +179,51 @@ export const chatReducer = (state = initialState, action) => { } return nextState; } + if (type === moveChatPageLeft.type) { + const { pageId } = payload; + const nextState = { + ...state, + pages: [...state.pages], + pageById: { + ...state.pageById, + }, + }; + const tmpPage = nextState.pageById[pageId]; + const fromIndex = nextState.pages.indexOf(tmpPage.id); + const toIndex = fromIndex - 1; + // don't ever move leftmost page + if (fromIndex > 0) { + // don't ever move anything to the leftmost page + if (toIndex > 0) { + const tmp = nextState.pages[fromIndex]; + nextState.pages[fromIndex] = nextState.pages[toIndex]; + nextState.pages[toIndex] = tmp; + } + } + return nextState; + } + if (type === moveChatPageRight.type) { + const { pageId } = payload; + const nextState = { + ...state, + pages: [...state.pages], + pageById: { + ...state.pageById, + }, + }; + const tmpPage = nextState.pageById[pageId]; + const fromIndex = nextState.pages.indexOf(tmpPage.id); + const toIndex = fromIndex + 1; + // don't ever move leftmost page + if (fromIndex > 0) { + // don't ever move anything out of the array + if (toIndex < nextState.pages.length) { + const tmp = nextState.pages[fromIndex]; + nextState.pages[fromIndex] = nextState.pages[toIndex]; + nextState.pages[toIndex] = tmp; + } + } + return nextState; + } return state; }; diff --git a/tgui/packages/tgui-panel/chat/renderer.js b/tgui/packages/tgui-panel/chat/renderer.js index 37f6419fdb422..f08e8ac85e981 100644 --- a/tgui/packages/tgui-panel/chat/renderer.js +++ b/tgui/packages/tgui-panel/chat/renderer.js @@ -270,6 +270,7 @@ class ChatRenderer { const highlightWholeMessage = setting.highlightWholeMessage; const matchWord = setting.matchWord; const matchCase = setting.matchCase; + const enabled = setting.enabled; const lines = String(text) .split(',') .map((str) => str.trim()) @@ -315,6 +316,7 @@ class ChatRenderer { this.highlightParsers = []; } this.highlightParsers.push({ + enabled, highlightWords, highlightRegex, highlightColor, @@ -478,14 +480,16 @@ class ChatRenderer { // Highlight text if ((!message.avoidHighlighting || this.highlightSelf) && this.highlightParsers) { - this.highlightParsers.map((parser) => { - const highlighted = highlightNode(node, parser.highlightRegex, parser.highlightWords, (text) => - createHighlightNode(text, parser.highlightColor) - ); - if (highlighted && parser.highlightWholeMessage) { - node.className += ' ChatMessage--highlighted'; - } - }); + this.highlightParsers + .filter((parser) => parser.enabled) + .map((parser) => { + const highlighted = highlightNode(node, parser.highlightRegex, parser.highlightWords, (text) => + createHighlightNode(text, parser.highlightColor) + ); + if (highlighted && parser.highlightWholeMessage) { + node.className += ' ChatMessage--highlighted'; + } + }); } // Linkify text const linkifyNodes = node.querySelectorAll('.linkify'); @@ -604,6 +608,27 @@ class ChatRenderer { }); } + /** + * @clearChat + * @copyright 2023 + * @author Cheffie + * @link https://github.com/CheffieGithub + * @license MIT + */ + clearChat() { + const messages = this.visibleMessages; + this.visibleMessages = []; + for (let i = 0; i < messages.length; i++) { + const message = messages[i]; + this.rootNode.removeChild(message.node); + // Mark this message as pruned + message.node = 'pruned'; + } + // Remove pruned messages from the message array + this.messages = this.messages.filter((message) => message.node !== 'pruned'); + logger.log(`Cleared chat`); + } + saveToDisk() { // Allow only on IE11 if (Byond.IS_LTE_IE10) { diff --git a/tgui/packages/tgui-panel/chat/replaceInTextNode.js b/tgui/packages/tgui-panel/chat/replaceInTextNode.js index 75400ec07aee9..b21c8aa63c5fa 100644 --- a/tgui/packages/tgui-panel/chat/replaceInTextNode.js +++ b/tgui/packages/tgui-panel/chat/replaceInTextNode.js @@ -93,7 +93,7 @@ export const replaceInTextNode = (regex, words, createNode) => (node) => { for (let word of words) { // Capture if the word is at the beginning, end, middle, // or by itself in a message - wordRegexStr += `^${word}\\W|\\W${word}\\W|\\W${word}$|^${word}$`; + wordRegexStr += `^${word}\\s\\W|\\s\\W${word}\\s\\W|\\s\\W${word}$|^${word}\\s\\W$`; // Make sure the last character for the expression is NOT '|' if (++i !== words.length) { wordRegexStr += '|'; diff --git a/tgui/packages/tgui-panel/reconnect.tsx b/tgui/packages/tgui-panel/reconnect.tsx index cb44a86bfe944..675f2396b7a18 100644 --- a/tgui/packages/tgui-panel/reconnect.tsx +++ b/tgui/packages/tgui-panel/reconnect.tsx @@ -25,12 +25,14 @@ export const ReconnectButtons = (props, context) => { + }} + /> ) ); diff --git a/tgui/packages/tgui-panel/settings/SettingsPanel.js b/tgui/packages/tgui-panel/settings/SettingsPanel.js index 89990b389a976..11e3f3ae17435 100644 --- a/tgui/packages/tgui-panel/settings/SettingsPanel.js +++ b/tgui/packages/tgui-panel/settings/SettingsPanel.js @@ -5,16 +5,16 @@ */ import { toFixed } from 'common/math'; +import { capitalize } from 'common/string'; import { useLocalState } from 'tgui/backend'; import { useDispatch, useSelector } from 'common/redux'; -import { Box, Button, ColorBox, Divider, Dropdown, Flex, Input, LabeledList, NumberInput, Section, Stack, Tabs, TextArea } from 'tgui/components'; +import { Box, Button, Collapsible, ColorBox, Divider, Stack, Input, LabeledList, NumberInput, Section, Tabs, TextArea } from 'tgui/components'; import { ChatPageSettings } from '../chat'; -import { rebuildChat, saveChatToDisk } from '../chat/actions'; +import { clearChat, rebuildChat, saveChatToDisk } from '../chat/actions'; import { THEMES } from '../themes'; import { changeSettingsTab, updateSettings, addHighlightSetting, removeHighlightSetting, updateHighlightSetting } from './actions'; import { SETTINGS_TABS, FONTS, MAX_HIGHLIGHT_SETTINGS } from './constants'; import { selectActiveTab, selectSettings, selectHighlightSettings, selectHighlightSettingById } from './selectors'; -import { useSettings } from '../settings'; export const SettingsPanel = (props, context) => { const activeTab = useSelector(context, selectActiveTab); @@ -45,49 +45,72 @@ export const SettingsPanel = (props, context) => { {activeTab === 'general' && } {activeTab === 'chatPage' && } {activeTab === 'textHighlight' && } - {activeTab === 'statPanelpage' && } ); }; export const SettingsGeneral = (props, context) => { - const { theme, fontFamily, highContrast, fontSize, lineHeight } = useSelector(context, selectSettings); + const { theme, fontFamily, fontSize, lineHeight } = useSelector(context, selectSettings); const dispatch = useDispatch(context); const [freeFont, setFreeFont] = useLocalState(context, 'freeFont', false); return (
      - - dispatch( - updateSettings({ - theme: value, - }) - ) - } - /> + {THEMES.map((THEME) => ( + -
      - ); -}; - -export const SettingsStat = (_props, context) => { - const settings = useSettings(context); - const dispatch = useDispatch(context); - return ( -
      - Stat Panel Settings - - - - - dispatch( - updateSettings({ - statTabMode: value, - }) - ) - } + + +
      ); }; @@ -201,26 +198,24 @@ const TextHighlightSettings = (props, context) => { const highlightSettings = useSelector(context, selectHighlightSettings); const dispatch = useDispatch(context); return ( -
      -
      - - {highlightSettings.map((id, i) => ( - - ))} - {highlightSettings.length < MAX_HIGHLIGHT_SETTINGS && ( - -
      +
      + + {highlightSettings.map((id, i) => ( + + ))} + {highlightSettings.length < MAX_HIGHLIGHT_SETTINGS && ( + +