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)
{
if (!job.SetPreference)
if (!job.OverrideConsoleVisibility.GetValueOrDefault(job.SetPreference))
{
continue;
}

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

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

View 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

View File

@@ -646,6 +646,7 @@
- JobIconServiceWorker
- JobIconSecurityCadet
- JobIconZookeeper
- JobIconVisitor
- type: ActivatableUI
key: enum.AgentIDCardUiKey.Key
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
- Passenger
- Reporter
- Visitor
- Zookeeper
- ServiceWorker

View File

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

View File

@@ -367,3 +367,10 @@
icon:
sprite: Interface/Misc/job_icons.rsi
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": "Visitor"
}
]
}