Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
Add status effects
Browse files Browse the repository at this point in the history
This adds status effects for bonked, burning, jarated, and milked
conditions.
  • Loading branch information
dalegaard committed Oct 4, 2019
1 parent 3b1f34d commit 38ce543
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CastingEssentials/Modules/HUDHacking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ const char* HUDHacking::GetStatusEffectFormatString(StatusEffect effect)
case StatusEffect::Battalions: return "%sbattalions_backup_%s";
case StatusEffect::Bleeding: return "%sbleeding_%s";
case StatusEffect::MarkedForDeath: return "%smarked_for_death_%s";
case StatusEffect::Burning: return "%sburning_%s";
case StatusEffect::Bonked: return "%sbonked_%s";
case StatusEffect::Jarated: return "%sjarated_%s";
case StatusEffect::Milked: return "%smilked_%s";
}

PluginWarning("Programmer error: Unknown StatusEffect %i in " __FUNCTION__ "()\n", (int)effect);
Expand Down Expand Up @@ -364,10 +368,18 @@ HUDHacking::StatusEffect HUDHacking::GetStatusEffect(const Player& player)
return StatusEffect::Concheror;
else if (player.CheckCondition(TFCond::TFCond_DefenseBuffed))
return StatusEffect::Battalions;
else if (player.CheckCondition(TFCond::TFCond_Bonked))
return StatusEffect::Bonked;
else if (player.CheckCondition(TFCond::TFCond_OnFire))
return StatusEffect::Burning;
else if (player.CheckCondition(TFCond::TFCond_Bleeding))
return StatusEffect::Bleeding;
else if (player.CheckCondition(TFCond::TFCond_MarkedForDeath) || player.CheckCondition(TFCond::TFCond_MarkedForDeathSilent))
return StatusEffect::MarkedForDeath;
else if (player.CheckCondition(TFCond::TFCond_Jarated))
return StatusEffect::Jarated;
else if (player.CheckCondition(TFCond::TFCond_Milked))
return StatusEffect::Milked;
}

return StatusEffect::None;
Expand Down
4 changes: 4 additions & 0 deletions CastingEssentials/Modules/HUDHacking.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ class HUDHacking final : public Module<HUDHacking>
Battalions,
Bleeding,
MarkedForDeath,
Burning,
Bonked,
Jarated,
Milked,

COUNT,
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"UnlitGeneric"
{
"$basetexture" "effects/bonk"
"$translucent" 1
"$ignorez" 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"UnlitGeneric"
{
"$basetexture" "effects/bonk"
"$translucent" 1
"$ignorez" 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"UnlitGeneric"
{
"$basetexture" "hud/leaderboard_class_pyro"
"$translucent" 1
"$ignorez" 1

// Alternative icon
// "$basetexture" "cyoa/cyoa_pyro_icon"
// $color "{79 117 144}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"UnlitGeneric"
{
"$basetexture" "hud/leaderboard_class_pyro"
"$translucent" 1
"$ignorez" 1

// Alternative icon
// "$basetexture" "cyoa/cyoa_pyro_icon"
// $color "{188 66 66}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"UnlitGeneric"
{
"$basetexture" "effects/jarated"
"$translucent" 1
"$ignorez" 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"UnlitGeneric"
{
"$basetexture" "effects/jarated"
"$translucent" 1
"$ignorez" 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"UnlitGeneric"
{
"$basetexture" "vgui/bleed_drop"
"$translucent" 1
"$ignorez" 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"UnlitGeneric"
{
"$basetexture" "vgui/bleed_drop"
"$translucent" 1
"$ignorez" 1
}

0 comments on commit 38ce543

Please sign in to comment.