Attack Chain Migration: Tanks (#31873)

* tanks attack chain migration.

Tanks, you're welcome. Now with less curses.

* AGGGHHHHHH!
This commit is contained in:
CRUNCH
2026-04-18 22:11:21 +01:00
committed by GitHub
parent 3046415a73
commit bea76c4592
6 changed files with 35 additions and 27 deletions
-3
View File
@@ -200,9 +200,6 @@
STOP_PROCESSING(SSobj, src)
temp_air_contents = air_contents
/obj/item/tank/jetpack/suit/attack_self__legacy__attackchain()
return
/obj/item/tank/jetpack/suit/cycle(mob/user)
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit))
to_chat(user, SPAN_WARNING("[src] must be connected to a hardsuit!"))
+12 -10
View File
@@ -67,18 +67,20 @@
/obj/item/tank/internals/plasma/populate_gas()
air_contents.set_toxins((3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
/obj/item/tank/internals/plasma/attackby__legacy__attackchain(obj/item/I, mob/user, params)
if(istype(I, /obj/item/flamethrower))
var/obj/item/flamethrower/F = I
if((!F.status)||(F.ptank))
return
master = F
F.ptank = src
user.transfer_item_to(src, F)
F.update_icon()
else
/obj/item/tank/internals/plasma/item_interaction(mob/living/user, obj/item/used, list/modifiers)
if(!istype(used, /obj/item/flamethrower))
return ..()
var/obj/item/flamethrower/F = used
if((!F.status) || (F.ptank))
return ITEM_INTERACT_COMPLETE
master = F
F.ptank = src
user.transfer_item_to(src, F)
F.update_icon()
return ITEM_INTERACT_COMPLETE
/obj/item/tank/internals/plasma/full/populate_gas()
air_contents.set_toxins((10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
@@ -11,6 +11,7 @@
throw_range = 4
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 10, RAD = 0, FIRE = 80, ACID = 30)
actions_types = list(/datum/action/item_action/set_internals)
new_attack_chain = TRUE
var/datum/gas_mixture/air_contents = null
var/distribute_pressure = ONE_ATMOSPHERE
var/integrity = 3
@@ -135,21 +136,27 @@
playsound(src.loc, 'sound/effects/spray.ogg', 10, TRUE, -3)
qdel(src)
/obj/item/tank/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
..()
/obj/item/tank/item_interaction(mob/living/user, obj/item/used, list/modifiers)
add_fingerprint(user)
if(istype(loc, /obj/item/assembly))
icon = loc
return ITEM_INTERACT_COMPLETE
if(istype(W, /obj/item/assembly_holder))
bomb_assemble(W,user)
if(istype(used, /obj/item/assembly_holder))
bomb_assemble(used, user)
return ITEM_INTERACT_COMPLETE
return ..()
/obj/item/tank/activate_self(mob/user)
if(..())
return ITEM_INTERACT_COMPLETE
/obj/item/tank/attack_self__legacy__attackchain(mob/user as mob)
if(!(air_contents))
return
return ITEM_INTERACT_COMPLETE
ui_interact(user)
return ITEM_INTERACT_COMPLETE
/obj/item/tank/ui_state(mob/user)
return GLOB.inventory_state
+7 -5
View File
@@ -12,6 +12,7 @@
actions_types = list(/datum/action/item_action/toggle_mister)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 100, ACID = 30)
resistance_flags = FIRE_PROOF
new_attack_chain = TRUE
var/obj/item/noz
var/on = FALSE
@@ -95,11 +96,12 @@
H.put_in_l_hand(src)
return
/obj/item/watertank/attackby__legacy__attackchain(obj/item/W, mob/user, params)
if(W == noz)
remove_noz()
return
..()
/obj/item/watertank/item_interaction(mob/living/user, obj/item/used, list/modifiers)
if(used != noz)
return ..()
remove_noz()
return ITEM_INTERACT_COMPLETE
// This mister item is intended as an extension of the watertank and always attached to it.
// Therefore, it's designed to be "locked" to the player's hands or extended back onto