Overhaul resource layer logic:

* ResourceType trait has been removed.
* Simulation-related data is now defined on the
  ResourceLayer (which mods can subclass/replace).
* Support non-money resources by moving the resource
  values to the PlayerResources trait.
* Allow mods to disable the neighbour density override
  and instead always use the map-defined densities.
* Allow mods to define their own resource placement
  logic (e.g. allow resources on slopes) by subclassing
  (Editor)ResourceLayer.
* Improve ability to subclass/override ResourceRenderer
  by exposing more virtual methods.
This commit is contained in:
Paul Chote
2021-03-07 17:48:52 +00:00
committed by reaperrr
parent c35e9fb016
commit 0bdd46451e
20 changed files with 625 additions and 416 deletions

View File

@@ -52,6 +52,9 @@ namespace OpenRA.Mods.Common.Traits
[NotificationReference("Sounds")]
public readonly string CashTickDownNotification = null;
[Desc("Monetery value of each resource type.", "Dictionary of [resource type]: [value per unit].")]
public readonly Dictionary<string, int> ResourceValues = new Dictionary<string, int>();
IEnumerable<LobbyOption> ILobbyOptions.LobbyOptions(Ruleset rules)
{
var startingCash = SelectableCash.ToDictionary(c => c.ToString(), c => "$" + c.ToString());