From f0bf81cb1f2e8b24c2bbd4ed6960d45e06cd75d8 Mon Sep 17 00:00:00 2001 From: Dip Date: Tue, 13 Oct 2020 06:10:12 -0300 Subject: [PATCH] Runtimes and balance --- code/__HELPERS/radiation.dm | 4 +++- code/datums/components/radioactive.dm | 7 ++++--- code/modules/mob/living/simple_animal/astral.dm | 1 + code/modules/power/singularity/collector.dm | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/code/__HELPERS/radiation.dm b/code/__HELPERS/radiation.dm index 8c34ce35..d527d0ac 100644 --- a/code/__HELPERS/radiation.dm +++ b/code/__HELPERS/radiation.dm @@ -13,7 +13,8 @@ var/list/processing_list = list(location) . = list() var/i = 0 - while(i < length(processing_list)) + var/lim = 1 + while(i < lim) var/atom/thing = processing_list[++i] if(ignored_things[thing.type]) continue @@ -21,6 +22,7 @@ if((thing.rad_flags & RAD_PROTECT_CONTENTS) || (SEND_SIGNAL(thing, COMSIG_ATOM_RAD_PROBE) & COMPONENT_BLOCK_RADIATION)) continue processing_list += thing.contents + lim = processing_list.len /proc/radiation_pulse(atom/source, intensity, range_modifier, log=FALSE, can_contaminate=TRUE) if(!SSradiation.can_fire) diff --git a/code/datums/components/radioactive.dm b/code/datums/components/radioactive.dm index b823c705..64bc3765 100644 --- a/code/datums/components/radioactive.dm +++ b/code/datums/components/radioactive.dm @@ -34,12 +34,13 @@ var/atom/movable/master = parent master.add_filter("rad_glow", 2, list("type" = "outline", "color" = "#39ff1430", "size" = 2)) addtimer(CALLBACK(src, .proc/glow_loop, master), rand(1,19))//Things should look uneven + START_PROCESSING(SSradiation, src) /datum/component/radioactive/Destroy() + STOP_PROCESSING(SSradiation, src) var/atom/movable/master = parent master.remove_filter("rad_glow") - STOP_PROCESSING(SSradiation, src) return ..() /datum/component/radioactive/process() @@ -60,7 +61,7 @@ animate(filter, alpha = 110, time = 15, loop = -1) animate(alpha = 40, time = 25) -/datum/component/radioactive/InheritComponent(datum/component/C, i_am_original, _strength, _source, _half_life, _can_contaminate) +/datum/component/radioactive/InheritComponent(datum/component/C, i_am_original, list/arguments) if(!i_am_original) return if(!hl3_release_date) // Permanently radioactive things don't get to grow stronger @@ -69,7 +70,7 @@ var/datum/component/radioactive/other = C strength = max(strength, other.strength) else - strength = max(strength, _strength) + strength = max(strength, arguments[1]) /datum/component/radioactive/proc/rad_examine(datum/source, mob/user, list/examine_list) var/atom/master = parent diff --git a/code/modules/mob/living/simple_animal/astral.dm b/code/modules/mob/living/simple_animal/astral.dm index 9bac53ef..8c261157 100644 --- a/code/modules/mob/living/simple_animal/astral.dm +++ b/code/modules/mob/living/simple_animal/astral.dm @@ -20,6 +20,7 @@ alpha = 50 attacktext = "touches the mind of" speak_emote = list("echos") + rad_flags = RAD_NO_CONTAMINATE movement_type = FLYING var/pseudo_death = FALSE var/posses_safe = FALSE diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 021b5fea..018a16e4 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -1,5 +1,5 @@ // stored_power += (pulse_strength-RAD_COLLECTOR_EFFICIENCY)*RAD_COLLECTOR_COEFFICIENT -#define RAD_COLLECTOR_EFFICIENCY 80 // radiation needs to be over this amount to get power +#define RAD_COLLECTOR_EFFICIENCY 60 // radiation needs to be over this amount to get power #define RAD_COLLECTOR_COEFFICIENT 100 #define RAD_COLLECTOR_STORED_OUT 0.04 // (this*100)% of stored power outputted per tick. Doesn't actualy change output total, lower numbers just means collectors output for longer in absence of a source #define RAD_COLLECTOR_MINING_CONVERSION_RATE 0.00001 //This is gonna need a lot of tweaking to get right. This is the number used to calculate the conversion of watts to research points per process()