mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
Genericises rotate() on objects. (#8430)
This commit is contained in:
@@ -5,9 +5,10 @@
|
||||
desc = "It is a heavy duty industrial laser."
|
||||
icon = 'icons/obj/singularity.dmi'
|
||||
icon_state = "emitter"
|
||||
anchored = 0
|
||||
density = 1
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
req_access = list(access_engine_equip)
|
||||
obj_flags = OBJ_FLAG_ROTATABLE
|
||||
var/id = null
|
||||
|
||||
use_power = 0 //uses powernet power, not APC power
|
||||
@@ -33,17 +34,6 @@
|
||||
QDEL_NULL(spark_system)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/emitter/verb/rotate()
|
||||
set name = "Rotate"
|
||||
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()
|
||||
. = ..()
|
||||
spark_system = bind_spark(src, 5, alldirs)
|
||||
|
||||
@@ -64,6 +64,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
icon = 'icons/obj/machines/particle_accelerator.dmi'
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
obj_flags = OBJ_FLAG_ROTATABLE
|
||||
var/obj/machinery/particle_accelerator/control_box/master
|
||||
var/construction_state = 0
|
||||
var/reference
|
||||
@@ -82,36 +83,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
icon_state = "end_cap"
|
||||
reference = "end_cap"
|
||||
|
||||
/obj/structure/particle_accelerator/verb/rotate()
|
||||
set name = "Rotate Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(use_check_and_message(usr))
|
||||
to_chat(usr, SPAN_WARNING("You are in no state to do this!"))
|
||||
return FALSE
|
||||
if(anchored)
|
||||
to_chat(usr, SPAN_WARNING("It is fastened to the floor!"))
|
||||
return FALSE
|
||||
|
||||
set_dir(turn(dir, 270))
|
||||
return TRUE
|
||||
|
||||
/obj/structure/particle_accelerator/verb/rotateccw()
|
||||
set name = "Rotate Counter Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(use_check_and_message(usr))
|
||||
to_chat(usr, SPAN_WARNING("You are in no state to do this!"))
|
||||
return FALSE
|
||||
if(anchored)
|
||||
to_chat(usr, SPAN_WARNING("It is fastened to the floor!"))
|
||||
return FALSE
|
||||
|
||||
set_dir(turn(dir, 90))
|
||||
return TRUE
|
||||
|
||||
/obj/structure/particle_accelerator/examine(mob/user)
|
||||
switch(construction_state)
|
||||
if(0)
|
||||
@@ -265,36 +236,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
var/powered
|
||||
var/strength = 0
|
||||
|
||||
/obj/machinery/particle_accelerator/verb/rotate()
|
||||
set name = "Rotate Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(use_check_and_message(usr))
|
||||
to_chat(usr, SPAN_WARNING("You are in no state to do this!"))
|
||||
return FALSE
|
||||
if(anchored)
|
||||
to_chat(usr, SPAN_WARNING("It is fastened to the floor!"))
|
||||
return FALSE
|
||||
|
||||
set_dir(turn(dir, 270))
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/particle_accelerator/verb/rotateccw()
|
||||
set name = "Rotate Counter-Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(use_check_and_message(usr))
|
||||
to_chat(usr, SPAN_WARNING("You are in no state to do this!"))
|
||||
return FALSE
|
||||
if(anchored)
|
||||
to_chat(usr, SPAN_WARNING("It is fastened to the floor!"))
|
||||
return FALSE
|
||||
|
||||
set_dir(turn(dir, 90))
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/particle_accelerator/update_icon()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user