Enforce stricter resource API

This commit is contained in:
Gustas
2025-03-04 13:53:49 +02:00
committed by Matthias Mailänder
parent 7779d0c27c
commit 5aa7ee43db
9 changed files with 37 additions and 36 deletions

View File

@@ -808,10 +808,10 @@ namespace OpenRA.Mods.Common.Traits
{
event Action<CPos, string> CellChanged;
ResourceLayerContents GetResource(CPos cell);
int GetMaxDensity(string resourceType);
bool CanAddResource(string resourceType, CPos cell, int amount = 1);
int AddResource(string resourceType, CPos cell, int amount = 1);
int RemoveResource(string resourceType, CPos cell, int amount = 1);
byte GetMaxDensity(string resourceType);
bool CanAddResource(string resourceType, CPos cell, byte amount = 1);
int AddResource(string resourceType, CPos cell, byte amount = 1);
int RemoveResource(string resourceType, CPos cell, byte amount = 1);
void ClearResources(CPos cell);
bool IsVisible(CPos cell);