Upstream fixes (#664)
* fix weird name saving * fix item status * Fix single-user BUIs erroneously closing (#28375) (cherry picked from commit 08952b467d9b2b2db85cb9ebb4e8b628c0145716) * fix meatyore shop * possible playtime fix * fixes --------- Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -20,15 +20,14 @@ namespace Content.Client.Lathe.UI
|
||||
_menu = new LatheMenu(this);
|
||||
_menu.OnClose += Close;
|
||||
|
||||
|
||||
_menu.OnServerListButtonPressed += _ =>
|
||||
{
|
||||
SendMessage(new ConsoleServerSelectionMessage());
|
||||
SendPredictedMessage(new ConsoleServerSelectionMessage());
|
||||
};
|
||||
|
||||
_menu.RecipeQueueAction += (recipe, amount) =>
|
||||
{
|
||||
SendMessage(new LatheQueueRecipeMessage(recipe, amount));
|
||||
SendPredictedMessage(new LatheQueueRecipeMessage(recipe, amount));
|
||||
};
|
||||
|
||||
_menu.OpenCenteredRight();
|
||||
@@ -54,8 +53,10 @@ namespace Content.Client.Lathe.UI
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
|
||||
if (!disposing)
|
||||
return;
|
||||
|
||||
_menu?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,9 @@ public sealed class MeatyOreUIController : UIController
|
||||
{
|
||||
base.FrameUpdate(args);
|
||||
|
||||
if(!_buttonLoaded) return;
|
||||
if (!_buttonLoaded)
|
||||
return;
|
||||
|
||||
var shouldBeVisible = CheckButtonVisibility();
|
||||
MeatyOreButton!.Visible = shouldBeVisible;
|
||||
}
|
||||
@@ -51,13 +53,19 @@ public sealed class MeatyOreUIController : UIController
|
||||
|
||||
private bool CheckButtonVisibility()
|
||||
{
|
||||
if(!_sponsorsManager.TryGetInfo(out var sponsor)) return false;
|
||||
if(sponsor?.Tier == null || sponsor?.MeatyOreCoin == 0) return false;
|
||||
if (!_sponsorsManager.TryGetInfo(out var sponsor))
|
||||
return false;
|
||||
|
||||
var controlledEntity = _playerManager!.LocalPlayer!.ControlledEntity;
|
||||
if(controlledEntity == null) return false;
|
||||
if (sponsor.Tier == null || sponsor.MeatyOreCoin == 0)
|
||||
return false;
|
||||
|
||||
if (!_entityManager.HasComponent<HumanoidAppearanceComponent>(controlledEntity)) return false;
|
||||
var controlledEntity = _playerManager.LocalPlayer!.ControlledEntity;
|
||||
|
||||
if (controlledEntity == null)
|
||||
return false;
|
||||
|
||||
if (!_entityManager.HasComponent<HumanoidAppearanceComponent>(controlledEntity))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user