Skip to content

Commit 0febb09

Browse files
committed
add option to disable the pulsing of move block groups
1 parent b78dc90 commit 0febb09

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

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
}

Loenn/lang/en_gb.lang

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,8 @@ entities.CommunalHelper/UFO.attributes.description.raySizeY=The height of the be
719719

720720
# Move Block Group
721721
entities.CommunalHelper/MoveBlockGroup.placements.name.move_block_group=Move Block Group
722-
entities.CommunalHelper/MoveBlockGroup.attributes.description.color=The display color of this Move Block group.
722+
entities.CommunalHelper/MoveBlockGroup.attributes.description.color=The display color of this Move Block group.\nDoes nothing if "Disable Pulse" is enabled.
723+
entities.CommunalHelper/MoveBlockGroup.attributes.description.disablePulse=Whether to disable the colored pulsing of the arrows of Move Blocks in this group.
723724
entities.CommunalHelper/MoveBlockGroup.attributes.description.syncActivation=Whether all Move Blocks from this group are bound to activate simultaneously.
724725
entities.CommunalHelper/MoveBlockGroup.attributes.description.respawnBehavior=Dictates how Move Blocks respawn within this group.\n* Immediate: the Move Blocks respawn immediately, like they normally do outside of a group.\n* Simultaneous: all Move Blocks from this group must have first broken in order for them to respawn.\n* Sequential: each Move Block will only respawn once all the ones that came before it in the group have respawned.
725726

src/Components/GroupableMoveBlock.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public IEnumerator WaitForRespawn()
5555
public Color HighlightColor(Color? color = null)
5656
{
5757
Color baseColor = color ?? Color.Transparent;
58-
return Group is null ?
58+
return Group is null || Group.DisablePulse ?
5959
baseColor :
6060
Color.Lerp(baseColor, Group.Color, Calc.SineMap(Scene.TimeActive * 3, 0, 1));
6161
}
62-
}
62+
}

src/Entities/Misc/MoveBlockGroup.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,22 @@ public enum RespawnBehavior
1919
private readonly Vector2[] nodes;
2020

2121
public Color Color { get; }
22+
public bool DisablePulse { get; }
2223
public bool SyncActivation { get; }
2324
private readonly RespawnBehavior respawnBehavior;
2425

2526
private readonly List<GroupableMoveBlock> components = new();
2627

2728
public MoveBlockGroup(EntityData data, Vector2 offset)
28-
: this(data.NodesOffset(offset), data.HexColor("color", defaultColor), data.Bool("syncActivation", true), data.Enum("respawnBehavior", RespawnBehavior.Simultaneous))
29+
: this(data.NodesOffset(offset), data.HexColor("color", defaultColor), data.Bool("disablePulse"), data.Bool("syncActivation", true), data.Enum("respawnBehavior", RespawnBehavior.Simultaneous))
2930
{ }
3031

31-
public MoveBlockGroup(Vector2[] nodes, Color color, bool syncActivation = true, RespawnBehavior respawnBehavior = RespawnBehavior.Simultaneous)
32+
public MoveBlockGroup(Vector2[] nodes, Color color, bool disablePulse = false, bool syncActivation = true, RespawnBehavior respawnBehavior = RespawnBehavior.Simultaneous)
3233
{
3334
this.nodes = nodes;
3435

3536
Color = color;
37+
DisablePulse = disablePulse;
3638
SyncActivation = syncActivation;
3739
this.respawnBehavior = respawnBehavior;
3840
}

0 commit comments

Comments
 (0)