mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
afterattack now returns a flag if it's reasonable to suspect the user intends to act on an item (#72320)
Necessary for #72292 to work effectively, and probably not very useful out of that context. Split out of its own PR because this is long and boring. I want to make sure that we're catching actual mistakes there, and not just experiencing side effects of how shitty the attack chain is.
This commit is contained in:
@@ -156,18 +156,23 @@
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(isOn() && !QDELETED(attacked_atom) && isliving(attacked_atom)) // can't ignite something that doesn't exist
|
||||
handle_fuel_and_temps(1, user)
|
||||
var/mob/living/attacked_mob = attacked_atom
|
||||
if(attacked_mob.ignite_mob())
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] set [key_name_admin(attacked_mob)] on fire with [src] at [AREACOORD(user)]")
|
||||
user.log_message("set [key_name(attacked_mob)] on fire with [src].", LOG_ATTACK)
|
||||
if(isOn())
|
||||
. |= AFTERATTACK_PROCESSED_ITEM
|
||||
if (!QDELETED(attacked_atom) && isliving(attacked_atom)) // can't ignite something that doesn't exist
|
||||
handle_fuel_and_temps(1, user)
|
||||
var/mob/living/attacked_mob = attacked_atom
|
||||
if(attacked_mob.ignite_mob())
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] set [key_name_admin(attacked_mob)] on fire with [src] at [AREACOORD(user)]")
|
||||
user.log_message("set [key_name(attacked_mob)] on fire with [src].", LOG_ATTACK)
|
||||
|
||||
if(!status && attacked_atom.is_refillable())
|
||||
. |= AFTERATTACK_PROCESSED_ITEM
|
||||
reagents.trans_to(attacked_atom, reagents.total_volume, transfered_by = user)
|
||||
to_chat(user, span_notice("You empty [src]'s fuel tank into [attacked_atom]."))
|
||||
update_appearance()
|
||||
|
||||
return .
|
||||
|
||||
/obj/item/weldingtool/attack_qdeleted(atom/attacked_atom, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
|
||||
Reference in New Issue
Block a user