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
@@ -2,7 +2,7 @@ var/list/doppler_arrays = list()
/obj/machinery/doppler_array
name = "tachyon-doppler array"
desc = "A highly precise directional sensor array which measures the release of quants from decaying tachyons. The doppler shifting of the mirror-image formed by these quants can reveal the size, location and temporal affects of energetic disturbances within a large radius ahead of the array."
desc = "A highly precise directional sensor array which measures the release of quants from decaying tachyons. The doppler shifting of the mirror-image formed by these quants can reveal the size, location and temporal affects of energetic disturbances within a large radius ahead of the array.\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
icon = 'icons/obj/machines/research.dmi'
icon_state = "tdoppler"
density = 1
@@ -44,6 +44,16 @@ var/list/doppler_arrays = list()
src.dir = turn(src.dir, 90)
return
/obj/machinery/doppler_array/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/doppler_array/proc/sense_explosion(x0,y0,z0,devastation_range,heavy_impact_range,light_impact_range,
took,orig_dev_range,orig_heavy_range,orig_light_range)
if(stat & NOPOWER) return
+14
View File
@@ -43,6 +43,10 @@ Buildable meters
PIPE_GAS_MIXER, \
)
/obj/item/pipe/examine(mob/user)
..()
user << "<span class='notice'>Alt-click to rotate it clockwise.</span>"
/obj/item/pipe/New(loc, pipe_type, dir, obj/machinery/atmospherics/make_from)
..()
if(make_from)
@@ -159,6 +163,16 @@ var/global/list/pipeID2State = list(
return
/obj/item/pipe/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/item/pipe/Move()
..()
if ((pipe_type in list (PIPE_SIMPLE, PIPE_HE)) && is_bent \
@@ -1,6 +1,6 @@
/obj/structure/stool/bed/chair/e_chair
name = "electric chair"
desc = "Looks absolutely SHOCKING!"
desc = "Looks absolutely SHOCKING!\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
icon_state = "echair0"
var/obj/item/assembly/shock_kit/part = null
var/last_time = 1
@@ -1,6 +1,6 @@
/obj/structure/stool/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete
name = "chair"
desc = "You sit in this. Either by will or force."
desc = "You sit in this. Either by will or force.\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
icon_state = "chair"
buckle_lying = 0 //you sit in a chair, not lay
burn_state = -1 //Not Burnable
@@ -72,6 +72,15 @@
return
spin()
/obj/structure/stool/bed/chair/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()
// Chair types
/obj/structure/stool/bed/chair/wood
@@ -98,7 +107,7 @@
/obj/structure/stool/bed/chair/comfy
name = "comfy chair"
desc = "It looks comfy."
desc = "It looks comfy.\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
icon_state = "comfychair"
color = rgb(255,255,255)
burn_state = 0 //Burnable
@@ -9,6 +9,10 @@
layer = 3.1 //same as the built tube
anchored = 0
/obj/structure/c_transit_tube/examine(mob/user)
..()
user << "<span class='notice'>Alt-click to rotate it clockwise.</span>"
//wrapper for turn that changes the transit tube formatted icon_state instead of the dir
/obj/structure/c_transit_tube/proc/tube_turn(angle)
var/list/badtubes = list("W-E", "W-E-Pass", "S-N", "S-N-Pass", "SW-NE", "SE-NW")
@@ -50,6 +54,16 @@
tube_turn(-90)
/obj/structure/c_transit_tube/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/c_transit_tube/verb/rotate_ccw()
set name = "Rotate Tube CCW"
set category = "Object"
@@ -27,6 +27,10 @@
var/secure = 0 //Whether or not this creates a secure windoor
var/state = "01" //How far the door assembly has progressed
/obj/structure/windoor_assembly/examine(mob/user)
..()
user << "<span class='notice'>Alt-click to rotate it clockwise.</span>"
/obj/structure/windoor_assembly/New(dir=NORTH)
..()
ini_dir = dir
@@ -323,6 +327,16 @@
update_icon()
return
/obj/structure/windoor_assembly/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
revrotate()
//Flips the windoor assembly, determines whather the door opens to the left or the right
/obj/structure/windoor_assembly/verb/flip()
set name = "Flip Windoor Assembly"
+13
View File
@@ -21,6 +21,10 @@
var/image/crack_overlay
can_be_unanchored = 1
/obj/structure/window/examine(mob/user)
..()
user << "<span class='notice'>Alt-click to rotate it clockwise.</span>"
/obj/structure/window/New(Loc,re=0)
..()
health = maxhealth
@@ -342,6 +346,15 @@
add_fingerprint(usr)
return
/obj/structure/window/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
revrotate()
/*
/obj/structure/window/proc/updateSilicate() what do you call a syndicate silicon?
+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"