mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-23 12:06:22 +01:00
Removed IS_SYNTHETIC and REGENERATES_LIMBS flags.
Moved some organ code around, added icons and limbs for IPC, added IPC limb manufacturer. Reimplementing checks in place of IS_SYNTHETIC. Rebalancing EMP a bit for IPC.
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
|
||||
/mob/living/carbon/proc/breathe()
|
||||
//if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
|
||||
if(species && (species.flags & NO_BREATHE || species.flags & IS_SYNTHETIC)) return
|
||||
|
||||
if(species && (species.flags & NO_BREATHE)) return
|
||||
|
||||
var/datum/gas_mixture/breath = null
|
||||
|
||||
|
||||
//First, check if we can breathe at all
|
||||
if(health < config.health_threshold_crit && !(CE_STABLE in chem_effects)) //crit aka circulatory shock
|
||||
losebreath++
|
||||
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
losebreath--
|
||||
if (prob(10)) //Gasp per 10 ticks? Sounds about right.
|
||||
@@ -17,9 +17,9 @@
|
||||
else
|
||||
//Okay, we can breathe, now check if we can get air
|
||||
breath = get_breath_from_internal() //First, check for air from internals
|
||||
if(!breath)
|
||||
if(!breath)
|
||||
breath = get_breath_from_environment() //No breath from internals so let's try to get air from our location
|
||||
|
||||
|
||||
handle_breath(breath)
|
||||
handle_post_breath(breath)
|
||||
|
||||
@@ -40,15 +40,15 @@
|
||||
|
||||
/mob/living/carbon/proc/get_breath_from_environment(var/volume_needed=BREATH_VOLUME)
|
||||
var/datum/gas_mixture/breath = null
|
||||
|
||||
|
||||
var/datum/gas_mixture/environment
|
||||
if(loc)
|
||||
environment = loc.return_air_for_internal_lifeform()
|
||||
|
||||
|
||||
if(environment)
|
||||
breath = environment.remove_volume(volume_needed)
|
||||
handle_chemical_smoke(environment) //handle chemical smoke while we're at it
|
||||
|
||||
|
||||
if(breath)
|
||||
//handle mask filtering
|
||||
if(istype(wear_mask, /obj/item/clothing/mask) && breath)
|
||||
|
||||
@@ -270,9 +270,8 @@
|
||||
if(temp)
|
||||
if(temp.status & ORGAN_ROBOT)
|
||||
if(!(temp.brute_dam + temp.burn_dam))
|
||||
if(!species.flags & IS_SYNTHETIC)
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]!</span>\n"
|
||||
continue
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]!</span>\n"
|
||||
continue
|
||||
else
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has[temp.get_wounds_desc()]!</span>\n"
|
||||
else if(temp.wounds.len > 0 || temp.open)
|
||||
|
||||
@@ -746,10 +746,17 @@
|
||||
xylophone=0
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/check_has_mouth()
|
||||
// Todo, check stomach organ when implemented.
|
||||
var/obj/item/organ/external/head/H = get_organ("head")
|
||||
if(!H || !H.can_intake_reagents)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/vomit()
|
||||
|
||||
if(species.flags & IS_SYNTHETIC)
|
||||
return //Machines don't throw up.
|
||||
if(!check_has_mouth())
|
||||
return
|
||||
|
||||
if(!lastpuke)
|
||||
lastpuke = 1
|
||||
|
||||
@@ -142,12 +142,12 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/getCloneLoss()
|
||||
if(species.flags & (IS_SYNTHETIC | NO_SCAN))
|
||||
if(species.flags & (NO_SCAN))
|
||||
cloneloss = 0
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/setCloneLoss(var/amount)
|
||||
if(species.flags & (IS_SYNTHETIC | NO_SCAN))
|
||||
if(species.flags & (NO_SCAN))
|
||||
cloneloss = 0
|
||||
else
|
||||
..()
|
||||
@@ -155,7 +155,7 @@
|
||||
/mob/living/carbon/human/adjustCloneLoss(var/amount)
|
||||
..()
|
||||
|
||||
if(species.flags & (IS_SYNTHETIC | NO_SCAN))
|
||||
if(species.flags & (NO_SCAN))
|
||||
cloneloss = 0
|
||||
return
|
||||
|
||||
|
||||
@@ -258,9 +258,6 @@
|
||||
|
||||
proc/handle_mutations_and_radiation()
|
||||
|
||||
if(species.flags & IS_SYNTHETIC) //Robots don't suffer from mutations or radloss.
|
||||
return
|
||||
|
||||
if(getFireLoss())
|
||||
if((COLD_RESISTANCE in mutations) || (prob(1)))
|
||||
heal_organ_damage(0,1)
|
||||
@@ -709,9 +706,9 @@
|
||||
*/
|
||||
|
||||
proc/stabilize_body_temperature()
|
||||
if (species.flags & IS_SYNTHETIC)
|
||||
bodytemperature += species.synth_temp_gain //just keep putting out heat.
|
||||
return
|
||||
|
||||
if (species.passive_temp_gain) // We produce heat naturally.
|
||||
bodytemperature += species.passive_temp_gain
|
||||
|
||||
var/body_temperature_difference = species.body_temperature - bodytemperature
|
||||
|
||||
@@ -858,7 +855,9 @@
|
||||
|
||||
proc/handle_chemicals_in_body()
|
||||
|
||||
if(reagents && !(species.flags & IS_SYNTHETIC)) //Synths don't process reagents.
|
||||
// TODO: stomach and bloodstream organ.
|
||||
|
||||
if(reagents)
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
var/alien = 0
|
||||
@@ -931,7 +930,8 @@
|
||||
take_overall_damage(2,0)
|
||||
traumatic_shock++
|
||||
|
||||
if(!(species.flags & IS_SYNTHETIC)) handle_trace_chems()
|
||||
// TODO: stomach and bloodstream organ.
|
||||
handle_trace_chems()
|
||||
|
||||
updatehealth()
|
||||
|
||||
@@ -1133,7 +1133,7 @@
|
||||
|
||||
if(damageoverlay.overlays)
|
||||
damageoverlay.overlays = list()
|
||||
|
||||
|
||||
if(stat == UNCONSCIOUS)
|
||||
//Critical damage passage overlay
|
||||
if(health <= 0)
|
||||
@@ -1268,7 +1268,7 @@
|
||||
if(2) healths.icon_state = "health7"
|
||||
else
|
||||
//switch(health - halloss)
|
||||
switch(100 - ((species && species.flags & NO_PAIN & !IS_SYNTHETIC) ? 0 : traumatic_shock))
|
||||
switch(100 - ((species.flags & NO_PAIN) ? 0 : traumatic_shock))
|
||||
if(100 to INFINITY) healths.icon_state = "health0"
|
||||
if(80 to 100) healths.icon_state = "health1"
|
||||
if(60 to 80) healths.icon_state = "health2"
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
var/icon/icon_template // Used for mob icon generation for non-32x32 species.
|
||||
var/is_small
|
||||
var/show_ssd = 1
|
||||
var/virus_immune
|
||||
|
||||
// Language/culture vars.
|
||||
var/default_language = "Galactic Common" // Default language is used when 'say' is used without modifiers.
|
||||
@@ -69,7 +70,7 @@
|
||||
var/heat_level_1 = 360 // Heat damage level 1 above this point.
|
||||
var/heat_level_2 = 400 // Heat damage level 2 above this point.
|
||||
var/heat_level_3 = 1000 // Heat damage level 3 above this point.
|
||||
var/synth_temp_gain = 0 // IS_SYNTHETIC species will gain this much temperature every second
|
||||
var/passive_temp_gain = 0 // Species will gain this much temperature every second
|
||||
var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure.
|
||||
var/warning_high_pressure = WARNING_HIGH_PRESSURE // High pressure warning.
|
||||
var/warning_low_pressure = WARNING_LOW_PRESSURE // Low pressure warning.
|
||||
@@ -213,13 +214,6 @@
|
||||
for(var/obj/item/organ/external/O in H.organs)
|
||||
O.owner = H
|
||||
|
||||
if(flags & IS_SYNTHETIC)
|
||||
for(var/obj/item/organ/external/E in H.organs)
|
||||
if(E.status & ORGAN_CUT_AWAY || E.status & ORGAN_DESTROYED) continue
|
||||
E.robotize()
|
||||
for(var/obj/item/organ/I in H.internal_organs)
|
||||
I.robotize()
|
||||
|
||||
/datum/species/proc/hug(var/mob/living/carbon/human/H,var/mob/living/target)
|
||||
|
||||
var/t_him = "them"
|
||||
|
||||
@@ -30,17 +30,17 @@
|
||||
push_flags = MONKEY|SLIME|SIMPLE_ANIMAL
|
||||
|
||||
has_limbs = list(
|
||||
"chest" = list("path" = /obj/item/organ/external/chest/slime),
|
||||
"groin" = list("path" = /obj/item/organ/external/groin/slime),
|
||||
"head" = list("path" = /obj/item/organ/external/head/slime),
|
||||
"l_arm" = list("path" = /obj/item/organ/external/arm/slime),
|
||||
"r_arm" = list("path" = /obj/item/organ/external/arm/right/slime),
|
||||
"l_leg" = list("path" = /obj/item/organ/external/leg/slime),
|
||||
"r_leg" = list("path" = /obj/item/organ/external/leg/right/slime),
|
||||
"l_hand" = list("path" = /obj/item/organ/external/hand/slime),
|
||||
"r_hand" = list("path" = /obj/item/organ/external/hand/right/slime),
|
||||
"l_foot" = list("path" = /obj/item/organ/external/foot/slime),
|
||||
"r_foot" = list("path" = /obj/item/organ/external/foot/right/slime)
|
||||
"chest" = list("path" = /obj/item/organ/external/chest/unbreakable),
|
||||
"groin" = list("path" = /obj/item/organ/external/groin/unbreakable),
|
||||
"head" = list("path" = /obj/item/organ/external/head/unbreakable),
|
||||
"l_arm" = list("path" = /obj/item/organ/external/arm/unbreakable),
|
||||
"r_arm" = list("path" = /obj/item/organ/external/arm/right/unbreakable),
|
||||
"l_leg" = list("path" = /obj/item/organ/external/leg/unbreakable),
|
||||
"r_leg" = list("path" = /obj/item/organ/external/leg/right/unbreakable),
|
||||
"l_hand" = list("path" = /obj/item/organ/external/hand/unbreakable),
|
||||
"r_hand" = list("path" = /obj/item/organ/external/hand/right/unbreakable),
|
||||
"l_foot" = list("path" = /obj/item/organ/external/foot/unbreakable),
|
||||
"r_foot" = list("path" = /obj/item/organ/external/foot/right/unbreakable)
|
||||
)
|
||||
|
||||
/datum/species/slime/handle_death(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
|
||||
body_temperature = T0C + 15 //make the plant people have a bit lower body temperature, why not
|
||||
|
||||
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | IS_PLANT | NO_BLOOD | NO_PAIN | NO_SLIP | REGENERATES_LIMBS
|
||||
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | IS_PLANT | NO_BLOOD | NO_PAIN | NO_SLIP
|
||||
|
||||
blood_color = "#004400"
|
||||
flesh_color = "#907E4A"
|
||||
@@ -237,8 +237,6 @@
|
||||
name = "Machine"
|
||||
name_plural = "machines"
|
||||
|
||||
icobase = 'icons/mob/human_races/r_machine.dmi'
|
||||
deform = 'icons/mob/human_races/r_machine.dmi'
|
||||
language = "Tradeband"
|
||||
unarmed_types = list(/datum/unarmed_attack/punch)
|
||||
rarity_value = 2
|
||||
@@ -254,24 +252,38 @@
|
||||
cold_level_2 = -1
|
||||
cold_level_3 = -1
|
||||
|
||||
heat_level_1 = 500 //gives them about 25 seconds in space before taking damage
|
||||
heat_level_1 = 500 // Gives them about 25 seconds in space before taking damage
|
||||
heat_level_2 = 1000
|
||||
heat_level_3 = 2000
|
||||
|
||||
synth_temp_gain = 10 //this should cause IPCs to stabilize at ~80 C in a 20 C environment.
|
||||
passive_temp_gain = 10 // This should cause IPCs to stabilize at ~80 C in a 20 C environment.
|
||||
siemens_coefficient = 0 // Insulated.
|
||||
|
||||
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | IS_SYNTHETIC
|
||||
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | NO_POISON
|
||||
|
||||
blood_color = "#1F181F"
|
||||
flesh_color = "#575757"
|
||||
virus_immune = 1
|
||||
reagent_tag = IS_MACHINE
|
||||
|
||||
has_organ = list() //TODO: Positronic brain.
|
||||
|
||||
/datum/species/machine/equip_survival_gear(var/mob/living/carbon/human/H)
|
||||
has_limbs = list(
|
||||
"chest" = list("path" = /obj/item/organ/external/chest/ipc),
|
||||
"groin" = list("path" = /obj/item/organ/external/groin/ipc),
|
||||
"head" = list("path" = /obj/item/organ/external/head/ipc),
|
||||
"l_arm" = list("path" = /obj/item/organ/external/arm/ipc),
|
||||
"r_arm" = list("path" = /obj/item/organ/external/arm/right/ipc),
|
||||
"l_leg" = list("path" = /obj/item/organ/external/leg/ipc),
|
||||
"r_leg" = list("path" = /obj/item/organ/external/leg/right/ipc),
|
||||
"l_hand" = list("path" = /obj/item/organ/external/hand/ipc),
|
||||
"r_hand" = list("path" = /obj/item/organ/external/hand/right/ipc),
|
||||
"l_foot" = list("path" = /obj/item/organ/external/foot/ipc),
|
||||
"r_foot" = list("path" = /obj/item/organ/external/foot/right/ipc)
|
||||
)
|
||||
|
||||
/datum/species/machine/handle_death(var/mob/living/carbon/human/H)
|
||||
..()
|
||||
if(flags & IS_SYNTHETIC)
|
||||
H.h_style = ""
|
||||
spawn(100)
|
||||
if(H) H.update_hair()
|
||||
H.h_style = ""
|
||||
spawn(100)
|
||||
if(H) H.update_hair()
|
||||
|
||||
@@ -26,10 +26,7 @@
|
||||
user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1)
|
||||
user.show_message("\blue Body Temperature: ???", 1)
|
||||
return
|
||||
if(!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if(!istype(M, /mob/living/silicon/robot) && !(ishuman(M) && (M:species.flags & IS_SYNTHETIC)))
|
||||
if(!istype(M, /mob/living/silicon/robot)) //todo add limb analysis
|
||||
user << "\red You can't analyze non-robotic things!"
|
||||
return
|
||||
|
||||
@@ -60,19 +57,6 @@
|
||||
if(H.emagged && prob(5))
|
||||
user.show_message("\red \t ERROR: INTERNAL SYSTEMS COMPROMISED",1)
|
||||
|
||||
if (ishuman(M) && (M:species.flags & IS_SYNTHETIC))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/list/damaged = H.get_damaged_organs(1,1)
|
||||
user.show_message("\blue Localized Damage, Brute/Electronics:",1)
|
||||
if(length(damaged)>0)
|
||||
for(var/obj/item/organ/external/org in damaged)
|
||||
user.show_message(text("\blue \t []: [] - []", \
|
||||
capitalize(org.name), \
|
||||
(org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \
|
||||
(org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" :0),1)
|
||||
else
|
||||
user.show_message("\blue \t Components are OK.",1)
|
||||
|
||||
user.show_message("\blue Operating Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1)
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -104,7 +104,11 @@
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/isSynthetic()
|
||||
return species.flags & IS_SYNTHETIC
|
||||
// If they are 100% robotic, they count as synthetic.
|
||||
for(var/obj/item/organ/external/E in organs)
|
||||
if(!(E.status & ORGAN_ROBOT))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/isSynthetic()
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user