]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Visitor job (#23972)
authorSlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
Thu, 1 Feb 2024 10:13:44 +0000 (11:13 +0100)
committerGitHub <noreply@github.com>
Thu, 1 Feb 2024 10:13:44 +0000 (21:13 +1100)
* Adds Visitor role and ShowInIdCardConsole property

* Add visitor to Agent ID card

* Fixes yaml test

* Fixes based on feedback

* Fixes based on feedback

Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs
Content.Shared/Roles/JobPrototype.cs
Resources/Locale/en-US/job/job-description.ftl
Resources/Locale/en-US/job/job-names.ftl
Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml
Resources/Prototypes/Roles/Jobs/Civilian/visitor.yml [new file with mode: 0644]
Resources/Prototypes/Roles/Jobs/departments.yml
Resources/Prototypes/Roles/play_time_trackers.yml
Resources/Prototypes/StatusEffects/job.yml
Resources/Textures/Interface/Misc/job_icons.rsi/Visitor.png [new file with mode: 0644]
Resources/Textures/Interface/Misc/job_icons.rsi/meta.json

index 670ba088713dc52ce76668a70ce6509cf8e66233..bf5984e8096b2d1f8f087c4d8a02d26486db5371 100644 (file)
@@ -55,7 +55,7 @@ namespace Content.Client.Access.UI
 
             foreach (var job in jobs)
             {
-                if (!job.SetPreference)
+                if (!job.OverrideConsoleVisibility.GetValueOrDefault(job.SetPreference))
                 {
                     continue;
                 }
index 64cd2c66439e9cff242e7018af62459e2df97758..acb88e16f0a336794f0a4ede5ad32bc2839af41b 100644 (file)
@@ -53,6 +53,13 @@ namespace Content.Shared.Roles
         [DataField("setPreference")]
         public bool SetPreference { get; private set; } = true;
 
+        /// <summary>
+        ///     Whether this job should show in the ID Card Console.
+        ///     If set to null, it will default to SetPreference's value.
+        /// </summary>
+        [DataField]
+        public bool? OverrideConsoleVisibility { get; private set; } = null;
+
         [DataField("canBeAntag")]
         public bool CanBeAntag { get; private set; } = true;
 
index 01f588897b267ec9b3902472b8cf966a575801ae..2a094fb0adca96f9c53d454df0bf3df741ed6462 100644 (file)
@@ -42,5 +42,6 @@ job-description-salvagespec = Use the salvage magnet to draw in detatched scraps
 job-description-scientist = Research alien artifacts, unlock new technologies, build newer and better machines around the station, and make everything run more efficiently.
 job-description-security = Catch criminals and enemies of the station, enforce the law, and ensure that the station does not fall into disarray.
 job-description-serviceworker = Learn the basics of bartending, cooking, and growing plants.
+job-description-visitor = Enjoy your visit to the station.
 job-description-warden = Patrol the security department, ensure that no one is stealing from the armory, and make sure that all prisoners are processed and let out when their time is up.
 job-description-zookeeper = Put on a joyful display of cute animals and space carps for all the crew to see. Currently available on Gemini Station.
index 1f7e1c1e0ea67bb144f0d6cd082ace04b761f043..8cd35cac8886199b1bd50726fdd29e107b417603 100644 (file)
@@ -44,6 +44,7 @@ job-name-ertmedic = ERT Medic
 job-name-ertjanitor = ERT Janitor
 job-name-boxer = Boxer
 job-name-zookeeper = Zookeeper
+job-name-visitor = Visitor
 
 # Role timers - Make these alphabetical or I cut you
 JobAtmosphericTechnician = Atmospheric Technician
@@ -90,5 +91,6 @@ JobSecurityOfficer = Security Officer
 JobServiceWorker = Service Worker
 JobStationEngineer = Station Engineer
 JobTechnicalAssistant = Technical Assistant
+JobVisitor = Visitor
 JobWarden = Warden
 JobZookeeper = Zookeeper
index c9615d514c0c853e706b4a80eab7d664de2cc075..553fdd3362a39e78b8605ad3260b98f2c61b675a 100644 (file)
     - JobIconServiceWorker
     - JobIconSecurityCadet
     - JobIconZookeeper
+    - JobIconVisitor
   - type: ActivatableUI
     key: enum.AgentIDCardUiKey.Key
     inHandsOnly: true
diff --git a/Resources/Prototypes/Roles/Jobs/Civilian/visitor.yml b/Resources/Prototypes/Roles/Jobs/Civilian/visitor.yml
new file mode 100644 (file)
index 0000000..d16be5c
--- /dev/null
@@ -0,0 +1,11 @@
+- type: job
+  id: Visitor
+  name: job-name-visitor
+  description: job-description-visitor
+  playTimeTracker: JobVisitor
+  canBeAntag: false
+  icon: JobIconVisitor
+  setPreference: false
+  overrideConsoleVisibility: true
+  access:
+  - Maintenance
index 20b1847699eeb9ac10abf8dcab89705140ed3937..9be98be950c6bf675771cf5ec4f3f210da9fab55 100644 (file)
@@ -28,6 +28,7 @@
   - Musician
   - Passenger
   - Reporter
+  - Visitor
   - Zookeeper
   - ServiceWorker
 
index 0e344780f1a25901e0e6d008e8c1d6475dbb7301..242dc81fa8ee51d7ca0dcab78951f27b2bac571f 100644 (file)
 - type: playTimeTracker
   id: JobTechnicalAssistant
 
+- type: playTimeTracker
+  id: JobVisitor
+
 - type: playTimeTracker
   id: JobWarden
 
index 8be71cc61555d1396d26fab93e2af488473eeaf3..2e8e5bc2555696d141c484fcf0e1783692fcb685 100644 (file)
   icon:
     sprite: Interface/Misc/job_icons.rsi
     state: SeniorResearcher
+
+- type: statusIcon
+  parent: JobIcon
+  id: JobIconVisitor
+  icon:
+    sprite: Interface/Misc/job_icons.rsi
+    state: Visitor
diff --git a/Resources/Textures/Interface/Misc/job_icons.rsi/Visitor.png b/Resources/Textures/Interface/Misc/job_icons.rsi/Visitor.png
new file mode 100644 (file)
index 0000000..5644edb
Binary files /dev/null and b/Resources/Textures/Interface/Misc/job_icons.rsi/Visitor.png differ
index da00077fbd8e91475ae9e37676f21b9f1ee6452f..bf919198f593108086c4844de9c512acf68ffff8 100644 (file)
         },
         {
             "name": "Syndicate"
+        },
+        {
+            "name": "Visitor"
         }
     ]
 }