Skip to content

Commit

Permalink
add MassValueKilled stat
Browse files Browse the repository at this point in the history
  • Loading branch information
clyfordv committed Apr 23, 2024
1 parent 423d0f0 commit efc2493
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lua/defaultcomponents.lua
Expand Up @@ -607,10 +607,12 @@ VeterancyComponent = ClassSimple {

-- optionally, these fields are defined too to inform UI of our veterancy status
if blueprint.VetEnabled then
self:UpdateStat('VetLevel', 0)
self:UpdateStat('VetExperience', 0)
self:UpdateStat('VetLevel', 0)
self:UpdateStat('MassValueKilled', 0)
self.VetExperience = 0
self.VetLevel = 0
self.MassValueKilled = 0
end
end,

Expand Down Expand Up @@ -658,6 +660,11 @@ VeterancyComponent = ClassSimple {
return
end

-- Update a mass value killed stat, not used
-- by veterancy but potentially useful to the player
self.MassValueKilled = self.MassValueKilled + experience
self:UpdateStat('MassValueKilled', self.MassValueKilled)

local currExperience = self.VetExperience
local currLevel = self.VetLevel

Expand Down

0 comments on commit efc2493

Please sign in to comment.