From 7a81e116d25bbf20b98be84db035ac6f9927d188 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Fri, 10 Oct 2014 00:23:03 -0400 Subject: [PATCH 1/7] Fixes #6647 grabbed_by assignment is now done in the grab constructor, instead of leaking out all over the place. --- code/WorkInProgress/Cael_Aislinn/sculpture.dm | 1 - code/WorkInProgress/Cib/amorph/amorph_attack.dm | 2 -- code/modules/mob/living/carbon/alien/humanoid/humanoid.dm | 1 - code/modules/mob/living/carbon/alien/larva/larva.dm | 3 +-- code/modules/mob/living/carbon/human/human_attackalien.dm | 1 - code/modules/mob/living/carbon/human/human_attackhand.dm | 1 - code/modules/mob/living/carbon/human/inventory.dm | 1 + code/modules/mob/living/carbon/monkey/monkey.dm | 4 +--- code/modules/mob/living/silicon/robot/robot.dm | 3 +-- code/modules/mob/living/simple_animal/simple_animal.dm | 4 +--- code/modules/mob/mob_grab.dm | 2 ++ code/unused/hivebot/hivebot.dm | 1 - 12 files changed, 7 insertions(+), 17 deletions(-) diff --git a/code/WorkInProgress/Cael_Aislinn/sculpture.dm b/code/WorkInProgress/Cael_Aislinn/sculpture.dm index 2ecc98a4aec..639c2c84877 100644 --- a/code/WorkInProgress/Cael_Aislinn/sculpture.dm +++ b/code/WorkInProgress/Cael_Aislinn/sculpture.dm @@ -26,7 +26,6 @@ G.assailant = src G.layer = 20 G.affecting = target - target.grabbed_by += G G.synch() target.LAssailant = src diff --git a/code/WorkInProgress/Cib/amorph/amorph_attack.dm b/code/WorkInProgress/Cib/amorph/amorph_attack.dm index 188c682033d..814b977d1ab 100644 --- a/code/WorkInProgress/Cib/amorph/amorph_attack.dm +++ b/code/WorkInProgress/Cib/amorph/amorph_attack.dm @@ -95,7 +95,6 @@ M.r_hand = G G.layer = 20 G.affecting = src - grabbed_by += G G.synch() LAssailant = M @@ -150,7 +149,6 @@ M.r_hand = G G.layer = 20 G.affecting = src - grabbed_by += G G.synch() LAssailant = M diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 03e590f036b..e6fa5dad111 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -293,7 +293,6 @@ M.put_in_active_hand(G) - grabbed_by += G G.synch() LAssailant = M diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 9f5640c69b1..ce4abe5fb7f 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -265,11 +265,10 @@ if ("grab") if (M == src) return - var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src ) + var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src ) M.put_in_active_hand(G) - grabbed_by += G G.synch() LAssailant = M diff --git a/code/modules/mob/living/carbon/human/human_attackalien.dm b/code/modules/mob/living/carbon/human/human_attackalien.dm index ea73d63f8d5..76f56d3fcdf 100644 --- a/code/modules/mob/living/carbon/human/human_attackalien.dm +++ b/code/modules/mob/living/carbon/human/human_attackalien.dm @@ -15,7 +15,6 @@ M.put_in_active_hand(G) - grabbed_by += G G.synch() LAssailant = M diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index bacef8541bc..b2e98a83737 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -102,7 +102,6 @@ if(!G) //the grab will delete itself in New if affecting is anchored return M.put_in_active_hand(G) - grabbed_by += G G.synch() LAssailant = M diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index fca42a276c1..94b2d362890 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -681,6 +681,7 @@ It can still be worn/put on as normal. for (var/obj/item/weapon/grab/G in target.grabbed_by) if (G.loc == source && G.state >= GRAB_AGGRESSIVE) grabbing = 1 + break if (!grabbing) slot_to_process = null source << "\red Your grasp was broken before you could restrain [target]!" diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 7bb9af2a158..982dc98303a 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -277,7 +277,6 @@ M.put_in_active_hand(G) - grabbed_by += G G.synch() LAssailant = M @@ -342,11 +341,10 @@ if ("grab") if (M == src) return - var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src ) + var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src ) M.put_in_active_hand(G) - grabbed_by += G G.synch() LAssailant = M diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 40b3a4acd1a..2b7c2037774 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -839,11 +839,10 @@ if ("grab") if (M == src) return - var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src ) + var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src ) M.put_in_active_hand(G) - grabbed_by += G G.synch() playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) for(var/mob/O in viewers(src, null)) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 0fb08d08688..192d726aa4b 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -253,7 +253,6 @@ M.put_in_active_hand(G) - grabbed_by += G G.synch() G.affecting = src LAssailant = M @@ -285,11 +284,10 @@ if(!(status_flags & CANPUSH)) return - var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src ) + var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src ) M.put_in_active_hand(G) - grabbed_by += G G.synch() G.affecting = src LAssailant = M diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index a95f8612c1b..dd04a5781e8 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -28,6 +28,8 @@ del(src) return + affecting.grabbed_by += src + hud = new /obj/screen/grab(src) hud.icon_state = "reinforce" hud.name = "reinforce grab" diff --git a/code/unused/hivebot/hivebot.dm b/code/unused/hivebot/hivebot.dm index cf764c088b4..ade7dab091a 100644 --- a/code/unused/hivebot/hivebot.dm +++ b/code/unused/hivebot/hivebot.dm @@ -207,7 +207,6 @@ M.r_hand = G G.layer = 20 G.affecting = src - src.grabbed_by += G G.synch() playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) for(var/mob/O in viewers(src, null)) From b124644df4316d3a2b8647d1fcd8350d9edec728 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Fri, 10 Oct 2014 16:22:36 +0200 Subject: [PATCH 2/7] Less relative paths. Less type checks. --- code/game/machinery/computer/card.dm | 32 ++++++++++++++++------------ 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index b40f511a3bf..9341aca674f 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -11,24 +11,24 @@ var/mode = 0.0 var/printing = null - proc/is_centcom() - return istype(src, /obj/machinery/computer/card/centcom) +/obj/machinery/computer/card/proc/is_centcom() + return 0 - proc/is_authenticated() - return scan ? check_access(scan) : 0 +/obj/machinery/computer/card/proc/is_authenticated() + return scan ? check_access(scan) : 0 - proc/get_target_rank() - return modify && modify.assignment ? modify.assignment : "Unassigned" +/obj/machinery/computer/card/proc/get_target_rank() + return modify && modify.assignment ? modify.assignment : "Unassigned" - proc/format_jobs(list/jobs) - var/list/formatted = list() - for(var/job in jobs) - formatted.Add(list(list( - "display_name" = replacetext(job, " ", " "), - "target_rank" = get_target_rank(), - "job" = job))) +/obj/machinery/computer/card/proc/format_jobs(list/jobs) + var/list/formatted = list() + for(var/job in jobs) + formatted.Add(list(list( + "display_name" = replacetext(job, " ", " "), + "target_rank" = get_target_rank(), + "job" = job))) - return formatted + return formatted /obj/machinery/computer/card/verb/eject_id() set category = "Object" @@ -288,3 +288,7 @@ name = "CentCom Identification Computer" circuit = "/obj/item/weapon/circuitboard/card/centcom" req_access = list(access_cent_captain) + + +/obj/machinery/computer/card/centcom/is_centcom() + return 1 From 7f0f5c50cef4651b055c08ff6168475f1f5de354 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Fri, 10 Oct 2014 16:46:47 +0200 Subject: [PATCH 3/7] Fixes #6648 Adds missing list-reference. --- nano/templates/identification_computer.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nano/templates/identification_computer.tmpl b/nano/templates/identification_computer.tmpl index d7635dc9f70..e783d9e3af4 100644 --- a/nano/templates/identification_computer.tmpl +++ b/nano/templates/identification_computer.tmpl @@ -209,7 +209,7 @@
{{for data.all_centcom_access}}
- {{:helper.link(value.desc, '', {'choice' : 'access', 'access_target' : value.ref, 'allowed' : allowed}, null, value.allowed ? 'selected' : null)}} + {{:helper.link(value.desc, '', {'choice' : 'access', 'access_target' : value.ref, 'allowed' : value.allowed}, null, value.allowed ? 'selected' : null)}}
{{/for}}
From 1052c9a476022f180739c40054d831a4156c05f4 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Fri, 10 Oct 2014 15:53:11 +0100 Subject: [PATCH 4/7] Fixes runtime caused by missing check in sleeper code --- code/game/machinery/Sleeper.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 00d59978143..5baa9189111 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -311,6 +311,9 @@ M:reagents.add_reagent("inaprovaline", 5) return proc/toggle_filter() + if(!src.occupant) + filtering = 0 + return if(filtering) filtering = 0 else From fad976a445416b31b6552a7d8272cb9fbaecb8ee Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Fri, 10 Oct 2014 16:57:29 +0200 Subject: [PATCH 5/7] Fixes shuttle control NanoUI issue Should again be possible to initialize the early shuttle launch. --- nano/templates/escape_shuttle_control_console.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nano/templates/escape_shuttle_control_console.tmpl b/nano/templates/escape_shuttle_control_console.tmpl index 968860c0ff5..8fdb6b4cc5b 100644 --- a/nano/templates/escape_shuttle_control_console.tmpl +++ b/nano/templates/escape_shuttle_control_console.tmpl @@ -65,7 +65,7 @@
{{for data.auth_list}} {{if value.auth_hash}} - {{:helper.link(auth_name, 'eject', {'removeid' : value.auth_hash}, null, 'itemContentWide')}} + {{:helper.link(value.auth_name, 'eject', {'removeid' : value.auth_hash}, null, 'itemContentWide')}} {{else}} {{:helper.link("", 'eject', {'scanid' : 1}, null, 'itemContentWide')}} {{/if}} From 08b967c9e080a35c1e68df9432d1e6e69cfaa507 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Sat, 11 Oct 2014 18:40:09 +0100 Subject: [PATCH 6/7] Move NanoUI cache update to client/New() --- code/modules/client/client procs.dm | 1 + code/modules/mob/login.dm | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index e38827b1a05..cbc9fb80a5f 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -159,6 +159,7 @@ log_client_to_db() send_resources() + nanomanager.send_resources(src) if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates. winset(src, "rpane.changelog", "background-color=#eaeaea;font-style=bold") diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index bf5be72fc44..ec285c5e80c 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -55,5 +55,3 @@ var/mob/living/carbon/human/H = src if(H.species && H.species.abilities) client.verbs |= H.species.abilities - - nanomanager.send_resources(client) From db4a1f6a23a18e5a82f160b0c0e1a5b73ddf1e1e Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Sat, 11 Oct 2014 20:28:05 +0200 Subject: [PATCH 7/7] Fixes #6665 Another missing data reference. --- nano/templates/accounts_terminal.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nano/templates/accounts_terminal.tmpl b/nano/templates/accounts_terminal.tmpl index ca7fe82752e..e70561c9986 100644 --- a/nano/templates/accounts_terminal.tmpl +++ b/nano/templates/accounts_terminal.tmpl @@ -80,7 +80,7 @@ Balance:
- ${{:helper.formatNumber(money)}} + ${{:helper.formatNumber(data.money)}}