@@ -22,6 +22,7 @@ if not Cryptid then
2222 Cryptid = {}
2323end
2424local mod_path = " " .. SMODS .current_mod .path -- this path changes when each mod is loaded, but the local variable will retain Cryptid's path
25+ Cryptid .path = mod_path
2526Cryptid_config = SMODS .current_mod .config
2627-- This will save the current state even when settings are modified
2728Cryptid .enabled = copy_table (Cryptid_config )
@@ -192,67 +193,65 @@ function SMODS.injectItems(...)
192193 cry_update_obj_registry ()
193194end
194195
195- local cryptidTabs = function ()
196- return {
196+ local cryptidConfigTab = function ()
197+ cry_nodes = {
197198 {
198- label = localize (" cry_set_features" ),
199- chosen = true ,
200- tab_definition_function = function ()
201- cry_nodes = {
202- {
203- n = G .UIT .R ,
204- config = { align = " cm" },
205- nodes = {
206- {
207- n = G .UIT .O ,
208- config = {
209- object = DynaText ({
210- string = localize (" cry_set_enable_features" ),
211- colours = { G .C .WHITE },
212- shadow = true ,
213- scale = 0.4 ,
214- }),
215- },
216- },
217- },
218- },
219- }
220- left_settings = { n = G .UIT .C , config = { align = " tl" , padding = 0.05 }, nodes = {} }
221- right_settings = { n = G .UIT .C , config = { align = " tl" , padding = 0.05 }, nodes = {} }
222- config =
223- { n = G .UIT .R , config = { align = " tm" , padding = 0 }, nodes = { left_settings , right_settings } }
224- cry_nodes [# cry_nodes + 1 ] = config
225- cry_nodes [# cry_nodes + 1 ] = UIBox_button ({
226- button = " your_collection_content_sets" ,
227- label = { localize (" b_content_sets" ) },
228- count = modsCollectionTally (G .P_CENTER_POOLS [" Content Set" ]),
229- minw = 5 ,
230- minh = 1.7 ,
231- scale = 0.6 ,
232- id = " your_collection_jokers" ,
233- })
234- -- Make this not require a restart later
235- cry_nodes [# cry_nodes + 1 ] = create_toggle ({
236- label = localize (" cry_family" ),
237- active_colour = G .C .MONEY ,
238- ref_table = Cryptid_config ,
239- ref_value = " family_mode" ,
240- })
241- return {
242- n = G .UIT .ROOT ,
199+ n = G .UIT .R ,
200+ config = { align = " cm" },
201+ nodes = {
202+ {
203+ n = G .UIT .O ,
243204 config = {
244- emboss = 0.05 ,
245- minh = 6 ,
246- r = 0.1 ,
247- minw = 10 ,
248- align = " cm" ,
249- padding = 0.2 ,
250- colour = G .C .BLACK ,
205+ object = DynaText ({
206+ string = localize (" cry_set_enable_features" ),
207+ colours = { G .C .WHITE },
208+ shadow = true ,
209+ scale = 0.4 ,
210+ }),
251211 },
252- nodes = cry_nodes ,
253- }
254- end ,
212+ },
213+ },
255214 },
215+ }
216+ left_settings = { n = G .UIT .C , config = { align = " tl" , padding = 0.05 }, nodes = {} }
217+ right_settings = { n = G .UIT .C , config = { align = " tl" , padding = 0.05 }, nodes = {} }
218+ config =
219+ { n = G .UIT .R , config = { align = " tm" , padding = 0 }, nodes = { left_settings , right_settings } }
220+ cry_nodes [# cry_nodes + 1 ] = config
221+ cry_nodes [# cry_nodes + 1 ] = UIBox_button ({
222+ button = " your_collection_content_sets" ,
223+ label = { localize (" b_content_sets" ) },
224+ count = modsCollectionTally (G .P_CENTER_POOLS [" Content Set" ]),
225+ minw = 5 ,
226+ minh = 1.7 ,
227+ scale = 0.6 ,
228+ id = " your_collection_jokers" ,
229+ })
230+ -- Add warning UI later for family mode
231+ cry_nodes [# cry_nodes + 1 ] = create_toggle ({
232+ label = localize (" cry_family" ),
233+ active_colour = G .C .MONEY ,
234+ ref_table = Cryptid_config ,
235+ ref_value = " family_mode" ,
236+ callback = reload_cryptid_localization
237+ })
238+ return {
239+ n = G .UIT .ROOT ,
240+ config = {
241+ emboss = 0.05 ,
242+ minh = 6 ,
243+ r = 0.1 ,
244+ minw = 10 ,
245+ align = " cm" ,
246+ padding = 0.2 ,
247+ colour = G .C .BLACK ,
248+ },
249+ nodes = cry_nodes ,
250+ }
251+ end
252+
253+ local cryptidTabs = function ()
254+ return {
256255 {
257256 label = localize (" cry_set_music" ),
258257 tab_definition_function = function ()
@@ -319,3 +318,4 @@ local cryptidTabs = function()
319318 }
320319end
321320SMODS .current_mod .extra_tabs = cryptidTabs
321+ SMODS .current_mod .config_tab = cryptidConfigTab
0 commit comments