diff --git a/code/__defines/vore_prefs.dm b/code/__defines/vore_prefs.dm
index 6ee1f10cfb..c507d076b6 100644
--- a/code/__defines/vore_prefs.dm
+++ b/code/__defines/vore_prefs.dm
@@ -5,6 +5,7 @@
target.absorbable = source.absorbable; \
target.allowmobvore = source.allowmobvore; \
target.permit_healbelly = source.permit_healbelly; \
+ target.allowtemp = source.allowtemp; \
\
target.vore_taste = source.vore_taste; \
target.vore_smell = source.vore_smell; \
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index a8b965589e..5b47169324 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -746,66 +746,67 @@
// Hot air hurts :(
- if((breath.temperature <= species.cold_discomfort_level || breath.temperature >= species.heat_discomfort_level) && !(COLD_RESISTANCE in mutations))
+ if(!isbelly(loc)) //None of this happens anyway whilst inside of a belly, belly temperatures are all handled as body temperature
+ if((breath.temperature <= species.cold_discomfort_level || breath.temperature >= species.heat_discomfort_level) && !(COLD_RESISTANCE in mutations))
- if(breath.temperature <= species.breath_cold_level_1)
- if(prob(20))
- to_chat(src, span_danger("You feel your face freezing and icicles forming in your lungs!"))
- else if(breath.temperature >= species.breath_heat_level_1)
- if(prob(20))
- to_chat(src, span_danger("You feel your face burning and a searing heat in your lungs!"))
-
- if(breath.temperature >= species.heat_discomfort_level)
-
- if(breath.temperature >= species.breath_heat_level_3)
- apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD)
- throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MAX)
- else if(breath.temperature >= species.breath_heat_level_2)
- apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD)
- throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MODERATE)
+ if(breath.temperature <= species.breath_cold_level_1)
+ if(prob(20))
+ to_chat(src, span_danger("You feel your face freezing and icicles forming in your lungs!"))
else if(breath.temperature >= species.breath_heat_level_1)
- apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD)
- throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_LOW)
- else if(species.get_environment_discomfort(src, ENVIRONMENT_COMFORT_MARKER_HOT))
- throw_alert("temp", /obj/screen/alert/warm, HOT_ALERT_SEVERITY_LOW)
+ if(prob(20))
+ to_chat(src, span_danger("You feel your face burning and a searing heat in your lungs!"))
+
+ if(breath.temperature >= species.heat_discomfort_level)
+
+ if(breath.temperature >= species.breath_heat_level_3)
+ apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD)
+ throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MAX)
+ else if(breath.temperature >= species.breath_heat_level_2)
+ apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD)
+ throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MODERATE)
+ else if(breath.temperature >= species.breath_heat_level_1)
+ apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD)
+ throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_LOW)
+ else if(species.get_environment_discomfort(src, ENVIRONMENT_COMFORT_MARKER_HOT))
+ throw_alert("temp", /obj/screen/alert/warm, HOT_ALERT_SEVERITY_LOW)
+ else
+ clear_alert("temp")
+
+ else if(breath.temperature <= species.cold_discomfort_level)
+
+ if(breath.temperature <= species.breath_cold_level_3)
+ apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD)
+ throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MAX)
+ else if(breath.temperature <= species.breath_cold_level_2)
+ apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD)
+ throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MODERATE)
+ else if(breath.temperature <= species.breath_cold_level_1)
+ apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD)
+ throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_LOW)
+ else if(species.get_environment_discomfort(src, ENVIRONMENT_COMFORT_MARKER_COLD))
+ throw_alert("temp", /obj/screen/alert/chilly, COLD_ALERT_SEVERITY_LOW)
+ else
+ clear_alert("temp")
+
+ //breathing in hot/cold air also heats/cools you a bit
+ var/temp_adj = breath.temperature - bodytemperature
+ if (temp_adj < 0)
+ temp_adj /= (BODYTEMP_COLD_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed
else
- clear_alert("temp")
+ temp_adj /= (BODYTEMP_HEAT_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed
- else if(breath.temperature <= species.cold_discomfort_level)
+ var/relative_density = breath.total_moles / (MOLES_CELLSTANDARD * BREATH_PERCENTAGE)
+ temp_adj *= relative_density
- if(breath.temperature <= species.breath_cold_level_3)
- apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD)
- throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MAX)
- else if(breath.temperature <= species.breath_cold_level_2)
- apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD)
- throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MODERATE)
- else if(breath.temperature <= species.breath_cold_level_1)
- apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD)
- throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_LOW)
- else if(species.get_environment_discomfort(src, ENVIRONMENT_COMFORT_MARKER_COLD))
- throw_alert("temp", /obj/screen/alert/chilly, COLD_ALERT_SEVERITY_LOW)
- else
- clear_alert("temp")
+ if(temp_adj > BODYTEMP_HEATING_MAX)
+ temp_adj = BODYTEMP_HEATING_MAX
+ if(temp_adj < BODYTEMP_COOLING_MAX)
+ temp_adj = BODYTEMP_COOLING_MAX
+
+ bodytemperature += temp_adj
- //breathing in hot/cold air also heats/cools you a bit
- var/temp_adj = breath.temperature - bodytemperature
- if (temp_adj < 0)
- temp_adj /= (BODYTEMP_COLD_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed
else
- temp_adj /= (BODYTEMP_HEAT_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed
-
- var/relative_density = breath.total_moles / (MOLES_CELLSTANDARD * BREATH_PERCENTAGE)
- temp_adj *= relative_density
-
- if(temp_adj > BODYTEMP_HEATING_MAX)
- temp_adj = BODYTEMP_HEATING_MAX
- if(temp_adj < BODYTEMP_COOLING_MAX)
- temp_adj = BODYTEMP_COOLING_MAX
-
- bodytemperature += temp_adj
-
- else
- clear_alert("temp")
+ clear_alert("temp")
breath.update_values()
return 1
@@ -867,10 +868,13 @@
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
var/obj/machinery/atmospherics/unary/cryo_cell/cc = loc
loc_temp = cc.air_contents.temperature
+ else if(isbelly(loc))
+ var/obj/belly/b = loc
+ loc_temp = b.bellytemperature
else
loc_temp = environment.temperature
- if(adjusted_pressure < species.warning_high_pressure && adjusted_pressure > species.warning_low_pressure && abs(loc_temp - bodytemperature) < 20 && bodytemperature < species.heat_level_1 && bodytemperature > species.cold_level_1)
+ if(adjusted_pressure < species.warning_high_pressure && adjusted_pressure > species.warning_low_pressure && abs(loc_temp - bodytemperature) < 20 && bodytemperature < species.heat_level_1 && bodytemperature > species.cold_level_1 && (!isbelly(loc) || !allowtemp))
clear_alert("pressure")
return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp
@@ -889,8 +893,46 @@
var/relative_density = environment.total_moles / MOLES_CELLSTANDARD
bodytemperature += between(BODYTEMP_COOLING_MAX, temp_adj*relative_density, BODYTEMP_HEATING_MAX)
+ if(isbelly(loc) && allowtemp)
+ var/obj/belly/b = loc
+ if(b.bellytemperature >= species.heat_discomfort_level) //A bit more easily triggered than normal, intentionally
+ var/burn_dam = 0
+ if(b.bellytemperature >= species.heat_level_1)
+ if(b.bellytemperature >= species.heat_level_2)
+ if(b.bellytemperature >= species.heat_level_3)
+ burn_dam = HEAT_DAMAGE_LEVEL_3
+ throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MAX)
+ else
+ burn_dam = HEAT_DAMAGE_LEVEL_2
+ throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MODERATE)
+ else
+ burn_dam = HEAT_DAMAGE_LEVEL_1
+ throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_LOW)
+ else
+ throw_alert("temp", /obj/screen/alert/warm, HOT_ALERT_SEVERITY_LOW)
+ if(digestable && b.temperature_damage)
+ take_overall_damage(burn=burn_dam, used_weapon = "High Body Temperature")
+ else if(b.bellytemperature <= species.cold_discomfort_level)
+ var/cold_dam = 0
+ if(b.bellytemperature <= species.cold_level_1)
+ if(b.bellytemperature <= species.cold_level_2)
+ if(b.bellytemperature <= species.cold_level_3)
+ cold_dam = COLD_DAMAGE_LEVEL_3
+ throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MAX)
+ else
+ cold_dam = COLD_DAMAGE_LEVEL_2
+ throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MODERATE)
+ else
+ cold_dam = COLD_DAMAGE_LEVEL_1
+ throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_LOW)
+ else
+ throw_alert("temp", /obj/screen/alert/chilly, COLD_ALERT_SEVERITY_LOW)
+ if(digestable && b.temperature_damage)
+ take_overall_damage(burn=cold_dam, used_weapon = "Low Body Temperature")
+ else clear_alert("temp")
+
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
- if(bodytemperature >= species.heat_level_1)
+ else if(bodytemperature >= species.heat_discomfort_level)
//Body temperature is too hot.
if(SEND_SIGNAL(src, COMSIG_CHECK_FOR_GODMODE) & COMSIG_GODMODE_CANCEL)
return 1 // Cancelled by a component
@@ -912,7 +954,7 @@
take_overall_damage(burn=burn_dam, used_weapon = "High Body Temperature")
- else if(bodytemperature <= species.cold_level_1)
+ else if(bodytemperature <= species.cold_discomfort_level)
//Body temperature is too cold.
if(SEND_SIGNAL(src, COMSIG_CHECK_FOR_GODMODE) & COMSIG_GODMODE_CANCEL)
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm b/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm
index 96ce77dc47..c829b4fefd 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm
@@ -43,6 +43,7 @@
selective_preference = client.prefs_vr.selective_preference
eating_privacy_global = client.prefs_vr.eating_privacy_global
allow_mimicry = client.prefs_vr.allow_mimicry
+ allowtemp = client.prefs_vr.allowtemp
drop_vore = client.prefs_vr.drop_vore
stumble_vore = client.prefs_vr.stumble_vore
diff --git a/code/modules/vore/eating/belly_import.dm b/code/modules/vore/eating/belly_import.dm
index 7303f5945f..1cdaa9c2bd 100644
--- a/code/modules/vore/eating/belly_import.dm
+++ b/code/modules/vore/eating/belly_import.dm
@@ -517,6 +517,10 @@
var/new_digest_clone = belly_data["digest_clone"]
new_belly.digest_clone = CLAMP(new_digest_clone, 0, new_belly.get_unused_digestion_damage())
+ if(isnum(belly_data["bellytemperature"]))
+ var/new_bellytemperature = belly_data["bellytemperature"]
+ new_belly.bellytemperature = CLAMP(new_bellytemperature, T0C, 473.15)
+
if(isnum(belly_data["shrink_grow_size"]))
var/new_shrink_grow_size = belly_data["shrink_grow_size"]
new_belly.shrink_grow_size = CLAMP(new_shrink_grow_size, 0.25, 2)
@@ -569,6 +573,13 @@
if(new_recycling == 1)
new_belly.recycling = TRUE
+ if(isnum(belly_data["temperature_damage"]))
+ var/new_temp_damage = belly_data["temperature_damage"]
+ if(new_temp_damage == 0)
+ new_belly.temperature_damage = FALSE
+ if(new_temp_damage == 1)
+ new_belly.temperature_damage = TRUE
+
if(isnum(belly_data["storing_nutrition"]))
var/new_storing_nutrition = belly_data["storing_nutrition"]
if(new_storing_nutrition == 0)
diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm
index af95b6383e..ba5d265407 100644
--- a/code/modules/vore/eating/belly_obj_vr.dm
+++ b/code/modules/vore/eating/belly_obj_vr.dm
@@ -263,6 +263,8 @@
var/belchchance = 0 // % Chance of pred belching on prey struggle
var/list/belly_surrounding = list() // A list of living mobs surrounded by this belly, including inside containers, food, on mobs, etc. Exclusing inside other bellies.
+ var/bellytemperature = T20C // Temperature applied to humans in the belly.
+ var/temperature_damage = FALSE // Does temperature damage prey?
//For serialization, keep this updated, required for bellies to save correctly.
/obj/belly/vars_to_save()
@@ -283,6 +285,7 @@
"digest_oxy",
"digest_tox",
"digest_clone",
+ "bellytemperature",
"immutable",
"can_taste",
"escapable",
@@ -1704,6 +1707,7 @@
dupe.digest_oxy = digest_oxy
dupe.digest_tox = digest_tox
dupe.digest_clone = digest_clone
+ dupe.bellytemperature = bellytemperature
dupe.immutable = immutable
dupe.can_taste = can_taste
dupe.escapable = escapable
diff --git a/code/modules/vore/eating/exportpanel_vr.dm b/code/modules/vore/eating/exportpanel_vr.dm
index a7af653e23..5577a41cc7 100644
--- a/code/modules/vore/eating/exportpanel_vr.dm
+++ b/code/modules/vore/eating/exportpanel_vr.dm
@@ -286,6 +286,9 @@
belly_data["digest_tox"] = B.digest_tox
belly_data["digest_clone"] = B.digest_clone
+ belly_data["bellytemperature"] = B.bellytemperature
+ belly_data["temperature_damage"] = B.temperature_damage
+
belly_data["can_taste"] = B.can_taste
belly_data["is_feedable"] = B.is_feedable
belly_data["contaminates"] = B.contaminates
diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm
index ef558cc44e..b6a71f051e 100644
--- a/code/modules/vore/eating/living_vr.dm
+++ b/code/modules/vore/eating/living_vr.dm
@@ -1040,6 +1040,7 @@
dat += span_bold("Absorption Permission:") + " [absorbable ? span_green("Allowed") : span_red("Disallowed")]
"
dat += span_bold("Selective Mode Pref:") + " [src.selective_preference]
"
dat += span_bold("Mob Vore:") + " [allowmobvore ? span_green("Enabled") : span_red("Disabled")]
"
+ dat += span_bold("Affected by temperature:") + " [allowtemp ? span_green("Enabled") : span_red("Disabled")]
"
dat += span_bold("Autotransferable:") + " [autotransferable ? span_green("Enabled") : span_red("Disabled")]
"
dat += span_bold("Can be stripped:") + " [strip_pref ? span_green("Allowed") : span_red("Disallowed")]
"
dat += span_bold("Applying reagents:") + " [apply_reagents ? span_green("Allowed") : span_red("Disallowed")]
"
diff --git a/code/modules/vore/eating/mob_vr.dm b/code/modules/vore/eating/mob_vr.dm
index e1bc66df3d..6ef18c317c 100644
--- a/code/modules/vore/eating/mob_vr.dm
+++ b/code/modules/vore/eating/mob_vr.dm
@@ -6,6 +6,7 @@
var/resizable = TRUE // Can other people resize you? (Usually ignored for self-resizes)
var/digest_leave_remains = FALSE // Will this mob leave bones/skull/etc after the melty demise?
var/allowmobvore = TRUE // Will simplemobs attempt to eat the mob?
+ var/allowtemp = TRUE // Can they be affected by belly temperature?
var/obj/belly/vore_selected // Default to no vore capability.
var/list/vore_organs = list() // List of vore containers inside a mob
var/absorbed = FALSE // If a mob is absorbed into another
diff --git a/code/modules/vore/eating/panel_databackend/vorepanel_pref_data.dm b/code/modules/vore/eating/panel_databackend/vorepanel_pref_data.dm
index a1e2caf8ed..62052f8d73 100644
--- a/code/modules/vore/eating/panel_databackend/vorepanel_pref_data.dm
+++ b/code/modules/vore/eating/panel_databackend/vorepanel_pref_data.dm
@@ -7,6 +7,7 @@
"absorbable" = owner.absorbable,
"digest_leave_remains" = owner.digest_leave_remains,
"allowmobvore" = owner.allowmobvore,
+ "allowtemp" = owner.allowtemp,
"permit_healbelly" = owner.permit_healbelly,
"show_vore_fx" = owner.show_vore_fx,
"can_be_drop_prey" = owner.can_be_drop_prey,
diff --git a/code/modules/vore/eating/panel_databackend/vorepanel_set_attribute.dm b/code/modules/vore/eating/panel_databackend/vorepanel_set_attribute.dm
index 25624702c9..14ada91b87 100644
--- a/code/modules/vore/eating/panel_databackend/vorepanel_set_attribute.dm
+++ b/code/modules/vore/eating/panel_databackend/vorepanel_set_attribute.dm
@@ -495,8 +495,7 @@
return FALSE
if(choice == 0)
choice = rand(MIN_VOICE_FREQ, MAX_VOICE_FREQ)
- choice = CLAMP(choice, MIN_VOICE_FREQ, MAX_VOICE_FREQ)
- host.vore_selected.noise_freq = choice
+ host.vore_selected.noise_freq = CLAMP(choice, MIN_VOICE_FREQ, MAX_VOICE_FREQ)
. = TRUE
if("b_tastes")
host.vore_selected.can_taste = !host.vore_selected.can_taste
@@ -541,38 +540,43 @@
var/new_damage = text2num(params["val"])
if(!isnum(new_damage))
return FALSE
- new_damage = CLAMP(new_damage, 0, host.vore_selected.get_unused_digestion_damage() + host.vore_selected.digest_burn) // sanity check following tgui input
- host.vore_selected.digest_burn = new_damage
+ host.vore_selected.digest_burn = CLAMP(new_damage, 0, host.vore_selected.get_unused_digestion_damage() + host.vore_selected.digest_burn) // sanity check following tgui input
host.vore_selected.items_preserved.Cut()
. = TRUE
if("b_brute_dmg")
var/new_damage = text2num(params["val"])
if(!isnum(new_damage))
return FALSE
- new_damage = CLAMP(new_damage, 0, host.vore_selected.get_unused_digestion_damage() + host.vore_selected.digest_brute)
- host.vore_selected.digest_brute = new_damage
+ host.vore_selected.digest_brute = CLAMP(new_damage, 0, host.vore_selected.get_unused_digestion_damage() + host.vore_selected.digest_brute)
host.vore_selected.items_preserved.Cut()
. = TRUE
if("b_oxy_dmg")
var/new_damage = text2num(params["val"])
if(!isnum(new_damage))
return FALSE
- new_damage = CLAMP(new_damage, 0, host.vore_selected.get_unused_digestion_damage() + host.vore_selected.digest_oxy)
- host.vore_selected.digest_oxy = new_damage
+ host.vore_selected.digest_oxy = CLAMP(new_damage, 0, host.vore_selected.get_unused_digestion_damage() + host.vore_selected.digest_oxy)
. = TRUE
if("b_tox_dmg")
var/new_damage = text2num(params["val"])
if(!isnum(new_damage))
return FALSE
- new_damage = CLAMP(new_damage, 0, host.vore_selected.get_unused_digestion_damage() + host.vore_selected.digest_tox)
- host.vore_selected.digest_tox = new_damage
+ host.vore_selected.digest_tox = CLAMP(new_damage, 0, host.vore_selected.get_unused_digestion_damage() + host.vore_selected.digest_tox)
. = TRUE
if("b_clone_dmg")
var/new_damage = text2num(params["val"])
if(!isnum(new_damage))
return FALSE
- new_damage = CLAMP(new_damage, 0, host.vore_selected.get_unused_digestion_damage() + host.vore_selected.digest_clone)
- host.vore_selected.digest_clone = new_damage
+ host.vore_selected.digest_clone = CLAMP(new_damage, 0, host.vore_selected.get_unused_digestion_damage() + host.vore_selected.digest_clone)
+ . = TRUE
+ if("b_bellytemperature")
+ var/new_temp = text2num(params["val"])
+ if(!isnum(new_temp))
+ return FALSE
+ new_temp = new_temp + T0C
+ host.vore_selected.bellytemperature = CLAMP(new_temp, T0C, 473.15)
+ . = TRUE
+ if("b_temperature_damage")
+ host.vore_selected.temperature_damage = !host.vore_selected.temperature_damage
. = TRUE
if("b_drainmode")
var/new_drainmode = params["val"]
diff --git a/code/modules/vore/eating/panel_databackend/vorepanel_vore_data.dm b/code/modules/vore/eating/panel_databackend/vorepanel_vore_data.dm
index 2f068804eb..9706c6a3b3 100644
--- a/code/modules/vore/eating/panel_databackend/vorepanel_vore_data.dm
+++ b/code/modules/vore/eating/panel_databackend/vorepanel_vore_data.dm
@@ -167,6 +167,8 @@
"digest_clone" = selected.digest_clone,
"digest_max" = selected.digest_max,
"digest_free" = selected.get_unused_digestion_damage(),
+ "bellytemperature" = selected.bellytemperature,
+ "temperature_damage" = selected.temperature_damage,
"bulge_size" = selected.bulge_size,
"shrink_grow_size" = selected.shrink_grow_size,
"contaminates" = selected.contaminates,
diff --git a/code/modules/vore/eating/vore_vr.dm b/code/modules/vore/eating/vore_vr.dm
index 970a017dd0..f0d87cf142 100644
--- a/code/modules/vore/eating/vore_vr.dm
+++ b/code/modules/vore/eating/vore_vr.dm
@@ -49,6 +49,7 @@
var/eating_privacy_global = FALSE //Makes eating attempt/success messages only reach for subtle range if true, overwritten by belly-specific var
var/vore_death_privacy = FALSE //Makes it so that vore deaths don't get advertised to ghosts
var/allow_mimicry = TRUE
+ var/allowtemp = TRUE //Can be affected by belly temperature
// These are 'modifier' prefs, do nothing on their own but pair with drop_prey/drop_pred settings.
var/drop_vore = TRUE
@@ -193,6 +194,7 @@
absorbable = json_from_file["absorbable"]
digest_leave_remains = json_from_file["digest_leave_remains"]
allowmobvore = json_from_file["allowmobvore"]
+ allowtemp = json_from_file["allowtemp"]
vore_taste = json_from_file["vore_taste"]
vore_smell = json_from_file["vore_smell"]
permit_healbelly = json_from_file["permit_healbelly"]
@@ -262,6 +264,8 @@
digest_leave_remains = FALSE
if(isnull(allowmobvore))
allowmobvore = TRUE
+ if(isnull(allowtemp))
+ allowtemp = TRUE
if(isnull(permit_healbelly))
permit_healbelly = TRUE
if(isnull(selective_preference))
@@ -396,6 +400,7 @@
"feeding" = feeding,
"digest_leave_remains" = digest_leave_remains,
"allowmobvore" = allowmobvore,
+ "allowtemp" = allowtemp,
"vore_taste" = vore_taste,
"vore_smell" = vore_smell,
"permit_healbelly" = permit_healbelly,
diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm
index dbec96cbed..579a0c18ee 100644
--- a/code/modules/vore/eating/vorepanel_vr.dm
+++ b/code/modules/vore/eating/vorepanel_vr.dm
@@ -401,6 +401,12 @@
host.client.prefs_vr.digestable = host.digestable
unsaved_changes = TRUE
return TRUE
+ if("toggle_allowtemp")
+ host.allowtemp = !host.allowtemp
+ if(host.client.prefs_vr)
+ host.client.prefs_vr.allowtemp = host.allowtemp
+ unsaved_changes = TRUE
+ return TRUE
if("toggle_global_privacy")
host.eating_privacy_global = !host.eating_privacy_global
if(host.client.prefs_vr)
diff --git a/tgui/packages/tgui/interfaces/SmartVend.tsx b/tgui/packages/tgui/interfaces/SmartVend.tsx
index e37f6221c7..4f5afe0df3 100644
--- a/tgui/packages/tgui/interfaces/SmartVend.tsx
+++ b/tgui/packages/tgui/interfaces/SmartVend.tsx
@@ -24,7 +24,7 @@ type Data = {
type content = { name: string; index: number; amount: number };
const sortTypes = {
- Alphabetical: (a: content, b: content) => a.name > b.name,
+ Alphabetical: (a: content, b: content) => a.name.localeCompare(b.name),
'By amount': (a: content, b: content) => -(a.amount - b.amount),
};
diff --git a/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreUserPreferences.tsx b/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreUserPreferences.tsx
index 1249e4d9ff..81a40df27f 100644
--- a/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreUserPreferences.tsx
+++ b/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreUserPreferences.tsx
@@ -21,6 +21,7 @@ export const VoreUserPreferences = (props: {
absorbable,
devourable,
allowmobvore,
+ allowtemp,
feeding,
permit_healbelly,
can_be_drop_prey,
@@ -120,6 +121,19 @@ export const VoreUserPreferences = (props: {
disabled: 'No Mobs eating you',
},
},
+ temperature: {
+ action: 'toggle_allowtemp',
+ test: allowtemp,
+ tooltip: {
+ main: "This button is for those who don't want to be affected by belly temperature, as temperature can be deadly.",
+ enable: 'Click here to be affected by belly temperature.',
+ disable: 'Click here to not be affected by belly temperature.',
+ },
+ content: {
+ enabled: 'Affected By Temperature',
+ disabled: 'Immune To Temperature',
+ },
+ },
feed: {
action: 'toggle_feed',
test: feeding,
diff --git a/tgui/packages/tgui/interfaces/VorePanel/VoreSelectedBellyTabs/OptionTab/BellyOptionsRight.tsx b/tgui/packages/tgui/interfaces/VorePanel/VoreSelectedBellyTabs/OptionTab/BellyOptionsRight.tsx
index 288a4a1e88..0bb8629368 100644
--- a/tgui/packages/tgui/interfaces/VorePanel/VoreSelectedBellyTabs/OptionTab/BellyOptionsRight.tsx
+++ b/tgui/packages/tgui/interfaces/VorePanel/VoreSelectedBellyTabs/OptionTab/BellyOptionsRight.tsx
@@ -1,6 +1,7 @@
import { LabeledList } from 'tgui-core/components';
import { digestModeToColor, selectiveBellyOptions } from '../../constants';
+import { bellyTemperatureToColor } from '../../functions';
import type { bellyOptionData } from '../../types';
import { VorePanelEditDropdown } from '../../VorePanelElements/VorePanelEditDropdown';
import { VorePanelEditNumber } from '../../VorePanelElements/VorePanelEditNumber';
@@ -20,6 +21,8 @@ export const BellyOptionsRight = (props: {
digest_clone,
digest_max,
digest_free,
+ bellytemperature,
+ temperature_damage,
shrink_grow_size,
egg_type,
egg_types,
@@ -146,6 +149,33 @@ export const BellyOptionsRight = (props: {
color="purple"
/>
+
+
+
+
+
+
-
+
+
+
+
) : (
''
diff --git a/tgui/packages/tgui/interfaces/VorePanel/functions.ts b/tgui/packages/tgui/interfaces/VorePanel/functions.ts
index 3d63bad76f..ba59705cbe 100644
--- a/tgui/packages/tgui/interfaces/VorePanel/functions.ts
+++ b/tgui/packages/tgui/interfaces/VorePanel/functions.ts
@@ -2,7 +2,10 @@ export function abilitiy_usable(nutri: number, cost: number): boolean {
return nutri >= cost;
}
-export function sanitize_color(color?: string | null, mirrorBlack?: boolean) {
+export function sanitize_color(
+ color?: string | null,
+ mirrorBlack?: boolean,
+): string | undefined {
if (!color) {
return undefined;
}
@@ -17,7 +20,7 @@ export function sanitize_color(color?: string | null, mirrorBlack?: boolean) {
return ctx.fillStyle;
}
-export function calcLineHeight(lim: number, height: number) {
+export function calcLineHeight(lim: number, height: number): string {
return `${(Math.ceil(lim / 25 / height + 0.5) * height).toFixed()}px`;
}
@@ -27,7 +30,7 @@ export function fixCorruptedData(
| string[]
| null
| Record,
-) {
+): { corrupted?: boolean; data: string | string[] } {
if (toSanitize === null) {
return { data: '' };
}
@@ -49,8 +52,20 @@ export function fixCorruptedData(
return { corrupted: true, data: clearedData || [] };
}
+export function bellyTemperatureToColor(temp: number): string | undefined {
+ if (temp < 260) {
+ return 'teal';
+ }
+ if (temp > 360) {
+ return 'red';
+ }
+ return undefined;
+}
+
// Those can't be used currently, due to byond limitations
-export async function copy_to_clipboard(value: string | string[]) {
+export async function copy_to_clipboard(
+ value: string | string[],
+): Promise {
let data = value;
if (Array.isArray(data)) {
data = data.join('\n\n');
@@ -58,7 +73,9 @@ export async function copy_to_clipboard(value: string | string[]) {
await navigator.clipboard.writeText(data);
}
-export async function paste_from_clipboard(asArray = false) {
+export async function paste_from_clipboard(
+ asArray = false,
+): Promise {
const ourText = await navigator.clipboard.readText();
if (asArray) {
return ourText.split('\n\n');
diff --git a/tgui/packages/tgui/interfaces/VorePanel/types.ts b/tgui/packages/tgui/interfaces/VorePanel/types.ts
index d46f0b4764..44430dcc55 100644
--- a/tgui/packages/tgui/interfaces/VorePanel/types.ts
+++ b/tgui/packages/tgui/interfaces/VorePanel/types.ts
@@ -107,6 +107,7 @@ export type bellyOptionData = {
digest_oxy: number;
digest_tox: number;
digest_clone: number;
+ bellytemperature: number;
digest_max: number;
digest_free: number;
bulge_size: number;
@@ -137,6 +138,7 @@ export type bellyOptionData = {
absorbedrename_name_min: number;
drainmode_options: string[];
drainmode: string;
+ temperature_damage: BooleanLike;
};
export type bellySoundData = {
@@ -300,6 +302,7 @@ export type prefData = {
absorbable: BooleanLike;
digest_leave_remains: BooleanLike;
allowmobvore: BooleanLike;
+ allowtemp: BooleanLike;
permit_healbelly: BooleanLike;
show_vore_fx: BooleanLike;
can_be_drop_prey: BooleanLike;
@@ -414,6 +417,7 @@ export type localPrefs = {
absorbable: preferenceData;
devour: preferenceData;
mobvore: preferenceData;
+ temperature: preferenceData;
feed: preferenceData;
healbelly: preferenceData;
dropnom_prey: preferenceData;
diff --git a/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportBellyString.tsx b/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportBellyString.tsx
index 64011085ea..808a643a4c 100644
--- a/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportBellyString.tsx
+++ b/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportBellyString.tsx
@@ -28,6 +28,8 @@ export const generateBellyString = (belly: Belly, index: number) => {
digest_oxy,
digest_tox,
digest_clone,
+ bellytemperature,
+ temperature_damage,
can_taste,
is_feedable,
@@ -217,16 +219,12 @@ export const generateBellyString = (belly: Belly, index: number) => {
} = belly;
let result = '';
- result +=
- `