From 3b92af3b77b4b8c1f5936a3f28bbb089a9e9d402 Mon Sep 17 00:00:00 2001 From: WarMechanic <69510347+WarMechanic@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:41:05 +1000 Subject: [PATCH 01/20] initial commit --- Resources/Locale/en-US/traits/traits.ftl | 6 + .../Jobs/Engineering/traitRestrictedGear.yml | 129 ++++ .../Jobs/Epistemics/traitRestrictedGear.yml | 39 ++ .../Jobs/Logistics/traitRestrictedGear.yml | 268 ++++++++ .../Jobs/Medical/traitRestrictedGear.yml | 309 +++++++++ .../Jobs/Security/traitRestrictedGear.yml | 610 ++++++++++++++++++ .../Jobs/Service/traitRestrictedGear.yml | 90 +++ Resources/Prototypes/Traits/physical.yml | 11 + 8 files changed, 1462 insertions(+) create mode 100644 Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml create mode 100644 Resources/Prototypes/Loadouts/Jobs/Epistemics/traitRestrictedGear.yml create mode 100644 Resources/Prototypes/Loadouts/Jobs/Logistics/traitRestrictedGear.yml create mode 100644 Resources/Prototypes/Loadouts/Jobs/Medical/traitRestrictedGear.yml create mode 100644 Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml create mode 100644 Resources/Prototypes/Loadouts/Jobs/Service/traitRestrictedGear.yml diff --git a/Resources/Locale/en-US/traits/traits.ftl b/Resources/Locale/en-US/traits/traits.ftl index 74eb67bdaf2..b9f4e317358 100644 --- a/Resources/Locale/en-US/traits/traits.ftl +++ b/Resources/Locale/en-US/traits/traits.ftl @@ -438,3 +438,9 @@ trait-description-CyberEyesOmni = trait-name-ShadowkinBlackeye = Blackeye trait-description-ShadowkinBlackeye = You lose your special Shadowkin powers, in return for some points. + +trait-name-RestrictedGear = Restricted Gear +trait-description-RestrictedGear = + Either through personal ownership or stealing, you have access to equipment that isn't particularly standard issue. + Note that starting with an item [color=red]doesn't certify its legality[/color]. Conceal it or justify it. + (You equip other jobs' items in the loadouts menu) \ No newline at end of file diff --git a/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml new file mode 100644 index 00000000000..a78089a013c --- /dev/null +++ b/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml @@ -0,0 +1,129 @@ +### All Engineers +## Mesons +- type: loadout + id: LoadoutEngineeringRestrictedGearEyesMeson + category: JobsEngineeringAAUncategorized + cost: 2 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutEyesEngineering + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Engineering + items: + - ClothingEyesGlassesMeson + +## Power Drill +- type: loadout + id: LoadoutEngineeringRestrictedGearPowerDrill + category: JobsEngineeringAAUncategorized + cost: 3 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Engineering + items: + - PowerDrill + +## Insulated Gloves Variations +# Yellow +- type: loadout + id: LoadoutEngineeringRestrictedGearGlovesInsulated + category: JobsEngineeringAAUncategorized + cost: 3 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutEngineeringGloves + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Engineering + items: + - ClothingHandsGlovesColorYellow + +# Black +- type: loadout + id: LoadoutEngineeringRestrictedGearGlovesCombat + category: JobsEngineeringAAUncategorized + cost: 3 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutEngineeringGloves + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Engineering + items: + - ClothingHandsGlovesCombat + +# Merc +- type: loadout + id: LoadoutEngineeringRestrictedGearGlovesMerc + category: JobsEngineeringAAUncategorized + cost: 3 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutEngineeringGloves + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Engineering + items: + - ClothingHandsMercGlovesCombat + + +### Atmos +## Utility belt +- type: loadout + id: LoadoutEngineeringRestrictedGearBeltUtilityAtmos + category: JobsEngineeringAtmosphericTechnician + cost: 5 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterJobRequirement + inverted: true + jobs: + - AtmosphericTechnician + items: + - ClothingBeltUtilityAtmos + + +### SE +## Utility belt +- type: loadout + id: LoadoutEngineeringRestrictedGearBeltUtilityEngineering + category: JobsEngineeringStationEngineer + cost: 4 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterJobRequirement + inverted: true + jobs: + - StationEngineer + items: + - ClothingBeltUtilityEngineering \ No newline at end of file diff --git a/Resources/Prototypes/Loadouts/Jobs/Epistemics/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Epistemics/traitRestrictedGear.yml new file mode 100644 index 00000000000..3166db8181d --- /dev/null +++ b/Resources/Prototypes/Loadouts/Jobs/Epistemics/traitRestrictedGear.yml @@ -0,0 +1,39 @@ +### All Epistemiologists +## Eyes +# Hud +- type: loadout + id: LoadoutScienceRestrictedGearEyesHudDiagnostic + category: JobsEpistemicsAAUncategorized + cost: 2 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutEpistemicsEyes + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Epistemics + items: + - ClothingEyesHudDiagnostic + +# Eyepatch +- type: loadout + id: LoadoutScienceRestrictedGearEyesEyepatchHudDiag + category: JobsEpistemicsAAUncategorized + cost: 2 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutEpistemicsEyes + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Epistemics + items: + - ClothingEyesEyepatchHudDiag \ No newline at end of file diff --git a/Resources/Prototypes/Loadouts/Jobs/Logistics/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Logistics/traitRestrictedGear.yml new file mode 100644 index 00000000000..8b65183130f --- /dev/null +++ b/Resources/Prototypes/Loadouts/Jobs/Logistics/traitRestrictedGear.yml @@ -0,0 +1,268 @@ +### Salvage Specialist +## Belts +# Merc webbing +- type: loadout + id: LoadoutCargoRestrictedGearBeltMercWebbing + category: JobsLogisticsSalvageSpecialist + cost: 5 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSalvageSpecialistBelt + - !type:CharacterJobRequirement + inverted: true + jobs: + - SalvageSpecialist + items: + - ClothingBeltMercWebbing + +# Salvage rig +- type: loadout + id: LoadoutCargoRestrictedGearBeltSalvageWebbing + category: JobsLogisticsSalvageSpecialist + cost: 5 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSalvageSpecialistBelt + - !type:CharacterJobRequirement + inverted: true + jobs: + - SalvageSpecialist + items: + - ClothingBeltSalvageWebbing + +# Chest rig +- type: loadout + id: LoadoutCargoRestrictedGearBeltMilitaryWebbing + category: JobsLogisticsSalvageSpecialist + cost: 5 + customColorTint: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSalvageSpecialistBelt + - !type:CharacterJobRequirement + inverted: true + jobs: + - SalvageSpecialist + items: + - ClothingBeltMilitaryWebbing + + +## Weapons +- type: loadout + id: LoadoutCargoRestrictedGearWeaponsCrusherDagger + category: JobsLogisticsSalvageSpecialist + cost: 5 + canBeHeirloom: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSalvageSpecialistWeapons + - !type:CharacterJobRequirement + inverted: true + jobs: + - SalvageSpecialist + items: + - WeaponCrusherDagger + +- type: loadout + id: LoadoutCargoRestrictedGearWeaponsCombatKnife + category: JobsLogisticsSalvageSpecialist + cost: 4 + canBeHeirloom: true + customColorTint: true # Go read Neuromancer + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSalvageSpecialistWeapons + - !type:CharacterJobRequirement + inverted: true + jobs: + - SalvageSpecialist + items: + - CombatKnife + +- type: loadout + id: LoadoutCargoRestrictedGearWeaponsKitchenKnife + category: JobsLogisticsSalvageSpecialist + cost: 4 + canBeHeirloom: true + customColorTint: true # Go read Neuromancer + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSalvageSpecialistWeapons + - !type:CharacterJobRequirement + inverted: true + jobs: + - SalvageSpecialist + items: + - KitchenKnife + +- type: loadout + id: LoadoutCargoRestrictedGearWeaponsSurvivalKnife + category: JobsLogisticsSalvageSpecialist + cost: 4 + canBeHeirloom: true + customColorTint: true # Go read Neuromancer + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSalvageSpecialistWeapons + - !type:CharacterJobRequirement + inverted: true + jobs: + - SalvageSpecialist + items: + - SurvivalKnife + +- type: loadout + id: LoadoutCargoRestrictedGearWeaponsKukriKnife + category: JobsLogisticsSalvageSpecialist + cost: 4 + canBeHeirloom: true + customColorTint: true # Go read Neuromancer + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSalvageSpecialistWeapons + - !type:CharacterJobRequirement + inverted: true + jobs: + - SalvageSpecialist + items: + - KukriKnife + +- type: loadout + id: LoadoutCargoRestrictedGearWeaponsCleaver + category: JobsLogisticsSalvageSpecialist + cost: 5 + canBeHeirloom: true + customColorTint: true # Go read Neuromancer + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSalvageSpecialistWeapons + - !type:CharacterJobRequirement + inverted: true + jobs: + - SalvageSpecialist + items: + - ButchCleaver + +- type: loadout + id: LoadoutCargoRestrictedGearWeaponsThrowingKnife + category: JobsLogisticsSalvageSpecialist + cost: 3 + canBeHeirloom: true + customColorTint: true # Go read Neuromancer + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSalvageSpecialistWeapons + - !type:CharacterJobRequirement + inverted: true + jobs: + - SalvageSpecialist + items: + - ThrowingKnife + - ThrowingKnife + - ThrowingKnife + +- type: loadout + id: LoadoutCargoRestrictedGearWeaponsMachete + category: JobsLogisticsSalvageSpecialist + cost: 4 + canBeHeirloom: true + customColorTint: true # Go read Neuromancer + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSalvageSpecialistWeapons + - !type:CharacterJobRequirement + inverted: true + jobs: + - SalvageSpecialist + items: + - Machete + +- type: loadout + id: LoadoutCargoRestrictedGearWeaponsCutlass + category: JobsLogisticsSalvageSpecialist + cost: 5 + canBeHeirloom: true + customColorTint: true # Go read Neuromancer + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSalvageSpecialistWeapons + - !type:CharacterJobRequirement + inverted: true + jobs: + - SalvageSpecialist + items: + - Cutlass + +- type: loadout + id: LoadoutCargoRestrictedGearWeaponsKatana + category: JobsLogisticsSalvageSpecialist + cost: 5 + canBeHeirloom: true + customColorTint: true # Go read Neuromancer + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSalvageSpecialistWeapons + - !type:CharacterJobRequirement + inverted: true + jobs: + - SalvageSpecialist + items: + - Katana + +- type: loadout + id: LoadoutCargoRestrictedGearWeaponsWakizashi + category: JobsLogisticsSalvageSpecialist + cost: 4 + canBeHeirloom: true + customColorTint: true # Go read Neuromancer + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSalvageSpecialistWeapons + - !type:CharacterJobRequirement + inverted: true + jobs: + - SalvageSpecialist + items: + - Wakizashi \ No newline at end of file diff --git a/Resources/Prototypes/Loadouts/Jobs/Medical/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Medical/traitRestrictedGear.yml new file mode 100644 index 00000000000..3834c120017 --- /dev/null +++ b/Resources/Prototypes/Loadouts/Jobs/Medical/traitRestrictedGear.yml @@ -0,0 +1,309 @@ +### All Medical +## Surgical Duffel +- type: loadout + id: LoadoutMedicalRestrictedGearDuffelSurgeryFilled + category: JobsMedicalAUncategorized + cost: 5 + items: + - ClothingBackpackDuffelSurgeryFilled + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + +## Eyes +# Medhud +- type: loadout + id: LoadoutMedicalRestrictedGearEyesHudMedical + category: JobsMedicalAUncategorized + cost: 2 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutMedicalEyes + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + items: + - ClothingEyesHudMedical + +# Eyepatch Medhud +- type: loadout + id: LoadoutMedicalRestrictedGearEyepatchHudMedical + category: JobsMedicalAUncategorized + cost: 2 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutMedicalEyes + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + items: + - ClothingEyesEyepatchHudMedical + +# Medhud Prescription +- type: loadout + id: LoadoutMedicalRestrictedGearHudMedicalPrescription + category: JobsMedicalAUncategorized + cost: 2 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - Nearsighted + - !type:CharacterItemGroupRequirement + group: LoadoutMedicalEyes + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + items: + - ClothingEyesPrescriptionMedHud + +## Gloves +# Nitrile +- type: loadout + id: LoadoutMedicalRestrictedGearGlovesNitrile + category: JobsMedicalAUncategorized + cost: 1 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutMedicalGloves + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + items: + - ClothingHandsGlovesNitrile + +# Latex +- type: loadout + id: LoadoutMedicalRestrictedGearGlovesLatex + category: JobsMedicalAUncategorized + cost: 1 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutMedicalGloves + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + items: + - ClothingHandsGlovesLatex + +## Stethoscope +- type: loadout + id: LoadoutMedicalRestrictedGearNeckStethoscope + category: JobsMedicalAUncategorized + cost: 1 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + items: + - ClothingNeckStethoscope + + +### Chemist +## Drugs +# Kelotane +- type: loadout + id: LoadoutMedicalRestrictedGearPillCanisterKelotane + category: JobsMedicalChemist + cost: 2 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutChemistEquipment + - !type:CharacterJobRequirement + inverted: true + jobs: + - Chemist + items: + - PillCanisterKelotane + +# Tricordrazine +- type: loadout + id: LoadoutMedicalRestrictedGearPillCanisterTricordrazine + category: JobsMedicalChemist + cost: 1 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutChemistEquipment + - !type:CharacterJobRequirement + inverted: true + jobs: + - Chemist + items: + - PillCanisterTricordrazine + +# Hyronalin +- type: loadout + id: LoadoutMedicalRestrictedGearPillCanisterHyronalin + category: JobsMedicalChemist + cost: 2 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutChemistEquipment + - !type:CharacterJobRequirement + inverted: true + jobs: + - Chemist + items: + - PillCanisterHyronalin + +# Bicaridine +- type: loadout + id: LoadoutMedicalRestrictedGearPillCanisterBicaridine + category: JobsMedicalChemist + cost: 2 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutChemistEquipment + - !type:CharacterJobRequirement + inverted: true + jobs: + - Chemist + items: + - PillCanisterBicaridine + +# Dermaline +- type: loadout + id: LoadoutMedicalRestrictedGearPillCanisterDermaline + category: JobsMedicalChemist + cost: 2 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutChemistEquipment + - !type:CharacterJobRequirement + inverted: true + jobs: + - Chemist + items: + - PillCanisterDermaline + +# Dylovene +- type: loadout + id: LoadoutMedicalRestrictedGearPillCanisterDylovene + category: JobsMedicalChemist + cost: 2 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutChemistEquipment + - !type:CharacterJobRequirement + inverted: true + jobs: + - Chemist + items: + - PillCanisterDylovene + +# Dexalin +- type: loadout + id: LoadoutMedicalRestrictedGearPillCanisterDexalin + category: JobsMedicalChemist + cost: 1 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutChemistEquipment + - !type:CharacterJobRequirement + inverted: true + jobs: + - Chemist + items: + - PillCanisterDexalin + +# LSD +- type: loadout + id: LoadoutMedicalRestrictedGearPillCanisterSpaceDrugs + category: JobsMedicalChemist + cost: 1 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutChemistEquipment + - !type:CharacterJobRequirement + inverted: true + jobs: + - Chemist + items: + - PillCanisterSpaceDrugs + +## Chemical Analysis Goggles +- type: loadout + id: LoadoutMedicalRestrictedGearEyesGlassesChemical + category: JobsMedicalChemist + cost: 4 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterJobRequirement + inverted: true + jobs: + - Chemist + items: + - ClothingEyesGlassesChemical + +### Medical Doctor +- type: loadout + id: LoadoutMedicalRestrictedGearBeltMedicalFilled + category: JobsMedicalMedicalDoctor + cost: 4 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterJobRequirement + inverted: true + jobs: + - MedicalDoctor + items: + - ClothingBeltMedicalFilled \ No newline at end of file diff --git a/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml new file mode 100644 index 00000000000..23d99b87761 --- /dev/null +++ b/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml @@ -0,0 +1,610 @@ +### All Security +## Sunglasses +- type: loadout + id: LoadoutSecurityRestrictedGearEyesGlassesSunglasses + category: JobsSecurityAUncategorized + cost: 3 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityEyes + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - ClothingEyesGlassesSunglasses + +## Holster +- type: loadout + id: LoadoutSecurityRestrictedGearBeltHolster + category: JobsSecurityAUncategorized + cost: 2 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - ClothingBeltHolster + +## Outer +- type: loadout + id: LoadoutSecurityRestrictedGearOuterArmorPlateCarrier + category: JobsSecurityAUncategorized + cost: 7 + exclusive: true + requirements: + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityOuter + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - ClothingOuterArmorPlateCarrier + +- type: loadout + id: LoadoutSecurityRestrictedGearOuterArmorDuraVest + category: JobsSecurityAUncategorized + cost: 7 + exclusive: true + requirements: + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityOuter + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - ClothingOuterArmorDuraVest + +- type: loadout + id: LoadoutSecurityRestrictedGearOuterArmorBasic + category: JobsSecurityAUncategorized + cost: 7 + exclusive: true + requirements: + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityOuter + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - ClothingOuterArmorBasic + +- type: loadout + id: LoadoutSecurityRestrictedGearOuterArmorSlim + category: JobsSecurityAUncategorized + cost: 7 + exclusive: true + requirements: + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityOuter + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - ClothingOuterArmorBasicSlim + + +## Equipment +# Flash +- type: loadout + id: LoadoutSecurityRestrictedGearFlash + category: JobsSecurityAUncategorized + cost: 2 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityEquipment + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - Flash + +# .35 Magazine +- type: loadout + id: LoadoutSecurityRestrictedGearMagazinePistol + category: JobsSecurityAUncategorized + cost: 2 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityEquipment + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - MagazinePistol + +# .35 Magazine Rubber +- type: loadout + id: LoadoutSecurityRestrictedGearMagazinePistolRubber + category: JobsSecurityAUncategorized + cost: 2 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityEquipment + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - MagazinePistolRubber + +# .45 Speedloader +- type: loadout + id: LoadoutSecurityRestrictedGearSpeedLoaderMagnum + category: JobsSecurityAUncategorized + cost: 4 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityEquipment + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - SpeedLoaderMagnum + +# .45 Speedloader Rubber +- type: loadout + id: LoadoutSecurityRestrictedGearSpeedLoaderMagnumRubber + category: JobsSecurityAUncategorized + cost: 4 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityEquipment + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - SpeedLoaderMagnumRubber + +# .45 Magazine +- type: loadout + id: LoadoutSecurityRestrictedGearMagazineMagnum + category: JobsSecurityAUncategorized + cost: 4 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityEquipment + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - MagazineMagnum + +# .45 Magazine Rubber +- type: loadout + id: LoadoutSecurityRestrictedGearMagazineMagnumRubber + category: JobsSecurityAUncategorized + cost: 4 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityEquipment + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - MagazineMagnumRubber + + +## Guns +# Disabler +- type: loadout + id: LoadoutSecurityRestrictedGearDisabler + category: JobsSecurityAUncategorized + cost: 4 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponDisabler + +# MK58 +- type: loadout + id: LoadoutSecurityRestrictedGearMk58 + category: JobsSecurityAUncategorized + cost: 4 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponPistolMk58 + +# Inspector +- type: loadout + id: LoadoutSecurityRestrictedGearRevolver + category: JobsSecurityAUncategorized + cost: 4 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponRevolverInspector + +# Deckard +- type: loadout + id: LoadoutSecurityRestrictedGearRevolverDeckard + category: JobsSecurityAUncategorized + cost: 5 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponRevolverDeckard + +# N1984 +- type: loadout + id: LoadoutSecurityRestrictedGearPistolN1984 + category: JobsSecurityAUncategorized + cost: 6 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponPistolN1984 + +# Viper +- type: loadout + id: LoadoutSecurityRestrictedGearPistolViper + category: JobsSecurityAUncategorized + cost: 4 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponPistolViper + +# Viper Wood +- type: loadout + id: LoadoutSecurityRestrictedGearPistolViperWood + category: JobsSecurityAUncategorized + cost: 4 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 108000 # 30 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponPistolViperWood + +# Truncheon +- type: loadout + id: LoadoutSecurityRestrictedGearEquipmentTruncheon + category: JobsSecurityAUncategorized + cost: 4 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + - !type:CharacterSpeciesRequirement + species: + - Oni + items: + - Truncheon + +# Svalin +- type: loadout + id: LoadoutSecurityRestrictedGearPistolSvalin + category: JobsSecurityAUncategorized + cost: 5 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponLaserSvalinn + +# Miniature Energy Gun +- type: loadout + id: LoadoutSecurityRestrictedGearEnergyGunMini + category: JobsSecurityAUncategorized + cost: 4 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponEnergyGunMini + +# Energy Pistol +- type: loadout + id: LoadoutSecurityRestrictedGearEnergyGunPistol + category: JobsSecurityAUncategorized + cost: 5 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponEnergyGunPistol + +# Pollock +- type: loadout + id: LoadoutSecurityRestrictedGearPistolPollock + category: JobsSecurityAUncategorized + cost: 5 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponPistolPollock + +# Snub-nose +- type: loadout + id: LoadoutSecurityRestrictedGearRevolverSnub + category: JobsSecurityAUncategorized + cost: 6 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponRevolverSnub + +# K38 +- type: loadout + id: LoadoutSecurityRestrictedGearRevolverK38Master + category: JobsSecurityAUncategorized + cost: 5 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponRevolverK38Master + +# Fitz +- type: loadout + id: LoadoutSecurityRestrictedGearRevolverFitz + category: JobsSecurityAUncategorized + cost: 7 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponRevolverFitz + +# Python +- type: loadout + id: LoadoutSecurityRestrictedGearRevolverPython + category: JobsSecurityAUncategorized + cost: 9 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + items: + - WeaponRevolverPython diff --git a/Resources/Prototypes/Loadouts/Jobs/Service/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Service/traitRestrictedGear.yml new file mode 100644 index 00000000000..88d8c72bdbc --- /dev/null +++ b/Resources/Prototypes/Loadouts/Jobs/Service/traitRestrictedGear.yml @@ -0,0 +1,90 @@ +### Bartender +## Equipment +- type: loadout + id: LoadoutServiceRestrictedGearBartenderBoxBeanbags + category: JobsServiceBartender + cost: 4 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutBartenderAmmo + - !type:CharacterJobRequirement + inverted: true + jobs: + - Bartender + items: + - BoxBeanbag + +- type: loadout + id: LoadoutServiceRestrictedGearBoxLightRifleRubber + category: JobsServiceBartender + cost: 4 + exclusive: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutBartenderAmmo + - !type:CharacterJobRequirement + inverted: true + jobs: + - Bartender + items: + - MagazineBoxLightRifleRubber + +- type: loadout + id: LoadoutServiceRestrictedGearBartenderShotgunDoubleBarreledRubber + category: JobsServiceBartender + cost: 6 + exclusive: true + canBeHeirloom: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutBartenderWeapon + - !type:CharacterJobRequirement + inverted: true + jobs: + - Bartender + items: + - WeaponShotgunDoubleBarreledRubber + +- type: loadout + id: LoadoutServiceRestrictedGearBartenderShotgunDoubleBarreledSawed + category: JobsServiceBartender + cost: 7 + exclusive: true + canBeHeirloom: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutBartenderWeapon + items: + - WeaponShotgunSawn + +- type: loadout + id: LoadoutServiceRestrictedGearBartenderMosinRubber + category: JobsServiceBartender + cost: 6 + exclusive: true + canBeHeirloom: true + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterItemGroupRequirement + group: LoadoutBartenderWeapon + - !type:CharacterJobRequirement + inverted: true + jobs: + - Bartender + items: + - WeaponSniperMosinRubber \ No newline at end of file diff --git a/Resources/Prototypes/Traits/physical.yml b/Resources/Prototypes/Traits/physical.yml index a13db4f48cf..c86cfa0eb39 100644 --- a/Resources/Prototypes/Traits/physical.yml +++ b/Resources/Prototypes/Traits/physical.yml @@ -669,3 +669,14 @@ - Biological - Inorganic - Silicon + +- type: trait + id: RestrictedGear + category: Physical + points: -10 + requirements: + - !type:CharacterJobRequirement + inverted: true + jobs: + - Prisoner # Smuggling for prisoners = immediate jailbreak. + \ No newline at end of file From 6f3342a01e11fa0b5f1383e9ab032b17ecb8c2de Mon Sep 17 00:00:00 2001 From: WarMechanic <69510347+WarMechanic@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:45:57 +1000 Subject: [PATCH 02/20] restricted gear requirement for sec outerwear --- .../Loadouts/Jobs/Security/traitRestrictedGear.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml index 23d99b87761..96afba8ffc9 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml @@ -41,6 +41,9 @@ cost: 7 exclusive: true requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear - !type:CharacterItemGroupRequirement group: LoadoutSecurityOuter - !type:CharacterDepartmentRequirement @@ -56,6 +59,9 @@ cost: 7 exclusive: true requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear - !type:CharacterItemGroupRequirement group: LoadoutSecurityOuter - !type:CharacterDepartmentRequirement @@ -71,6 +77,9 @@ cost: 7 exclusive: true requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear - !type:CharacterItemGroupRequirement group: LoadoutSecurityOuter - !type:CharacterDepartmentRequirement @@ -86,6 +95,9 @@ cost: 7 exclusive: true requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear - !type:CharacterItemGroupRequirement group: LoadoutSecurityOuter - !type:CharacterDepartmentRequirement From 93ef19c445252ef2a9d456053fd617688b93a969 Mon Sep 17 00:00:00 2001 From: WarMechanic <69510347+WarMechanic@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:14:00 +1000 Subject: [PATCH 03/20] add individual engineering tools to restricted gear list for engineering --- .../Jobs/Engineering/traitRestrictedGear.yml | 97 ++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml index a78089a013c..cece33f57d7 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml @@ -18,7 +18,88 @@ items: - ClothingEyesGlassesMeson -## Power Drill +## Tools +# Wirecutters +- type: loadout + id: LoadoutEngineeringRestrictedGearEquipmentWirecutters + category: JobsEngineeringAAUncategorized + cost: 1 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Engineering + items: + - Wirecutters + +# Screwdriver +- type: loadout + id: LoadoutEngineeringRestrictedGearEquipmentScrewdriver + category: JobsEngineeringAAUncategorized + cost: 1 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Engineering + items: + - Screwdriver + +# Wrench +- type: loadout + id: LoadoutEngineeringRestrictedGearEquipmentWrench + category: JobsEngineeringAAUncategorized + cost: 1 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Engineering + items: + - Wrench + +# White Crowbar +- type: loadout + id: LoadoutEngineeringRestrictedGearEquipmentCrowbar + category: JobsEngineeringAAUncategorized + cost: 1 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Engineering + items: + - Crowbar + +# Multitool +- type: loadout + id: LoadoutEngineeringRestrictedGearEquipmentMultitool + category: JobsEngineeringAAUncategorized + cost: 2 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Engineering + items: + - Multitool + +# Power Drill - type: loadout id: LoadoutEngineeringRestrictedGearPowerDrill category: JobsEngineeringAAUncategorized @@ -110,6 +191,20 @@ items: - ClothingBeltUtilityAtmos +- type: loadout + id: LoadoutEngineeringRestrictedGearEquipmentHolofanProjector + category: JobsEngineeringAtmosphericTechnician + cost: 2 + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterJobRequirement + inverted: true + jobs: + - AtmosphericTechnician + items: + - HolofanProjector ### SE ## Utility belt From 70134de65dc684ca7bdb1a322082492e98c54e18 Mon Sep 17 00:00:00 2001 From: WarMechanic <69510347+WarMechanic@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:30:00 +1000 Subject: [PATCH 04/20] individual surgery tools --- .../Jobs/Medical/traitRestrictedGear.yml | 138 +++++++++++++++++- 1 file changed, 137 insertions(+), 1 deletion(-) diff --git a/Resources/Prototypes/Loadouts/Jobs/Medical/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Medical/traitRestrictedGear.yml index 3834c120017..dce6cabfbbc 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Medical/traitRestrictedGear.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Medical/traitRestrictedGear.yml @@ -1,5 +1,12 @@ ### All Medical -## Surgical Duffel + +## Surgery +## Note - Would it be more intuitive to move Surgery related items to Medical Doctor? +## Also, individual surgical tools are also made available as it mightn't always viable to equip the surgical duffel bag +## Getting the surgical duffel is cheaper than getting all the tools individually +## However, Scalpel + Hemostat + Retractors + Cautery is only 4 points + +# Surgical Duffel - type: loadout id: LoadoutMedicalRestrictedGearDuffelSurgeryFilled category: JobsMedicalAUncategorized @@ -15,6 +22,135 @@ departments: - Medical +# Cautery +- type: loadout + id: LoadoutMedicalRestrictedGearEquipmentCautery + category: JobsMedicalAUncategorized + cost: 1 + items: + - Cautery + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + +# Drill +- type: loadout + id: LoadoutMedicalRestrictedGearEquipmentDrill + category: JobsMedicalAUncategorized + cost: 1 + items: + - Drill + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + +# Scalpel +- type: loadout + id: LoadoutMedicalRestrictedGearEquipmentScalpel + category: JobsMedicalAUncategorized + cost: 1 + items: + - Scalpel + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + +# Retractor +- type: loadout + id: LoadoutMedicalRestrictedGearEquipmentRetractor + category: JobsMedicalAUncategorized + cost: 1 + items: + - Retractor + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + +# Hemostat +- type: loadout + id: LoadoutMedicalRestrictedGearEquipmentHemostat + category: JobsMedicalAUncategorized + cost: 1 + items: + - Hemostat + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + +# Bonesetter +- type: loadout + id: LoadoutMedicalRestrictedGearEquipmentBonesetter + category: JobsMedicalAUncategorized + cost: 1 + items: + - Bonesetter + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + +# Bonegel +- type: loadout + id: LoadoutMedicalRestrictedGearEquipmentBoneGel + category: JobsMedicalAUncategorized + cost: 1 + items: + - BoneGel + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + +# Metal Saw +- type: loadout + id: LoadoutMedicalRestrictedGearEquipmentSaw + category: JobsMedicalAUncategorized + cost: 1 + items: + - Saw + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Medical + + ## Eyes # Medhud - type: loadout From e4e7853ad3a9cbfcb7db3cc965f2094454b536dd Mon Sep 17 00:00:00 2001 From: WarMechanic <69510347+WarMechanic@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:36:22 +1000 Subject: [PATCH 05/20] oops --- .../Loadouts/Jobs/Engineering/traitRestrictedGear.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml index cece33f57d7..2e3630f5e4d 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml @@ -28,7 +28,7 @@ - !type:CharacterTraitRequirement traits: - RestrictedGear - - !type:CharacterDepartmentRequirement + - !type:CharacterDepartmentRequirement inverted: true departments: - Engineering From e2ba80ccf54ec256a9e8b746a2658268ea077445 Mon Sep 17 00:00:00 2001 From: WarMechanic <69510347+WarMechanic@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:38:43 +1000 Subject: [PATCH 06/20] oops 2 --- .../Loadouts/Jobs/Engineering/traitRestrictedGear.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml index 2e3630f5e4d..ecb0655e905 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml @@ -19,9 +19,9 @@ - ClothingEyesGlassesMeson ## Tools -# Wirecutters +# Wirecutter - type: loadout - id: LoadoutEngineeringRestrictedGearEquipmentWirecutters + id: LoadoutEngineeringRestrictedGearEquipmentWirecutter category: JobsEngineeringAAUncategorized cost: 1 requirements: From b687a6e01df78d65aab9e46f821701d94122d4cf Mon Sep 17 00:00:00 2001 From: WarMechanic <69510347+WarMechanic@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:41:03 +1000 Subject: [PATCH 07/20] oops 2.5 --- .../Loadouts/Jobs/Engineering/traitRestrictedGear.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml index ecb0655e905..a1bce018a75 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml @@ -33,7 +33,7 @@ departments: - Engineering items: - - Wirecutters + - Wirecutter # Screwdriver - type: loadout From 44da931628e1bfcb4219d577481719eb12183efd Mon Sep 17 00:00:00 2001 From: WarMechanic <69510347+WarMechanic@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:10:50 +1000 Subject: [PATCH 08/20] exclusive: true pass --- .../Loadouts/Jobs/Engineering/traitRestrictedGear.yml | 2 ++ .../Prototypes/Loadouts/Jobs/Logistics/traitRestrictedGear.yml | 3 +++ .../Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml | 1 + 3 files changed, 6 insertions(+) diff --git a/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml index a1bce018a75..9db2670c2ee 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Engineering/traitRestrictedGear.yml @@ -180,6 +180,7 @@ id: LoadoutEngineeringRestrictedGearBeltUtilityAtmos category: JobsEngineeringAtmosphericTechnician cost: 5 + exclusive: true requirements: - !type:CharacterTraitRequirement traits: @@ -212,6 +213,7 @@ id: LoadoutEngineeringRestrictedGearBeltUtilityEngineering category: JobsEngineeringStationEngineer cost: 4 + exclusive: true requirements: - !type:CharacterTraitRequirement traits: diff --git a/Resources/Prototypes/Loadouts/Jobs/Logistics/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Logistics/traitRestrictedGear.yml index 8b65183130f..9a7c83a33f4 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Logistics/traitRestrictedGear.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Logistics/traitRestrictedGear.yml @@ -5,6 +5,7 @@ id: LoadoutCargoRestrictedGearBeltMercWebbing category: JobsLogisticsSalvageSpecialist cost: 5 + exclusive: true requirements: - !type:CharacterTraitRequirement traits: @@ -23,6 +24,7 @@ id: LoadoutCargoRestrictedGearBeltSalvageWebbing category: JobsLogisticsSalvageSpecialist cost: 5 + exclusive: true requirements: - !type:CharacterTraitRequirement traits: @@ -41,6 +43,7 @@ id: LoadoutCargoRestrictedGearBeltMilitaryWebbing category: JobsLogisticsSalvageSpecialist cost: 5 + exclusive: true customColorTint: true requirements: - !type:CharacterTraitRequirement diff --git a/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml index 96afba8ffc9..6ac9be64844 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml @@ -23,6 +23,7 @@ id: LoadoutSecurityRestrictedGearBeltHolster category: JobsSecurityAUncategorized cost: 2 + exclusive: true requirements: - !type:CharacterTraitRequirement traits: From 51951c5040da8c8a1b3b766aca1b9188eda70796 Mon Sep 17 00:00:00 2001 From: WarMechanic <69510347+WarMechanic@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:19:04 +1000 Subject: [PATCH 09/20] change one word --- Resources/Locale/en-US/traits/traits.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Locale/en-US/traits/traits.ftl b/Resources/Locale/en-US/traits/traits.ftl index b9f4e317358..d2048594fa1 100644 --- a/Resources/Locale/en-US/traits/traits.ftl +++ b/Resources/Locale/en-US/traits/traits.ftl @@ -441,6 +441,6 @@ trait-description-ShadowkinBlackeye = You lose your special Shadowkin powers, in trait-name-RestrictedGear = Restricted Gear trait-description-RestrictedGear = - Either through personal ownership or stealing, you have access to equipment that isn't particularly standard issue. + Either through personal ownership or theft, you have access to equipment that isn't particularly standard issue. Note that starting with an item [color=red]doesn't certify its legality[/color]. Conceal it or justify it. (You equip other jobs' items in the loadouts menu) \ No newline at end of file From 992c76474729be615711787f7451508543980689 Mon Sep 17 00:00:00 2001 From: WarMechanic <69510347+WarMechanic@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:30:02 +1000 Subject: [PATCH 10/20] extended 1 hour security requirement to all offensive security restricted gear --- .../Loadouts/Jobs/Security/traitRestrictedGear.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml index 6ac9be64844..c0b3cf66868 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml @@ -119,6 +119,9 @@ - !type:CharacterTraitRequirement traits: - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours - !type:CharacterItemGroupRequirement group: LoadoutSecurityEquipment - !type:CharacterDepartmentRequirement @@ -158,6 +161,9 @@ - !type:CharacterTraitRequirement traits: - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours - !type:CharacterItemGroupRequirement group: LoadoutSecurityEquipment - !type:CharacterDepartmentRequirement @@ -199,6 +205,9 @@ - !type:CharacterTraitRequirement traits: - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours - !type:CharacterItemGroupRequirement group: LoadoutSecurityEquipment - !type:CharacterDepartmentRequirement @@ -265,6 +274,9 @@ - !type:CharacterTraitRequirement traits: - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours - !type:CharacterItemGroupRequirement group: LoadoutSecurityWeapons - !type:CharacterDepartmentRequirement From 610a8456c22b74ff475dbe4b896fd742e0df4ff6 Mon Sep 17 00:00:00 2001 From: WarMechanic <69510347+WarMechanic@users.noreply.github.com> Date: Sat, 7 Dec 2024 03:19:45 +1000 Subject: [PATCH 11/20] duplicate sunglasses 1984 --- .../Jobs/Security/traitRestrictedGear.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml index c0b3cf66868..d1bd221d106 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml @@ -1,23 +1,4 @@ ### All Security -## Sunglasses -- type: loadout - id: LoadoutSecurityRestrictedGearEyesGlassesSunglasses - category: JobsSecurityAUncategorized - cost: 3 - exclusive: true - requirements: - - !type:CharacterTraitRequirement - traits: - - RestrictedGear - - !type:CharacterItemGroupRequirement - group: LoadoutSecurityEyes - - !type:CharacterDepartmentRequirement - inverted: true - departments: - - Security - items: - - ClothingEyesGlassesSunglasses - ## Holster - type: loadout id: LoadoutSecurityRestrictedGearBeltHolster From 3647f70e71e6b113ed2c17fe0ec1f71b17b8643c Mon Sep 17 00:00:00 2001 From: sleepyyapril Date: Sat, 7 Dec 2024 02:57:08 -0400 Subject: [PATCH 12/20] This is literally just string-checking, lmao, but it should work fine for most purposes. --- .../Systems/CharacterRequirements.Profile.cs | 203 ++++++++++++------ .../customization/character-requirements.ftl | 8 + 2 files changed, 151 insertions(+), 60 deletions(-) diff --git a/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs b/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs index 5e10c504932..c71e9183d6a 100644 --- a/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs +++ b/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs @@ -1,3 +1,5 @@ +#region + using System.Linq; using Content.Shared.Clothing.Loadouts.Prototypes; using Content.Shared.Humanoid; @@ -12,7 +14,9 @@ using Robust.Shared.Physics; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; -using Robust.Shared.Utility; + +#endregion + namespace Content.Shared.Customization.Systems; @@ -20,8 +24,7 @@ namespace Content.Shared.Customization.Systems; /// /// Requires the profile to be within an age range /// -[UsedImplicitly] -[Serializable, NetSerializable] +[UsedImplicitly, Serializable, NetSerializable,] public sealed partial class CharacterAgeRequirement : CharacterRequirement { [DataField(required: true)] @@ -30,7 +33,8 @@ public sealed partial class CharacterAgeRequirement : CharacterRequirement [DataField(required: true)] public int Max; - public override bool IsValid(JobPrototype job, + public override bool IsValid( + JobPrototype job, HumanoidCharacterProfile profile, Dictionary playTimes, bool whitelisted, @@ -39,10 +43,14 @@ public override bool IsValid(JobPrototype job, IPrototypeManager prototypeManager, IConfigurationManager configManager, out string? reason, - int depth = 0) + int depth = 0 + ) { - reason = Loc.GetString("character-age-requirement", - ("inverted", Inverted), ("min", Min), ("max", Max)); + reason = Loc.GetString( + "character-age-requirement", + ("inverted", Inverted), + ("min", Min), + ("max", Max)); return profile.Age >= Min && profile.Age <= Max; } } @@ -50,14 +58,14 @@ public override bool IsValid(JobPrototype job, /// /// Requires the profile to be a certain gender /// -[UsedImplicitly] -[Serializable, NetSerializable] +[UsedImplicitly, Serializable, NetSerializable,] public sealed partial class CharacterGenderRequirement : CharacterRequirement { [DataField(required: true)] public Gender Gender; - public override bool IsValid(JobPrototype job, + public override bool IsValid( + JobPrototype job, HumanoidCharacterProfile profile, Dictionary playTimes, bool whitelisted, @@ -66,9 +74,11 @@ public override bool IsValid(JobPrototype job, IPrototypeManager prototypeManager, IConfigurationManager configManager, out string? reason, - int depth = 0) + int depth = 0 + ) { - reason = Loc.GetString("character-gender-requirement", + reason = Loc.GetString( + "character-gender-requirement", ("inverted", Inverted), ("gender", Loc.GetString($"humanoid-profile-editor-pronouns-{Gender.ToString().ToLower()}-text"))); return profile.Gender == Gender; @@ -78,14 +88,14 @@ public override bool IsValid(JobPrototype job, /// /// Requires the profile to be a certain sex /// -[UsedImplicitly] -[Serializable, NetSerializable] +[UsedImplicitly, Serializable, NetSerializable,] public sealed partial class CharacterSexRequirement : CharacterRequirement { [DataField(required: true)] public Sex Sex; - public override bool IsValid(JobPrototype job, + public override bool IsValid( + JobPrototype job, HumanoidCharacterProfile profile, Dictionary playTimes, bool whitelisted, @@ -94,9 +104,11 @@ public override bool IsValid(JobPrototype job, IPrototypeManager prototypeManager, IConfigurationManager configManager, out string? reason, - int depth = 0) + int depth = 0 + ) { - reason = Loc.GetString("character-sex-requirement", + reason = Loc.GetString( + "character-sex-requirement", ("inverted", Inverted), ("sex", Loc.GetString($"humanoid-profile-editor-sex-{Sex.ToString().ToLower()}-text"))); return profile.Sex == Sex; @@ -106,14 +118,14 @@ public override bool IsValid(JobPrototype job, /// /// Requires the profile to be a certain species /// -[UsedImplicitly] -[Serializable, NetSerializable] +[UsedImplicitly, Serializable, NetSerializable,] public sealed partial class CharacterSpeciesRequirement : CharacterRequirement { [DataField(required: true)] public List> Species; - public override bool IsValid(JobPrototype job, + public override bool IsValid( + JobPrototype job, HumanoidCharacterProfile profile, Dictionary playTimes, bool whitelisted, @@ -122,10 +134,12 @@ public override bool IsValid(JobPrototype job, IPrototypeManager prototypeManager, IConfigurationManager configManager, out string? reason, - int depth = 0) + int depth = 0 + ) { const string color = "green"; - reason = Loc.GetString("character-species-requirement", + reason = Loc.GetString( + "character-species-requirement", ("inverted", Inverted), ("species", $"[color={color}]{string.Join($"[/color], [color={color}]", Species.Select(s => Loc.GetString(prototypeManager.Index(s).Name)))}[/color]")); @@ -135,10 +149,9 @@ public override bool IsValid(JobPrototype job, } /// -/// Requires the profile to be within a certain height range +/// Requires the profile to be within a certain height range /// -[UsedImplicitly] -[Serializable, NetSerializable] +[UsedImplicitly, Serializable, NetSerializable,] public sealed partial class CharacterHeightRequirement : CharacterRequirement { /// @@ -153,7 +166,8 @@ public sealed partial class CharacterHeightRequirement : CharacterRequirement [DataField] public float Max = int.MaxValue; - public override bool IsValid(JobPrototype job, + public override bool IsValid( + JobPrototype job, HumanoidCharacterProfile profile, Dictionary playTimes, bool whitelisted, @@ -162,13 +176,18 @@ public override bool IsValid(JobPrototype job, IPrototypeManager prototypeManager, IConfigurationManager configManager, out string? reason, - int depth = 0) + int depth = 0 + ) { const string color = "yellow"; var species = prototypeManager.Index(profile.Species); - reason = Loc.GetString("character-height-requirement", - ("inverted", Inverted), ("color", color), ("min", Min), ("max", Max)); + reason = Loc.GetString( + "character-height-requirement", + ("inverted", Inverted), + ("color", color), + ("min", Min), + ("max", Max)); var height = profile.Height * species.AverageHeight; return height >= Min && height <= Max; @@ -178,8 +197,7 @@ public override bool IsValid(JobPrototype job, /// /// Requires the profile to be within a certain width range /// -[UsedImplicitly] -[Serializable, NetSerializable] +[UsedImplicitly, Serializable, NetSerializable,] public sealed partial class CharacterWidthRequirement : CharacterRequirement { /// @@ -194,7 +212,8 @@ public sealed partial class CharacterWidthRequirement : CharacterRequirement [DataField] public float Max = int.MaxValue; - public override bool IsValid(JobPrototype job, + public override bool IsValid( + JobPrototype job, HumanoidCharacterProfile profile, Dictionary playTimes, bool whitelisted, @@ -203,13 +222,18 @@ public override bool IsValid(JobPrototype job, IPrototypeManager prototypeManager, IConfigurationManager configManager, out string? reason, - int depth = 0) + int depth = 0 + ) { const string color = "yellow"; var species = prototypeManager.Index(profile.Species); - reason = Loc.GetString("character-width-requirement", - ("inverted", Inverted), ("color", color), ("min", Min), ("max", Max)); + reason = Loc.GetString( + "character-width-requirement", + ("inverted", Inverted), + ("color", color), + ("min", Min), + ("max", Max)); var width = profile.Width * species.AverageWidth; return width >= Min && width <= Max; @@ -219,8 +243,7 @@ public override bool IsValid(JobPrototype job, /// /// Requires the profile to be within a certain weight range /// -[UsedImplicitly] -[Serializable, NetSerializable] +[UsedImplicitly, Serializable, NetSerializable,] public sealed partial class CharacterWeightRequirement : CharacterRequirement { /// @@ -235,7 +258,8 @@ public sealed partial class CharacterWeightRequirement : CharacterRequirement [DataField] public float Max = int.MaxValue; - public override bool IsValid(JobPrototype job, + public override bool IsValid( + JobPrototype job, HumanoidCharacterProfile profile, Dictionary playTimes, bool whitelisted, @@ -244,7 +268,8 @@ public override bool IsValid(JobPrototype job, IPrototypeManager prototypeManager, IConfigurationManager configManager, out string? reason, - int depth = 0) + int depth = 0 + ) { const string color = "green"; var species = prototypeManager.Index(profile.Species); @@ -259,28 +284,32 @@ public override bool IsValid(JobPrototype job, var weight = MathF.Round( MathF.PI * MathF.Pow( fixture.Fixtures["fix1"].Shape.Radius - * ((profile.Width + profile.Height) / 2), 2) - * fixture.Fixtures["fix1"].Density); + * ((profile.Width + profile.Height) / 2), + 2) + * fixture.Fixtures["fix1"].Density); - reason = Loc.GetString("character-weight-requirement", - ("inverted", Inverted), ("color", color), ("min", Min), ("max", Max)); + reason = Loc.GetString( + "character-weight-requirement", + ("inverted", Inverted), + ("color", color), + ("min", Min), + ("max", Max)); return weight >= Min && weight <= Max; } } - /// /// Requires the profile to have one of the specified traits /// -[UsedImplicitly] -[Serializable, NetSerializable] +[UsedImplicitly, Serializable, NetSerializable,] public sealed partial class CharacterTraitRequirement : CharacterRequirement { [DataField(required: true)] public List> Traits; - public override bool IsValid(JobPrototype job, + public override bool IsValid( + JobPrototype job, HumanoidCharacterProfile profile, Dictionary playTimes, bool whitelisted, @@ -289,10 +318,12 @@ public override bool IsValid(JobPrototype job, IPrototypeManager prototypeManager, IConfigurationManager configManager, out string? reason, - int depth = 0) + int depth = 0 + ) { const string color = "lightblue"; - reason = Loc.GetString("character-trait-requirement", + reason = Loc.GetString( + "character-trait-requirement", ("inverted", Inverted), ("traits", $"[color={color}]{string.Join($"[/color], [color={color}]", Traits.Select(t => Loc.GetString($"trait-name-{t}")))}[/color]")); @@ -304,14 +335,14 @@ public override bool IsValid(JobPrototype job, /// /// Requires the profile to have one of the specified loadouts /// -[UsedImplicitly] -[Serializable, NetSerializable] +[UsedImplicitly, Serializable, NetSerializable,] public sealed partial class CharacterLoadoutRequirement : CharacterRequirement { [DataField(required: true)] public List> Loadouts; - public override bool IsValid(JobPrototype job, + public override bool IsValid( + JobPrototype job, HumanoidCharacterProfile profile, Dictionary playTimes, bool whitelisted, @@ -320,10 +351,12 @@ public override bool IsValid(JobPrototype job, IPrototypeManager prototypeManager, IConfigurationManager configManager, out string? reason, - int depth = 0) + int depth = 0 + ) { const string color = "lightblue"; - reason = Loc.GetString("character-loadout-requirement", + reason = Loc.GetString( + "character-loadout-requirement", ("inverted", Inverted), ("loadouts", $"[color={color}]{string.Join($"[/color], [color={color}]", Loadouts.Select(l => Loc.GetString($"loadout-name-{l}")))}[/color]")); @@ -335,14 +368,14 @@ public override bool IsValid(JobPrototype job, /// /// Requires the profile to not have any more than X of the specified traits, loadouts, etc, in a group /// -[UsedImplicitly] -[Serializable, NetSerializable] +[UsedImplicitly, Serializable, NetSerializable,] public sealed partial class CharacterItemGroupRequirement : CharacterRequirement { [DataField(required: true)] public ProtoId Group; - public override bool IsValid(JobPrototype job, + public override bool IsValid( + JobPrototype job, HumanoidCharacterProfile profile, Dictionary playTimes, bool whitelisted, @@ -351,19 +384,23 @@ public override bool IsValid(JobPrototype job, IPrototypeManager prototypeManager, IConfigurationManager configManager, out string? reason, - int depth = 0) + int depth = 0 + ) { var group = prototypeManager.Index(Group); // Get the count of items in the group that are in the profile - var items = group.Items.Select(item => item.TryGetValue(profile, prototypeManager, out _) ? item.ID : null).Where(id => id != null).ToList(); + var items = group.Items.Select(item => item.TryGetValue(profile, prototypeManager, out _) ? item.ID : null) + .Where(id => id != null) + .ToList(); var count = items.Count; // If prototype is selected, remove one from the count if (items.ToList().Contains(prototype.ID)) count--; - reason = Loc.GetString("character-item-group-requirement", + reason = Loc.GetString( + "character-item-group-requirement", ("inverted", Inverted), ("group", Loc.GetString($"character-item-group-{Group}")), ("max", group.MaxItems)); @@ -371,3 +408,49 @@ public override bool IsValid(JobPrototype job, return count < group.MaxItems; } } + +/// +/// Requires the profile to have one of the specified loadouts +/// +[UsedImplicitly, Serializable, NetSerializable,] +public sealed partial class CVarRequirement : CharacterRequirement +{ + [DataField("cvar", required: true)] + public string CVar; + + [DataField("requireValue", required: true)] + public string RequiredValue; + + public override bool IsValid( + JobPrototype job, + HumanoidCharacterProfile profile, + Dictionary playTimes, + bool whitelisted, + IPrototype prototype, + IEntityManager entityManager, + IPrototypeManager prototypeManager, + IConfigurationManager configManager, + out string? reason, + int depth = 0 + ) + { + if (!configManager.IsCVarRegistered(CVar)) + { + reason = null; + return true; + } + + const string color = "lightblue"; + var cvar = configManager.GetCVar(CVar); + var isValid = cvar.ToString()! == RequiredValue; + + reason = Loc.GetString( + "character-cvar-requirement", + ("inverted", Inverted), + ("color", color), + ("cvar", CVar), + ("value", RequiredValue)); + + return isValid; + } +} diff --git a/Resources/Locale/en-US/customization/character-requirements.ftl b/Resources/Locale/en-US/customization/character-requirements.ftl index d50c2b39669..8c3be74231c 100644 --- a/Resources/Locale/en-US/customization/character-requirements.ftl +++ b/Resources/Locale/en-US/customization/character-requirements.ftl @@ -140,3 +140,11 @@ character-whitelist-requirement = You must{$inverted -> [true]{" "}not *[other]{""} } be whitelisted + +## Cvar + +character-cvar-requirement = + The server must{$inverted -> + [true]{" "}not + *[other]{""} +} have [color={$color}]{$cvar}[/color] set to [color={$color}]{$value}[/color]. From 1f56f49c26aa3233d3b94600b1fae70005c71fda Mon Sep 17 00:00:00 2001 From: sleepyyapril Date: Sat, 7 Dec 2024 02:58:27 -0400 Subject: [PATCH 13/20] Disgusting --- .../Customization/Systems/CharacterRequirements.Profile.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs b/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs index c71e9183d6a..e8c2227963f 100644 --- a/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs +++ b/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs @@ -1,5 +1,3 @@ -#region - using System.Linq; using Content.Shared.Clothing.Loadouts.Prototypes; using Content.Shared.Humanoid; @@ -15,9 +13,6 @@ using Robust.Shared.Prototypes; using Robust.Shared.Serialization; -#endregion - - namespace Content.Shared.Customization.Systems; From 253f580a8db3109849a7dfd6181c153668d0e94a Mon Sep 17 00:00:00 2001 From: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com> Date: Sat, 7 Dec 2024 03:03:46 -0400 Subject: [PATCH 14/20] I used this in debugging, no longer! Signed-off-by: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com> --- .../Customization/Systems/CharacterRequirements.Profile.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs b/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs index e8c2227963f..b4a1b3d7126 100644 --- a/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs +++ b/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs @@ -437,7 +437,6 @@ public override bool IsValid( const string color = "lightblue"; var cvar = configManager.GetCVar(CVar); - var isValid = cvar.ToString()! == RequiredValue; reason = Loc.GetString( "character-cvar-requirement", @@ -446,6 +445,6 @@ public override bool IsValid( ("cvar", CVar), ("value", RequiredValue)); - return isValid; + return cvar.ToString()! == RequiredValue; } } From 92726785edeee9109d7152c56bf870cad76f5830 Mon Sep 17 00:00:00 2001 From: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com> Date: Sat, 7 Dec 2024 03:17:40 -0400 Subject: [PATCH 15/20] Update CharacterRequirements.Profile.cs Signed-off-by: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com> --- .../Systems/CharacterRequirements.Profile.cs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs b/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs index b4a1b3d7126..c715a21ac20 100644 --- a/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs +++ b/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs @@ -19,7 +19,7 @@ namespace Content.Shared.Customization.Systems; /// /// Requires the profile to be within an age range /// -[UsedImplicitly, Serializable, NetSerializable,] +[UsedImplicitly, Serializable, NetSerializable] public sealed partial class CharacterAgeRequirement : CharacterRequirement { [DataField(required: true)] @@ -53,7 +53,7 @@ public override bool IsValid( /// /// Requires the profile to be a certain gender /// -[UsedImplicitly, Serializable, NetSerializable,] +[UsedImplicitly, Serializable, NetSerializable] public sealed partial class CharacterGenderRequirement : CharacterRequirement { [DataField(required: true)] @@ -83,7 +83,7 @@ public override bool IsValid( /// /// Requires the profile to be a certain sex /// -[UsedImplicitly, Serializable, NetSerializable,] +[UsedImplicitly, Serializable, NetSerializable] public sealed partial class CharacterSexRequirement : CharacterRequirement { [DataField(required: true)] @@ -113,7 +113,7 @@ public override bool IsValid( /// /// Requires the profile to be a certain species /// -[UsedImplicitly, Serializable, NetSerializable,] +[UsedImplicitly, Serializable, NetSerializable] public sealed partial class CharacterSpeciesRequirement : CharacterRequirement { [DataField(required: true)] @@ -146,7 +146,7 @@ public override bool IsValid( /// /// Requires the profile to be within a certain height range /// -[UsedImplicitly, Serializable, NetSerializable,] +[UsedImplicitly, Serializable, NetSerializable] public sealed partial class CharacterHeightRequirement : CharacterRequirement { /// @@ -192,7 +192,7 @@ public override bool IsValid( /// /// Requires the profile to be within a certain width range /// -[UsedImplicitly, Serializable, NetSerializable,] +[UsedImplicitly, Serializable, NetSerializable] public sealed partial class CharacterWidthRequirement : CharacterRequirement { /// @@ -238,7 +238,7 @@ public override bool IsValid( /// /// Requires the profile to be within a certain weight range /// -[UsedImplicitly, Serializable, NetSerializable,] +[UsedImplicitly, Serializable, NetSerializable] public sealed partial class CharacterWeightRequirement : CharacterRequirement { /// @@ -297,7 +297,7 @@ public override bool IsValid( /// /// Requires the profile to have one of the specified traits /// -[UsedImplicitly, Serializable, NetSerializable,] +[UsedImplicitly, Serializable, NetSerializable] public sealed partial class CharacterTraitRequirement : CharacterRequirement { [DataField(required: true)] @@ -330,7 +330,7 @@ public override bool IsValid( /// /// Requires the profile to have one of the specified loadouts /// -[UsedImplicitly, Serializable, NetSerializable,] +[UsedImplicitly, Serializable, NetSerializable] public sealed partial class CharacterLoadoutRequirement : CharacterRequirement { [DataField(required: true)] @@ -363,7 +363,7 @@ public override bool IsValid( /// /// Requires the profile to not have any more than X of the specified traits, loadouts, etc, in a group /// -[UsedImplicitly, Serializable, NetSerializable,] +[UsedImplicitly, Serializable, NetSerializable] public sealed partial class CharacterItemGroupRequirement : CharacterRequirement { [DataField(required: true)] @@ -407,7 +407,7 @@ public override bool IsValid( /// /// Requires the profile to have one of the specified loadouts /// -[UsedImplicitly, Serializable, NetSerializable,] +[UsedImplicitly, Serializable, NetSerializable] public sealed partial class CVarRequirement : CharacterRequirement { [DataField("cvar", required: true)] From 2412ad8ce4878e0b51ac908494d282cf9e6ec388 Mon Sep 17 00:00:00 2001 From: WarMechanic <69510347+WarMechanic@users.noreply.github.com> Date: Sun, 8 Dec 2024 14:15:46 +1000 Subject: [PATCH 16/20] add cvar requirements --- Content.Shared/CCVar/CCVars.cs | 13 +++ .../Jobs/Security/traitRestrictedGear.yml | 96 ++++++++++++++----- Resources/Prototypes/Traits/physical.yml | 2 + 3 files changed, 85 insertions(+), 26 deletions(-) diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs index 69c958fbc15..6e6be4f4685 100644 --- a/Content.Shared/CCVar/CCVars.cs +++ b/Content.Shared/CCVar/CCVars.cs @@ -2802,5 +2802,18 @@ public static readonly CVarDef /// public static readonly CVarDef UseDynamicHostname = CVarDef.Create("game.use_dynamic_hostname", false, CVar.SERVERONLY); + + /// + /// Whether the RestrictedGear trait can be used on the server. + /// + public static readonly CVarDef RestrictedGearEnabled = + CVarDef.Create("trait.restrictedgear_enabled", true, CVar.SERVERONLY); + + /// + /// Whether the RestrictedGear trait can allow guns for any job. + /// + + public static readonly CVarDef RestrictedGearAllowsFirearms = + CVarDef.Create("trait.restrictedgear_allowsfirearms", true, CVar.SERVERONLY); } } diff --git a/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml index d1bd221d106..625c96a89d6 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml @@ -118,6 +118,8 @@ category: JobsSecurityAUncategorized cost: 2 requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -139,6 +141,8 @@ category: JobsSecurityAUncategorized cost: 2 requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -161,6 +165,8 @@ cost: 4 exclusive: true requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -183,6 +189,8 @@ cost: 4 exclusive: true requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -205,6 +213,8 @@ cost: 4 exclusive: true requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -227,6 +237,8 @@ cost: 4 exclusive: true requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -242,6 +254,34 @@ items: - MagazineMagnumRubber +## Weapon +# the truncheon is not a gun, +# ignores the 'allowsfirearms' cvar in case an oni wants to specialise into blunt +# (like how swashbucklers can take salvager's blades) +- type: loadout + id: LoadoutSecurityRestrictedGearEquipmentTruncheon + category: JobsSecurityAUncategorized + cost: 4 + canBeHeirloom: true + guideEntry: SecurityWeapons + requirements: + - !type:CharacterTraitRequirement + traits: + - RestrictedGear + - !type:CharacterDepartmentTimeRequirement + department: Security + min: 3600 # 1 hours + - !type:CharacterItemGroupRequirement + group: LoadoutSecurityWeapons + - !type:CharacterDepartmentRequirement + inverted: true + departments: + - Security + - !type:CharacterSpeciesRequirement + species: + - Oni + items: + - Truncheon ## Guns # Disabler @@ -252,6 +292,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -275,6 +317,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -298,6 +342,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -321,6 +367,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -344,6 +392,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -367,6 +417,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -390,6 +442,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -405,32 +459,6 @@ items: - WeaponPistolViperWood -# Truncheon -- type: loadout - id: LoadoutSecurityRestrictedGearEquipmentTruncheon - category: JobsSecurityAUncategorized - cost: 4 - canBeHeirloom: true - guideEntry: SecurityWeapons - requirements: - - !type:CharacterTraitRequirement - traits: - - RestrictedGear - - !type:CharacterDepartmentTimeRequirement - department: Security - min: 3600 # 1 hours - - !type:CharacterItemGroupRequirement - group: LoadoutSecurityWeapons - - !type:CharacterDepartmentRequirement - inverted: true - departments: - - Security - - !type:CharacterSpeciesRequirement - species: - - Oni - items: - - Truncheon - # Svalin - type: loadout id: LoadoutSecurityRestrictedGearPistolSvalin @@ -439,6 +467,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -462,6 +492,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -485,6 +517,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -508,6 +542,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -531,6 +567,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -554,6 +592,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -577,6 +617,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -600,6 +642,8 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_allowsfirearms - !type:CharacterTraitRequirement traits: - RestrictedGear diff --git a/Resources/Prototypes/Traits/physical.yml b/Resources/Prototypes/Traits/physical.yml index c86cfa0eb39..bb330c465dd 100644 --- a/Resources/Prototypes/Traits/physical.yml +++ b/Resources/Prototypes/Traits/physical.yml @@ -675,6 +675,8 @@ category: Physical points: -10 requirements: + - !type:CharacterCvarRequirement + cvar: trait.restrictedgear_enabled - !type:CharacterJobRequirement inverted: true jobs: From 892db4a806acec13e345cb40aaccaead5ff33e93 Mon Sep 17 00:00:00 2001 From: sleepyyapril Date: Sun, 8 Dec 2024 00:42:42 -0400 Subject: [PATCH 17/20] Moved to Misc for anything that isn't truly a character requirement, but still needs to inherit as such. --- .../Systems/CharacterRequirements.Misc.cs | 45 ++++++++++++++++++ .../Systems/CharacterRequirements.Profile.cs | 46 ------------------- 2 files changed, 45 insertions(+), 46 deletions(-) create mode 100644 Content.Shared/Customization/Systems/CharacterRequirements.Misc.cs diff --git a/Content.Shared/Customization/Systems/CharacterRequirements.Misc.cs b/Content.Shared/Customization/Systems/CharacterRequirements.Misc.cs new file mode 100644 index 00000000000..b58b35ef8e3 --- /dev/null +++ b/Content.Shared/Customization/Systems/CharacterRequirements.Misc.cs @@ -0,0 +1,45 @@ +/// +/// Requires the profile to have one of the specified loadouts +/// +[UsedImplicitly, Serializable, NetSerializable,] +public sealed partial class CVarRequirement : CharacterRequirement +{ + [DataField("cvar", required: true)] + public string CVar; + + [DataField("requiredValue", required: true)] + public string RequiredValue; + + public override bool IsValid( + JobPrototype job, + HumanoidCharacterProfile profile, + Dictionary playTimes, + bool whitelisted, + IPrototype prototype, + IEntityManager entityManager, + IPrototypeManager prototypeManager, + IConfigurationManager configManager, + out string? reason, + int depth = 0 + ) + { + if (!configManager.IsCVarRegistered(CVar)) + { + reason = null; + return true; + } + + const string color = "lightblue"; + var cvar = configManager.GetCVar(CVar); + var isValid = cvar.ToString()! == RequiredValue; + + reason = Loc.GetString( + "character-cvar-requirement", + ("inverted", Inverted), + ("color", color), + ("cvar", CVar), + ("value", RequiredValue)); + + return isValid; + } +} \ No newline at end of file diff --git a/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs b/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs index e8c2227963f..cde97f24f5b 100644 --- a/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs +++ b/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs @@ -403,49 +403,3 @@ public override bool IsValid( return count < group.MaxItems; } } - -/// -/// Requires the profile to have one of the specified loadouts -/// -[UsedImplicitly, Serializable, NetSerializable,] -public sealed partial class CVarRequirement : CharacterRequirement -{ - [DataField("cvar", required: true)] - public string CVar; - - [DataField("requireValue", required: true)] - public string RequiredValue; - - public override bool IsValid( - JobPrototype job, - HumanoidCharacterProfile profile, - Dictionary playTimes, - bool whitelisted, - IPrototype prototype, - IEntityManager entityManager, - IPrototypeManager prototypeManager, - IConfigurationManager configManager, - out string? reason, - int depth = 0 - ) - { - if (!configManager.IsCVarRegistered(CVar)) - { - reason = null; - return true; - } - - const string color = "lightblue"; - var cvar = configManager.GetCVar(CVar); - var isValid = cvar.ToString()! == RequiredValue; - - reason = Loc.GetString( - "character-cvar-requirement", - ("inverted", Inverted), - ("color", color), - ("cvar", CVar), - ("value", RequiredValue)); - - return isValid; - } -} From 84a808a6f1df15ada2f3f85742494e6f3260d4e8 Mon Sep 17 00:00:00 2001 From: sleepyyapril Date: Sun, 8 Dec 2024 00:50:46 -0400 Subject: [PATCH 18/20] Oops --- .../Systems/CharacterRequirements.Misc.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Content.Shared/Customization/Systems/CharacterRequirements.Misc.cs b/Content.Shared/Customization/Systems/CharacterRequirements.Misc.cs index b58b35ef8e3..3e5d758c485 100644 --- a/Content.Shared/Customization/Systems/CharacterRequirements.Misc.cs +++ b/Content.Shared/Customization/Systems/CharacterRequirements.Misc.cs @@ -1,3 +1,13 @@ +using Content.Shared.Customization.Systems; +using Content.Shared.Preferences; +using Content.Shared.Roles; +using JetBrains.Annotations; +using Robust.Shared.Configuration; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization; + +namespace Content.Shared.Customization.Systems; + /// /// Requires the profile to have one of the specified loadouts /// @@ -5,10 +15,10 @@ public sealed partial class CVarRequirement : CharacterRequirement { [DataField("cvar", required: true)] - public string CVar; + public required string CVar; [DataField("requiredValue", required: true)] - public string RequiredValue; + public required string RequiredValue; public override bool IsValid( JobPrototype job, @@ -42,4 +52,4 @@ public override bool IsValid( return isValid; } -} \ No newline at end of file +} From 34be1772634a866b462c8bd7791849270afd221c Mon Sep 17 00:00:00 2001 From: WarMechanic <69510347+WarMechanic@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:43:18 +1000 Subject: [PATCH 19/20] attempt to fix security/traitRestrictedGear --- .../Jobs/Security/traitRestrictedGear.yml | 63 ++++++++++++------- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml b/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml index 625c96a89d6..22c2eab4860 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Security/traitRestrictedGear.yml @@ -118,8 +118,9 @@ category: JobsSecurityAUncategorized cost: 2 requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -141,8 +142,9 @@ category: JobsSecurityAUncategorized cost: 2 requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -165,8 +167,9 @@ cost: 4 exclusive: true requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -189,8 +192,9 @@ cost: 4 exclusive: true requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -213,8 +217,9 @@ cost: 4 exclusive: true requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -237,8 +242,9 @@ cost: 4 exclusive: true requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -292,8 +298,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -317,8 +324,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -342,8 +350,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -367,8 +376,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -392,8 +402,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -417,8 +428,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -442,8 +454,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -467,8 +480,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -492,8 +506,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -517,8 +532,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -542,8 +558,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -567,8 +584,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -592,8 +610,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -617,8 +636,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear @@ -642,8 +662,9 @@ canBeHeirloom: true guideEntry: SecurityWeapons requirements: - - !type:CharacterCvarRequirement + - !type:CVarRequirement cvar: trait.restrictedgear_allowsfirearms + requiredValue: true - !type:CharacterTraitRequirement traits: - RestrictedGear From f1418de00ce0a01c477a55506713c23bfbd73b55 Mon Sep 17 00:00:00 2001 From: WarMechanic <69510347+WarMechanic@users.noreply.github.com> Date: Tue, 17 Dec 2024 20:12:33 +1000 Subject: [PATCH 20/20] correct merge error --- Resources/Prototypes/Traits/physical.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/Resources/Prototypes/Traits/physical.yml b/Resources/Prototypes/Traits/physical.yml index e8749240e3a..f2447390064 100644 --- a/Resources/Prototypes/Traits/physical.yml +++ b/Resources/Prototypes/Traits/physical.yml @@ -683,6 +683,7 @@ jobs: - Prisoner # Smuggling for prisoners = immediate jailbreak. +- type: trait id: Redshirt category: Physical points: 8