diff --git a/Hud3.lua b/Hud3.lua index e08bdc4..abe85da 100644 --- a/Hud3.lua +++ b/Hud3.lua @@ -5,7 +5,7 @@ feel free to ask me through my mail: zenyr(at)zenyr.com. But please understand t ]] -- Note: Due to quirky PreCommit hook, revision number would *appear to* be 1 revision before than "released" luac files. local _ = UNDERSCORE -local REV = 388 +local REV = 389 local TAG = '0.31' local inGame = CopDamage ~= nil local inGameDeep @@ -41,6 +41,7 @@ local _BAGS = { local _BROADCASTHDR, _BROADCASTHDR_HIDDEN = Icon.Div,Icon.Ghost local skillIcon = 'guis/textures/pd2/skilltree/icons_atlas' +local perkIcon = 'guis/textures/pd2/specialization/icons_atlas' local now = function (type) return type and TimerManager:game():time() or managers.player:player_timer():time() end local _conv = { city_swat = L('_mob_city_swat'), @@ -701,6 +702,22 @@ function TPocoHud3:_checkBuff(t) self:RemoveBuff('stamina') end end + -- KillSkills + local plrManager = managers.player + local t = Application:time() + local killshotT = plrManager._on_killshot_t + if (killshotT and killshotT > t) then + local left = killshotT - t + local total = tweak_data.upgrades.on_killshot_cooldown + self:Buff({ + key= 'killshot', good=false, + icon= perkIcon, + iconRect = { 3*64, 5*64, 64, 64 }, + st=1-left/total, et=1 + }) + else + self:RemoveBuff('killshot') + end -- Suppression local supp = _.g('managers.player:player_unit():character_damage():effective_suppression_ratio()') if supp and supp > 0 then @@ -1629,6 +1646,8 @@ function TPocoHud3:_hook() rectDict.first_aid_damage_reduction = {L('_buff_first_aid_damage_reduction_upgrade'),{1,11}} rectDict.melee_life_leech = {L('_buff_lifeLeechShort'),{7,4},true,true} rectDict.dmg_dampener_close_contact = {L('_buff_first_aid_damage_reduction_upgrade'),{5,4},true} + rectDict.loose_ammo_give_team = {L('_buff_gambler_ammo'),{5,5},true} + rectDict.loose_ammo_restore_health = {L('_buff_gambler_health'),{4,5},true} local _keys = { -- Better names for Option pnls BerserkerDamageMultiplier = 'SwanSong', @@ -1639,7 +1658,9 @@ function TPocoHud3:_hook() OverkillDamageMultiplier = 'Overkill', NoAmmoCost = 'Bulletstorm', MeleeLifeLeech = 'LifeLeech', - DmgDampenerCloseContact = 'CloseCombat' + DmgDampenerCloseContact = 'CloseCombat', -- infiltrator + LooseAmmoRestoreHealth = 'GamblerAmmo', + LooseAmmoGiveTeam = 'GamblerHealth', } hook( PlayerManager, 'activate_temporary_upgrade', function( self, category, upgrade ) Run('activate_temporary_upgrade', self, category, upgrade ) diff --git a/Hud3_Options.lua b/Hud3_Options.lua index 32838fb..40c9f34 100644 --- a/Hud3_Options.lua +++ b/Hud3_Options.lua @@ -60,6 +60,9 @@ local scheme = { showFirstAid = {'bool',TRUE,nil,'_opt_showFirstAid_desc'}, showLifeLeech = {'bool',TRUE,nil,'_opt_showLifeLeech_desc'}, showCloseCombat = {'bool',TRUE,nil,'_opt_showCloseCombat_desc'}, + showKillshot = {'bool',FALSE,nil,'_opt_showKillshot_desc'}, + showGamblerAmmo = {'bool',TRUE,nil,'_opt_showGambler_desc'}, + showGamblerHealth = {'bool',TRUE,nil,'_opt_showGambler_desc'}, noSprintDelay = {'bool',TRUE,nil,'_opt_noSprintDelay_desc',nil,nil,4}, hideInteractionCircle = {'bool',FALSE,nil,'_opt_hideInteractionCircle_desc',nil,nil,4}, diff --git a/hud3_localeEN.json b/hud3_localeEN.json index c6b473e..71f89d0 100644 --- a/hud3_localeEN.json +++ b/hud3_localeEN.json @@ -19,6 +19,8 @@ "_buff_combatMedicDamageShort": "Attack Buff", "_buff_exhausted": "Exhausted", "_buff_first_aid_damage_reduction_upgrade": "Defense Buff", + "_buff_gambler_ammo": "Ammo", + "_buff_gambler_health": "Health", "_buff_lifeLeechShort": "Life Leech", "_buff_overkillShort": "Attack Buff", "_buff_painkillerShort": "Defense Buff", @@ -299,6 +301,9 @@ "_opt_showFirstAid_desc": "Show 'Quick fix Aced' skill buff duration", "_opt_showFPS": "SHOW FPS", "_opt_showFPS_desc": "Show FPS", + "_opt_showGamblerAmmo": "SHOW GAMBLER AMMO", + "_opt_showGamblerHealth": "SHOW GAMBLER HEALTH", + "_opt_showGambler_desc": "Show gambler perk's each cooldowns", "_opt_showHighlighted": "SHOW HIGHLIGHTED", "_opt_showHighlighted_desc": "Show floating infobox while highlighted.\nPager answering timer also depends on this.", "_opt_showHostages": "SHOW HOSTAGES", @@ -316,6 +321,8 @@ "_opt_showInteractionTime_desc": "How much time left", "_opt_showKill": "SHOW KILL", "_opt_showKill_desc": "Kill counter", + "_opt_showKillshot": "SHOW KILLSKILLS", + "_opt_showKillshot_desc": "Show kill skills' cooldowns (e.g. Sociopath perk)", "_opt_showLifeLeech": "SHOW LIFE DRAIN", "_opt_showLifeLeech_desc": "Show Infiltrator 10% life leech cooldown", "_opt_showMusicTitle": "SHOW MUSIC TITLE",