Skip to content

Commit 727bd99

Browse files
authored
Merge pull request #45 from GamationOnGithub/dev
Add Shake Strength to Flag Gate Container
2 parents ed54f6a + 8069fb3 commit 727bd99

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

Code/Entities/Containers/FlagGateContainer.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public EntityContainer Container
6060

6161
private bool shaking;
6262
private float shakeTimer;
63+
private float shakeStrength;
6364
private Vector2 shakeAmount;
6465
private Random shakeRand;
6566

@@ -84,6 +85,7 @@ public FlagGateContainer(EntityData data, Vector2 offset) : base(data.Position +
8485
//resetFlags = data.Bool("resetFlags", true);
8586
canReturn = data.Bool("canReturn", true);
8687
shakeTime = data.Float("shakeTime", 0.5f);
88+
shakeStrength = data.Float("shakeStrength", 1f);
8789
moveTime = data.Float("moveTime", 2f);
8890
//progression = data.Bool("progression");
8991
easer = EeveeHelperModule.EaseTypes[data.Attr("easing", "CubeOut")];
@@ -169,7 +171,7 @@ public override void Update()
169171
{
170172
if (Scene.OnInterval(0.04f))
171173
{
172-
shakeAmount = shakeRand.ShakeVector();
174+
shakeAmount = shakeStrength * shakeRand.ShakeVector();
173175
}
174176
if (shakeTimer > 0f)
175177
{

Loenn/entities/entityContainers.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ local flagGateContainer = {
233233
ignoreContainerBounds = false,
234234
moveFlag = "",
235235
shakeTime = 0.5,
236+
shakeStrength = 1.0,
236237
moveTime = 2.0,
237238
easing = "CubeOut",
238239
icon = "objects/switchgate/icon",

Loenn/lang/en_gb.lang

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ entities.EeveeHelper/FlagGateContainer.attributes.description.inactiveColor=The
148148
entities.EeveeHelper/FlagGateContainer.attributes.description.moveFlag=The flag that activates this gate. Leave empty to function like a normal switch gate.
149149
entities.EeveeHelper/FlagGateContainer.attributes.description.moveTime=How long, in seconds, the container takes to move to the other node.
150150
entities.EeveeHelper/FlagGateContainer.attributes.description.shakeTime=How long the container shakes before moving. If set higher than 0, the container will also briefly shake when stopping.
151+
entities.EeveeHelper/FlagGateContainer.attributes.description.shakeStrength=How much the container moves around while shaking. 1 will give vanilla switch gate strength, 0 will make it not shake at all.
151152
entities.EeveeHelper/FlagGateContainer.attributes.description.easing=The easing of the container's movement between nodes.
152153
entities.EeveeHelper/FlagGateContainer.attributes.description.icon=The switch gate icon overlayed on the container. Can be dragged around to change position. (Icons are detected from "objects/MaxHelpingHand/flagSwitchGate/" and "objects/EeveeHelper/flagGateIcons/")
153154
entities.EeveeHelper/FlagGateContainer.attributes.description.canReturn=Whether the container will return to its original position if the flag is deactivated.

0 commit comments

Comments
 (0)