forked from space-wizards/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds a system that allows developers to make reagent dispensers upgradeable. In a nutshell, additional reagents will become available on a reagent dispenser when all their machine parts have been upgraded to a higher tier. Currently this system only works on chem dispensers, because it is the only one that requires machine parts to build. * Removed a repeated reference and updated the prototype documentation * - Fix an issue where a necessary reference was accidentally removed * UpgragableChemTweaks * Исправление конфликта --------- Co-authored-by: chromiumboy <[email protected]>
- Loading branch information
1 parent
896c7c7
commit a7eeadf
Showing
6 changed files
with
87 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
Content.Shared/Chemistry/Dispenser/ReagentDispenserInventoryTieredPrototype.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Content.Shared.Chemistry.Reagent; | ||
using Robust.Shared.Prototypes; | ||
using Robust.Shared.Serialization; | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; | ||
|
||
namespace Content.Shared.Chemistry.Dispenser | ||
{ | ||
/// <summary> | ||
/// This is used to define a list of reagents that a machine can dispense | ||
/// when its machine parts have all be upgraded to the specified tier. | ||
/// </summary> | ||
[Serializable, NetSerializable, Prototype("reagentDispenserInventoryTiered")] | ||
public sealed class ReagentDispenserInventoryTieredPrototype : IPrototype | ||
{ | ||
[DataField("inventory", customTypeSerializer: typeof(PrototypeIdListSerializer<ReagentPrototype>))] | ||
private List<string> _inventory = new(); | ||
|
||
[DataField("tier")] | ||
public int? Tier { get; set; } | ||
|
||
[ViewVariables] | ||
[IdDataField] | ||
public string ID { get; } = default!; | ||
|
||
public List<string> Inventory => _inventory; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters