From 44bbbc0ce877b0942da244fd9de3c9ae0625b964 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Tue, 30 Jul 2024 00:31:20 +0200 Subject: [PATCH] do not touch the main ref! --- code/modules/xenoarcheaology/effect_master.dm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/code/modules/xenoarcheaology/effect_master.dm b/code/modules/xenoarcheaology/effect_master.dm index 97696b637da..76b629a6eb8 100644 --- a/code/modules/xenoarcheaology/effect_master.dm +++ b/code/modules/xenoarcheaology/effect_master.dm @@ -11,11 +11,15 @@ AddComponent(/datum/component/artifact_master) if(istype(src, /obj/item)) var/obj/item/I = src - LAZYINITLIST(I.origin_tech) - if(prob(50)) - I.origin_tech[TECH_PRECURSOR] += 1 + var/list/new_tech + if(I.origin_tech) + new_tech = origin_tech.Copy() else - I.origin_tech[TECH_ARCANE] += 1 + new_tech = list() + if(prob(50)) + new_tech[TECH_PRECURSOR] += 1 + else + new_tech[TECH_ARCANE] += 1 var/rand_tech = pick(\ TECH_MATERIAL,\ TECH_ENGINEERING,\ @@ -28,7 +32,8 @@ TECH_DATA,\ TECH_ILLEGAL\ ) - LAZYSET(I.origin_tech, rand_tech, rand(4,7)) + LAZYSET(new_tech, rand_tech, rand(4,7)) + I.origin_tech = new_tech /datum/component/artifact_master var/atom/holder