Skip to content

Commit

Permalink
character-requirements, loadouts and other
Browse files Browse the repository at this point in the history
  • Loading branch information
RedBurningPhoenix committed Aug 30, 2024
1 parent c7e055a commit c25e64e
Show file tree
Hide file tree
Showing 64 changed files with 416 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using System.Linq;
using Content.Shared.Clothing.Loadouts.Prototypes;
using Content.Shared.Humanoid;
using Content.Shared.Humanoid.Prototypes;
using Content.Shared.Preferences;
using Content.Shared.Roles;
using Content.Shared.Traits;
using JetBrains.Annotations;
using Robust.Shared.Configuration;
using Robust.Shared.Enums;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
Expand Down Expand Up @@ -106,6 +108,8 @@ public override bool IsValid(JobPrototype job, HumanoidCharacterProfile profile,
}
}



/// <summary>
/// Requires the profile to have one of the specified traits
/// </summary>
Expand Down Expand Up @@ -155,3 +159,60 @@ public override bool IsValid(JobPrototype job, HumanoidCharacterProfile profile,
return Loadouts.Any(l => profile.LoadoutPreferences.Contains(l.ToString()));
}
}

// White Dream
[UsedImplicitly]
[Serializable, NetSerializable]
public sealed partial class CharacterSexRequirement : CharacterRequirement
{
[DataField(required: true)]
public Sex RequiredSex;

public override bool IsValid(JobPrototype job, HumanoidCharacterProfile profile,
Dictionary<string, TimeSpan> playTimes, bool whitelisted,
IEntityManager entityManager, IPrototypeManager prototypeManager, IConfigurationManager configManager,
out FormattedMessage? reason)
{
const string color = "green";
reason = FormattedMessage.FromMarkup(Loc.GetString("character-sex-requirement",
("inverted", Inverted),
("sex", $"[color={color}]{string.Join($"[/color], [color={color}]",
RequiredSex.ToString())}[/color]")));

return profile.Sex == RequiredSex;
}
}

[UsedImplicitly]
[Serializable, NetSerializable]
public sealed partial class CharacterGenderRequirement : CharacterRequirement
{
[DataField(required: true)]
public Gender RequiredGender;

public override bool IsValid(JobPrototype job, HumanoidCharacterProfile profile,
Dictionary<string, TimeSpan> playTimes, bool whitelisted,
IEntityManager entityManager, IPrototypeManager prototypeManager, IConfigurationManager configManager,
out FormattedMessage? reason)
{
const string color = "green";
reason = FormattedMessage.FromMarkup(Loc.GetString("character-gender-requirement",
("inverted", Inverted),
("gender", $"[color={color}]{string.Join($"[/color], [color={color}]",
GenderToString())}[/color]")));

return profile.Gender == RequiredGender;
}

private string GenderToString()
{
return RequiredGender switch
{
Gender.Male => Loc.GetString("humanoid-profile-editor-pronouns-male-text"),
Gender.Female => Loc.GetString("humanoid-profile-editor-pronouns-female-text"),
_ => Loc.GetString("unknown")
};
}
}
// White Dream

10 changes: 10 additions & 0 deletions Resources/Locale/en-US/customization/character-requirements.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ character-clothing-preference-requirement = You must {$inverted ->
*[other] wear
} a [color=white]{$type}[/color]
# White Dream
character-sex-requirement = Your sex must {$inverted ->
[true] not be
*[other] be
} a {$sex}
character-gender-requirement = Your pronouns must {$inverted ->
[true] not be
*[other] be
} a {$gender}
# White Dream

# Whitelist
character-whitelist-requirement = You must {$inverted ->
Expand Down
15 changes: 15 additions & 0 deletions Resources/Prototypes/_White/Entities/Clothing/Eyes/glasses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- type: entity
parent: ClothingEyesBase
id: ClothingEyesGlassesMaid
name: maid's sunglasses
description: Maid's sunglasses. Clean and cute.
components:
- type: Sprite
sprite: _White/Clothing/Eyes/Glasses/maidglasses.rsi
- type: Clothing
sprite: _White/Clothing/Eyes/Glasses/maidglasses.rsi
- type: FlashImmunity
- type: Tag
tags:
- WhitelistChameleon
- type: ShowSecurityIcons
43 changes: 43 additions & 0 deletions Resources/Prototypes/_White/Entities/Clothing/Head/hats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
- type: entity
parent: ClothingHeadBase
id: ClothingHeadHatHoboHat
name: bomzh hat
description: An old century hat. It's worn out and looks unkempt.
components:
- type: Sprite
sprite: _White/Clothing/Head/hobohat.rsi
- type: Clothing
sprite: _White/Clothing/Head/hobohat.rsi
- type: Tag
tags:
- HidesHair
- type: Armor
modifiers:
coefficients:
Blunt: 0.95

- type: entity
parent: ClothingHeadBase
id: ClothingHeadHatHoboCap
name: bomzh cap
description: Uninvited guest cap. Doesn't inspire confidence.
components:
- type: Sprite
sprite: _White/Clothing/Head/hobocap.rsi
- type: Clothing
sprite: _White/Clothing/Head/hobocap.rsi
- type: Armor
modifiers:
coefficients:
Blunt: 0.95

- type: entity
parent: ClothingHeadBase
id: ClothingHeadHatMobCap
name: maid's mob cap
description: The headdress of a true servant.
components:
- type: Sprite
sprite: _White/Clothing/Head/maidhat.rsi
- type: Clothing
sprite: _White/Clothing/Head/maidhat.rsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
description: The jacket has been through a lot, time has not been tolerant of it and has left its scars.
components:
- type: Sprite
sprite: White/Clothing/OuterClothing/Coats/jacket.rsi
sprite: _White/Clothing/OuterClothing/Coats/jacket.rsi
- type: Clothing
sprite: White/Clothing/OuterClothing/Coats/jacket.rsi
sprite: _White/Clothing/OuterClothing/Coats/jacket.rsi
- type: StorageFill
contents:
- id: SmokingPipeFilledTobacco
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
description: The maid's shoes. Shiny.
components:
- type: Sprite
sprite: White/Clothing/Shoes/maidshoes.rsi
sprite: _White/Clothing/Shoes/maidshoes.rsi
- type: Clothing
sprite: White/Clothing/Shoes/maidshoes.rsi
sprite: _White/Clothing/Shoes/maidshoes.rsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
description: Elegant maid's dress. Makes you feel comfortable, safe and clean around you.
components:
- type: Sprite
sprite: White/Clothing/Uniforms/Jumpskirt/maid.rsi
sprite: _White/Clothing/Uniforms/Jumpskirt/maid.rsi
- type: Clothing
sprite: White/Clothing/Uniforms/Jumpskirt/maid.rsi
sprite: _White/Clothing/Uniforms/Jumpskirt/maid.rsi

- type: entity
parent: ClothingUniformSkirtBase
Expand All @@ -16,6 +16,6 @@
description: Elegant shortened maid's servant's dress. Makes you feel comfortable, safe and clean around you. This view expands your horizon in your eyes.
components:
- type: Sprite
sprite: White/Clothing/Uniforms/Jumpskirt/maidmini.rsi
sprite: _White/Clothing/Uniforms/Jumpskirt/maidmini.rsi
- type: Clothing
sprite: White/Clothing/Uniforms/Jumpskirt/maidmini.rsi
sprite: _White/Clothing/Uniforms/Jumpskirt/maidmini.rsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
description: The ragged form of a man who has been through a lot. It's not so much the holes in all the places that strike you as the smell of her.
components:
- type: Sprite
sprite: White/Clothing/Uniforms/Jumpsuit/hobo.rsi
sprite: _White/Clothing/Uniforms/Jumpsuit/hobo.rsi
- type: Clothing
sprite: White/Clothing/Uniforms/Jumpsuit/hobo.rsi
sprite: _White/Clothing/Uniforms/Jumpsuit/hobo.rsi
75 changes: 75 additions & 0 deletions Resources/Prototypes/_White/Loadouts/Jobs/command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Maid
- type: loadout
id: LoadoutUniformJumpskirtMaid
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:CharacterSpeciesRequirement
species:
- Human
- !type:CharacterJobRequirement
jobs:
- Maid
items:
- ClothingUniformJumpskirtMaid

- type: loadout
id: LoadoutUniformJumpskirtMaidMini
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:CharacterSpeciesRequirement
species:
- Human
- !type:CharacterJobRequirement
jobs:
- Maid
items:
- ClothingUniformJumpskirtMaidMini

- type: loadout
id: LoadoutShoesMaid
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:CharacterSpeciesRequirement
species:
- Human
- !type:CharacterJobRequirement
jobs:
- Maid
items:
- ClothingShoesMaid

- type: loadout
id: LoadoutEyesGlassesMaid
category: Jobs
cost: 3
exclusive: true
requirements:
- !type:CharacterSpeciesRequirement
species:
- Human
- !type:CharacterJobRequirement
jobs:
- Maid
items:
- ClothingEyesGlassesMaid

- type: loadout
id: LoadoutHeadHatMobCap
category: Jobs
cost: 1
exclusive: true
requirements:
- !type:CharacterSpeciesRequirement
species:
- Human
- !type:CharacterJobRequirement
jobs:
- Maid
items:
- ClothingHeadHatMobCap
75 changes: 75 additions & 0 deletions Resources/Prototypes/_White/Loadouts/Jobs/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Hobo
- type: loadout
id: LoadoutUniformJumpsuitWhiteHobo
category: Jobs
cost: 2
exclusive: true
requirements:
- !type:CharacterSpeciesRequirement
species:
- Human
- !type:CharacterJobRequirement
jobs:
- Hobo
items:
- ClothingUniformJumpsuitWhiteHobo

- type: loadout
id: LoadoutOverCoatHobo
category: Jobs
cost: 4
exclusive: true
requirements:
- !type:CharacterSpeciesRequirement
species:
- Human
- !type:CharacterJobRequirement
jobs:
- Hobo
items:
- ClothingOuterOverCoatHobo

- type: loadout
id: LoadoutHeadHatHoboCap
category: Jobs
cost: 3
exclusive: true
requirements:
- !type:CharacterSpeciesRequirement
species:
- Human
- !type:CharacterJobRequirement
jobs:
- Hobo
items:
- ClothingHeadHatHoboCap

- type: loadout
id: LoadoutHeadHatHoboHat
category: Jobs
cost: 3
exclusive: true
requirements:
- !type:CharacterSpeciesRequirement
species:
- Human
- !type:CharacterJobRequirement
jobs:
- Hobo
items:
- ClothingHeadHatHoboHat

- type: loadout
id: LoadoutHeadHatWatermelon
category: Jobs
cost: 3
exclusive: true
requirements:
- !type:CharacterSpeciesRequirement
species:
- Human
- !type:CharacterJobRequirement
jobs:
- Hobo
items:
- ClothingHeadHatWatermelon
12 changes: 12 additions & 0 deletions Resources/Prototypes/_White/Roles/Jobs/Civilian/hobo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
- !type:CharacterDepartmentTimeRequirement
department: Civilian
min: 72000 # 20 ch
- !type:CharacterSpeciesRequirement
species:
- Human
- !type:CharacterAgeRequirement
min: 65
max: 110
- !type:CharacterSexRequirement
requiredSex:
- Male
- !type:GenderRequirement
requiredGender:
- Male
weight: 20
icon: "JobIconHobo"
supervisors: job-supervisors-hop
Expand Down
Loading

0 comments on commit c25e64e

Please sign in to comment.