Skip to content

Commit c152eee

Browse files
committed
very fair and glowing sleeve sprites
1 parent 3411a8b commit c152eee

File tree

7 files changed

+24
-3
lines changed

7 files changed

+24
-3
lines changed

assets/1x/atlasSleeves.png

3.43 KB
Loading

assets/1x/sleeve_cry_glowing.png

27.9 KB
Loading

assets/2x/atlasSleeves.png

4.28 KB
Loading

assets/2x/sleeve_cry_glowing.png

39 KB
Loading

items/sleeve.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ if CardSleeves then
33
key = "very_fair_sleeve",
44
name = "Very Fair Sleeve",
55
atlas = "atlasSleeves",
6-
pos = { x = 0, y = 2 },
6+
pos = { x = 6, y = 1 },
77
config = { hands = -2, discards = -2 },
88
unlocked = true,
99
unlock_condition = { deck = "Very Fair Deck", stake = 1 },
@@ -173,8 +173,8 @@ if CardSleeves then
173173
local glowingsleeve = CardSleeves.Sleeve({
174174
key = "glowing_sleeve",
175175
name = "Glowing Sleeve",
176-
atlas = "atlasSleeves",
177-
pos = { x = 0, y = 2 },
176+
atlas = "glowingSleeve",
177+
pos = { x = 4, y = 2 },
178178
config = { cry_glowing = true },
179179
unlocked = true,
180180
unlock_condition = { deck = "Glowing Deck", stake = 1 },

lib/content.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,3 +738,9 @@ SMODS.Atlas({
738738
px = 73,
739739
py = 95,
740740
})
741+
SMODS.Atlas({
742+
key = "glowingSleeve",
743+
path = "sleeve_cry_glowing.png",
744+
px = 73,
745+
py = 95,
746+
})

lib/overrides.lua

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ Cryptid.C = {
318318
cry_pointer_dt = 0
319319
cry_jimball_dt = 0
320320
cry_glowing_dt = 0
321+
cry_glowing_dt2 = 0
321322
function Game:update(dt)
322323
upd(self, dt)
323324
if not Cryptid.member_count_delay then
@@ -354,6 +355,7 @@ function Game:update(dt)
354355
cry_pointer_dt = cry_pointer_dt + dt
355356
cry_jimball_dt = cry_jimball_dt + dt
356357
cry_glowing_dt = cry_glowing_dt + dt
358+
cry_glowing_dt2 = cry_glowing_dt2 + dt
357359
end
358360
--Update sprite positions each frame on certain cards to give the illusion of an animated card
359361
if G.P_CENTERS and G.P_CENTERS.c_cry_pointer and cry_pointer_dt > 0.5 then
@@ -387,6 +389,19 @@ function Game:update(dt)
387389
glowingobj.pos.y = glowingobj.pos.y + 1
388390
end
389391
end
392+
if G.P_CENTERS and G.P_CENTERS.sleeve_cry_glowing_sleeve and cry_glowing_dt2 > 0.1 then
393+
cry_glowing_dt2 = 0
394+
local glowingobj = G.P_CENTERS.sleeve_cry_glowing_sleeve
395+
if glowingobj.pos.x == 1 and glowingobj.pos.y == 4 then
396+
glowingobj.pos.x = 0
397+
glowingobj.pos.y = 0
398+
elseif glowingobj.pos.x < 4 then
399+
glowingobj.pos.x = glowingobj.pos.x + 1
400+
elseif glowingobj.pos.y < 6 then
401+
glowingobj.pos.x = 0
402+
glowingobj.pos.y = glowingobj.pos.y + 1
403+
end
404+
end
390405
for k, v in pairs(G.I.CARD) do
391406
if v.children.back and v.children.back.atlas.name == "cry_glowing" then
392407
v.children.back:set_sprite_pos(G.P_CENTERS.b_cry_glowing.pos or G.P_CENTERS["b_red"].pos)

0 commit comments

Comments
 (0)