mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 04:17:33 +01:00
Genericises rotate() on objects. (#8430)
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
desc = "A gas circulator turbine and heat exchanger."
|
||||
icon = 'icons/obj/pipes.dmi'
|
||||
icon_state = "circ-off"
|
||||
anchored = 0
|
||||
anchored = FALSE
|
||||
obj_flags = OBJ_FLAG_ROTATABLE
|
||||
|
||||
var/kinetic_efficiency = 0.04 //combined kinetic and kinetic-to-electric efficiency
|
||||
var/volume_ratio = 0.2
|
||||
@@ -20,7 +21,7 @@
|
||||
var/volume_capacity_used = 0
|
||||
var/stored_energy = 0
|
||||
|
||||
density = 1
|
||||
density = TRUE
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/Initialize()
|
||||
. = ..()
|
||||
@@ -120,26 +121,3 @@
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/verb/rotate_clockwise()
|
||||
set category = "Object"
|
||||
set name = "Rotate Circulator (Clockwise)"
|
||||
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/verb/rotate_anticlockwise()
|
||||
set category = "Object"
|
||||
set name = "Rotate Circulator (Counterclockwise)"
|
||||
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)]."
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon_state = "turbine"
|
||||
anchored = 0
|
||||
density = 1
|
||||
obj_flags = OBJ_FLAG_ROTATABLE
|
||||
|
||||
var/efficiency = 0.4
|
||||
var/kin_energy = 0
|
||||
@@ -118,27 +119,6 @@
|
||||
else
|
||||
..()
|
||||
|
||||
verb/rotate_clockwise()
|
||||
set category = "Object"
|
||||
set name = "Rotate Circulator (Clockwise)"
|
||||
set src in view(1)
|
||||
|
||||
if (usr.stat || usr.restrained() || anchored)
|
||||
return
|
||||
|
||||
src.set_dir(turn(src.dir, -90))
|
||||
|
||||
|
||||
verb/rotate_anticlockwise()
|
||||
set category = "Object"
|
||||
set name = "Rotate Circulator (Counterclockwise)"
|
||||
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
|
||||
network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
|
||||
if(reference == node1)
|
||||
@@ -230,6 +210,7 @@
|
||||
icon_state = "motor"
|
||||
anchored = 0
|
||||
density = 1
|
||||
obj_flags = OBJ_FLAG_ROTATABLE
|
||||
|
||||
var/kin_to_el_ratio = 0.1 //How much kinetic energy will be taken from turbine and converted into electricity
|
||||
var/obj/machinery/atmospherics/pipeturbine/turbine
|
||||
@@ -267,23 +248,3 @@
|
||||
updateConnection()
|
||||
else
|
||||
..()
|
||||
|
||||
verb/rotate_clock()
|
||||
set category = "Object"
|
||||
set name = "Rotate Motor Clockwise"
|
||||
set src in view(1)
|
||||
|
||||
if (usr.stat || usr.restrained() || anchored)
|
||||
return
|
||||
|
||||
src.set_dir(turn(src.dir, -90))
|
||||
|
||||
verb/rotate_anticlock()
|
||||
set category = "Object"
|
||||
set name = "Rotate Motor Counterclockwise"
|
||||
set src in view(1)
|
||||
|
||||
if (usr.stat || usr.restrained() || anchored)
|
||||
return
|
||||
|
||||
src.set_dir(turn(src.dir, 90))
|
||||
|
||||
Reference in New Issue
Block a user