33-- Add/modify Steamodded Draw Steps to work with Cryptid
44
55-- Edition Decks
6- SMODS .DrawStep {
7- key = ' back_edition' ,
8- order = 5 ,
9- func = function (self )
10- if safe_get (self , " area" , " config" , " type" ) == " deck" then
11- local currentBack = self .params .viewed_back and G .GAME .viewed_back or G .GAME .selected_back
12- if currentBack .effect .config .cry_force_edition and not currentBack .effect .config .cry_antimatter then
13- if currentBack .effect .config .cry_force_edition_shader then
14- self .children .back :draw_shader (currentBack .effect .config .cry_force_edition_shader , nil , self .ARGS .send_to_shader , true )
15- else
16- self .children .back :draw_shader (currentBack .effect .config .cry_force_edition , nil , self .ARGS .send_to_shader , true )
17- end
18- end
19- if currentBack .effect .config .cry_force_seal and not currentBack .effect .config .hide_seal and not currentBack .effect .config .cry_antimatter then
20- G .shared_seals [currentBack .effect .config .cry_force_seal ]:draw_shader (' dissolve' , nil , nil , true , self .children .center )
21- if currentBack .effect .config .cry_force_seal == ' Gold' then G .shared_seals [currentBack .effect .config .cry_force_seal ]:draw_shader (' voucher' , nil , self .ARGS .send_to_shader , true , self .children .center ) end
22- end
23- if currentBack .effect .config .cry_force_sticker and not currentBack .effect .config .cry_antimatter then
24- for k , v in pairs (SMODS .Stickers ) do
25- if currentBack .effect .config .cry_force_sticker == v .key then
26- if v and v .draw and type (v .draw ) == ' function' then
27- v :draw (self )
28- else
29- G .shared_stickers [v .key ].role .draw_major = self
30- G .shared_stickers [v .key ]:draw_shader (' dissolve' , nil , nil , true , self .children .center )
31- G .shared_stickers [v .key ]:draw_shader (' voucher' , nil , self .ARGS .send_to_shader , true , self .children .center )
32- end
33- end
34- end
35- end
36- if currentBack .effect .config .cry_antimatter or currentBack .effect .config .cry_force_edition == ' negative' then
37- self .children .back :draw_shader (' negative' , nil , self .ARGS .send_to_shader , true )
38- self .children .center :draw_shader (' negative_shine' , nil , self .ARGS .send_to_shader , true )
39- end
40- if currentBack .effect .center .edeck_type then
41- local edition , enhancement , sticker , suit , seal = cry_get_enchanced_deck_info (currentBack )
42- local sprite = cry_edeck_atlas_update (currentBack .effect .center )
43- self .children .back .atlas = G .ASSET_ATLAS [sprite .atlas ] or self .children .back .atlas
44- self .children .back .sprite_pos = sprite .pos
45- self .children .back :reset ()
46- if currentBack .effect .center .edeck_type == ' edition' then
47- self .children .back :draw_shader (edition , nil , self .ARGS .send_to_shader , true )
48- if edition == ' negative' then
49- self .children .back :draw_shader (' negative' , nil , self .ARGS .send_to_shader , true )
50- self .children .center :draw_shader (' negative_shine' , nil , self .ARGS .send_to_shader , true )
51- end
52- end
53- if currentBack .effect .center .edeck_type == ' seal' then
54- G .shared_seals [seal ]:draw_shader (' dissolve' , nil , nil , true , self .children .center )
55- if seal == ' Gold' then G .shared_seals [seal ]:draw_shader (' voucher' , nil , self .ARGS .send_to_shader , true , self .children .center ) end
56- end
57- if currentBack .effect .center .edeck_type == ' sticker' then
58- for k , v in pairs (SMODS .Stickers ) do
59- if sticker == v .key then
60- if v and v .draw and type (v .draw ) == ' function' then
61- v :draw (self )
62- else
63- G .shared_stickers [v .key ].role .draw_major = self
64- G .shared_stickers [v .key ]:draw_shader (' dissolve' , nil , nil , true , self .children .center )
65- G .shared_stickers [v .key ]:draw_shader (' voucher' , nil , self .ARGS .send_to_shader , true , self .children .center )
66- end
67- end
68- end
69- end
70- end
71- end
72- end ,
73- conditions = {vortex = false , facing = ' back' }
74- }
6+ SMODS .DrawStep ({
7+ key = " back_edition" ,
8+ order = 5 ,
9+ func = function (self )
10+ if safe_get (self , " area" , " config" , " type" ) == " deck" then
11+ local currentBack = self .params .viewed_back and G .GAME .viewed_back or G .GAME .selected_back
12+ if currentBack .effect .config .cry_force_edition and not currentBack .effect .config .cry_antimatter then
13+ if currentBack .effect .config .cry_force_edition_shader then
14+ self .children .back :draw_shader (
15+ currentBack .effect .config .cry_force_edition_shader ,
16+ nil ,
17+ self .ARGS .send_to_shader ,
18+ true
19+ )
20+ else
21+ self .children .back :draw_shader (
22+ currentBack .effect .config .cry_force_edition ,
23+ nil ,
24+ self .ARGS .send_to_shader ,
25+ true
26+ )
27+ end
28+ end
29+ if
30+ currentBack .effect .config .cry_force_seal
31+ and not currentBack .effect .config .hide_seal
32+ and not currentBack .effect .config .cry_antimatter
33+ then
34+ G .shared_seals [currentBack .effect .config .cry_force_seal ]:draw_shader (
35+ " dissolve" ,
36+ nil ,
37+ nil ,
38+ true ,
39+ self .children .center
40+ )
41+ if currentBack .effect .config .cry_force_seal == " Gold" then
42+ G .shared_seals [currentBack .effect .config .cry_force_seal ]:draw_shader (
43+ " voucher" ,
44+ nil ,
45+ self .ARGS .send_to_shader ,
46+ true ,
47+ self .children .center
48+ )
49+ end
50+ end
51+ if currentBack .effect .config .cry_force_sticker and not currentBack .effect .config .cry_antimatter then
52+ for k , v in pairs (SMODS .Stickers ) do
53+ if currentBack .effect .config .cry_force_sticker == v .key then
54+ if v and v .draw and type (v .draw ) == " function" then
55+ v :draw (self )
56+ else
57+ G .shared_stickers [v .key ].role .draw_major = self
58+ G .shared_stickers [v .key ]:draw_shader (" dissolve" , nil , nil , true , self .children .center )
59+ G .shared_stickers [v .key ]:draw_shader (
60+ " voucher" ,
61+ nil ,
62+ self .ARGS .send_to_shader ,
63+ true ,
64+ self .children .center
65+ )
66+ end
67+ end
68+ end
69+ end
70+ if
71+ currentBack .effect .config .cry_antimatter
72+ or currentBack .effect .config .cry_force_edition == " negative"
73+ then
74+ self .children .back :draw_shader (" negative" , nil , self .ARGS .send_to_shader , true )
75+ self .children .center :draw_shader (" negative_shine" , nil , self .ARGS .send_to_shader , true )
76+ end
77+ if currentBack .effect .center .edeck_type then
78+ local edition , enhancement , sticker , suit , seal = cry_get_enchanced_deck_info (currentBack )
79+ local sprite = cry_edeck_atlas_update (currentBack .effect .center )
80+ self .children .back .atlas = G .ASSET_ATLAS [sprite .atlas ] or self .children .back .atlas
81+ self .children .back .sprite_pos = sprite .pos
82+ self .children .back :reset ()
83+ if currentBack .effect .center .edeck_type == " edition" then
84+ self .children .back :draw_shader (edition , nil , self .ARGS .send_to_shader , true )
85+ if edition == " negative" then
86+ self .children .back :draw_shader (" negative" , nil , self .ARGS .send_to_shader , true )
87+ self .children .center :draw_shader (" negative_shine" , nil , self .ARGS .send_to_shader , true )
88+ end
89+ end
90+ if currentBack .effect .center .edeck_type == " seal" then
91+ G .shared_seals [seal ]:draw_shader (" dissolve" , nil , nil , true , self .children .center )
92+ if seal == " Gold" then
93+ G .shared_seals [seal ]:draw_shader (
94+ " voucher" ,
95+ nil ,
96+ self .ARGS .send_to_shader ,
97+ true ,
98+ self .children .center
99+ )
100+ end
101+ end
102+ if currentBack .effect .center .edeck_type == " sticker" then
103+ for k , v in pairs (SMODS .Stickers ) do
104+ if sticker == v .key then
105+ if v and v .draw and type (v .draw ) == " function" then
106+ v :draw (self )
107+ else
108+ G .shared_stickers [v .key ].role .draw_major = self
109+ G .shared_stickers [v .key ]:draw_shader (" dissolve" , nil , nil , true , self .children .center )
110+ G .shared_stickers [v .key ]:draw_shader (
111+ " voucher" ,
112+ nil ,
113+ self .ARGS .send_to_shader ,
114+ true ,
115+ self .children .center
116+ )
117+ end
118+ end
119+ end
120+ end
121+ end
122+ end
123+ end ,
124+ conditions = { vortex = false , facing = " back" },
125+ })
75126-- Third Layer
76- SMODS .DrawStep {
77- key = ' floating_sprite2' ,
78- order = 59 ,
79- func = function (self )
80- if self .ability .name == ' cry-Gateway' and (self .config .center .discovered or self .bypass_discovery_center ) then
81- local scale_mod2 = 0.07 -- + 0.02*math.cos(1.8*G.TIMERS.REAL) + 0.00*math.cos((G.TIMERS.REAL - math.floor(G.TIMERS.REAL))*math.pi*14)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^3
82- local rotate_mod2 = 0 -- 0.05*math.cos(1.219*G.TIMERS.REAL) + 0.00*math.cos((G.TIMERS.REAL)*math.pi*5)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^2
83- self .children .floating_sprite2 :draw_shader (' dissolve' ,0 , nil , nil , self .children .center ,scale_mod2 , rotate_mod2 ,nil , 0.1 --[[ + 0.03*math.cos(1.8*G.TIMERS.REAL)--]] ,nil , 0.6 )
84- self .children .floating_sprite2 :draw_shader (' dissolve' , nil , nil , nil , self .children .center , scale_mod2 , rotate_mod2 )
85-
86- local scale_mod = 0.05 + 0.05 * math.sin (1.8 * G .TIMERS .REAL ) + 0.07 * math.sin ((G .TIMERS .REAL - math.floor (G .TIMERS .REAL ))* math.pi * 14 )* (1 - (G .TIMERS .REAL - math.floor (G .TIMERS .REAL )))^ 3
87- local rotate_mod = 0.1 * math.sin (1.219 * G .TIMERS .REAL ) + 0.07 * math.sin ((G .TIMERS .REAL )* math.pi * 5 )* (1 - (G .TIMERS .REAL - math.floor (G .TIMERS .REAL )))^ 2
88-
89- self .children .floating_sprite .role .draw_major = self
90- self .children .floating_sprite :draw_shader (' dissolve' ,0 , nil , nil , self .children .center ,scale_mod , rotate_mod ,nil , 0.1 + 0.03 * math.sin (1.8 * G .TIMERS .REAL ),nil , 0.6 )
91- self .children .floating_sprite :draw_shader (' dissolve' , nil , nil , nil , self .children .center , scale_mod , rotate_mod )
92- end
93- if self .config .center .soul_pos and self .config .center .soul_pos .extra and (self .config .center .discovered or self .bypass_discovery_center ) then
94- local scale_mod = 0.07 -- + 0.02*math.cos(1.8*G.TIMERS.REAL) + 0.00*math.cos((G.TIMERS.REAL - math.floor(G.TIMERS.REAL))*math.pi*14)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^3
95- local rotate_mod = 0 -- 0.05*math.cos(1.219*G.TIMERS.REAL) + 0.00*math.cos((G.TIMERS.REAL)*math.pi*5)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^2
96- self .children .floating_sprite2 :draw_shader (' dissolve' ,0 , nil , nil , self .children .center ,scale_mod , rotate_mod ,nil , 0.1 --[[ + 0.03*math.cos(1.8*G.TIMERS.REAL)--]] ,nil , 0.6 )
97- self .children .floating_sprite2 :draw_shader (' dissolve' , nil , nil , nil , self .children .center , scale_mod , rotate_mod )
98- end
99- end ,
100- conditions = {vortex = false , facing = ' front' }
101- }
102- SMODS .draw_ignore_keys .floating_sprite2 = true
127+ SMODS .DrawStep ({
128+ key = " floating_sprite2" ,
129+ order = 59 ,
130+ func = function (self )
131+ if self .ability .name == " cry-Gateway" and (self .config .center .discovered or self .bypass_discovery_center ) then
132+ local scale_mod2 = 0.07 -- + 0.02*math.cos(1.8*G.TIMERS.REAL) + 0.00*math.cos((G.TIMERS.REAL - math.floor(G.TIMERS.REAL))*math.pi*14)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^3
133+ local rotate_mod2 = 0 -- 0.05*math.cos(1.219*G.TIMERS.REAL) + 0.00*math.cos((G.TIMERS.REAL)*math.pi*5)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^2
134+ self .children .floating_sprite2 :draw_shader (
135+ " dissolve" ,
136+ 0 ,
137+ nil ,
138+ nil ,
139+ self .children .center ,
140+ scale_mod2 ,
141+ rotate_mod2 ,
142+ nil ,
143+ 0.1 --[[ + 0.03*math.cos(1.8*G.TIMERS.REAL)--]] ,
144+ nil ,
145+ 0.6
146+ )
147+ self .children .floating_sprite2 :draw_shader (
148+ " dissolve" ,
149+ nil ,
150+ nil ,
151+ nil ,
152+ self .children .center ,
153+ scale_mod2 ,
154+ rotate_mod2
155+ )
156+
157+ local scale_mod = 0.05
158+ + 0.05 * math.sin (1.8 * G .TIMERS .REAL )
159+ + 0.07
160+ * math.sin ((G .TIMERS .REAL - math.floor (G .TIMERS .REAL )) * math.pi * 14 )
161+ * (1 - (G .TIMERS .REAL - math.floor (G .TIMERS .REAL ))) ^ 3
162+ local rotate_mod = 0.1 * math.sin (1.219 * G .TIMERS .REAL )
163+ + 0.07 * math.sin (G .TIMERS .REAL * math.pi * 5 ) * (1 - (G .TIMERS .REAL - math.floor (G .TIMERS .REAL ))) ^ 2
164+
165+ self .children .floating_sprite .role .draw_major = self
166+ self .children .floating_sprite :draw_shader (
167+ " dissolve" ,
168+ 0 ,
169+ nil ,
170+ nil ,
171+ self .children .center ,
172+ scale_mod ,
173+ rotate_mod ,
174+ nil ,
175+ 0.1 + 0.03 * math.sin (1.8 * G .TIMERS .REAL ),
176+ nil ,
177+ 0.6
178+ )
179+ self .children .floating_sprite :draw_shader (
180+ " dissolve" ,
181+ nil ,
182+ nil ,
183+ nil ,
184+ self .children .center ,
185+ scale_mod ,
186+ rotate_mod
187+ )
188+ end
189+ if
190+ self .config .center .soul_pos
191+ and self .config .center .soul_pos .extra
192+ and (self .config .center .discovered or self .bypass_discovery_center )
193+ then
194+ local scale_mod = 0.07 -- + 0.02*math.cos(1.8*G.TIMERS.REAL) + 0.00*math.cos((G.TIMERS.REAL - math.floor(G.TIMERS.REAL))*math.pi*14)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^3
195+ local rotate_mod = 0 -- 0.05*math.cos(1.219*G.TIMERS.REAL) + 0.00*math.cos((G.TIMERS.REAL)*math.pi*5)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^2
196+ self .children .floating_sprite2 :draw_shader (
197+ " dissolve" ,
198+ 0 ,
199+ nil ,
200+ nil ,
201+ self .children .center ,
202+ scale_mod ,
203+ rotate_mod ,
204+ nil ,
205+ 0.1 --[[ + 0.03*math.cos(1.8*G.TIMERS.REAL)--]] ,
206+ nil ,
207+ 0.6
208+ )
209+ self .children .floating_sprite2 :draw_shader (
210+ " dissolve" ,
211+ nil ,
212+ nil ,
213+ nil ,
214+ self .children .center ,
215+ scale_mod ,
216+ rotate_mod
217+ )
218+ end
219+ end ,
220+ conditions = { vortex = false , facing = " front" },
221+ })
222+ SMODS .draw_ignore_keys .floating_sprite2 = true
0 commit comments