Skip to content

Commit

Permalink
no_collection bugfixes (collection count, alerts)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurelius7309 committed Dec 21, 2024
1 parent 2f633bf commit 3b4edab
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
33 changes: 32 additions & 1 deletion lovely/ui.toml
Original file line number Diff line number Diff line change
Expand Up @@ -356,4 +356,35 @@ payload = 'not part.control.C and args.text_colour or loc_colour(part.control.C
target = 'functions/misc_functions.lua'
position = 'after'
pattern = 'part\.control\.s and tonumber\(part\.control\.s\)'
payload = ' or args.scale '
payload = ' or args.scale '

# set_discover_tallies()
# exclude no_collection objects
[[patches]]
[patches.pattern]
target = 'functions/misc_functions.lua'
match_indent = true
position = 'at'
pattern = "if not v.omit then"
payload = "if not v.omit and not v.no_collection then"

[[patches]]
[patches.regex]
target = 'functions/misc_functions.lua'
line_prepend = '$indent'
position = 'at'
pattern = '(?<indent>[\t ]*)(?<start>for _, v in pairs\(G\.P_[BT].*)(?<rest>(\n.*){7})'
payload = '''$start
if not v.no_collection then
$rest
end
'''

#set_alerts()
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
match_indent = true
position = 'at'
pattern = "if v.discovered and not v.alerted then"
payload = "if v.discovered and not v.alerted and not v.no_collection then"
2 changes: 1 addition & 1 deletion src/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ function modsCollectionTally(pool, set)
local obj_tally = {tally = 0, of = 0}

for _, v in pairs(pool) do
if v.mod and G.ACTIVE_MOD_UI.id == v.mod.id then
if v.mod and G.ACTIVE_MOD_UI.id == v.mod.id and not v.no_collection then
if set then
if v.set and v.set == set then
obj_tally.of = obj_tally.of+1
Expand Down
2 changes: 1 addition & 1 deletion version.lua
Original file line number Diff line number Diff line change
@@ -1 +1 @@
return "1.0.0~ALPHA-1220a-STEAMODDED"
return "1.0.0~ALPHA-1221a-STEAMODDED"

0 comments on commit 3b4edab

Please sign in to comment.