From 451044863e0742459aef630052289c01a0a12bbb Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Fri, 22 Jul 2016 16:09:16 -0400 Subject: [PATCH 1/3] Alt Click Madness --- .../objects/structures/stool_bed_chair_nest/chairs.dm | 10 ++++++++++ code/game/objects/structures/windoor_assembly.dm | 10 ++++++++++ code/game/objects/structures/window.dm | 10 ++++++++++ code/modules/power/singularity/emitter.dm | 10 ++++++++++ .../particle_accelerator/particle_accelerator.dm | 10 ++++++++++ code/modules/recycling/disposal-construction.dm | 10 ++++++++++ 6 files changed, 60 insertions(+) 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 c62df2f6cca..ab2317c3db2 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -66,6 +66,16 @@ handle_rotation() return +/obj/structure/stool/bed/chair/AltClick(mob/user) + ..() + if(user.incapacitated()) + to_chat(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 // TODO: Special ash subtype that looks like charred chair legs diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 47e0823f549..d4dd11e8684 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -322,6 +322,16 @@ obj/structure/windoor_assembly/Destroy() update_icon() return +/obj/structure/windoor_assembly/AltClick(mob/user) + ..() + if(user.incapacitated()) + 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/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 2293e04a746..40a54ee954f 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -318,6 +318,16 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f return +/obj/structure/window/AltClick(mob/user) + ..() + if(user.incapacitated()) + to_chat(user, "You can't do that right now!") + return + if(!in_range(src, user)) + return + else + revrotate() + /* /obj/structure/window/proc/updateSilicate() if(silicateIcon && silicate) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 89119df21a8..16bf56ec4a6 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -70,6 +70,16 @@ src.dir = turn(src.dir, 90) return 1 +/obj/machinery/power/emitter/AltClick(mob/user) + ..() + if(user.incapacitated()) + to_chat(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 051440525f3..3e8294dc267 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -101,6 +101,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.incapacitated()) + to_chat(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 948973bc3bc..604a97db46b 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -96,6 +96,16 @@ dir = turn(dir, -90) update() +/obj/structure/disposalconstruct/AltClick(mob/user) + ..() + if(user.incapacitated()) + to_chat(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 src in view(1) From d83fe433319b12f3fd3248777e3dfecf43d572f8 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Fri, 22 Jul 2016 19:25:07 -0400 Subject: [PATCH 2/3] tweak --- .../game/objects/structures/stool_bed_chair_nest/chairs.dm | 5 ++--- code/game/objects/structures/windoor_assembly.dm | 7 +++---- code/game/objects/structures/window.dm | 5 ++--- code/modules/pda/PDA.dm | 7 ++++--- code/modules/power/singularity/emitter.dm | 5 ++--- .../particle_accelerator/particle_accelerator.dm | 5 ++--- code/modules/recycling/disposal-construction.dm | 5 ++--- 7 files changed, 17 insertions(+), 22 deletions(-) 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 ab2317c3db2..f816320f067 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -71,10 +71,9 @@ if(user.incapacitated()) to_chat(user, "You can't do that right now!") return - if(!in_range(src, user)) + if(!Adjacent(user)) return - else - rotate() + rotate() // Chair types /obj/structure/stool/bed/chair/wood diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index d4dd11e8684..7d2aa13f5be 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -325,12 +325,11 @@ obj/structure/windoor_assembly/Destroy() /obj/structure/windoor_assembly/AltClick(mob/user) ..() if(user.incapacitated()) - user << "You can't do that right now!" + to_chat(user, "You can't do that right now!") return - if(!in_range(src, user)) + if(!Adjacent(user)) return - else - revrotate() + revrotate() //Flips the windoor assembly, determines whather the door opens to the left or the right /obj/structure/windoor_assembly/verb/flip() diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 40a54ee954f..07e9b7ab970 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -323,10 +323,9 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f if(user.incapacitated()) to_chat(user, "You can't do that right now!") return - if(!in_range(src, user)) + if(!Adjacent(user)) return - else - revrotate() + revrotate() /* /obj/structure/window/proc/updateSilicate() diff --git a/code/modules/pda/PDA.dm b/code/modules/pda/PDA.dm index 4dfd8575a22..76731807e77 100755 --- a/code/modules/pda/PDA.dm +++ b/code/modules/pda/PDA.dm @@ -300,15 +300,16 @@ var/global/list/obj/item/device/pda/PDAs = list() else to_chat(usr, "You cannot do this while restrained.") -/obj/item/device/pda/AltClick() +/obj/item/device/pda/AltClick(mob/user) + ..() if(issilicon(usr)) return - if(can_use(usr)) + if(can_use(user)) if(id) remove_id() else - usr << "This PDA does not have an ID in it!" + to_chat(user, "This PDA does not have an ID in it!") /obj/item/device/pda/proc/remove_id() if(id) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 16bf56ec4a6..b50b4813ae4 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -75,10 +75,9 @@ if(user.incapacitated()) to_chat(user, "You can't do that right now!") return - if(!in_range(src, user)) + if(!Adjacent(user)) return - else - rotate() + rotate() /obj/machinery/power/emitter/initialize() ..() diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 3e8294dc267..8bf3741f9e1 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -106,10 +106,9 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin if(user.incapacitated()) to_chat(user, "You can't do that right now!") return - if(!in_range(src, user)) + if(!Adjacent(user)) return - else - rotate() + rotate() /obj/structure/particle_accelerator/verb/rotateccw() set name = "Rotate Counter Clockwise" diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 604a97db46b..a88762702a8 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -101,10 +101,9 @@ if(user.incapacitated()) to_chat(user << "You can't do that right now!") return - if(!in_range(src, user)) + if(!Adjacent(user)) return - else - rotate() + rotate() /obj/structure/disposalconstruct/verb/flip() set name = "Flip Pipe" From 0870c663032e2a340de82e7a91f055b9a0367796 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Tue, 26 Jul 2016 14:02:07 -0400 Subject: [PATCH 3/3] tweak --- code/game/objects/structures/stool_bed_chair_nest/chairs.dm | 1 - code/game/objects/structures/windoor_assembly.dm | 1 - code/game/objects/structures/window.dm | 1 - code/modules/power/singularity/emitter.dm | 1 - .../singularity/particle_accelerator/particle_accelerator.dm | 1 - code/modules/recycling/disposal-construction.dm | 1 - 6 files changed, 6 deletions(-) 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 f816320f067..a12f804d308 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -67,7 +67,6 @@ return /obj/structure/stool/bed/chair/AltClick(mob/user) - ..() if(user.incapacitated()) to_chat(user, "You can't do that right now!") return diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 7d2aa13f5be..4e41daef289 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -323,7 +323,6 @@ obj/structure/windoor_assembly/Destroy() return /obj/structure/windoor_assembly/AltClick(mob/user) - ..() if(user.incapacitated()) to_chat(user, "You can't do that right now!") return diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 07e9b7ab970..7ae2ddcd27d 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -319,7 +319,6 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f /obj/structure/window/AltClick(mob/user) - ..() if(user.incapacitated()) to_chat(user, "You can't do that right now!") return diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index b50b4813ae4..2493e492d48 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -71,7 +71,6 @@ return 1 /obj/machinery/power/emitter/AltClick(mob/user) - ..() if(user.incapacitated()) to_chat(user, "You can't do that right now!") return diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 8bf3741f9e1..a75bdd3ec80 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -102,7 +102,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin return 1 /obj/structure/particle_accelerator/AltClick(mob/user) - ..() if(user.incapacitated()) to_chat(user, "You can't do that right now!") return diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index a88762702a8..4e720f39c00 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -97,7 +97,6 @@ update() /obj/structure/disposalconstruct/AltClick(mob/user) - ..() if(user.incapacitated()) to_chat(user << "You can't do that right now!") return