mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Verb cleanup (#22224)
* Verb cleanup * rest of the object verbs * little more object cleanup * more changes * last of it * this too * tgui * code review * time to go
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
else
|
||||
. += "<span class='notice'>The window is <i>unscrewed</i> from the floor, and could be deconstructed by <b>wrenching</b>.</span>"
|
||||
if(!anchored && !fulltile)
|
||||
. += "<span class='notice'>Alt-click to rotate it.</span>"
|
||||
. += "<span class='notice'><b>Alt-Click</b> to rotate it.</span>"
|
||||
|
||||
/obj/structure/window/Initialize(mapload, direct)
|
||||
. = ..()
|
||||
@@ -372,61 +372,10 @@
|
||||
if(fulltile)
|
||||
. += new shardtype(location)
|
||||
|
||||
/obj/structure/window/verb/rotate()
|
||||
set name = "Rotate Window Counter-Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
if(anchored)
|
||||
to_chat(usr, "<span class='warning'>[src] cannot be rotated while it is fastened to the floor!</span>")
|
||||
return FALSE
|
||||
|
||||
var/target_dir = turn(dir, 90)
|
||||
if(!valid_window_location(loc, target_dir))
|
||||
to_chat(usr, "<span class='warning'>[src] cannot be rotated in that direction!</span>")
|
||||
return FALSE
|
||||
|
||||
setDir(target_dir)
|
||||
air_update_turf(1)
|
||||
ini_dir = dir
|
||||
add_fingerprint(usr)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/window/verb/revrotate()
|
||||
set name = "Rotate Window Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
if(anchored)
|
||||
to_chat(usr, "<span class='warning'>[src] cannot be rotated while it is fastened to the floor!</span>")
|
||||
return FALSE
|
||||
|
||||
var/target_dir = turn(dir, 270)
|
||||
|
||||
if(!valid_window_location(loc, target_dir))
|
||||
to_chat(usr, "<span class='warning'>[src] cannot be rotated in that direction!</span>")
|
||||
return FALSE
|
||||
|
||||
setDir(target_dir)
|
||||
ini_dir = dir
|
||||
add_fingerprint(usr)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/window/AltClick(mob/user)
|
||||
if(fulltile) // Can't rotate these.
|
||||
return ..()
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
|
||||
if(!Adjacent(user))
|
||||
to_chat(user, "<span class='warning'>Move closer to the window!</span>")
|
||||
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
|
||||
return
|
||||
|
||||
if(anchored)
|
||||
@@ -444,7 +393,6 @@
|
||||
setDir(target_dir)
|
||||
ini_dir = dir
|
||||
add_fingerprint(user)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/window/Destroy()
|
||||
density = FALSE
|
||||
|
||||
Reference in New Issue
Block a user