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
+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"