Skip to content

Commit c01b5b9

Browse files
committed
autoload prompt: replace "cancel" with "don't show this again"
and change the default
1 parent d1b92ac commit c01b5b9

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lua/pac3/editor/client/saved_parts.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ end
9696

9797
local last_backup
9898
local maxBackups = CreateConVar("pac_backup_limit", "100", {FCVAR_ARCHIVE}, "Maximal amount of backups")
99-
local autoload_prompt = CreateConVar("pac_prompt_for_autoload", "1", {FCVAR_ARCHIVE}, "Whether to ask before loading autoload. The prompt can let you choose to not load, pick autoload or the newest backup")
99+
local autoload_prompt = CreateConVar("pac_prompt_for_autoload", "0", {FCVAR_ARCHIVE}, "Whether to ask before loading autoload. The prompt can let you choose to not load, pick autoload or the newest backup")
100100
local auto_spawn_prop = CreateConVar("pac_autoload_preferred_prop", "2", {FCVAR_ARCHIVE}, "When loading a pac with an owner name suggesting a prop, notify you and then wait before auto-applying the outfit next time you spawn a prop.\n" ..
101101
"0 : do not check\n1 : check if only 1 such group is present\n2 : check if multiple such groups are present and queue one group at a time")
102102

lua/pac3/editor/client/wear.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ do
305305
local backup_files, directories = file.Find( "pac3/__backup/*.txt", "DATA", "datedesc")
306306
local latest_outfit = cookie.GetString( "pac_last_loaded_outfit", "" )
307307
if not backup_files then
308-
local pnl = Derma_Query("Do you want to load your autoload outfit?", "PAC3 autoload (pac_prompt_for_autoload)",
308+
local pnl = Derma_Query("Do you want to load your autoload outfit?\nclick outside the window to cancel", "PAC3 autoload (pac_prompt_for_autoload)",
309309
"load pac3/autoload.txt : " .. string.NiceSize(file.Size("pac3/autoload.txt", "DATA")), function()
310310
pac.Message("Wearing autoload...")
311311
pace.LoadParts("autoload")
@@ -321,13 +321,13 @@ do
321321
end
322322
end,
323323

324-
"cancel", function() pac.Message("Not loading autoload or backups...") end
324+
"don't show this again", function() GetConVar("pac_prompt_for_autoload"):SetBool(false) end
325325
)
326326
pnl.Think = function() if not pnl:HasFocus() or (input.IsMouseDown(MOUSE_LEFT) and not (pnl:IsHovered() or pnl:IsChildHovered())) then pnl:Remove() end end
327327
else
328328
if backup_files[1] then
329329
local latest_autosave = "pac3/__backup/" .. backup_files[1]
330-
local pnl = Derma_Query("Do you want to load an outfit?", "PAC3 autoload (pac_prompt_for_autoload)",
330+
local pnl = Derma_Query("Do you want to load an outfit?\nclick outside the window to cancel", "PAC3 autoload (pac_prompt_for_autoload)",
331331
"load pac3/autoload.txt : " .. string.NiceSize(file.Size("pac3/autoload.txt", "DATA")), function()
332332
pac.Message("Wearing autoload...")
333333
pace.LoadParts("autoload")
@@ -348,18 +348,18 @@ do
348348
end
349349
end,
350350

351-
"cancel", function() pac.Message("Not loading autoload or backups...") end
351+
"don't show this again", function() GetConVar("pac_prompt_for_autoload"):SetBool(false) end
352352
)
353353
pnl.Think = function() if not pnl:HasFocus() or (input.IsMouseDown(MOUSE_LEFT) and not (pnl:IsHovered() or pnl:IsChildHovered())) then pnl:Remove() end end
354354
else
355-
local pnl = Derma_Query("Do you want to load your autoload outfit?", "PAC3 autoload (pac_prompt_for_autoload)",
355+
local pnl = Derma_Query("Do you want to load your autoload outfit?\nclick outside the window to cancel", "PAC3 autoload (pac_prompt_for_autoload)",
356356
"load pac3/autoload.txt : " .. string.NiceSize(file.Size("pac3/autoload.txt", "DATA")), function()
357357
pac.Message("Wearing autoload...")
358358
pace.LoadParts("autoload")
359359
pace.WearParts()
360360
end,
361361

362-
"cancel", function() pac.Message("Not loading autoload or backups...") end
362+
"don't show this again", function() GetConVar("pac_prompt_for_autoload"):SetBool(false) end
363363
)
364364
pnl.Think = function() if not pnl:HasFocus() or (input.IsMouseDown(MOUSE_LEFT) and not (pnl:IsHovered() or pnl:IsChildHovered())) then pnl:Remove() end end
365365
end

0 commit comments

Comments
 (0)