[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:
CHOMPStation2StaffMirrorBot
2025-09-14 02:20:00 -07:00
committed by GitHub
parent 60c314ec40
commit d5605935a4
31 changed files with 196 additions and 762 deletions

View File

@@ -26,9 +26,8 @@
/obj/machinery/atmospherics/binary/circulator/Initialize(mapload) /obj/machinery/atmospherics/binary/circulator/Initialize(mapload)
. = ..() . = ..()
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
air1.volume = 400 air1.volume = 400
AddElement(/datum/element/rotatable)
/obj/machinery/atmospherics/binary/circulator/proc/return_transfer_air() /obj/machinery/atmospherics/binary/circulator/proc/return_transfer_air()
var/datum/gas_mixture/removed var/datum/gas_mixture/removed
@@ -129,25 +128,6 @@
else else
..() ..()
/obj/machinery/atmospherics/binary/circulator/verb/rotate_clockwise() /obj/machinery/atmospherics/binary/circulator/examine(mob/user, infix, suffix)
set name = "Rotate Circulator Clockwise" . = ..()
set category = "Object" . += span_infoplain("Its outlet port is to the [dir2text(dir)].")
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)]."

View File

@@ -33,6 +33,9 @@
if(WEST) if(WEST)
initialize_directions = NORTH|SOUTH initialize_directions = NORTH|SOUTH
AddElement(/datum/element/climbable)
AddElement(/datum/element/rotatable)
/obj/machinery/atmospherics/pipeturbine/Destroy() /obj/machinery/atmospherics/pipeturbine/Destroy()
. = ..() . = ..()
@@ -115,27 +118,6 @@
return 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 //Goddamn copypaste from binary base class because atmospherics machinery API is not damn flexible
/obj/machinery/atmospherics/pipeturbine/get_neighbor_nodes_for_init() /obj/machinery/atmospherics/pipeturbine/get_neighbor_nodes_for_init()
return list(node1, node2) return list(node1, node2)
@@ -238,6 +220,8 @@
/obj/machinery/power/turbinemotor/Initialize(mapload) /obj/machinery/power/turbinemotor/Initialize(mapload)
. = ..() . = ..()
updateConnection() updateConnection()
AddElement(/datum/element/climbable)
AddElement(/datum/element/rotatable)
/obj/machinery/power/turbinemotor/proc/updateConnection() /obj/machinery/power/turbinemotor/proc/updateConnection()
turbine = null turbine = null
@@ -264,23 +248,3 @@
updateConnection() updateConnection()
else 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))

View File

@@ -0,0 +1,72 @@
/datum/element/rotatable
VAR_PROTECTED/only_flip = FALSE
/datum/element/rotatable/onlyflip
only_flip = TRUE
/datum/element/rotatable/Attach(datum/target)
. = ..()
if(!isatom(target))
return ELEMENT_INCOMPATIBLE
var/atom/set_atom = target
if(!only_flip)
set_atom.verbs |= /atom/movable/proc/rotate_clockwise
set_atom.verbs |= /atom/movable/proc/rotate_counterclockwise
set_atom.verbs |= /atom/movable/proc/turn_around
/datum/element/rotatable/Detach(datum/source)
var/atom/set_atom = source
if(!only_flip)
set_atom.verbs -= /atom/movable/proc/rotate_clockwise
set_atom.verbs -= /atom/movable/proc/rotate_counterclockwise
set_atom.verbs -= /atom/movable/proc/turn_around
return ..()
// Core rotation proc, override me to add conditions to object rotations or update_icons/state after!
/atom/movable/proc/handle_rotation_verbs(angle)
if(isobserver(usr))
if(!ghosts_can_use_rotate_verbs())
return FALSE
else
if(usr.incapacitated())
return FALSE
if(ismouse(usr))
to_chat(usr, span_notice("You are too tiny to do that!"))
return FALSE
if(anchored && !can_use_rotate_verbs_while_anchored())
to_chat(usr, span_notice("It is fastened to the floor!"))
return FALSE
set_dir(turn(dir, angle))
to_chat(usr, span_notice("You rotate \the [src] to face [dir2text(dir)]!"))
return TRUE
// Overrides for customization
/atom/movable/proc/ghosts_can_use_rotate_verbs()
return FALSE
/atom/movable/proc/can_use_rotate_verbs_while_anchored()
return FALSE
// Helper VERBS
/atom/movable/proc/rotate_clockwise()
SHOULD_NOT_OVERRIDE(TRUE)
set name = "Rotate Clockwise"
set category = "Object"
set src in view(1)
return handle_rotation_verbs(270)
/atom/movable/proc/rotate_counterclockwise()
SHOULD_NOT_OVERRIDE(TRUE)
set name = "Rotate Counter Clockwise"
set category = "Object"
set src in view(1)
return handle_rotation_verbs(90)
/atom/movable/proc/turn_around()
SHOULD_NOT_OVERRIDE(TRUE)
set name = "Turn Around"
set category = "Object"
set src in view(1)
return handle_rotation_verbs(180)

View File

@@ -348,6 +348,7 @@ GLOBAL_LIST(construction_frame_floor)
update_icon() update_icon()
AddElement(/datum/element/climbable) AddElement(/datum/element/climbable)
AddElement(/datum/element/rotatable)
/obj/structure/frame/attackby(obj/item/P as obj, mob/user as mob) /obj/structure/frame/attackby(obj/item/P as obj, mob/user as mob)
if(P.has_tool_quality(TOOL_WRENCH)) if(P.has_tool_quality(TOOL_WRENCH))
@@ -688,40 +689,3 @@ GLOBAL_LIST(construction_frame_floor)
update_desc() update_desc()
to_chat(user, desc) to_chat(user, desc)
return TRUE 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

View File

@@ -48,7 +48,8 @@ Buildable meters
update() update()
pixel_x += rand(-5, 5) pixel_x += rand(-5, 5)
pixel_y += 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) /obj/item/pipe/proc/make_from_existing(obj/machinery/atmospherics/make_from)
set_dir(make_from.dir) set_dir(make_from.dir)
@@ -121,29 +122,10 @@ Buildable meters
var/obj/machinery/atmospherics/fakeA = pipe_type var/obj/machinery/atmospherics/fakeA = pipe_type
icon_state = "[initial(fakeA.pipe_state)][mirrored ? "m" : ""]" icon_state = "[initial(fakeA.pipe_state)][mirrored ? "m" : ""]"
/obj/item/pipe/verb/rotate_clockwise() /obj/item/pipe/handle_rotation_verbs(angle)
set category = "Object" . = ..()
set name = "Rotate Pipe Clockwise" if(.)
set src in view(1) fixdir()
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
// Don't let pulling a pipe straighten it out. // Don't let pulling a pipe straighten it out.
/obj/item/pipe/binary/bendable/Move() /obj/item/pipe/binary/bendable/Move()

View File

@@ -19,8 +19,12 @@ LINEN BINS
drop_sound = 'sound/items/drop/clothing.ogg' drop_sound = 'sound/items/drop/clothing.ogg'
pickup_sound = 'sound/items/pickup/clothing.ogg' pickup_sound = 'sound/items/pickup/clothing.ogg'
/// Custom nouns to act as the subject of dreams /// Custom nouns to act as the subject of dreams //CHOMPEdit - Dreaming
var/list/dream_messages = list("white") var/list/dream_messages = list("white") //CHOMPEdit - Dreaming
/obj/item/bedsheet/Initialize(mapload)
. = ..()
AddElement(/datum/element/rotatable/onlyflip)
/obj/item/bedsheet/attack_self(mob/user as mob) /obj/item/bedsheet/attack_self(mob/user as mob)
user.drop_item() user.drop_item()
@@ -42,93 +46,79 @@ LINEN BINS
return return
..() ..()
/obj/item/bedsheet/verb/turn_around() /obj/item/bedsheet/ghosts_can_use_rotate_verbs()
set name = "Turn Around" return CONFIG_GET(flag/ghost_interaction)
set category = "Object"
set src in oview(1)
if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained())
return
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
return
if(dir >= 2)
src.set_dir(1)
else
src.set_dir(2)
/obj/item/bedsheet/blue /obj/item/bedsheet/blue
icon_state = "sheetblue" icon_state = "sheetblue"
dream_messages = list("blue") dream_messages = list("blue") //CHOMPEdit - Dreaming
/obj/item/bedsheet/green /obj/item/bedsheet/green
icon_state = "sheetgreen" icon_state = "sheetgreen"
dream_messages = list("green") dream_messages = list("green") //CHOMPEdit - Dreaming
/obj/item/bedsheet/orange /obj/item/bedsheet/orange
icon_state = "sheetorange" icon_state = "sheetorange"
dream_messages = list("orange") dream_messages = list("orange") //CHOMPEdit - Dreaming
/obj/item/bedsheet/purple /obj/item/bedsheet/purple
icon_state = "sheetpurple" icon_state = "sheetpurple"
dream_messages = list("purple") dream_messages = list("purple") //CHOMPEdit - Dreaming
/obj/item/bedsheet/rainbow /obj/item/bedsheet/rainbow
icon_state = "sheetrainbow" icon_state = "sheetrainbow"
dream_messages = list("red", "orange", "yellow", "green", "blue", "purple", "a rainbow") dream_messages = list("red", "orange", "yellow", "green", "blue", "purple", "a rainbow") //CHOMPEdit - Dreaming
/obj/item/bedsheet/red /obj/item/bedsheet/red
icon_state = "sheetred" icon_state = "sheetred"
dream_messages = list("red") dream_messages = list("red") //CHOMPEdit - Dreaming
/obj/item/bedsheet/yellow /obj/item/bedsheet/yellow
icon_state = "sheetyellow" icon_state = "sheetyellow"
dream_messages = list("yellow") dream_messages = list("yellow") //CHOMPEdit - Dreaming
/obj/item/bedsheet/mime /obj/item/bedsheet/mime
icon_state = "sheetmime" icon_state = "sheetmime"
dream_messages = list("silence", "gestures", "a pale face", "a gaping mouth", "the mime") dream_messages = list("silence", "gestures", "a pale face", "a gaping mouth", "the mime") //CHOMPEdit - Dreaming
/obj/item/bedsheet/clown /obj/item/bedsheet/clown
icon_state = "sheetclown" icon_state = "sheetclown"
item_state = "sheetrainbow" item_state = "sheetrainbow"
dream_messages = list("honk", "laughter", "a prank", "a joke", "a smiling face", "the clown") dream_messages = list("honk", "laughter", "a prank", "a joke", "a smiling face", "the clown") //CHOMPEdit - Dreaming
/obj/item/bedsheet/captain /obj/item/bedsheet/captain
icon_state = "sheetcaptain" icon_state = "sheetcaptain"
dream_messages = list("authority", "a golden ID", "sunglasses", "a green disc", "an antique gun", "the captain") dream_messages = list("authority", "a golden ID", "sunglasses", "a green disc", "an antique gun", "the captain") //CHOMPEdit - Dreaming
/obj/item/bedsheet/rd /obj/item/bedsheet/rd
icon_state = "sheetrd" icon_state = "sheetrd"
dream_messages = list("authority", "a silvery ID", "a bomb", "a mech", "a facehugger", "maniacal laughter", "the research director") dream_messages = list("authority", "a silvery ID", "a bomb", "a mech", "a facehugger", "maniacal laughter", "the research director") //CHOMPEdit - Dreaming
/obj/item/bedsheet/medical /obj/item/bedsheet/medical
name = "medical blanket" name = "medical blanket"
desc = "It's a sterilized* blanket commonly used in the Medbay. *Sterilization is voided if a virologist is present onboard the station." desc = "It's a sterilized* blanket commonly used in the Medbay. *Sterilization is voided if a virologist is present onboard the station."
icon_state = "sheetmedical" icon_state = "sheetmedical"
dream_messages = list("healing", "life", "surgery", "a doctor") dream_messages = list("healing", "life", "surgery", "a doctor") //CHOMPEdit - Dreaming
/obj/item/bedsheet/hos /obj/item/bedsheet/hos
icon_state = "sheethos" icon_state = "sheethos"
dream_messages = list("authority", "a silvery ID", "handcuffs", "a baton", "a flashbang", "sunglasses", "the head of security") dream_messages = list("authority", "a silvery ID", "handcuffs", "a baton", "a flashbang", "sunglasses", "the head of security") //CHOMPEdit - Dreaming
/obj/item/bedsheet/hop /obj/item/bedsheet/hop
icon_state = "sheethop" icon_state = "sheethop"
dream_messages = list("authority", "a silvery ID", "obligation", "a computer", "an ID", "a corgi", "the head of personnel") dream_messages = list("authority", "a silvery ID", "obligation", "a computer", "an ID", "a corgi", "the head of personnel") //CHOMPEdit - Dreaming
/obj/item/bedsheet/ce /obj/item/bedsheet/ce
icon_state = "sheetce" icon_state = "sheetce"
dream_messages = list("authority", "a silvery ID", "the engine", "power tools", "an APC", "a parrot", "the chief engineer") dream_messages = list("authority", "a silvery ID", "the engine", "power tools", "an APC", "a parrot", "the chief engineer") //CHOMPEdit - Dreaming
/obj/item/bedsheet/brown /obj/item/bedsheet/brown
icon_state = "sheetbrown" icon_state = "sheetbrown"
dream_messages = list("brown") dream_messages = list("brown") //CHOMPEdit - Dreaming
/obj/item/bedsheet/ian /obj/item/bedsheet/ian
icon_state = "sheetian" icon_state = "sheetian"
dream_messages = list("a dog", "a corgi", "woof", "bark", "arf") dream_messages = list("a dog", "a corgi", "woof", "bark", "arf") //CHOMPEdit - Dreaming
/obj/item/bedsheet/double /obj/item/bedsheet/double
icon_state = "doublesheet" icon_state = "doublesheet"

View File

@@ -15,6 +15,7 @@
/obj/structure/closet/crate/Initialize(mapload) /obj/structure/closet/crate/Initialize(mapload)
. = ..() . = ..()
AddElement(/datum/element/climbable) AddElement(/datum/element/climbable)
AddElement(/datum/element/rotatable)
/obj/structure/closet/crate/can_open() /obj/structure/closet/crate/can_open()
return 1 return 1
@@ -71,26 +72,6 @@
update_icon() update_icon()
return 1 return 1
/obj/structure/closet/crate/verb/rotate_clockwise()
set name = "Rotate Crate Clockwise"
set category = "Object"
set src in oview(1)
if (usr.stat || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 270))
/obj/structure/closet/crate/verb/rotate_counterclockwise()
set category = "Object"
set name = "Rotate Crate Counterclockwise"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 90))
/obj/structure/closet/crate/attackby(obj/item/W as obj, mob/user as mob) /obj/structure/closet/crate/attackby(obj/item/W as obj, mob/user as mob)
if(W.has_tool_quality(TOOL_WRENCH) && istype(src,/obj/structure/closet/crate/bin)) if(W.has_tool_quality(TOOL_WRENCH) && istype(src,/obj/structure/closet/crate/bin))
return ..() return ..()

View File

@@ -37,11 +37,11 @@
to_chat(usr, span_notice("You switch [on ? "on" : "off"] [src].")) to_chat(usr, span_notice("You switch [on ? "on" : "off"] [src]."))
return return
/obj/structure/bed/chair/e_chair/rotate_clockwise() /obj/structure/bed/chair/e_chair/set_dir()
..() . = ..()
cut_overlays() if(.)
add_overlay(image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir)) //there's probably a better way of handling this, but eh. -Pete cut_overlays()
return add_overlay(image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir)) //there's probably a better way of handling this, but eh. -Pete
/obj/structure/bed/chair/e_chair/proc/shock() /obj/structure/bed/chair/e_chair/proc/shock()
if(!on) if(!on)

View File

@@ -28,6 +28,7 @@
return INITIALIZE_HINT_QDEL return INITIALIZE_HINT_QDEL
color = material.icon_colour color = material.icon_colour
AddElement(/datum/element/climbable) AddElement(/datum/element/climbable)
AddElement(/datum/element/rotatable)
/obj/structure/gravemarker/examine(mob/user) /obj/structure/gravemarker/examine(mob/user)
. = ..() . = ..()
@@ -109,40 +110,5 @@
qdel(src) qdel(src)
return return
/obj/structure/gravemarker/ghosts_can_use_rotate_verbs()
/obj/structure/gravemarker/verb/rotate_clockwise() return CONFIG_GET(flag/ghost_interaction)
set name = "Rotate Grave Marker Clockwise"
set category = "Object"
set src in oview(1)
if(anchored)
return
if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained())
return
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
return
src.set_dir(turn(src.dir, 270))
return
//VOREstation edit: counter-clockwise rotation
/obj/structure/gravemarker/verb/rotate_counterclockwise()
set name = "Rotate Grave Marker Counter-Clockwise"
set category = "Object"
set src in oview(1)
if(anchored)
return
if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained())
return
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
return
src.set_dir(turn(src.dir, 90))
return

View File

@@ -27,6 +27,7 @@
if (constructed) // player-constructed railings if (constructed) // player-constructed railings
anchored = FALSE anchored = FALSE
AddElement(/datum/element/climbable/unanchored_can_break, 3.4 SECONDS, TRUE) // It's a RAILING! AddElement(/datum/element/climbable/unanchored_can_break, 3.4 SECONDS, TRUE) // It's a RAILING!
AddElement(/datum/element/rotatable)
if(src.anchored) if(src.anchored)
update_icon(0) update_icon(0)
@@ -132,43 +133,12 @@
if (WEST) if (WEST)
add_overlay(image(icon, src, "[icon_modifier]mcorneroverlay", pixel_y = 32)) add_overlay(image(icon, src, "[icon_modifier]mcorneroverlay", pixel_y = 32))
/obj/structure/railing/verb/rotate_counterclockwise() /obj/structure/railing/handle_rotation_verbs(angle)
set name = "Rotate Railing Counter-Clockwise" if(!can_touch(usr))
set category = "Object" return FALSE
set src in oview(1) . = ..()
if(.)
if(usr.incapacitated()) update_icon()
return 0
if (!can_touch(usr) || ismouse(usr))
return
if(anchored)
to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
return 0
src.set_dir(turn(src.dir, 90))
update_icon()
return
/obj/structure/railing/verb/rotate_clockwise()
set name = "Rotate Railing Clockwise"
set category = "Object"
set src in oview(1)
if(usr.incapacitated())
return 0
if (!can_touch(usr) || ismouse(usr))
return
if(anchored)
to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
return 0
src.set_dir(turn(src.dir, 270))
update_icon()
return
/obj/structure/railing/verb/flip() // This will help push railing to remote places, such as open space turfs /obj/structure/railing/verb/flip() // This will help push railing to remote places, such as open space turfs
set name = "Flip Railing" set name = "Flip Railing"

View File

@@ -35,6 +35,12 @@
if(new_padding_material) if(new_padding_material)
padding_material = get_material_by_name(new_padding_material) padding_material = get_material_by_name(new_padding_material)
update_icon() update_icon()
if(flippable) // If we can't change directions, don't bother.
// Ugly check for chairs, beds can only be flipped north and south...
if(istype(src,/obj/structure/bed/chair))
AddElement(/datum/element/rotatable)
else
AddElement(/datum/element/rotatable/onlyflip)
return INITIALIZE_HINT_NORMAL return INITIALIZE_HINT_NORMAL
/obj/structure/bed/get_material() /obj/structure/bed/get_material()
@@ -174,29 +180,11 @@
if(padding_material) if(padding_material)
padding_material.place_sheet(get_turf(src), 1) padding_material.place_sheet(get_turf(src), 1)
/obj/structure/bed/verb/turn_around() /obj/structure/bed/ghosts_can_use_rotate_verbs()
set name = "Turn Around" return CONFIG_GET(flag/ghost_interaction)
set category = "Object"
set src in oview(1)
if(!flippable) /obj/structure/bed/can_use_rotate_verbs_while_anchored()
to_chat(usr,span_notice("\The [src] can't face the other direction.")) return TRUE
return
if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained())
return
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
return
if(dir == 2)
src.set_dir(1)
else if(dir == 1)
src.set_dir(2)
else if(dir == 4)
src.set_dir(8)
else if(dir == 8)
src.set_dir(4)
/obj/structure/bed/psych /obj/structure/bed/psych
name = "psychiatrist's couch" name = "psychiatrist's couch"

View File

@@ -66,34 +66,6 @@
for(var/mob/living/L as anything in buckled_mobs) for(var/mob/living/L as anything in buckled_mobs)
L.set_dir(dir) L.set_dir(dir)
/obj/structure/bed/chair/verb/rotate_clockwise()
set name = "Rotate Chair Clockwise"
set category = "Object"
set src in oview(1)
if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained())
return
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
return
src.set_dir(turn(src.dir, 270))
/obj/structure/bed/chair/verb/rotate_counterclockwise()
set name = "Rotate Chair Counter-Clockwise"
set category = "Object"
set src in oview(1)
if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained())
return
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
return
src.set_dir(turn(src.dir, 90))
/obj/structure/bed/chair/shuttle /obj/structure/bed/chair/shuttle
name = "chair" name = "chair"
icon_state = "shuttlechair" icon_state = "shuttlechair"

View File

@@ -45,6 +45,7 @@
update_state() update_state()
update_nearby_tiles(need_rebuild=1) update_nearby_tiles(need_rebuild=1)
AddElement(/datum/element/rotatable)
/obj/structure/windoor_assembly/Destroy() /obj/structure/windoor_assembly/Destroy()
density = FALSE density = FALSE
@@ -270,46 +271,14 @@
name = "near finished " name = "near finished "
name += "[secure ? "secure " : ""]windoor assembly[created_name ? " ([created_name])" : ""]" name += "[secure ? "secure " : ""]windoor assembly[created_name ? " ([created_name])" : ""]"
//Rotates the windoor assembly clockwise /obj/structure/windoor_assembly/handle_rotation_verbs(angle)
/obj/structure/windoor_assembly/verb/rotate_clockwise() if(state != "01")
set name = "Rotate Windoor Assembly Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored)
to_chat(usr,"It is fastened to the floor; therefore, you can't rotate it!")
return 0
if(src.state != "01")
update_nearby_tiles(need_rebuild=1) //Compel updates before update_nearby_tiles(need_rebuild=1) //Compel updates before
. = ..()
src.set_dir(turn(src.dir, 270)) if(.)
if(state != "01")
if(src.state != "01") update_nearby_tiles(need_rebuild=1)
update_nearby_tiles(need_rebuild=1) update_icon()
update_icon()
return
//VOREstation edit: counter-clockwise rotation
/obj/structure/windoor_assembly/verb/rotate_counterclockwise()
set name = "Rotate Windoor Assembly Counter-Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored)
to_chat(usr,"It is fastened to the floor; therefore, you can't rotate it!")
return 0
if(src.state != "01")
update_nearby_tiles(need_rebuild=1) //Compel updates before
src.set_dir(turn(src.dir, 90))
if(src.state != "01")
update_nearby_tiles(need_rebuild=1)
update_icon()
return
//VOREstation edit end
//Flips the windoor assembly, determines whather the door opens to the left or the right //Flips the windoor assembly, determines whather the door opens to the left or the right
/obj/structure/windoor_assembly/verb/flip() /obj/structure/windoor_assembly/verb/flip()

View File

@@ -348,49 +348,14 @@
take_damage(damage) take_damage(damage)
return return
/obj/structure/window/handle_rotation_verbs(angle)
/obj/structure/window/verb/rotate_counterclockwise()
set name = "Rotate Window Counterclockwise"
set category = "Object"
set src in oview(1)
if(usr.incapacitated())
return 0
if(is_fulltile()) if(is_fulltile())
return 0 return FALSE
if(anchored)
to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before update_nearby_tiles(need_rebuild=1) //Compel updates before
src.set_dir(turn(src.dir, 90)) . = ..()
updateSilicate() if(.)
update_nearby_tiles(need_rebuild=1) updateSilicate()
return update_nearby_tiles(need_rebuild=1)
/obj/structure/window/verb/rotate_clockwise()
set name = "Rotate Window Clockwise"
set category = "Object"
set src in oview(1)
if(usr.incapacitated())
return 0
if(is_fulltile())
return 0
if(anchored)
to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before
src.set_dir(turn(src.dir, 270))
updateSilicate()
update_nearby_tiles(need_rebuild=1)
return
/obj/structure/window/Initialize(mapload, start_dir=null, constructed=0) /obj/structure/window/Initialize(mapload, start_dir=null, constructed=0)
. = ..() . = ..()
@@ -402,7 +367,10 @@
if (constructed) if (constructed)
anchored = FALSE anchored = FALSE
state = 0 state = 0
update_verbs()
// If we started anchored we'll need to disable rotation
AddElement(/datum/element/rotatable)
update_verbs()
health = maxhealth health = maxhealth
@@ -456,11 +424,13 @@
//Updates the availabiliy of the rotation verbs //Updates the availabiliy of the rotation verbs
/obj/structure/window/proc/update_verbs() /obj/structure/window/proc/update_verbs()
if(anchored || is_fulltile()) if(anchored || is_fulltile())
verbs -= /obj/structure/window/verb/rotate_counterclockwise verbs -= /atom/movable/proc/rotate_counterclockwise
verbs -= /obj/structure/window/verb/rotate_clockwise verbs -= /atom/movable/proc/rotate_clockwise
verbs -= /atom/movable/proc/turn_around
else if(!is_fulltile()) else if(!is_fulltile())
verbs += /obj/structure/window/verb/rotate_counterclockwise verbs |= /atom/movable/proc/rotate_counterclockwise
verbs += /obj/structure/window/verb/rotate_clockwise verbs |= /atom/movable/proc/rotate_clockwise
verbs |= /atom/movable/proc/turn_around
//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm) //merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
/obj/structure/window/update_icon() /obj/structure/window/update_icon()

View File

@@ -15,6 +15,10 @@
var/visible = 0 var/visible = 0
var/list/i_beams = null var/list/i_beams = null
/obj/item/assembly/infra/Initialize(mapload)
. = ..()
AddElement(/datum/element/rotatable)
/obj/item/assembly/infra/activate() /obj/item/assembly/infra/activate()
if(!..()) if(!..())
return FALSE return FALSE
@@ -132,21 +136,6 @@
CHECK_TICK CHECK_TICK
return TRUE return TRUE
/obj/item/assembly/infra/verb/rotate_clockwise()
set name = "Rotate Infrared Laser Clockwise"
set category = "Object"
set src in usr
set_dir(turn(dir, 270))
//VOREstation edit: counter-clockwise rotation
/obj/item/assembly/infra/verb/rotate_counterclockwise()
set name = "Rotate Infrared Laser Counter-Clockwise"
set category = "Object"
set src in usr
set_dir(turn(dir, 90))
//VOREstation edit end
/***************************IBeam*********************************/ /***************************IBeam*********************************/

View File

@@ -98,6 +98,9 @@
build_inventory() build_inventory()
power_change() power_change()
if(can_rotate) // If we can't change directions, don't bother.
AddElement(/datum/element/rotatable)
GLOBAL_LIST_EMPTY(vending_products) GLOBAL_LIST_EMPTY(vending_products)
/** /**
* Build produdct_records from the products lists * Build produdct_records from the products lists
@@ -633,39 +636,6 @@ GLOBAL_LIST_EMPTY(vending_products)
else else
to_chat(user,span_warning("You do not have the required access to view the vending logs for this machine.")) to_chat(user,span_warning("You do not have the required access to view the vending logs for this machine."))
/obj/machinery/vending/verb/rotate_clockwise()
set name = "Rotate Vending Machine Clockwise"
set category = "Object"
set src in oview(1)
if (src.can_rotate == 0)
to_chat(usr, span_warning("\The [src] cannot be rotated."))
return 0
if (src.anchored || usr:stat)
to_chat(usr, span_filter_notice("It is bolted down!"))
return 0
src.set_dir(turn(src.dir, 270))
return 1
//VOREstation edit: counter-clockwise rotation
/obj/machinery/vending/verb/rotate_counterclockwise()
set name = "Rotate Vending Machine Counter-Clockwise"
set category = "Object"
set src in oview(1)
if (src.can_rotate == 0)
to_chat(usr, span_warning("\The [src] cannot be rotated."))
return 0
if (src.anchored || usr:stat)
to_chat(usr, span_filter_notice("It is bolted down!"))
return 0
src.set_dir(turn(src.dir, 90))
return 1
//VOREstation edit end
/obj/machinery/vending/verb/check_logs() /obj/machinery/vending/verb/check_logs()
set name = "Check Vending Logs" set name = "Check Vending Logs"
set category = "Object" set category = "Object"

View File

@@ -449,6 +449,7 @@
. = ..() . = ..()
default_apply_parts() default_apply_parts()
AddElement(/datum/element/climbable) AddElement(/datum/element/climbable)
AddElement(/datum/element/rotatable)
/obj/machinery/mining/brace/RefreshParts() /obj/machinery/mining/brace/RefreshParts()
..() ..()
@@ -514,31 +515,3 @@
connected.supports -= src connected.supports -= src
connected.check_supports() connected.check_supports()
connected = null connected = null
/obj/machinery/mining/brace/verb/rotate_clockwise()
set name = "Rotate Brace Clockwise"
set category = "Object"
set src in oview(1)
if(usr.stat) return
if (src.anchored)
balloon_alert(usr, "it is anchored in place!")
return 0
src.set_dir(turn(src.dir, 270))
return 1
/obj/machinery/mining/brace/verb/rotate_counterclockwise()
set name = "Rotate Brace Counter-Clockwise"
set category = "Object"
set src in oview(1)
if(usr.stat) return
if (src.anchored)
to_chat(usr, "It is anchored in place!")
return 0
src.set_dir(turn(src.dir, 90))
return 1

View File

@@ -22,6 +22,7 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
. = ..() . = ..()
GLOB.fuel_injectors += src GLOB.fuel_injectors += src
default_apply_parts() default_apply_parts()
AddElement(/datum/element/rotatable)
/obj/machinery/fusion_fuel_injector/Destroy() /obj/machinery/fusion_fuel_injector/Destroy()
if(cur_assembly) if(cur_assembly)
@@ -144,23 +145,3 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
flick("injector-emitting",src) flick("injector-emitting",src)
else else
StopInjecting() StopInjecting()
/obj/machinery/fusion_fuel_injector/verb/rotate_clockwise()
set category = "Object"
set name = "Rotate Generator Clockwise"
set src in view(1)
if (usr.incapacitated() || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 270))
/obj/machinery/fusion_fuel_injector/verb/rotate_counterclockwise()
set category = "Object"
set name = "Rotate Generator Counterclockwise"
set src in view(1)
if (usr.incapacitated() || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 90))

View File

@@ -31,6 +31,7 @@ GLOBAL_LIST_EMPTY(all_turbines)
soundloop = new(list(src), FALSE) soundloop = new(list(src), FALSE)
desc = initial(desc) + " Rated for [round(max_power/1000)] kW." desc = initial(desc) + " Rated for [round(max_power/1000)] kW."
GLOB.all_turbines += src GLOB.all_turbines += src
AddElement(/datum/element/rotatable)
..() //Not returned, because... ..() //Not returned, because...
return INITIALIZE_HINT_LATELOAD return INITIALIZE_HINT_LATELOAD
@@ -241,26 +242,6 @@ GLOBAL_LIST_EMPTY(all_turbines)
update_icon() update_icon()
/obj/machinery/power/generator/verb/rotate_clockwise()
set category = "Object"
set name = "Rotate Generator Clockwise"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 270))
/obj/machinery/power/generator/verb/rotate_counterclockwise()
set category = "Object"
set name = "Rotate Generator Counterclockwise"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 90))
/obj/machinery/power/generator/power_spike(var/announce_prob = 30) /obj/machinery/power/generator/power_spike(var/announce_prob = 30)
if(!(effective_gen >= max_power / 2 && powernet)) // Don't make a spike if we're not making a whole lot of power. if(!(effective_gen >= max_power / 2 && powernet)) // Don't make a spike if we're not making a whole lot of power.
return return

View File

@@ -75,25 +75,9 @@
fixture_type = /obj/machinery/light/floortube fixture_type = /obj/machinery/light/floortube
sheets_refunded = 2 sheets_refunded = 2
/obj/machinery/light_construct/floortube/verb/rotate_clockwise() /obj/machinery/light_construct/floortube/Initialize(mapload, newdir, building, datum/frame/frame_types/frame_type, obj/machinery/light/fixture)
set name = "Rotate Fixture Clockwise" . = ..()
set category = "Object" AddElement(/datum/element/rotatable)
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 270))
/obj/machinery/light_construct/floortube/verb/rotate_counterclockwise()
set name = "Rotate Fixture Counter-Clockwise"
set category = "Object"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 90))
/obj/machinery/light_construct/floortube/update_icon() /obj/machinery/light_construct/floortube/update_icon()
switch(stage) switch(stage)

View File

@@ -28,33 +28,12 @@
var/integrity = 80 var/integrity = 80
/obj/machinery/power/emitter/verb/rotate_clockwise()
set name = "Rotate Emitter Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored || usr:stat)
to_chat(usr, "It is fastened to the floor!")
return 0
src.set_dir(turn(src.dir, 270))
return 1
/obj/machinery/power/emitter/verb/rotate_counterclockwise()
set name = "Rotate Emitter Counter-Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored || usr:stat)
to_chat(usr, "It is fastened to the floor!")
return 0
src.set_dir(turn(src.dir, 90))
return 1
/obj/machinery/power/emitter/Initialize(mapload) /obj/machinery/power/emitter/Initialize(mapload)
. = ..() . = ..()
if(state == 2 && anchored) if(state == 2 && anchored)
connect_to_network() connect_to_network()
AddElement(/datum/element/climbable) AddElement(/datum/element/climbable)
AddElement(/datum/element/rotatable)
/obj/machinery/power/emitter/Destroy() /obj/machinery/power/emitter/Destroy()
message_admins("Emitter deleted at ([x],[y],[z] - <A href='byond://?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1) message_admins("Emitter deleted at ([x],[y],[z] - <A href='byond://?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)

View File

@@ -75,6 +75,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
/obj/structure/particle_accelerator/Initialize(mapload) /obj/structure/particle_accelerator/Initialize(mapload)
. = ..() . = ..()
AddElement(/datum/element/climbable) AddElement(/datum/element/climbable)
AddElement(/datum/element/rotatable)
/obj/structure/particle_accelerator/Destroy() /obj/structure/particle_accelerator/Destroy()
construction_state = 0 construction_state = 0
@@ -93,28 +94,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
return return
/obj/structure/particle_accelerator/verb/rotate_clockwise()
set name = "Rotate Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored || usr:stat)
to_chat(usr, "It is fastened to the floor!")
return 0
src.set_dir(turn(src.dir, 270))
return 1
/obj/structure/particle_accelerator/verb/rotate_counterclockwise()
set name = "Rotate Counter Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored || usr:stat)
to_chat(usr, "It is fastened to the floor!")
return 0
src.set_dir(turn(src.dir, 90))
return 1
/obj/structure/particle_accelerator/examine(mob/user) /obj/structure/particle_accelerator/examine(mob/user)
. = ..() . = ..()
@@ -267,28 +246,10 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
var/strength = 0 var/strength = 0
var/desc_holder = null var/desc_holder = null
/obj/machinery/particle_accelerator/Initialize(mapload)
/obj/machinery/particle_accelerator/verb/rotate_clockwise() . = ..()
set name = "Rotate Clockwise" AddElement(/datum/element/climbable)
set category = "Object" AddElement(/datum/element/rotatable)
set src in oview(1)
if (src.anchored || usr:stat)
to_chat(usr, "It is fastened to the floor!")
return 0
src.set_dir(turn(src.dir, 270))
return 1
/obj/machinery/particle_accelerator/verb/rotate_counterclockwise()
set name = "Rotate Counter-Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored || usr:stat)
to_chat(usr, "It is fastened to the floor!")
return 0
src.set_dir(turn(src.dir, 90))
return 1
/obj/machinery/particle_accelerator/update_icon() /obj/machinery/particle_accelerator/update_icon()
return return

View File

@@ -26,7 +26,6 @@
wires = new(src) wires = new(src)
connected_parts = list() connected_parts = list()
update_active_power_usage(initial(active_power_usage) * (strength + 1)) update_active_power_usage(initial(active_power_usage) * (strength + 1))
AddElement(/datum/element/climbable)
/obj/machinery/particle_accelerator/control_box/Destroy() /obj/machinery/particle_accelerator/control_box/Destroy()
if(active) if(active)

View File

@@ -31,35 +31,12 @@
if(spawn_cartridges) if(spawn_cartridges)
for(var/type in spawn_cartridges) for(var/type in spawn_cartridges)
add_cartridge(new type(src)) add_cartridge(new type(src))
AddElement(/datum/element/rotatable)
/obj/machinery/chemical_dispenser/examine(mob/user) /obj/machinery/chemical_dispenser/examine(mob/user)
. = ..() . = ..()
. += "It has [cartridges.len] cartridges installed, and has space for [max_catriges - cartridges.len] more." . += "It has [cartridges.len] cartridges installed, and has space for [max_catriges - cartridges.len] more."
/obj/machinery/chemical_dispenser/verb/rotate_clockwise()
set name = "Rotate Dispenser Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored || usr:stat)
to_chat(usr, "It is fastened down!")
return 0
src.set_dir(turn(src.dir, 270))
return 1
//VOREstation edit: counter-clockwise rotation
/obj/machinery/chemical_dispenser/verb/rotate_counterclockwise()
set name = "Rotate Dispenser Counter-Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored || usr:stat)
to_chat(usr, "It is fastened down!")
return 0
src.set_dir(turn(src.dir, 90))
return 1
//VOREstation edit end
/obj/machinery/chemical_dispenser/proc/add_cartridge(obj/item/reagent_containers/chem_disp_cartridge/C, mob/user) /obj/machinery/chemical_dispenser/proc/add_cartridge(obj/item/reagent_containers/chem_disp_cartridge/C, mob/user)
if(!istype(C)) if(!istype(C))
if(user) if(user)

View File

@@ -349,36 +349,13 @@
reagents.add_reagent(REAGENT_ID_WATER,2000) reagents.add_reagent(REAGENT_ID_WATER,2000)
update_icon() update_icon()
AddElement(/datum/element/climbable) AddElement(/datum/element/climbable)
AddElement(/datum/element/rotatable)
/obj/structure/reagent_dispensers/water_cooler/examine(mob/user) /obj/structure/reagent_dispensers/water_cooler/examine(mob/user)
. = ..() . = ..()
if(cupholder) if(cupholder)
. += span_notice("There are [cups] cups in the cup dispenser.") . += span_notice("There are [cups] cups in the cup dispenser.")
/obj/structure/reagent_dispensers/water_cooler/verb/rotate_clockwise()
set name = "Rotate Cooler Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored || usr:stat)
to_chat(usr, "It is fastened to the floor!")
return 0
src.set_dir(turn(src.dir, 270))
return 1
//VOREstation edit: counter-clockwise rotation
/obj/structure/reagent_dispensers/water_cooler/verb/rotate_counterclockwise()
set name = "Rotate Cooler Counter-Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored || usr:stat)
to_chat(usr, "It is fastened to the floor!")
return 0
src.set_dir(turn(src.dir, 90))
return 1
//VOREstation edit end
/obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/I as obj, mob/user as mob) /obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/I as obj, mob/user as mob)
if(I.has_tool_quality(TOOL_WRENCH)) if(I.has_tool_quality(TOOL_WRENCH))
src.add_fingerprint(user) src.add_fingerprint(user)

View File

@@ -45,6 +45,8 @@
else else
update() // do_a_flip() calls update anyway, so, lazy way of catching unupdated pipe! update() // do_a_flip() calls update anyway, so, lazy way of catching unupdated pipe!
AddElement(/datum/element/rotatable)
// update iconstate and dpdir due to dir and type // update iconstate and dpdir due to dir and type
/obj/structure/disposalconstruct/proc/update() /obj/structure/disposalconstruct/proc/update()
var/flip = turn(dir, 180) var/flip = turn(dir, 180)
@@ -118,40 +120,6 @@
invisibility = (intact && level==1) ? INVISIBILITY_ABSTRACT: INVISIBILITY_NONE // hide if floor is intact invisibility = (intact && level==1) ? INVISIBILITY_ABSTRACT: INVISIBILITY_NONE // hide if floor is intact
update() update()
// flip and rotate verbs
/obj/structure/disposalconstruct/verb/rotate_clockwise()
set category = "Object"
set name = "Rotate Pipe Clockwise"
set src in view(1)
if(usr.stat)
return
if(anchored)
to_chat(usr, "You must unfasten the pipe before rotating it.")
return
src.set_dir(turn(src.dir, 270))
update()
//VOREstation edit: counter-clockwise rotation
/obj/structure/disposalconstruct/verb/rotate_counterclockwise()
set category = "Object"
set name = "Rotate Pipe Counter-Clockwise"
set src in view(1)
if(usr.stat)
return
if(anchored)
to_chat(usr, "You must unfasten the pipe before rotating it.")
return
src.set_dir(turn(src.dir, 90))
update()
//VOREstation edit end
/obj/structure/disposalconstruct/verb/flip() /obj/structure/disposalconstruct/verb/flip()
set category = "Object" set category = "Object"
set name = "Flip Pipe" set name = "Flip Pipe"

View File

@@ -13,6 +13,7 @@
// Update neighbours and self for state // Update neighbours and self for state
update_neighbours() update_neighbours()
update_icon() update_icon()
AddElement(/datum/element/rotatable)
/obj/machinery/reagent_refinery/Destroy() /obj/machinery/reagent_refinery/Destroy()
reagent_flush() reagent_flush()
@@ -131,28 +132,6 @@
/obj/machinery/reagent_refinery/proc/minimum_reagents_for_transfer(var/obj/machinery/reagent_refinery/target) /obj/machinery/reagent_refinery/proc/minimum_reagents_for_transfer(var/obj/machinery/reagent_refinery/target)
return 0 return 0
/obj/machinery/reagent_refinery/verb/rotate_clockwise()
set name = "Rotate Machine Clockwise"
set category = "Object"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 270))
update_icon()
/obj/machinery/reagent_refinery/verb/rotate_counterclockwise()
set name = "Rotate Machine Counterclockwise"
set category = "Object"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.set_dir(turn(src.dir, 90))
update_icon()
/obj/machinery/reagent_refinery/proc/tutorial(var/flags,var/list/examine_list) /obj/machinery/reagent_refinery/proc/tutorial(var/flags,var/list/examine_list)
// Specialty // Specialty
if(flags & REFINERY_TUTORIAL_HUB) if(flags & REFINERY_TUTORIAL_HUB)

View File

@@ -23,6 +23,7 @@
/obj/machinery/shield_capacitor/Initialize(mapload) /obj/machinery/shield_capacitor/Initialize(mapload)
. = ..() . = ..()
AddElement(/datum/element/climbable) AddElement(/datum/element/climbable)
AddElement(/datum/element/rotatable)
/obj/machinery/shield_capacitor/advanced /obj/machinery/shield_capacitor/advanced
name = "advanced shield capacitor" name = "advanced shield capacitor"
@@ -138,28 +139,3 @@
icon_state = "broke" icon_state = "broke"
else else
..() ..()
/obj/machinery/shield_capacitor/verb/rotate_clockwise()
set name = "Rotate Capacitor Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored)
to_chat(usr, "It is fastened to the floor!")
return
src.set_dir(turn(src.dir, 270))
return
//VOREstation edit: counter-clockwise rotation
/obj/machinery/shield_capacitor/verb/rotate_counterclockwise()
set name = "Rotate Capacitor Counter-Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored)
to_chat(usr, "It is fastened to the floor!")
return
src.set_dir(turn(src.dir, 90))
return

View File

@@ -113,6 +113,10 @@
color = "#ffffff" color = "#ffffff"
density = FALSE density = FALSE
/obj/structure/smoletrack/Initialize(mapload)
. = ..()
AddElement(/datum/element/rotatable)
/obj/structure/smoletrack/attack_hand(mob/user) /obj/structure/smoletrack/attack_hand(mob/user)
if(user.a_intent == I_DISARM) if(user.a_intent == I_DISARM)
if(ismouse(user) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction))) if(ismouse(user) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction)))
@@ -124,22 +128,8 @@
new /obj/item/stack/material/smolebricks(F) new /obj/item/stack/material/smolebricks(F)
qdel(src) qdel(src)
//rotates piece /obj/structure/smoletrack/ghosts_can_use_rotate_verbs()
/obj/structure/smoletrack/verb/rotate_clockwise() return CONFIG_GET(flag/ghost_interaction)
set name = "Rotate Road Clockwise"
set category = "Object"
set src in oview(1)
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
return
src.set_dir(turn(src.dir, 270))
/obj/structure/smoletrack/verb/rotate_counterclockwise()
set name = "Rotate Road Counter-Clockwise"
set category = "Object"
set src in oview(1)
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
return
src.set_dir(turn(src.dir, 90))
//color roads //color roads
/obj/structure/smoletrack/verb/colorpieces() /obj/structure/smoletrack/verb/colorpieces()

View File

@@ -14,6 +14,7 @@
/obj/machinery/suspension_gen/Initialize(mapload) /obj/machinery/suspension_gen/Initialize(mapload)
. = ..() . = ..()
cell = new /obj/item/cell/high(src) cell = new /obj/item/cell/high(src)
AddElement(/datum/element/rotatable)
/obj/machinery/suspension_gen/process() /obj/machinery/suspension_gen/process()
if(suspension_field) if(suspension_field)
@@ -191,26 +192,6 @@
deactivate() deactivate()
. = ..() . = ..()
/obj/machinery/suspension_gen/verb/rotate_counterclockwise()
set src in view(1)
set name = "Rotate suspension gen Counterclockwise"
set category = "Object"
if(anchored)
to_chat(usr, span_red("You cannot rotate [src], it has been firmly fixed to the floor."))
return
set_dir(turn(dir, 90))
/obj/machinery/suspension_gen/verb/rotate_clockwise()
set src in view(1)
set name = "Rotate suspension gen Clockwise"
set category = "Object"
if(anchored)
to_chat(usr, span_red("You cannot rotate [src], it has been firmly fixed to the floor."))
return
set_dir(turn(dir, 270))
/obj/machinery/suspension_gen/update_icon() /obj/machinery/suspension_gen/update_icon()
cut_overlays() cut_overlays()
if(panel_open) if(panel_open)

View File

@@ -731,6 +731,7 @@
#include "code\datums\elements\footstep_override.dm" #include "code\datums\elements\footstep_override.dm"
#include "code\datums\elements\godmode.dm" #include "code\datums\elements\godmode.dm"
#include "code\datums\elements\light_blocking.dm" #include "code\datums\elements\light_blocking.dm"
#include "code\datums\elements\rotatable.dm"
#include "code\datums\elements\sellable.dm" #include "code\datums\elements\sellable.dm"
#include "code\datums\elements\slosh.dm" #include "code\datums\elements\slosh.dm"
#include "code\datums\elements\turf_transparency.dm" #include "code\datums\elements\turf_transparency.dm"