Content update for UI prediction (#27214)

* Content update for UI refactor

* Big update

* Sharing

* Remaining content updates

* First big update

* Prototype updates

* AUGH

* Fix UI comp ref

* Cleanup

- Fix predicted message, fix item slots, fix interaction range check.

* Fix regressions

* Make this predictive

idk why it wasn't.

* Fix slime merge

* Merge conflict

* Fix merge
This commit is contained in:
metalgearsloth
2024-04-26 18:16:24 +10:00
committed by GitHub
parent 32b81de8c5
commit 5896e68752
279 changed files with 1308 additions and 1582 deletions

View File

@@ -134,7 +134,7 @@ namespace Content.Server.Atmos.Piping.Trinary.EntitySystems
DirtyUI(uid, mixer);
UpdateAppearance(uid, mixer);
_userInterfaceSystem.TryCloseAll(uid, GasFilterUiKey.Key);
_userInterfaceSystem.CloseUi(uid, GasFilterUiKey.Key);
}
private void OnMixerActivate(EntityUid uid, GasMixerComponent mixer, ActivateInWorldEvent args)
@@ -144,7 +144,7 @@ namespace Content.Server.Atmos.Piping.Trinary.EntitySystems
if (Transform(uid).Anchored)
{
_userInterfaceSystem.TryOpen(uid, GasMixerUiKey.Key, actor.PlayerSession);
_userInterfaceSystem.OpenUi(uid, GasMixerUiKey.Key, actor.PlayerSession);
DirtyUI(uid, mixer);
}
else
@@ -160,7 +160,7 @@ namespace Content.Server.Atmos.Piping.Trinary.EntitySystems
if (!Resolve(uid, ref mixer))
return;
_userInterfaceSystem.TrySetUiState(uid, GasMixerUiKey.Key,
_userInterfaceSystem.SetUiState(uid, GasMixerUiKey.Key,
new GasMixerBoundUserInterfaceState(EntityManager.GetComponent<MetaDataComponent>(uid).EntityName, mixer.TargetPressure, mixer.Enabled, mixer.InletOneConcentration));
}
@@ -176,7 +176,7 @@ namespace Content.Server.Atmos.Piping.Trinary.EntitySystems
{
mixer.Enabled = args.Enabled;
_adminLogger.Add(LogType.AtmosPowerChanged, LogImpact.Medium,
$"{ToPrettyString(args.Session.AttachedEntity!.Value):player} set the power on {ToPrettyString(uid):device} to {args.Enabled}");
$"{ToPrettyString(args.Actor):player} set the power on {ToPrettyString(uid):device} to {args.Enabled}");
DirtyUI(uid, mixer);
UpdateAppearance(uid, mixer);
}
@@ -185,7 +185,7 @@ namespace Content.Server.Atmos.Piping.Trinary.EntitySystems
{
mixer.TargetPressure = Math.Clamp(args.Pressure, 0f, mixer.MaxTargetPressure);
_adminLogger.Add(LogType.AtmosPressureChanged, LogImpact.Medium,
$"{ToPrettyString(args.Session.AttachedEntity!.Value):player} set the pressure on {ToPrettyString(uid):device} to {args.Pressure}kPa");
$"{ToPrettyString(args.Actor):player} set the pressure on {ToPrettyString(uid):device} to {args.Pressure}kPa");
DirtyUI(uid, mixer);
}
@@ -196,7 +196,7 @@ namespace Content.Server.Atmos.Piping.Trinary.EntitySystems
mixer.InletOneConcentration = nodeOne;
mixer.InletTwoConcentration = 1.0f - mixer.InletOneConcentration;
_adminLogger.Add(LogType.AtmosRatioChanged, LogImpact.Medium,
$"{EntityManager.ToPrettyString(args.Session.AttachedEntity!.Value):player} set the ratio on {EntityManager.ToPrettyString(uid):device} to {mixer.InletOneConcentration}:{mixer.InletTwoConcentration}");
$"{EntityManager.ToPrettyString(args.Actor):player} set the ratio on {EntityManager.ToPrettyString(uid):device} to {mixer.InletOneConcentration}:{mixer.InletTwoConcentration}");
DirtyUI(uid, mixer);
}