From 93b4570f8d4b6888d4a2a12d35b333c2cbcd7c8c Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Fri, 17 Jul 2020 23:23:47 +0100 Subject: [PATCH] more changes --- code/game/atoms.dm | 6 +++-- code/game/objects/items/devices/scanners.dm | 8 ++++-- code/modules/clothing/suits/wiz_robe.dm | 2 +- .../modules/mining/equipment/explorer_gear.dm | 6 +---- code/modules/mob/living/carbon/carbon.dm | 2 +- .../simple_animal/hostile/megafauna/drake.dm | 9 +++++-- .../nanites/nanite_programs/utility.dm | 4 ++- code/modules/surgery/tools.dm | 18 +++++++++++++ code/modules/vending/_vending.dm | 27 ++++++++++++++----- code/modules/vending/medical.dm | 7 ++++- code/modules/vending/medical_wall.dm | 2 ++ code/modules/zombie/items.dm | 3 +++ 12 files changed, 73 insertions(+), 21 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index fd922729ab..9cf334e5f3 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -997,13 +997,15 @@ Proc for attack log creation, because really why not * * base_roll- Base wounding ability of an attack is a random number from 1 to (dealt_damage ** WOUND_DAMAGE_EXPONENT). This is the number that was rolled in there, before mods */ /proc/log_wound(atom/victim, datum/wound/suffered_wound, dealt_damage, dealt_wound_bonus, dealt_bare_wound_bonus, base_roll) - var/message = "has suffered: [suffered_wound] to [suffered_wound.limb.name]" // maybe indicate if it's a promote/demote? + if(QDELETED(victim) || !suffered_wound) + return + var/message = "has suffered: [suffered_wound][suffered_wound.limb ? " to [suffered_wound.limb.name]" : null]"// maybe indicate if it's a promote/demote? if(dealt_damage) message += " | Damage: [dealt_damage]" // The base roll is useful since it can show how lucky someone got with the given attack. For example, dealing a cut if(base_roll) - message += "(rolled [base_roll]/[dealt_damage ** WOUND_DAMAGE_EXPONENT])" + message += " (rolled [base_roll]/[dealt_damage ** WOUND_DAMAGE_EXPONENT])" if(dealt_wound_bonus) message += " | WB: [dealt_wound_bonus]" diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 5f86320830..2011943bfb 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -542,8 +542,12 @@ GENETICS SCANNER render_list += "" if(render_list == "") - playsound(scanner, 'sound/machines/ping.ogg', 50, FALSE) - to_chat(user, "\The [scanner] makes a happy ping and briefly displays a smiley face with several exclamation points! It's really excited to report that [patient] has no wounds!") + if(istype(scanner)) + // Only emit the cheerful scanner message if this scan came from a scanner + playsound(scanner, 'sound/machines/ping.ogg', 50, FALSE) + to_chat(user, "\The [scanner] makes a happy ping and briefly displays a smiley face with several exclamation points! It's really excited to report that [patient] has no wounds!") + else + to_chat(user, "No wounds detected in subject.") else to_chat(user, jointext(render_list, "")) diff --git a/code/modules/clothing/suits/wiz_robe.dm b/code/modules/clothing/suits/wiz_robe.dm index fc783936da..94273d2c73 100644 --- a/code/modules/clothing/suits/wiz_robe.dm +++ b/code/modules/clothing/suits/wiz_robe.dm @@ -4,7 +4,7 @@ icon_state = "wizard" gas_transfer_coefficient = 0.01 // IT'S MAGICAL OKAY JEEZ +1 TO NOT DIE permeability_coefficient = 0.01 - armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 100, "acid" = 100) + armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 100, "acid" = 100, "wound" = 20) strip_delay = 50 equip_delay_other = 50 resistance_flags = FIRE_PROOF | ACID_PROOF diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm index 09562a2a52..cda38033c2 100644 --- a/code/modules/mining/equipment/explorer_gear.dm +++ b/code/modules/mining/equipment/explorer_gear.dm @@ -5,10 +5,8 @@ icon_state = "explorer" item_state = "explorer" body_parts_covered = CHEST|GROIN|LEGS|ARMS - min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT cold_protection = CHEST|GROIN|LEGS|ARMS - max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT - heat_protection = CHEST|GROIN|LEGS|ARMS + min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT hoodtype = /obj/item/clothing/head/hooded/explorer armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 50) flags_inv = HIDEJUMPSUIT|HIDETAUR @@ -24,8 +22,6 @@ flags_inv = HIDEHAIR|HIDEFACE|HIDEEARS min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT cold_protection = HEAD - max_heat_protection_temperature = FIRE_HELM_MAX_TEMP_PROTECT - heat_protection = HEAD armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 50, "wound" = 10) resistance_flags = FIRE_PROOF diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index c8c5bba9f9..62c78fe007 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -123,7 +123,7 @@ if(hit_atom.density && isturf(hit_atom)) if(hurt) DefaultCombatKnockdown(20) - take_bodypart_damage(10 + 5 * extra_speed, check_armor = TRUE, wound_bonus = extra_speed) + take_bodypart_damage(10 + 5 * extra_speed, check_armor = TRUE, wound_bonus = extra_speed * 5) if(iscarbon(hit_atom) && hit_atom != src) var/mob/living/carbon/victim = hit_atom if(victim.movement_type & FLYING) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm index 062a4c9a43..a1ecde40b8 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm @@ -4,6 +4,11 @@ #define SWOOP_DAMAGEABLE 1 #define SWOOP_INVULNERABLE 2 +///used whenever the drake generates a hotspot +#define DRAKE_FIRE_TEMP 500 +///used whenever the drake generates a hotspot +#define DRAKE_FIRE_EXPOSURE 50 + /* ASH DRAKE @@ -148,7 +153,7 @@ Difficulty: Medium break range-- new /obj/effect/hotspot(J) - J.hotspot_expose(700,50,1) + J.hotspot_expose(DRAKE_FIRE_TEMP, DRAKE_FIRE_EXPOSURE, 1) for(var/mob/living/L in J.contents - hit_things) if(istype(L, /mob/living/simple_animal/hostile/megafauna/dragon)) continue @@ -404,7 +409,7 @@ Difficulty: Medium if(istype(T, /turf/closed)) break new /obj/effect/hotspot(T) - T.hotspot_expose(700,50,1) + T.hotspot_expose(DRAKE_FIRE_TEMP,DRAKE_FIRE_EXPOSURE,1) for(var/mob/living/L in T.contents) if(L in hit_list || L == source) continue diff --git a/code/modules/research/nanites/nanite_programs/utility.dm b/code/modules/research/nanites/nanite_programs/utility.dm index ebe623d73d..f5372738db 100644 --- a/code/modules/research/nanites/nanite_programs/utility.dm +++ b/code/modules/research/nanites/nanite_programs/utility.dm @@ -51,7 +51,7 @@ rogue_types = list(/datum/nanite_program/toxic) /datum/nanite_program/self_scan/register_extra_settings() - extra_settings[NES_SCAN_TYPE] = new /datum/nanite_extra_setting/type("Medical", list("Medical", "Chemical", "Nanite")) + extra_settings[NES_SCAN_TYPE] = new /datum/nanite_extra_setting/type("Medical", list("Medical", "Chemical", "Wound", "Nanite")) /datum/nanite_program/self_scan/on_trigger(comm_message) if(host_mob.stat == DEAD) @@ -62,6 +62,8 @@ healthscan(host_mob, host_mob) if("Chemical") chemscan(host_mob, host_mob) + if("Wound") + woundscan(host_mob, host_mob) if("Nanite") SEND_SIGNAL(host_mob, COMSIG_NANITE_SCAN, host_mob, TRUE) diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index 584a0a189a..150016f570 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -166,6 +166,7 @@ sharpness = IS_SHARP_ACCURATE tool_behaviour = TOOL_SCALPEL toolspeed = 1 + bare_wound_bonus = 20 /obj/item/scalpel/Initialize() . = ..() @@ -247,6 +248,8 @@ sharpness = IS_SHARP tool_behaviour = TOOL_SAW toolspeed = 1 + wound_bonus = 10 + bare_wound_bonus = 15 /obj/item/circular_saw/Initialize() . = ..() @@ -374,3 +377,18 @@ advanced_surgeries |= OC.advanced_surgeries return TRUE return + +/obj/item/bonesetter + name = "bonesetter" + desc = "For setting things right." + icon = 'icons/obj/surgery.dmi' + icon_state = "bone setter" + lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + custom_materials = list(/datum/material/iron=5000, /datum/material/glass=2500) + flags_1 = CONDUCT_1 + item_flags = SURGICAL_TOOL + w_class = WEIGHT_CLASS_SMALL + attack_verb = list("corrected", "properly set") + tool_behaviour = TOOL_BONESET + toolspeed = 1 diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 7adf0512de..2a8e8763a2 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -479,7 +479,7 @@ GLOBAL_LIST_EMPTY(vending_products) var/crit_case if(crit) - crit_case = rand(1,5) + crit_case = rand(1,6) if(forcecrit) crit_case = forcecrit @@ -491,7 +491,7 @@ GLOBAL_LIST_EMPTY(vending_products) if(istype(C)) var/crit_rebate = 0 // lessen the normal damage we deal for some of the crits - if(crit_case != 5) // the head asplode case has its own description + if(crit_case < 5) // the head asplode case has its own description C.visible_message("[C] is crushed by [src]!", \ "You are crushed by [src]!") @@ -501,10 +501,10 @@ GLOBAL_LIST_EMPTY(vending_products) C.bleed(150) var/obj/item/bodypart/l_leg/l = C.get_bodypart(BODY_ZONE_L_LEG) if(l) - l.receive_damage(brute=200, updating_health=TRUE) + l.receive_damage(brute=200) var/obj/item/bodypart/r_leg/r = C.get_bodypart(BODY_ZONE_R_LEG) if(r) - r.receive_damage(brute=200, updating_health=TRUE) + r.receive_damage(brute=200) if(l || r) C.visible_message("[C]'s legs shatter with a sickening crunch!", \ "Your legs shatter with a sickening crunch!") @@ -526,7 +526,18 @@ GLOBAL_LIST_EMPTY(vending_products) // the new paraplegic gets like 4 lines of losing their legs so skip them visible_message("[C]'s spinal cord is obliterated with a sickening crunch!", ignored_mobs = list(C)) C.gain_trauma(/datum/brain_trauma/severe/paralysis/spinesnapped) - if(5) // skull squish! + if(5) // limb squish! + for(var/i in C.bodyparts) + var/obj/item/bodypart/squish_part = i + if(squish_part.is_organic_limb()) + //var/type_wound = pick(WOUND_LIST_BONE) + var/type_wound = pick(list(/datum/wound/brute/bone/critical, /datum/wound/brute/bone/severe, /datum/wound/brute/bone/critical, /datum/wound/brute/bone/severe, /datum/wound/brute/bone/moderate)) + squish_part.force_wound_upwards(type_wound) + else + squish_part.receive_damage(brute=30) + C.visible_message("[C]'s body is maimed underneath the mass of [src]!", \ + "Your body is maimed underneath the mass of [src]!") + if(6) // skull squish! var/obj/item/bodypart/head/O = C.get_bodypart(BODY_ZONE_HEAD) if(O) C.visible_message("[O] explodes in a shower of gore beneath [src]!", \ @@ -536,7 +547,11 @@ GLOBAL_LIST_EMPTY(vending_products) qdel(O) new /obj/effect/gibspawner/human/bodypartless(get_turf(C)) - C.apply_damage(max(0, squish_damage - crit_rebate), forced=TRUE, spread_damage=TRUE) + if(prob(30)) + C.apply_damage(max(0, squish_damage - crit_rebate), forced=TRUE, spread_damage=TRUE) // the 30% chance to spread the damage means you escape breaking any bones + else + C.take_bodypart_damage((squish_damage - crit_rebate)*0.5, wound_bonus = 5) // otherwise, deal it to 2 random limbs (or the same one) which will likely shatter something + C.take_bodypart_damage((squish_damage - crit_rebate)*0.5, wound_bonus = 5) C.AddElement(/datum/element/squish, 18 SECONDS) else L.visible_message("[L] is crushed by [src]!", \ diff --git a/code/modules/vending/medical.dm b/code/modules/vending/medical.dm index fbd9a10bf2..34de3b490c 100644 --- a/code/modules/vending/medical.dm +++ b/code/modules/vending/medical.dm @@ -29,7 +29,12 @@ /obj/item/storage/hypospraykit/brute = 2, /obj/item/storage/hypospraykit/enlarge = 2, /obj/item/reagent_containers/glass/bottle/vial/small = 5, - /obj/item/storage/briefcase/medical = 2) + /obj/item/storage/briefcase/medical = 2, + /obj/item/stack/sticky_tape/surgical = 3, + /obj/item/healthanalyzer/wound = 4, + /obj/item/stack/medical/ointment = 2, + /obj/item/stack/medical/suture = 2, + /obj/item/stack/medical/bone_gel = 4) contraband = list(/obj/item/reagent_containers/pill/tox = 3, /obj/item/reagent_containers/pill/morphine = 4, /obj/item/reagent_containers/pill/charcoal = 6) diff --git a/code/modules/vending/medical_wall.dm b/code/modules/vending/medical_wall.dm index 09719e1d56..31f3dc49f1 100644 --- a/code/modules/vending/medical_wall.dm +++ b/code/modules/vending/medical_wall.dm @@ -11,6 +11,8 @@ /obj/item/reagent_containers/medspray/silver_sulf = 2, /obj/item/reagent_containers/pill/charcoal = 2, /obj/item/reagent_containers/medspray/sterilizine = 1, + /obj/item/healthanalyzer/wound = 2, + /obj/item/stack/medical/bone_gel = 2, /obj/item/reagent_containers/syringe/dart = 10) contraband = list(/obj/item/reagent_containers/pill/tox = 2, /obj/item/reagent_containers/pill/morphine = 2) diff --git a/code/modules/zombie/items.dm b/code/modules/zombie/items.dm index d4d92f54c4..f98705872f 100644 --- a/code/modules/zombie/items.dm +++ b/code/modules/zombie/items.dm @@ -14,6 +14,9 @@ force = 21 // Just enough to break airlocks with melee attacks damtype = "brute" total_mass = TOTAL_MASS_HAND_REPLACEMENT + sharpness = IS_SHARP + wound_bonus = -30 + bare_wound_bonus = 15 /obj/item/zombie_hand/Initialize() . = ..()