Skip to content

Commit

Permalink
error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AwareFoxy committed Nov 9, 2024
1 parent 807ce0d commit f293531
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private void OnShutdown(EntityUid uid, FootPrintComponent comp, ComponentShutdow
private void UpdateAppearance(EntityUid uid, FootPrintComponent component, SpriteComponent sprite)
{
if (!sprite.LayerMapTryGet(FootPrintVisualLayers.Print, out var layer)
|| !TryComp<FootPrintsComponent>(component.PrintOwner, out var printsComponent)
|| !TryComp<FootPrintVisualiserComponent>(component.PrintOwner, out var printsComponent)
|| !TryComp<AppearanceComponent>(uid, out var appearance))
return;

Expand Down
10 changes: 5 additions & 5 deletions Content.Server/_CorvaxNext/FootPrint/FootPrintsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ public override void Initialize()
_mobThresholdQuery = GetEntityQuery<MobThresholdsComponent>();
_appearanceQuery = GetEntityQuery<AppearanceComponent>();

SubscribeLocalEvent<FootPrintsComponent, ComponentStartup>(OnStartupComponent);
SubscribeLocalEvent<FootPrintsComponent, MoveEvent>(OnMove);
SubscribeLocalEvent<FootPrintVisualiserComponent, ComponentStartup>(OnStartupComponent);
SubscribeLocalEvent<FootPrintVisualiserComponent, MoveEvent>(OnMove);
}

private void OnStartupComponent(EntityUid uid, FootPrintsComponent component, ComponentStartup args)
private void OnStartupComponent(EntityUid uid, FootPrintVisualiserComponent component, ComponentStartup args)
{
component.StepSize = Math.Max(0f, component.StepSize + _random.NextFloat(-0.05f, 0.05f));
}

private void OnMove(EntityUid uid, FootPrintsComponent component, ref MoveEvent args)
private void OnMove(EntityUid uid, FootPrintVisualiserComponent component, ref MoveEvent args)
{
if (component.PrintsColor.A <= 0f
|| !_transformQuery.TryComp(uid, out var transform)
Expand Down Expand Up @@ -89,7 +89,7 @@ private void OnMove(EntityUid uid, FootPrintsComponent component, ref MoveEvent
_solution.TryAddReagent(footPrintComponent.Solution.Value, component.ReagentToTransfer, 1, out _);
}

private EntityCoordinates CalcCoords(EntityUid uid, FootPrintsComponent component, TransformComponent transform, bool state)
private EntityCoordinates CalcCoords(EntityUid uid, FootPrintVisualiserComponent component, TransformComponent transform, bool state)
{
if (state)
return new EntityCoordinates(uid, transform.LocalPosition);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private void OnStepTrigger(EntityUid uid, PuddleFootPrintsComponent component, r
{
if (!TryComp<AppearanceComponent>(uid, out var appearance)
|| !TryComp<PuddleComponent>(uid, out var puddle)
|| !TryComp<FootPrintsComponent>(args.OtherEntity, out var tripper)
|| !TryComp<FootPrintVisualiserComponent>(args.OtherEntity, out var tripper)
|| !TryComp<SolutionContainerManagerComponent>(uid, out var solutionManager)
||!_solutionContainer.ResolveSolution((uid, solutionManager), puddle.SolutionName, ref puddle.Solution, out var solutions))
return;
Expand All @@ -45,7 +45,7 @@ private void OnStepTrigger(EntityUid uid, PuddleFootPrintsComponent component, r
_solutionContainer.RemoveEachReagent(puddle.Solution.Value, 1);
}

private void AddColor(Color col, float quantity, FootPrintsComponent component)
private void AddColor(Color col, float quantity, FootPrintVisualiserComponent component)
{
component.PrintsColor = component.ColorQuantity == 0f ? col : Color.InterpolateBetween(component.PrintsColor, col, component.ColorInterpolationFactor);
component.ColorQuantity += quantity;
Expand Down

0 comments on commit f293531

Please sign in to comment.