Skip to content

Commit

Permalink
Some minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pspritechologist committed Mar 24, 2024
1 parent 9744437 commit b02136c
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 48 deletions.
10 changes: 0 additions & 10 deletions Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,6 @@ public sealed class SpeciesPrototype : IPrototype
/// </summary>
[DataField("maxAge")]
public int MaxAge = 120;

// Parkstation-Skills-Start

/// <summary>
/// Any skills this species starts with bonus points in.
/// </summary>
[DataField("skillBonuses", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, SkillPrototype>))]
public Dictionary<string, int> SkillBonuses { get; } = new();

// Parkstation-Skills-End
}

public enum SpeciesNaming : byte
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ public sealed partial class SkillsComponent : Component

/// <summary>
/// Skills this entity starts with values in.
/// Make sure not to double this up with <see cref="SpeciesPrototype.SkillBonuses"/>.
/// </summary>
/// <remarks>
/// This is added to the list of skills on spawn, and is unused after that.
/// </remarks>
[DataField("startingSkills", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, SkillPrototype>))]
public Dictionary<string, int> StartingSkills = new();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ public sealed class SkillCategoryPrototype : IPrototype
public string ID { get; } = default!;

// /// <summary>
// /// The Sprite Specifier for the icon for this sub category.
// /// This directory will also be used to find the icons for the skills in this sub category.
// /// The Sprite Specifier for the icon for this category.
// /// </summary>
// [DataField("icon")]
// public SpriteSpecifier Icon = default!;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<SkillsComponent, ComponentInit>(OnSkillsInit);
SubscribeLocalEvent<SkillsComponent, MapInitEvent>(OnSkillsInit);

GenerateCategorizedSkills();
_prototype.PrototypesReloaded += OnPrototypesReloaded;
Expand Down Expand Up @@ -235,7 +235,7 @@ public bool TryGetSkillCategory(string categoryId, [NotNullWhen(true)] out Skill

#endregion
#region Private Functions
private void OnSkillsInit(EntityUid uid, SkillsComponent component, ComponentInit args)
private void OnSkillsInit(EntityUid uid, SkillsComponent component, MapInitEvent args)
{
foreach (var startSkill in component.StartingSkills)
TryModifySkillLevel(uid, startSkill.Key, startSkill.Value, component);
Expand Down
8 changes: 8 additions & 0 deletions Resources/Prototypes/Entities/Mobs/Species/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,14 @@
- type: SSDIndicator

- type: Skills
startingSkills:
SkillLifting: 4
SkillEndurance: 4
SkillFineMotorSkills: 4
SkillObservation: 4
SkillSprinting: 4
SkillAcrobatics: 3
SkillDodging: 2
- type: IntrinsicUI
uis:
- key: enum.SkillsUiKey.Key
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
## Physical.
- type: skillSubCategory
id: SkillSubCategoryStrength
category: SkillCategoryPhysical
id: SkillSubCategoryStrength
color: "#b11e0d"

- type: skillSubCategory
id: SkillSubCategoryDexterity
category: SkillCategoryPhysical
id: SkillSubCategoryDexterity
color: "#7d38dd"

- type: skillSubCategory
id: SkillSubCategoryEndurance
category: SkillCategoryPhysical
color: "#448d0c"
# - type: skillSubCategory
# category: SkillCategoryPhysical
# id: SkillSubCategoryEndurance
# color: "#448d0c"

- type: skillSubCategory
id: SkillSubCategoryAgility
category: SkillCategoryPhysical
id: SkillSubCategoryAgility
color: "#2ba5e7"

- type: skillSubCategory
id: SkillSubCategorySenses
category: SkillCategoryPhysical
color: "#e7b02b"
# - type: skillSubCategory
# category: SkillCategoryPhysical
# id: SkillSubCategorySenses
# color: "#e7b02b"

## Technical.
- type: skillSubCategory
id: SkillSubCategoryEngineering
category: SkillCategoryTechnical
id: SkillSubCategoryEngineering
color: "#e7b02b"

- type: skillSubCategory
id: SkillSubCategoryResearch
category: SkillCategoryTechnical
id: SkillSubCategoryResearch
color: "#c521b7"

- type: skillSubCategory
id: SkillSubCategoryMedicine
category: SkillCategoryTechnical
id: SkillSubCategoryMedicine
color: "#73d9f3"
48 changes: 29 additions & 19 deletions Resources/Prototypes/SimpleStation14/Skills/skills_engineering.yml
Original file line number Diff line number Diff line change
@@ -1,83 +1,93 @@
## Strength
- type: skill
id: SkillLifting
subCategory: SkillSubCategoryStrength
id: SkillLifting
weight: 1.5

- type: skill
id: SkillBoxing
subCategory: SkillSubCategoryStrength
id: SkillBoxing
weight: 0.7

- type: skill
id: Endurance
subCategory: SkillSubCategoryStrength
id: SkillEndurance
weight: 1

## Dexterity
- type: skill
id: SkillDueling
subCategory: SkillSubCategoryDexterity
id: SkillDueling
weight: 0.6

- type: skill
id: SkillFineMotorSkills
subCategory: SkillSubCategoryDexterity
id: SkillFineMotorSkills
weight: 1.2

- type: skill
id: SkillObservation
subCategory: SkillSubCategorySenses
id: SkillObservation
weight: 1

## Agility
- type: skill
id: SkillSpriting
subCategory: SkillSubCategoryAgility
id: SkillSprinting
weight: 0.7

- type: skill
id: SkillAcrobatics
subCategory: SkillSubCategoryAgility
id: SkillAcrobatics

- type: skill
id: SkillDodging
subCategory: SkillSubCategoryAgility
id: SkillDodging

## Technical --------------
## Engineering
- type: skill
id: SkillConstruction
subCategory: SkillSubCategoryEngineering
id: SkillConstruction
weight: 0.7

- type: skill
id: SkillElectrical
subCategory: SkillSubCategoryEngineering
id: SkillElectrical
weight: 0.7

- type: skill
id: SkillMechanical
subCategory: SkillSubCategoryEngineering
id: SkillMechanical
weight: 1.5

## Medicine
- type: skill
id: SkillFirstAid
subCategory: SkillSubCategoryMedicine
id: SkillFirstAid

- type: skill
id: SkillSurgery
subCategory: SkillSubCategoryMedicine
id: SkillSurgery

- type: skill
id: SkillChemistry
subCategory: SkillSubCategoryMedicine
id: SkillChemistry

# - type: skill
# id: SkillVirology # Ha ha
# subCategory: SkillSubCategoryMedicine
# id: SkillVirology # Ha ha

## Research
- type: skill
id: SkillQuantumPhysics
subCategory: SkillSubCategoryResearch
id: SkillQuantumPhysics

- type: skill
id: AnomalousMaterials
subCategory: SkillSubCategoryResearch
id: AnomalousMaterials

- type: skill
id: SkillXenobiology
subCategory: SkillSubCategoryResearch
id: SkillXenobiology

0 comments on commit b02136c

Please sign in to comment.