Rotatable Atom Element (#18440)

* initial work

* a much better way of doing this

* these are needed

* minimize change

* nope

* missing elements

* whitespace

* species cases

* reduce pasta in ghosts

* more small fixes

* fixes for windows and inventory

* unneeded

* protected

* circulator uses examine

---------

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
Will
2025-09-14 05:02:26 -04:00
committed by GitHub
co-authored by Cameron Lennox
parent fd88655073
commit 22ffba8354
31 changed files with 177 additions and 743 deletions
@@ -26,9 +26,8 @@
/obj/machinery/atmospherics/binary/circulator/Initialize(mapload)
. = ..()
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
air1.volume = 400
AddElement(/datum/element/rotatable)
/obj/machinery/atmospherics/binary/circulator/proc/return_transfer_air()
var/datum/gas_mixture/removed
@@ -129,25 +128,6 @@
else
..()
/obj/machinery/atmospherics/binary/circulator/verb/rotate_clockwise()
set name = "Rotate Circulator Clockwise"
set category = "Object"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 270))
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
/obj/machinery/atmospherics/binary/circulator/verb/rotate_counterclockwise()
set name = "Rotate Circulator Counterclockwise"
set category = "Object"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 90))
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
/obj/machinery/atmospherics/binary/circulator/examine(mob/user, infix, suffix)
. = ..()
. += span_infoplain("Its outlet port is to the [dir2text(dir)].")
@@ -33,6 +33,9 @@
if(WEST)
initialize_directions = NORTH|SOUTH
AddElement(/datum/element/climbable)
AddElement(/datum/element/rotatable)
/obj/machinery/atmospherics/pipeturbine/Destroy()
. = ..()
@@ -115,27 +118,6 @@
return
..()
/obj/machinery/atmospherics/pipeturbine/verb/rotate_clockwise()
set name = "Rotate Turbine Clockwise"
set category = "Object"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 270))
/obj/machinery/atmospherics/pipeturbine/verb/rotate_counterclockwise()
set name = "Rotate Turbine Counterclockwise"
set category = "Object"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 90))
//Goddamn copypaste from binary base class because atmospherics machinery API is not damn flexible
/obj/machinery/atmospherics/pipeturbine/get_neighbor_nodes_for_init()
return list(node1, node2)
@@ -238,6 +220,8 @@
/obj/machinery/power/turbinemotor/Initialize(mapload)
. = ..()
updateConnection()
AddElement(/datum/element/climbable)
AddElement(/datum/element/rotatable)
/obj/machinery/power/turbinemotor/proc/updateConnection()
turbine = null
@@ -264,23 +248,3 @@
updateConnection()
else
..()
/obj/machinery/power/turbinemotor/verb/rotate_clockwise()
set name = "Rotate Motor Clockwise"
set category = "Object"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 270))
/obj/machinery/power/turbinemotor/verb/rotate_counterclockwise()
set name = "Rotate Motor Counterclockwise"
set category = "Object"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 90))