Skip to content

Commit

Permalink
qol: deal_overall_damage now can be configured to damage robotic limb…
Browse files Browse the repository at this point in the history
…s, Pentetic Acid no longer damages robotic limbs (#3986)
  • Loading branch information
Vladisvell authored Dec 5, 2023
1 parent 3b515bb commit 6ffc361
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 5 additions & 3 deletions code/modules/mob/living/carbon/human/human_damage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,11 @@
return parts

//Returns a list of damageable organs
/mob/living/carbon/human/proc/get_damageable_organs()
/mob/living/carbon/human/proc/get_damageable_organs(affect_robotic = TRUE)
var/list/obj/item/organ/external/parts = list()
for(var/obj/item/organ/external/O in bodyparts)
if(!affect_robotic && O.is_robotic())
continue
if(O.brute_dam + O.burn_dam < O.max_damage)
parts += O
return parts
Expand Down Expand Up @@ -334,10 +336,10 @@
UpdateDamageIcon()

// damage MANY external organs, in random order
/mob/living/carbon/human/take_overall_damage(brute, burn, updating_health = TRUE, used_weapon = null, sharp = 0, edge = 0)
/mob/living/carbon/human/take_overall_damage(brute, burn, updating_health = TRUE, used_weapon = null, sharp = 0, edge = 0, affect_robotic = 1)
if(status_flags & GODMODE)
return ..() //godmode
var/list/obj/item/organ/external/parts = get_damageable_organs()
var/list/obj/item/organ/external/parts = get_damageable_organs(affect_robotic)

var/update = 0
while(parts.len && (brute>0 || burn>0) )
Expand Down
9 changes: 7 additions & 2 deletions code/modules/reagents/chemistry/reagents/medicine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,13 @@
if(prob(75))
update_flags |= M.adjustToxLoss(-2, FALSE)
if(prob(33))
update_flags |= M.adjustBruteLoss(0.5, FALSE)
update_flags |= M.adjustFireLoss(0.5, FALSE)
if(ishuman(M))
var/mob/living/carbon/human/human = M
human.take_overall_damage(0.5, 0.5, FALSE, affect_robotic = FALSE)
else
update_flags |= M.adjustBruteLoss(0.5, FALSE)
update_flags |= M.adjustFireLoss(0.5, FALSE)

return ..() | update_flags

/datum/reagent/medicine/sal_acid
Expand Down

0 comments on commit 6ffc361

Please sign in to comment.