2024-02-25 14:46:47 +00:00
|
|
|
#pragma once
|
2023-06-20 04:33:09 +00:00
|
|
|
|
|
|
|
#include "StarWiring.hpp"
|
|
|
|
#include "StarTileEntity.hpp"
|
|
|
|
|
|
|
|
namespace Star {
|
|
|
|
|
|
|
|
STAR_CLASS(WireEntity);
|
|
|
|
|
|
|
|
class WireEntity : public virtual TileEntity {
|
|
|
|
public:
|
|
|
|
virtual ~WireEntity() {}
|
|
|
|
|
|
|
|
virtual size_t nodeCount(WireDirection direction) const = 0;
|
|
|
|
virtual Vec2I nodePosition(WireNode wireNode) const = 0;
|
|
|
|
virtual List<WireConnection> connectionsForNode(WireNode wireNode) const = 0;
|
|
|
|
virtual bool nodeState(WireNode wireNode) const = 0;
|
|
|
|
|
|
|
|
virtual void addNodeConnection(WireNode wireNode, WireConnection nodeConnection) = 0;
|
|
|
|
virtual void removeNodeConnection(WireNode wireNode, WireConnection nodeConnection) = 0;
|
|
|
|
|
|
|
|
virtual void evaluate(WireCoordinator* coordinator) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|