Skip to content

Commit

Permalink
Martial Artist, Prison Guard, Prisoner and Gladiator (#21)
Browse files Browse the repository at this point in the history
* Martial, Guard, Prisoner, Gladiator

Prisoner is like halfway in wizden so that's a bit funky

* Boxing for Boxer, add jobicons to agent ID

* DataDefinition partial

* change geta equiped textures

* Fixes

* Fix copyrights

* New prisonguard icon

* Preference, martial civilian colors

* add ref to boxer nyano component

* comment out whitelistrequired and spawner

* Remove prisoner and guard from specific

Not that specific

* Fix prisonguard id card

For some reason the security officer id card icon is not at the correct place.

* Update comments

---------

Co-authored-by: Colin-Tel <[email protected]>
  • Loading branch information
FluffiestFloof and Colin-Tel authored Sep 19, 2023
1 parent fc05d77 commit 795fe5c
Show file tree
Hide file tree
Showing 55 changed files with 561 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Content.Server/Nyanotrasen/Abilities/Boxer/Boxer/BoxerComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Content.Shared.Damage;

namespace Content.Server.Abilities.Boxer;

/// <summary>
/// Added to the boxer on spawn.
/// </summary>
[RegisterComponent]
public sealed partial class BoxerComponent : Component
{
[DataField("modifiers", required: true)]
public DamageModifierSet UnarmedModifiers = default!;

[DataField("rangeBonus")]
public float RangeBonus = 1.5f;

/// <summary>
/// Damage modifier with boxing glove stam damage.
/// </summary>
[DataField("boxingGlovesModifier")]
public float BoxingGlovesModifier = 1.75f;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Content.Shared.Damage;

namespace Content.Server.Abilities.Boxer;

/// <summary>
/// Boxer gets a bonus for these, and their fists, but not other unarmed weapons.
/// </summary>
[RegisterComponent]
public sealed partial class BoxingGlovesComponent : Component
{}
38 changes: 38 additions & 0 deletions Content.Server/Nyanotrasen/Abilities/Boxer/BoxingSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Content.Shared.Damage.Events;
using Content.Shared.Weapons.Melee;
using Content.Shared.Weapons.Melee.Events;
using Robust.Shared.Containers;

namespace Content.Server.Abilities.Boxer;

public sealed partial class BoxingSystem : EntitySystem
{
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;

public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<BoxerComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<BoxerComponent, MeleeHitEvent>(OnMeleeHit);
SubscribeLocalEvent<BoxingGlovesComponent, StaminaMeleeHitEvent>(OnStamHit);
}

private void OnInit(EntityUid uid, BoxerComponent component, ComponentInit args)
{
if (TryComp<MeleeWeaponComponent>(uid, out var meleeComp))
meleeComp.Range *= component.RangeBonus;
}
private void OnMeleeHit(EntityUid uid, BoxerComponent component, MeleeHitEvent args)
{
args.ModifiersList.Add(component.UnarmedModifiers);
}

private void OnStamHit(EntityUid uid, BoxingGlovesComponent component, StaminaMeleeHitEvent args)
{
if (!_containerSystem.TryGetContainingContainer(uid, out var equipee))
return;

if (TryComp<BoxerComponent>(equipee.Owner, out var boxer))
args.Multiplier *= boxer.BoxingGlovesModifier;
}
}
4 changes: 4 additions & 0 deletions Resources/Locale/en-US/nyanotrasen/job/job-description.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
job-description-gladiator = Put on a combat spectacle for the crew. Fight for your freedom, glory, and honor.
job-description-guard = Keep track of prisoners and make sure they have their basic needs.
job-description-martialartist = Be honorable and disciplined, spar in the dojo, challenge security to CQC.
job-description-prisoner = Sit in prison. Gamble with your cellmates. Talk to the warden. Write your memoirs.
4 changes: 4 additions & 0 deletions Resources/Locale/en-US/nyanotrasen/job/job-names.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
job-name-gladiator = Gladiator
job-name-guard = Prison Guard
job-name-martialartist = Martial Artist
job-name-prisoner = Prisoner
2 changes: 2 additions & 0 deletions Resources/Prototypes/Entities/Mobs/Corpses/corpses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- ChefGear
- ChaplainGear
- PassengerGear
- MartialArtistGear # Nyanotrasen - MartialArtist, see Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/martialartist.yml

- type: entity
parent: SalvageHumanCorpse
Expand Down Expand Up @@ -70,6 +71,7 @@
- SecurityOfficerGear
- DetectiveGear
- WardenGear
- PrisonGuardGear # Nyanotrasen - PrisonGuard, see Resources/Prototypes/Nyanotrasen/Roles/Jobs/Security/prisonguard.yml

- type: entity
parent: SalvageHumanCorpse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,9 @@
- JobIconSeniorOfficer
- JobIconSeniorEngineer
- JobIconSeniorResearcher
- JobIconPrisonGuard # Nyanotrasen - PrisonGuard, see Resources/Prototypes/Nyanotrasen/Roles/Jobs/Security/prisonguard.yml
- JobIconMartialArtist # Nyanotrasen - MartialArtist, see Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/martialartist.yml
- JobIconGladiator # Nyanotrasen - Gladiator, see Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/gladiator.yml
- type: ActivatableUI
key: enum.AgentIDCardUiKey.Key
inHandsOnly: true
Expand Down
10 changes: 10 additions & 0 deletions Resources/Prototypes/Nyanotrasen/Clothing/Shoes/misc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- type: entity
parent: ClothingShoesBaseButcherable
id: ClothingShoesGeta
name: geta sandals
description: A pair of traditional japanese sandals.
components:
- type: Sprite
sprite: Nyanotrasen/Clothing/Shoes/Misc/geta.rsi
- type: Clothing
sprite: Nyanotrasen/Clothing/Shoes/Misc/geta.rsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
- type: entity
id: SpawnPointGladiator
parent: SpawnPointJobBase
name: gladiator
components:
- type: SpawnPoint
job_id: Gladiator
- type: Sprite
sprite: DeltaV/Markers/jobs.rsi
layers:
- state: green
- state: nyanogladiator

- type: entity
id: SpawnPointPrisoner
parent: SpawnPointJobBase
name: prisoner
components:
- type: SpawnPoint
job_id: Prisoner
- type: Sprite
sprite: DeltaV/Markers/jobs.rsi
layers:
- state: green
- state: nyanoprisoner

- type: entity
id: SpawnPointPrisonGuard
parent: SpawnPointJobBase
name: prison guard
components:
- type: SpawnPoint
job_id: PrisonGuard
- type: Sprite
sprite: DeltaV/Markers/jobs.rsi
layers:
- state: green
- state: nyanoprisonguard

- type: entity
id: SpawnPointMartialArtist
parent: SpawnPointJobBase
name: martial artist
components:
- type: SpawnPoint
job_id: MartialArtist
- type: Sprite
sprite: DeltaV/Markers/jobs.rsi
layers:
- state: green
- state: nyanomartialartist
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
- type: entity
parent: IDCardStandard
id: PrisonerIDCard
name: prisoner ID card
components:
- type: Sprite
sprite: DeltaV/Objects/Misc/id_cards.rsi
layers:
- state: orange
- state: nyanoprisoner
- type: PresetIdCard
job: Prisoner

- type: entity
parent: IDCardStandard
id: GladiatorIDCard
name: gladiator ID card
components:
- type: Sprite
sprite: DeltaV/Objects/Misc/id_cards.rsi
layers:
- state: orange
- state: nyanogladiator
- type: PresetIdCard
job: Gladiator

- type: entity
parent: IDCardStandard
id: PrisonGuardIDCard
name: prison guard ID card
components:
- type: Sprite
sprite: DeltaV/Objects/Misc/id_cards.rsi
layers:
- state: default
- state: nyanoprisonguard
- type: PresetIdCard
job: PrisonGuard

- type: entity
parent: IDCardStandard
id: MartialArtistIDCard
name: martial artist ID card
components:
- type: Sprite
sprite: DeltaV/Objects/Misc/id_cards.rsi
layers:
- state: default
- state: nyanomartialartist
- type: PresetIdCard
job: MartialArtist
43 changes: 43 additions & 0 deletions Resources/Prototypes/Nyanotrasen/Entities/Objects/Devices/pda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
- type: entity
parent: BasePDA
id: PrisonerPDA
name: prisoner PDA
description: Clear, so you can make sure there's nothing being smuggled inside.
components:
- type: Pda
id: PrisonerIDCard
state: pda-clear
- type: Icon
state: pda-clear

- type: entity
parent: PrisonerPDA
id: GladiatorPDA
name: gladiator PDA
components:
- type: Pda
id: GladiatorIDCard

- type: entity
parent: BasePDA
id: PrisonGuardPDA
name: prison guard PDA
description: Red to hide the stains of prisoner blood.
components:
- type: Pda
id: PrisonGuardIDCard
state: pda-security
- type: PdaBorderColor
borderColor: "#A32D26"
accentVColor: "#DFDFDF"
- type: Icon
state: pda-security

- type: entity
parent: BoxerPDA
id: MartialArtistPDA
name: martial artist PDA
components:
- type: Pda
id: MartialArtistIDCard
state: pda-boxer
9 changes: 9 additions & 0 deletions Resources/Prototypes/Nyanotrasen/Recipes/Lathes/clothing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- type: latheRecipe
id: ClothingUniformJumpsuitPrisonGuard
icon:
sprite: Nyanotrasen/Clothing/Uniforms/Jumpsuit/prisonguard.rsi
state: icon
result: ClothingUniformJumpsuitPrisonGuard
completetime: 4
materials:
Cloth: 300
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
- type: job
id: PrisonGuard
name: job-name-guard
description: job-description-guard
playTimeTracker: JobSecurityOfficer
requirements:
- !type:OverallPlaytimeRequirement
time: 18000
startingGear: PrisonGuardGear
# alwaysUseSpawner: true
canBeAntag: false
icon: "JobIconPrisonGuard"
supervisors: job-supervisors-warden
setPreference: true
# whitelistRequired: true
access:
- Security
- Brig
- Maintenance

- type: startingGear
id: PrisonGuardGear
equipment:
jumpsuit: ClothingUniformJumpsuitPrisonGuard
back: ClothingBackpackSecurityFilled
shoes: ClothingShoesBootsJack
eyes: ClothingEyesGlassesSecurity
head: ClothingHeadPrisonGuard
id: PrisonGuardPDA
ears: ClothingHeadsetSecurity
belt: ClothingBeltSecurityFilled
innerclothingskirt: ClothingUniformJumpsuitPrisonGuard
satchel: ClothingBackpackSatchelSecurityFilled
duffelbag: ClothingBackpackDuffelSecurityFilled
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
- type: job
id: Gladiator
name: job-name-gladiator
description: job-description-gladiator
playTimeTracker: JobPrisoner
startingGear: GladiatorGear
# alwaysUseSpawner: true
canBeAntag: false
icon: "JobIconGladiator"
supervisors: job-supervisors-security
setPreference: true
# whitelistRequired: true
requirements:
- !type:OverallPlaytimeRequirement
time: 3600
special:
- !type:AddComponentSpecial
components:
- type: Boxer
modifiers:
coefficients: # These only apply to unarmed
Blunt: 1.5
Slash: 1.5
Piercing: 1.5

- type: startingGear
id: GladiatorGear
equipment:
jumpsuit: UniformShortsRed
outerClothing: ClothingOuterArmorGladiator
id: GladiatorPDA
ears: ClothingHeadsetGrey
innerclothingskirt: UniformShortsRedWithTop
#any other possessions, spawn in cell
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
- type: job
id: MartialArtist
name: job-name-martialartist
description: job-description-martialartist
playTimeTracker: JobBoxer
startingGear: MartialArtistGear
icon: "JobIconMartialArtist"
supervisors: job-supervisors-hop
setPreference: true
# whitelistRequired: true
access:
- Service
extendedAccess:
- Maintenance
special:
- !type:AddComponentSpecial
components:
- type: Boxer
modifiers:
coefficients: # These only apply to unarmed
Blunt: 1.5
Slash: 1.5
Piercing: 1.5

- type: startingGear
id: MartialArtistGear
equipment:
jumpsuit: ClothingUniformMartialGi
belt: ClothingBeltMartialBlack
back: ClothingBackpackFilled
id: MartialArtistPDA
ears: ClothingHeadsetService
shoes: ClothingShoesGeta
gloves: ClothingHandsGlovesBoxingRed
satchel: ClothingBackpackSatchelFilled
duffelbag: ClothingBackpackDuffelFilled
Loading

0 comments on commit 795fe5c

Please sign in to comment.