diff --git a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs index 3e05018c10..932b08e1a6 100644 --- a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs +++ b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs @@ -36,6 +36,9 @@ namespace Content.Client.Administration.UI.Bwoink RobustXamlLoader.Load(this); IoCManager.InjectDependencies(this); + var newPlayerThreshold = 0; + _cfg.OnValueChanged(CCVars.NewPlayerThreshold, (val) => { newPlayerThreshold = val; }, true); + var uiController = _ui.GetUIController(); if (uiController.UIHelper is not AdminAHelpUIHandler helper) return; @@ -76,7 +79,7 @@ namespace Content.Client.Administration.UI.Bwoink if (info.Antag && info.ActiveThisRound) sb.Append(new Rune(0x1F5E1)); // 🗡 - if (info.OverallPlaytime <= TimeSpan.FromMinutes(_cfg.GetCVar(CCVars.NewPlayerThreshold))) + if (newPlayerThreshold != 0 && (info.OverallPlaytime == null || info.OverallPlaytime <= TimeSpan.FromMinutes(newPlayerThreshold))) sb.Append(new Rune(0x23F2)); // ⏲ sb.AppendFormat("\"{0}\"", text); diff --git a/Content.Client/Administration/UI/Bwoink/BwoinkWindow.xaml.cs b/Content.Client/Administration/UI/Bwoink/BwoinkWindow.xaml.cs index e8653843c7..e6cd4942a6 100644 --- a/Content.Client/Administration/UI/Bwoink/BwoinkWindow.xaml.cs +++ b/Content.Client/Administration/UI/Bwoink/BwoinkWindow.xaml.cs @@ -22,12 +22,9 @@ namespace Content.Client.Administration.UI.Bwoink return; } - Title = $"{sel.CharacterName} / {sel.Username}"; + Title = $"{sel.CharacterName} / {sel.Username} | {Loc.GetString("generic-playtime-title")}: "; - if (sel.OverallPlaytime != null) - { - Title += $" | {Loc.GetString("generic-playtime-title")}: {sel.PlaytimeString}"; - } + Title += sel.OverallPlaytime != null ? sel.PlaytimeString : Loc.GetString("generic-unknown-title"); }; OnOpen += () => diff --git a/Content.Server/Store/Systems/StoreSystem.Listings.cs b/Content.Server/Store/Systems/StoreSystem.Listings.cs index 4699ec7b66..412114ce03 100644 --- a/Content.Server/Store/Systems/StoreSystem.Listings.cs +++ b/Content.Server/Store/Systems/StoreSystem.Listings.cs @@ -1,4 +1,5 @@ using System.Diagnostics.CodeAnalysis; +using Content.Shared.Mind; using Content.Shared.Store; using Content.Shared.Store.Components; using Robust.Shared.Prototypes; @@ -117,7 +118,7 @@ public sealed partial class StoreSystem if (listing.Conditions != null) { - var args = new ListingConditionArgs(buyer, storeEntity, listing, EntityManager); + var args = new ListingConditionArgs(GetBuyerMind(buyer), storeEntity, listing, EntityManager); var conditionsMet = true; foreach (var condition in listing.Conditions) @@ -137,6 +138,19 @@ public sealed partial class StoreSystem } } + /// + /// Returns the entity's mind entity, if it has one, to be used for listing conditions. + /// If it doesn't have one, or is a mind entity already, it returns itself. + /// + /// The buying entity. + public EntityUid GetBuyerMind(EntityUid buyer) + { + if (!HasComp(buyer) && _mind.TryGetMind(buyer, out var buyerMind, out var _)) + return buyerMind; + + return buyer; + } + /// /// Checks if a listing appears in a list of given categories /// diff --git a/Content.Server/Store/Systems/StoreSystem.Ui.cs b/Content.Server/Store/Systems/StoreSystem.Ui.cs index 3f4ccf696d..93bbd3bd96 100644 --- a/Content.Server/Store/Systems/StoreSystem.Ui.cs +++ b/Content.Server/Store/Systems/StoreSystem.Ui.cs @@ -146,7 +146,7 @@ public sealed partial class StoreSystem //condition checking because why not if (listing.Conditions != null) { - var args = new ListingConditionArgs(component.AccountOwner ?? buyer, uid, listing, EntityManager); + var args = new ListingConditionArgs(component.AccountOwner ?? GetBuyerMind(buyer), uid, listing, EntityManager); var conditionsMet = listing.Conditions.All(condition => condition.Condition(args)); if (!conditionsMet) diff --git a/Resources/ServerInfo/Guidebook/ServerRules/RoleTypes.xml b/Resources/ServerInfo/Guidebook/ServerRules/RoleTypes.xml index 67a05f516c..b21e97c4e0 100644 --- a/Resources/ServerInfo/Guidebook/ServerRules/RoleTypes.xml +++ b/Resources/ServerInfo/Guidebook/ServerRules/RoleTypes.xml @@ -16,6 +16,7 @@ ## Familiar Familiars are considered non-antagonists, but have instructions to obey someone. They must obey this person even if it causes them to violate roleplay rules or die. You are only a familiar if the game clearly and explicitly tells you that you are a familiar. You are only the familiar of the person the game tells you. - ## Silicon + ## Silicon / Altered Silicon Silicons have a set of laws that they must follow above all else except the core rules. You are only silicon if the game clearly and explicitly tells you that you are a silicon. + Altered Silicons are functionally identical, this role is used to highlight law-sets that have been hacked, corrupted or are otherwise considered non-standard or dangerous.