Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevents kitting undamaged limbs #10191

Merged
merged 3 commits into from
May 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions code/modules/mob/living/carbon/human/life/handle_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@
I.take_damage(rand(3,5))

//Moving makes open wounds get infected much faster
if(prob((E.brute_dam - (E.limb_wound_status & LIMB_WOUND_BANDAGED ? 50 : 0)) * 4))
E.germ_level++
if(!(E.limb_wound_status & LIMB_WOUND_DISINFECTED) && E.brute_dam >= 20)
if(prob((E.brute_dam - (E.limb_wound_status & LIMB_WOUND_BANDAGED ? 50 : 0)) * 4))
E.germ_level++

if(E.name in list("l_leg", "l_foot", "r_leg", "r_foot") && !lying_angle)
if(!E.is_usable() || E.is_malfunctioning() || ( E.is_broken() && !(E.limb_status & LIMB_SPLINTED) && !(E.limb_status & LIMB_STABILIZED) ) )
Expand Down
6 changes: 3 additions & 3 deletions code/modules/organs/limbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ Note that amputating the affected organ does in fact remove the infection from t


/datum/limb/proc/bandage()
if(limb_wound_status & LIMB_WOUND_BANDAGED)
if(limb_wound_status & LIMB_WOUND_BANDAGED || !brute_dam)
return 0
limb_wound_status ^= LIMB_WOUND_BANDAGED
return 1
Expand All @@ -802,7 +802,7 @@ Note that amputating the affected organ does in fact remove the infection from t
return limb_wound_status & LIMB_WOUND_BANDAGED

/datum/limb/proc/disinfect()
if(limb_wound_status & LIMB_WOUND_DISINFECTED)
if(limb_wound_status & LIMB_WOUND_DISINFECTED || (burn_dam < 20 && brute_dam < 20))
return 0
limb_wound_status ^= LIMB_WOUND_DISINFECTED
return 1
Expand All @@ -820,7 +820,7 @@ Note that amputating the affected organ does in fact remove the infection from t
return 1

/datum/limb/proc/salve()
if(limb_wound_status & LIMB_WOUND_SALVED)
if(limb_wound_status & LIMB_WOUND_SALVED || !burn_dam)
return 0
limb_wound_status ^= LIMB_WOUND_SALVED
return 1
Expand Down