Skip to content

Commit

Permalink
atmos changes + senior roles (#17)
Browse files Browse the repository at this point in the history
* funny

* nuke atmos tech
  • Loading branch information
MilonPL authored Jan 7, 2025
1 parent be009e3 commit 3af1cb9
Show file tree
Hide file tree
Showing 30 changed files with 90 additions and 33 deletions.
12 changes: 10 additions & 2 deletions Content.Server/Access/Systems/PresetIdCardSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Server.GameTicking;
using Content.Server.Station.Components;
using Content.Server.Station.Systems;
using Content.Shared.Access.Components; // Emberfall
using Content.Shared.Access.Systems;
using Content.Shared.Roles;
using Content.Shared.StatusIcon;
Expand Down Expand Up @@ -79,10 +80,17 @@ private void SetupIdAccess(EntityUid uid, PresetIdCardComponent id, bool extende

_accessSystem.SetAccessToJob(uid, job, extended);

_cardSystem.TryChangeJobTitle(uid, job.LocalizedName);
// Begin Emberfall
var card = Comp<IdCardComponent>(uid);

if (card.JobTitle == null)
_cardSystem.TryChangeJobTitle(uid, job.LocalizedName);
// End Emberfall

_cardSystem.TryChangeJobDepartment(uid, job);

if (_prototypeManager.TryIndex(job.Icon, out var jobIcon))
if (card.JobIcon == "JobIconUnknown" && // Emberfall - Only set the icon if we're not overwriting it
_prototypeManager.TryIndex(job.Icon, out var jobIcon))
_cardSystem.TryChangeJobIcon(uid, jobIcon);
}
}
6 changes: 4 additions & 2 deletions Content.Server/Station/Systems/StationSpawningSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,11 @@ public void SetPdaAndIdCardData(EntityUid entity, string characterName, JobProto
return;

_cardSystem.TryChangeFullName(cardId, characterName, card);
_cardSystem.TryChangeJobTitle(cardId, jobPrototype.LocalizedName, card);
if (card.JobTitle == null) // Emberfall
_cardSystem.TryChangeJobTitle(cardId, jobPrototype.LocalizedName, card);

if (_prototypeManager.TryIndex(jobPrototype.Icon, out var jobIcon))
if (card.JobIcon == "JobIconUnknown" && // Emberfall
_prototypeManager.TryIndex(jobPrototype.Icon, out var jobIcon))
_cardSystem.TryChangeJobIcon(cardId, jobIcon, card);

var extendedAccess = false;
Expand Down
10 changes: 8 additions & 2 deletions Content.Server/StationRecords/Systems/StationRecordsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,18 @@ public void CreateGeneralRecord(
return;
}

// Before creating the record, we'll get the job information either from the ID card or prototype
var (jobTitle, jobIcon) = idUid is { } uid && _idCard.TryFindIdCard(uid, out var card)
? (Loc.GetString(card.Comp.JobTitle ?? string.Empty), card.Comp.JobIcon)
: (Loc.GetString(jobPrototype.LocalizedName), jobPrototype.Icon);


var record = new GeneralStationRecord()
{
Name = name,
Age = age,
JobTitle = jobPrototype.LocalizedName,
JobIcon = jobPrototype.Icon,
JobTitle = jobTitle, // Emberfall
JobIcon = jobIcon, // Emberfall
JobPrototype = jobId,
Species = species,
Gender = gender,
Expand Down
1 change: 1 addition & 0 deletions Resources/Locale/en-US/_emberfall/atmos/gases.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
plasma-smell = Something smells pungent!
4 changes: 4 additions & 0 deletions Resources/Locale/en-US/_emberfall/job/job-names.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
job-name-senior-physician = Senior Physician
job-name-senior-researcher = Senior Researcher
job-name-senior-engineer = Senior Engineer
job-name-senior-officer = Senior Officer
2 changes: 1 addition & 1 deletion Resources/Locale/en-US/disease/miasma.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ammonia-smell = Something smells pungent!
ammonia-smell = Something smells foul!
## Perishable

Expand Down
8 changes: 4 additions & 4 deletions Resources/Prototypes/Atmospherics/gases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
specificHeat: 200
heatCapacityRatio: 1.7
molarMass: 120
gasOverlaySprite: /Textures/Effects/atmospherics.rsi
gasOverlayState: plasma
# gasOverlaySprite: /Textures/Effects/atmospherics.rsi # Emberfall
# gasOverlayState: plasma
color: FF3300
reagent: Plasma
pricePerMole: 0
Expand Down Expand Up @@ -70,8 +70,8 @@
specificHeat: 20
heatCapacityRatio: 1.4
molarMass: 44
gasOverlaySprite: /Textures/Effects/atmospherics.rsi
gasOverlayState: miasma
# gasOverlaySprite: /Textures/Effects/atmospherics.rsi # Emberfall
# gasOverlayState: miasma
gasMolesVisible: 2
gasVisbilityFactor: 3.5
color: 56941E
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,11 @@
layers:
- state: default
- state: idseniorengineer
- type: IdCard # Emberfall
jobTitle: job-name-senior-engineer
jobIcon: JobIconSeniorEngineer
- type: PresetIdCard # Emberfall
job: SeniorEngineer

- type: entity
parent: ResearchIDCard
Expand All @@ -769,6 +774,9 @@
layers:
- state: default
- state: idseniorresearcher
- type: IdCard # Emberfall
jobTitle: job-name-senior-researcher
jobIcon: JobIconSeniorResearcher

- type: entity
parent: MedicalIDCard
Expand All @@ -779,6 +787,9 @@
layers:
- state: default
- state: idseniorphysician
- type: IdCard # Emberfall
jobTitle: job-name-senior-physician
jobIcon: JobIconSeniorPhysician

- type: entity
parent: SecurityIDCard
Expand All @@ -789,6 +800,9 @@
layers:
- state: default
- state: idseniorofficer
- type: IdCard # Emberfall
jobTitle: job-name-senior-officer
jobIcon: JobIconSeniorOfficer

- type: entity
parent: IDCardStandard
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/amber.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Reporter: [ 1, 1 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 2, 2 ]
# AtmosphericTechnician: [ 2, 2 ]
StationEngineer: [ 2, 4 ]
TechnicalAssistant: [ 1, 1 ]
#medical
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/bagel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
ServiceWorker: [ 2, 2 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 3, 3 ]
# AtmosphericTechnician: [ 3, 3 ]
StationEngineer: [ 4, 4 ]
TechnicalAssistant: [ 4, 4 ]
#medical
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/box.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
ServiceWorker: [ 2, 2 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 3, 3 ]
# AtmosphericTechnician: [ 3, 3 ]
StationEngineer: [ 5, 5 ]
TechnicalAssistant: [ 4, 4 ]
#medical
Expand Down
4 changes: 2 additions & 2 deletions Resources/Prototypes/Maps/cog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
Reporter: [ 2, 2 ]
Librarian: [ 1, 1 ]
ServiceWorker: [ 3, 3 ]
Zookeeper: [ 1, 1 ]
Zookeeper: [ 1, 1 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 3, 3 ]
# AtmosphericTechnician: [ 3, 3 ]
StationEngineer: [ 4, 4 ]
TechnicalAssistant: [ 3, 3 ]
#medical
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#engineering
ChiefEngineer: [ 1, 1 ]
StationEngineer: [ 4, 4 ]
AtmosphericTechnician: [ 2, 2 ]
# AtmosphericTechnician: [ 2, 2 ]
TechnicalAssistant: [ 2, 2 ]
#medical
ChiefMedicalOfficer: [ 1, 1 ]
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/elkridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
ServiceWorker: [ 2, 2 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 2, 2 ]
# AtmosphericTechnician: [ 2, 2 ]
StationEngineer: [ 3, 4 ]
TechnicalAssistant: [ 2, 2 ]
#medical
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/fland.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
ServiceWorker: [ 2, 2 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 3, 3 ]
# AtmosphericTechnician: [ 3, 3 ]
StationEngineer: [ 5, 5 ]
TechnicalAssistant: [ 4, 4 ]
#medical
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Reporter: [ 2, 2 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 3, 3 ]
# AtmosphericTechnician: [ 3, 3 ]
StationEngineer: [ 4, 4 ]
TechnicalAssistant: [ 4, 4 ]
#medical
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/loop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
ServiceWorker: [ 3, 3 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 3, 3 ]
# AtmosphericTechnician: [ 3, 3 ]
StationEngineer: [ 5, 5 ]
TechnicalAssistant: [ 5, 5 ]
#medical
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/marathon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
ServiceWorker: [ 2, 2 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 3, 3 ]
# AtmosphericTechnician: [ 3, 3 ]
StationEngineer: [ 4, 4 ]
TechnicalAssistant: [ 3, 3 ]
#medical
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
Reporter: [ 2, 2 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 3, 3 ]
# AtmosphericTechnician: [ 3, 3 ]
StationEngineer: [ 6, 8 ]
TechnicalAssistant: [ 6, 8 ]
#medical
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/oasis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Reporter: [ 1, 1 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 3, 3 ]
# AtmosphericTechnician: [ 3, 3 ]
StationEngineer: [ 5, 5 ]
TechnicalAssistant: [ 4, 4 ]
#medical
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/omega.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
ServiceWorker: [ 2, 2 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 2, 2 ]
# AtmosphericTechnician: [ 2, 2 ]
StationEngineer: [ 3, 3 ]
TechnicalAssistant: [ 2, 2 ]
#medical
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/packed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
ServiceWorker: [ 2, 2 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 2, 2 ]
# AtmosphericTechnician: [ 2, 2 ]
StationEngineer: [ 4, 4 ]
TechnicalAssistant: [ 3, 3 ]
#medical
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/reach.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
Chemist: [ 1, 1 ]
Janitor: [ 1, 1 ]
Musician: [ 1, 1 ]
AtmosphericTechnician: [ 1, 1 ]
# AtmosphericTechnician: [ 1, 1 ]
StationEngineer: [ 1, 2 ]
Scientist: [ 1, 1 ]
Passenger: [ -1, -1 ]
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/saltern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
ServiceWorker: [ 2, 2 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 2, 2 ]
# AtmosphericTechnician: [ 2, 2 ]
StationEngineer: [ 4, 4 ]
TechnicalAssistant: [ 4, 4 ]
#medical
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/train.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
Detective: [ 1, 1 ]
#engineering
ChiefEngineer: [ 1, 1 ]
AtmosphericTechnician: [ 2, 2 ]
# AtmosphericTechnician: [ 2, 2 ]
StationEngineer: [ 4, 4 ]
TechnicalAssistant: [ 3, 3 ]
#medical
Expand Down
9 changes: 9 additions & 0 deletions Resources/Prototypes/Reagents/gases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@
min: 1.5
clear: True
time: 5
- !type:PopupMessage # Emberfall - colorless, smells pungent
type: Local
visualType: Medium
messages: [ "plasma-smell" ]
probability: 0.8
conditions:
- !type:ReagentThreshold
reagent: Plasma
min: 0.1
reactiveEffects:
Flammable:
methods: [ Touch ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name: job-name-atmostech
description: job-description-atmostech
playTimeTracker: JobAtmosphericTechnician
setPreference: false # Emberfall
requirements:
- !type:DepartmentTimeRequirement
department: Engineering
Expand Down
8 changes: 4 additions & 4 deletions Resources/Prototypes/StatusIcon/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -411,31 +411,31 @@
icon:
sprite: /Textures/Interface/Misc/job_icons.rsi
state: SeniorPhysician
allowSelection: false
allowSelection: true # Emberfall

- type: jobIcon
parent: JobIcon
id: JobIconSeniorOfficer
icon:
sprite: /Textures/Interface/Misc/job_icons.rsi
state: SeniorOfficer
allowSelection: false
allowSelection: true # Emberfall

- type: jobIcon
parent: JobIcon
id: JobIconSeniorEngineer
icon:
sprite: /Textures/Interface/Misc/job_icons.rsi
state: SeniorEngineer
allowSelection: false
allowSelection: true # Emberfall

- type: jobIcon
parent: JobIcon
id: JobIconSeniorResearcher
icon:
sprite: /Textures/Interface/Misc/job_icons.rsi
state: SeniorResearcher
allowSelection: false
allowSelection: true # Emberfall

- type: jobIcon
parent: JobIcon
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# yes this needs to exist for the preset even if we're not actually using it as a job, its stupid
- type: job
id: SeniorEngineer
playTimeTracker: JobSeniorEngineer
access:
- Maintenance
- Engineering
- External
- Atmospherics

2 changes: 2 additions & 0 deletions Resources/Prototypes/_Emberfall/Roles/play_time_trackers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- type: playTimeTracker # no its not ever used, but needs to exist
id: JobSeniorEngineer

0 comments on commit 3af1cb9

Please sign in to comment.