Hello all,
currently I'm building housing planner (to plan houses with different block types and calculate the costs) and now I want to get all craftable types of block to put them into my planner. You can see the current status of the planner here: https://eco-pixel-grid.stackblitz.io
I get all Items within the group "Block Items":
var Items = Eco.Gameplay.Items.BlockItem.AllItems.ToList();
Items.ForEach(x=>{
if(x.Group == "Block Items"){
Logger.Debug($"{x.FriendlyName}: {x.Category}");
}
});
The output will be like this:
"Log"
[12:58:26] DISCORDBRIDGE DEBUG: Asphalt Road: _None
[01:01:00] DISCORDBRIDGE DEBUG: Barrel: _None
[01:01:00] DISCORDBRIDGE DEBUG: Biodiesel: _None
[01:01:00] DISCORDBRIDGE DEBUG: Brick: _None
[01:01:00] DISCORDBRIDGE DEBUG: Coal: _None
[01:01:00] DISCORDBRIDGE DEBUG: Copper Ore: _None
[01:01:00] DISCORDBRIDGE DEBUG: Copper Pipe: _None
[01:01:00] DISCORDBRIDGE DEBUG: Corrugated Steel: _None
[01:01:00] DISCORDBRIDGE DEBUG: Dirt: _None
[01:01:00] DISCORDBRIDGE DEBUG: Flat Steel: _None
[01:01:00] DISCORDBRIDGE DEBUG: Framed Glass: _None
[01:01:00] DISCORDBRIDGE DEBUG: Garbage: _None
[01:01:00] DISCORDBRIDGE DEBUG: Gasoline: _None
[01:01:00] DISCORDBRIDGE DEBUG: Glass: _None
[01:01:00] DISCORDBRIDGE DEBUG: Gold Ore: _None
[01:01:00] DISCORDBRIDGE DEBUG: Hewn Log: _None
[01:01:00] DISCORDBRIDGE DEBUG: Iron Ore: _None
[01:01:00] DISCORDBRIDGE DEBUG: Iron Pipe: _None
[01:01:00] DISCORDBRIDGE DEBUG: Log: _None
[01:01:00] DISCORDBRIDGE DEBUG: Lumber: _None
[01:01:00] DISCORDBRIDGE DEBUG: Mortared Stone: _None
[01:01:00] DISCORDBRIDGE DEBUG: Petroleum: _None
[01:01:00] DISCORDBRIDGE DEBUG: Reinforced Concrete: _None
[01:01:00] DISCORDBRIDGE DEBUG: Sand: _None
[01:01:00] DISCORDBRIDGE DEBUG: Sewage: Hidden
[01:01:00] DISCORDBRIDGE DEBUG: Steel Pipe: _None
[01:01:00] DISCORDBRIDGE DEBUG: Stone: _None
[01:01:00] DISCORDBRIDGE DEBUG: Stone Road: _None
But as you can see, there are several block types which can't be crafted, like dirt or Iron Ore. I've already debugged the items but I don't find any property like "craftable" which I can check. Additionally I want to get the ingredients of that block to get this crafted (and the amount) to calculate an average in game price for one selected block.
The base of the calculation will be one log item (which I guess is the most basis ingredient of all craftable blocks) with a configurable price.
Does anybody of you has an advice to get this done?
In short: I want a recursive list of all blocks that can be created with the corresponding ingredients to calculate an avarage price.