Merge branch 'master' into Wheelchairs
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
if(!target.mind)
|
||||
user.visible_message("[target] doesn't respond to the brainwashing, as if [target.p_they()] lacked a mind...")
|
||||
return FALSE
|
||||
if(target.has_trait(TRAIT_MINDSHIELD))
|
||||
if(HAS_TRAIT(target, TRAIT_MINDSHIELD))
|
||||
user.visible_message("You hear a faint buzzing from a device inside [target]'s brain, and the brainwashing is erased.")
|
||||
return FALSE
|
||||
user.visible_message("[user] successfully brainwashes [target]!", "<span class='notice'>You succeed in brainwashing [target].</span>")
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
return FALSE
|
||||
if(target.stat != DEAD)
|
||||
return FALSE
|
||||
if(target.suiciding || target.has_trait(TRAIT_NOCLONE) || target.hellbound)
|
||||
if(target.suiciding || HAS_TRAIT(target, TRAIT_NOCLONE) || target.hellbound)
|
||||
return FALSE
|
||||
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(!B)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
var/body_markings = "" //for bodypart markings
|
||||
var/body_markings_icon = 'modular_citadel/icons/mob/mam_markings.dmi'
|
||||
var/list/markings_color = list()
|
||||
var/auxmarking
|
||||
var/auxmarking = ""
|
||||
var/list/auxmarking_color = list()
|
||||
|
||||
var/animal_origin = null //for nonhuman bodypart (e.g. monkey)
|
||||
@@ -88,7 +88,7 @@
|
||||
/obj/item/bodypart/attack(mob/living/carbon/C, mob/user)
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(C.has_trait(TRAIT_LIMBATTACHMENT))
|
||||
if(HAS_TRAIT(C, TRAIT_LIMBATTACHMENT))
|
||||
if(!H.get_bodypart(body_zone) && !animal_origin)
|
||||
if(H == user)
|
||||
H.visible_message("<span class='warning'>[H] jams [src] into [H.p_their()] empty socket!</span>",\
|
||||
@@ -220,6 +220,7 @@
|
||||
return total
|
||||
|
||||
//Checks disabled status thresholds
|
||||
|
||||
//Checks disabled status thresholds
|
||||
/obj/item/bodypart/proc/update_disabled()
|
||||
set_disabled(is_disabled())
|
||||
@@ -227,7 +228,7 @@
|
||||
/obj/item/bodypart/proc/is_disabled()
|
||||
if(owner.has_trait(TRAIT_PARALYSIS))
|
||||
return BODYPART_DISABLED_PARALYSIS
|
||||
if(can_dismember() && !owner.has_trait(TRAIT_NODISMEMBER))
|
||||
if(can_dismember() && !HAS_TRAIT(owner, TRAIT_NODISMEMBER))
|
||||
. = disabled //inertia, to avoid limbs healing 0.1 damage and being re-enabled
|
||||
if((get_damage(TRUE) >= max_damage))
|
||||
return BODYPART_DISABLED_DAMAGE
|
||||
@@ -236,6 +237,15 @@
|
||||
else
|
||||
return BODYPART_NOT_DISABLED
|
||||
|
||||
/obj/item/bodypart/proc/check_disabled() //This might be depreciated and should be safe to remove.
|
||||
if(!can_dismember() || HAS_TRAIT(owner, TRAIT_NODISMEMBER))
|
||||
return
|
||||
if(!disabled && (get_damage(TRUE) >= max_damage))
|
||||
set_disabled(TRUE)
|
||||
else if(disabled && (get_damage(TRUE) <= (max_damage * 0.5)))
|
||||
set_disabled(FALSE)
|
||||
|
||||
|
||||
/obj/item/bodypart/proc/set_disabled(new_disabled)
|
||||
if(disabled == new_disabled)
|
||||
return
|
||||
@@ -269,7 +279,6 @@
|
||||
icon = DEFAULT_BODYPART_ICON_ORGANIC
|
||||
else if(status == BODYPART_ROBOTIC)
|
||||
icon = DEFAULT_BODYPART_ICON_ROBOTIC
|
||||
body_markings = null
|
||||
|
||||
if(owner)
|
||||
owner.updatehealth()
|
||||
@@ -293,13 +302,14 @@
|
||||
C = owner
|
||||
no_update = FALSE
|
||||
|
||||
if(C.has_trait(TRAIT_HUSK) && is_organic_limb())
|
||||
if(HAS_TRAIT(C, TRAIT_HUSK) && is_organic_limb())
|
||||
species_id = "husk" //overrides species_id
|
||||
dmg_overlay_type = "" //no damage overlay shown when husked
|
||||
should_draw_gender = FALSE
|
||||
should_draw_greyscale = FALSE
|
||||
no_update = TRUE
|
||||
body_markings = "husk" // reeee
|
||||
auxmarking = "husk"
|
||||
|
||||
if(no_update)
|
||||
return
|
||||
@@ -344,17 +354,18 @@
|
||||
if("mam_body_markings" in S.default_features)
|
||||
var/datum/sprite_accessory/Smark
|
||||
Smark = GLOB.mam_body_markings_list[H.dna.features["mam_body_markings"]]
|
||||
body_markings_icon = Smark.icon
|
||||
if(H.dna.features.["mam_body_markings"] != "None")
|
||||
body_markings_icon = Smark.icon
|
||||
body_markings = lowertext(H.dna.features.["mam_body_markings"])
|
||||
if(MATRIXED)
|
||||
markings_color = list(colorlist)
|
||||
auxmarking = lowertext(H.dna.features.["mam_body_markings"])
|
||||
else
|
||||
body_markings = "plain"
|
||||
markings_color = (H.dna.features.["mcolor"])
|
||||
auxmarking = "plain"
|
||||
markings_color = list(colorlist)
|
||||
|
||||
else
|
||||
body_markings = null
|
||||
markings_color = ""
|
||||
auxmarking = null
|
||||
|
||||
if(!dropping_limb && H.dna.check_mutation(HULK))
|
||||
mutation_color = "00aa00"
|
||||
@@ -369,6 +380,7 @@
|
||||
if(status == BODYPART_ROBOTIC)
|
||||
dmg_overlay_type = "robotic"
|
||||
body_markings = null
|
||||
auxmarking = null
|
||||
|
||||
if(dropping_limb)
|
||||
no_update = TRUE //when attached, the limb won't be affected by the appearance changes of its mob owner.
|
||||
@@ -402,7 +414,8 @@
|
||||
. += image('icons/mob/dam_mob.dmi', "[dmg_overlay_type]_[body_zone]_[brutestate]0", -DAMAGE_LAYER, image_dir)
|
||||
if(burnstate)
|
||||
. += image('icons/mob/dam_mob.dmi', "[dmg_overlay_type]_[body_zone]_0[burnstate]", -DAMAGE_LAYER, image_dir)
|
||||
if(body_markings && status != BODYPART_ROBOTIC)
|
||||
|
||||
if(!isnull(body_markings) && status == BODYPART_ORGANIC)
|
||||
if(!use_digitigrade)
|
||||
if(BODY_ZONE_CHEST)
|
||||
. += image(body_markings_icon, "[body_markings]_[body_zone]_[icon_gender]", -MARKING_LAYER, image_dir)
|
||||
@@ -458,7 +471,7 @@
|
||||
limb.icon_state = "[species_id]_[body_zone]"
|
||||
|
||||
// Body markings
|
||||
if(body_markings)
|
||||
if(!isnull(body_markings))
|
||||
if(species_id == "husk")
|
||||
marking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[body_zone]", -MARKING_LAYER, image_dir)
|
||||
else if(species_id == "husk" && use_digitigrade)
|
||||
@@ -478,7 +491,7 @@
|
||||
if(aux_zone)
|
||||
aux = image(limb.icon, "[species_id]_[aux_zone]", -aux_layer, image_dir)
|
||||
. += aux
|
||||
if(body_markings)
|
||||
if(!isnull(auxmarking))
|
||||
if(species_id == "husk")
|
||||
auxmarking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[aux_zone]", -aux_layer, image_dir)
|
||||
else
|
||||
@@ -491,17 +504,18 @@
|
||||
limb.icon_state = "[body_zone]_[icon_gender]"
|
||||
else
|
||||
limb.icon_state = "[body_zone]"
|
||||
|
||||
if(aux_zone)
|
||||
aux = image(limb.icon, "[species_id]_[aux_zone]", -aux_layer, image_dir)
|
||||
aux = image(limb.icon, "[aux_zone]", -aux_layer, image_dir)
|
||||
. += aux
|
||||
if(body_markings)
|
||||
if(!isnull(auxmarking))
|
||||
if(species_id == "husk")
|
||||
auxmarking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[aux_zone]", -aux_layer, image_dir)
|
||||
else
|
||||
auxmarking = image(body_markings_icon, "[body_markings]_[aux_zone]", -aux_layer, image_dir)
|
||||
. += auxmarking
|
||||
|
||||
if(body_markings)
|
||||
if(!isnull(body_markings))
|
||||
if(species_id == "husk")
|
||||
marking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[body_zone]", -MARKING_LAYER, image_dir)
|
||||
else if(species_id == "husk" && use_digitigrade)
|
||||
@@ -517,17 +531,16 @@
|
||||
. += marking
|
||||
return
|
||||
|
||||
|
||||
if(should_draw_greyscale)
|
||||
var/draw_color = mutation_color || species_color || (skin_tone && skintone2hex(skin_tone))
|
||||
if(draw_color)
|
||||
limb.color = "#[draw_color]"
|
||||
if(aux_zone)
|
||||
aux.color = "#[draw_color]"
|
||||
if(body_markings)
|
||||
if(!isnull(auxmarking))
|
||||
auxmarking.color = list(markings_color)
|
||||
|
||||
if(body_markings)
|
||||
if(!isnull(body_markings))
|
||||
if(species_id == "husk")
|
||||
marking.color = "#141414"
|
||||
else
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
return FALSE
|
||||
if(C.status_flags & GODMODE)
|
||||
return FALSE
|
||||
if(C.has_trait(TRAIT_NODISMEMBER))
|
||||
if(HAS_TRAIT(C, TRAIT_NODISMEMBER))
|
||||
return FALSE
|
||||
|
||||
var/obj/item/bodypart/affecting = C.get_bodypart(BODY_ZONE_CHEST)
|
||||
@@ -47,7 +47,7 @@
|
||||
var/mob/living/carbon/C = owner
|
||||
if(!dismemberable)
|
||||
return FALSE
|
||||
if(C.has_trait(TRAIT_NODISMEMBER))
|
||||
if(HAS_TRAIT(C, TRAIT_NODISMEMBER))
|
||||
return FALSE
|
||||
. = list()
|
||||
var/organ_spilled = 0
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
C = owner
|
||||
|
||||
real_name = C.real_name
|
||||
if(C.has_trait(TRAIT_HUSK))
|
||||
if(HAS_TRAIT(C, TRAIT_HUSK))
|
||||
real_name = "Unknown"
|
||||
hair_style = "Bald"
|
||||
facial_hair_style = "Shaved"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
possible_locs = list(BODY_ZONE_CHEST)
|
||||
|
||||
/datum/surgery/lipoplasty/can_start(mob/user, mob/living/carbon/target)
|
||||
if(target.has_trait(TRAIT_FAT))
|
||||
if(HAS_TRAIT(target, TRAIT_FAT))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -98,3 +98,8 @@
|
||||
|
||||
/obj/item/autosurgeon/reviver
|
||||
starting_organ = /obj/item/organ/cyberimp/chest/reviver
|
||||
|
||||
/obj/item/autosurgeon/penis
|
||||
desc = "A single use autosurgeon that contains a penis. A screwdriver can be used to remove it, but implants can't be placed back in."
|
||||
uses = 1
|
||||
starting_organ = /obj/item/organ/genital/penis
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
return
|
||||
var/mob/living/carbon/C = owner
|
||||
// genetic deafness prevents the body from using the ears, even if healthy
|
||||
if(C.has_trait(TRAIT_DEAF))
|
||||
if(HAS_TRAIT(C, TRAIT_DEAF))
|
||||
deaf = max(deaf, 1)
|
||||
else if(ear_damage < UNHEALING_EAR_DAMAGE) // if higher than UNHEALING_EAR_DAMAGE, no natural healing occurs.
|
||||
ear_damage = max(ear_damage - 0.05, 0)
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
var/mob/living/carbon/C = owner
|
||||
|
||||
if(iscarbon(owner) && C.has_trait(TRAIT_DEAF))
|
||||
if(iscarbon(owner) && HAS_TRAIT(C, TRAIT_DEAF))
|
||||
deaf = 1
|
||||
|
||||
/obj/item/organ/ears/proc/adjustEarDamage(ddmg, ddeaf)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
HMN.regenerate_icons()
|
||||
else
|
||||
eye_color = HMN.eye_color
|
||||
if(HMN.has_trait(TRAIT_NIGHT_VISION) && !lighting_alpha)
|
||||
if(HAS_TRAIT(HMN, TRAIT_NIGHT_VISION) && !lighting_alpha)
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_NV_TRAIT
|
||||
see_in_dark = 8
|
||||
M.update_tint()
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//slowly heal liver damage
|
||||
damage = max(0, damage - 0.1)
|
||||
|
||||
if(filterToxins && !owner.has_trait(TRAIT_TOXINLOVER))
|
||||
if(filterToxins && !HAS_TRAIT(owner, TRAIT_TOXINLOVER))
|
||||
//handle liver toxin filtration
|
||||
for(var/I in C.reagents.reagent_list)
|
||||
var/datum/reagent/pickedreagent = I
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
/obj/item/organ/lungs/proc/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
|
||||
if((H.status_flags & GODMODE))
|
||||
return
|
||||
if(H.has_trait(TRAIT_NOBREATH))
|
||||
if(HAS_TRAIT(H, TRAIT_NOBREATH))
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles() == 0))
|
||||
@@ -66,7 +66,7 @@
|
||||
return
|
||||
if(H.health >= H.crit_threshold)
|
||||
H.adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
else if(!H.has_trait(TRAIT_NOCRITDAMAGE))
|
||||
else if(!HAS_TRAIT(H, TRAIT_NOCRITDAMAGE))
|
||||
H.adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
|
||||
|
||||
H.failed_last_breath = TRUE
|
||||
@@ -84,13 +84,11 @@
|
||||
|
||||
var/list/breath_gases = breath.gases
|
||||
|
||||
breath.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz, /datum/gas/nitrogen, /datum/gas/tritium, /datum/gas/nitryl, /datum/gas/pluoxium, /datum/gas/stimulum)
|
||||
|
||||
//Partial pressures in our breath
|
||||
var/O2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen][MOLES])+(8*breath.get_breath_partial_pressure(breath_gases[/datum/gas/pluoxium][MOLES]))
|
||||
var/N2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrogen][MOLES])
|
||||
var/Toxins_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/plasma][MOLES])
|
||||
var/CO2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/carbon_dioxide][MOLES])
|
||||
var/O2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen])+(8*breath.get_breath_partial_pressure(breath_gases[/datum/gas/pluoxium]))
|
||||
var/N2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrogen])
|
||||
var/Toxins_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/plasma])
|
||||
var/CO2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/carbon_dioxide])
|
||||
|
||||
|
||||
//-- OXY --//
|
||||
@@ -98,7 +96,7 @@
|
||||
//Too much oxygen! //Yes, some species may not like it.
|
||||
if(safe_oxygen_max)
|
||||
if((O2_pp > safe_oxygen_max) && safe_oxygen_max == 0) //I guess plasma men technically need to have a check.
|
||||
var/ratio = (breath_gases[/datum/gas/oxygen][MOLES]/safe_oxygen_max) * 10
|
||||
var/ratio = (breath_gases[/datum/gas/oxygen]/safe_oxygen_max) * 10
|
||||
H.apply_damage_type(CLAMP(ratio, oxy_breath_dam_min, oxy_breath_dam_max), oxy_damage_type)
|
||||
H.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy)
|
||||
|
||||
@@ -121,18 +119,18 @@
|
||||
//Too little oxygen!
|
||||
if(safe_oxygen_min)
|
||||
if(O2_pp < safe_oxygen_min)
|
||||
gas_breathed = handle_too_little_breath(H, O2_pp, safe_oxygen_min, breath_gases[/datum/gas/oxygen][MOLES])
|
||||
gas_breathed = handle_too_little_breath(H, O2_pp, safe_oxygen_min, breath_gases[/datum/gas/oxygen])
|
||||
H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
|
||||
else
|
||||
H.failed_last_breath = FALSE
|
||||
if(H.health >= H.crit_threshold)
|
||||
H.adjustOxyLoss(-5)
|
||||
gas_breathed = breath_gases[/datum/gas/oxygen][MOLES]
|
||||
gas_breathed = breath_gases[/datum/gas/oxygen]
|
||||
H.clear_alert("not_enough_oxy")
|
||||
|
||||
//Exhale
|
||||
breath_gases[/datum/gas/oxygen][MOLES] -= gas_breathed
|
||||
breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed
|
||||
breath_gases[/datum/gas/oxygen] -= gas_breathed
|
||||
breath_gases[/datum/gas/carbon_dioxide] += gas_breathed
|
||||
gas_breathed = 0
|
||||
|
||||
//-- Nitrogen --//
|
||||
@@ -140,7 +138,7 @@
|
||||
//Too much nitrogen!
|
||||
if(safe_nitro_max)
|
||||
if(N2_pp > safe_nitro_max)
|
||||
var/ratio = (breath_gases[/datum/gas/nitrogen][MOLES]/safe_nitro_max) * 10
|
||||
var/ratio = (breath_gases[/datum/gas/nitrogen]/safe_nitro_max) * 10
|
||||
H.apply_damage_type(CLAMP(ratio, nitro_breath_dam_min, nitro_breath_dam_max), nitro_damage_type)
|
||||
H.throw_alert("too_much_nitro", /obj/screen/alert/too_much_nitro)
|
||||
H.losebreath += 2
|
||||
@@ -150,18 +148,18 @@
|
||||
//Too little nitrogen!
|
||||
if(safe_nitro_min)
|
||||
if(N2_pp < safe_nitro_min)
|
||||
gas_breathed = handle_too_little_breath(H, N2_pp, safe_nitro_min, breath_gases[/datum/gas/nitrogen][MOLES])
|
||||
gas_breathed = handle_too_little_breath(H, N2_pp, safe_nitro_min, breath_gases[/datum/gas/nitrogen])
|
||||
H.throw_alert("nitro", /obj/screen/alert/not_enough_nitro)
|
||||
else
|
||||
H.failed_last_breath = FALSE
|
||||
if(H.health >= H.crit_threshold)
|
||||
H.adjustOxyLoss(-5)
|
||||
gas_breathed = breath_gases[/datum/gas/nitrogen][MOLES]
|
||||
gas_breathed = breath_gases[/datum/gas/nitrogen]
|
||||
H.clear_alert("nitro")
|
||||
|
||||
//Exhale
|
||||
breath_gases[/datum/gas/nitrogen][MOLES] -= gas_breathed
|
||||
breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed
|
||||
breath_gases[/datum/gas/nitrogen] -= gas_breathed
|
||||
breath_gases[/datum/gas/carbon_dioxide] += gas_breathed
|
||||
gas_breathed = 0
|
||||
|
||||
//-- CO2 --//
|
||||
@@ -187,18 +185,18 @@
|
||||
//Too little CO2!
|
||||
if(safe_co2_min)
|
||||
if(CO2_pp < safe_co2_min)
|
||||
gas_breathed = handle_too_little_breath(H, CO2_pp, safe_co2_min, breath_gases[/datum/gas/carbon_dioxide][MOLES])
|
||||
gas_breathed = handle_too_little_breath(H, CO2_pp, safe_co2_min, breath_gases[/datum/gas/carbon_dioxide])
|
||||
H.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
|
||||
else
|
||||
H.failed_last_breath = FALSE
|
||||
if(H.health >= H.crit_threshold)
|
||||
H.adjustOxyLoss(-5)
|
||||
gas_breathed = breath_gases[/datum/gas/carbon_dioxide][MOLES]
|
||||
gas_breathed = breath_gases[/datum/gas/carbon_dioxide]
|
||||
H.clear_alert("not_enough_co2")
|
||||
|
||||
//Exhale
|
||||
breath_gases[/datum/gas/carbon_dioxide][MOLES] -= gas_breathed
|
||||
breath_gases[/datum/gas/oxygen][MOLES] += gas_breathed
|
||||
breath_gases[/datum/gas/carbon_dioxide] -= gas_breathed
|
||||
breath_gases[/datum/gas/oxygen] += gas_breathed
|
||||
gas_breathed = 0
|
||||
|
||||
|
||||
@@ -207,7 +205,7 @@
|
||||
//Too much toxins!
|
||||
if(safe_toxins_max)
|
||||
if(Toxins_pp > safe_toxins_max)
|
||||
var/ratio = (breath_gases[/datum/gas/plasma][MOLES]/safe_toxins_max) * 10
|
||||
var/ratio = (breath_gases[/datum/gas/plasma]/safe_toxins_max) * 10
|
||||
H.apply_damage_type(CLAMP(ratio, tox_breath_dam_min, tox_breath_dam_max), tox_damage_type)
|
||||
H.throw_alert("too_much_tox", /obj/screen/alert/too_much_tox)
|
||||
else
|
||||
@@ -217,18 +215,18 @@
|
||||
//Too little toxins!
|
||||
if(safe_toxins_min)
|
||||
if(Toxins_pp < safe_toxins_min)
|
||||
gas_breathed = handle_too_little_breath(H, Toxins_pp, safe_toxins_min, breath_gases[/datum/gas/plasma][MOLES])
|
||||
gas_breathed = handle_too_little_breath(H, Toxins_pp, safe_toxins_min, breath_gases[/datum/gas/plasma])
|
||||
H.throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
|
||||
else
|
||||
H.failed_last_breath = FALSE
|
||||
if(H.health >= H.crit_threshold)
|
||||
H.adjustOxyLoss(-5)
|
||||
gas_breathed = breath_gases[/datum/gas/plasma][MOLES]
|
||||
gas_breathed = breath_gases[/datum/gas/plasma]
|
||||
H.clear_alert("not_enough_tox")
|
||||
|
||||
//Exhale
|
||||
breath_gases[/datum/gas/plasma][MOLES] -= gas_breathed
|
||||
breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed
|
||||
breath_gases[/datum/gas/plasma] -= gas_breathed
|
||||
breath_gases[/datum/gas/carbon_dioxide] += gas_breathed
|
||||
gas_breathed = 0
|
||||
|
||||
|
||||
@@ -238,7 +236,7 @@
|
||||
|
||||
// N2O
|
||||
|
||||
var/SA_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrous_oxide][MOLES])
|
||||
var/SA_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrous_oxide])
|
||||
if(SA_pp > SA_para_min) // Enough to make us stunned for a bit
|
||||
H.Unconscious(60) // 60 gives them one second to wake up and run away a bit!
|
||||
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
|
||||
@@ -249,7 +247,7 @@
|
||||
|
||||
// BZ
|
||||
|
||||
var/bz_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/bz][MOLES])
|
||||
var/bz_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/bz])
|
||||
if(bz_pp > BZ_trip_balls_min)
|
||||
H.hallucination += 10
|
||||
H.reagents.add_reagent("bz_metabolites",5)
|
||||
@@ -262,14 +260,14 @@
|
||||
|
||||
|
||||
// Tritium
|
||||
var/trit_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/tritium][MOLES])
|
||||
var/trit_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/tritium])
|
||||
if (trit_pp > 50)
|
||||
H.radiation += trit_pp/2 //If you're breathing in half an atmosphere of radioactive gas, you fucked up.
|
||||
else
|
||||
H.radiation += trit_pp/10
|
||||
|
||||
// Nitryl
|
||||
var/nitryl_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitryl][MOLES])
|
||||
var/nitryl_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitryl])
|
||||
if (prob(nitryl_pp))
|
||||
to_chat(H, "<span class='alert'>Your mouth feels like it's burning!</span>")
|
||||
if (nitryl_pp >40)
|
||||
@@ -280,22 +278,22 @@
|
||||
H.silent = max(H.silent, 3)
|
||||
else
|
||||
H.adjustFireLoss(nitryl_pp/4)
|
||||
gas_breathed = breath_gases[/datum/gas/nitryl][MOLES]
|
||||
gas_breathed = breath_gases[/datum/gas/nitryl]
|
||||
if (gas_breathed > gas_stimulation_min)
|
||||
H.reagents.add_reagent("no2",1)
|
||||
|
||||
breath_gases[/datum/gas/nitryl][MOLES]-=gas_breathed
|
||||
breath_gases[/datum/gas/nitryl]-=gas_breathed
|
||||
|
||||
// Stimulum
|
||||
gas_breathed = breath_gases[/datum/gas/stimulum][MOLES]
|
||||
gas_breathed = breath_gases[/datum/gas/stimulum]
|
||||
if (gas_breathed > gas_stimulation_min)
|
||||
var/existing = H.reagents.get_reagent_amount("stimulum")
|
||||
H.reagents.add_reagent("stimulum",max(0, 1 - existing))
|
||||
breath_gases[/datum/gas/stimulum][MOLES]-=gas_breathed
|
||||
breath_gases[/datum/gas/stimulum]-=gas_breathed
|
||||
|
||||
// Miasma
|
||||
if (breath_gases[/datum/gas/miasma])
|
||||
var/miasma_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/miasma][MOLES])
|
||||
var/miasma_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/miasma])
|
||||
|
||||
//Miasma sickness
|
||||
if(prob(0.5 * miasma_pp))
|
||||
@@ -334,14 +332,14 @@
|
||||
// Then again, this is a purely hypothetical scenario and hardly reachable
|
||||
owner.adjust_disgust(0.1 * miasma_pp)
|
||||
|
||||
breath_gases[/datum/gas/miasma][MOLES]-=gas_breathed
|
||||
breath_gases[/datum/gas/miasma]-=gas_breathed
|
||||
|
||||
// Clear out moods when no miasma at all
|
||||
else
|
||||
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "smell")
|
||||
|
||||
handle_breath_temperature(breath, H)
|
||||
breath.garbage_collect()
|
||||
GAS_GARBAGE_COLLECT(breath.gases)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -365,7 +363,7 @@
|
||||
/obj/item/organ/lungs/proc/handle_breath_temperature(datum/gas_mixture/breath, mob/living/carbon/human/H) // called by human/life, handles temperatures
|
||||
var/breath_temperature = breath.temperature
|
||||
|
||||
if(!H.has_trait(TRAIT_RESISTCOLD)) // COLD DAMAGE
|
||||
if(!HAS_TRAIT(H, TRAIT_RESISTCOLD)) // COLD DAMAGE
|
||||
var/cold_modifier = H.dna.species.coldmod
|
||||
if(breath_temperature < cold_level_3_threshold)
|
||||
H.apply_damage_type(cold_level_3_damage*cold_modifier, cold_damage_type)
|
||||
@@ -377,7 +375,7 @@
|
||||
if(prob(20))
|
||||
to_chat(H, "<span class='warning'>You feel [cold_message] in your [name]!</span>")
|
||||
|
||||
if(!H.has_trait(TRAIT_RESISTHEAT)) // HEAT DAMAGE
|
||||
if(!HAS_TRAIT(H, TRAIT_RESISTHEAT)) // HEAT DAMAGE
|
||||
var/heat_modifier = H.dna.species.heatmod
|
||||
if(breath_temperature > heat_level_1_threshold && breath_temperature < heat_level_2_threshold)
|
||||
H.apply_damage_type(heat_level_1_damage*heat_modifier, heat_damage_type)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
var/breathes = TRUE
|
||||
var/blooded = TRUE
|
||||
if(dna && dna.species)
|
||||
if(has_trait(TRAIT_NOBREATH, SPECIES_TRAIT))
|
||||
if(HAS_TRAIT_FROM(src, TRAIT_NOBREATH, SPECIES_TRAIT))
|
||||
breathes = FALSE
|
||||
if(NOBLOOD in dna.species.species_traits)
|
||||
blooded = FALSE
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
/datum/language/beachbum,
|
||||
/datum/language/ratvar,
|
||||
/datum/language/aphasia,
|
||||
/datum/language/slime,
|
||||
))
|
||||
|
||||
/obj/item/organ/tongue/Initialize(mapload)
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
user.visible_message("[user] begins to alter [target]'s appearance.", "<span class='notice'>You begin to alter [target]'s appearance...</span>")
|
||||
|
||||
/datum/surgery_step/reshape_face/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if(target.has_trait(TRAIT_DISFIGURED, TRAIT_GENERIC))
|
||||
target.remove_trait(TRAIT_DISFIGURED, TRAIT_GENERIC)
|
||||
if(HAS_TRAIT_FROM(target, TRAIT_DISFIGURED, TRAIT_GENERIC))
|
||||
REMOVE_TRAIT(target, TRAIT_DISFIGURED, TRAIT_GENERIC)
|
||||
user.visible_message("[user] successfully restores [target]'s appearance!", "<span class='notice'>You successfully restore [target]'s appearance.</span>")
|
||||
else
|
||||
var/list/names = list()
|
||||
|
||||
Reference in New Issue
Block a user