Handful of `Dictionary`s somewhere to centralize "entity group" storage (one for each `Entity` type)
See original GitHub issueDescription
See title. That would literally be as simple as something like:
public class ModContent {
private static IDictionary<string, IReadOnlyList<int>> _ItemGroups;
public static IReadOnlyDictionary<string, IReadOnlyList<int>> ItemGroups { get; private set; }
static ModContent() {
_ItemGroups = new ConcurrentDictionary<string, IReadOnlyList<int>>();
ItemGroups = new ReadOnlyDictionary<string, IReadOnlyList<int>>( _ItemGroups );
}
public static void AddToItemGroup( string groupName, IEnumerable<int> group ) {
if( !_ItemGroups.ContainsKey( groupName ) ) {
_ItemGroups[groupName] = group.ToList().AsReadOnly();
} else {
_ItemGroups[groupName] = _ItemGroups[groupName].Union( group ).ToList().AsReadOnly();
}
}
...
}
What does this proposal attempt to solve or improve?
A place for mods to look for, and contribute to, listings of entities (by their type
field’s value) by a given name (e.g. any ‘spooky’ NPC, any explosive item, etc.).
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Performing entity group transactions (REST API)
The Table service supports entity group transactions on entities that are in the same table and belong to the same partition group.
Read more >Azure Table Storage Query in .NET With Property Names ...
I have written a Azure table storage client which supports both static and late binding (via a dictionary). Any table property not contained...
Read more >Deleting Entities In Windows Azure Table Storage
In Azure tables, entity uniqueness in a table is determined by the combination of PartitionKey (which physically groups related entities together for efficiency) ......
Read more >Insert Entities into multiple Azure Table Storage partitions ...
I have an Azure Worker Role set up to get information from a few external web services, parse it into several different entity...
Read more >Exploring Azure Table Storage with PowerShell
A document store encapsulates all the data for an entity (document) using a ... Table Storage - Azure Resource Group - Description: Create...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Basically ore dictionary from minecraft forge. Yes
Alright, but if I’m understanding this correctly, entity group data is mapped to that (generic) class type. The generic parameter is the class that would need to be mod-agnostic, AKA stored in tModLoader or else expected as a mod dependency.