Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit265
This commit is contained in:
@@ -369,3 +369,35 @@
|
||||
if(hud_used && hud_used.static_inventory)
|
||||
for(var/obj/screen/mov_intent/selector in hud_used.static_inventory)
|
||||
selector.update_icon(src)
|
||||
|
||||
/mob/verb/up()
|
||||
set name = "Move Upwards"
|
||||
set category = "IC"
|
||||
|
||||
if(zMove(UP, TRUE))
|
||||
to_chat(src, "<span class='notice'>You move upwards.</span>")
|
||||
|
||||
/mob/verb/down()
|
||||
set name = "Move Down"
|
||||
set category = "IC"
|
||||
|
||||
if(zMove(DOWN, TRUE))
|
||||
to_chat(src, "<span class='notice'>You move down.</span>")
|
||||
|
||||
/mob/proc/zMove(dir, feedback = FALSE)
|
||||
if(dir != UP && dir != DOWN)
|
||||
return FALSE
|
||||
var/turf/target = get_step_multiz(src, dir)
|
||||
if(!target)
|
||||
if(feedback)
|
||||
to_chat(src, "<span class='warning'>There's nothing in that direction!</span>")
|
||||
return FALSE
|
||||
if(!canZMove(dir, target))
|
||||
if(feedback)
|
||||
to_chat(src, "<span class='warning'>You couldn't move there!</span>")
|
||||
return FALSE
|
||||
forceMove(target)
|
||||
return TRUE
|
||||
|
||||
/mob/proc/canZMove(direction, turf/target)
|
||||
return FALSE
|
||||
Reference in New Issue
Block a user