Local Material Silo (#36492)
* Material Silo * fix board, fix copyright * a bit of review.... for the vibe.... * a tiny bit of review * 4 spaced * sloths no good very tiny nitpick * fix ui flickers * oops * slightly lower range * Sloth Review --------- Co-authored-by: ScarKy0 <scarky0@onet.eu>
This commit is contained in:
@@ -75,6 +75,24 @@ public enum MaterialStorageVisuals : byte
|
||||
Inserting
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collects all the materials stored on a <see cref="MaterialStorageComponent"/>
|
||||
/// </summary>
|
||||
/// <param name="Entity">The entity holding all these materials</param>
|
||||
/// <param name="Materials">A dictionary of all materials held</param>
|
||||
/// <param name="LocalOnly">An optional specifier. Non-local sources (silo, etc.) should not add materials when this is false.</param>
|
||||
[ByRefEvent]
|
||||
public readonly record struct GetStoredMaterialsEvent(Entity<MaterialStorageComponent> Entity, Dictionary<ProtoId<MaterialPrototype>, int> Materials, bool LocalOnly);
|
||||
|
||||
/// <summary>
|
||||
/// After using materials, removes them from storage.
|
||||
/// </summary>
|
||||
/// <param name="Entity">The entity that held the materials and is being used up</param>
|
||||
/// <param name="Materials">A dictionary of the difference of materials left.</param>
|
||||
/// <param name="LocalOnly">An optional specifier. Non-local sources (silo, etc.) should not consume materials when this is false.</param>
|
||||
[ByRefEvent]
|
||||
public readonly record struct ConsumeStoredMaterialsEvent(Entity<MaterialStorageComponent> Entity, Dictionary<ProtoId<MaterialPrototype>, int> Materials, bool LocalOnly);
|
||||
|
||||
/// <summary>
|
||||
/// event raised on the materialStorage when a material entity is inserted into it.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user