You can now buckle people to target stakes (#34514)

* Update target_stake.dm

* Update target_stake.dm

* Update target_stake.dm
This commit is contained in:
kevinz000
2018-01-19 07:52:32 -08:00
committed by CitadelStationBot
parent c6f227fc18
commit b7df40727d

View File

@@ -3,8 +3,11 @@
desc = "A thin platform with negatively-magnetized wheels."
icon = 'icons/obj/objects.dmi'
icon_state = "target_stake"
density = TRUE
density = FALSE
flags_1 = CONDUCT_1
can_buckle = TRUE
max_buckled_mobs = 1
buckle_lying = FALSE
var/obj/item/target/pinned_target
/obj/structure/target_stake/Destroy()
@@ -12,6 +15,20 @@
pinned_target.nullPinnedLoc()
return ..()
/obj/structure/target_stake/proc/handle_density()
if(length(buckled_mobs) || pinned_target)
density = TRUE
else
density = FALSE
/obj/structure/target_stake/post_buckle_mob()
handle_density()
return ..()
/obj/structure/target_stake/post_unbuckle_mob()
handle_density()
return ..()
/obj/structure/target_stake/proc/nullPinnedTarget()
pinned_target = null
@@ -28,6 +45,7 @@
T.pinnedLoc = src
T.density = TRUE
T.layer = OBJ_LAYER + 0.01
handle_density()
to_chat(user, "<span class='notice'>You slide the target into the stake.</span>")
/obj/structure/target_stake/attack_hand(mob/user)
@@ -39,6 +57,7 @@
pinned_target.forceMove(user.loc)
pinned_target.nullPinnedLoc()
nullPinnedTarget()
handle_density()
if(ishuman(user))
if(!user.get_active_held_item())
user.put_in_hands(pinned_target)