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*********************************/