a bunch of stuff

5° min temp adjustment for active cooling
150% max total cooling efficiency as opposed to 100%
passive heating cools instead at >100% efficiency (to -30°C min)
EMPs jam cooling system readouts.
Nanogel is now printable, for a decent price though it needs a bit of diamond.
This commit is contained in:
DeltaFire
2022-01-02 19:44:35 +01:00
parent fe7499da90
commit 074fe5b417
10 changed files with 54 additions and 18 deletions
+5 -2
View File
@@ -69,13 +69,16 @@
#define TEMPERATURE_DAMAGE_COEFFICIENT 1.5 //This is used in handle_temperature_damage() for humans, and in reagents that affect body temperature. Temperature damage is multiplied by this amount.
#define SYNTH_PASSIVE_HEAT_GAIN 10 //Degrees C per handle_environment() Synths passively heat up. Mitigated by cooling efficiency. Can lead to overheating if not managed.
#define SYNTH_MAX_PASSIVE_GAIN_TEMP 250 //Degrees C above 0 that a synth can be heated up to by their internal heat gain, provided their cooling is insufficient to mitigate it.
#define SYNTH_MAX_PASSIVE_GAIN_TEMP 250 //Degrees C that a synth can be heated up to by their internal heat gain, provided their cooling is insufficient to mitigate it.
#define SYNTH_MIN_PASSIVE_COOLING_TEMP -30 //Degrees C a synth can cool towards at very high cooling efficiency.
#define SYNTH_HEAT_EFFICIENCY_COEFF 0.005 //How quick the difference between the Synth and the environment starts to matter. The smaller the higher the difference has to be for the same change.
#define SYNTH_SINGLE_INFLUENCE_COOLING_EFFECT_CAP 3 //How big can the multiplier for heat / pressure cooling be in an optimal environment
#define SYNTH_TOTAL_ENVIRONMENT_EFFECT_CAP 2 //How big of an multiplier can the environment give in an optimal scenario (maximum efficiency in the end is 1, this just counters low coolant levels)
#define SYNTH_TOTAL_ENVIRONMENT_EFFECT_CAP 2 //How big of an multiplier can the environment give in an optimal scenario (maximum efficiency in the end is at a lower cap, this mostly counters low coolant levels)
#define SYNTH_MAX_COOLING_EFFICIENCY 1.5 //The maximum possible cooling efficiency one can achieve at optimal conditions.
#define SYNTH_ACTIVE_COOLING_TEMP_BOUNDARY 10 //The minimum distance from room temperature a Synth needs to have for active cooling to actively cool.
#define SYNTH_ACTIVE_COOLING_LOW_PRESSURE_THRESHOLD 0.05 //At how much percentage of default pressure (or lower) active cooling gets a massive cost penalty.
#define SYNTH_ACTIVE_COOLING_LOW_PRESSURE_PENALTY 2.5 //By how much is active cooling cost multiplied if in a very-low-pressure environment?
#define SYNTH_ACTIVE_COOLING_MIN_ADJUSTMENT 5 //What is the minimum amount of temp you move towards the target point, even if it would be less with default calculations?
#define BODYTEMP_NORMAL 310.15 //The natural temperature for a body
#define BODYTEMP_AUTORECOVERY_DIVISOR 11 //This is the divisor which handles how much of the temperature difference between the current body temperature and 310.15K (optimal temperature) humans auto-regenerate each tick. The higher the number, the slower the recovery. This is applied each tick, so long as the mob is alive.
+28 -8
View File
@@ -89,7 +89,7 @@
/atom/movable/screen/synth/proc/clear()
invisibility = INVISIBILITY_ABSTRACT
/atom/movable/screen/synth/proc/update_counter(value, mob/living/carbon/human/owner)
/atom/movable/screen/synth/proc/update_counter(mob/living/carbon/human/owner)
invisibility = 0
/atom/movable/screen/synth/coolant_counter
@@ -97,21 +97,30 @@
name = "Coolant System Readout"
icon_state = "coolant-3"
screen_loc = ui_coolant_display
var/jammed = 0
/atom/movable/screen/synth/coolant_counter/update_counter(value, mob/living/carbon/owner)
/atom/movable/screen/synth/coolant_counter/update_counter(mob/living/carbon/owner)
..()
var/valuecolor = "#FF6666"
if(owner.stat == DEAD)
maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='[valuecolor]'>ERR-0F</font></div>"
icon_state = "coolant-3"
return
if(owner.blood_volume > BLOOD_VOLUME_SAFE * owner.blood_ratio)
var/coolant_efficiency
var/coolant
if(!jammed)
coolant_efficiency = owner.get_cooling_efficiency()
coolant = owner.blood_volume
else
coolant_efficiency = rand(1, 15) / 10
coolant = rand(1, 600)
jammed--
if(coolant > BLOOD_VOLUME_SAFE * owner.blood_ratio)
valuecolor = "#FFDDDD"
else if(owner.blood_volume > BLOOD_VOLUME_BAD * owner.blood_ratio)
else if(coolant > BLOOD_VOLUME_BAD * owner.blood_ratio)
valuecolor = "#FFAAAA"
maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='[valuecolor]'>[round(value,1)]</font></div>"
maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='[valuecolor]'>[round(coolant,1)]</font></div>"
var/coolant_efficiency = owner.get_cooling_efficiency()
switch(coolant_efficiency)
if(-INFINITY to 0.4)
icon_state = "coolant-1"
@@ -129,9 +138,20 @@
var/mob/living/carbon/human/owner = hud.mymob
if(owner.stat == DEAD)
return
var/coolant
var/total_efficiency
var/environ_efficiency
if(!jammed)
coolant = owner.blood_volume
total_efficiency = owner.get_cooling_efficiency()
environ_efficiency = owner.get_environment_cooling_efficiency()
else
coolant = rand(1, 600)
total_efficiency = rand(1, 15) / 10
environ_efficiency = rand(1, 20) / 10
. += "<span class='notice'>Performing internal cooling system diagnostics:</span>"
. += "<span class='notice'>Coolant level: [owner.blood_volume] units, [round((owner.blood_volume / (BLOOD_VOLUME_NORMAL * owner.blood_ratio)) * 100, 0.1)] percent</span>"
. += "<span class='notice'>Current Cooling Efficiency: [round(owner.get_cooling_efficiency() * 100, 0.1)] percent, environment viability: [round(owner.get_environment_cooling_efficiency() * 100, 0.1)] percent.</span>"
. += "<span class='notice'>Coolant level: [coolant] units, [round((coolant / (BLOOD_VOLUME_NORMAL * owner.blood_ratio)) * 100, 0.1)] percent</span>"
. += "<span class='notice'>Current Cooling Efficiency: [round(total_efficiency * 100, 0.1)] percent, environment viability: [round(environ_efficiency * 100, 0.1)] percent.</span>"
/datum/hud/human/New(mob/living/carbon/human/owner)
..()
@@ -488,6 +488,9 @@
icon_state = "nanogel"
var/being_applied = FALSE //No doafter stacking.
/obj/item/stack/medical/nanogel/one
amount = 1
/obj/item/stack/medical/nanogel/try_heal(mob/living/M, mob/user, silent = FALSE)
if(being_applied)
to_chat(user, "<span class='warning'>You are already applying [src]!</span>")
@@ -416,6 +416,7 @@
severity *= 0.5
var/do_not_stun = FALSE
if(HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
hud_used?.coolant_display.jammed = min(round(hud_used.coolant_display.jammed + (severity / 10),1), 20) //Messes up the cooling system readout.
severity *= 0.5 //Robotpeople take less limb damage, but instead suffer system corruption (see carbon emp_act)
do_not_stun = TRUE
for(var/obj/item/bodypart/L in src.bodyparts)
+1 -1
View File
@@ -31,7 +31,7 @@
if(!(. = ..()))
return
if(HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM) && hud_used)
hud_used.coolant_display.update_counter(blood_volume, src)
hud_used.coolant_display.update_counter(src)
//Update our name based on whether our face is obscured/disfigured
name = get_visible_name()
@@ -2190,8 +2190,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
natural = H.natural_bodytemperature_stabilization()
cooling_efficiency = H.get_cooling_efficiency()
if(HAS_TRAIT(H, TRAIT_ROBOTIC_ORGANISM)) //Synths by default slowly heat up and need to lose said heat to the environment or active cooling.
H.adjust_bodytemperature(SYNTH_PASSIVE_HEAT_GAIN * (1 - cooling_efficiency), max_temp = (T0C + SYNTH_MAX_PASSIVE_GAIN_TEMP))
if(HAS_TRAIT(H, TRAIT_ROBOTIC_ORGANISM)) //Synths by default slowly heat up and need to lose said heat to the environment or active cooling. If you have very high cooling efficiency, you instead passively cool.
H.adjust_bodytemperature(SYNTH_PASSIVE_HEAT_GAIN * (1 - cooling_efficiency), (T0C + SYNTH_MIN_PASSIVE_COOLING_TEMP), (T0C + SYNTH_MAX_PASSIVE_GAIN_TEMP))
var/thermal_protection = 1
if(loc_temp < H.bodytemperature) //Place is colder than we are
thermal_protection -= H.get_thermal_protection(loc_temp, TRUE) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
+1 -1
View File
@@ -683,7 +683,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
var/coolant_efficiency = min(blood_effective_volume / BLOOD_VOLUME_SAFE, 1) //Low coolant is only a negative, adding more than needed will not help you.
var/environment_efficiency = get_environment_cooling_efficiency()
return min(coolant_efficiency * environment_efficiency, 1)
return min(coolant_efficiency * environment_efficiency, SYNTH_MAX_COOLING_EFFICIENCY)
/mob/living/carbon/proc/get_environment_cooling_efficiency()
@@ -213,7 +213,7 @@
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
/datum/design/hypospray/mkii
/datum/design/hypospray_mkii
name = "Hypospray Mk. II"
id = "hypospray_mkii"
build_type = PROTOLATHE
@@ -222,6 +222,15 @@
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
/datum/design/nanogel
name = "Nanogel paste"
id = "nanogel"
build_type = PROTOLATHE | MECHFAB
materials = list(/datum/material/iron = 800, /datum/material/titanium = 500, /datum/material/gold = 100, /datum/material/diamond = 20)
build_path = /obj/item/stack/medical/nanogel/one
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
/datum/design/blood_bag
name = "Empty Blood Bag"
desc = "A small sterilized plastic bag for blood."
@@ -28,7 +28,7 @@
display_name = "Advanced Robotics Research"
description = "It can even do the dishes!"
prereq_ids = list("robotics")
design_ids = list("borg_upgrade_diamonddrill", "borg_upgrade_advancedmop", "borg_upgrade_advcutter")
design_ids = list("borg_upgrade_diamonddrill", "borg_upgrade_advancedmop", "borg_upgrade_advcutter", "nanogel")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 3000)
/datum/techweb_node/neural_programming
+2 -2
View File
@@ -484,9 +484,9 @@
var/actual_drain = cooling_coolant_drain * max(1 - cooling_efficiency, 0.2) //Being in a suitable environment reduces drain by up to 80%
var/temp_diff = owner.bodytemperature - T20C
if(temp_diff > 0)
owner.adjust_bodytemperature(max(((T0C - owner.bodytemperature) * max(cooling_efficiency, 0.5) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX))
owner.adjust_bodytemperature(clamp(((T0C - owner.bodytemperature) * max(cooling_efficiency, 0.5) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX, -SYNTH_ACTIVE_COOLING_MIN_ADJUSTMENT))
else
owner.adjust_bodytemperature(min(((T20C - owner.bodytemperature) * max(cooling_efficiency, 0.5) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX))
owner.adjust_bodytemperature(clamp(((T20C - owner.bodytemperature) * max(cooling_efficiency, 0.5) / BODYTEMP_HEAT_DIVISOR), SYNTH_ACTIVE_COOLING_MIN_ADJUSTMENT, BODYTEMP_HEATING_MAX))
var/datum/gas_mixture/air = owner.loc.return_air()
if(!air || air.return_pressure() < ONE_ATMOSPHERE * SYNTH_ACTIVE_COOLING_LOW_PRESSURE_THRESHOLD)
actual_drain *= SYNTH_ACTIVE_COOLING_LOW_PRESSURE_PENALTY //Our cooling system can handle hot places okayish, but starts to cry at low pressures (reads: Effectively vents hot coolant thats been warmed up via internal heat-exchange as emergency measure and with very low efficiency)