diff --git a/code/__defines/damage_organs.dm b/code/__defines/damage_organs.dm index 6221e24bdd0..2e03f85800f 100644 --- a/code/__defines/damage_organs.dm +++ b/code/__defines/damage_organs.dm @@ -10,6 +10,7 @@ #define CUT "cut" #define BRUISE "bruise" #define PIERCE "pierce" +#define LASER "laser" #define DAM_LASER 1 #define DAM_BULLET 2 @@ -63,3 +64,10 @@ #define BLOOD_VOLUME_OKAY 70 #define BLOOD_VOLUME_BAD 60 #define BLOOD_VOLUME_SURVIVE 30 + +// These control the amount of blood lost from burns. The loss is calculated so +// that dealing just enough burn damage to kill the player will cause the given +// proportion of their max blood volume to be lost +// (e.g. 0.6 == 60% lost if 200 burn damage is taken). +#define FLUIDLOSS_WIDE_BURN 0.6 //for burns from heat applied over a wider area, like from fire +#define FLUIDLOSS_CONC_BURN 0.4 //for concentrated burns, like from lasers diff --git a/code/__defines/dna.dm b/code/__defines/dna.dm index 1655659da68..1be4cd0e1fa 100644 --- a/code/__defines/dna.dm +++ b/code/__defines/dna.dm @@ -11,7 +11,7 @@ #define FAT 6 #define HUSK 7 #define NOCLONE 8 -#define LASER 9 // Harm intent - click anywhere to shoot lasers from eyes. +#define LASER_EYES 9 // Harm intent - click anywhere to shoot lasers from eyes. #define HEAL 10 // Healing people with hands. #define SKELETON 29 diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index d651287eccc..5f5bba24f3b 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -209,7 +209,7 @@ */ /mob/proc/RangedAttack(var/atom/A, var/params) if(!mutations.len) return - if((LASER in mutations) && a_intent == I_HURT) + if((LASER_EYES in mutations) && a_intent == I_HURT) LaserEyes(A, params) // moved into a proc below else if(TK in mutations) switch(get_dist(src,A)) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index e8a67b9bae4..a9e209f338e 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -36,7 +36,7 @@ if(!(gloves || mutations.len || glasses)) return var/obj/item/clothing/gloves/GV = gloves var/obj/item/clothing/glasses/GS = glasses - if((LASER in mutations) && a_intent == I_HURT) + if((LASER_EYES in mutations) && a_intent == I_HURT) LaserEyes(A) // moved into a proc below else if(istype(GS) && GS.Look(A,src,0)) // for goggles diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index 893118b1d57..80a712545d6 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -45,8 +45,8 @@ if (!(HULK in user.mutations)) user.mutations.Add(HULK) to_chat(user, "Your muscles hurt.") - if (!(LASER in user.mutations)) - user.mutations.Add(LASER) + if (!(LASER_EYES in user.mutations)) + user.mutations.Add(LASER_EYES) to_chat(user, "You feel pressure building behind your eyes.") if (!(COLD_RESISTANCE in user.mutations)) user.mutations.Add(COLD_RESISTANCE) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 2588fcd441c..cbce4aebd47 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -241,9 +241,9 @@ if(!org.is_usable()) status += "dangling uselessly" if(status.len) - src.show_message("My [org.name] is [english_list(status)].",1) + src.show_message("My [org.name] is [english_list(status)].",1) else - src.show_message("My [org.name] is OK.",1) + src.show_message("My [org.name] is OK.",1) if((isskeleton(H)) && (!H.w_uniform) && (!H.wear_suit)) H.play_xylophone() diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 8a4d49d7522..a2a68d1a460 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -463,4 +463,8 @@ This function restores all organs. if(stat == UNCONSCIOUS) traumatic_shock *= 0.6 - return max(0,traumatic_shock) \ No newline at end of file + return max(0,traumatic_shock) + +/mob/living/carbon/human/remove_blood_simple(var/blood) + if(should_have_organ(BP_HEART)) + vessel.remove_reagent("blood", blood) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 09681ca1279..cf538b678f9 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -431,7 +431,7 @@ There are several things that need to be remembered: standing.underlays += "telekinesishead[fat]_s" add_image = 1 */ - if(LASER) + if(LASER_EYES) standing.overlays += "lasereyes_s" add_image = 1 if(add_image) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 27c5e3212d5..d631c3a899d 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -1269,4 +1269,7 @@ proc/is_blind(A) result[1] = asight result[2] = ainvis - return result \ No newline at end of file + return result + +/mob/proc/remove_blood_simple(var/blood) + return \ No newline at end of file diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 0773e4ef9d0..234ae519ad7 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -252,6 +252,8 @@ brute *= brute_mod burn *= burn_mod + var/laser = (damage_flags & DAM_LASER) + add_pain(0.6*burn + 0.4*brute) if(status & ORGAN_BROKEN && prob(40) && brute) @@ -305,7 +307,10 @@ if(burn > 0 && can_inflict) //Inflict all burn damage we can - createwound(BURN, min(burn,can_inflict)) + if(laser) + createwound(LASER, min(burn, can_inflict)) + else + createwound(BURN, min(burn,can_inflict)) //How much burn damage is left to inflict spillover += max(0, burn - can_inflict) @@ -466,7 +471,8 @@ This function completely restores a damaged organ to perfect condition. /obj/item/organ/external/proc/createwound(var/type = CUT, var/damage) - if(damage == 0) return + + if(damage <= 0) return //moved this before the open_wound check so that having many small wounds for example doesn't somehow protect you from taking internal damage (because of the return) //Possibly trigger an internal wound, too. @@ -480,6 +486,15 @@ This function completely restores a damaged organ to perfect condition. if(internal_damage) owner.custom_pain("You feel something rip in your [name]!", 25) + //Burn damage can cause fluid loss due to blistering and cook-off + if((type in list(BURN, LASER)) && (damage > 5 || damage + burn_dam >= 15) && !BP_IS_ROBOTIC(src)) + var/fluid_loss_severity + switch(type) + if(BURN) fluid_loss_severity = FLUIDLOSS_WIDE_BURN + if(LASER) fluid_loss_severity = FLUIDLOSS_CONC_BURN + var/fluid_loss = (damage/(owner.maxHealth - config.health_threshold_dead)) * DEFAULT_BLOOD_AMOUNT * fluid_loss_severity + owner.remove_blood_simple(fluid_loss) + // first check whether we can widen an existing wound if(wounds.len > 0 && prob(max(50+(number_wounds-1)*10,90))) if((type == CUT || type == BRUISE) && damage >= 5) diff --git a/code/modules/spells/targeted/genetic.dm b/code/modules/spells/targeted/genetic.dm index 3bb69d81f33..453753e9977 100644 --- a/code/modules/spells/targeted/genetic.dm +++ b/code/modules/spells/targeted/genetic.dm @@ -73,7 +73,7 @@ code\game\dna\genes\goon_powers.dm max_targets = 1 cast_sound = 'sound/magic/Mutate.ogg' - mutations = list(LASER, HULK) + mutations = list(LASER_EYES, HULK) duration = 300 level_max = list(Sp_TOTAL = 1, Sp_SPEED = 1, Sp_POWER = 0) diff --git a/html/changelogs/mattatlas-laserfix.yml b/html/changelogs/mattatlas-laserfix.yml new file mode 100644 index 00000000000..c0c1d5415cb --- /dev/null +++ b/html/changelogs/mattatlas-laserfix.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: MattAtlas + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Burns now evaporate people's blood. Lasers evaporate less as they are more concentrated, while wide burns evaporate more."