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
@@ -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))
|
||||
|
||||
72
code/datums/elements/rotatable.dm
Normal file
72
code/datums/elements/rotatable.dm
Normal 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)
|
||||
@@ -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()
|
||||
|
||||
@@ -19,8 +19,12 @@ LINEN BINS
|
||||
drop_sound = 'sound/items/drop/clothing.ogg'
|
||||
pickup_sound = 'sound/items/pickup/clothing.ogg'
|
||||
|
||||
/// Custom nouns to act as the subject of dreams
|
||||
var/list/dream_messages = list("white")
|
||||
/// Custom nouns to act as the subject of dreams //CHOMPEdit - Dreaming
|
||||
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)
|
||||
user.drop_item()
|
||||
@@ -42,93 +46,79 @@ LINEN BINS
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/bedsheet/verb/turn_around()
|
||||
set name = "Turn Around"
|
||||
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/ghosts_can_use_rotate_verbs()
|
||||
return CONFIG_GET(flag/ghost_interaction)
|
||||
|
||||
/obj/item/bedsheet/blue
|
||||
icon_state = "sheetblue"
|
||||
dream_messages = list("blue")
|
||||
dream_messages = list("blue") //CHOMPEdit - Dreaming
|
||||
|
||||
/obj/item/bedsheet/green
|
||||
icon_state = "sheetgreen"
|
||||
dream_messages = list("green")
|
||||
dream_messages = list("green") //CHOMPEdit - Dreaming
|
||||
|
||||
/obj/item/bedsheet/orange
|
||||
icon_state = "sheetorange"
|
||||
dream_messages = list("orange")
|
||||
dream_messages = list("orange") //CHOMPEdit - Dreaming
|
||||
|
||||
/obj/item/bedsheet/purple
|
||||
icon_state = "sheetpurple"
|
||||
dream_messages = list("purple")
|
||||
dream_messages = list("purple") //CHOMPEdit - Dreaming
|
||||
|
||||
/obj/item/bedsheet/rainbow
|
||||
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
|
||||
icon_state = "sheetred"
|
||||
dream_messages = list("red")
|
||||
dream_messages = list("red") //CHOMPEdit - Dreaming
|
||||
|
||||
/obj/item/bedsheet/yellow
|
||||
icon_state = "sheetyellow"
|
||||
dream_messages = list("yellow")
|
||||
dream_messages = list("yellow") //CHOMPEdit - Dreaming
|
||||
|
||||
/obj/item/bedsheet/mime
|
||||
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
|
||||
icon_state = "sheetclown"
|
||||
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
|
||||
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
|
||||
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
|
||||
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."
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
icon_state = "sheetbrown"
|
||||
dream_messages = list("brown")
|
||||
dream_messages = list("brown") //CHOMPEdit - Dreaming
|
||||
|
||||
/obj/item/bedsheet/ian
|
||||
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
|
||||
icon_state = "doublesheet"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
/obj/structure/closet/crate/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/climbable)
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/structure/closet/crate/can_open()
|
||||
return 1
|
||||
@@ -71,26 +72,6 @@
|
||||
update_icon()
|
||||
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)
|
||||
if(W.has_tool_quality(TOOL_WRENCH) && istype(src,/obj/structure/closet/crate/bin))
|
||||
return ..()
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
to_chat(usr, span_notice("You switch [on ? "on" : "off"] [src]."))
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/e_chair/rotate_clockwise()
|
||||
..()
|
||||
cut_overlays()
|
||||
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
|
||||
return
|
||||
/obj/structure/bed/chair/e_chair/set_dir()
|
||||
. = ..()
|
||||
if(.)
|
||||
cut_overlays()
|
||||
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()
|
||||
if(!on)
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
return INITIALIZE_HINT_QDEL
|
||||
color = material.icon_colour
|
||||
AddElement(/datum/element/climbable)
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/structure/gravemarker/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -109,40 +110,5 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/gravemarker/verb/rotate_clockwise()
|
||||
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
|
||||
/obj/structure/gravemarker/ghosts_can_use_rotate_verbs()
|
||||
return CONFIG_GET(flag/ghost_interaction)
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
if (constructed) // player-constructed railings
|
||||
anchored = FALSE
|
||||
AddElement(/datum/element/climbable/unanchored_can_break, 3.4 SECONDS, TRUE) // It's a RAILING!
|
||||
AddElement(/datum/element/rotatable)
|
||||
if(src.anchored)
|
||||
update_icon(0)
|
||||
|
||||
@@ -132,43 +133,12 @@
|
||||
if (WEST)
|
||||
add_overlay(image(icon, src, "[icon_modifier]mcorneroverlay", pixel_y = 32))
|
||||
|
||||
/obj/structure/railing/verb/rotate_counterclockwise()
|
||||
set name = "Rotate Railing Counter-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, 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/handle_rotation_verbs(angle)
|
||||
if(!can_touch(usr))
|
||||
return FALSE
|
||||
. = ..()
|
||||
if(.)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/railing/verb/flip() // This will help push railing to remote places, such as open space turfs
|
||||
set name = "Flip Railing"
|
||||
|
||||
@@ -35,6 +35,12 @@
|
||||
if(new_padding_material)
|
||||
padding_material = get_material_by_name(new_padding_material)
|
||||
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
|
||||
|
||||
/obj/structure/bed/get_material()
|
||||
@@ -174,29 +180,11 @@
|
||||
if(padding_material)
|
||||
padding_material.place_sheet(get_turf(src), 1)
|
||||
|
||||
/obj/structure/bed/verb/turn_around()
|
||||
set name = "Turn Around"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
/obj/structure/bed/ghosts_can_use_rotate_verbs()
|
||||
return CONFIG_GET(flag/ghost_interaction)
|
||||
|
||||
if(!flippable)
|
||||
to_chat(usr,span_notice("\The [src] can't face the other direction."))
|
||||
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/can_use_rotate_verbs_while_anchored()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/bed/psych
|
||||
name = "psychiatrist's couch"
|
||||
|
||||
@@ -66,34 +66,6 @@
|
||||
for(var/mob/living/L as anything in buckled_mobs)
|
||||
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
|
||||
name = "chair"
|
||||
icon_state = "shuttlechair"
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
update_state()
|
||||
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/structure/windoor_assembly/Destroy()
|
||||
density = FALSE
|
||||
@@ -270,46 +271,14 @@
|
||||
name = "near finished "
|
||||
name += "[secure ? "secure " : ""]windoor assembly[created_name ? " ([created_name])" : ""]"
|
||||
|
||||
//Rotates the windoor assembly clockwise
|
||||
/obj/structure/windoor_assembly/verb/rotate_clockwise()
|
||||
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")
|
||||
/obj/structure/windoor_assembly/handle_rotation_verbs(angle)
|
||||
if(state != "01")
|
||||
update_nearby_tiles(need_rebuild=1) //Compel updates before
|
||||
|
||||
src.set_dir(turn(src.dir, 270))
|
||||
|
||||
if(src.state != "01")
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
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
|
||||
. = ..()
|
||||
if(.)
|
||||
if(state != "01")
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
update_icon()
|
||||
|
||||
//Flips the windoor assembly, determines whather the door opens to the left or the right
|
||||
/obj/structure/windoor_assembly/verb/flip()
|
||||
|
||||
@@ -348,49 +348,14 @@
|
||||
take_damage(damage)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/window/verb/rotate_counterclockwise()
|
||||
set name = "Rotate Window Counterclockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.incapacitated())
|
||||
return 0
|
||||
|
||||
/obj/structure/window/handle_rotation_verbs(angle)
|
||||
if(is_fulltile())
|
||||
return 0
|
||||
|
||||
if(anchored)
|
||||
to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
|
||||
return 0
|
||||
|
||||
return FALSE
|
||||
update_nearby_tiles(need_rebuild=1) //Compel updates before
|
||||
src.set_dir(turn(src.dir, 90))
|
||||
updateSilicate()
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
return
|
||||
|
||||
|
||||
/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
|
||||
. = ..()
|
||||
if(.)
|
||||
updateSilicate()
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
/obj/structure/window/Initialize(mapload, start_dir=null, constructed=0)
|
||||
. = ..()
|
||||
@@ -402,7 +367,10 @@
|
||||
if (constructed)
|
||||
anchored = FALSE
|
||||
state = 0
|
||||
update_verbs()
|
||||
|
||||
// If we started anchored we'll need to disable rotation
|
||||
AddElement(/datum/element/rotatable)
|
||||
update_verbs()
|
||||
|
||||
health = maxhealth
|
||||
|
||||
@@ -456,11 +424,13 @@
|
||||
//Updates the availabiliy of the rotation verbs
|
||||
/obj/structure/window/proc/update_verbs()
|
||||
if(anchored || is_fulltile())
|
||||
verbs -= /obj/structure/window/verb/rotate_counterclockwise
|
||||
verbs -= /obj/structure/window/verb/rotate_clockwise
|
||||
verbs -= /atom/movable/proc/rotate_counterclockwise
|
||||
verbs -= /atom/movable/proc/rotate_clockwise
|
||||
verbs -= /atom/movable/proc/turn_around
|
||||
else if(!is_fulltile())
|
||||
verbs += /obj/structure/window/verb/rotate_counterclockwise
|
||||
verbs += /obj/structure/window/verb/rotate_clockwise
|
||||
verbs |= /atom/movable/proc/rotate_counterclockwise
|
||||
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)
|
||||
/obj/structure/window/update_icon()
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
var/visible = 0
|
||||
var/list/i_beams = null
|
||||
|
||||
/obj/item/assembly/infra/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/item/assembly/infra/activate()
|
||||
if(!..())
|
||||
return FALSE
|
||||
@@ -132,21 +136,6 @@
|
||||
CHECK_TICK
|
||||
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*********************************/
|
||||
|
||||
|
||||
@@ -98,6 +98,9 @@
|
||||
build_inventory()
|
||||
power_change()
|
||||
|
||||
if(can_rotate) // If we can't change directions, don't bother.
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
GLOBAL_LIST_EMPTY(vending_products)
|
||||
/**
|
||||
* Build produdct_records from the products lists
|
||||
@@ -633,39 +636,6 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
else
|
||||
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()
|
||||
set name = "Check Vending Logs"
|
||||
set category = "Object"
|
||||
|
||||
@@ -449,6 +449,7 @@
|
||||
. = ..()
|
||||
default_apply_parts()
|
||||
AddElement(/datum/element/climbable)
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/machinery/mining/brace/RefreshParts()
|
||||
..()
|
||||
@@ -514,31 +515,3 @@
|
||||
connected.supports -= src
|
||||
connected.check_supports()
|
||||
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
|
||||
|
||||
@@ -22,6 +22,7 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
|
||||
. = ..()
|
||||
GLOB.fuel_injectors += src
|
||||
default_apply_parts()
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/machinery/fusion_fuel_injector/Destroy()
|
||||
if(cur_assembly)
|
||||
@@ -144,23 +145,3 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
|
||||
flick("injector-emitting",src)
|
||||
else
|
||||
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))
|
||||
|
||||
@@ -31,6 +31,7 @@ GLOBAL_LIST_EMPTY(all_turbines)
|
||||
soundloop = new(list(src), FALSE)
|
||||
desc = initial(desc) + " Rated for [round(max_power/1000)] kW."
|
||||
GLOB.all_turbines += src
|
||||
AddElement(/datum/element/rotatable)
|
||||
..() //Not returned, because...
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
@@ -241,26 +242,6 @@ GLOBAL_LIST_EMPTY(all_turbines)
|
||||
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)
|
||||
if(!(effective_gen >= max_power / 2 && powernet)) // Don't make a spike if we're not making a whole lot of power.
|
||||
return
|
||||
|
||||
@@ -75,25 +75,9 @@
|
||||
fixture_type = /obj/machinery/light/floortube
|
||||
sheets_refunded = 2
|
||||
|
||||
/obj/machinery/light_construct/floortube/verb/rotate_clockwise()
|
||||
set name = "Rotate Fixture 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/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/Initialize(mapload, newdir, building, datum/frame/frame_types/frame_type, obj/machinery/light/fixture)
|
||||
. = ..()
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/machinery/light_construct/floortube/update_icon()
|
||||
switch(stage)
|
||||
|
||||
@@ -28,33 +28,12 @@
|
||||
|
||||
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)
|
||||
. = ..()
|
||||
if(state == 2 && anchored)
|
||||
connect_to_network()
|
||||
AddElement(/datum/element/climbable)
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/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)
|
||||
|
||||
@@ -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)
|
||||
. = ..()
|
||||
AddElement(/datum/element/climbable)
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/structure/particle_accelerator/Destroy()
|
||||
construction_state = 0
|
||||
@@ -93,28 +94,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
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)
|
||||
. = ..()
|
||||
|
||||
@@ -267,28 +246,10 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
var/strength = 0
|
||||
var/desc_holder = null
|
||||
|
||||
|
||||
/obj/machinery/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/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/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/climbable)
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/machinery/particle_accelerator/update_icon()
|
||||
return
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
wires = new(src)
|
||||
connected_parts = list()
|
||||
update_active_power_usage(initial(active_power_usage) * (strength + 1))
|
||||
AddElement(/datum/element/climbable)
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/Destroy()
|
||||
if(active)
|
||||
|
||||
@@ -31,35 +31,12 @@
|
||||
if(spawn_cartridges)
|
||||
for(var/type in spawn_cartridges)
|
||||
add_cartridge(new type(src))
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/machinery/chemical_dispenser/examine(mob/user)
|
||||
. = ..()
|
||||
. += "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)
|
||||
if(!istype(C))
|
||||
if(user)
|
||||
|
||||
@@ -349,36 +349,13 @@
|
||||
reagents.add_reagent(REAGENT_ID_WATER,2000)
|
||||
update_icon()
|
||||
AddElement(/datum/element/climbable)
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/examine(mob/user)
|
||||
. = ..()
|
||||
if(cupholder)
|
||||
. += 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)
|
||||
if(I.has_tool_quality(TOOL_WRENCH))
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
else
|
||||
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
|
||||
/obj/structure/disposalconstruct/proc/update()
|
||||
var/flip = turn(dir, 180)
|
||||
@@ -118,40 +120,6 @@
|
||||
invisibility = (intact && level==1) ? INVISIBILITY_ABSTRACT: INVISIBILITY_NONE // hide if floor is intact
|
||||
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()
|
||||
set category = "Object"
|
||||
set name = "Flip Pipe"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
// Update neighbours and self for state
|
||||
update_neighbours()
|
||||
update_icon()
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/machinery/reagent_refinery/Destroy()
|
||||
reagent_flush()
|
||||
@@ -131,28 +132,6 @@
|
||||
/obj/machinery/reagent_refinery/proc/minimum_reagents_for_transfer(var/obj/machinery/reagent_refinery/target)
|
||||
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)
|
||||
// Specialty
|
||||
if(flags & REFINERY_TUTORIAL_HUB)
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
/obj/machinery/shield_capacitor/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/climbable)
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/machinery/shield_capacitor/advanced
|
||||
name = "advanced shield capacitor"
|
||||
@@ -138,28 +139,3 @@
|
||||
icon_state = "broke"
|
||||
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
|
||||
|
||||
@@ -113,6 +113,10 @@
|
||||
color = "#ffffff"
|
||||
density = FALSE
|
||||
|
||||
/obj/structure/smoletrack/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/structure/smoletrack/attack_hand(mob/user)
|
||||
if(user.a_intent == I_DISARM)
|
||||
if(ismouse(user) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
@@ -124,22 +128,8 @@
|
||||
new /obj/item/stack/material/smolebricks(F)
|
||||
qdel(src)
|
||||
|
||||
//rotates piece
|
||||
/obj/structure/smoletrack/verb/rotate_clockwise()
|
||||
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))
|
||||
/obj/structure/smoletrack/ghosts_can_use_rotate_verbs()
|
||||
return CONFIG_GET(flag/ghost_interaction)
|
||||
|
||||
//color roads
|
||||
/obj/structure/smoletrack/verb/colorpieces()
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
/obj/machinery/suspension_gen/Initialize(mapload)
|
||||
. = ..()
|
||||
cell = new /obj/item/cell/high(src)
|
||||
AddElement(/datum/element/rotatable)
|
||||
|
||||
/obj/machinery/suspension_gen/process()
|
||||
if(suspension_field)
|
||||
@@ -191,26 +192,6 @@
|
||||
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()
|
||||
cut_overlays()
|
||||
if(panel_open)
|
||||
|
||||
@@ -731,6 +731,7 @@
|
||||
#include "code\datums\elements\footstep_override.dm"
|
||||
#include "code\datums\elements\godmode.dm"
|
||||
#include "code\datums\elements\light_blocking.dm"
|
||||
#include "code\datums\elements\rotatable.dm"
|
||||
#include "code\datums\elements\sellable.dm"
|
||||
#include "code\datums\elements\slosh.dm"
|
||||
#include "code\datums\elements\turf_transparency.dm"
|
||||
|
||||
Reference in New Issue
Block a user