Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion San_Additions/Adiciones_Tajaran_San.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ Possibilites:

*/

// Tajarans now have regular heat discomfort level but they get additional bodytemperature heat from clothing, as checked in their
// handle_enviroment_special()
// And now head discomfort is checked by the body temperature

/datum/species/tajaran
heat_discomfort_level = 292
heat_discomfort_level = 314

// Reminder that this var exists.
// The body will try to lower itself to this temperature
// Tajarans bodytemp would RISE to this temperature in their natural habitat, becuase their natural habitat is 292K while the station is 298K
// They'd feel a lot of cold, that'd substract heat from them, but their fur "adds it back".
// So, what they do in station is have their regular body temperature, but they'd easily get discomfort by wearing too much clothing
// Not by just wearing "something that covers their chest and balls" >:C
//body_temperature = 310.15
slowdown = -0.2

heat_level_1 = 330 //Default 330
heat_level_2 = 380 //Default 380
heat_level_3 = 800 //Default 800
6 changes: 6 additions & 0 deletions San_Additions/Adiciones_Unathi_San.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
/datum/species/unathi
clothing_slowdown_resistance = 2 // Los unathi se ralentizan la mitad por la ropa
item_slowdown_resistance = 2 // Los unathi se ralentizan la mitad por los objetos tambi�n.
heat_discomfort_level = 307 // Los unathi pueden estar en "l�mite de calorcito" cuando tienen una temperatura corporal parecida a la sangre caliente
body_temperature = 300 // Los unathi ahora tienen temperatura corporal inferior

// Recordemos que los unathi tienen una resistencia a las quemaduras por el calor superior a la normal, as� que aumentarles el calor por la ropa no tiene tanto efecto
/datum/species/unathi/handle_environment_special(var/mob/living/carbon/human/H)
handle_clothing_heat(H) // Los unathi reciben calor de la ropa

/*

Expand Down
103 changes: 103 additions & 0 deletions San_Additions/Tajaran_Calor.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/*
This can be added to any species
but it is meant to be used for Tajara and Vulpkanin

These 2 procs increase body temperature based on clothing UP TO (species.heat_level_1 - 5)

*/

/datum/species/proc/handle_clothing_heat(var/mob/living/carbon/human/H)
// We don't check for clothing heat if there's no air in our current tile because space.
// What if the station is cold? This is meant for species with fur or with layers of cold protection. If the station is cold, get naked and you'll be fine
// If the station is hot, you'll get heat anyways
var/turf/simulated/T
if(isturf(H.loc))
T = H.loc
if(!T.air)
return
// Clothes that can give heat are: Unders, Suits, Gloves, Gas Masks and Helmets (Not hats)
// There will be some clothing that don't give heat at all, like shorts or the tux vest
var/list/clothing_gives_no_heat = list(
/obj/item/clothing/suit/stripper,
/obj/item/clothing/suit/poncho,
)
// Also, some clothing that doesn't give too much heat but should... like the Hastur, for example
// Recommended to go 6 for "single part heat" and lower for just "additive heat"
var/list/clothing_additional_heat = list(
/obj/item/clothing/suit/hastur = 5,
/obj/item/clothing/suit/rubber = 5,
/obj/item/clothing/suit/radiation = 5,
/obj/item/clothing/suit/chickensuit = 5,
/obj/item/clothing/suit/bomb_suit = 5,
/obj/item/clothing/suit/bio_suit = 5,
/obj/item/clothing/suit/imperium_monk = 5,
/obj/item/clothing/suit/monkeysuit = 5,
/obj/item/clothing/suit/space = 5
)
// The clothing that actually GIVES heat will give it based off it's armor stats and w_class
// We will check one by one since unders and suits should give more heat than other heat sources
var/adding_heat = 0
var/quadruple_uniform_heat = 1
// Uniforms
var/obj/item/clothing/Checking = H.w_uniform
if(Checking && !is_type_in_list(Checking, clothing_gives_no_heat) && (Checking.body_parts_covered & UPPER_TORSO) && (Checking.body_parts_covered & LOWER_TORSO)) // Can only get heat from unders if they cover the chest and groin
adding_heat += get_clothing_heat(Checking)
quadruple_uniform_heat = 4
if(is_type_in_list(Checking, clothing_additional_heat))
adding_heat += clothing_additional_heat[Checking.type]

// Suits
Checking = H.wear_suit
if(Checking && !is_type_in_list(Checking, clothing_gives_no_heat))
adding_heat += get_clothing_heat(Checking)
if(is_type_in_list(Checking, clothing_additional_heat))
adding_heat += clothing_additional_heat[Checking.type]
// If we're wearing a uniform under the suit and the uniform covers the chest, the heat is quadrupled
adding_heat += adding_heat * quadruple_uniform_heat



// Gloves
Checking = H.gloves
if(Checking && !is_type_in_list(Checking, clothing_gives_no_heat))
adding_heat += get_clothing_heat(Checking)
if(is_type_in_list(Checking, clothing_additional_heat))
adding_heat += clothing_additional_heat[Checking.type]


// Masks
Checking = H.wear_mask
if(Checking && !is_type_in_list(Checking, clothing_gives_no_heat))
adding_heat += get_clothing_heat(Checking)
if(is_type_in_list(Checking, clothing_additional_heat))
adding_heat += clothing_additional_heat[Checking.type]


// Helmets
Checking = H.head
if(Checking && !is_type_in_list(Checking, clothing_gives_no_heat))
if(istype(Checking, /obj/item/clothing/head/helmet) || istype(Checking, /obj/item/clothing/head/bio_hood))
adding_heat += get_clothing_heat(Checking)
if(is_type_in_list(Checking, clothing_additional_heat))
adding_heat += clothing_additional_heat[Checking.type]


// if(adding_heat > 12)
// adding_heat = 12 // A limit to how much heat you can get from clothing, I'm not checking absolutely everything, but I'm pretty sure you cannot get +12K from clothing alone
// // Also to avoid getting burns from clothing temperature

// YOU CANNOT START BURNING FROM CLOTHING ALONE
var/target_temperature = H.species.body_temperature + adding_heat
if(H.bodytemperature < target_temperature)
if((H.bodytemperature+adding_heat) >= H.species.heat_level_1)
H.bodytemperature = H.species.heat_level_1 - 5
else
H.bodytemperature += adding_heat

/proc/get_clothing_heat(var/obj/item/clothing/C)
var/heat = C.w_class / 2
for(var/nombre in C.armor)
heat += C.armor[nombre] / 100

heat = round(heat)
return heat
15 changes: 12 additions & 3 deletions San_Additions/Tajaran_Necesidad_Dormir.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ A
*/
/datum/species/tajaran/handle_environment_special(var/mob/living/carbon/human/H)
handle_sleep_time(H) // Lo ponemos en otra Proc para que se puedan hacer m�s cosas en el mismo handle_enviroment_special

handle_clothing_heat(H)
// Un icono en la pantalla que empieza siendo null y solamente se inicializa en una f�rmula usada por los Tajaran
// esto solo es usado por los Tajaran REPITO
// Por ahora - Sansaur
Expand Down Expand Up @@ -116,9 +116,9 @@ A


dibujar_icono_dormir(1,H)

var/sleep_multiplier = getSleepIncreaseMultiplier(H)
if(prob(H.sleep_increase_chance))
H.need_for_sleep += H.sleep_increase_rate
H.need_for_sleep += H.sleep_increase_rate * sleep_multiplier

// al 60% de la dormidera empiezan los mensajes
if(H.need_for_sleep > (H.maximum_sleep / 1.8))
Expand All @@ -142,3 +142,12 @@ A

H.sleeping += H.sleeping_time

/datum/species/tajaran/proc/getSleepIncreaseMultiplier(var/mob/living/carbon/human/H)
// Cuanto m�s calor, m�s modorri�a
var/calor_actual = H.bodytemperature
var/calor_minimo = body_temperature
if(calor_actual > calor_minimo)
var/devolucion = (calor_actual / calor_minimo) + 0.1
if(devolucion > 1.5)
devolucion = 1.5
return devolucion
5 changes: 5 additions & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2430,9 +2430,14 @@
#include "maps\~mapsystem\maps_jobs.dm"
#include "maps\~mapsystem\maps_unit_testing.dm"
#include "maps\~unit_tests\unit_testing.dm"
#include "San_Additions\Adiciones_Tajaran_San.dm"
#include "San_Additions\Adiciones_Unathi_San.dm"
#include "San_Additions\barra_do.dm"
#include "San_Additions\catwalk.dm"
#include "San_Additions\cure_steps.dm"
#include "San_Additions\FrontFlip.dm"
#include "San_Additions\Tajaran_Calor.dm"
#include "San_Additions\Tajaran_Necesidad_Dormir.dm"
#include "San_Additions\Field of View\FieldOfView.dm"
#include "San_Additions\objectives_dreyfus\debugging.dm"
#include "San_Additions\objectives_dreyfus\objectives.dm"
Expand Down
18 changes: 13 additions & 5 deletions code/modules/mob/living/carbon/human/species/species_getters.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,31 @@

/datum/species/proc/get_environment_discomfort(var/mob/living/carbon/human/H, var/msg_type)

if(!prob(5))
if(!prob(25))
return

var/covered = 0 // Basic coverage can help.
/*
for(var/obj/item/clothing/clothes in H)
if(H.l_hand == clothes || H.r_hand == clothes)
continue
if((clothes.body_parts_covered & UPPER_TORSO) && (clothes.body_parts_covered & LOWER_TORSO))
covered = 1
break
*/
// this shouldn't only be temperature around you, but also temperature of your body
// If Tajarans get their body cold from some source (Maybe a chemical or a virus) they'd still feel "heat" if they wore a fucking jumpsuit

// WE'LL DO SOMETHING WITH MyTurf In the future
// var/turf/simulated/MyTurf
// if(isturf(H.loc))
// MyTurf = H.loc

switch(msg_type)
if("cold")
if(!covered)
if(H.bodytemperature <= H.species.cold_discomfort_level)
to_chat(H, "<span class='danger'>[pick(cold_discomfort_strings)]</span>")

if("heat")
if(covered)
if(H.bodytemperature >= H.species.heat_discomfort_level)
to_chat(H, "<span class='danger'>[pick(heat_discomfort_strings)]</span>")

/datum/species/proc/get_random_name(var/gender)
Expand Down
11 changes: 7 additions & 4 deletions code/modules/organs/internal/lungs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,10 @@
// log_debug("Breath: [breath.temperature], [src]: [bodytemperature], Adjusting: [temp_adj]")
owner.bodytemperature += temp_adj

else if(breath.temperature >= species.heat_discomfort_level)
species.get_environment_discomfort(owner,"heat")
else if(breath.temperature <= species.cold_discomfort_level)
species.get_environment_discomfort(owner,"cold")
// Removing this and changing it to the get_enviroment_discomfort
// Basically, instead of checking it via the temperature of the gas_mixture, we check the bodytemperature in the
// get_enviroment_discomfort proc.
// else if(breath.temperature >= species.heat_discomfort_level)
species.get_environment_discomfort(owner,"heat")
// else if(breath.temperature <= species.cold_discomfort_level)
species.get_environment_discomfort(owner,"cold")