From c92c9793df233e939536cb36a72add8a1509bfdc Mon Sep 17 00:00:00 2001 From: kingofkosmos Date: Sun, 20 Sep 2015 11:59:08 +0300 Subject: [PATCH 1/3] Makes alt-clicking rotate pipes and adds a description for doing so. --- code/game/machinery/pipe/construction.dm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 92f3e0ac1cf..7b4fe1277ed 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -43,6 +43,10 @@ Buildable meters PIPE_GAS_MIXER, \ ) +/obj/item/pipe/examine(mob/user) + ..() + user << "Alt-click it to rotate clockwise." + /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 << "You can't do that right now!" + return + if(!in_range(src, user)) + return + else + rotate() + /obj/item/pipe/Move() ..() if ((pipe_type in list (PIPE_SIMPLE, PIPE_HE)) && is_bent \ From 14332a0d3a79d9eb04fd52897b1ed262dae3d7d1 Mon Sep 17 00:00:00 2001 From: kingofkosmos Date: Sun, 20 Sep 2015 17:50:41 +0300 Subject: [PATCH 2/3] Adds altclick-rotation + descriptions for chairs and windows. --- code/game/machinery/pipe/construction.dm | 2 +- code/game/objects/structures/electricchair.dm | 2 +- .../structures/stool_bed_chair_nest/chairs.dm | 13 +++++++++++-- code/game/objects/structures/window.dm | 13 +++++++++++++ 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 7b4fe1277ed..31276fa0683 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -45,7 +45,7 @@ Buildable meters /obj/item/pipe/examine(mob/user) ..() - user << "Alt-click it to rotate clockwise." + user << "Alt-click to rotate it clockwise." /obj/item/pipe/New(loc, pipe_type, dir, obj/machinery/atmospherics/make_from) ..() diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm index 572ae4a133a..9ae339766e9 100644 --- a/code/game/objects/structures/electricchair.dm +++ b/code/game/objects/structures/electricchair.dm @@ -1,6 +1,6 @@ /obj/structure/stool/bed/chair/e_chair name = "electric chair" - desc = "Looks absolutely SHOCKING!" + desc = "Looks absolutely SHOCKING!\nAlt-click to rotate it clockwise." icon_state = "echair0" var/obj/item/assembly/shock_kit/part = null var/last_time = 1.0 diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 9335535a873..9186330a1a0 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -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.\nAlt-click to rotate it clockwise." 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 << "You can't do that right now!" + 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.\nAlt-click to rotate it clockwise." icon_state = "comfychair" color = rgb(255,255,255) burn_state = 0 //Burnable diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 9dc8d6631e9..f5c1fb263d2 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -21,6 +21,10 @@ var/image/crack_overlay can_be_unanchored = 1 +/obj/structure/window/examine(mob/user) + ..() + user << "Alt-click to rotate it clockwise." + /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 << "You can't do that right now!" + return + if(!in_range(src, user)) + return + else + revrotate() /* /obj/structure/window/proc/updateSilicate() what do you call a syndicate silicon? From 65c516607f1e7c877e699fd0fe86e887f88ec59e Mon Sep 17 00:00:00 2001 From: kingofkosmos Date: Sun, 20 Sep 2015 18:54:23 +0300 Subject: [PATCH 3/3] Adds altclick rotation + description to doppler array, transit tubes, windoor assembly, infrared emitter, emitter, particle accelerator, disposal tubes. --- code/game/machinery/doppler_array.dm | 12 +++++++++++- .../transit_tubes/transit_tube_construction.dm | 14 ++++++++++++++ code/game/objects/structures/windoor_assembly.dm | 14 ++++++++++++++ code/modules/assembly/infrared.dm | 12 +++++++++++- code/modules/power/singularity/emitter.dm | 14 ++++++++++++-- .../particle_accelerator/particle_accelerator.dm | 14 ++++++++++++++ code/modules/recycling/disposal-construction.dm | 14 ++++++++++++++ 7 files changed, 90 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index 4d4e84cb3b2..abbd519727f 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -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.\nAlt-click to rotate it clockwise." 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 << "You can't do that right now!" + 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 diff --git a/code/game/objects/structures/transit_tubes/transit_tube_construction.dm b/code/game/objects/structures/transit_tubes/transit_tube_construction.dm index e226e7215e6..30e67f7f219 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_construction.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_construction.dm @@ -9,6 +9,10 @@ layer = 3.1 //same as the built tube anchored = 0.0 +/obj/structure/c_transit_tube/examine(mob/user) + ..() + user << "Alt-click to rotate it clockwise." + //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 << "You can't do that right now!" + 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" diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 867b7e5723f..c58f8bc89b7 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -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 << "Alt-click to rotate it clockwise." + /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 << "You can't do that right now!" + 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" diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index e470324cdf3..24421689d7b 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -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.\nAlt-click to rotate it clockwise." icon_state = "infrared" materials = list(MAT_METAL=1000, MAT_GLASS=500) origin_tech = "magnets=2" @@ -133,6 +133,16 @@ dir = turn(dir, 90) return +/obj/item/device/assembly/infra/AltClick(mob/user) + ..() + if(!user.canUseTopic(user)) + user << "You can't do that right now!" + return + if(!in_range(src, user)) + return + else + rotate() + /***************************IBeam*********************************/ diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index ca08ffd7bc3..1541a68992a 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -2,7 +2,7 @@ /obj/machinery/power/emitter name = "Emitter" - desc = "A heavy duty industrial laser" + desc = "A heavy duty industrial laser.\nAlt-click to rotate it clockwise." icon = 'icons/obj/singularity.dmi' icon_state = "emitter" anchored = 0 @@ -57,9 +57,19 @@ if (src.anchored) usr << "It is fastened to the floor!" 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 << "You can't do that right now!" + return + if(!in_range(src, user)) + return + else + rotate() + /obj/machinery/power/emitter/initialize() ..() if(state == 2 && anchored) diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 18a04d16f32..8c29447dc03 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -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 << "Alt-click to rotate it clockwise." + /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 << "You can't do that right now!" + return + if(!in_range(src, user)) + return + else + rotate() + /obj/structure/particle_accelerator/verb/rotateccw() set name = "Rotate Counter Clockwise" set category = "Object" diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index d636f818374..20cb7d40710 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -16,6 +16,10 @@ var/dpdir = 0 // directions as disposalpipe var/base_state = "pipe-s" +/obj/structure/disposalconstruct/examine(mob/user) + ..() + user << "Alt-click to rotate it clockwise." + /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 << "You can't do that right now!" + return + if(!in_range(src, user)) + return + else + rotate() + /obj/structure/disposalconstruct/verb/flip() set name = "Flip Pipe" set category = "Object"