mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
Adds alert to direction locking, minor refactor (#23445)
* Adds alert to direction locking, minor refactor * use return
This commit is contained in:
@@ -252,11 +252,9 @@
|
||||
return
|
||||
var/face_dir = get_cardinal_dir(src, A)
|
||||
if(!face_dir || forced_look == face_dir || A == src)
|
||||
forced_look = null
|
||||
to_chat(src, "<span class='notice'>Cancelled direction lock.</span>")
|
||||
clear_forced_look()
|
||||
return
|
||||
forced_look = face_dir
|
||||
to_chat(src, "<span class='userdanger'>You are now facing [dir2text(forced_look)]. To cancel this, shift-middleclick yourself.</span>")
|
||||
set_forced_look(A, FALSE)
|
||||
|
||||
/*
|
||||
Middle shift-control-click
|
||||
@@ -266,13 +264,13 @@
|
||||
return
|
||||
|
||||
/mob/living/MiddleShiftControlClickOn(atom/A)
|
||||
if(incapacitated())
|
||||
return
|
||||
var/face_uid = A.UID()
|
||||
if(forced_look == face_uid || A == src)
|
||||
forced_look = null
|
||||
to_chat(src, "<span class='notice'>Cancelled direction lock.</span>")
|
||||
clear_forced_look()
|
||||
return
|
||||
forced_look = face_uid
|
||||
to_chat(src, "<span class='userdanger'>You are now facing [A]. To cancel this, shift-middleclick yourself.</span>")
|
||||
set_forced_look(A, TRUE)
|
||||
|
||||
// In case of use break glass
|
||||
/*
|
||||
|
||||
@@ -337,6 +337,16 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
var/mob/living/L = usr
|
||||
return L.resist()
|
||||
|
||||
/obj/screen/alert/direction_lock
|
||||
name = "Direction Lock"
|
||||
desc = "You are facing only one direction, slowing your movement down. Click here to stop the direction lock."
|
||||
icon_state = "direction_lock"
|
||||
|
||||
/obj/screen/alert/direction_lock/Click()
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
return L.clear_forced_look()
|
||||
|
||||
//Constructs
|
||||
/obj/screen/alert/holy_fire
|
||||
name = "Holy Fire"
|
||||
|
||||
Reference in New Issue
Block a user