Files
wwdpublic/Content.Shared/Materials/MaterialPrototype.cs
EctoplasmIsGood 9a65bedfc4 Salvage / Borg Tweaks (#2145)
<!--
This is a semi-strict format, you can add/remove sections as needed but
the order/format should be kept the same
Remove these comments before submitting
-->

# Description

<!--
Explain this PR in as much detail as applicable

Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->

Originally started because I wanted to add some stuff to salvage, but
ended up with me porting over whitelisted borg hands, the PKA module,
and some other stuff.

---

# Changelog

<!--
You can add an author after the `🆑` to change the name that appears
in the changelog (ex: `🆑 Death`)
Leaving it blank will default to your GitHub display name
This includes all available types for the changelog
-->

🆑
- add: Engi borgs can now carry electronics, and medical borgs can carry
organs
- add: Salvage borgs now get a PKA module
- tweak: All mining drills have had their damage turned to piercing and
have received a moderate damage buff
- tweak: Exosuit drills now swing at the same speed as normal drills
(why were they worse???)
- tweak: The RPD and RCD modules for borg have been merged into one
- tweak: Salvage can now purchase drills from their vendor
- tweak: Salvage borgs mining module no longer contains a shovel

---------

Co-authored-by: Your Name <EctoplasmIsGood@users.noreply.github.com>
Co-authored-by: Whatstone <whatston3@gmail.com>
Co-authored-by: RatherUncreative <RatherUncreativeName@proton.me>
Co-authored-by: Aidenkrz <aiden@djkraz.com>
(cherry picked from commit ed8850e551bd9c0d533d69cad262a8743442a62a)
2025-04-04 14:51:28 +03:00

61 lines
2.0 KiB
C#

using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
using Robust.Shared.Utility;
namespace Content.Shared.Materials
{
/// <summary>
/// Materials are read-only storage for the properties of specific materials.
/// Properties should be intrinsic (or at least as much is necessary for game purposes).
/// </summary>
[Prototype("material")]
public sealed partial class MaterialPrototype : IPrototype, IInheritingPrototype
{
[ViewVariables]
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<MaterialPrototype>))]
public string[]? Parents { get; }
[ViewVariables]
[AbstractDataField]
public bool Abstract { get; } = false;
[ViewVariables]
[IdDataField]
public string ID { get; private set; } = default!;
/// <summary>
/// For material storage to be able to convert back and forth
/// between the material and physical entities you can carry,
/// include which stack we should spawn by default.
/// </summary>
[DataField]
public EntProtoId? StackEntity;
[DataField]
public string Name = string.Empty;
/// <summary>
/// Locale id for the unit of this material.
/// Lathe recipe tooltips and material storage display use this to let you change a material to sound nicer.
/// For example, 5 bars of gold is better than 5 sheets of gold.
/// </summary>
[DataField]
public LocId Unit = "materials-unit-sheet";
[DataField]
public Color Color { get; private set; } = Color.Gray;
/// <summary>
/// An icon used to represent the material in graphic interfaces.
/// </summary>
[DataField]
public SpriteSpecifier Icon { get; private set; } = SpriteSpecifier.Invalid;
/// <summary>
/// The price per cm3.
/// </summary>
[DataField(required: true)]
public double Price = 0;
}
}