Merge branch 'master' into cool-ipcs

This commit is contained in:
Timothy Teakettle
2020-10-01 21:06:16 +01:00
committed by GitHub
522 changed files with 181605 additions and 92979 deletions
+1 -1
View File
@@ -357,7 +357,7 @@
else
damage = min(damage, WOUND_MAX_CONSIDERED_DAMAGE)
var/base_roll = rand(max(damage/1.5,25), round(damage ** WOUND_DAMAGE_EXPONENT))
var/base_roll = rand(max(damage/1.5,25), round(damage ** CONFIG_GET(number/wound_exponent))) + (get_damage()*CONFIG_GET(number/wound_damage_multiplier))
var/injury_roll = base_roll
injury_roll += check_woundings_mods(woundtype, damage, wound_bonus, bare_wound_bonus)
var/list/wounds_checking = GLOB.global_wound_types[woundtype]
+11 -7
View File
@@ -180,13 +180,17 @@
. += lips_overlay
// eyes
var/image/eyes_overlay = image('icons/mob/human_face.dmi', "eyes", -BODY_LAYER, SOUTH)
. += eyes_overlay
if(!eyes)
eyes_overlay.icon_state = "eyes_missing"
else if(eyes.eye_color)
eyes_overlay.color = "#" + eyes.eye_color
if(eyes)
var/image/left_eye = image('icons/mob/human_face.dmi', "left_eye", -BODY_LAYER, SOUTH)
var/image/right_eye = image('icons/mob/human_face.dmi', "right_eye", -BODY_LAYER, SOUTH)
if(eyes.left_eye_color && eyes.right_eye_color)
left_eye.color = "#" + eyes.left_eye_color
right_eye.color = "#" + eyes.right_eye_color
. += left_eye
. += right_eye
else
var/eyes_overlay = image('icons/mob/human_face.dmi', "eyes_missing", -BODY_LAYER, SOUTH)
. += eyes_overlay
/obj/item/bodypart/head/monkey
icon = 'icons/mob/animal_parts.dmi'
@@ -33,10 +33,9 @@
. = ..()
if(!owner || . & EMP_PROTECT_SELF)
return
owner.reagents.add_reagent(/datum/reagent/toxin/bad_food, poison_amount / severity)
owner.reagents.add_reagent(/datum/reagent/toxin/bad_food, poison_amount * severity/100)
to_chat(owner, "<span class='warning'>You feel like your insides are burning.</span>")
/obj/item/organ/cyberimp/chest/nutriment/plus
name = "Nutriment pump implant PLUS"
desc = "This implant will synthesize and pump into your bloodstream a small amount of nutriment when you are hungry."
@@ -115,10 +114,10 @@
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
if(H.stat != DEAD && prob(50 / severity) && H.can_heartattack())
if(H.stat != DEAD && prob(severity/2) && H.can_heartattack())
H.set_heartattack(TRUE)
to_chat(H, "<span class='userdanger'>You feel a horrible agony in your chest!</span>")
addtimer(CALLBACK(src, .proc/undo_heart_attack), 60 SECONDS / severity)
addtimer(CALLBACK(src, .proc/undo_heart_attack), (60 * severity/100) SECONDS)
/obj/item/organ/cyberimp/chest/reviver/proc/undo_heart_attack()
var/mob/living/carbon/human/H = owner
@@ -34,11 +34,10 @@
. = ..()
if(!owner || . & EMP_PROTECT_SELF)
return
var/stun_amount = 200/severity
var/stun_amount = 2*severity
owner.Stun(stun_amount)
to_chat(owner, "<span class='warning'>Your body seizes up!</span>")
/obj/item/organ/cyberimp/brain/anti_drop
name = "anti-drop implant"
desc = "This cybernetic brain implant will allow you to force your hand muscles to contract, preventing item dropping. Twitch ear to toggle."
@@ -68,12 +67,11 @@
release_items()
to_chat(owner, "<span class='notice'>Your hands relax...</span>")
/obj/item/organ/cyberimp/brain/anti_drop/emp_act(severity)
. = ..()
if(!owner || . & EMP_PROTECT_SELF)
return
var/range = severity ? 10 : 5
var/range = severity/10
var/atom/A
if(active)
release_items()
@@ -114,7 +112,7 @@
return
crit_fail = TRUE
organ_flags |= ORGAN_FAILING
addtimer(CALLBACK(src, .proc/reboot), 90 / severity)
addtimer(CALLBACK(src, .proc/reboot), 0.9 * severity)
/obj/item/organ/cyberimp/brain/anti_stun/proc/reboot()
crit_fail = FALSE
@@ -136,6 +134,6 @@
. = ..()
if(!owner || . & EMP_PROTECT_SELF)
return
if(prob(60/severity))
if(prob(0.6*severity))
to_chat(owner, "<span class='warning'>Your breathing tube suddenly closes!</span>")
owner.losebreath += 2
+2 -1
View File
@@ -131,7 +131,7 @@
. = ..()
if(. & EMP_PROTECT_SELF)
return
damage += 40/severity
damage += 0.15 * severity
/obj/item/organ/ears/ipc
name = "auditory sensors"
@@ -158,3 +158,4 @@
owner.Jitter(15)
owner.Dizzy(15)
owner.DefaultCombatKnockdown(40)
damage += 0.15 * severity
+31 -14
View File
@@ -26,8 +26,10 @@
var/sight_flags = 0
var/see_in_dark = 2
var/tint = 0
var/eye_color = "" //set to a hex code to override a mob's eye color
var/old_eye_color = "fff"
var/left_eye_color = "" //set to a hex code to override a mob's eye color
var/right_eye_color = ""
var/old_left_eye_color = "fff"
var/old_right_eye_color = "fff"
var/flash_protect = 0
var/see_invisible = SEE_INVISIBLE_LIVING
var/lighting_alpha
@@ -44,11 +46,19 @@
owner.become_blind(EYE_DAMAGE)
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
old_eye_color = H.eye_color
if(eye_color)
H.eye_color = eye_color
old_left_eye_color = H.left_eye_color
old_right_eye_color = H.right_eye_color
if(left_eye_color)
H.left_eye_color = left_eye_color
else
eye_color = H.eye_color
left_eye_color = H.left_eye_color
if(right_eye_color)
H.right_eye_color = right_eye_color
else
right_eye_color = H.right_eye_color
if(!special)
H.dna?.species?.handle_body(H) //regenerate eyeballs overlays.
M.update_tint()
@@ -64,9 +74,10 @@
C.clear_fullscreen("eye_damage")
if(BLIND_VISION_THREE)
C.cure_blind(EYE_DAMAGE)
if(ishuman(C) && eye_color)
if(ishuman(C) && left_eye_color && right_eye_color)
var/mob/living/carbon/human/H = C
H.eye_color = old_eye_color
H.left_eye_color = old_left_eye_color
H.right_eye_color = old_right_eye_color
if(!special)
H.dna.species.handle_body(H)
if(!special)
@@ -155,21 +166,23 @@
return
to_chat(owner, "<span class='warning'>Static obfuscates your vision!</span>")
owner.flash_act(visual = 1)
if(severity == EMP_HEAVY)
if(severity >= 70)
owner.adjustOrganLoss(ORGAN_SLOT_EYES, 20)
/obj/item/organ/eyes/robotic/xray
name = "\improper X-ray eyes"
desc = "These cybernetic eyes will give you X-ray vision. Blinking is futile."
eye_color = "000"
left_eye_color = "000"
right_eye_color = "000"
see_in_dark = 8
sight_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS
/obj/item/organ/eyes/robotic/thermals
name = "thermal eyes"
desc = "These cybernetic eye implants will give you thermal vision. Vertical slit pupil included."
eye_color = "FC0"
left_eye_color = "FC0"
right_eye_color = "FC0"
sight_flags = SEE_MOBS
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
flash_protect = -1
@@ -178,7 +191,8 @@
/obj/item/organ/eyes/robotic/flashlight
name = "flashlight eyes"
desc = "It's two flashlights rigged together with some wire. Why would you put these in someone's head?"
eye_color ="fee5a3"
left_eye_color ="fee5a3"
right_eye_color ="fee5a3"
icon = 'icons/obj/lighting.dmi'
icon_state = "flashlight_eyes"
flash_protect = 2
@@ -219,7 +233,8 @@
/obj/item/organ/eyes/robotic/glow
name = "High Luminosity Eyes"
desc = "Special glowing eyes, used by snowflakes who want to be special."
eye_color = "000"
left_eye_color = "000"
right_eye_color = "000"
actions_types = list(/datum/action/item_action/organ_action/use, /datum/action/item_action/organ_action/toggle)
var/current_color_string = "#ffffff"
var/active = FALSE
@@ -276,7 +291,9 @@
#define MAX_LIGHTNESS 256
/obj/item/organ/eyes/robotic/glow/proc/assume_rgb(newcolor)
eye_color = RGB2EYECOLORSTRING(newcolor)
var/current_color = RGB2EYECOLORSTRING(newcolor)
left_eye_color = current_color
right_eye_color = current_color
var/list/hsv = ReadHSV(RGBtoHSV(newcolor))
hsv[2] = clamp(hsv[2], 0, MAX_SATURATION)
hsv[3] = clamp(hsv[3], 0, MAX_LIGHTNESS)
+2 -2
View File
@@ -198,8 +198,8 @@ obj/item/organ/heart/slime
if(. & EMP_PROTECT_SELF)
return
Stop()
addtimer(CALLBACK(src, .proc/Restart), 20/severity SECONDS)
damage += 100/severity
addtimer(CALLBACK(src, .proc/Restart), 0.2*severity SECONDS)
damage += severity
/obj/item/organ/heart/cybernetic/upgraded
name = "upgraded cybernetic heart"
+1 -5
View File
@@ -112,8 +112,4 @@
. = ..()
if(. & EMP_PROTECT_SELF)
return
switch(severity)
if(1)
damage+=100
if(2)
damage+=50
damage += severity
+63 -1
View File
@@ -36,6 +36,10 @@
var/safe_co2_max = 10 // Yes it's an arbitrary value who cares?
var/safe_toxins_min = 0
var/safe_toxins_max = MOLES_GAS_VISIBLE
var/safe_ch3br_min = 0
var/safe_ch3br_max = 1 //problematic even at low concentrations
var/safe_methane_min = 0
var/safe_methane_max = 0
var/SA_para_min = 1 //Sleeping agent
var/SA_sleep_min = 5 //Sleeping agent
var/BZ_trip_balls_min = 1 //BZ gas
@@ -53,6 +57,9 @@
var/tox_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
var/tox_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
var/tox_damage_type = TOX
var/methane_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
var/methane_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
var/methane_damage_type = OXY
var/cold_message = "your face freezing and an icicle forming"
var/cold_level_1_threshold = 260
@@ -129,6 +136,8 @@
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)
else if(safe_ch3br_min)
H.throw_alert("not_enough_ch3br", /obj/screen/alert/not_enough_ch3br)
return FALSE
var/gas_breathed = 0
@@ -138,6 +147,8 @@
var/N2_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/nitrogen))
var/Toxins_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/plasma))
var/CO2_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/carbon_dioxide))
var/CH4_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/methane))
var/CH3Br_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/methyl_bromide))
//-- OXY --//
@@ -278,6 +289,58 @@
breath.adjust_moles(/datum/gas/carbon_dioxide, gas_breathed)
gas_breathed = 0
//-- METHANE --//
//Too much methane!
if(safe_methane_max)
if(CH4_pp > safe_methane_max) //Same effect as excess nitrogen, generally nontoxic
var/ratio = (breath.get_moles(/datum/gas/methane)/safe_methane_max) * 10
H.apply_damage_type(clamp(ratio, methane_breath_dam_min, methane_breath_dam_max), methane_damage_type)
H.throw_alert("too_much_ch4", /obj/screen/alert/too_much_ch4)
H.losebreath += 2
else
H.clear_alert("too_much_ch4")
//Too little methane!
if(safe_methane_min)
if(CH4_pp < safe_methane_min)
gas_breathed = handle_too_little_breath(H, CH4_pp, safe_methane_min, breath.get_moles(/datum/gas/methane))
H.throw_alert("not_enough_ch4", /obj/screen/alert/not_enough_ch4)
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-breathModifier)
gas_breathed = breath.get_moles(/datum/gas/methane)
H.clear_alert("not_enough_ch4")
//Exhale
breath.adjust_moles(/datum/gas/methane, -gas_breathed)
breath.adjust_moles(/datum/gas/methyl_bromide, gas_breathed)
gas_breathed = 0
//-- CH3BR --//
//Too much methyl bromide!
if(safe_ch3br_max)
if(CH3Br_pp > safe_ch3br_max)
if(prob(CH3Br_pp/0.5))
H.adjustOrganLoss(ORGAN_SLOT_LUNGS, 3, 150) //Inhaling this is a bad idea
if(prob(CH3Br_pp/2))
to_chat(H, "<span class='alert'>Your throat closes up!</span>")
H.silent = max(H.silent, 3)
H.throw_alert("too_much_ch3br", /obj/screen/alert/too_much_ch3br)
else
H.clear_alert("too_much_ch3br")
//Too little methyl bromide!
if(safe_ch3br_min)
if(CH3Br_pp < safe_ch3br_min)
gas_breathed = handle_too_little_breath(H, CH3Br_pp, safe_ch3br_min, breath.get_moles(/datum/gas/methyl_bromide))
H.throw_alert("not_enough_ch3br", /obj/screen/alert/not_enough_ch3br)
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-breathModifier)
gas_breathed = breath.get_moles(/datum/gas/methyl_bromide)
H.clear_alert("not_enough_ch3br")
//-- TRACES --//
@@ -498,7 +561,6 @@
owner.losebreath = 20
owner.adjustOrganLoss(ORGAN_SLOT_LUNGS, 25)
/obj/item/organ/lungs/cybernetic/upgraded
name = "upgraded cybernetic lungs"
desc = "A more advanced version of the stock cybernetic lungs. They are capable of filtering out lower levels of toxins and carbon dioxide."