Visitor job (#23972)

* Adds Visitor role and ShowInIdCardConsole property

* Add visitor to Agent ID card

* Fixes yaml test

* Fixes based on feedback

* Fixes based on feedback
This commit is contained in:
SlamBamActionman
2024-02-01 11:13:44 +01:00
committed by GitHub
parent ed0f2aa221
commit 1862f8aa17
11 changed files with 37 additions and 1 deletions

View File

@@ -55,7 +55,7 @@ namespace Content.Client.Access.UI
foreach (var job in jobs) foreach (var job in jobs)
{ {
if (!job.SetPreference) if (!job.OverrideConsoleVisibility.GetValueOrDefault(job.SetPreference))
{ {
continue; continue;
} }

View File

@@ -53,6 +53,13 @@ namespace Content.Shared.Roles
[DataField("setPreference")] [DataField("setPreference")]
public bool SetPreference { get; private set; } = true; 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")] [DataField("canBeAntag")]
public bool CanBeAntag { get; private set; } = true; public bool CanBeAntag { get; private set; } = true;

View 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-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-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-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-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. 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.

View File

@@ -44,6 +44,7 @@ job-name-ertmedic = ERT Medic
job-name-ertjanitor = ERT Janitor job-name-ertjanitor = ERT Janitor
job-name-boxer = Boxer job-name-boxer = Boxer
job-name-zookeeper = Zookeeper job-name-zookeeper = Zookeeper
job-name-visitor = Visitor
# Role timers - Make these alphabetical or I cut you # Role timers - Make these alphabetical or I cut you
JobAtmosphericTechnician = Atmospheric Technician JobAtmosphericTechnician = Atmospheric Technician
@@ -90,5 +91,6 @@ JobSecurityOfficer = Security Officer
JobServiceWorker = Service Worker JobServiceWorker = Service Worker
JobStationEngineer = Station Engineer JobStationEngineer = Station Engineer
JobTechnicalAssistant = Technical Assistant JobTechnicalAssistant = Technical Assistant
JobVisitor = Visitor
JobWarden = Warden JobWarden = Warden
JobZookeeper = Zookeeper JobZookeeper = Zookeeper

View File

@@ -646,6 +646,7 @@
- JobIconServiceWorker - JobIconServiceWorker
- JobIconSecurityCadet - JobIconSecurityCadet
- JobIconZookeeper - JobIconZookeeper
- JobIconVisitor
- type: ActivatableUI - type: ActivatableUI
key: enum.AgentIDCardUiKey.Key key: enum.AgentIDCardUiKey.Key
inHandsOnly: true inHandsOnly: true

View File

@@ -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

View File

@@ -28,6 +28,7 @@
- Musician - Musician
- Passenger - Passenger
- Reporter - Reporter
- Visitor
- Zookeeper - Zookeeper
- ServiceWorker - ServiceWorker

View File

@@ -130,6 +130,9 @@
- type: playTimeTracker - type: playTimeTracker
id: JobTechnicalAssistant id: JobTechnicalAssistant
- type: playTimeTracker
id: JobVisitor
- type: playTimeTracker - type: playTimeTracker
id: JobWarden id: JobWarden

View File

@@ -367,3 +367,10 @@
icon: icon:
sprite: Interface/Misc/job_icons.rsi sprite: Interface/Misc/job_icons.rsi
state: SeniorResearcher state: SeniorResearcher
- type: statusIcon
parent: JobIcon
id: JobIconVisitor
icon:
sprite: Interface/Misc/job_icons.rsi
state: Visitor

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

View File

@@ -175,6 +175,9 @@
}, },
{ {
"name": "Syndicate" "name": "Syndicate"
},
{
"name": "Visitor"
} }
] ]
} }