From e3da78effdd8deddbaa2a7861a62db488f518707 Mon Sep 17 00:00:00 2001
From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com>
Date: Wed, 14 Aug 2024 11:57:01 +0100
Subject: [PATCH] Buffs breaching tools (#11201)
* Club buff
* Update grille.dm
* Fixes airlocks shocking shock proof tools on break
* Fixes forced damage and attack chain issues
* Fixes club force string message
* max_hit_damage
---
code/datums/wires/_wires.dm | 26 +++++++++-------
code/datums/wires/airalarm.dm | 2 +-
code/datums/wires/airlock.dm | 14 ++++-----
code/datums/wires/airlock_cycle.dm | 2 +-
code/datums/wires/apc.dm | 8 +++--
code/datums/wires/autolathe.dm | 5 +--
code/datums/wires/dna_scanner.dm | 6 ++--
code/datums/wires/ecto_sniffer.dm | 2 +-
code/datums/wires/explosive.dm | 4 +--
code/datums/wires/fax.dm | 2 +-
code/datums/wires/microwave.dm | 2 +-
code/datums/wires/particle_accelerator.dm | 2 +-
code/datums/wires/r_n_d.dm | 2 +-
code/datums/wires/robot.dm | 22 ++++++++-----
code/datums/wires/suit_storage_unit.dm | 6 ++--
code/datums/wires/syndicatebomb.dm | 2 +-
code/datums/wires/vending.dm | 2 +-
code/game/gamemodes/gangs/dominator.dm | 1 +
code/game/machinery/doors/airlock.dm | 2 +-
code/game/machinery/suit_storage_unit.dm | 2 +-
code/game/machinery/syndicatebomb.dm | 2 +-
code/game/objects/items/crab17.dm | 1 +
code/game/objects/items/devices/paicard.dm | 2 +-
.../game/objects/items/devices/radio/radio.dm | 2 +-
code/game/objects/items/weaponry.dm | 31 +++++++++++--------
code/game/objects/obj_defense.dm | 2 ++
code/game/objects/objs.dm | 4 ++-
code/game/objects/structures/grille.dm | 8 ++---
.../antagonists/blob/structures/core.dm | 1 +
.../antagonists/blob/structures/factory.dm | 1 +
.../antagonists/blob/structures/node.dm | 1 +
.../clock_cult/clockwork_massive.dm | 1 +
.../antagonists/space_dragon/carp_rift.dm | 1 +
.../holoparasite/abilities/lesser/radio.dm | 2 +-
.../mob/living/simple_animal/bot/mulebot.dm | 6 ++--
.../projectiles/projectile/bullets/shotgun.dm | 4 +--
code/modules/wiremod/shell/airlock.dm | 2 +-
37 files changed, 107 insertions(+), 78 deletions(-)
diff --git a/code/datums/wires/_wires.dm b/code/datums/wires/_wires.dm
index ab67397a40d3d..e8e708c0c225d 100644
--- a/code/datums/wires/_wires.dm
+++ b/code/datums/wires/_wires.dm
@@ -133,26 +133,28 @@
/datum/wires/proc/is_dud_color(color)
return is_dud(get_wire(color))
-/datum/wires/proc/cut(wire)
+/// Cut a specific wire.
+/// User may be null
+/datum/wires/proc/cut(wire, mob/user_or_null)
if(is_cut(wire))
cut_wires -= wire
- on_cut(wire, mend = TRUE)
+ on_cut(wire, user_or_null, mend = TRUE)
else
cut_wires += wire
- on_cut(wire, mend = FALSE)
+ on_cut(wire, user_or_null, mend = FALSE)
ui_update()
-/datum/wires/proc/cut_color(color)
- cut(get_wire(color))
+/datum/wires/proc/cut_color(color, mob/user_or_null)
+ cut(get_wire(color), user_or_null)
ui_update()
-/datum/wires/proc/cut_random()
- cut(wires[rand(1, wires.len)])
+/datum/wires/proc/cut_random(mob/user_or_null)
+ cut(wires[rand(1, wires.len)], user_or_null)
ui_update()
-/datum/wires/proc/cut_all()
+/datum/wires/proc/cut_all(mob/user_or_null)
for(var/wire in wires)
- cut(wire)
+ cut(wire, user_or_null)
ui_update()
/datum/wires/proc/pulse(wire, user)
@@ -208,7 +210,9 @@
/datum/wires/proc/get_status()
return list()
-/datum/wires/proc/on_cut(wire, mend = FALSE)
+/// Called when a wire is asked to be cut
+/// User accepts null
+/datum/wires/proc/on_cut(wire, mob/user, mend = FALSE)
return
/datum/wires/proc/on_pulse(wire, user)
@@ -283,7 +287,7 @@
if(I || IsAdminGhost(usr))
if(I && holder)
I.play_tool_sound(holder, 20)
- cut_color(target_wire)
+ cut_color(target_wire, usr)
. = TRUE
else
to_chat(L, "You need wirecutters!")
diff --git a/code/datums/wires/airalarm.dm b/code/datums/wires/airalarm.dm
index 9959aa824087c..6831d499c84cf 100644
--- a/code/datums/wires/airalarm.dm
+++ b/code/datums/wires/airalarm.dm
@@ -57,7 +57,7 @@
A.post_alert(0)
A.update_icon()
-/datum/wires/airalarm/on_cut(wire, mend)
+/datum/wires/airalarm/on_cut(wire, mob/user, mend)
var/obj/machinery/airalarm/A = holder
switch(wire)
if(WIRE_POWER) // Short out forever.
diff --git a/code/datums/wires/airlock.dm b/code/datums/wires/airlock.dm
index 7514eb5068dd0..46edbc9fc9bc1 100644
--- a/code/datums/wires/airlock.dm
+++ b/code/datums/wires/airlock.dm
@@ -128,7 +128,7 @@
wires.ui_update()
ui_update()
-/datum/wires/airlock/on_cut(wire, mend)
+/datum/wires/airlock/on_cut(wire, mob/user, mend)
var/obj/machinery/door/airlock/A = holder
switch(wire)
if(WIRE_POWER1, WIRE_POWER2) // Cut to loose power, repair all to gain power.
@@ -136,8 +136,8 @@
A.regainMainPower()
else
A.loseMainPower()
- if(isliving(usr))
- A.shock(usr, 50)
+ if(isliving(user))
+ A.shock(user, 50)
if(WIRE_BACKUP1, WIRE_BACKUP2) // Cut to loose backup power, repair all to gain backup power.
if(mend && !is_cut(WIRE_BACKUP1) && !is_cut(WIRE_BACKUP2))
A.regainBackupPower()
@@ -160,12 +160,12 @@
if(WIRE_SHOCK) // Cut to shock the door, mend to unshock.
if(mend)
if(A.secondsElectrified)
- A.set_electrified(MACHINE_NOT_ELECTRIFIED, usr)
+ A.set_electrified(MACHINE_NOT_ELECTRIFIED, user)
else
if(A.secondsElectrified != MACHINE_ELECTRIFIED_PERMANENT)
- A.set_electrified(MACHINE_ELECTRIFIED_PERMANENT, usr)
- if(isliving(usr))
- A.shock(usr, 50)
+ A.set_electrified(MACHINE_ELECTRIFIED_PERMANENT, user)
+ if(isliving(user))
+ A.shock(user, 50)
if(WIRE_SAFETY) // Cut to disable safeties, mend to re-enable.
A.safe = mend
if(WIRE_TIMING) // Cut to disable auto-close, mend to re-enable.
diff --git a/code/datums/wires/airlock_cycle.dm b/code/datums/wires/airlock_cycle.dm
index 7e77422f07279..bfce4c7d8c71c 100644
--- a/code/datums/wires/airlock_cycle.dm
+++ b/code/datums/wires/airlock_cycle.dm
@@ -38,7 +38,7 @@
A.aidisabled = TRUE
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/advanced_airlock_controller, reset), wire), 100)
-/datum/wires/advanced_airlock_controller/on_cut(wire, mend)
+/datum/wires/advanced_airlock_controller/on_cut(wire, mob/user, mend)
var/obj/machinery/advanced_airlock_controller/A = holder
switch(wire)
if(WIRE_POWER) // Short out forever.
diff --git a/code/datums/wires/apc.dm b/code/datums/wires/apc.dm
index 2a2622b8f0d48..8d9c3cd0385e3 100644
--- a/code/datums/wires/apc.dm
+++ b/code/datums/wires/apc.dm
@@ -39,16 +39,18 @@
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/power/apc, reset), wire), 10)
ui_update()
-/datum/wires/apc/on_cut(index, mend)
+/datum/wires/apc/on_cut(index, mob/user, mend)
var/obj/machinery/power/apc/A = holder
switch(index)
if(WIRE_POWER1, WIRE_POWER2) // Short out.
if(mend && !is_cut(WIRE_POWER1) && !is_cut(WIRE_POWER2))
A.shorted = FALSE
- A.shock(usr, 50)
+ if (user)
+ A.shock(user, 50)
else
A.shorted = TRUE
- A.shock(usr, 50)
+ if (user)
+ A.shock(user, 50)
if(WIRE_AI) // Disable AI control.
if(mend)
A.aidisabled = FALSE
diff --git a/code/datums/wires/autolathe.dm b/code/datums/wires/autolathe.dm
index 8bf5fdd9f91a3..f0a4f60a6d64e 100644
--- a/code/datums/wires/autolathe.dm
+++ b/code/datums/wires/autolathe.dm
@@ -38,7 +38,7 @@
A.begin_process()
ui_update()
-/datum/wires/autolathe/on_cut(wire, mend)
+/datum/wires/autolathe/on_cut(wire, mob/user, mend)
var/obj/machinery/modular_fabricator/autolathe/A = holder
switch(wire)
if(WIRE_HACK)
@@ -48,5 +48,6 @@
if(WIRE_DISABLE)
A.disabled = !mend
if(WIRE_ZAP)
- A.shock(usr, 50)
+ if (user)
+ A.shock(user, 50)
ui_update()
diff --git a/code/datums/wires/dna_scanner.dm b/code/datums/wires/dna_scanner.dm
index 8ed19a24ca1b0..6794f01bd90ef 100644
--- a/code/datums/wires/dna_scanner.dm
+++ b/code/datums/wires/dna_scanner.dm
@@ -44,7 +44,7 @@
S.shock(user, 50)
ui_update()
-/datum/wires/dna_scanner/on_cut(wire, mend)
+/datum/wires/dna_scanner/on_cut(wire, mob/user, mend)
var/obj/machinery/dna_scannernew/S = holder
switch(wire)
if(WIRE_IDSCAN)
@@ -60,6 +60,6 @@
S.locked = TRUE
S.update_icon()
if(WIRE_ZAP1, WIRE_ZAP2)
- if(isliving(usr))
- S.shock(usr, 90)
+ if(isliving(user))
+ S.shock(user, 90)
ui_update()
diff --git a/code/datums/wires/ecto_sniffer.dm b/code/datums/wires/ecto_sniffer.dm
index d4dcae6fb002a..90b148ba2c33d 100644
--- a/code/datums/wires/ecto_sniffer.dm
+++ b/code/datums/wires/ecto_sniffer.dm
@@ -12,6 +12,6 @@
our_sniffer.activate()
..()
-/datum/wires/ecto_sniffer/on_cut(wire, mend)
+/datum/wires/ecto_sniffer/on_cut(wire, mob/user, mend)
var/obj/machinery/ecto_sniffer/our_sniffer = holder
our_sniffer.sensor_enabled = mend
diff --git a/code/datums/wires/explosive.dm b/code/datums/wires/explosive.dm
index e91fe3f1cd4da..12aed04cb0dd8 100644
--- a/code/datums/wires/explosive.dm
+++ b/code/datums/wires/explosive.dm
@@ -8,7 +8,7 @@
/datum/wires/explosive/on_pulse(index)
explode()
-/datum/wires/explosive/on_cut(index, mend)
+/datum/wires/explosive/on_cut(index, mob/user, mend)
explode()
/datum/wires/explosive/proc/explode()
@@ -104,7 +104,7 @@
else // Boom
explode()
-/datum/wires/explosive/pizza/on_cut(wire, mend)
+/datum/wires/explosive/pizza/on_cut(wire, mob/user, mend)
var/obj/item/pizzabox/P = holder
switch(wire)
if(WIRE_DISARM) // Disarm and untrap the box.
diff --git a/code/datums/wires/fax.dm b/code/datums/wires/fax.dm
index f5eabbd7822d5..a87c16f5a3068 100644
--- a/code/datums/wires/fax.dm
+++ b/code/datums/wires/fax.dm
@@ -43,7 +43,7 @@
if(WIRE_LOADCHECK)
machine.allow_exotic_faxes = !machine.allow_exotic_faxes
-/datum/wires/fax/on_cut(wire, mend)
+/datum/wires/fax/on_cut(wire, mob/user, mend)
var/obj/machinery/fax/machine = holder
switch(wire)
if(WIRE_SHOCK)
diff --git a/code/datums/wires/microwave.dm b/code/datums/wires/microwave.dm
index 8c74abfa46c78..29d50e86045ae 100644
--- a/code/datums/wires/microwave.dm
+++ b/code/datums/wires/microwave.dm
@@ -20,7 +20,7 @@
if(WIRE_ACTIVATE)
M.cook()
-/datum/wires/microwave/on_cut(wire, mend)
+/datum/wires/microwave/on_cut(wire, mob/user, mend)
var/obj/machinery/microwave/M = holder
switch(wire)
if(WIRE_ACTIVATE)
diff --git a/code/datums/wires/particle_accelerator.dm b/code/datums/wires/particle_accelerator.dm
index 5600b0b1823c4..f012a727abf51 100644
--- a/code/datums/wires/particle_accelerator.dm
+++ b/code/datums/wires/particle_accelerator.dm
@@ -27,7 +27,7 @@
if(WIRE_LIMIT)
C.visible_message("[icon2html(C, viewers(holder))][C] makes a large whirring noise.")
-/datum/wires/particle_accelerator/control_box/on_cut(wire, mend)
+/datum/wires/particle_accelerator/control_box/on_cut(wire, mob/user, mend)
var/obj/machinery/particle_accelerator/control_box/C = holder
switch(wire)
if(WIRE_POWER)
diff --git a/code/datums/wires/r_n_d.dm b/code/datums/wires/r_n_d.dm
index 7aaad875faa59..5c2b2a04ace2c 100644
--- a/code/datums/wires/r_n_d.dm
+++ b/code/datums/wires/r_n_d.dm
@@ -31,7 +31,7 @@
if(WIRE_DISABLE)
R.disabled = !R.disabled
ui_update()
-/datum/wires/rnd/on_cut(wire, mend)
+/datum/wires/rnd/on_cut(wire, mob/user, mend)
var/obj/machinery/rnd/R = holder
switch(wire)
if(WIRE_HACK)
diff --git a/code/datums/wires/robot.dm b/code/datums/wires/robot.dm
index 9bd3c15a09325..571675320c554 100644
--- a/code/datums/wires/robot.dm
+++ b/code/datums/wires/robot.dm
@@ -66,13 +66,14 @@
R.visible_message("[R]'s module servos twitch.", "Your module display flickers.")
ui_update()
-/datum/wires/robot/on_cut(wire, mend)
+/datum/wires/robot/on_cut(wire, mob/user, mend)
var/mob/living/silicon/robot/R = holder
switch(wire)
if(WIRE_AI) // Cut the AI wire to reset AI control.
if(!mend)
R.notify_ai(DISCONNECT)
- log_combat(usr, R, "cut AI wire on cyborg[R.connected_ai ? " and disconnected from [ADMIN_LOOKUP(R.connected_ai)]": ""]", important = FALSE)
+ if (user)
+ log_combat(user, R, "cut AI wire on cyborg[R.connected_ai ? " and disconnected from [ADMIN_LOOKUP(R.connected_ai)]": ""]", important = FALSE)
if(R.shell)
R.undeploy()
R.connected_ai = null
@@ -81,24 +82,29 @@
if(mend)
if(!R.emagged)
R.lawupdate = TRUE
- log_combat(usr, R, "enabled lawsync via wire", important = FALSE)
+ if (user)
+ log_combat(user, R, "enabled lawsync via wire", important = FALSE)
else if(!R.deployed) //AI shells must always have the same laws as the AI
R.lawupdate = FALSE
- log_combat(usr, R, "disabled lawsync via wire")
+ if (user)
+ log_combat(user, R, "disabled lawsync via wire")
R.logevent("Lawsync Module fault [mend?"cleared":"detected"]")
if (WIRE_CAMERA) // Disable the camera.
if(!QDELETED(R.builtInCamera) && !R.scrambledcodes)
R.builtInCamera.status = mend
- R.builtInCamera.toggle_cam(usr, FALSE)
+ R.builtInCamera.toggle_cam(user, FALSE)
R.visible_message("[R]'s camera lens focuses loudly.", "Your camera lens focuses loudly.")
R.logevent("Camera Module fault [mend?"cleared":"detected"]")
- log_combat(usr, R, "[mend ? "enabled" : "disabled"] cyborg camera via wire")
+ if (user)
+ log_combat(user, R, "[mend ? "enabled" : "disabled"] cyborg camera via wire")
if(WIRE_LOCKDOWN) // Simple lockdown.
R.SetLockdown(!mend)
R.logevent("Motor Controller fault [mend?"cleared":"detected"]")
- log_combat(usr, R, "[!R.lockcharge ? "locked down" : "released"] via wire", important = FALSE)
+ if (user)
+ log_combat(user, R, "[!R.lockcharge ? "locked down" : "released"] via wire", important = FALSE)
if(WIRE_RESET_MODULE)
if(R.has_module() && !mend)
R.ResetModule()
- log_combat(usr, R, "reset the cyborg module via wire", important = FALSE)
+ if (user)
+ log_combat(user, R, "reset the cyborg module via wire", important = FALSE)
ui_update()
diff --git a/code/datums/wires/suit_storage_unit.dm b/code/datums/wires/suit_storage_unit.dm
index 7b165622effec..a0c18ba427d5c 100644
--- a/code/datums/wires/suit_storage_unit.dm
+++ b/code/datums/wires/suit_storage_unit.dm
@@ -34,7 +34,7 @@
SSU.shock(usr)
ui_update()
-/datum/wires/suit_storage_unit/on_cut(wire, mend)
+/datum/wires/suit_storage_unit/on_cut(wire, mob/user, mend)
var/obj/machinery/suit_storage_unit/SSU = holder
switch(wire)
if(WIRE_HACK)
@@ -42,6 +42,6 @@
if(WIRE_SAFETY)
SSU.safeties = mend
if(WIRE_ZAP)
- if(usr)
- SSU.shock(usr)
+ if(user)
+ SSU.shock(user)
ui_update()
diff --git a/code/datums/wires/syndicatebomb.dm b/code/datums/wires/syndicatebomb.dm
index 7e6e5fd0d4e56..22e9d8843e329 100644
--- a/code/datums/wires/syndicatebomb.dm
+++ b/code/datums/wires/syndicatebomb.dm
@@ -78,7 +78,7 @@
B.detonation_timer += 10 SECONDS
delayed_hesitate = TRUE
-/datum/wires/syndicatebomb/on_cut(wire, mend)
+/datum/wires/syndicatebomb/on_cut(wire, mob/user, mend)
var/obj/machinery/syndicatebomb/B = holder
switch(wire)
if(WIRE_BOOM)
diff --git a/code/datums/wires/vending.dm b/code/datums/wires/vending.dm
index c703b88105ef8..d8ed05a2685c3 100644
--- a/code/datums/wires/vending.dm
+++ b/code/datums/wires/vending.dm
@@ -42,7 +42,7 @@
V.shut_up = !V.shut_up
ui_update()
-/datum/wires/vending/on_cut(wire, mend)
+/datum/wires/vending/on_cut(wire, mob/user, mend)
var/obj/machinery/vending/V = holder
switch(wire)
if(WIRE_THROW)
diff --git a/code/game/gamemodes/gangs/dominator.dm b/code/game/gamemodes/gangs/dominator.dm
index b1ecf4b1a2cc7..7d9a88b0f97dd 100644
--- a/code/game/gamemodes/gangs/dominator.dm
+++ b/code/game/gamemodes/gangs/dominator.dm
@@ -11,6 +11,7 @@
anchored = TRUE
layer = HIGH_OBJ_LAYER
max_integrity = 300
+ max_hit_damage = 30
integrity_failure = 0.33
move_resist = INFINITY
armor = list(MELEE = 20, BULLET = 50, LASER = 50, ENERGY = 50, BOMB = 10, BIO = 100, RAD = 100, FIRE = 10, ACID = 70, STAMINA = 0, BLEED = 0)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 4ed8601855d46..c946c241ddef8 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -1406,7 +1406,7 @@
/obj/machinery/door/airlock/proc/on_break()
if(!panel_open)
panel_open = TRUE
- wires.cut_all()
+ wires.cut_all(null)
/obj/machinery/door/airlock/proc/set_electrified(seconds, mob/user)
secondsElectrified = seconds
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index c0e616567412b..cb3b618366e5e 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -434,7 +434,7 @@
if(storage)
storage.take_damage(burn_damage * 10, BURN, FIRE)
// The wires get damaged too.
- wires.cut_all()
+ wires.cut_all(null)
if(!toasted) //Special toast check to prevent a double finishing message.
if(mob_occupant)
visible_message("[src]'s door slides open, barraging you with the nauseating smell of charred flesh.")
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index b0431004d0a4b..ebe52425ab759 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -272,7 +272,7 @@
/obj/machinery/syndicatebomb/empty/Initialize(mapload)
. = ..()
- wires.cut_all()
+ wires.cut_all(null)
/obj/machinery/syndicatebomb/self_destruct
name = "self-destruct device"
diff --git a/code/game/objects/items/crab17.dm b/code/game/objects/items/crab17.dm
index 86c70df846b98..60b1769475811 100644
--- a/code/game/objects/items/crab17.dm
+++ b/code/game/objects/items/crab17.dm
@@ -39,6 +39,7 @@
pixel_z = -8
layer = LARGE_MOB_LAYER
max_integrity = 600
+ max_hit_damage = 30
/// when this gets at this hp, it will run away! oh no!
var/next_health_to_teleport
var/mob/living/carbon/human/bogdanoff
diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index d3fda33147799..8ff8fb726f7e7 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -156,7 +156,7 @@
pai.can_transmit = !pai.can_transmit
else //receiving
pai.can_receive = !pai.can_receive
- pai.radio.wires.cut(transmit_holder)//wires.cut toggles cut and uncut states
+ pai.radio.wires.cut(transmit_holder, usr)//wires.cut toggles cut and uncut states
transmit_holder = (transmitting ? pai.can_transmit : pai.can_receive) //recycling can be fun!
to_chat(usr, "You [transmit_holder ? "enable" : "disable"] your pAI's [transmitting ? "outgoing" : "incoming"] radio transmissions!")
to_chat(pai, "Your owner has [transmit_holder ? "enabled" : "disabled"] your [transmitting ? "outgoing" : "incoming"] radio transmissions!")
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index 93241ea271168..2896ec94f9357 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -98,7 +98,7 @@
/obj/item/radio/Initialize(mapload)
wires = new /datum/wires/radio(src)
if(prison_radio)
- wires.cut(WIRE_TX) // OH GOD WHY
+ wires.cut(WIRE_TX, null) // OH GOD WHY
secure_radio_connections = new
. = ..()
frequency = sanitize_frequency(frequency, freerange)
diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm
index b2bbb5945c85b..2c34e1f6cca52 100644
--- a/code/game/objects/items/weaponry.dm
+++ b/code/game/objects/items/weaponry.dm
@@ -947,16 +947,17 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/club
name = "Billy club"
- desc = "Used to bash heads and break down defenses."
+ desc = "A club designed for breaching enclosed spaces, with an insulated handle-guard to prevent shocks."
icon_state = "billyclub"
item_state = "classic_baton"
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
- force = 10
+ force = 12
throwforce = 5
attack_verb_continuous = list("clubs", "bludgeons")
attack_verb_simple = list("club", "bludgeon")
item_flags = ISWEAPON
+ siemens_coefficient = 0
var/breakforce = 30
var/stamforce = 15
@@ -970,17 +971,21 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
H.apply_damage(stamforce, STAMINA, blocked = def_check)
return ..()
-/obj/item/club/afterattack(atom/A, mob/user, proximity)
- . = ..()
- if(!proximity)
- return
- if(istype(A, /obj/structure/window) || istype(A, /obj/machinery/door/window)\
- || istype(A, /obj/structure/windoor_assembly) || istype(A, /obj/structure/table/glass)) //Bonus damage to windows, windoors, and windoor assemblies
- var/obj/W = A
- W.take_damage(30, BRUTE, MELEE, 0)
- else if(istype(A, /obj/structure/grille)) //Bonus damage to grilles
- var/obj/structure/grille/G = A
- G.take_damage(20, BRUTE, MELEE, 0)
+/obj/item/club/pre_attack(atom/A, mob/living/user, params)
+ force = initial(force)
+ armour_penetration = initial(armour_penetration)
+ if(isstructure(A) || ismachinery(A) || isturf(A))
+ force *= 4
+ armour_penetration += 50
+ // To prevent unnecessary force string calculation (we want this to be treated
+ // as if it wasn't changed)
+ last_force_string_check = force
+ return ..()
+
+/obj/item/club/set_force_string()
+ // If we do need to calculate the new force string, make sure we are using the original force
+ force = initial(force)
+ return ..()
/obj/item/club/tailclub
name = "tail club"
diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm
index 3aeaa50a71511..4fee093fd8c17 100644
--- a/code/game/objects/obj_defense.dm
+++ b/code/game/objects/obj_defense.dm
@@ -14,6 +14,8 @@
damage_amount = run_obj_armor(damage_amount, damage_type, damage_flag, attack_dir, armour_penetration)
if(damage_amount < DAMAGE_PRECISION)
return
+ if (!isnull(max_hit_damage))
+ damage_amount = min(damage_amount, max_hit_damage)
//Object is basssiiiiccaalllyyy guaranteed to take damage by this point, lets run our signal
if(SEND_SIGNAL(src, COMSIG_OBJ_TAKE_DAMAGE, damage_amount, damage_type, damage_flag, sound_effect, attack_dir, armour_penetration) & COMPONENT_NO_TAKE_DAMAGE)
return
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index b9dcdeb11204b..b2613c87ab729 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -18,8 +18,10 @@
var/max_integrity = 500
/// The object will break once obj_integrity reaches this amount in take_damage(). 0 if we have no special broken behavior, otherwise is a percentage of at what point the obj breaks. 0.5 being 50%
var/integrity_failure = 0
- ///Damage under this value will be completely ignored
+ /// Damage under this value will be completely ignored
var/damage_deflection = 0
+ /// Maximum damage that can be taken in a single hit
+ var/max_hit_damage = null
/// INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ON_FIRE | UNACIDABLE | ACID_PROOF
var/resistance_flags = NONE
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 8d68cfdb57219..5d5f99b5e0f8a 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -149,11 +149,11 @@
user.changeNext_move(CLICK_CD_MELEE)
add_fingerprint(user)
if(W.tool_behaviour == TOOL_WIRECUTTER)
- if(!shock(user, 100))
+ if(!shock(user, 100 * W.siemens_coefficient))
W.play_tool_sound(src, 100)
deconstruct()
else if((W.tool_behaviour == TOOL_SCREWDRIVER) && (isturf(loc) || anchored))
- if(!shock(user, 90))
+ if(!shock(user, 90 * W.siemens_coefficient))
W.play_tool_sound(src, 100)
set_anchored(!anchored)
user.visible_message("[user] [anchored ? "fastens" : "unfastens"] [src].", \
@@ -161,7 +161,7 @@
return
else if(istype(W, /obj/item/stack/rods) && broken)
var/obj/item/stack/rods/R = W
- if(!shock(user, 90))
+ if(!shock(user, 90 * W.siemens_coefficient))
user.visible_message("[user] rebuilds the broken grille.", \
"You rebuild the broken grille.")
new grille_type(src.loc)
@@ -210,7 +210,7 @@
return
//window placing end
- else if(istype(W, /obj/item/shard) || !shock(user, 70))
+ else if(istype(W, /obj/item/shard) || !shock(user, 70 * W.siemens_coefficient))
return ..()
/obj/structure/grille/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
diff --git a/code/modules/antagonists/blob/structures/core.dm b/code/modules/antagonists/blob/structures/core.dm
index 1840b272ed2c7..5ed9ce87c3833 100644
--- a/code/modules/antagonists/blob/structures/core.dm
+++ b/code/modules/antagonists/blob/structures/core.dm
@@ -4,6 +4,7 @@
icon_state = "blank_blob"
desc = "A huge, pulsating yellow mass."
max_integrity = 400
+ max_hit_damage = 40
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 75, ACID = 90, STAMINA = 0, BLEED = 0)
explosion_block = 6
point_return = -1
diff --git a/code/modules/antagonists/blob/structures/factory.dm b/code/modules/antagonists/blob/structures/factory.dm
index 39532b48b750f..0bd47d7a1acd5 100644
--- a/code/modules/antagonists/blob/structures/factory.dm
+++ b/code/modules/antagonists/blob/structures/factory.dm
@@ -4,6 +4,7 @@
icon_state = "blob_factory"
desc = "A thick spire of tendrils."
max_integrity = 200
+ max_hit_damage = 40
health_regen = 1
point_return = 25
resistance_flags = LAVA_PROOF
diff --git a/code/modules/antagonists/blob/structures/node.dm b/code/modules/antagonists/blob/structures/node.dm
index 7657d896696e4..89ba25e521558 100644
--- a/code/modules/antagonists/blob/structures/node.dm
+++ b/code/modules/antagonists/blob/structures/node.dm
@@ -4,6 +4,7 @@
icon_state = "blank_blob"
desc = "A large, pulsating yellow mass."
max_integrity = 200
+ max_hit_damage = 40
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 65, ACID = 90, STAMINA = 0, BLEED = 0)
health_regen = 3
point_return = 25
diff --git a/code/modules/antagonists/clock_cult/clockwork_massive.dm b/code/modules/antagonists/clock_cult/clockwork_massive.dm
index aa19c1480fbce..ee2fed63dd048 100644
--- a/code/modules/antagonists/clock_cult/clockwork_massive.dm
+++ b/code/modules/antagonists/clock_cult/clockwork_massive.dm
@@ -6,6 +6,7 @@ GLOBAL_LIST_INIT(clockwork_portals, list())
clockwork_desc = "Nezbere's magnum opus: a hulking clockwork machine capable of combining bluespace and steam power to summon Ratvar. Once activated, \
its instability will cause one-way bluespace rifts to open across the station to the City of Cogs, so be prepared to defend it at all costs."
max_integrity = 1000
+ max_hit_damage = 25
icon = 'icons/effects/96x96.dmi'
icon_state = "clockwork_gateway_components"
pixel_x = -32
diff --git a/code/modules/antagonists/space_dragon/carp_rift.dm b/code/modules/antagonists/space_dragon/carp_rift.dm
index c16d71bd6d90f..643119e949ebc 100644
--- a/code/modules/antagonists/space_dragon/carp_rift.dm
+++ b/code/modules/antagonists/space_dragon/carp_rift.dm
@@ -62,6 +62,7 @@
desc = "A rift akin to the ones space carp use to travel long distances."
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 50, BIO = 100, RAD = 100, FIRE = 100, ACID = 100, STAMINA = 0, BLEED = 0)
max_integrity = 300
+ max_hit_damage = 50
icon = 'icons/obj/carp_rift.dmi'
icon_state = "carp_rift_carpspawn"
light_color = LIGHT_COLOR_PURPLE
diff --git a/code/modules/holoparasite/abilities/lesser/radio.dm b/code/modules/holoparasite/abilities/lesser/radio.dm
index b96dbe03680ed..f078d0c97cecc 100644
--- a/code/modules/holoparasite/abilities/lesser/radio.dm
+++ b/code/modules/holoparasite/abilities/lesser/radio.dm
@@ -34,7 +34,7 @@
binary = TRUE
radio.keyslot.translate_binary = TRUE
if(!can_talk)
- radio.wires.cut(WIRE_TX)
+ radio.wires.cut(WIRE_TX, null)
radio.recalculateChannels()
generate_regex()
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index 55c9fff6eb1e9..5f6949d226a05 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -216,9 +216,9 @@
qdel(src)
if(2)
for(var/i = 1; i < 3; i++)
- wires.cut_random()
+ wires.cut_random(null)
if(3)
- wires.cut_random()
+ wires.cut_random(null)
/mob/living/simple_animal/bot/mulebot/bullet_act(obj/projectile/Proj)
@@ -228,7 +228,7 @@
unload(0)
if(prob(25))
visible_message("Something shorts out inside [src]!")
- wires.cut_random()
+ wires.cut_random(null)
/mob/living/simple_animal/bot/mulebot/interact(mob/user)
if(open && !isAI(user))
diff --git a/code/modules/projectiles/projectile/bullets/shotgun.dm b/code/modules/projectiles/projectile/bullets/shotgun.dm
index 86a443b61519b..64550fa036a23 100644
--- a/code/modules/projectiles/projectile/bullets/shotgun.dm
+++ b/code/modules/projectiles/projectile/bullets/shotgun.dm
@@ -146,8 +146,8 @@
bleed_force = BLEED_SURFACE
/obj/projectile/bullet/shotgun_breaching/on_hit(atom/target)
- if(istype(target, /obj/structure/window) || istype(target, /obj/structure/grille) || istype(target, /obj/machinery/door) || istype(target, /obj/structure/door_assembly))
+ if(isstructure(target) || ismachinery(target))
damage = 500 //one shot to break a window or grille, or 3 shots to breach an airlock door
if (isturf(target))
- damage = 300
+ damage = 700
..()
diff --git a/code/modules/wiremod/shell/airlock.dm b/code/modules/wiremod/shell/airlock.dm
index 358d4dcd9610d..89d58ec5992a0 100644
--- a/code/modules/wiremod/shell/airlock.dm
+++ b/code/modules/wiremod/shell/airlock.dm
@@ -2,7 +2,7 @@
holder_type = /obj/machinery/door/airlock/shell
proper_name = "Circuit Airlock"
-/datum/wires/airlock/shell/on_cut(wire, mend)
+/datum/wires/airlock/shell/on_cut(wire, mob/user, mend)
// Don't allow them to re-enable autoclose.
if(wire == WIRE_TIMING)
return