From 33ca7800e810321782191aee150958f9507d1d45 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Thu, 29 Dec 2016 23:55:07 -0800 Subject: [PATCH 1/5] Fixes a canister runtime --- code/game/machinery/atmoalter/canister.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index b6fba3cc5ad..65f6fb7b09d 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -131,7 +131,7 @@ var/datum/canister_icons/canister_icon_container = new() var/list/LL = L[i] LL = LL.Copy() //make sure we don't edit the datum list LL.Add(list("active" = decals[LL["icon"]])) //"active" used by nanoUI - possibledecals[i] = LL + possibledecals.Add(LL) /obj/machinery/portable_atmospherics/canister/proc/check_change() var/old_flag = update_flag From 74983829096f2bed13cd6bdbb3ef71109e78b2b0 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Fri, 30 Dec 2016 00:10:35 -0800 Subject: [PATCH 2/5] Fixes a runtime when attempting to assemble an incomplete pod frame --- code/modules/spacepods/parts.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/spacepods/parts.dm b/code/modules/spacepods/parts.dm index 0747f1c5a14..d1aefb535e6 100644 --- a/code/modules/spacepods/parts.dm +++ b/code/modules/spacepods/parts.dm @@ -30,7 +30,7 @@ var/turf/T var/obj/item/pod_parts/pod_frame/linked var/obj/item/pod_parts/pod_frame/pointer - var/connectedparts = list() + var/list/connectedparts = list() neededparts -= src //log_admin("Starting with [src]") linked = src @@ -44,7 +44,8 @@ connectedparts += pointer linked = pointer pointer = null - //log_admin("Parts left: [neededparts.len]") //len not working + if(connectedparts.len < 4) + return 0 for(var/i = 1; i <=4; i++) var/obj/item/pod_parts/pod_frame/F = connectedparts[i] if(F.type in neededparts) //if one of the items can be founded in neededparts @@ -122,4 +123,4 @@ name = "civilian pod armor" icon = 'icons/goonstation/pods/pod_parts.dmi' icon_state = "pod_armor_civ" - desc = "Spacepod armor. This is the civilian version. It looks rather flimsy." \ No newline at end of file + desc = "Spacepod armor. This is the civilian version. It looks rather flimsy." From 017f7c2776d7e66e5b8f71ea3451ddea433f00b0 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Fri, 30 Dec 2016 00:53:52 -0800 Subject: [PATCH 3/5] Tweaks the listdiff proc to work as prior to avoid runtimes I adjusted the noir glasses accordingly so that they would work with this --- code/__HELPERS/lists.dm | 3 +-- code/modules/clothing/glasses/glasses.dm | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index 7d7f0365dc1..f54726c4161 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -116,8 +116,7 @@ else result = first - second - if(result.len) - return result + return result /* * Returns list containing entries that are in either list but not both. diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 5ca2b346064..4fde338ba54 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -259,10 +259,10 @@ if(slot == slot_glasses) if(noir_mode) - if(color_view && user.client && (!user.client.color || difference)) + if(color_view && user.client && (!user.client.color || difference.len)) animate(user.client, color = color_view, time = 10) else - if(user.client && user.client.color && !difference) + if(user.client && user.client.color && !difference.len) animate(user.client, color = initial(user.client.color), time = 10) ..(user, slot) @@ -270,7 +270,7 @@ var/list/difference = difflist(user.client.color, color_view) if(istype(user) && user.glasses == src) - if(user.client && user.client.color && !difference) + if(user.client && user.client.color && !difference.len) animate(user.client, color = initial(user.client.color), time = 10) ..(user) From 913ddd4da1156c3cb25fd5cbe250861e15967996 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Fri, 30 Dec 2016 00:57:17 -0800 Subject: [PATCH 4/5] Bleeding without blood no longer causes runtimes --- code/game/turfs/simulated.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index a247e35a86f..cf1a1303025 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -120,10 +120,11 @@ return 0 var/obj/effect/decal/cleanable/blood/B = locate() in contents //check for existing blood splatter if(!B) - blood_splatter(src,M.get_blood(M.vessel),1) - B = locate(/obj/effect/decal/cleanable/blood) in contents - B.add_blood_list(M) - return 1 //we bloodied the floor + B = blood_splatter(src,M.get_blood(M.vessel),1) + if(B) + B.add_blood_list(M) + return 1 //we bloodied the floor + return 0 // Clean floors club // Only adds blood on the floor -- Skie /turf/simulated/add_blood_floor(mob/living/carbon/M as mob) From cc697715b93e480f45317b9023d37a47f7149333 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Fri, 30 Dec 2016 01:04:59 -0800 Subject: [PATCH 5/5] Fixes a plant splicing runtime Plants no longer runtime when splicing a potency-scaling reagent onto a non-scaling reagent (grass onto poisonberries) --- code/modules/hydroponics/seed.dm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 22fb9156004..4343bc75686 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -634,14 +634,20 @@ chems[rid] = gene_chem.Copy() continue + // Normally a length 2 list - but sometimes, it's length 1 - poisonberries, etc. + // This means the reagent does not scale with potency. + // Index 1 is the base value, index 2 is the potency per u of reagent + var/list/rgnt_list = chems[rid] + rgnt_list.len = max(gene_chem.len, rgnt_list.len) + for(var/i=1;i<=gene_chem.len;i++) if(isnull(gene_chem[i])) gene_chem[i] = 0 - if(chems[rid][i]) - chems[rid][i] = max(1,round((gene_chem[i] + chems[rid][i])/2)) + if(rgnt_list[i]) + rgnt_list[i] = max(1,round((gene_chem[i] + rgnt_list[i])/2)) else - chems[rid][i] = gene_chem[i] + rgnt_list[i] = gene_chem[i] var/list/new_gasses = gene.values["[TRAIT_EXUDE_GASSES]"] if(islist(new_gasses))