mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
[MIRROR] Rotatable Atom Element (#11639)
Co-authored-by: Will <7099514+Willburd@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
60c314ec40
commit
d5605935a4
@@ -348,6 +348,7 @@ GLOBAL_LIST(construction_frame_floor)
|
||||
update_icon()
|
||||
|
||||
AddElement(/datum/element/climbable)
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/structure/frame/attackby(obj/item/P as obj, mob/user as mob)
|
||||
if(P.has_tool_quality(TOOL_WRENCH))
|
||||
@@ -688,40 +689,3 @@ GLOBAL_LIST(construction_frame_floor)
|
||||
update_desc()
|
||||
to_chat(user, desc)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/frame/verb/rotate_counterclockwise()
|
||||
set name = "Rotate Frame Counter-Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.incapacitated())
|
||||
return FALSE
|
||||
|
||||
if(anchored)
|
||||
to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
|
||||
return FALSE
|
||||
|
||||
src.set_dir(turn(src.dir, 90))
|
||||
|
||||
to_chat(usr, span_notice("You rotate the [src] to face [dir2text(dir)]!"))
|
||||
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/frame/verb/rotate_clockwise()
|
||||
set name = "Rotate Frame Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.incapacitated())
|
||||
return FALSE
|
||||
|
||||
if(anchored)
|
||||
to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
|
||||
return FALSE
|
||||
|
||||
src.set_dir(turn(src.dir, 270))
|
||||
|
||||
to_chat(usr, span_notice("You rotate the [src] to face [dir2text(dir)]!"))
|
||||
|
||||
return
|
||||
|
||||
@@ -48,7 +48,8 @@ Buildable meters
|
||||
update()
|
||||
pixel_x += rand(-5, 5)
|
||||
pixel_y += rand(-5, 5)
|
||||
return ..()
|
||||
AddElement(/datum/element/rotatable)
|
||||
. = ..()
|
||||
|
||||
/obj/item/pipe/proc/make_from_existing(obj/machinery/atmospherics/make_from)
|
||||
set_dir(make_from.dir)
|
||||
@@ -121,29 +122,10 @@ Buildable meters
|
||||
var/obj/machinery/atmospherics/fakeA = pipe_type
|
||||
icon_state = "[initial(fakeA.pipe_state)][mirrored ? "m" : ""]"
|
||||
|
||||
/obj/item/pipe/verb/rotate_clockwise()
|
||||
set category = "Object"
|
||||
set name = "Rotate Pipe Clockwise"
|
||||
set src in view(1)
|
||||
|
||||
if ( usr.stat || usr.restrained() || !usr.canmove )
|
||||
return
|
||||
|
||||
src.set_dir(turn(src.dir, 270))
|
||||
fixdir()
|
||||
|
||||
//VOREstation edit: counter-clockwise rotation
|
||||
/obj/item/pipe/verb/rotate_counterclockwise()
|
||||
set category = "Object"
|
||||
set name = "Rotate Pipe Counter-Clockwise"
|
||||
set src in view(1)
|
||||
|
||||
if ( usr.stat || usr.restrained() || !usr.canmove )
|
||||
return
|
||||
|
||||
src.set_dir(turn(src.dir, 90))
|
||||
fixdir()
|
||||
//VOREstation edit end
|
||||
/obj/item/pipe/handle_rotation_verbs(angle)
|
||||
. = ..()
|
||||
if(.)
|
||||
fixdir()
|
||||
|
||||
// Don't let pulling a pipe straighten it out.
|
||||
/obj/item/pipe/binary/bendable/Move()
|
||||
|
||||
Reference in New Issue
Block a user