Rat King Names (#10503)
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using Content.Shared.Actions.ActionTypes;
|
using Content.Shared.Actions.ActionTypes;
|
||||||
|
using Content.Shared.Dataset;
|
||||||
using Content.Shared.Disease;
|
using Content.Shared.Disease;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||||
@@ -43,5 +44,11 @@ namespace Content.Server.RatKing
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewVariables, DataField("molesMiasmaPerDomain")]
|
[ViewVariables, DataField("molesMiasmaPerDomain")]
|
||||||
public float MolesMiasmaPerDomain = 100f;
|
public float MolesMiasmaPerDomain = 100f;
|
||||||
|
|
||||||
|
// Both of these are used to generate the random name for rat king.
|
||||||
|
[DataField("titleNameDataset", customTypeSerializer: typeof(PrototypeIdSerializer<DatasetPrototype>))]
|
||||||
|
public string TitleNameDataset = "RegalRatNameTitle";
|
||||||
|
[DataField("kingdomNameDataset", customTypeSerializer: typeof(PrototypeIdSerializer<DatasetPrototype>))]
|
||||||
|
public string KingdomNameDataset = "RegalRatNameKingdom";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,13 +6,18 @@ using Content.Server.Nutrition.Components;
|
|||||||
using Content.Server.Popups;
|
using Content.Server.Popups;
|
||||||
using Content.Shared.Actions;
|
using Content.Shared.Actions;
|
||||||
using Content.Shared.Atmos;
|
using Content.Shared.Atmos;
|
||||||
|
using Content.Shared.Dataset;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
namespace Content.Server.RatKing
|
namespace Content.Server.RatKing
|
||||||
{
|
{
|
||||||
public sealed class RatKingSystem : EntitySystem
|
public sealed class RatKingSystem : EntitySystem
|
||||||
{
|
{
|
||||||
|
[Dependency] private readonly IPrototypeManager _proto = default!;
|
||||||
|
[Dependency] private readonly IRobustRandom _random = default!;
|
||||||
[Dependency] private readonly PopupSystem _popup = default!;
|
[Dependency] private readonly PopupSystem _popup = default!;
|
||||||
[Dependency] private readonly ActionsSystem _action = default!;
|
[Dependency] private readonly ActionsSystem _action = default!;
|
||||||
[Dependency] private readonly AtmosphereSystem _atmos = default!;
|
[Dependency] private readonly AtmosphereSystem _atmos = default!;
|
||||||
@@ -32,6 +37,11 @@ namespace Content.Server.RatKing
|
|||||||
{
|
{
|
||||||
_action.AddAction(uid, component.ActionRaiseArmy, null);
|
_action.AddAction(uid, component.ActionRaiseArmy, null);
|
||||||
_action.AddAction(uid, component.ActionDomain, null);
|
_action.AddAction(uid, component.ActionDomain, null);
|
||||||
|
|
||||||
|
var kingdom = _proto.Index<DatasetPrototype>(component.KingdomNameDataset);
|
||||||
|
var title = _proto.Index<DatasetPrototype>(component.TitleNameDataset);
|
||||||
|
|
||||||
|
MetaData(uid).EntityName = $"{_random.Pick(kingdom.Values)} {_random.Pick(title.Values)}";
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
39
Resources/Prototypes/Datasets/Names/regalrat.yml
Normal file
39
Resources/Prototypes/Datasets/Names/regalrat.yml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
- type: dataset
|
||||||
|
id: RegalRatNameKingdom
|
||||||
|
values:
|
||||||
|
- Plague
|
||||||
|
- Miasma
|
||||||
|
- Maintenance
|
||||||
|
- Trash
|
||||||
|
- Garbage
|
||||||
|
- Rat
|
||||||
|
- Vermin
|
||||||
|
- Cheese
|
||||||
|
- Munching
|
||||||
|
- Big
|
||||||
|
- Filth
|
||||||
|
- Sewer
|
||||||
|
- Disposal
|
||||||
|
- Service
|
||||||
|
- The
|
||||||
|
|
||||||
|
- type: dataset
|
||||||
|
id: RegalRatNameTitle
|
||||||
|
values:
|
||||||
|
- King
|
||||||
|
- Lord
|
||||||
|
- Prince
|
||||||
|
- Emperor
|
||||||
|
- Supreme
|
||||||
|
- Overlord
|
||||||
|
- Master
|
||||||
|
- Shogun
|
||||||
|
- Bojar
|
||||||
|
- Tsar
|
||||||
|
- Fan #vs
|
||||||
|
- Enjoyer
|
||||||
|
- President
|
||||||
|
- Mayor
|
||||||
|
- Boss
|
||||||
|
- Prophet
|
||||||
|
- Cheese
|
||||||
Reference in New Issue
Block a user