Added Arch Persitance and Relationships, styackable items, hot fixed Tags.containsAll. AutoList in Ordered!DList

This commit is contained in:
2026-05-16 12:44:51 -04:00
parent bf4d856608
commit 75c93f0c43
40 changed files with 52609 additions and 197 deletions

View File

@@ -43,10 +43,12 @@ public class BacterialSystem : BaseSystem<World, float>
//Will Liklely be the game instead of a node like this
[Meta(typeof(IAutoNode))]// [Tool]
public partial class VoxelGridNode : Node3D, IProvide<IVoxelGridRegistry>, IProvide<IItemRenderer>, IProvide<IRecipes>, IProvide<IBlueprintManger>, IProvide<World>
public partial class VoxelGridNode : Node3D, IProvide<IVoxelGridRegistry>, IProvide<IItemRenderer>, IProvide<IRecipes>, IProvide<IBlueprintManger>, IProvide<World>, IProvide<IFoodFactoryApi>
{
public override void _Notification(int what) => this.Notify(what);
private IFoodFactoryApi _api = default!;
IFoodFactoryApi IProvide<IFoodFactoryApi>.Value() => _api;
private World _world = default!;
World IProvide<World>.Value() => _world;
private IVoxelGridRegistry _voxelGridRegistry = default!;
@@ -63,24 +65,40 @@ public partial class VoxelGridNode : Node3D, IProvide<IVoxelGridRegistry>, IProv
// GD.Print();
base._Ready();
_voxelGridRegistry = new VoxelRegistry();
_itemRenderer = new ItemRenderSimple();
_itemRenderer = new ItemRenderBuffered();
_blueprintManger = new BlueprintManger();
_recipes = new Recipes();
_world = World.Create();
_systems = new Group<float>("Items", new BacterialSystem(_world));
var tickManger = new TickManger();
AddChild(_itemRenderer as Node);
Timer timer = new Timer() { WaitTime = .25f, Autostart = true };//TEST
var delta = .2f;
Timer timer = new Timer() { WaitTime = delta, Autostart = true };//TEST
AddChild(timer);//TEST
// timer.Timeout += _itemRenderer.Tick;//TEST
_api = new FoodFactoryApi()
{
BlueprintManger = _blueprintManger,
Recipes = _recipes,
ItemRenderer = _itemRenderer,
TickManger = tickManger,
GridRegistry = _voxelGridRegistry
};
int tick = 0;
timer.Timeout += () =>
{
_systems.BeforeUpdate(.25f);
_systems.Update(.25f);
_systems.AfterUpdate(.25f);
_systems.BeforeUpdate(delta);
_systems.Update(delta);
_systems.AfterUpdate(delta);
tickManger.BroadCast(new(tick, delta));
tick++;
};
_systems.Initialize();
this.Provide();
}