Logging for prying (#91905)

## About The Pull Request
closes https://github.com/tgstation/tgstation/issues/91900
## Changelog
🆑
admin: added missing logs for prying
/🆑
This commit is contained in:
grungussuss
2025-07-05 12:26:41 +02:00
committed by GitHub
parent 66f4159da3
commit e62798df75
4 changed files with 36 additions and 21 deletions
+7
View File
@@ -40,6 +40,7 @@
if (airlock_target.locked || airlock_target.welded || airlock_target.seal)
airlock_target.balloon_alert(attacker, "it's sealed!")
attacker.log_message("Tried to pry open [src], located at [loc_name(src)], but failed due to the airlock being sealed.", LOG_GAME)
return COMPONENT_CANCEL_ATTACK_CHAIN
INVOKE_ASYNC(src, PROC_REF(open_door), attacker, airlock_target)
@@ -49,6 +50,7 @@
/datum/element/door_pryer/proc/open_door(mob/living/basic/attacker, obj/machinery/door/airlock/airlock_target)
if (!airlock_target.hasPower())
attacker.visible_message(span_warning("[attacker] forces the [airlock_target] to open."))
attacker.log_message("Pried open [src], located at [loc_name(src)].", LOG_GAME)
airlock_target.open(FORCING_DOOR_CHECKS)
return
@@ -60,13 +62,18 @@
message = span_warning("[attacker] starts forcing the [airlock_target] open!"),
blind_message = span_hear("You hear a metal screeching sound."),
)
attacker.log_message("Started prying open [src], located at [loc_name(src)].", LOG_GAME)
playsound(airlock_target, 'sound/machines/airlock/airlock_alien_prying.ogg', 100, TRUE)
airlock_target.balloon_alert(attacker, "prying...")
if(!do_after(attacker, pry_time, airlock_target))
airlock_target.balloon_alert(attacker, "interrupted!")
attacker.log_message("Tried and failed to pry open [src], located at [loc_name(src)], due to getting interrupted.", LOG_GAME)
return
if(airlock_target.locked)
attacker.log_message("Tried and failed to pry open [src], located at [loc_name(src)], due to the airlock getting bolted during the do_after.", LOG_GAME)
return
attacker.visible_message(span_warning("[attacker] forces the [airlock_target] to open."))
attacker.log_message("Successfully pried open [src], located at [loc_name(src)].", LOG_GAME)
airlock_target.open(BYPASS_DOOR_CHECKS)
airlock_target.take_damage(AIRLOCK_PRY_DAMAGE, BRUTE, sound_effect = FALSE)
+21 -19
View File
@@ -235,10 +235,28 @@
/obj/machinery/big_manipulator/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(user.combat_mode)
return NONE
if(!panel_open || !is_wire_tool(tool))
if(!panel_open)
return NONE
wires.interact(user)
return ITEM_INTERACT_SUCCESS
if(isidcard(tool))
var/obj/item/card/id/clicked_by_this_id = tool
if(!isnull(locked_by_this_id))
var/obj/item/card/id/resolve_id = locked_by_this_id.resolve()
if(clicked_by_this_id != resolve_id)
balloon_alert(user, "locked by another id!")
return ITEM_INTERACT_BLOCKING
locked_by_this_id = null
change_id_locked_status(user)
return ITEM_INTERACT_SUCCESS
locked_by_this_id = WEAKREF(clicked_by_this_id)
change_id_locked_status(user)
return ITEM_INTERACT_SUCCESS
if(is_wire_tool(tool))
wires.interact(user)
return ITEM_INTERACT_SUCCESS
return NONE
/obj/machinery/big_manipulator/RefreshParts()
. = ..()
@@ -310,22 +328,6 @@
y_add = 32 + manipulator_arm.calculate_item_offset(FALSE, pixels_to_offset = 16)
)
/obj/machinery/big_manipulator/attackby(obj/item/is_card, mob/user, params)
. = ..()
if(!isidcard(is_card))
return
var/obj/item/card/id/clicked_by_this_id = is_card
if(!isnull(locked_by_this_id))
var/obj/item/card/id/resolve_id = locked_by_this_id.resolve()
if(clicked_by_this_id != resolve_id)
balloon_alert(user, "locked by another id")
return
locked_by_this_id = null
change_id_locked_status(user)
return
locked_by_this_id = WEAKREF(clicked_by_this_id)
change_id_locked_status(user)
/obj/machinery/big_manipulator/proc/change_id_locked_status(mob/user)
id_locked = !id_locked
balloon_alert(user, "successfully [!id_locked ? "un" : ""]locked")
+7 -1
View File
@@ -1499,20 +1499,26 @@
return ..()
if(locked || welded || seal) //Extremely generic, as aliens only understand the basics of how airlocks work.
to_chat(user, span_warning("[src] refuses to budge!"))
user.log_message("Tried to pry open [src], located at [loc_name(src)], but failed due to the airlock being sealed.", LOG_GAME)
return
add_fingerprint(user)
user.visible_message(span_warning("[user] begins prying open [src]."),\
span_noticealien("You begin digging your claws into [src] with all your might!"),\
span_warning("You hear groaning metal..."))
user.log_message("Started prying open [src], located at [loc_name(src)].", LOG_GAME)
var/time_to_open = 5 //half a second
if(hasPower())
time_to_open = 5 SECONDS //Powered airlocks take longer to open, and are loud.
playsound(src, 'sound/machines/airlock/airlock_alien_prying.ogg', 100, TRUE)
if(do_after(user, time_to_open, src))
if(density && !open(BYPASS_DOOR_CHECKS)) //The airlock is still closed, but something prevented it opening. (Another player noticed and bolted/welded the airlock in time!)
to_chat(user, span_warning("Despite your efforts, [src] managed to resist your attempts to open it!"))
user.log_message("Tried and failed to pry open [src], located at [loc_name(src)], due to the airlock getting sealed during the do_after.", LOG_GAME)
return
user.log_message("Successfully pried open [src], located at [loc_name(src)].", LOG_GAME)
return
user.log_message("Tried and failed to pry open [src], located at [loc_name(src)], due to getting interrupted.", LOG_GAME)
/obj/machinery/door/airlock/hostile_lockdown(mob/origin)
// Must be powered and have working AI wire.
+1 -1
View File
@@ -354,9 +354,9 @@ GLOBAL_LIST_EMPTY(station_turfs)
// So it doesn't trigger other zFall calls. Cleared on zMove.
falling.set_currently_z_moving(CURRENTLY_Z_FALLING)
falling.zMove(null, target, ZMOVE_CHECK_PULLEDBY)
target.zImpact(falling, levels, src)
return TRUE
///Called each time the target falls down a z level possibly making their trajectory come to a halt. see __DEFINES/movement.dm.