diff --git a/Content.Server/_White/Announcement/ArrivalNotificationSystem.cs b/Content.Server/_White/Announcement/ArrivalNotificationSystem.cs deleted file mode 100644 index e46d6e4147..0000000000 --- a/Content.Server/_White/Announcement/ArrivalNotificationSystem.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System.Globalization; -using Content.Server.Chat.Systems; -using Content.Server.GameTicking; -using Content.Server.Radio.EntitySystems; -using Content.Shared._White.Announcement; -using Content.Shared.Radio; -using Content.Shared.Roles; -using Robust.Shared.Prototypes; - -namespace Content.Server._White.Announcement; - -public sealed class ArrivalNotificationSystem : EntitySystem -{ - [Dependency] private readonly ChatSystem _chatSystem = default!; - [Dependency] private readonly IPrototypeManager _prototypeManager = default!; - [Dependency] private readonly RadioSystem _radioSystem = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeAllEvent(OnPlayerSpawn); - } - - private void OnPlayerSpawn(PlayerSpawnCompleteEvent args) - { - if (args.JobId == null) - return; - - if (!_prototypeManager.TryIndex(args.JobId, out var jobPrototype)) - return; - - if (!_prototypeManager.TryIndex(jobPrototype.AnnouncementPrototype, out var notification)) - return; - - var message = GetMessage(args.Mob, - jobPrototype, - notification.UseGlobalAnnouncement ? notification.GlobalMessage : notification.Message); - - var senderName = Loc.GetString("head-arrived-sender"); - var source = args.Station; - - if (notification.UseGlobalAnnouncement) - _chatSystem.DispatchGlobalAnnouncement(message, senderName, colorOverride: Color.Gold); - else - _chatSystem.DispatchStationAnnouncement(source, message, senderName, false); - - message = GetMessage(args.Mob, jobPrototype, notification.Message); // Changing message type for radio notification - - foreach (var channel in notification.RadioChannelsPrototypes) - { - if (!_prototypeManager.TryIndex(channel, out _)) - continue; - - _radioSystem.SendRadioMessage(source, message, channel, args.Mob); - } - - } - - private string GetMessage(EntityUid mob, JobPrototype jobPrototype, string type) - { - var message = Loc.GetString(type, - ("character", MetaData(mob).EntityName), - ("job", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(Loc.GetString(jobPrototype.Name)))); - - return message; - } -} diff --git a/Content.Shared/Roles/JobPrototype.cs b/Content.Shared/Roles/JobPrototype.cs index 9f62de98d4..54f5fa4f4c 100644 --- a/Content.Shared/Roles/JobPrototype.cs +++ b/Content.Shared/Roles/JobPrototype.cs @@ -19,16 +19,16 @@ namespace Content.Shared.Roles [IdDataField] public string ID { get; private set; } = default!; - [DataField(required: true, customTypeSerializer: typeof(PrototypeIdSerializer))] + [DataField("playTimeTracker", required: true, customTypeSerializer: typeof(PrototypeIdSerializer))] public string PlayTimeTracker { get; private set; } = string.Empty; - [DataField] + [DataField("supervisors")] public string Supervisors { get; private set; } = "nobody"; /// /// The name of this job as displayed to players. /// - [DataField] + [DataField("name")] public string Name { get; private set; } = string.Empty; [ViewVariables(VVAccess.ReadOnly)] @@ -37,25 +37,22 @@ namespace Content.Shared.Roles /// /// The name of this job as displayed to players. /// - [DataField] + [DataField("description")] public string? Description { get; private set; } [ViewVariables(VVAccess.ReadOnly)] public string? LocalizedDescription => Description is null ? null : Loc.GetString(Description); - [DataField] + [DataField("requirements")] public HashSet? Requirements; - [DataField] + [DataField("joinNotifyCrew")] public bool JoinNotifyCrew { get; private set; } = false; - [DataField] - public string AnnouncementPrototype = default!; - - [DataField] + [DataField("requireAdminNotify")] public bool RequireAdminNotify { get; private set; } = false; - [DataField] + [DataField("setPreference")] public bool SetPreference { get; private set; } = true; /// @@ -65,14 +62,14 @@ namespace Content.Shared.Roles [DataField] public bool? OverrideConsoleVisibility { get; private set; } = null; - [DataField] + [DataField("canBeAntag")] public bool CanBeAntag { get; private set; } = true; /// /// Whether this job is a head. /// The job system will try to pick heads before other jobs on the same priority level. /// - [DataField] + [DataField("weight")] public int Weight { get; private set; } /// @@ -89,10 +86,10 @@ namespace Content.Shared.Roles /// A numerical score for how much easier this job is for antagonists. /// For traitors, reduces starting TC by this amount. Other gamemodes can use it for whatever they find fitting. /// - [DataField] + [DataField("antagAdvantage")] public int AntagAdvantage = 0; - [DataField(customTypeSerializer: typeof(PrototypeIdSerializer))] + [DataField("startingGear", customTypeSerializer: typeof(PrototypeIdSerializer))] public string? StartingGear { get; private set; } /// @@ -100,28 +97,28 @@ namespace Content.Shared.Roles /// Starting gear will be ignored. /// If you want to just add special attributes to a humanoid, use AddComponentSpecial instead. /// - [DataField(customTypeSerializer: typeof(PrototypeIdSerializer))] + [DataField("jobEntity", customTypeSerializer: typeof(PrototypeIdSerializer))] public string? JobEntity = null; - [DataField(customTypeSerializer: typeof(PrototypeIdSerializer))] + [DataField("icon", customTypeSerializer: typeof(PrototypeIdSerializer))] public string Icon { get; private set; } = "JobIconUnknown"; - [DataField(serverOnly: true)] + [DataField("special", serverOnly: true)] public JobSpecial[] Special { get; private set; } = Array.Empty(); - [DataField] + [DataField("access")] public IReadOnlyCollection> Access { get; private set; } = Array.Empty>(); - [DataField] + [DataField("accessGroups")] public IReadOnlyCollection> AccessGroups { get; private set; } = Array.Empty>(); - [DataField] + [DataField("extendedAccess")] public IReadOnlyCollection> ExtendedAccess { get; private set; } = Array.Empty>(); - [DataField] + [DataField("extendedAccessGroups")] public IReadOnlyCollection> ExtendedAccessGroups { get; private set; } = Array.Empty>(); - [DataField] + [DataField("whitelistedSpecies")] public IReadOnlyCollection> WhitelistedSpecies { get; private set; } = Array.Empty>(); } diff --git a/Content.Shared/_White/Announcement/ArrivalNotificationPrototype.cs b/Content.Shared/_White/Announcement/ArrivalNotificationPrototype.cs deleted file mode 100644 index 2dda26fd6e..0000000000 --- a/Content.Shared/_White/Announcement/ArrivalNotificationPrototype.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Robust.Shared.Prototypes; - -namespace Content.Shared._White.Announcement; - -[Prototype("arrivalNotification")] -public sealed partial class ArrivalNotificationPrototype : IPrototype -{ - [IdDataField] public string ID { get; } = default!; - - /// - /// The message that the department will receive upon the player arrival - /// - [DataField(required: true)] - public string Message = default!; - - /// - /// The message that the station will receive upon the player arrival - /// - [DataField] - public string GlobalMessage = default!; - - /// - /// ID of the channel where the player arrival will be announced. - /// - [DataField(required: true)] - public HashSet RadioChannelsPrototypes = default!; - - /// - /// Determines whether the notification will be made to the entire station. If false, the notification will be on the department radio channel - /// - [DataField] - public bool UseGlobalAnnouncement; -} diff --git a/Resources/Locale/ru-RU/_white/announce/announce.ftl b/Resources/Locale/ru-RU/_white/announce/announce.ftl deleted file mode 100644 index ba3450dcc1..0000000000 --- a/Resources/Locale/ru-RU/_white/announce/announce.ftl +++ /dev/null @@ -1,3 +0,0 @@ -head-arrived-message = { $character }, { $job }, Глава отдела -head-arrived-message-global = { $job } { $character } на станции -head-arrived-sender = Автоматическая Система Оповещений diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/clothing/medsec_hud.yml b/Resources/Prototypes/Recipes/Construction/Graphs/clothing/medsec_hud.yml index 486df4678e..03a70cb7fe 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/clothing/medsec_hud.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/clothing/medsec_hud.yml @@ -32,5 +32,12 @@ icon: sprite: Objects/Misc/stock_parts.rsi state: capacitor + doAfter: 5 + - tag: CapacitorStockPart + name: capacitor + icon: + sprite: Objects/Misc/stock_parts.rsi + state: capacitor + doAfter: 5 - node: medsecHud entity: ClothingEyesHudMedSec diff --git a/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/potato.yml b/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/potato.yml index 39094bfdc7..e3f972cfda 100644 --- a/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/potato.yml +++ b/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/potato.yml @@ -65,5 +65,10 @@ icon: sprite: Objects/Misc/stock_parts.rsi state: capacitor + - tag: CapacitorStockPart + name: capacitor + icon: + sprite: Objects/Misc/stock_parts.rsi + state: capacitor - node: potatoaichip - entity: PotatoAIChip + entity: PotatoAIChip \ No newline at end of file diff --git a/Resources/Prototypes/Roles/Jobs/Cargo/quartermaster.yml b/Resources/Prototypes/Roles/Jobs/Cargo/quartermaster.yml index 1806692ac5..c3608cbb00 100644 --- a/Resources/Prototypes/Roles/Jobs/Cargo/quartermaster.yml +++ b/Resources/Prototypes/Roles/Jobs/Cargo/quartermaster.yml @@ -15,7 +15,6 @@ weight: 10 startingGear: QuartermasterGear icon: "JobIconQuarterMaster" - announcementPrototype: QuartermasterArrivalNotification supervisors: job-supervisors-captain whitelistedSpecies: - Human diff --git a/Resources/Prototypes/Roles/Jobs/Command/captain.yml b/Resources/Prototypes/Roles/Jobs/Command/captain.yml index 7fe051a305..93b769d844 100644 --- a/Resources/Prototypes/Roles/Jobs/Command/captain.yml +++ b/Resources/Prototypes/Roles/Jobs/Command/captain.yml @@ -20,7 +20,6 @@ icon: "JobIconCaptain" requireAdminNotify: true joinNotifyCrew: true - announcementPrototype: CaptainArrivalNotification supervisors: job-supervisors-centcom whitelistedSpecies: - Human diff --git a/Resources/Prototypes/Roles/Jobs/Command/head_of_personnel.yml b/Resources/Prototypes/Roles/Jobs/Command/head_of_personnel.yml index cde2a2a738..fdc5f38ae5 100644 --- a/Resources/Prototypes/Roles/Jobs/Command/head_of_personnel.yml +++ b/Resources/Prototypes/Roles/Jobs/Command/head_of_personnel.yml @@ -19,7 +19,6 @@ startingGear: HoPGear icon: "JobIconHeadOfPersonnel" requireAdminNotify: true - announcementPrototype: HeadOfPersonnelArrivalNotification supervisors: job-supervisors-captain whitelistedSpecies: - Human diff --git a/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml b/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml index 2be4b76c18..9f19e8e622 100644 --- a/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml +++ b/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml @@ -16,7 +16,6 @@ startingGear: ChiefEngineerGear icon: "JobIconChiefEngineer" requireAdminNotify: true - announcementPrototype: ChiefEngineerArrivalNotification supervisors: job-supervisors-captain whitelistedSpecies: - Human diff --git a/Resources/Prototypes/Roles/Jobs/Justice/inspector.yml b/Resources/Prototypes/Roles/Jobs/Justice/inspector.yml index 3176d34bfd..780bd76cf0 100644 --- a/Resources/Prototypes/Roles/Jobs/Justice/inspector.yml +++ b/Resources/Prototypes/Roles/Jobs/Justice/inspector.yml @@ -14,7 +14,6 @@ time: 36000 #10 hrs startingGear: InspectorGear icon: "JobIconInspector" - announcementPrototype: InspectorArrivalNotification supervisors: job-supervisors-captain access: - Service diff --git a/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml b/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml index 009c294984..ebcf13b4d9 100644 --- a/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml +++ b/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml @@ -14,7 +14,6 @@ weight: 10 startingGear: CMOGear icon: "JobIconChiefMedicalOfficer" - announcementPrototype: ChiefMedicalOfficerArrivalNotification requireAdminNotify: true supervisors: job-supervisors-captain whitelistedSpecies: diff --git a/Resources/Prototypes/Roles/Jobs/Science/research_director.yml b/Resources/Prototypes/Roles/Jobs/Science/research_director.yml index 918c9cb993..a731829a46 100644 --- a/Resources/Prototypes/Roles/Jobs/Science/research_director.yml +++ b/Resources/Prototypes/Roles/Jobs/Science/research_director.yml @@ -13,7 +13,6 @@ startingGear: ResearchDirectorGear icon: "JobIconResearchDirector" requireAdminNotify: true - announcementPrototype: ResearchDirectorArrivalNotification supervisors: job-supervisors-captain whitelistedSpecies: - Human diff --git a/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml b/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml index be693bb9f4..b550081863 100644 --- a/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml +++ b/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml @@ -16,7 +16,6 @@ startingGear: HoSGear icon: "JobIconHeadOfSecurity" requireAdminNotify: true - announcementPrototype: HeadOfSecurityArrivalNotification supervisors: job-supervisors-captain whitelistedSpecies: - Human diff --git a/Resources/Prototypes/_White/Announcement/ArrivalNotification.yml b/Resources/Prototypes/_White/Announcement/ArrivalNotification.yml deleted file mode 100644 index 52e3b5e13f..0000000000 --- a/Resources/Prototypes/_White/Announcement/ArrivalNotification.yml +++ /dev/null @@ -1,56 +0,0 @@ -- type: arrivalNotification - id: CaptainArrivalNotification - message: head-arrived-message - globalMessage: head-arrived-message-global - radioChannelsPrototypes: - - Command - useGlobalAnnouncement: True - -- type: arrivalNotification - id: HeadOfPersonnelArrivalNotification - message: head-arrived-message - radioChannelsPrototypes: - - Command - - Service - -- type: arrivalNotification - id: HeadOfSecurityArrivalNotification - message: head-arrived-message - radioChannelsPrototypes: - - Command - - Security - -- type: arrivalNotification - id: ChiefMedicalOfficerArrivalNotification - message: head-arrived-message - radioChannelsPrototypes: - - Command - - Medical - -- type: arrivalNotification - id: ChiefEngineerArrivalNotification - message: head-arrived-message - radioChannelsPrototypes: - - Command - - Engineering - -- type: arrivalNotification - id: ResearchDirectorArrivalNotification - message: head-arrived-message - radioChannelsPrototypes: - - Command - - Science - -- type: arrivalNotification - id: QuartermasterArrivalNotification - message: head-arrived-message - radioChannelsPrototypes: - - Command - - Cargo - -- type: arrivalNotification - id: InspectorArrivalNotification - message: head-arrived-message - radioChannelsPrototypes: - - Command - - Security