Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds roles #6

Merged
merged 14 commits into from
Sep 21, 2024
3 changes: 2 additions & 1 deletion Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,8 @@ public void RefreshJobs()
("departmentName", departmentName))
};

if (firstCategory)
category.Visible = department.IsRY;
if (firstCategory && category.Visible)
{
firstCategory = false;
}
Expand Down
4 changes: 2 additions & 2 deletions Content.Shared/GameTicking/SharedGameTicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public abstract class SharedGameTicker : EntitySystem
// But this is easier, and at least it isn't hardcoded.
//TODO: Move these, they really belong in StationJobsSystem or a cvar.
[ValidatePrototypeId<JobPrototype>]
public const string FallbackOverflowJob = "Passenger";
public const string FallbackOverflowJob = "Partisan";

public const string FallbackOverflowJobName = "job-name-passenger";
public const string FallbackOverflowJobName = "job-name-partisan";

// TODO network.
// Probably most useful for replays, round end info, and probably things like lobby menus.
Expand Down
20 changes: 20 additions & 0 deletions Content.Shared/_RY/Roles/DepartmentPrototype.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;

// ReSharper disable CheckNamespace
namespace Content.Shared.Roles;
// ReSharper restore CheckNamespace
// Took this from RMC. No shame.

public sealed partial class DepartmentPrototype : IInheritingPrototype
{
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<DepartmentPrototype>))]
public string[]? Parents { get; }

[NeverPushInheritance]
[AbstractDataField]
public bool Abstract { get; }

[DataField]
public bool IsRY;
}
20 changes: 20 additions & 0 deletions Content.Shared/_RY/Roles/JobPrototype.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;

// ReSharper disable CheckNamespace
namespace Content.Shared.Roles;
// ReSharper restore CheckNamespace
// Took this from RMC. No shame.

public sealed partial class JobPrototype : IInheritingPrototype
{
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<JobPrototype>))]
public string[]? Parents { get; }

[NeverPushInheritance]
[AbstractDataField]
public bool Abstract { get; }

[DataField]
public bool IsRY;
}
3 changes: 3 additions & 0 deletions Resources/Locale/en-US/_RY/job/department-desc.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
department-Farendine-description = Kingdom of Farendine
department-Beli-description = Beli Republic
department-Stragglers-description = Stragglers
3 changes: 3 additions & 0 deletions Resources/Locale/en-US/_RY/job/department.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
department-Farendine = Kingdom of Farendine
department-Beli = Beli Republic
department-Stragglers = Stragglers
4 changes: 4 additions & 0 deletions Resources/Locale/en-US/_RY/job/job-description.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
job-description-partisan = You are caught in a war you are forced to fight. Pick a side, or get shot trying.
job-description-footsoldier = You have, whether of your own volition or not, enlisted into the military and have been sent to the fronltines.
job-description-officer = You are an officer entrusted with the job of winning the battle.
job-description-field-doctor = You are a field doctor with the special ability to perform field surgery.
4 changes: 4 additions & 0 deletions Resources/Locale/en-US/_RY/job/job-names.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
job-name-partisan = partisan
job-name-footsoldier = conscript
job-name-officer = officer
job-name-field-doctor = field doctor
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/_RY/job/job-supervisors.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
job-supervisors-high-command = high command
job-supervisors-officer = any relevant officers
2 changes: 1 addition & 1 deletion Resources/Maps/_RY/dev_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ entities:
- type: Transform
pos: 9.5,-2.5
parent: 2
- proto: SpawnPointCaptain
- proto: RYSpawnPointPartisan
entities:
- uid: 43
components:
Expand Down
21 changes: 21 additions & 0 deletions Resources/Prototypes/_RY/Entities/Markers/Spawners/jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- type: entity
id: RYSpawnPointJobBase
parent: SpawnPointJobBase
abstract: true
suffix: Job Spawn
components:
- type: SpawnPoint
spawn_type: Job
- type: Sprite
sprite: Markers/jobs.rsi
layers:
- sprite: Markers/cross.rsi
state: red

- type: entity
id: RYSpawnPointPartisan
parent: RYSpawnPointJobBase
suffix: Job Spawn
components:
- type: SpawnPoint
job_id: Partisan
2 changes: 1 addition & 1 deletion Resources/Prototypes/_RY/Maps/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
mapNameTemplate: "Dev"
- type: StationJobs
availableJobs:
Captain: [ -1, -1 ]
Partisan: [ -1, -1 ]
16 changes: 16 additions & 0 deletions Resources/Prototypes/_RY/Roles/Enlisted/partisan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
- type: job
id: Partisan
parent: JobBaseRY
name: job-name-partisan
description: job-description-partisan
playTimeTracker: JobPartisan
startingGear: PartisanGear
icon: "JobIconSecurityOfficer"
canBeAntag: false

- type: startingGear
id: PartisanGear
equipment:
jumpsuit: RYClothingUniformEarlyWarFarendine
pocket1: RYWeaponPistolFJ1899
pocket2: RYMagazine45ACP
8 changes: 8 additions & 0 deletions Resources/Prototypes/_RY/Roles/departments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- type: department
id: Stragglers
name: department-Stragglers
parent: DepartmentBaseRY
description: department-Stragglers-description
color: "#A46106"
roles:
- Partisan
3 changes: 3 additions & 0 deletions Resources/Prototypes/_RY/Roles/play_time_trackers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Jobs
- type: playTimeTracker
id: JobPartisan
10 changes: 10 additions & 0 deletions Resources/Prototypes/_RY/Roles/ry_jobs_base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Stolen from RMC again
- type: job
id: JobBaseRY
abstract: true
isRY: true

- type: department
id: DepartmentBaseRY
abstract: true
isRY: true
Loading