Skip to content

Commit

Permalink
Traumakit: Generalize strip check (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
TwelveEyes authored Aug 21, 2021
1 parent 77a8ba6 commit f9fb91d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions medical/module/traumakit/traumakit.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,13 @@ class UaS_TraumaKit : HDWeapon {
bool HandleStrip() {
if (!autostrip) { autostrip = CVar.GetCVar("hd_autostrip", owner.player); }
string itemname, imperative;
// check for worn items, otherwise exit early
// check for intervening items, otherwise exit early
bool intervening = !HDPlayerPawn.CheckStrip(patient, patient, false);
if(!intervening) return true;

if(patient.countinv("WornRadsuit")) { itemname = "environment suit "; }
else if(patient.countinv("HDArmourWorn")) { itemname = "armour "; }
else { return true; }
else { itemname = "worn layers "; }

// check owner or other
if(patient == owner) {
Expand Down

0 comments on commit f9fb91d

Please sign in to comment.