-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHudControl.lua
More file actions
153 lines (126 loc) · 3.93 KB
/
Copy pathHudControl.lua
File metadata and controls
153 lines (126 loc) · 3.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
--[[
HudControl
Author:
Museus (Discord: Museus#7777)
Optionally toggle parts of the Hades HUD
]]
ModUtil.RegisterMod("HudControl")
HudControl.config = {
Enabled = true,
-- Enemies
RemoveEnemyHealthBars = true,
-- Zagreus
RemoveZagreusHealthBars = true,
RemoveZagreusCallMeter = true,
RemoveZagreusRailAmmo = true,
RemoveZagreusCasts = true,
RemoveSideBar = true,
-- Resources
RemoveObols = true,
RemoveNectar = true,
RemoveDarkness = true,
RemoveGems = true,
RemoveKeys = true,
RemoveTitansBlood = true,
RemoveDiamonds = true,
RemoveAmbrosia = true,
RemoveRerolls = true,
-- Information
RemoveHeat = true,
}
-- Define mapping of Resource names to config options
-- for use with the ShowResourceUI function wrapper
HudControl.ResourceConfigMap = {
GiftPoints = "RemoveNectar",
MetaPoints = "RemoveDarkness",
Gems = "RemoveGems",
LockKeys = "RemoveKeys",
SuperLockKeys = "RemoveTitansBlood",
SuperGems = "RemoveDiamonds",
SuperGiftPoints = "RemoveAmbrosia"
}
-- Enemy Health Bars
-- Scripts/CombatPresentation.lua : 65
ModUtil.WrapBaseFunction("CreateHealthBar", function ( baseFunc, newEnemy )
if HudControl.config.Enabled and HudControl.config.RemoveEnemyHealthBars then
return
end
baseFunc( newEnemy )
end, HudControl)
-- Zagreus Health Bar
-- Scripts/UIScripts.lua : 434
ModUtil.WrapBaseFunction("ShowHealthUI", function ( baseFunc )
if HudControl.config.Enabled and HudControl.config.RemoveZagreusHealthBars then
return
end
baseFunc()
end, HudControl)
-- Zagreus Casts
-- Scripts/UIScripts.lua : 908
ModUtil.WrapBaseFunction("ShowAmmoUI", function ( baseFunc )
if HudControl.config.Enabled and HudControl.config.RemoveZagreusCasts then
return
end
baseFunc()
end, HudControl)
-- Zagreus Rail Ammo
-- Scripts/UIScripts.lua : 966
ModUtil.WrapBaseFunction("ShowGunUI", function ( baseFunc, gunData )
if HudControl.config.Enabled and HudControl.config.RemoveZagreusRailAmmo then
return
end
baseFunc( gunData )
end, HudControl)
-- Zagreus Call
-- Scripts/UIScripts.lua : 1061
ModUtil.WrapBaseFunction("ShowSuperMeter", function ( baseFunc )
if HudControl.config.Enabled and HudControl.config.RemoveZagreusCallMeter then
return
end
baseFunc()
end, HudControl)
-- Obols
-- Scripts/UIScripts.lua : 739
ModUtil.WrapBaseFunction("ShowMoneyUI", function ( baseFunc, offsetY )
if HudControl.config.Enabled and HudControl.config.RemoveObols then
return
end
baseFunc( offsetY )
end, HudControl)
-- Boons/Keepsake Sidebar
-- Scripts/UIScripts.lua : 1265
ModUtil.WrapBaseFunction("ShowTraitUI", function ( baseFunc )
if HudControl.config.Enabled and HudControl.config.RemoveSideBar then
return
end
baseFunc()
end, HudControl)
-- Active Heat
-- Scripts/UIScripts.lua : 2901
ModUtil.WrapBaseFunction("UpdateActiveShrinePoints", function ( baseFunc )
if HudControl.config.Enabled and HudControl.config.RemoveHeat then
if ScreenAnchors.ShrinePointIconId ~= nil then
HideObstacle({ Id = ScreenAnchors.ShrinePointIconId, Duration = 0.2, IncludeText = true, })
end
return
end
baseFunc()
end, HudControl)
-- Available Rerolls
-- Scripts/UIScripts.lua : 684
ModUtil.WrapBaseFunction("ShowRerollUI", function ( baseFunc, offsetY )
if HudControl.config.Enabled and HudControl.config.RemoveRerolls then
return
end
baseFunc( offsetY )
end, HudControl)
-- Resources
-- Scripts/UIScripts.lua : 585
ModUtil.WrapBaseFunction("ShowResourceUI", function ( baseFunc, resourceName, offsetY, args )
local resourceConfigOption = HudControl.ResourceConfigMap[resourceName]
local shouldRemoveResource = HudControl.config[resourceConfigOption]
if HudControl.config.Enabled and shouldRemoveResource then
return
end
baseFunc( resourceName, offsetY, args )
end, HudControl)