Skip to content

Commit eb378c0

Browse files
committed
Augment consistency tweaks
1 parent 3e03871 commit eb378c0

File tree

2 files changed

+58
-50
lines changed

2 files changed

+58
-50
lines changed

content/Augments/Augments.Armor.cs

-48
Original file line numberDiff line numberDiff line change
@@ -140,54 +140,6 @@ private static void RegisterArmorAugments(ref List<Augment.Definition> definitio
140140
context.requirements_new.Add(Crafting.Requirement.Resource("smirgl_ingot", 2.00f));
141141
}
142142
));
143-
144-
definitions.Add(Augment.Definition.New<Armor.Data>
145-
(
146-
identifier: "armor.cloth_padded",
147-
category: "Protection",
148-
name: "Cloth Padding",
149-
description: "Pads the inner side of the armor with cloth.",
150-
151-
can_add: static (ref Augment.Context context, in Armor.Data data, ref Augment.Handle handle, Span<Augment.Handle> augments) =>
152-
{
153-
return !augments.HasAugment(handle);
154-
},
155-
156-
apply_0: static (ref Augment.Context context, ref Armor.Data data, ref Augment.Handle handle, Span<Augment.Handle> augments) =>
157-
{
158-
data.knockback_modifier *= 0.65f;
159-
data.pain_modifier *= 0.80f;
160-
},
161-
162-
apply_1: static (ref Augment.Context context, ref Armor.Data data, ref Augment.Handle handle, Span<Augment.Handle> augments) =>
163-
{
164-
context.requirements_new.Add(Crafting.Requirement.Resource("cloth", 5.00f));
165-
}
166-
));
167-
168-
definitions.Add(Augment.Definition.New<Armor.Data>
169-
(
170-
identifier: "armor.mushroom_stuffed",
171-
category: "Protection",
172-
name: "Mushroom Stuffing",
173-
description: "Stuffs the inner side of the armor with soft mushroom bits.",
174-
175-
can_add: static (ref Augment.Context context, in Armor.Data data, ref Augment.Handle handle, Span<Augment.Handle> augments) =>
176-
{
177-
return !augments.HasAugment(handle);
178-
},
179-
180-
apply_0: static (ref Augment.Context context, ref Armor.Data data, ref Augment.Handle handle, Span<Augment.Handle> augments) =>
181-
{
182-
data.knockback_modifier = MathF.Max(data.knockback_modifier - 0.30f, data.knockback_modifier * 0.25f);
183-
data.pain_modifier = MathF.Max((data.pain_modifier * 0.90f) - 0.30f, data.pain_modifier * 0.10f);
184-
},
185-
186-
apply_1: static (ref Augment.Context context, ref Armor.Data data, ref Augment.Handle handle, Span<Augment.Handle> augments) =>
187-
{
188-
context.requirements_new.Add(Crafting.Requirement.Resource("mushroom", 20.00f));
189-
}
190-
));
191143
}
192144
}
193145
}

content/Augments/Augments.cs

+58-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private static void RegisterAugments(ref List<Augment.Definition> definitions)
6767

6868
definitions.Add(Augment.Definition.New<Body.Data>
6969
(
70-
identifier: "health.mushroom_glow",
70+
identifier: "utility.mushroom_glow",
7171
category: "Utility",
7272
name: "Mushroom Glow",
7373
description: "Glows in the dark.",
@@ -826,7 +826,7 @@ private static void RegisterAugments(ref List<Augment.Definition> definitions)
826826
definitions.Add(Augment.Definition.New<Equipment.Data>
827827
(
828828
identifier: "equipment.cursed",
829-
category: "Utility",
829+
category: "Equipment",
830830
name: "Cursed",
831831
description: "Covers the inner parts with tar, making it impossible to be unequipped.",
832832

@@ -846,6 +846,62 @@ private static void RegisterAugments(ref List<Augment.Definition> definitions)
846846
}
847847
));
848848

849+
definitions.Add(Augment.Definition.New<Equipment.Data>
850+
(
851+
identifier: "equipment.cloth_padded",
852+
category: "Equipment",
853+
name: "Cloth Padding",
854+
description: "Pads the inner side of the armor with cloth.",
855+
856+
can_add: static (ref Augment.Context context, in Equipment.Data data, ref Augment.Handle handle, Span<Augment.Handle> augments) =>
857+
{
858+
return !augments.HasAugment(handle);
859+
},
860+
861+
apply_0: static (ref Augment.Context context, ref Equipment.Data data, ref Augment.Handle handle, Span<Augment.Handle> augments) =>
862+
{
863+
ref var armor = ref context.GetComponent<Armor.Data>();
864+
if (armor.IsNotNull())
865+
{
866+
armor.knockback_modifier *= 0.65f;
867+
armor.pain_modifier *= 0.80f;
868+
}
869+
},
870+
871+
apply_1: static (ref Augment.Context context, ref Equipment.Data data, ref Augment.Handle handle, Span<Augment.Handle> augments) =>
872+
{
873+
context.requirements_new.Add(Crafting.Requirement.Resource("cloth", 5.00f));
874+
}
875+
));
876+
877+
definitions.Add(Augment.Definition.New<Equipment.Data>
878+
(
879+
identifier: "equipment.mushroom_stuffed",
880+
category: "Equipment",
881+
name: "Mushroom Stuffing",
882+
description: "Stuffs the inner side of the armor with soft mushroom bits.",
883+
884+
can_add: static (ref Augment.Context context, in Equipment.Data data, ref Augment.Handle handle, Span<Augment.Handle> augments) =>
885+
{
886+
return !augments.HasAugment(handle);
887+
},
888+
889+
apply_0: static (ref Augment.Context context, ref Equipment.Data data, ref Augment.Handle handle, Span<Augment.Handle> augments) =>
890+
{
891+
ref var armor = ref context.GetComponent<Armor.Data>();
892+
if (armor.IsNotNull())
893+
{
894+
armor.knockback_modifier = MathF.Max(armor.knockback_modifier - 0.30f, armor.knockback_modifier * 0.25f);
895+
armor.pain_modifier = MathF.Max((armor.pain_modifier * 0.90f) - 0.30f, armor.pain_modifier * 0.10f);
896+
}
897+
},
898+
899+
apply_1: static (ref Augment.Context context, ref Equipment.Data data, ref Augment.Handle handle, Span<Augment.Handle> augments) =>
900+
{
901+
context.requirements_new.Add(Crafting.Requirement.Resource("mushroom", 20.00f));
902+
}
903+
));
904+
849905
definitions.Add(Augment.Definition.New<Consumable.Data>
850906
(
851907
identifier: "consumable.alcohol",

0 commit comments

Comments
 (0)