Ports tgstation/tgstation#39302 with adjustments, see desc of commit (#7424)
Instead of the box being 100% invisible at all times, the box will steadily become more and more visible as you move. The faster you move, the more visible the box becomes. The box will slowly become invisible again every process() cycle. This also makes the box inherit the movement delay of it's user, meaning you're able to sprint while moving inside boxes, or walk to slow yourself down.
This commit is contained in:
@@ -487,6 +487,27 @@
|
||||
else
|
||||
to_chat(owner, "<span class='cultitalic'>Your hands are full!</span>")
|
||||
|
||||
/datum/action/item_action/agent_box
|
||||
name = "Deploy Box"
|
||||
desc = "Find inner peace, here, in the box."
|
||||
check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUN | AB_CHECK_CONSCIOUS
|
||||
background_icon_state = "bg_agent"
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon_state = "deploy_box"
|
||||
var/cooldown = 0
|
||||
var/obj/structure/closet/cardboard/agent/box
|
||||
|
||||
/datum/action/item_action/agent_box/Trigger()
|
||||
if(!box)
|
||||
if(cooldown < world.time - 30)
|
||||
box = new(get_turf(owner))
|
||||
owner.forceMove(box)
|
||||
cooldown = world.time
|
||||
owner.playsound_local(box, 'sound/misc/box_deploy.ogg', 50, TRUE)
|
||||
else
|
||||
owner.forceMove(get_turf(box))
|
||||
owner.playsound_local(box, 'sound/misc/box_deploy.ogg', 50, TRUE)
|
||||
QDEL_NULL(box)
|
||||
|
||||
//Preset for spells
|
||||
/datum/action/spell_action
|
||||
|
||||
Reference in New Issue
Block a user