Skip to content

Commit 0f3bdd5

Browse files
committed
Merge changes with dev
2 parents d924981 + 5ef928f commit 0f3bdd5

25 files changed

+765
-395
lines changed

Loenn/effects/cloudscape.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ local cloudscape = {}
22

33
cloudscape.name = "CommunalHelper/Cloudscape"
44
cloudscape.canBackground = true
5-
cloudscape.canForeground = false
5+
cloudscape.canForeground = true
66

77
cloudscape.fieldInformation = {
88
bgColor = {

Loenn/entities/aero/aero_block_charged.lua

Lines changed: 53 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
local drawableNinePatch = require "structs.drawable_nine_patch"
22
local drawableRectangle = require "structs.drawable_rectangle"
33
local utils = require "utils"
4+
local communalHelper = require("mods").requireFromPlugin("libraries.communal_helper")
5+
6+
local cassetteIndexOptions = {
7+
["None"] = -1,
8+
["0 - Blue"] = 0,
9+
["1 - Rose"] = 1,
10+
["2 - Bright Sun"] = 2,
11+
["3 - Malachite"] = 3
12+
}
13+
local cassetteIndexColors = communalHelper.cassetteBlockHexColors
414

515
local aeroBlockCharged = {}
616

717
aeroBlockCharged.name = "CommunalHelper/AeroBlockCharged"
818
aeroBlockCharged.depth = 4999
9-
aeroBlockCharged.minimumSize = {16, 16}
19+
aeroBlockCharged.minimumSize = { 16, 16 }
1020

11-
aeroBlockCharged.nodeLimits = {0, -1}
21+
aeroBlockCharged.nodeLimits = { 0, -1 }
1222
aeroBlockCharged.nodeLineRenderType = "line"
1323

1424
aeroBlockCharged.fieldInformation = {
@@ -17,6 +27,14 @@ aeroBlockCharged.fieldInformation = {
1727
},
1828
inactiveColor = {
1929
fieldType = "color"
30+
},
31+
cassetteIndex = {
32+
options = cassetteIndexOptions,
33+
editable = false,
34+
fieldType = "integer",
35+
},
36+
cassetteTempo = {
37+
minimumValue = 0
2038
}
2139
}
2240

@@ -31,16 +49,38 @@ aeroBlockCharged.placements = {
3149
loop = false,
3250
activeColor = "4BC0C8",
3351
inactiveColor = "FF6347",
34-
easing = "CubeIn",
3552
-- SpirialisBug = false,
3653
SpirialisBugV2 = false,
37-
wallbounceLeniency = true
54+
wallbounceLeniency = true,
55+
cassetteIndex = -1,
56+
cassetteTempo = 1,
57+
moveOnCassetteTick = false
3858
}
3959
}
4060
}
61+
for i = 0, 3 do
62+
table.insert(aeroBlockCharged.placements, {
63+
name = string.format("aero_block_charged_%s", i),
64+
data = {
65+
width = 16,
66+
height = 16,
67+
buttonSequence = "left -> right+top",
68+
hover = true,
69+
loop = false,
70+
activeColor = cassetteIndexColors[i + 1],
71+
inactiveColor = "FF6347",
72+
-- SpirialisBug = false,
73+
SpirialisBugV2 = false,
74+
wallbounceLeniency = true,
75+
cassetteIndex = i,
76+
cassetteTempo = 1,
77+
moveOnCassetteTick = false
78+
}
79+
})
80+
end
4181

42-
local backgroundColor = {20 / 255, 3 / 255, 3 / 255}
43-
local outlineColor = {0, 0, 0}
82+
local backgroundColor = { 20 / 255, 3 / 255, 3 / 255 }
83+
local outlineColor = { 0, 0, 0 }
4484
local blockTexture = "objects/CommunalHelper/aero_block/blocks/nnn"
4585

4686
local blockNinePatchOptions = {
@@ -60,6 +100,12 @@ function aeroBlockCharged.sprite(room, entity)
60100
table.insert(sprites, outline:getDrawableSprite())
61101
table.insert(sprites, rectangle:getDrawableSprite())
62102

103+
if entity.cassetteIndex and entity.cassetteIndex ~= -1 then
104+
local cassetteIndicatorColor = entity.activeColor ~= "" and communalHelper.hexToColor(entity.activeColor) or cassetteIndexColors[entity.cassetteIndex + 1]
105+
local cassetteIndicator = drawableRectangle.fromRectangle("fill", x + 4, y + 4, width - 8, height - 8, cassetteIndicatorColor)
106+
table.insert(sprites, cassetteIndicator:getDrawableSprite())
107+
end
108+
63109
local frameNinePatch = drawableNinePatch.fromTexture(blockTexture, blockNinePatchOptions, x, y, width, height)
64110
local frameSprites = frameNinePatch:getDrawableSprite()
65111

@@ -85,4 +131,4 @@ function aeroBlockCharged.selection(room, entity)
85131
return rect, noderects
86132
end
87133

88-
return aeroBlockCharged
134+
return aeroBlockCharged

Loenn/entities/cassette_blocks/cassette_falling_block.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ for i = 1, 4 do
3636
height = 16,
3737
customColor = colors[i],
3838
oldConnectionBehavior = false,
39+
<<<<<<< HEAD
3940
spritePath = "",
4041
sideAlpha = 1.0,
42+
=======
43+
held = false,
44+
>>>>>>> 5ef928fe414af767303da25d68d3523b2af49bdf
4145
}
4246
}
4347
end

Loenn/entities/cassette_blocks/cassette_move_block.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ for i = 1, 4 do
5353
direction = "Right",
5454
moveSpeed = 60.0,
5555
oldConnectionBehavior = false,
56+
held = false,
5657
crashTime = 0.15,
5758
regenTime = 3.0,
5859
shakeOnCollision = true,

Loenn/entities/cassette_blocks/cassette_swap_block.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,12 @@ for i = 1, 4 do
4040
customColor = colors[i],
4141
noReturn = false,
4242
oldConnectionBehavior = false,
43+
<<<<<<< HEAD
4344
spritePath = "",
4445
sideAlpha = 1.0,
46+
=======
47+
held = false,
48+
>>>>>>> 5ef928fe414af767303da25d68d3523b2af49bdf
4549
}
4650
}
4751
end

Loenn/entities/cassette_blocks/cassette_zip_mover.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@ for i = 1, 4 do
5151
noReturn = false,
5252
customColor = colors[i],
5353
oldConnectionBehavior = false,
54+
<<<<<<< HEAD
5455
spritePath = "",
5556
sideAlpha = 1.0,
57+
=======
58+
held = false,
59+
>>>>>>> 5ef928fe414af767303da25d68d3523b2af49bdf
5660
}
5761
}
5862
end

Loenn/entities/cassette_blocks/custom_cassette_block.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ for i = 1, 4 do
3636
height = 16,
3737
customColor = colors[i],
3838
oldConnectionBehavior = false,
39+
<<<<<<< HEAD
3940
spritePath = "",
4041
sideAlpha = 1.0,
42+
=======
43+
held = false,
44+
>>>>>>> 5ef928fe414af767303da25d68d3523b2af49bdf
4145
}
4246
}
4347
end

Loenn/entities/chains/chain.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ chain.placements = {
1919
extraJoints = 0,
2020
outline = true,
2121
texture = "objects/CommunalHelper/chains/chain",
22+
updateOffscreen = true,
2223
}
2324
}
2425

Loenn/entities/chains/chained_falling_block.lua

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ local fakeTilesHelper = require("helpers.fake_tiles")
44
local chainedFallingBlock = {}
55

66
chainedFallingBlock.name = "CommunalHelper/ChainedFallingBlock"
7-
chainedFallingBlock.fieldInformation = {
8-
tiletype = {
9-
options = fakeTilesHelper.getTilesOptions(),
10-
editable = false
11-
},
12-
fallDistance = {
13-
minimumValue = 0,
14-
fieldType = "integer"
7+
function chainedFallingBlock.fieldInformation()
8+
return {
9+
tiletype = {
10+
options = fakeTilesHelper.getTilesOptions(),
11+
editable = false
12+
},
13+
fallDistance = {
14+
minimumValue = 0,
15+
fieldType = "integer"
16+
}
1517
}
16-
}
18+
end
1719

1820
function chainedFallingBlock.depth(room, entity)
1921
return entity.behind and 5000 or 0

Loenn/entities/misc/move_block_group.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ moveBlockGroup.placements = {
3535
name = "move_block_group",
3636
data = {
3737
color = defaultColorValue,
38+
disablePulse = false,
3839
syncActivation = true,
3940
respawnBehavior = "Simultaneous"
4041
}

0 commit comments

Comments
 (0)