feat: add young_player_system feature flag to disable Young player system (#2445)

Adds an opt-in 'youngPlayerSystem.enabled' server setting (default true) that, when set to false, disables the Young player system server-wide:

- Account.Young and PlayerMobile.Young getters short-circuit to false.

- New characters no longer receive Young status or a NewPlayerTicket.

- All downstream Young checks (notoriety beneficial-action restriction, CheckYoungProtection, stealing penalties, YoungDeathTeleport, death-item movement, poison immunity, '(Young)' name suffix, CanLogout, renounce-young keyword/gump, BaseCreature.OnDeath fame penalty, OnLogin time-remaining message) become inert.

Setters are intentionally left untouched so serialized account/player flags round-trip cleanly when the setting is later re-enabled.
This commit is contained in:
Wyatt88 2026-05-06 04:09:49 +01:00 committed by GitHub
parent e9c7aac510
commit ee1bf23b72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 2 deletions

View file

@ -10,6 +10,7 @@ using Server.Misc;
using Server.Mobiles;
using Server.Multis;
using Server.Network;
using Server.Systems.FeatureFlags;
namespace Server.Accounting;
@ -250,7 +251,7 @@ public partial class Account : IAccount, IComparable<Account>
/// </summary>
public bool Young
{
get => !GetFlag(1);
get => ContentFeatureFlags.YoungPlayerSystem && !GetFlag(1);
set
{
SetFlag(1, !value);