-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.lua
More file actions
186 lines (161 loc) · 4.6 KB
/
main.lua
File metadata and controls
186 lines (161 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
--- MOD_NAME: Foolish Dreams (A Pseudoregalia mod)
--- MOD_ID: PseudoMod
--- MOD_AUTHOR: Northdoo MIIdris
--- PREFIX: cymbal
---Thanks for the Yahimod and the Balatro server to exist, otherwise i would have probably struggled a lot just for ONE joker.
------------MOD CODE -------------------------
PRegalia = SMODS.current_mod
PRegalia_path = SMODS.current_mod.path
PRegalia_config = SMODS.current_mod.config
---Config
PRegalia.config_tab = function()
return {
n = G.UIT.ROOT,
config = { align = "m", r = 0.1, minw = 5, minh = 1, padding = 0.1, colour = G.C.BLACK},
nodes = {
{ n = G.UIT.R, config = { align = "m", padding = 0, minh = 0.1 }, nodes = {
{ n = G.UIT.C, config = {align = "cl", padding =0},
nodes = { create_toggle { col = true, label = "", scale = 1, w = 0, shadow = true, ref_table = PRegalia_config, ref_value = "pip_menu" },
}
},
{ n = G.UIT.C, config = { align = "cr", padding = 0 },
nodes = {
{ n = G.UIT.T, config = { text = "Custom Menu", scale = 0.45, colour = G.C.UI.TEXT_LIGHT } },
}
},
}
},
}
}
end
---El Menu
G.C.PSEUDOGOLD = HEX("7082b8")
G.C.PSEUDOBLACK = HEX("111111")
G.C.mid_flash = 0
G.C.vort_time = 7
G.C.vort_speed = 0.3
-- from cryptid apparently
local oldfunc = Game.main_menu
Game.main_menu = function(self, change_context)
local ret = oldfunc(self, change_context)
if PRegalia.config.pip_menu then
G.SPLASH_BACK:define_draw_steps({
{
shader = "splash",
send = {
{ name = "time", ref_table = G.TIMERS, ref_value = "REAL_SHADER" },
{name = 'vort_speed', val = G.C.vort_speed},
{name = 'colour_1', ref_table = G.C, ref_value = 'PSEUDOBLACK'},
{name = 'colour_2', ref_table = G.C, ref_value = 'PSEUDOGOLD'},
{name = 'mid_flash', ref_table = G.C, ref_value = 'mid_flash'},
},
},
})
end
return ret
end
--pseudoregamod pool
SMODS.ObjectType({
key = "pseudoregamod",
default = "j_reserved_parking",
cards = {},
inject = function(self)
SMODS.ObjectType.inject(self)
-- insert base game food jokers
end,
})
--attires pool
SMODS.ObjectType({
key = "attires",
default = "j_spare_troussers",
cards = {},
inject = function(self)
SMODS.ObjectType.inject(self)
-- insert base game food jokers
end,
})
--pseudoregamod pool
SMODS.ObjectType({
key = "pr_locations",
default = "j_reserved_parking",
cards = {},
inject = function(self)
SMODS.ObjectType.inject(self)
-- insert base game food jokers
end,
})
--food
SMODS.ObjectType({
key = "pr_food",
default = "j_ice_cream",
cards = {
j_gros_michel = true,
j_egg = true,
j_ice_cream = true,
j_cavendish = true,
j_turtle_bean = true,
j_diet_cola = true,
j_popcorn = true,
j_ramen = true,
j_selzer = true,
},
inject = function(self)
SMODS.ObjectType.inject(self)
-- insert base game food jokers
end,
})
--book
SMODS.ObjectType({
key = "cymbal_books",
default = " j_ice_cream",
cards = {},
inject = function(self)
SMODS.ObjectType.inject(self)
-- insert base game food jokers
end,
})
--[[
--Joker Defniton be like :
if next(SMODS.find_mod("JokerDisplay")) then
SMODS.load_file("extra/joker_def.lua")()
end
--Card Sleeves be like :
if CardSleeves then
SMODS.Atlas { -- Main Sleeve Atlas
key = 'Sleeves',
path = "sleevetemplate.png",
px = 77,
py = 79
}
local sleeves = NFS.getDirectoryItems(SMODS.current_mod.path .. "/extra/sleeves")
for _, file in ipairs(sleeves) do
assert(SMODS.load_file("extra/sleeves/" .. file))()
end
end
Imagine retriggering Jokers
SMODS.current_mod.optional_features = {
retrigger_joker = true
}
]]
--Load item files
local files = NFS.getDirectoryItems(SMODS.current_mod.path .. "/items")
for _, file in ipairs(files) do
print("[PSEUDOMOD] Loading lua file " .. file)
local f, err = SMODS.load_file("items/" .. file)
if err then
error(err)
end
f()
end
--Load Localization file
local files = NFS.getDirectoryItems(SMODS.current_mod.path .. "/localization")
for _, file in ipairs(files) do
print("[PSEUDOMOD] Loading localization file " .. file)
local f, err = SMODS.load_file("localization/" .. file)
if err then
error(err)
end
f()
end
---------------------------------------
------------MOD CODE END----------------------