Files
VMSolidusandGitHub 676919b876 Turf Hand Fixing (#22189)
Yea this bug was my fault. Here's it fixed. You can now once again close
airlocks by clicking on the turf underneath them.


https://github.com/user-attachments/assets/edd0f178-1ea8-4b3a-86a4-2481660d36fd
2026-04-11 14:24:24 +00:00

22 lines
644 B
Plaintext

/*
This component is used on airlocks and cult runes.
When a mob [attack_hand]s a turf, it will look for objects in itself containing this component.
If such is found, it will call attack_hand on that atom
When multiple of these components are in the tile, the one with the highest priority wins it.
*/
/datum/component/turf_hand
var/priority = 1
var/atom/our_owner
/datum/component/turf_hand/Initialize(var/priority = 1)
..()
if(isatom(parent))
our_owner = parent
src.priority = priority
/datum/component/turf_hand/proc/OnHandInterception(var/mob/user)
if(QDELETED(our_owner))
return FALSE
return our_owner.attack_hand(user)