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:
@@ -35,11 +35,6 @@ public sealed partial class SalvageSystem
|
||||
|
||||
private void OnMagnetClaim(EntityUid uid, SalvageMagnetComponent component, ref MagnetClaimOfferEvent args)
|
||||
{
|
||||
var player = args.Session.AttachedEntity;
|
||||
|
||||
if (player is null)
|
||||
return;
|
||||
|
||||
var station = _station.GetOwningStation(uid);
|
||||
|
||||
if (!TryComp(station, out SalvageMagnetDataComponent? dataComp) ||
|
||||
@@ -177,12 +172,12 @@ public sealed partial class SalvageSystem
|
||||
// Fuck with the seed to mix wrecks and asteroids.
|
||||
seed = (int) (seed / 10f) * 10;
|
||||
|
||||
|
||||
|
||||
if (i >= data.Comp.OfferCount / 2)
|
||||
{
|
||||
seed++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
data.Comp.Offered.Add(seed);
|
||||
}
|
||||
@@ -216,7 +211,7 @@ public sealed partial class SalvageSystem
|
||||
if (!TryComp(station, out SalvageMagnetDataComponent? dataComp))
|
||||
return;
|
||||
|
||||
_ui.TrySetUiState(entity, SalvageMagnetUiKey.Key,
|
||||
_ui.SetUiState(entity.Owner, SalvageMagnetUiKey.Key,
|
||||
new SalvageMagnetBoundUserInterfaceState(dataComp.Offered)
|
||||
{
|
||||
Cooldown = dataComp.OfferCooldown,
|
||||
@@ -238,7 +233,7 @@ public sealed partial class SalvageSystem
|
||||
if (station != data.Owner)
|
||||
continue;
|
||||
|
||||
_ui.TrySetUiState(magnetUid, SalvageMagnetUiKey.Key,
|
||||
_ui.SetUiState(magnetUid, SalvageMagnetUiKey.Key,
|
||||
new SalvageMagnetBoundUserInterfaceState(data.Comp.Offered)
|
||||
{
|
||||
Cooldown = data.Comp.OfferCooldown,
|
||||
|
||||
Reference in New Issue
Block a user