Merge branch 'master' into upstream-merge-34667
This commit is contained in:
@@ -193,7 +193,7 @@
|
||||
name = "spiderling"
|
||||
desc = "It's slightly twitching in your hand. Ew..."
|
||||
icon_state = "spiderling"
|
||||
list_reagents = list("nutrient" = 1, "toxin" = 4)
|
||||
list_reagents = list("nutriment" = 1, "toxin" = 4)
|
||||
filling_color = "#00800"
|
||||
tastes = list("cobwebs" = 1, "guts" = 2)
|
||||
foodtype = MEAT | TOXIC
|
||||
|
||||
@@ -54,7 +54,7 @@ Cargo Technician
|
||||
belt = /obj/item/device/pda/cargo
|
||||
ears = /obj/item/device/radio/headset/headset_cargo
|
||||
uniform = /obj/item/clothing/under/rank/cargotech
|
||||
|
||||
l_hand = /obj/item/device/export_scanner
|
||||
|
||||
/*
|
||||
Shaft Miner
|
||||
|
||||
@@ -1623,24 +1623,29 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
|
||||
var/loc_temp = H.get_temperature(environment)
|
||||
|
||||
//Body temperature is adjusted in two steps. First, your body tries to stabilize itself a bit.
|
||||
if(H.stat != DEAD)
|
||||
H.natural_bodytemperature_stabilization()
|
||||
|
||||
//Then, it reacts to the surrounding atmosphere based on your thermal protection
|
||||
//Body temperature is adjusted in two parts: first there your body tries to naturally preserve homeostasis (shivering/sweating), then it reacts to the surrounding environment
|
||||
//Thermal protection (insulation) has mixed benefits in two situations (hot in hot places, cold in hot places)
|
||||
if(!H.on_fire) //If you're on fire, you do not heat up or cool down based on surrounding gases
|
||||
if(loc_temp < H.bodytemperature)
|
||||
//Place is colder than we are
|
||||
var/thermal_protection = H.get_cold_protection(loc_temp) //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.
|
||||
if(thermal_protection < 1)
|
||||
H.bodytemperature += min((1-thermal_protection) * ((loc_temp - H.bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX)
|
||||
else
|
||||
//Place is hotter than we are
|
||||
var/thermal_protection = H.get_heat_protection(loc_temp) //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.
|
||||
if(thermal_protection < 1)
|
||||
H.bodytemperature += min((1-thermal_protection) * ((loc_temp - H.bodytemperature) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX)
|
||||
if((abs(BODYTEMP_NORMAL - H.bodytemperature) <= 5) && (abs(BODYTEMP_NORMAL - loc_temp) <= 25))
|
||||
return //Performance saver
|
||||
var/natural = 0
|
||||
if(H.stat != DEAD)
|
||||
natural = H.natural_bodytemperature_stabilization()
|
||||
var/thermal_protection = 1
|
||||
if(loc_temp < H.bodytemperature) //Place is colder than we are
|
||||
thermal_protection -= H.get_cold_protection(loc_temp) //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.
|
||||
if(H.bodytemperature < BODYTEMP_NORMAL) //we're cold, insulation helps us retain body heat and will reduce the heat we lose to the environment
|
||||
H.bodytemperature += (thermal_protection+1)*natural + max(thermal_protection * (loc_temp - H.bodytemperature) / BODYTEMP_COLD_DIVISOR, BODYTEMP_COOLING_MAX)
|
||||
else //we're sweating, insulation hinders our ability to reduce heat - and it will reduce the amount of cooling you get from the environment
|
||||
H.bodytemperature += natural*(1/(thermal_protection+1)) + max((thermal_protection * (loc_temp - H.bodytemperature) + BODYTEMP_NORMAL - H.bodytemperature) / BODYTEMP_COLD_DIVISOR , BODYTEMP_COOLING_MAX) //Extra calculation for hardsuits to bleed off heat
|
||||
else //Place is hotter than we are
|
||||
thermal_protection -= H.get_heat_protection(loc_temp) //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.
|
||||
if(H.bodytemperature < BODYTEMP_NORMAL) //and we're cold, insulation enhances our ability to retain body heat but reduces the heat we get from the environment
|
||||
H.bodytemperature += (thermal_protection+1)*natural + min(thermal_protection * (loc_temp - H.bodytemperature) / BODYTEMP_HEAT_DIVISOR, BODYTEMP_HEATING_MAX)
|
||||
else //we're sweating, insulation hinders out ability to reduce heat - but will reduce the amount of heat we get from the environment
|
||||
H.bodytemperature += natural*(1/(thermal_protection+1)) + min(thermal_protection * (loc_temp - H.bodytemperature) / BODYTEMP_HEAT_DIVISOR, BODYTEMP_HEATING_MAX)
|
||||
|
||||
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
|
||||
// +/- 50 degrees from 310K is the 'safe' zone, where no damage is dealt.
|
||||
if(H.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !(RESISTHOT in species_traits))
|
||||
//Body temperature is too hot.
|
||||
var/burn_damage
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
default_features = list("slimecoontail" = "Slimecoon Tail", "slimecoonears" = "Slimecoon Ears", "slimecoonsnout" = "Slimecoon Snout")*/
|
||||
|
||||
// Fat Shark <3
|
||||
|
||||
/*
|
||||
/datum/species/shark/datashark
|
||||
name = "DataShark"
|
||||
id = "datashark"
|
||||
@@ -228,6 +228,7 @@
|
||||
whitelisted = 1
|
||||
whitelist = list("rubyflamewing")
|
||||
blacklisted = 0
|
||||
*/
|
||||
|
||||
/datum/species/guilmon
|
||||
name = "Guilmon"
|
||||
|
||||
@@ -396,15 +396,14 @@
|
||||
/mob/living/carbon/proc/natural_bodytemperature_stabilization()
|
||||
var/body_temperature_difference = BODYTEMP_NORMAL - bodytemperature
|
||||
switch(bodytemperature)
|
||||
if(-INFINITY to BODYTEMP_COLD_DAMAGE_LIMIT) //BODYTEMP_COLD_DAMAGE_LIMIT is BODYTEMP_NORMAL(310.15) - 50, the temperature where you start to feel effects.
|
||||
bodytemperature += max((body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)
|
||||
if(-INFINITY to BODYTEMP_COLD_DAMAGE_LIMIT) //Cold damage limit is 50 below the default, the temperature where you start to feel effects.
|
||||
return max((body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)
|
||||
if(BODYTEMP_COLD_DAMAGE_LIMIT to BODYTEMP_NORMAL)
|
||||
bodytemperature += max(body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR, min(body_temperature_difference, BODYTEMP_AUTORECOVERY_MINIMUM/4))
|
||||
if(BODYTEMP_NORMAL to BODYTEMP_HEAT_DAMAGE_LIMIT)
|
||||
bodytemperature += min(body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR, max(body_temperature_difference, -BODYTEMP_AUTORECOVERY_MINIMUM/4))
|
||||
if(BODYTEMP_HEAT_DAMAGE_LIMIT to INFINITY) //BODYTEMP_HEAT_DAMAGE_LIMIT is BODYTEMP_NORMAL(310.15) + 50, the temperature where you start to feel effects.
|
||||
//We totally need a sweat system cause it totally makes sense...~
|
||||
bodytemperature += min((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), -BODYTEMP_AUTORECOVERY_MINIMUM) //We're dealing with negative numbers
|
||||
return max(body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR, min(body_temperature_difference, BODYTEMP_AUTORECOVERY_MINIMUM/4))
|
||||
if(BODYTEMP_NORMAL to BODYTEMP_HEAT_DAMAGE_LIMIT) // Heat damage limit is 50 above the default, the temperature where you start to feel effects.
|
||||
return min(body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR, max(body_temperature_difference, -BODYTEMP_AUTORECOVERY_MINIMUM/4))
|
||||
if(BODYTEMP_HEAT_DAMAGE_LIMIT to INFINITY)
|
||||
return min((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), -BODYTEMP_AUTORECOVERY_MINIMUM) //We're dealing with negative numbers
|
||||
/////////
|
||||
//LIVER//
|
||||
/////////
|
||||
@@ -460,4 +459,4 @@
|
||||
death()
|
||||
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(B)
|
||||
B.damaged_brain = TRUE
|
||||
B.damaged_brain = TRUE
|
||||
|
||||
@@ -66,13 +66,13 @@
|
||||
var/loc_temp = get_temperature(environment)
|
||||
|
||||
if(stat != DEAD)
|
||||
natural_bodytemperature_stabilization()
|
||||
bodytemperature += natural_bodytemperature_stabilization()
|
||||
|
||||
if(!on_fire) //If you're on fire, you do not heat up or cool down based on surrounding gases
|
||||
if(loc_temp < bodytemperature)
|
||||
bodytemperature += min(((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX)
|
||||
else
|
||||
bodytemperature += min(((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX)
|
||||
bodytemperature += max(((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX)
|
||||
|
||||
if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
|
||||
switch(bodytemperature)
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
var/atom/A = src.loc
|
||||
if(isturf(A))
|
||||
var/areatemp = get_temperature(environment)
|
||||
if( abs(areatemp - bodytemperature) > 40 )
|
||||
if( abs(areatemp - bodytemperature) > 5)
|
||||
var/diff = areatemp - bodytemperature
|
||||
diff = diff / 5
|
||||
bodytemperature += diff
|
||||
|
||||
@@ -341,7 +341,6 @@
|
||||
var/ally = FALSE
|
||||
for(var/F in faction)
|
||||
if(F == "neutral") //slimes are neutral so other mobs not target them, but they can target neutral mobs
|
||||
continue
|
||||
if(F in L.faction)
|
||||
ally = TRUE
|
||||
break
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/dropped()
|
||||
. = ..()
|
||||
if(!holds_charge)
|
||||
if(!QDELING(src) && !holds_charge)
|
||||
// Put it on a delay because moving item from slot to hand
|
||||
// calls dropped().
|
||||
addtimer(CALLBACK(src, .proc/empty_if_not_held), 2)
|
||||
@@ -97,10 +97,13 @@
|
||||
empty()
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/empty()
|
||||
cell.use(cell.charge)
|
||||
if(cell)
|
||||
cell.use(cell.charge)
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/attempt_reload(recharge_time)
|
||||
if(!cell)
|
||||
return
|
||||
if(overheat)
|
||||
return
|
||||
if(!recharge_time)
|
||||
|
||||
@@ -213,29 +213,31 @@
|
||||
taste_description = "mint"
|
||||
|
||||
/datum/reagent/consumable/frostoil/on_mob_life(mob/living/M)
|
||||
switch(current_cycle)
|
||||
if(1 to 15)
|
||||
M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(holder.has_reagent("capsaicin"))
|
||||
holder.remove_reagent("capsaicin", 5)
|
||||
if(isslime(M))
|
||||
M.bodytemperature -= rand(5,20)
|
||||
if(15 to 25)
|
||||
M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(isslime(M))
|
||||
M.bodytemperature -= rand(10,20)
|
||||
if(25 to 35)
|
||||
M.bodytemperature -= 30 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(prob(1))
|
||||
M.emote("shiver")
|
||||
if(isslime(M))
|
||||
M.bodytemperature -= rand(15,20)
|
||||
if(35 to INFINITY)
|
||||
M.bodytemperature -= 40 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(prob(5))
|
||||
M.emote("shiver")
|
||||
if(isslime(M))
|
||||
M.bodytemperature -= rand(20,25)
|
||||
if(M.bodytemperature > 50)
|
||||
switch(current_cycle)
|
||||
if(1 to 15)
|
||||
M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(holder.has_reagent("capsaicin"))
|
||||
holder.remove_reagent("capsaicin", 5)
|
||||
if(isslime(M))
|
||||
M.bodytemperature -= rand(5,20)
|
||||
if(15 to 25)
|
||||
M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(isslime(M))
|
||||
M.bodytemperature -= rand(10,20)
|
||||
if(25 to 35)
|
||||
M.bodytemperature -= 30 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(prob(1))
|
||||
M.emote("shiver")
|
||||
if(isslime(M))
|
||||
M.bodytemperature -= rand(15,20)
|
||||
if(35 to INFINITY)
|
||||
M.bodytemperature -= 40 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(prob(5))
|
||||
M.emote("shiver")
|
||||
if(isslime(M))
|
||||
M.bodytemperature -= rand(20,25)
|
||||
M.bodytemperature = max(50, M.bodytemperature)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/frostoil/reaction_turf(turf/T, reac_volume)
|
||||
|
||||
Reference in New Issue
Block a user