Gold & Copper modular parts 1 (#621)
* gold & copper daggers * copper and gold short grip * gold & copper grips * golden pickaxe * copper pickaxe * Update anvil.yml
This commit is contained in:
18
Content.Server/_CP14/ModularCraft/Modifiers/EditSharpened.cs
Normal file
18
Content.Server/_CP14/ModularCraft/Modifiers/EditSharpened.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Content.Shared._CP14.MeleeWeapon.Components;
|
||||
using Content.Shared._CP14.ModularCraft;
|
||||
using Content.Shared._CP14.ModularCraft.Components;
|
||||
|
||||
namespace Content.Server._CP14.ModularCraft.Modifiers;
|
||||
|
||||
public sealed partial class EditSharpened : CP14ModularCraftModifier
|
||||
{
|
||||
[DataField]
|
||||
public float SharpnessDamageMultiplier = 1f;
|
||||
public override void Effect(EntityManager entManager, Entity<CP14ModularCraftStartPointComponent> start, Entity<CP14ModularCraftPartComponent>? part)
|
||||
{
|
||||
if (!entManager.TryGetComponent<CP14SharpenedComponent>(start, out var sharpened))
|
||||
return;
|
||||
|
||||
sharpened.SharpnessDamageBy1Damage *= SharpnessDamageMultiplier;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user