Ice anomaly spawns ice underneath it (#21227)

* added TileAnomalySystem to AnomalyIce

* added FloorIce for station

* created ice crust entity to spawn under ice anomaly

* update draw depth for ice crust

* uh oh, added ice-sliding but at what cost

* resolved mispredicts

* updated sprite alpha, removed appearance component (not used)

* fixed function not reflecting event name, left datafield attributes blank, added one comment about saving data (?)

---------

Co-authored-by: Yurii Kis <yurii.kis@smartteksas.com>
This commit is contained in:
KISS
2023-11-06 04:41:42 +02:00
committed by GitHub
parent b1f39ad2ad
commit 4cacb7b9e3
10 changed files with 261 additions and 16 deletions

View File

@@ -25,7 +25,7 @@ namespace Content.Shared.Movement.Systems
move.WalkSpeedModifier = ev.WalkSpeedModifier;
move.SprintSpeedModifier = ev.SprintSpeedModifier;
Dirty(move);
Dirty(uid, move);
}
public void ChangeBaseSpeed(EntityUid uid, float baseWalkSpeed, float baseSprintSpeed, float acceleration, MovementSpeedModifierComponent? move = null)
@@ -36,7 +36,19 @@ namespace Content.Shared.Movement.Systems
move.BaseWalkSpeed = baseWalkSpeed;
move.BaseSprintSpeed = baseSprintSpeed;
move.Acceleration = acceleration;
Dirty(move);
Dirty(uid, move);
}
// We might want to create separate RefreshMovementFrictionModifiersEvent and RefreshMovementFrictionModifiers function that will call it
public void ChangeFriction(EntityUid uid, float friction, float? frictionNoInput, float acceleration, MovementSpeedModifierComponent? move = null)
{
if (!Resolve(uid, ref move, false))
return;
move.Friction = friction;
move.FrictionNoInput = frictionNoInput;
move.Acceleration = acceleration;
Dirty(uid, move);
}
}