5656local function process_items (f , mod )
5757 local ret = f ()
5858 if not ret .disabled then
59- if ret .init then ret :init () end
59+ if ret .init then
60+ ret :init ()
61+ end
6062 if ret .items then
6163 for _ , item in ipairs (ret .items ) do
6264 if mod then
@@ -72,10 +74,14 @@ local function process_items(f, mod)
7274 item .atlas = mod .prefix .. " _" .. item .atlas
7375 end
7476 -- this will also display the mod's own badge
75- if not item .dependencies then item .dependencies = {} end
77+ if not item .dependencies then
78+ item .dependencies = {}
79+ end
7680 item .dependencies [# item .dependencies + 1 ] = mod .id
7781 end
78- if item .init then item :init () end
82+ if item .init then
83+ item :init ()
84+ end
7985 --[[ if not item.gameset_config then
8086 -- by default, disable on modest
8187 item.gameset_config = {
@@ -183,113 +189,124 @@ function SMODS.injectItems(...)
183189 cry_update_obj_registry ()
184190end
185191
186- local cryptidTabs = function () return {
187- {
188- label = localize (" cry_set_features" ),
189- chosen = true ,
190- tab_definition_function = function ()
191- cry_nodes = {
192- {
193- n = G .UIT .R ,
194- config = { align = " cm" },
195- nodes = {
196- {
197- n = G .UIT .O ,
198- config = {
199- object = DynaText ({
200- string = localize (" cry_set_enable_features" ),
201- colours = { G .C .WHITE },
202- shadow = true ,
203- scale = 0.4 ,
204- }),
192+ local cryptidTabs = function ()
193+ return {
194+ {
195+ label = localize (" cry_set_features" ),
196+ chosen = true ,
197+ tab_definition_function = function ()
198+ cry_nodes = {
199+ {
200+ n = G .UIT .R ,
201+ config = { align = " cm" },
202+ nodes = {
203+ {
204+ n = G .UIT .O ,
205+ config = {
206+ object = DynaText ({
207+ string = localize (" cry_set_enable_features" ),
208+ colours = { G .C .WHITE },
209+ shadow = true ,
210+ scale = 0.4 ,
211+ }),
212+ },
205213 },
206214 },
207215 },
208- },
209- }
210- left_settings = { n = G .UIT .C , config = { align = " tl" , padding = 0.05 }, nodes = {} }
211- right_settings = { n = G .UIT .C , config = { align = " tl" , padding = 0.05 }, nodes = {} }
212- config = { n = G .UIT .R , config = { align = " tm" , padding = 0 }, nodes = { left_settings , right_settings } }
213- cry_nodes [# cry_nodes + 1 ] = config
214- cry_nodes [# cry_nodes + 1 ] = UIBox_button ({button = ' your_collection_content_sets' , label = {localize (' b_content_sets' )}, count = modsCollectionTally (G .P_CENTER_POOLS [" Content Set" ]), minw = 5 , minh = 1.7 , scale = 0.6 , id = ' your_collection_jokers' })
216+ }
217+ left_settings = { n = G .UIT .C , config = { align = " tl" , padding = 0.05 }, nodes = {} }
218+ right_settings = { n = G .UIT .C , config = { align = " tl" , padding = 0.05 }, nodes = {} }
219+ config =
220+ { n = G .UIT .R , config = { align = " tm" , padding = 0 }, nodes = { left_settings , right_settings } }
221+ cry_nodes [# cry_nodes + 1 ] = config
222+ cry_nodes [# cry_nodes + 1 ] = UIBox_button ({
223+ button = " your_collection_content_sets" ,
224+ label = { localize (" b_content_sets" ) },
225+ count = modsCollectionTally (G .P_CENTER_POOLS [" Content Set" ]),
226+ minw = 5 ,
227+ minh = 1.7 ,
228+ scale = 0.6 ,
229+ id = " your_collection_jokers" ,
230+ })
215231
216- return {
217- n = G .UIT .ROOT ,
218- config = {
219- emboss = 0.05 ,
220- minh = 6 ,
221- r = 0.1 ,
222- minw = 10 ,
223- align = " cm" ,
224- padding = 0.2 ,
225- colour = G .C .BLACK ,
226- },
227- nodes = cry_nodes ,
228- }
229- end ,
230- },
231- {
232- label = localize (" cry_set_music" ),
233- tab_definition_function = function ()
234- -- TODO: Add a button here to reset all Cryptid achievements.
235- -- If you want to do that now, add this to the SMODS.InjectItems in Steamodded/loader/loader.lua
236- --[[ fetch_achievements()
232+ return {
233+ n = G .UIT .ROOT ,
234+ config = {
235+ emboss = 0.05 ,
236+ minh = 6 ,
237+ r = 0.1 ,
238+ minw = 10 ,
239+ align = " cm" ,
240+ padding = 0.2 ,
241+ colour = G .C .BLACK ,
242+ },
243+ nodes = cry_nodes ,
244+ }
245+ end ,
246+ },
247+ {
248+ label = localize (" cry_set_music" ),
249+ tab_definition_function = function ()
250+ -- TODO: Add a button here to reset all Cryptid achievements.
251+ -- If you want to do that now, add this to the SMODS.InjectItems in Steamodded/loader/loader.lua
252+ --[[ fetch_achievements()
237253 for k, v in pairs(SMODS.Achievements) do
238254 G.SETTINGS.ACHIEVEMENTS_EARNED[k] = nil
239255 G.ACHIEVEMENTS[k].earned = nil
240256 end
241257 fetch_achievements()]]
242- cry_nodes = {
243- {
244- n = G .UIT .R ,
245- config = { align = " cm" },
246- nodes = {
247- -- {n=G.UIT.O, config={object = DynaText({string = "", colours = {G.C.WHITE}, shadow = true, scale = 0.4})}},
258+ cry_nodes = {
259+ {
260+ n = G .UIT .R ,
261+ config = { align = " cm" },
262+ nodes = {
263+ -- {n=G.UIT.O, config={object = DynaText({string = "", colours = {G.C.WHITE}, shadow = true, scale = 0.4})}},
264+ },
265+ },
266+ }
267+ settings = { n = G .UIT .C , config = { align = " tl" , padding = 0.05 }, nodes = {} }
268+ settings .nodes [# settings .nodes + 1 ] = create_toggle ({
269+ label = localize (" cry_mus_jimball" ),
270+ ref_table = Cryptid_config .Cryptid ,
271+ ref_value = " jimball_music" ,
272+ })
273+ settings .nodes [# settings .nodes + 1 ] = create_toggle ({
274+ label = localize (" cry_mus_code" ),
275+ ref_table = Cryptid_config .Cryptid ,
276+ ref_value = " code_music" ,
277+ })
278+ settings .nodes [# settings .nodes + 1 ] = create_toggle ({
279+ label = localize (" cry_mus_exotic" ),
280+ ref_table = Cryptid_config .Cryptid ,
281+ ref_value = " exotic_music" ,
282+ })
283+ settings .nodes [# settings .nodes + 1 ] = create_toggle ({
284+ label = localize (" cry_mus_high_score" ),
285+ ref_table = Cryptid_config .Cryptid ,
286+ ref_value = " big_music" ,
287+ })
288+ settings .nodes [# settings .nodes + 1 ] = create_toggle ({
289+ label = localize (" cry_mus_alt_bg" ),
290+ ref_table = Cryptid_config .Cryptid ,
291+ ref_value = " alt_bg_music" ,
292+ })
293+ config = { n = G .UIT .R , config = { align = " tm" , padding = 0 }, nodes = { settings } }
294+ cry_nodes [# cry_nodes + 1 ] = config
295+ return {
296+ n = G .UIT .ROOT ,
297+ config = {
298+ emboss = 0.05 ,
299+ minh = 6 ,
300+ r = 0.1 ,
301+ minw = 10 ,
302+ align = " cm" ,
303+ padding = 0.2 ,
304+ colour = G .C .BLACK ,
248305 },
249- },
250- }
251- settings = { n = G .UIT .C , config = { align = " tl" , padding = 0.05 }, nodes = {} }
252- settings .nodes [# settings .nodes + 1 ] = create_toggle ({
253- label = localize (" cry_mus_jimball" ),
254- ref_table = Cryptid_config .Cryptid ,
255- ref_value = " jimball_music" ,
256- })
257- settings .nodes [# settings .nodes + 1 ] = create_toggle ({
258- label = localize (" cry_mus_code" ),
259- ref_table = Cryptid_config .Cryptid ,
260- ref_value = " code_music" ,
261- })
262- settings .nodes [# settings .nodes + 1 ] = create_toggle ({
263- label = localize (" cry_mus_exotic" ),
264- ref_table = Cryptid_config .Cryptid ,
265- ref_value = " exotic_music" ,
266- })
267- settings .nodes [# settings .nodes + 1 ] = create_toggle ({
268- label = localize (" cry_mus_high_score" ),
269- ref_table = Cryptid_config .Cryptid ,
270- ref_value = " big_music" ,
271- })
272- settings .nodes [# settings .nodes + 1 ] = create_toggle ({
273- label = localize (" cry_mus_alt_bg" ),
274- ref_table = Cryptid_config .Cryptid ,
275- ref_value = " alt_bg_music" ,
276- })
277- config = { n = G .UIT .R , config = { align = " tm" , padding = 0 }, nodes = { settings } }
278- cry_nodes [# cry_nodes + 1 ] = config
279- return {
280- n = G .UIT .ROOT ,
281- config = {
282- emboss = 0.05 ,
283- minh = 6 ,
284- r = 0.1 ,
285- minw = 10 ,
286- align = " cm" ,
287- padding = 0.2 ,
288- colour = G .C .BLACK ,
289- },
290- nodes = cry_nodes ,
291- }
292- end ,
293- },
294- } end
306+ nodes = cry_nodes ,
307+ }
308+ end ,
309+ },
310+ }
311+ end
295312SMODS .current_mod .extra_tabs = cryptidTabs
0 commit comments