Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into DisMemberments

This commit is contained in:
Aurorablade
2018-02-08 02:31:44 -05:00
784 changed files with 20471 additions and 10727 deletions
+2 -2
View File
@@ -101,7 +101,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='warning'> [user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</span>" , \
"<span class='warning'> Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</span>")
affected.take_damage(5)
affected.receive_damage(5)
return 0
/datum/surgery_step/mend_skull
@@ -135,7 +135,7 @@
user.visible_message("<span class='warning'>[user]'s hand slips, damaging [target]'s face with \the [tool]!</span>" , \
"<span class='warning'>Your hand slips, damaging [target]'s face with \the [tool]!</span>")
var/obj/item/organ/external/head/h = affected
h.take_damage(10)
h.receive_damage(10)
h.disfigured = 1
return 0
+1 -1
View File
@@ -62,7 +62,7 @@
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("<span class='warning'> [user]'s hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='warning'> Your hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!</span>")
affected.take_damage(20)
affected.receive_damage(20)
/datum/surgery_step/cavity/make_space
name = "make cavity space"
+3 -3
View File
@@ -61,7 +61,7 @@
user.visible_message("<span class='warning'> [user]'s hand slips, cracking [target]'s [affected.encased] with \the [tool]!</span>" , \
"<span class='warning'> Your hand slips, cracking [target]'s [affected.encased] with \the [tool]!</span>" )
affected.take_damage(20)
affected.receive_damage(20)
affected.fracture()
return 0
@@ -113,7 +113,7 @@
var/self_msg = "<span class='warning'> Your hand slips, cracking [target]'s [affected.encased]!</span>"
user.visible_message(msg, self_msg)
affected.take_damage(20)
affected.receive_damage(20)
affected.fracture()
return 0
@@ -164,7 +164,7 @@
var/self_msg = "<span class='warning'> Your hand slips, bending [target]'s [affected.encased] the wrong way!</span>"
user.visible_message(msg, self_msg)
affected.take_damage(20)
affected.receive_damage(20)
affected.fracture()
return 0
+1 -1
View File
@@ -50,7 +50,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='warning'> [user]'s hand slips, slicing [target]'s throat wth \the [tool]!</span>" , \
"<span class='warning'> Your hand slips, slicing [target]'s throat wth \the [tool]!</span>" )
affected.take_damage(60)
affected.receive_damage(60)
target.AdjustLoseBreath(4)
return 0
+3 -3
View File
@@ -51,7 +51,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='warning'> [user]'s hand slips, slicing open [target]'s [affected.name] in a wrong spot with \the [tool]!</span>", \
"<span class='warning'> Your hand slips, slicing open [target]'s [affected.name] in a wrong spot with \the [tool]!</span>")
affected.take_damage(10)
affected.receive_damage(10)
return 0
/datum/surgery_step/generic/clamp_bleeders
@@ -85,7 +85,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='warning'> [user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='warning'> Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.name] with \the [tool]!</span>",)
affected.take_damage(10)
affected.receive_damage(10)
return 0
/datum/surgery_step/generic/retract_skin
@@ -238,6 +238,6 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='warning'> [user]'s hand slips, sawing through the bone in [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='warning'> Your hand slips, sawwing through the bone in [target]'s [affected.name] with \the [tool]!</span>")
affected.take_damage(30)
affected.receive_damage(30)
affected.fracture()
return 0
+8 -2
View File
@@ -53,7 +53,9 @@
/obj/item/organ/internal/cyberimp/arm/emag_act()
return 0
/obj/item/organ/internal/cyberimp/arm/gun/emp_act(severity)
/obj/item/organ/internal/cyberimp/arm/emp_act(severity)
if(emp_proof)
return
if(prob(15/severity) && owner)
to_chat(owner, "<span class='warning'>[src] is hit by EMP!</span>")
// give the owner an idea about why his implant is glitching
@@ -141,6 +143,8 @@
/obj/item/organ/internal/cyberimp/arm/gun/emp_act(severity)
if(emp_proof)
return
if(prob(30/severity) && owner && !crit_fail)
Retract()
owner.visible_message("<span class='danger'>A loud bang comes from [owner]\'s [parent_organ == "r_arm" ? "right" : "left"] arm!</span>")
@@ -251,6 +255,8 @@
/obj/item/organ/internal/cyberimp/arm/power_cord/emp_act(severity)
// To allow repair via nanopaste/screwdriver
// also so IPCs don't also catch on fire and fall even more apart upon EMP
if(emp_proof)
return
damage = 1
crit_fail = TRUE
@@ -275,7 +281,7 @@
var/mob/living/carbon/human/H = user
if(H.get_int_organ(/obj/item/organ/internal/cell))
if(A.emagged || A.stat & BROKEN)
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, A)
s.start()
to_chat(H, "<span class='warning'>The APC power currents surge erratically, damaging your chassis!</span>")
+1 -1
View File
@@ -27,7 +27,7 @@
M.update_sight()
/obj/item/organ/internal/cyberimp/eyes/emp_act(severity)
if(!owner)
if(!owner || emp_proof)
return
if(severity > 1)
if(prob(10 * severity))
@@ -30,7 +30,7 @@
parent_organ = "head"
/obj/item/organ/internal/cyberimp/brain/emp_act(severity)
if(!owner)
if(!owner || emp_proof)
return
var/stun_amount = 5 + (severity-1 ? 0 : 5)
owner.Stun(stun_amount)
@@ -91,7 +91,7 @@
r_hand_obj = null
/obj/item/organ/internal/cyberimp/brain/anti_drop/emp_act(severity)
if(!owner)
if(!owner || emp_proof)
return
var/range = severity ? 10 : 5
var/atom/A
@@ -138,7 +138,7 @@
owner.SetWeakened(STUN_SET_AMOUNT)
/obj/item/organ/internal/cyberimp/brain/anti_stun/emp_act(severity)
if(crit_fail)
if(crit_fail || emp_proof)
return
crit_fail = 1
spawn(90 / severity)
@@ -158,6 +158,8 @@
origin_tech = "materials=2;biotech=3"
/obj/item/organ/internal/cyberimp/mouth/breathing_tube/emp_act(severity)
if(emp_proof)
return
if(prob(60/severity) && owner)
to_chat(owner, "<span class='warning'>Your breathing tube suddenly closes!</span>")
owner.AdjustLoseBreath(2)
@@ -203,7 +205,7 @@
synthesizing = 0
/obj/item/organ/internal/cyberimp/chest/nutriment/emp_act(severity)
if(!owner)
if(!owner || emp_proof)
return
owner.reagents.add_reagent("????",poison_amount / severity) //food poisoning
to_chat(owner, "<span class='warning'>You feel like your insides are burning.</span>")
@@ -258,13 +260,13 @@
reviving = 1
/obj/item/organ/internal/cyberimp/chest/reviver/emp_act(severity)
if(!owner)
if(!owner || emp_proof)
return
if(reviving)
revive_cost += 200
else
cooldown += 200
if(istype(owner, /mob/living/carbon/human))
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
if(H.stat != DEAD && prob(50 / severity))
H.set_heartattack(TRUE)
+43 -11
View File
@@ -229,7 +229,7 @@
return list("O-", "O+")
//to add a splatter of blood or other mob liquid.
/mob/living/proc/add_splatter_floor(turf/T, small_drip)
/mob/living/proc/add_splatter_floor(turf/T, small_drip, shift_x, shift_y)
if(get_blood_id() != "blood")//is it blood or welding fuel?
return
if(!T)
@@ -260,29 +260,61 @@
return
// Find a blood decal or create a new one.
var/obj/effect/decal/cleanable/blood/B = locate() in T
var/obj/effect/decal/cleanable/blood/splatter/B = locate() in T
var/list/bloods = get_atoms_of_type(T, B, TRUE, 0, 0) //Get all the non-projectile-splattered blood on this turf (not pixel-shifted).
if(shift_x || shift_y)
bloods = get_atoms_of_type(T, B, TRUE, shift_x, shift_y) //Get all the projectile-splattered blood at these pixels on this turf (pixel-shifted).
B = locate() in bloods
if(!B)
B = new /obj/effect/decal/cleanable/blood/splatter(T)
B = new(T)
B.transfer_mob_blood_dna(src) //give blood info to the blood decal.
if(temp_blood_DNA)
B.blood_DNA |= temp_blood_DNA
B.pixel_x = (shift_x)
B.pixel_y = (shift_y)
B.update_icon()
if(shift_x || shift_y)
B.off_floor = TRUE
B.layer = BELOW_MOB_LAYER //So the blood lands ontop of things like posters, windows, etc.
/mob/living/carbon/human/add_splatter_floor(turf/T, small_drip)
/mob/living/carbon/human/add_splatter_floor(turf/T, small_drip, shift_x, shift_y)
if(!(NO_BLOOD in species.species_traits))
..()
/mob/living/carbon/alien/add_splatter_floor(turf/T, small_drip)
/mob/living/carbon/alien/add_splatter_floor(turf/T, small_drip, shift_x, shift_y)
if(!T)
T = get_turf(src)
var/obj/effect/decal/cleanable/blood/xeno/B = locate() in T.contents
var/obj/effect/decal/cleanable/blood/xeno/splatter/B = locate() in T
var/list/bloods = get_atoms_of_type(T, B, TRUE, 0, 0) //The more the better.
if(shift_x || shift_y)
bloods = get_atoms_of_type(T, B, TRUE, shift_x, shift_y)
B = locate() in bloods
if(!B)
B = new(T)
B.blood_DNA["UNKNOWN DNA"] = "X*"
/mob/living/silicon/robot/add_splatter_floor(turf/T, small_drip)
B.blood_DNA["UNKNOWN DNA"] = "X*"
B.pixel_x = (shift_x)
B.pixel_y = (shift_y)
if(shift_x || shift_y)
B.off_floor = TRUE
B.layer = BELOW_MOB_LAYER
/mob/living/silicon/robot/add_splatter_floor(turf/T, small_drip, shift_x, shift_y)
if(!T)
T = get_turf(src)
var/obj/effect/decal/cleanable/blood/oil/B = locate() in T.contents
if(!B)
B = new(T)
var/obj/effect/decal/cleanable/blood/oil/streak/O = locate() in T
var/list/oils = get_atoms_of_type(T, O, TRUE, 0, 0) //Don't let OSHA catch wind of this.
if(shift_x || shift_y)
oils = get_atoms_of_type(T, O, TRUE, shift_x, shift_y)
O = locate() in oils
if(!O)
O = new(T)
O.pixel_x = (shift_x)
O.pixel_y = (shift_y)
if(shift_x || shift_y)
O.off_floor = TRUE
O.layer = BELOW_MOB_LAYER
+337
View File
@@ -0,0 +1,337 @@
/obj/item/organ/internal/lungs
name = "lungs"
icon_state = "lungs"
parent_organ = "chest"
slot = "lungs"
organ_tag = "lungs"
gender = PLURAL
w_class = WEIGHT_CLASS_NORMAL
//Breath damage
var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa
var/safe_oxygen_max = 0
var/safe_nitro_min = 0
var/safe_nitro_max = 0
var/safe_co2_min = 0
var/safe_co2_max = 10 // Yes it's an arbitrary value who cares?
var/safe_toxins_min = 0
var/safe_toxins_max = 0.05
var/SA_para_min = 1 //Sleeping agent
var/SA_sleep_min = 5 //Sleeping agent
var/oxy_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
var/oxy_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
var/oxy_damage_type = OXY
var/nitro_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
var/nitro_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
var/nitro_damage_type = OXY
var/co2_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
var/co2_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
var/co2_damage_type = OXY
var/tox_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
var/tox_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
var/tox_damage_type = TOX
var/cold_message = "your face freezing and an icicle forming"
var/cold_level_1_threshold = 260
var/cold_level_2_threshold = 200
var/cold_level_3_threshold = 120
var/cold_level_1_damage = COLD_GAS_DAMAGE_LEVEL_1 //Keep in mind with gas damage levels, you can set these to be negative, if you want someone to heal, instead.
var/cold_level_2_damage = COLD_GAS_DAMAGE_LEVEL_2
var/cold_level_3_damage = COLD_GAS_DAMAGE_LEVEL_3
var/cold_damage_types = list(BURN = 1)
var/hot_message = "your face burning and a searing heat"
var/heat_level_1_threshold = 360
var/heat_level_2_threshold = 400
var/heat_level_3_threshold = 1000
var/heat_level_1_damage = HEAT_GAS_DAMAGE_LEVEL_1
var/heat_level_2_damage = HEAT_GAS_DAMAGE_LEVEL_2
var/heat_level_3_damage = HEAT_GAS_DAMAGE_LEVEL_3
var/heat_damage_types = list(BURN = 1)
/obj/item/organ/internal/lungs/insert(mob/living/carbon/M, special = 0, dont_remove_slot = 0)
..()
for(var/thing in list("oxy", "tox", "co2", "nitro"))
M.clear_alert("not_enough_[thing]")
M.clear_alert("too_much_[thing]")
/obj/item/organ/internal/lungs/remove(mob/living/carbon/M, special = 0)
for(var/thing in list("oxy", "tox", "co2", "nitro"))
M.clear_alert("not_enough_[thing]")
M.clear_alert("too_much_[thing]")
return ..()
/obj/item/organ/internal/lungs/on_life()
if(germ_level > INFECTION_LEVEL_ONE)
if(prob(5))
owner.emote("cough") //respitory tract infection
if(is_bruised())
if(prob(2))
owner.custom_emote(1, "coughs up blood!")
owner.bleed(1)
if(prob(4))
owner.custom_emote(1, "gasps for air!")
owner.AdjustLoseBreath(5)
/obj/item/organ/internal/lungs/proc/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
if((H.status_flags & GODMODE))
return
if(!breath || (breath.total_moles() == 0))
if(H.health >= config.health_threshold_crit)
H.adjustOxyLoss(HUMAN_MAX_OXYLOSS)
else
H.adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
H.failed_last_breath = TRUE
if(safe_oxygen_min)
H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
else if(safe_toxins_min)
H.throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
else if(safe_co2_min)
H.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
else if(safe_nitro_min)
H.throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro)
return FALSE
var/gas_breathed = 0
//Partial pressures in our breath
var/O2_pp = breath.get_breath_partial_pressure(breath.oxygen)
var/N2_pp = breath.get_breath_partial_pressure(breath.nitrogen)
var/Toxins_pp = breath.get_breath_partial_pressure(breath.toxins)
var/CO2_pp = breath.get_breath_partial_pressure(breath.carbon_dioxide)
//-- OXY --//
//Too much oxygen! //Yes, some species may not like it.
if(safe_oxygen_max)
if(O2_pp > safe_oxygen_max)
var/ratio = (breath.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)
else
H.clear_alert("too_much_oxy")
//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.oxygen)
H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
else
H.failed_last_breath = FALSE
H.adjustOxyLoss(-5)
gas_breathed = breath.oxygen
H.clear_alert("not_enough_oxy")
//Exhale
breath.oxygen -= gas_breathed
breath.carbon_dioxide += gas_breathed
gas_breathed = 0
//-- Nitrogen --//
//Too much nitrogen!
if(safe_nitro_max)
if(N2_pp > safe_nitro_max)
var/ratio = (breath.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)
else
H.clear_alert("too_much_nitro")
//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.nitrogen)
H.throw_alert("nitro", /obj/screen/alert/not_enough_nitro)
else
H.failed_last_breath = FALSE
H.adjustOxyLoss(-5)
gas_breathed = breath.nitrogen
H.clear_alert("nitro")
//Exhale
breath.nitrogen -= gas_breathed
breath.carbon_dioxide += gas_breathed
gas_breathed = 0
//-- CO2 --//
//CO2 does not affect failed_last_breath. So if there was enough oxygen in the air but too much co2, this will hurt you, but only once per 4 ticks, instead of once per tick.
if(safe_co2_max)
if(CO2_pp > safe_co2_max)
if(!H.co2overloadtime) // If it's the first breath with too much CO2 in it, lets start a counter, then have them pass out after 12s or so.
H.co2overloadtime = world.time
else if(world.time - H.co2overloadtime > 120)
H.Paralyse(3)
H.apply_damage_type(3, co2_damage_type) // Lets hurt em a little, let them know we mean business
if(world.time - H.co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
H.apply_damage_type(8, co2_damage_type)
H.throw_alert("too_much_co2", /obj/screen/alert/too_much_co2)
if(prob(20)) // Lets give them some chance to know somethings not right though I guess.
H.emote("cough")
else
H.co2overloadtime = 0
H.clear_alert("too_much_co2")
//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.carbon_dioxide)
H.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
else
H.failed_last_breath = FALSE
H.adjustOxyLoss(-5)
gas_breathed = breath.carbon_dioxide
H.clear_alert("not_enough_co2")
//Exhale
breath.carbon_dioxide -= gas_breathed
breath.oxygen += gas_breathed
gas_breathed = 0
//-- TOX --//
//Too much toxins!
if(safe_toxins_max)
if(Toxins_pp > safe_toxins_max)
var/ratio = (breath.toxins/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
H.clear_alert("too_much_tox")
//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.toxins)
H.throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
else
H.failed_last_breath = FALSE
H.adjustOxyLoss(-5)
gas_breathed = breath.toxins
H.clear_alert("not_enough_tox")
//Exhale
breath.toxins -= gas_breathed
breath.carbon_dioxide += gas_breathed
gas_breathed = 0
//-- TRACES --//
if(breath.trace_gases.len) // If there's some other shit in the air lets deal with it here.
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
var/SA_pp = breath.get_breath_partial_pressure(SA.moles)
if(SA_pp > SA_para_min)
H.Paralyse(3) // 3 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
H.AdjustSleeping(8, bound_lower = 0, bound_upper = 10)
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
H.emote(pick("giggle", "laugh"))
handle_breath_temperature(breath, H)
return TRUE
/obj/item/organ/internal/lungs/proc/handle_too_little_breath(mob/living/carbon/human/H = null, breath_pp = 0, safe_breath_min = 0, true_pp = 0)
. = 0
if(!H || !safe_breath_min) //the other args are either: Ok being 0 or Specifically handled.
return FALSE
if(prob(20))
H.emote("gasp")
if(breath_pp > 0)
var/ratio = safe_breath_min/breath_pp
H.adjustOxyLoss(min(5*ratio, HUMAN_MAX_OXYLOSS)) // Don't fuck them up too fast (space only does HUMAN_MAX_OXYLOSS after all!
H.failed_last_breath = TRUE
. = true_pp*ratio/6
else
H.adjustOxyLoss(HUMAN_MAX_OXYLOSS)
H.failed_last_breath = TRUE
/obj/item/organ/internal/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
var/species_traits = list()
if(H && H.species && H.species.species_traits)
species_traits = H.species.species_traits
if(!(COLDRES in H.mutations) && !(RESISTCOLD in species_traits)) // COLD DAMAGE
var/CM = abs(H.species.coldmod)
var/TC = 0
if(breath_temperature < cold_level_3_threshold)
TC = cold_level_3_damage
if(breath_temperature > cold_level_3_threshold && breath_temperature < cold_level_2_threshold)
TC = cold_level_2_damage
if(breath_temperature > cold_level_2_threshold && breath_temperature < cold_level_1_threshold)
TC = cold_level_1_damage
if(TC)
for(var/D in cold_damage_types)
H.apply_damage_type(TC * CM * cold_damage_types[D], D)
if(breath_temperature < cold_level_1_threshold)
if(prob(20))
to_chat(H, "<span class='warning'>You feel [cold_message] in your [name]!</span>")
if(!(HEATRES in H.mutations) && !(RESISTHOT in species_traits)) // HEAT DAMAGE
var/HM = abs(H.species.heatmod)
var/TH = 0
if(breath_temperature > heat_level_1_threshold && breath_temperature < heat_level_2_threshold)
TH = heat_level_1_damage
if(breath_temperature > heat_level_2_threshold && breath_temperature < heat_level_3_threshold)
TH = heat_level_2_damage
if(breath_temperature > heat_level_3_threshold)
TH = heat_level_3_damage
if(TH)
for(var/D in heat_damage_types)
H.apply_damage_type(TH * HM * heat_damage_types[D], D)
if(breath_temperature > heat_level_1_threshold)
if(prob(20))
to_chat(H, "<span class='warning'>You feel [hot_message] in your [name]!</span>")
/obj/item/organ/internal/lungs/prepare_eat()
var/obj/S = ..()
S.reagents.add_reagent("salbutamol", 5)
return S
/obj/item/organ/internal/lungs/plasmaman
name = "plasma filter"
desc = "A spongy rib-shaped mass for filtering plasma from the air."
icon_state = "lungs-plasma"
species = "Plasmaman"
safe_oxygen_min = 0 //We don't breath this
safe_toxins_min = 16 //We breathe THIS!
safe_toxins_max = 0
/obj/item/organ/internal/lungs/vox
name = "Vox lungs"
desc = "They're filled with dust....wow."
species = "Vox"
safe_oxygen_min = 0 //We don't breathe this
safe_oxygen_max = 1 //This is toxic to us
safe_nitro_min = 16 //We breathe THIS!
oxy_damage_type = TOX //And it poisons us
/obj/item/organ/internal/lungs/drask
icon = 'icons/obj/surgery_drask.dmi'
species = "Drask"
cold_message = "an invigorating coldness"
cold_level_3_threshold = 60
cold_level_1_damage = -COLD_GAS_DAMAGE_LEVEL_1 //They heal when the air is cold
cold_level_2_damage = -COLD_GAS_DAMAGE_LEVEL_2
cold_level_3_damage = -COLD_GAS_DAMAGE_LEVEL_3
cold_damage_types = list(BRUTE = 1, BURN = 0.5)
+15 -14
View File
@@ -1,5 +1,3 @@
var/list/organ_cache = list()
/obj/item/organ
name = "organ"
icon = 'icons/obj/surgery.dmi'
@@ -31,6 +29,7 @@ var/list/organ_cache = list()
var/sterile = FALSE //can the organ be infected by germs?
var/tough = FALSE //can organ be easily damaged?
var/emp_proof = FALSE //is the organ immune to EMPs?
/obj/item/organ/Destroy()
@@ -170,7 +169,7 @@ var/list/organ_cache = list()
..()
if(germ_level >= INFECTION_LEVEL_TWO)
if(prob(3)) //about once every 30 seconds
take_damage(1,silent=prob(30))
receive_damage(1,silent=prob(30))
/obj/item/organ/proc/rejuvenate()
damage = 0
@@ -221,7 +220,7 @@ var/list/organ_cache = list()
W.time_inflicted = world.time
//Note: external organs have their own version of this proc
/obj/item/organ/proc/take_damage(amount, silent = 0)
/obj/item/organ/proc/receive_damage(amount, silent = 0)
if(tough)
return
if(status & ORGAN_ROBOT)
@@ -254,43 +253,45 @@ var/list/organ_cache = list()
min_broken_damage = 35
/obj/item/organ/external/emp_act(severity)
if(!(status & ORGAN_ROBOT))
if(!(status & ORGAN_ROBOT) || emp_proof)
return
if(tough)
switch(severity)
if(1)
take_damage(0, 5.5)
receive_damage(0, 5.5)
if(owner)
owner.Stun(10)
if(2)
take_damage(0, 2.8)
receive_damage(0, 2.8)
if(owner)
owner.Stun(5)
else
switch(severity)
if(1)
take_damage(0, 20)
receive_damage(0, 20)
if(2)
take_damage(0, 7)
receive_damage(0, 7)
/obj/item/organ/internal/emp_act(severity)
if(!robotic)
if(!robotic || emp_proof)
return
if(robotic == 2)
switch(severity)
if(1.0)
take_damage(20, 1)
receive_damage(20, 1)
if(2.0)
take_damage(7, 1)
receive_damage(7, 1)
else if(robotic == 1)
take_damage(11, 1)
receive_damage(11, 1)
/obj/item/organ/internal/heart/emp_act(intensity)
if(emp_proof)
return
if(owner && robotic == 2)
Stop() // In the name of looooove~!
owner.visible_message("<span class='danger'>[owner] clutches their chest and gasps!</span>","<span class='userdanger'>You clutch your chest in pain!</span>")
else if(owner && robotic == 1)
take_damage(11,1)
receive_damage(11,1)
/obj/item/organ/proc/remove(var/mob/living/user,special = 0)
if(!istype(owner))
@@ -142,7 +142,7 @@
DAMAGE PROCS
****************************************************/
/obj/item/organ/external/take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE)
/obj/item/organ/external/receive_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE)
if(tough && !ignore_resists)
brute = max(0, brute - 5)
burn = max(0, burn - 4)
@@ -165,7 +165,7 @@
// Damage an internal organ
if(internal_organs && internal_organs.len)
var/obj/item/organ/internal/I = pick(internal_organs)
I.take_damage(brute * 0.5)
I.receive_damage(brute * 0.5)
brute -= brute * 0.5
if(status & ORGAN_BROKEN && prob(40) && brute)
@@ -217,7 +217,7 @@
if(possible_points.len)
//And pass the pain around
var/obj/item/organ/external/target = pick(possible_points)
target.take_damage(brute, burn, sharp, used_weapon, forbidden_limbs + src, ignore_resists = TRUE) //If the damage was reduced before, don't reduce it again
target.receive_damage(brute, burn, sharp, used_weapon, forbidden_limbs + src, ignore_resists = TRUE) //If the damage was reduced before, don't reduce it again
if(dismember_at_max_damage && body_part != UPPER_TORSO && body_part != LOWER_TORSO) // We've ensured all damage to the mob is retained, now let's drop it, if necessary.
droplimb(1) //Clean loss, just drop the limb and be done
@@ -495,7 +495,7 @@ Note that amputating the affected organ does in fact remove the infection from t
for(var/obj/item/organ/external/E in children) //Factor in the children's brute and burn into how much will transfer
total_brute += E.brute_dam
total_burn += E.burn_dam
parent.take_damage(total_brute, total_burn, ignore_resists = TRUE) //Transfer the full damage to the parent, bypass limb damage reduction.
parent.receive_damage(total_brute, total_burn, ignore_resists = TRUE) //Transfer the full damage to the parent, bypass limb damage reduction.
parent = null
spawn(1)
@@ -735,7 +735,7 @@ Note that amputating the affected organ does in fact remove the infection from t
"<span class='danger'>Your [src.name] explodes!</span>",\
"<span class='danger'>You hear an explosion!</span>")
explosion(get_turf(owner),-1,-1,2,3)
var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread()
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, victim)
spark_system.attach(owner)
spark_system.start()
+5 -37
View File
@@ -267,35 +267,6 @@
H.adjustFireLoss(-cursed_heart.heal_burn)
H.adjustOxyLoss(-cursed_heart.heal_oxy)
/obj/item/organ/internal/lungs
name = "lungs"
icon_state = "lungs"
gender = PLURAL
organ_tag = "lungs"
parent_organ = "chest"
slot = "lungs"
vital = 1
//Insert something neat here.
///obj/item/organ/internal/lungs/remove(mob/living/carbon/M, special = 0)
// owner.losebreath += 10
//insert oxy damage extream here.
// . = ..()
/obj/item/organ/internal/lungs/on_life()
if(germ_level > INFECTION_LEVEL_ONE)
if(prob(5))
owner.emote("cough") //respitory tract infection
if(is_bruised())
if(prob(2))
owner.custom_emote(1, "coughs up blood!")
owner.bleed(1)
if(prob(4))
owner.custom_emote(1, "gasps for air!")
owner.AdjustLoseBreath(5)
/obj/item/organ/internal/kidneys
name = "kidneys"
icon_state = "kidneys"
@@ -326,7 +297,7 @@
var/eye_colour = "#000000"
var/list/colourmatrix = null
var/list/colourblind_matrix = MATRIX_GREYSCALE //Special colourblindness parameters. By default, it's black-and-white.
var/colourblind_darkview = null
var/list/replace_colours = LIST_GREYSCALE_REPLACE
var/dependent_disabilities = null //Gets set by eye-dependent disabilities such as colourblindness so the eyes can transfer the disability during transplantation.
var/dark_view = 2 //Default dark_view for Humans.
var/weld_proof = null //If set, the eyes will not take damage during welding. eg. IPC optical sensors do not take damage when they weld things while all other eyes will.
@@ -341,10 +312,7 @@
return colourmatrix
/obj/item/organ/internal/eyes/proc/get_dark_view() //Returns dark_view (if the eyes are organic) for see_invisible handling in species.dm to be autoprocessed by life().
if(!robotic && colourblind_darkview && owner.disabilities & COLOURBLIND) //Returns special darkview value if colourblind and it exists, otherwise reuse current.
return colourblind_darkview
else
return dark_view
return dark_view
/obj/item/organ/internal/eyes/insert(mob/living/carbon/human/M, special = 0)
..()
@@ -430,16 +398,16 @@
if(owner.getToxLoss() >= 60 && !owner.reagents.has_reagent("charcoal"))
//Healthy liver suffers on its own
if(damage < min_broken_damage)
take_damage(0.2 * PROCESS_ACCURACY)
receive_damage(0.2 * PROCESS_ACCURACY)
//Damaged one shares the fun
else
var/obj/item/organ/internal/O = pick(owner.internal_organs)
if(O)
O.take_damage(0.2 * PROCESS_ACCURACY)
O.receive_damage(0.2 * PROCESS_ACCURACY)
//Detox can heal small amounts of damage
if(damage && damage < min_bruised_damage && owner.reagents.has_reagent("charcoal"))
take_damage(-0.2 * PROCESS_ACCURACY)
receive_damage(-0.2 * PROCESS_ACCURACY)
// Get the effectiveness of the liver.
var/filter_effect = 3
@@ -12,13 +12,10 @@
parent_organ = "head"
species = "Drask"
/obj/item/organ/internal/lungs/drask
icon = 'icons/obj/surgery_drask.dmi'
species = "Drask"
/obj/item/organ/internal/liver/drask
name = "metabolic strainer"
icon = 'icons/obj/surgery_drask.dmi'
icon_state = "kidneys"
alcohol_intensity = 0.8
species = "Drask"
@@ -209,7 +209,7 @@
..()
/obj/item/organ/external/head/take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE)
/obj/item/organ/external/head/receive_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE)
..(brute, burn, sharp, used_weapon, forbidden_limbs, ignore_resists)
if(!disfigured)
if(brute_dam > 40)
@@ -2,15 +2,16 @@
alcohol_intensity = 1.4
species = "Tajaran"
/obj/item/organ/internal/eyes/tajaran /*Most Tajara see in full colour as a result of genetic augmentation, although it cost them their darksight (darksight = 2)
unless they choose otherwise by selecting the colourblind disability in character creation (darksight = 8 but colourblind).*/
/obj/item/organ/internal/eyes/tajaran
name = "tajaran eyeballs"
species = "Tajaran"
colourblind_matrix = MATRIX_TAJ_CBLIND //The colour matrix and darksight parameters that the mob will recieve when they get the disability.
colourblind_darkview = 8
replace_colours = LIST_TAJ_REPLACE
dark_view = 8
/obj/item/organ/internal/eyes/tajaran/farwa //Being the lesser form of Tajara, Farwas have an utterly incurable version of their colourblindness.
name = "farwa eyeballs"
species = "Farwa"
colourmatrix = MATRIX_TAJ_CBLIND
dark_view = 8
replace_colours = LIST_TAJ_REPLACE
@@ -2,15 +2,17 @@
alcohol_intensity = 1.4
species = "Vulpkanin"
/obj/item/organ/internal/eyes/vulpkanin /*Most Vulpkanin see in full colour as a result of genetic augmentation, although it cost them their darksight (darksight = 2)
unless they choose otherwise by selecting the colourblind disability in character creation (darksight = 8 but colourblind).*/
/obj/item/organ/internal/eyes/vulpkanin
name = "vulpkanin eyeballs"
species = "Vulpkanin"
colourblind_matrix = MATRIX_VULP_CBLIND //The colour matrix and darksight parameters that the mob will recieve when they get the disability.
colourblind_darkview = 8
replace_colours = LIST_VULP_REPLACE
dark_view = 8
/obj/item/organ/internal/eyes/vulpkanin/wolpin //Being the lesser form of Vulpkanin, Wolpins have an utterly incurable version of their colourblindness.
name = "wolpin eyeballs"
species = "Wolpin"
colourmatrix = MATRIX_VULP_CBLIND
dark_view = 8
replace_colours = LIST_VULP_REPLACE
+28 -12
View File
@@ -71,12 +71,14 @@
var/implements_extract = list(/obj/item/weapon/hemostat = 100, /obj/item/weapon/kitchen/utensil/fork = 70)
var/implements_mend = list(/obj/item/stack/medical/bruise_pack = 20,/obj/item/stack/medical/bruise_pack/advanced = 100,/obj/item/stack/nanopaste = 100)
var/implements_clean = list(/obj/item/weapon/reagent_containers/dropper = 100,
/obj/item/weapon/reagent_containers/syringe = 100,
/obj/item/weapon/reagent_containers/glass/bottle = 90,
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 85,
/obj/item/weapon/reagent_containers/food/drinks/bottle = 80,
/obj/item/weapon/reagent_containers/glass/beaker = 75,
/obj/item/weapon/reagent_containers/spray = 60,
/obj/item/weapon/reagent_containers/glass/bucket = 50)
//Finish is just so you can close up after you do other things.
var/implements_finsh = list(/obj/item/weapon/scalpel/laser/manager = 100,/obj/item/weapon/retractor = 100 ,/obj/item/weapon/crowbar = 90)
var/current_type
@@ -129,13 +131,16 @@
for(var/obj/item/organ/internal/I in affected.internal_organs)
if(I)
if(C.reagents.total_volume < GHETTO_DISINFECT_AMOUNT)
if(C.reagents.total_volume <= 0) //end_step handles if there is not enough reagent
user.visible_message("[user] notices [tool] is empty.", \
"You notice [tool] is empty")
"You notice [tool] is empty.")
return 0
var/msg = "[user] starts pouring some of [tool] over [target]'s [I.name]."
var/self_msg = "You start pouring some of [tool] over [target]'s [I.name]."
if(istype(C,/obj/item/weapon/reagent_containers/syringe))
msg = "[user] begins injecting [tool] into [target]'s [I.name]."
self_msg = "You begin injecting [tool] into [target]'s [I.name]."
user.visible_message(msg, self_msg)
if(H && affected)
H.custom_pain("Something burns horribly in your [affected.name]!",1)
@@ -300,23 +305,34 @@
var/obj/item/weapon/reagent_containers/C = tool
var/datum/reagents/R = C.reagents
var/ethanol = 0 //how much alcohol is in the thing
var/spaceacillin = 0 //how much actual antibiotic is in the thing
if(R.reagent_list.len)
for(var/datum/reagent/consumable/ethanol/alcohol in R.reagent_list)
ethanol += alcohol.alcohol_perc * 300
ethanol /= R.reagent_list.len
spaceacillin = R.get_reagent_amount("spaceacillin")
for(var/obj/item/organ/internal/I in affected.internal_organs)
if(I)
if(R.total_volume < GHETTO_DISINFECT_AMOUNT)
user.visible_message("[user] notices there is not enough of [tool].", \
"You notice there is not enough of [tool].")
user.visible_message("[user] notices there is not enough in [tool].", \
"You notice there is not enough in [tool].")
return 0
if(I.germ_level < INFECTION_LEVEL_ONE / 2)
to_chat(user, "[I] does not appear to be infected.")
if(I.germ_level >= INFECTION_LEVEL_ONE / 2)
I.germ_level = max(I.germ_level-ethanol, 0)
user.visible_message("<span class='notice'> [user] has poured some of [tool] over [target]'s [I.name].</span>",
if(spaceacillin >= GHETTO_DISINFECT_AMOUNT)
I.germ_level = 0
else
I.germ_level = max(I.germ_level-ethanol, 0)
if(istype(C,/obj/item/weapon/reagent_containers/syringe))
user.visible_message("<span class='notice'> [user] has injected [tool] into [target]'s [I.name].</span>",
"<span class='notice'> You have injected [tool] into [target]'s [I.name].</span>")
else
user.visible_message("<span class='notice'> [user] has poured some of [tool] over [target]'s [I.name].</span>",
"<span class='notice'> You have poured some of [tool] over [target]'s [I.name].</span>")
R.trans_to(target, GHETTO_DISINFECT_AMOUNT)
R.reaction(target, INGEST)
@@ -352,11 +368,11 @@
else if(istype(tool, /obj/item/stack/medical/bruise_pack) || istype(tool, /obj/item/stack/nanopaste))
dam_amt = 5
target.adjustToxLoss(10)
affected.take_damage(5)
affected.receive_damage(5)
for(var/obj/item/organ/internal/I in affected.internal_organs)
if(I && I.damage && !(I.tough))
I.take_damage(dam_amt,0)
I.receive_damage(dam_amt,0)
return 0
@@ -365,7 +381,7 @@
"<span class='warning'> Your hand slips, damaging [tool]!</span>")
var/obj/item/organ/internal/I = tool
if(istype(I) && !I.tough)
I.take_damage(rand(3,5),0)
I.receive_damage(rand(3,5),0)
return 0
@@ -386,7 +402,7 @@
for(var/obj/item/organ/internal/I in affected.internal_organs)
I.germ_level = max(I.germ_level-ethanol, 0)
I.take_damage(rand(4,8),0)
I.receive_damage(rand(4,8),0)
R.trans_to(target, GHETTO_DISINFECT_AMOUNT * 10)
R.reaction(target, INGEST)
@@ -400,7 +416,7 @@
if(affected)
user.visible_message("<span class='warning'> [user]'s hand slips, damaging [target]'s [affected.name] with [tool]!</span>", \
"<span class='warning'> Your hand slips, damaging [target]'s [affected.name] with [tool]!</span>")
affected.take_damage(20)
affected.receive_damage(20)
else
user.visible_message("<span class='warning'> [user]'s hand slips, damaging [target]'s [parse_zone(target_zone)] with [tool]!</span>", \
"<span class='warning'> Your hand slips, damaging [target]'s [parse_zone(target_zone)] with [tool]!</span>")
@@ -420,7 +436,7 @@
var/self_msg = "<span class='warning'> Your hand slips, tearing skin!</span>"
user.visible_message(msg, self_msg)
if(affected)
affected.take_damage(20)
affected.receive_damage(20)
return 0
+2 -2
View File
@@ -99,7 +99,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='warning'> [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</span>" , \
"<span class='warning'> Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</span>")
affected.take_damage(5, 0)
affected.receive_damage(5, 0)
return 0
@@ -148,7 +148,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='warning'> [user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='warning'> Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</span>")
affected.take_damage(20)
affected.receive_damage(20)
return 0
+2 -2
View File
@@ -485,11 +485,11 @@
"<span class='warning'> Your hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!</span>")
target.adjustToxLoss(5)
affected.take_damage(5)
affected.receive_damage(5)
for(var/obj/item/organ/internal/I in affected.internal_organs)
if(I)
I.take_damage(rand(3,5),0)
I.receive_damage(rand(3,5),0)
else if(current_type == "insert")
user.visible_message("<span class='warning'> [user]'s hand slips, disconnecting \the [tool].</span>", \
+1 -1
View File
@@ -206,7 +206,7 @@
for(var/mob/living/carbon/human/H in view(2, E.loc))//germs from people
if(AStar(E.loc, H.loc, /turf/proc/Distance, 2, simulated_only = 0))
if((!(NO_BREATH in H.mutations) || !(NO_BREATH in H.species.species_traits)) && !H.wear_mask) //wearing a mask helps preventing people from breathing cooties into open incisions
if((!(BREATHLESS in H.mutations) || !(NO_BREATHE in H.species.species_traits)) && !H.wear_mask) //wearing a mask helps preventing people from breathing cooties into open incisions
germs += H.germ_level * 0.25
for(var/obj/effect/decal/cleanable/M in view(2, E.loc))//germs from messes