Skip to content

Commit

Permalink
Merge pull request #14 from VMSolidus/Loadouts-Part-1
Browse files Browse the repository at this point in the history
This adds a very large number of new items to the Loadouts system, allowing for more significant character customization. This is a mirror of Einstein-Engines PR425.
  • Loading branch information
VMSolidus authored May 30, 2024
2 parents ffd4cea + e62fcfd commit da57c22
Show file tree
Hide file tree
Showing 13 changed files with 1,144 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,16 @@ public override bool IsValid(JobPrototype job, HumanoidCharacterProfile profile,
public sealed partial class LoadoutSpeciesRequirement : LoadoutRequirement
{
[DataField(required: true)]
public ProtoId<SpeciesPrototype> Species;
public List<ProtoId<SpeciesPrototype>> Species;

public override bool IsValid(JobPrototype job, HumanoidCharacterProfile profile,
Dictionary<string, TimeSpan> playTimes, IEntityManager entityManager, IPrototypeManager prototypeManager,
IConfigurationManager configManager, out FormattedMessage? reason)
{
reason = FormattedMessage.FromMarkup(Loc.GetString("loadout-species-requirement",
("species", Loc.GetString($"species-name-{Species.ToString().ToLower()}"))));
return profile.Species == Species;
var speciesString = string.Join(", ", Species.Select(j => Loc.GetString(prototypeManager.Index(j).Name)));
speciesString = Loc.GetString("loadout-species-requirement", ("species", speciesString));
reason = FormattedMessage.FromMarkup(speciesString);
return Species.Contains(profile.Species);
}
}

Expand Down
1 change: 1 addition & 0 deletions Resources/Locale/en-US/loadouts/categories.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ loadout-category-Accessories = Accessories
loadout-category-Items = Items
loadout-category-Jobs = Jobs
loadout-category-Outer = Outer
loadout-category-Species = Species
loadout-category-Uncategorized = Uncategorized
loadout-category-Uniform = Uniform
2 changes: 1 addition & 1 deletion Resources/Locale/en-US/loadouts/loadout-requirements.ftl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loadout-age-requirement = You must be within {$min} and {$max} years old
loadout-species-requirement = You must be a {$species}
loadout-species-requirement = You must be one of these species: {$species}
loadout-trait-requirement = You must have the trait {$trait}
loadout-backpack-type-requirement = You must use a {$type} as your bag
loadout-clothing-preference-requirement = You must wear a {$type}
Expand Down
275 changes: 275 additions & 0 deletions Resources/Prototypes/Loadouts/Jobs/medical.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- MedicalDoctor
- Paramedic
- ChiefMedicalOfficer
- MedicalIntern
- Chemist
items:
- ClothingHandsGlovesNitrile

Expand All @@ -35,6 +37,7 @@
jobs:
- MedicalDoctor
- ChiefMedicalOfficer
- MedicalIntern
items:
- ClothingNeckStethoscope

Expand All @@ -47,6 +50,9 @@
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- UniformScrubsColorBlue

Expand All @@ -59,6 +65,9 @@
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- UniformScrubsColorGreen

Expand All @@ -71,9 +80,100 @@
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- UniformScrubsColorPurple

- type: loadout
id: LoadoutMedicalUniformScrubsCyan
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- UniformScrubsColorCyan

- type: loadout
id: LoadoutMedicalUniformScrubsBlack
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- UniformScrubsColorBlack

- type: loadout
id: LoadoutMedicalUniformScrubsPink
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- UniformScrubsColorPink

- type: loadout
id: LoadoutMedicalUniformScrubsRainbow
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- UniformScrubsColorRainbow

- type: loadout
id: LoadoutMedicalUniformScrubsCybersun
category: Jobs
cost: 3
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
items:
- UniformScrubsColorCybersun

- type: loadout
id: LoadoutMedicalOuterCybersunWindbreaker
category: Jobs
cost: 5
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
items:
- ClothingOuterCoatCybersunWindbreaker

- type: loadout
id: LoadoutMedicalOuterLabcoatChem
category: Jobs
Expand Down Expand Up @@ -130,6 +230,9 @@
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- ChiefMedicalOfficer
- !type:LoadoutPlaytimeRequirement
tracker: JobChemist
min: 21600 # 6 hours
Expand All @@ -151,6 +254,9 @@
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- ChiefMedicalOfficer
- !type:LoadoutPlaytimeRequirement
tracker: JobChemist
min: 21600 # 6 hours
Expand Down Expand Up @@ -184,6 +290,9 @@
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- ChiefMedicalOfficer
- !type:LoadoutPlaytimeRequirement
tracker: JobChemist
min: 21600 # 6 hours
Expand All @@ -195,3 +304,169 @@
min: 216000 # 60 hours
items:
- ClothingHeadHatBeretSeniorPhysician

- type: loadout
id: LoadoutMedicalHeadSurgcapBlue
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- ClothingHeadHatSurgcapBlue

- type: loadout
id: LoadoutMedicalHeadSurgcapPurple
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- ClothingHeadHatSurgcapPurple

- type: loadout
id: LoadoutMedicalHeadSurgcapGreen
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- ClothingHeadHatSurgcapGreen

- type: loadout
id: LoadoutMedicalHeadSurgcapCyan
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- ClothingHeadHatSurgcapCyan

- type: loadout
id: LoadoutMedicalHeadSurgcapBlack
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- ClothingHeadHatSurgcapBlack

- type: loadout
id: LoadoutMedicalHeadSurgcapPink
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- ClothingHeadHatSurgcapPink

- type: loadout
id: LoadoutMedicalHeadSurgcapRainbow
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- ClothingHeadHatSurgcapRainbow

- type: loadout
id: LoadoutMedicalHeadSurgcapWhite
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
- MedicalIntern
items:
- ClothingHeadHatSurgcapWhite

- type: loadout
id: LoadoutMedicalHeadSurgcapCybersun
category: Jobs
cost: 3
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Chemist
- Paramedic
items:
- ClothingHeadHatSurgcapCybersun

- type: loadout
id: LoadoutMedicalEyesHudMedical
category: Jobs
cost: 3
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Paramedic
- ChiefMedicalOfficer
- MedicalIntern
- Brigmedic
items:
- ClothingEyesHudMedical

- type: loadout
id: LoadoutMedicalEyesEyepatchHudMedical
category: Jobs
cost: 3
exclusive: true
requirements:
- !type:LoadoutJobRequirement
jobs:
- MedicalDoctor
- Paramedic
- ChiefMedicalOfficer
- MedicalIntern
- Brigmedic
items:
- ClothingEyesEyepatchHudMedical
Loading

0 comments on commit da57c22

Please sign in to comment.