Skip to content

Commit 3f4ee2c

Browse files
committed
Version 1.0
Hopefully release version
1 parent 38ac89e commit 3f4ee2c

16 files changed

+69
-26
lines changed

Main.lua

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
_G.VoidUI = _G.VoidUI or {}
2+
VoidUI.Warning = 0
23
VoidUI.mod_path = ModPath
34
VoidUI.options_path = SavePath .. "VoidUI.txt"
45
VoidUI.options = {}
@@ -141,6 +142,7 @@ function VoidUI:DefaultConfig()
141142
scoreboard_playtime = true,
142143
scoreboard_ping = true,
143144
trophies = true,
145+
save_warning = false,
144146
scoreboard_skins = 2,
145147
scoreboard_kills = 3,
146148
ping_frequency = 2,
@@ -229,17 +231,21 @@ Hooks:Add("MenuManagerInitialize", "MenuManagerInitialize_VoidUI", function(menu
229231
if scoreboard then
230232
scoreboard._items_list[1]:set_value(item:value())
231233
end
234+
if VoidUI.Warning == 0 then VoidUI.Warning = 1 end
232235
end
233236
MenuCallbackHandler.basic_option_clbk = function(self, item)
234237
VoidUI.options[item:parameters().name] = item:value()
238+
if VoidUI.Warning == 0 then VoidUI.Warning = 1 end
235239
VoidUI:UpdateMenu()
236240
end
237241
MenuCallbackHandler.toggle_option_clbk = function(self, item)
238242
VoidUI.options[item:parameters().name] = (item:value() == "on" and true or false)
243+
if VoidUI.Warning == 0 then VoidUI.Warning = 1 end
239244
VoidUI:UpdateMenu()
240245
end
241246

242247
MenuCallbackHandler.callback_VoidUI_reset = function(self, item)
248+
VoidUI.Warning = 0
243249
local buttons = {
244250
[1] = {
245251
text = managers.localization:text("dialog_yes"),
@@ -265,9 +271,30 @@ Hooks:Add("MenuManagerInitialize", "MenuManagerInitialize_VoidUI", function(menu
265271
}
266272
QuickMenu:new( managers.localization:text("VoidUI_reset_title"), managers.localization:text("VoidUI_reset_confirm"), buttons, true )
267273
end
268-
269274
MenuCallbackHandler.VoidUI_save = function(self, item)
270275
VoidUI:Save()
276+
end
277+
278+
MenuCallbackHandler.VoidUI_warning_save = function(self, item)
279+
VoidUI:Save()
280+
if managers.hud and not VoidUI.options.save_warning and VoidUI.Warning == 1 then
281+
local buttons = {
282+
[1] = {
283+
text = managers.localization:text("dialog_ok"),
284+
callback = function(self, item)
285+
VoidUI.Warning = 2
286+
end
287+
},
288+
[2] = {
289+
text = managers.localization:text("VoidUI_warning_confirm"),
290+
callback = function(self, item)
291+
VoidUI.options.save_warning = true
292+
VoidUI:Save()
293+
end
294+
}
295+
}
296+
QuickMenu:new(managers.localization:text("VoidUI_warning_title"), managers.localization:text("VoidUI_warning_desc"), buttons, true )
297+
end
271298
end
272299

273300
VoidUI:DefaultConfig()

changelog.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
Version 1.0
2+
- Civilian kills now increment the normal kill counter as well
3+
- Fixed ex-president heal bar being retarded
4+
- Fixed scoreboard panels not being correctly aligned when there are no bots
5+
- Fixed main players ping sometimes having the wrong color
6+
- Fixed downed interaction showing the complete animation even when the interaction didnt complete
7+
- Fixed crime spree level not being the correct size on the police badge when the assault panel is not the default size
8+
- Made the background of the suspicion panel a bit more transparent
9+
10+
Version 0.7 (2017.09.19)
111
- Reworked how the police badge works
212
- Added a crime spree version of the police badge
313
- Added golden text and border for completed trophy and side-job presenters
File renamed without changes.

loc/english.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
"VoidUI_reset_title" : "Reset Options",
4141
"VoidUI_reset_desc" : "Reset every option to their default configuration",
4242
"VoidUI_reset_confirm" : "Are you sure you want to reset Void UI to the default configuration? This can not be undone.",
43+
"VoidUI_warning_title" : "Options changed",
44+
"VoidUI_warning_desc" : "Some options might not take effect immediately and will require a game reload",
45+
"VoidUI_warning_confirm" : "Dont show again",
4346

4447
"VoidUI_hudteammate_title" : "Player and Teammate panels",
4548
"VoidUI_hudteammate_desc" : "Options related to the main player and teammates panels",
@@ -146,7 +149,7 @@
146149
"VoidUI_waypoint_offscreen_desc" : "Show waypoints when their source is out of view",
147150

148151
"VoidUI_interact_title" : "Interaction and Detection",
149-
"VoidUI_options_desc" : "Options related to the interaction panel and the stealth detection panel",
152+
"VoidUI_interact_desc" : "Options related to the interaction panel and the stealth detection panel",
150153
"VoidUI_interact" : "Interaction panel",
151154
"VoidUI_interact_scale_title" : "Interaction Scale",
152155
"VoidUI_interact_scale_desc" : "Set the scale of the interaction panel",

lua/HudAssaultCorner.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ if RequiredScript == "lib/managers/hud/hudassaultcorner" then
10491049
if assaultbox_skulls then
10501050
assaultbox_skulls:set_size(icon_assaultbox:w(), icon_assaultbox:h())
10511051
assaultbox_skulls:set_center(icon_assaultbox:center())
1052-
if crime_spree then assaultbox_skulls:set_font_size(math.lerp((spree_size + 2) * self._scale, spree_size, t / TOTAL_T)) end
1052+
if crime_spree then assaultbox_skulls:set_font_size(math.lerp((spree_size + 2) * self._scale, spree_size * self._scale, t / TOTAL_T)) end
10531053
end
10541054
end
10551055
if VoidUI.options.show_badge and VoidUI.options.anim_badge and big_logo then
@@ -1140,7 +1140,7 @@ if RequiredScript == "lib/managers/hud/hudassaultcorner" then
11401140
if skulls and assaultbox_skulls then
11411141
assaultbox_skulls:set_size(icon_assaultbox:w(), icon_assaultbox:h())
11421142
assaultbox_skulls:set_center(icon_assaultbox:center())
1143-
if crime_spree then assaultbox_skulls:set_font_size(math.lerp(d and spree_size * self._scale or (spree_size + 2) * self._scale, d and (spree_size + 2) * self._scale or spree_size * self._scale, t / TOTAL_T)) end
1143+
if crime_spree then assaultbox_skulls:set_font_size(math.lerp(d and spree_size or spree_size + (2 * self._scale), d and spree_size + (2 * self._scale) or spree_size, t / TOTAL_T)) end
11441144
end
11451145

11461146
if

lua/HudManager.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ if RequiredScript == "lib/managers/hudmanager" then
254254
self._hud_interaction:set_interaction_bar_width(t, total)
255255
self._hud_interaction:show_interact({text = utf8.to_upper(managers.localization:text(msg))})
256256
end
257+
self._hud_interaction:remove_interact()
258+
self._hud_interaction:hide_interaction_bar(true)
257259
end
258260
self._hud_interaction._interact_bar:stop()
259261
self._hud_interaction._interact_bar:animate(feed_circle, total)
@@ -263,7 +265,7 @@ if RequiredScript == "lib/managers/hudmanager" then
263265
return
264266
end
265267
self._hud_interaction:remove_interact()
266-
self._hud_interaction:hide_interaction_bar(true)
268+
self._hud_interaction:hide_interaction_bar(false)
267269
self._hud_player_downed:show_timer()
268270
end
269271
function HUDManager:pd_start_timer(data)
@@ -320,7 +322,7 @@ elseif RequiredScript == "lib/managers/hudmanagerpd2" then
320322
if character_data then
321323
local panel_id = (managers.criminals:character_peer_id_by_unit(killer_unit) == managers.network:session():local_peer():id() and HUDManager.PLAYER_PANEL) or (character_data and character_data.panel_id and character_data.panel_id)
322324
self._hud_statsscreen._scoreboard_panels[panel_id]:add_stat(stat)
323-
if stat == "specials" and VoidUI.options.scoreboard_kills == 3 then self._hud_statsscreen._scoreboard_panels[panel_id]:add_stat("kills") end
325+
if stat == "civs" or (stat == "specials" and VoidUI.options.scoreboard_kills == 3) then self._hud_statsscreen._scoreboard_panels[panel_id]:add_stat("kills") end
324326
end
325327
end
326328
end

lua/HudScoreboard.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ if RequiredScript == "lib/managers/hud/hudstatsscreen" then
700700
for i, panel in ipairs(self._scoreboard_panels) do
701701
panel._panel:set_h(panel._taken and panel._h or 0)
702702
panel._panel:set_visible(panel._taken)
703-
panel._panel:set_y(i == 1 and 0 or self._scoreboard_panels[i - 1]._panel:bottom() + 5)
703+
panel._panel:set_y(i == 1 and 0 or (panel._taken and self._scoreboard_panels[i - 1]._panel:bottom() + 5 or self._scoreboard_panels[i - 1]._panel:bottom()))
704704
extras_panel:set_center_x(self._full_hud_panel:child("scoreboard_panel"):center_x())
705705
extras_panel:set_y(panel._panel:world_bottom() + 5)
706706
end
@@ -1145,10 +1145,9 @@ elseif RequiredScript == "lib/managers/hudmanagerpd2" then
11451145
skill_icon:set_visible(ai)
11461146
secondary_icon:set_w(VoidUI.options.scoreboard_weapons and (ai and self._h * 0.8 or self._h * 1.8) or 0)
11471147
secondary_icon:set_center_x(secondary_bg:center_x())
1148-
1148+
ping:set_color(ai and Color.white or Color.green)
11491149
if ai then
11501150
ping:set_text("AI")
1151-
ping:set_color(Color.white)
11521151
local unit = managers.criminals:character_unit_by_name(character_name)
11531152
local loadout = unit and unit:base()._loadout
11541153
if loadout then

lua/HudSuspicion.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function HUDSuspicion:init(hud, sound_source)
115115
name = "left_background",
116116
texture = "guis/textures/VoidUI/hud_extras",
117117
texture_rect = {309,150, -309,88},
118-
alpha = 0.3,
118+
alpha = 0.2,
119119
layer = 0,
120120
w = 130 * self._scale,
121121
h = 20 * self._scale,
@@ -125,7 +125,7 @@ function HUDSuspicion:init(hud, sound_source)
125125
name = "right_background",
126126
texture = "guis/textures/VoidUI/hud_extras",
127127
texture_rect = {0,150,309,88},
128-
alpha = 0.3,
128+
alpha = 0.2,
129129
layer = 0,
130130
w = 130 * self._scale,
131131
h = 20 * self._scale,
@@ -143,7 +143,7 @@ function HUDSuspicion:init(hud, sound_source)
143143
valign = "center",
144144
layer = 1
145145
})
146-
suspicion_detected:set_center(self._suspicion_fill_panel:center())
146+
suspicion_detected:set_center(suspicion_rate:center())
147147
self._eye_animation = nil
148148
self._suspicion_value = 0
149149
self._hud_timeout = 0

lua/HudTeammate.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,6 +1932,9 @@ function HUDTeammate:set_stored_health_max(stored_health_ratio)
19321932
h = self._bg_h,
19331933
alpha = 1,
19341934
})
1935+
health_stored_max:set_color(health_stored_bg:color() * (Color.white * 0.5))
1936+
health_stored_max:set_right(health_panel:x() + (11 * self._main_scale))
1937+
health_stored_max:set_bottom(self._custom_player_panel:h())
19351938
else
19361939
health_stored_max:set_color(health_stored_bg:color() * (Color.white * 0.5))
19371940
health_stored_max:set_right(health_panel:x() + (11 * self._main_scale))

menu/assault.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"default_value" : 1,
1818
"max" : 2,
1919
"min" : 0.65,
20-
"step" : 0.1,
20+
"step" : 0.01,
2121
"localized" : true
2222
"priority" : 6
2323
},

0 commit comments

Comments
 (0)