Skip to content

Commit

Permalink
Clean backmen folder (#220)
Browse files Browse the repository at this point in the history
* BackBackmen

* Update Content.Server/Arcade/BlockGame/BlockGame.cs

Co-authored-by: FN <[email protected]>

* Update Content.Shared/Nutrition/EntitySystems/HungerSystem.cs

Co-authored-by: FN <[email protected]>

---------

Co-authored-by: FN <[email protected]>
  • Loading branch information
Vonsant and FireNameFN authored Jan 4, 2025
1 parent 68aee7a commit cbdc77b
Show file tree
Hide file tree
Showing 28 changed files with 23 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public DefaultGameScreen()
Chat.OnResized += ChatOnResized;
Chat.OnChatResizeFinish += ChatOnResizeFinish;
MainViewport.OnResized += ResizeActionContainer;
MainViewport.OnResized += ResizeAlertsContainer;
MainViewport.OnResized += ResizeAlertsContainer; // Corvax-Next-Surgery
Inventory.OnResized += ResizeActionContainer;
}

Expand All @@ -37,11 +37,13 @@ private void ResizeActionContainer()
Actions.ActionsContainer.MaxGridHeight = MainViewport.Size.Y - indent;
}

// Corvax-Next-Surgery-Start
private void ResizeAlertsContainer()
{
float indent = Chat.Size.Y + Targeting.Size.Y + 120;
Alerts.AlertContainer.MaxGridHeight = Math.Max(MainViewport.Size.Y - indent, 1);
}
// Corvax-Next-Surgery-End

private void ChatOnResizeFinish(Vector2 _)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
xmlns:partStatus="clr-namespace:Content.Client._CorvaxNext.UserInterface.Systems.PartStatus.Widgets"
MinSize="64 64">
<GridContainer Columns="1" HorizontalAlignment="Right" VerticalAlignment="Top">
<PanelContainer >
<GridContainer Name="AlertContainer" Columns="1" HorizontalAlignment="Right" VerticalAlignment="Center" Access="Public" />
<PanelContainer>
<GridContainer Name="AlertContainer" Columns="1" HorizontalAlignment="Right" VerticalAlignment="Center" Access="Public" /> <!-- Corvax-Next-Surgery -->
</PanelContainer>
<partStatus:PartStatusControl Name="PartStatus" Access="Protected"/>
</GridContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public sealed partial class AlertsUI : UIWidget
public AlertsUI()
{
RobustXamlLoader.Load(this);
LayoutContainer.SetGrowHorizontal(this, LayoutContainer.GrowDirection.Begin);
LayoutContainer.SetGrowHorizontal(this, LayoutContainer.GrowDirection.Begin); // Corvax-Next-Surgery
}

public void SyncControls(AlertsSystem alertsSystem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public async Task DeleteAllThenGhost()
Console.WriteLine(pair.Client.EntMan.ToPrettyString(ent));
}

Assert.That(pair.Client.EntMan.EntityCount, Is.AtMost(1)); // Tolerate at most one client entity
Assert.That(pair.Client.EntMan.EntityCount, Is.AtMost(1)); // Corvax-Next-Surgery: Tolerate at most one client entity

// Create a new map.
int mapId = 1;
Expand Down
6 changes: 4 additions & 2 deletions Content.IntegrationTests/Tests/Movement/SlippingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ public async Task BananaSlipTest()
{
var sys = SEntMan.System<SlipTestSystem>();
await SpawnTarget("TrashBananaPeel");


// Corvax-Next-Surgery-Start
// var modifier = Comp<MovementSpeedModifierComponent>(Player).SprintSpeedModifier;
// Assert.That(modifier, Is.EqualTo(1), "Player is not moving at full speed."); // Yeeting this pointless Assert because it's not actually important.
// Assert.That(modifier, Is.EqualTo(1), "Player is not moving at full speed."); Yeeting this pointless Assert because it's not actually important.
// Corvax-Next-Surgery-End

// Player is to the left of the banana peel and has not slipped.
Assert.That(Delta(), Is.GreaterThan(0.5f));
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Arcade/BlockGame/BlockGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ private void InvokeGameover()
{
_highScorePlacement = _arcadeSystem.RegisterHighScore(meta.EntityName, Points);
SendHighscoreUpdate();
var ev = new MoodEffectEvent("ArcadePlay"); // _CorvaxNext: mood
_entityManager.EventBus.RaiseLocalEvent(meta.Owner, ev);
var ev = new MoodEffectEvent("ArcadePlay"); // Corvax-Next-Mood
_entityManager.EventBus.RaiseLocalEvent(meta.Owner, ev); // Corvax-Next-Mood
}
SendMessage(new BlockGameMessages.BlockGameGameOverScreenMessage(Points, _highScorePlacement?.LocalPlacement, _highScorePlacement?.GlobalPlacement));
}
Expand Down
File renamed without changes.
20 changes: 10 additions & 10 deletions Content.Shared/Nutrition/EntitySystems/HungerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public sealed class HungerSystem : EntitySystem
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeedModifier = default!;
[Dependency] private readonly SharedJetpackSystem _jetpack = default!;
[Dependency] private readonly INetManager _net = default!;
[Dependency] private readonly IConfigurationManager _config = default!;
[Dependency] private readonly INetManager _net = default!; // Corvax-Next-Surgery
[Dependency] private readonly IConfigurationManager _config = default!; // Corvax-Next-Surgery

[ValidatePrototypeId<SatiationIconPrototype>]
private const string HungerIconOverfedId = "HungerIconOverfed";
Expand Down Expand Up @@ -65,9 +65,9 @@ private void OnShutdown(EntityUid uid, HungerComponent component, ComponentShutd

private void OnRefreshMovespeed(EntityUid uid, HungerComponent component, RefreshMovementSpeedModifiersEvent args)
{
if (_config.GetCVar(NextVars.MoodEnabled)
|| component.CurrentThreshold > HungerThreshold.Starving
|| _jetpack.IsUserFlying(uid))
if (_config.GetCVar(NextVars.MoodEnabled) // Corvax-Next-Surgery
|| component.CurrentThreshold > HungerThreshold.Starving // Corvax-Next-Surgery
|| _jetpack.IsUserFlying(uid)) // Corvax-Next-Surgery
return;

args.ModifySpeed(component.StarvingSlowdownModifier, component.StarvingSlowdownModifier);
Expand Down Expand Up @@ -153,12 +153,12 @@ private void DoHungerThresholdEffects(EntityUid uid, HungerComponent? component

if (GetMovementThreshold(component.CurrentThreshold) != GetMovementThreshold(component.LastThreshold))
{
if (!_config.GetCVar(NextVars.MoodEnabled))
_movementSpeedModifier.RefreshMovementSpeedModifiers(uid);
else if (_net.IsServer)
if (!_config.GetCVar(NextVars.MoodEnabled)) // Corvax-Next-Surgery
_movementSpeedModifier.RefreshMovementSpeedModifiers(uid); // Corvax-Next-Surgery
else if (_net.IsServer) // Corvax-Next-Surgery
{
var ev = new MoodEffectEvent("Hunger" + component.CurrentThreshold); // _CorvaxNext: mood
RaiseLocalEvent(uid, ev);
var ev = new MoodEffectEvent("Hunger" + component.CurrentThreshold); // Corvax-Next-Surgery
RaiseLocalEvent(uid, ev); // Corvax-Next-Surgery
}
}

Expand Down
File renamed without changes.

0 comments on commit cbdc77b

Please sign in to comment.