Skip to content
Open
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
affa18e
Added proficiency system
Holorain4312 Mar 5, 2026
caef65d
yamlmaxxing the proficiencies
Holorain4312 Mar 5, 2026
555ccb8
Add support for changing reload speed
Holorain4312 Mar 5, 2026
38a157c
added security proficiencies
Holorain4312 Mar 5, 2026
c6f124b
Added changes to guidebook
Holorain4312 Mar 5, 2026
b528f1a
Merge branch 'ProjectOmu:master' into Harpy-rework-real
Holorain4312 Mar 5, 2026
765e11e
Integrate the component better
Holorain4312 Mar 6, 2026
d6ed068
Made EVERYTHING based off of the component
Holorain4312 Mar 6, 2026
f009157
Merge branch 'master' into Harpy-rework-real
Holorain4312 Mar 6, 2026
0a2f782
im a stupid idiot who forgot to fix their code
Holorain4312 Mar 6, 2026
5fde5a8
Merge branch 'master' into Harpy-rework-real
Holorain4312 Mar 7, 2026
4f8f68d
omumod everything real
Holorain4312 Mar 7, 2026
f220a8a
fixed code, allowed access to the components, fixed component variabl…
Holorain4312 Mar 7, 2026
1e2c6e3
Merge branch 'master' into Harpy-rework-real
Holorain4312 Mar 7, 2026
7f6f078
Merge branch 'master' into Harpy-rework-real
Holorain4312 Mar 7, 2026
aa65b83
Merge branch 'master' into Harpy-rework-real
Holorain4312 Mar 8, 2026
9a27bb7
Merge branch 'master' into Harpy-rework-real
Holorain4312 Mar 9, 2026
f689928
Merge branch 'master' into Harpy-rework-real
Thesia000 Mar 10, 2026
f86e144
Merge branch 'master' into Harpy-rework-real
Holorain4312 Mar 10, 2026
09d0b55
Merge branch 'master' into Harpy-rework-real
Holorain4312 Mar 12, 2026
014dca3
Merge branch 'master' into Harpy-rework-real
Holorain4312 Mar 16, 2026
32f2473
Merge branch 'master' into Harpy-rework-real
Holorain4312 Mar 17, 2026
b89e933
Merge branch 'master' into Harpy-rework-real
Holorain4312 Mar 18, 2026
a6057d0
Merge branch 'master' into Harpy-rework-real
Holorain4312 Mar 19, 2026
9f1ebc2
Apply suggestions from code review
NotActuallyMarty Mar 19, 2026
97bfb41
Apply suggestions from code review
NotActuallyMarty Mar 19, 2026
4a5c020
Apply suggestion from @NotActuallyMarty
NotActuallyMarty Mar 19, 2026
d6124b4
Apply suggestion from @NotActuallyMarty
NotActuallyMarty Mar 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Content.Omu.Common/Proficiencies/CommonProficiencySystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@


namespace Content.Omu.Common.Proficiencies;

public abstract class CommonProficiencySystem : EntitySystem
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Robust.Shared.Prototypes;
namespace Content.Omu.Shared.Proficiencies;

[RegisterComponent]
public sealed partial class ProficiencyComponent : Component
{
[DataField]
public List<EntProtoId>? Items;

[DataField]
public float ProficiencyMultiplier { get; set; } = 1f;

[DataField]
public float SurgeryProficiency { get; set; } = 1f;

//the lower the reloadspeed modifier the faster it goes
[DataField]
public float ReloadSpeedProficiency { get; set; } = 1f;

[DataField]
public string? ProficiencyID;
}
28 changes: 28 additions & 0 deletions Content.Omu.Shared/Proficiencies/ProficiencyPrototype.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;



namespace Content.Omu.Shared.Proficiencies;

[Prototype("Proficiency")]
[DataDefinition]
public sealed partial class ProficiencyPrototype : IPrototype
{

[IdDataField]
public string ID { get; private set; } = default!;

[DataField]
public List<EntProtoId>? Items;

[DataField]
public float proficiencyMultiplier { get; private set; } = 1f;

[DataField]
public float surgeryProficiency { get; private set; } = 1f;

//the lower the reloadspeed modifier the faster it goes
[DataField]
public float reloadSpeedProficiency { get; private set; } = 1f;
}
108 changes: 108 additions & 0 deletions Content.Omu.Shared/Proficiencies/Systems/ProficiencySystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
using Content.Shared._Shitmed.Medical.Surgery;
using Content.Shared.GameTicking;
using Content.Shared.Hands;
using Content.Shared.Tools.Components;
using Robust.Shared.Prototypes;
using Content.Shared.Weapons.Ranged.Components;
using Content.Omu.Common.Proficiencies;

namespace Content.Omu.Shared.Proficiencies.Systems;

public sealed class ProficiencySystem : CommonProficiencySystem
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;


public override void Initialize(){
SubscribeLocalEvent<ProficiencyComponent, DidEquipHandEvent>(OnEquip);
SubscribeLocalEvent<ProficiencyComponent, DidUnequipHandEvent>(OnUnequip);
SubscribeLocalEvent<ProficiencyComponent, PlayerSpawnCompleteEvent>(OnPlayerSpawnComplete);
}


private void OnEquip(Entity<ProficiencyComponent> entity, ref DidEquipHandEvent args){
if(entity.Comp.Items != null)
{
bool handled = false;

if(TryComp<BallisticAmmoProviderComponent>(args.Equipped, out var ammoComp))
{
ammoComp.FillDelay *= entity.Comp.ReloadSpeedProficiency;
}

foreach (var Item in entity.Comp.Items){
if(TryComp<MetaDataComponent>(args.Equipped, out var data) && data.EntityPrototype != null)
{
if(data.EntityPrototype.ID == Item.Id){
handled = true;

if(TryComp<ToolComponent>(args.Equipped, out var toolComp)){
toolComp.SpeedModifier *= entity.Comp.ProficiencyMultiplier;

Dirty(args.Equipped, toolComp);
}

}
}
}
// If it isnt in the list of items buffed, debuff it instead
if (!handled)
{
if(TryComp<ToolComponent>(args.Equipped, out var toolComp))
{
toolComp.SpeedModifier *= MathF.Pow(entity.Comp.ProficiencyMultiplier, -1);

Dirty(args.Equipped, toolComp);
}
}
}
}

private void OnUnequip(Entity<ProficiencyComponent> entity, ref DidUnequipHandEvent args)
{
if(entity.Comp != null && entity.Comp.Items != null)
{
if (TryComp<MetaDataComponent>(args.Unequipped, out var data) && data.EntityPrototype != null)
{
if (TryComp<ToolComponent>(args.Unequipped, out var toolComp))
{
toolComp.SpeedModifier *= MathF.Pow(toolComp.SpeedModifier, -1);

Dirty(args.Unequipped, toolComp);
}

}
if (TryComp<BallisticAmmoProviderComponent>(args.Unequipped, out var ammoComp))
{
ammoComp.FillDelay *= MathF.Pow(entity.Comp.ReloadSpeedProficiency, -1);
}
}
}

private void OnPlayerSpawnComplete(Entity<ProficiencyComponent> entity, ref PlayerSpawnCompleteEvent args)
{
entity.Comp.ProficiencyID = args.JobId;

if (entity.Comp.ProficiencyID == null)
{
return;
}

if (entity.Comp.ProficiencyID != null && args.JobId != null && _prototypeManager.TryIndex<ProficiencyPrototype>(args.JobId, out var proficiencyPrototype))
{
entity.Comp.Items = proficiencyPrototype.Items;
entity.Comp.ProficiencyMultiplier = proficiencyPrototype.proficiencyMultiplier;
entity.Comp.SurgeryProficiency = proficiencyPrototype.surgeryProficiency;
entity.Comp.ReloadSpeedProficiency = proficiencyPrototype.reloadSpeedProficiency;

if (entity.Comp.SurgeryProficiency != 1f)
{
var surgerySpeedComp = _entityManager.EnsureComponent<SurgerySpeedModifierComponent>(args.Mob);
surgerySpeedComp.SpeedModifier *= entity.Comp.SurgeryProficiency;

Dirty(args.Mob, surgerySpeedComp);
}
}
}
}
5 changes: 4 additions & 1 deletion Content.Shared/Tools/Components/ToolComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Utility;
using Content.Omu.Common.Proficiencies;

namespace Content.Shared.Tools.Components;

[RegisterComponent, NetworkedComponent]
[Access(typeof(SharedToolSystem))]

//Omu edit, added proficiency modifiers to tool speed
[Access(typeof(SharedToolSystem), typeof(CommonProficiencySystem))]
public sealed partial class ToolComponent : Component
{
[DataField]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;

using Content.Omu.Common.Proficiencies;
namespace Content.Shared.Weapons.Ranged.Components;

[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true), Access(typeof(SharedGunSystem))]
//Omu edit, added proficiency modifiers to reload speed
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true), Access(typeof(SharedGunSystem), typeof(CommonProficiencySystem))]

public sealed partial class BallisticAmmoProviderComponent : Component
{
[DataField]
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/_DV/Entities/Mobs/Species/harpy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
sprite: _DV/Mobs/Species/Harpy/displacement.rsi
state: jumpsuit
- type: HarpyVisuals
- type: Proficiency
- type: Tag
tags:
- CanPilot
Expand Down
44 changes: 44 additions & 0 deletions Resources/Prototypes/_Omu/Proficiencies/BaseProficiencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
- type: Proficiency
id: BaseTools
items:
- Crowbar
- Wrench
- Screwdriver
- Wirecutter
- Welder
- Multitool

- type: Proficiency
id: advancedTools
items:
- WelderExperimental
- PowerDrill
- JawsOfLife

- type: Proficiency
id: BaseSci
items:
- Crowbar
- Wrench
- Screwdriver
- Wirecutter
- Welder
- Multitool
proficiencyMultiplier: 1.2
# give sci a minor surgery speed buff, robotics exists and needs surgery to function
surgeryProficiency: 1.1

- type: Proficiency
id: BaseEngi
items:
- Crowbar
- Wrench
- Screwdriver
- Wirecutter
- Welder
- WelderIndustrial
- Multitool
- WelderExperimental
- PowerDrill
- JawsOfLife
proficiencyMultiplier: 1.2
Comment on lines +1 to +44
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is bad. You might want to consider some type of parenting system, or listing proficiencies based on some other factor, i.e. checking for a ToolQualityPrototype of a specific kind or such. That way you plan for future additions and don't have to manually add every tool to a list if somebody adds a new tool.

For example, abductor tools here are not supported.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was planning on doing this, i couldn't find a way where i could make it work at that time, but i probably just forgot something; i'll have a look into it later

43 changes: 43 additions & 0 deletions Resources/Prototypes/_Omu/Proficiencies/Cargo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
- type: Proficiency
id: CargoTechnician
items:
- Crowbar
- Wrench
- Screwdriver
- Wirecutter
- Welder
- Multitool
proficiencyMultiplier: 1.1

- type: Proficiency
id: ShaftMiner
items:
- Crowbar
Comment on lines +1 to +15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See other Comment about changing the base proficiencies, that way you could add a singular thing here (i.e. - BasicTools for example) and wouldn't need to list out every item individually.

Ideally you should make the JobId of the respective job a datafield on the prototype rather than making the prototype name match the JobId.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, you could add more jobs to this datafield, that way you don't need multiple prototypes to set the same proficiency to multiple jobs.

- Wrench
- Screwdriver
- Wirecutter
- Welder
- Multitool
proficiencyMultiplier: 1.2

- type: Proficiency
id: SalvageSpecialist
items:
- Crowbar
- Wrench
- Screwdriver
- Wirecutter
- Welder
- Multitool
proficiencyMultiplier: 1.2

- type: Proficiency
id: Quartermaster
items:
- Crowbar
- Wrench
- Screwdriver
- Wirecutter
- Welder
- Multitool
proficiencyMultiplier: 1.4
45 changes: 45 additions & 0 deletions Resources/Prototypes/_Omu/Proficiencies/Engineering.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
- type: Proficiency
id: StationEngineer
items:
- Crowbar
- Wrench
- Screwdriver
- Wirecutter
- Welder
- Multitool
- WelderExperimental
- PowerDrill
#- JawsOfLife
#so many buffs we can't have them ALL be fast
proficiencyMultiplier: 1.15

- type: Proficiency
#basically just engi+
id: AtmosphericsTechnician
items:
- Crowbar
- Wrench
- Screwdriver
- Wirecutter
- Welder
- Multitool
- WelderExperimental
- PowerDrill
#- JawsOfLife
proficiencyMultiplier: 1.25

- type: Proficiency
#basically just engi+
id: ChiefEngineer
items:
- Crowbar
- Wrench
- Screwdriver
- Wirecutter
- Welder
- Multitool
- WelderExperimental
- PowerDrill
#- JawsOfLife
#same as RD
proficiencyMultiplier: 1.4
30 changes: 30 additions & 0 deletions Resources/Prototypes/_Omu/Proficiencies/Medical.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
- type: Proficiency
id: MedicalDoctor
# specifying proficiency anyways to debuff tool use, go do your job and stop tiding
proficiencyMultiplier: 1.20
surgeryProficiency: 1.25

- type: Proficiency
id: Chemist
# specifying proficiency anyways to debuff tool use, go do your job and stop tiding
proficiencyMultiplier: 1.20
surgeryProficiency: 1.25

- type: Proficiency
id: Virologist
# specifying proficiency anyways to debuff tool use, go do your job and stop tiding
proficiencyMultiplier: 1.20

- type: Proficiency
id: Paramedic
items:
# lets buff jaws for paramed, this could be huge and if it is feel free to come back and change it
- JawsOfLife
proficiencyMultiplier: 1.20
surgeryProficiency: 1.10

- type: Proficiency
id: ChiefMedicalOfficer
# less tool speed malus because you may need them more than docs, more surgery buff
proficiencyMultiplier: 1.10
surgeryProficiency: 1.5
Loading
Loading