Merge pull request #11899 from kingofkosmos/altclickrotatepipe

Alt-click to rotate stuff
This commit is contained in:
Razharas
2015-09-24 01:59:04 +03:00
11 changed files with 129 additions and 7 deletions
+11 -1
View File
@@ -1,6 +1,6 @@
/obj/item/device/assembly/infra
name = "infrared emitter"
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted.\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
icon_state = "infrared"
materials = list(MAT_METAL=1000, MAT_GLASS=500)
origin_tech = "magnets=2"
@@ -144,6 +144,16 @@
dir = turn(dir, 90)
return
/obj/item/device/assembly/infra/AltClick(mob/user)
..()
if(!user.canUseTopic(user))
user << "<span class='warning'>You can't do that right now!</span>"
return
if(!in_range(src, user))
return
else
rotate()
/***************************IBeam*********************************/
+12 -2
View File
@@ -2,7 +2,7 @@
/obj/machinery/power/emitter
name = "Emitter"
desc = "A heavy duty industrial laser"
desc = "A heavy duty industrial laser.\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
icon = 'icons/obj/singularity.dmi'
icon_state = "emitter"
anchored = 0
@@ -57,9 +57,19 @@
if (src.anchored)
usr << "<span class='warning'>It is fastened to the floor!</span>"
return 0
src.dir = turn(src.dir, 90)
src.dir = turn(src.dir, 270)
return 1
/obj/machinery/power/emitter/AltClick(mob/user)
..()
if(!user.canUseTopic(user))
user << "<span class='warning'>You can't do that right now!</span>"
return
if(!in_range(src, user))
return
else
rotate()
/obj/machinery/power/emitter/initialize()
..()
if(state == 2 && anchored)
@@ -71,6 +71,10 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
var/strength = null
var/desc_holder = null
/obj/structure/particle_accelerator/examine(mob/user)
..()
user << "<span class='notice'>Alt-click to rotate it clockwise.</span>"
/obj/structure/particle_accelerator/Destroy()
construction_state = 0
if(master)
@@ -101,6 +105,16 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
src.dir = turn(src.dir, 270)
return 1
/obj/structure/particle_accelerator/AltClick(mob/user)
..()
if(!user.canUseTopic(user))
user << "<span class='warning'>You can't do that right now!</span>"
return
if(!in_range(src, user))
return
else
rotate()
/obj/structure/particle_accelerator/verb/rotateccw()
set name = "Rotate Counter Clockwise"
set category = "Object"
@@ -16,6 +16,10 @@
var/dpdir = 0 // directions as disposalpipe
var/base_state = "pipe-s"
/obj/structure/disposalconstruct/examine(mob/user)
..()
user << "<span class='notice'>Alt-click to rotate it clockwise.</span>"
/obj/structure/disposalconstruct/New(var/loc, var/pipe_type, var/direction = 1)
..(loc)
if(pipe_type)
@@ -104,6 +108,16 @@
dir = turn(dir, -90)
update()
/obj/structure/disposalconstruct/AltClick(mob/user)
..()
if(!user.canUseTopic(user))
user << "<span class='warning'>You can't do that right now!</span>"
return
if(!in_range(src, user))
return
else
rotate()
/obj/structure/disposalconstruct/verb/flip()
set name = "Flip Pipe"
set category = "Object"