From f62f24e1aca78cb82f46ef5adcfc300dae4cd373 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Wed, 16 Dec 2015 12:54:34 +0100 Subject: [PATCH 01/10] Removes Stat() sleep. Fixes a Stat() runtime that occasionally occur if the client was logged out when the sleep() was done sleeping. Fixes delays when using alt+Turf click. Makes the alt+Turf click panel only update when viewed instead. Seems like the better performance fix option in general. Makes the alt+Turf click panel always use the "Turf" name, consistency. --- code/_onclick/click.dm | 2 +- code/modules/mob/mob.dm | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 56af5949f7..3d7622a713 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -291,7 +291,7 @@ user.listed_turf = null else user.listed_turf = T - user.client.statpanel = T.name + user.client.statpanel = "Turf" return /mob/proc/TurfAdjacent(var/turf/T) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index a81c943503..b42b2c9f72 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -658,17 +658,17 @@ if(!TurfAdjacent(listed_turf)) listed_turf = null else - statpanel(listed_turf.name, null, listed_turf) - for(var/atom/A in listed_turf) - if(!A.mouse_opacity) - continue - if(A.invisibility > see_invisible) - continue - if(is_type_in_list(A, shouldnt_see)) - continue - statpanel(listed_turf.name, null, A) + if(statpanel("Turf")) + stat("\icon[listed_turf]", listed_turf.name) + for(var/atom/A in listed_turf) + if(!A.mouse_opacity) + continue + if(A.invisibility > see_invisible) + continue + if(is_type_in_list(A, shouldnt_see)) + continue + stat(A) - sleep(4) //Prevent updating the stat panel for the next .4 seconds, prevents clientside latency from updates // facing verbs /mob/proc/canface() From a515f0469ab5d40dc9a159ae7c6a78db2b5275c8 Mon Sep 17 00:00:00 2001 From: Spamcat Date: Wed, 16 Dec 2015 17:59:05 +0300 Subject: [PATCH 02/10] Wrenched opwn welding tanks now explode when exposed to fire. #11537 --- code/modules/reagents/reagent_dispenser.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 7fc8ebf8ab..f259889aee 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -171,7 +171,9 @@ qdel(src) /obj/structure/reagent_dispensers/fueltank/fire_act(datum/gas_mixture/air, temperature, volume) - if(temperature > T0C+500) + if (modded) + explode() + else if (temperature > T0C+500) explode() return ..() From f2ac9a023bd38ce57db12fb15b7060314cd106b0 Mon Sep 17 00:00:00 2001 From: Spamcat Date: Wed, 16 Dec 2015 19:36:14 +0300 Subject: [PATCH 03/10] pAIs no longer see custom emotes twice. fuck i spent way too much time on a single line fix --- code/game/objects/items/devices/paicard.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index eed6cdb12e..7edf72e9a5 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -320,7 +320,7 @@ qdel(src) /obj/item/device/paicard/see_emote(mob/living/M, text) - if(pai && pai.client) + if(pai && pai.client && !pai.canmove) var/rendered = "[text]" pai.show_message(rendered, 2) ..() \ No newline at end of file From 485a2fdd45940a1c48e4854294401ac050e4fed0 Mon Sep 17 00:00:00 2001 From: Spamcat Date: Wed, 16 Dec 2015 20:07:35 +0300 Subject: [PATCH 04/10] Made kitchen utensils less dangerous. #11370 --- code/game/objects/items/weapons/material/kitchen.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/material/kitchen.dm b/code/game/objects/items/weapons/material/kitchen.dm index 55c5151934..088069a26f 100644 --- a/code/game/objects/items/weapons/material/kitchen.dm +++ b/code/game/objects/items/weapons/material/kitchen.dm @@ -44,7 +44,8 @@ overlays.Cut() return else - ..() + user << "\red You don't have anything on \the [src]." //if we have help intent and no food scooped up DON'T STAB OURSELVES WITH THE FORK GODDAMNIT + return /obj/item/weapon/material/kitchen/utensil/fork name = "fork" From 8df6ee3318af7f2188538312fa6dd23f86cf9d3e Mon Sep 17 00:00:00 2001 From: Spamcat Date: Wed, 16 Dec 2015 20:21:10 +0300 Subject: [PATCH 05/10] \red >> styles --- code/game/objects/items/weapons/material/kitchen.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/weapons/material/kitchen.dm b/code/game/objects/items/weapons/material/kitchen.dm index 088069a26f..d15eae3431 100644 --- a/code/game/objects/items/weapons/material/kitchen.dm +++ b/code/game/objects/items/weapons/material/kitchen.dm @@ -44,7 +44,7 @@ overlays.Cut() return else - user << "\red You don't have anything on \the [src]." //if we have help intent and no food scooped up DON'T STAB OURSELVES WITH THE FORK GODDAMNIT + user << "You don't have anything on \the [src]." //if we have help intent and no food scooped up DON'T STAB OURSELVES WITH THE FORK GODDAMNIT return /obj/item/weapon/material/kitchen/utensil/fork @@ -78,14 +78,14 @@ /obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob) if ((CLUMSY in user.mutations) && prob(50)) - user << "\red You accidentally cut yourself with the [src]." + user << "You accidentally cut yourself with the [src]." user.take_organ_damage(20) return return ..() /obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob) if ((CLUMSY in user.mutations) && prob(50)) - user << "\red You somehow managed to cut yourself with the [src]." + user << "You somehow managed to cut yourself with the [src]." user.take_organ_damage(20) return return ..() @@ -108,7 +108,7 @@ /obj/item/weapon/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob) if ((CLUMSY in user.mutations) && prob(50)) - user << "\red The [src] slips out of your hand and hits your head." + user << "The [src] slips out of your hand and hits your head." user.take_organ_damage(10) user.Paralyse(2) return From 905070bc96a14a98dba03d938ec08ca34d14876d Mon Sep 17 00:00:00 2001 From: Spamcat Date: Wed, 16 Dec 2015 20:30:26 +0300 Subject: [PATCH 06/10] \the --- code/game/objects/items/weapons/material/kitchen.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/weapons/material/kitchen.dm b/code/game/objects/items/weapons/material/kitchen.dm index d15eae3431..9c160f028d 100644 --- a/code/game/objects/items/weapons/material/kitchen.dm +++ b/code/game/objects/items/weapons/material/kitchen.dm @@ -78,14 +78,14 @@ /obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob) if ((CLUMSY in user.mutations) && prob(50)) - user << "You accidentally cut yourself with the [src]." + user << "You accidentally cut yourself with \the [src]." user.take_organ_damage(20) return return ..() /obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob) if ((CLUMSY in user.mutations) && prob(50)) - user << "You somehow managed to cut yourself with the [src]." + user << "You somehow managed to cut yourself with \the [src]." user.take_organ_damage(20) return return ..() @@ -108,7 +108,7 @@ /obj/item/weapon/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob) if ((CLUMSY in user.mutations) && prob(50)) - user << "The [src] slips out of your hand and hits your head." + user << "\The [src] slips out of your hand and hits your head." user.take_organ_damage(10) user.Paralyse(2) return From dc2ad43dc5c4ae5d67e9fd03a207f153f8587a1d Mon Sep 17 00:00:00 2001 From: Hubblenaut Date: Wed, 16 Dec 2015 02:28:19 +0100 Subject: [PATCH 07/10] No verbose cantouch check when not climbable --- code/game/objects/buckling.dm | 3 ++- code/game/objects/structures.dm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 93c2fd57bb..02d85234ed 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -56,7 +56,8 @@ user << "You can't buckle anyone in before the game starts." if(!user.Adjacent(M) || user.restrained() || user.lying || user.stat || istype(user, /mob/living/silicon/pai)) return - + if(M == buckled_mob) + return if(istype(M, /mob/living/carbon/slime)) user << "The [M] is too squishy to buckle in." return diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 8039814f4f..f344758b49 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -79,7 +79,7 @@ return ..() /obj/structure/proc/can_climb(var/mob/living/user, post_climb_check=0) - if (!can_touch(user) || !climbable || (!post_climb_check && (user in climbers))) + if (!climbable || !can_touch(user) || (!post_climb_check && (user in climbers))) return 0 if (!user.Adjacent(src)) From 07e81c059c81021fcfa8ed0a4af7b7a7f2a4e7b2 Mon Sep 17 00:00:00 2001 From: Loganbacca Date: Fri, 18 Dec 2015 20:12:46 +1300 Subject: [PATCH 08/10] Fixed bullets traveling diagonally through windows - Fixes #11465 --- code/game/objects/structures/window.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index fc9f5b6a19..0ac02fbeb7 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -140,7 +140,7 @@ return 1 if(is_full_window()) return 0 //full tile window, you can't move into it! - if(get_dir(loc, target) == dir) + if(get_dir(loc, target) & dir) return !density else return 1 From 378f62b81ec6f63b12ca856e9258949e20213677 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Sat, 19 Dec 2015 11:44:37 +0100 Subject: [PATCH 09/10] AI qdel() improvements. AI destruction now cleans up more of its held objects and variables. Fixes some issues with the AI powersupply qdel(). Fixes #11710. --- code/modules/mob/living/silicon/ai/ai.dm | 34 +++++++++++++++++------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index ba42e42c75..0c9435481a 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -158,7 +158,6 @@ var/list/ai_verbs_default = list( spawn(5) new /obj/machinery/ai_powersupply(src) - hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudblank") hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudblank") hud_list[LIFE_HUD] = image('icons/mob/hud.dmi', src, "hudblank") @@ -199,8 +198,23 @@ var/list/ai_verbs_default = list( /mob/living/silicon/ai/Destroy() ai_list -= src + qdel(eyeobj) - ..() + eyeobj = null + + qdel(psupply) + psupply = null + + qdel(aiMulti) + aiMulti = null + + qdel(aiRadio) + aiRadio = null + + qdel(aiCamera) + aiCamera = null + + return ..() /mob/living/silicon/ai/pointed(atom/A as mob|obj|turf in view()) set popup_menu = 0 @@ -234,20 +248,22 @@ var/list/ai_verbs_default = list( /obj/machinery/ai_powersupply/New(var/mob/living/silicon/ai/ai=null) powered_ai = ai powered_ai.psupply = src - if(isnull(powered_ai)) - qdel(src) - - loc = powered_ai.loc - use_power(1) // Just incase we need to wake up the power system. + forceMove(powered_ai.loc) ..() + use_power(1) // Just incase we need to wake up the power system. + +/obj/machinery/ai_powersupply/Destroy() + . = ..() + powered_ai = null /obj/machinery/ai_powersupply/process() - if(!powered_ai || powered_ai.stat & DEAD) - qdel() + if(!powered_ai || powered_ai.stat == DEAD) + qdel(src) return if(powered_ai.psupply != src) // For some reason, the AI has different powersupply object. Delete this one, it's no longer needed. qdel(src) + return if(powered_ai.APU_power) use_power = 0 return From ce3587d867e16c8d7561c3a4948b9ddd57888c39 Mon Sep 17 00:00:00 2001 From: ccomp5950 Date: Sat, 19 Dec 2015 21:33:02 -0500 Subject: [PATCH 10/10] Hallucinations no longer burn on the SuperMatter --- code/modules/supermatter/supermatter.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index fb62f49325..1ee9f99c45 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -305,6 +305,8 @@ /obj/machinery/power/supermatter/Bumped(atom/AM as mob|obj) + if(istype(AM, /obj/effect)) + return if(istype(AM, /mob/living)) AM.visible_message("\The [AM] slams into \the [src] inducing a resonance... \his body starts to glow and catch flame before flashing into ash.",\ "You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"",\