[GENERAL] Create a internal Colony request and Market system. [$10 awarded]
marchermans opened this issue ยท 3 comments
Current Situation:
In the current Construct the individual Workers request Items that can either be delivered by the User or by the Delivery Man from the Warehouse, when neither are available this can cause Issues, with builders, miners and other Workers not getting their requested Items, but still thinking that they made the request.
Desired Situation:
A general handling of requests and deliveries by an external System that is not managed by a Building and or a Worker and that can be stored independently on the Colony.
Proposed Changes to the Colony:
- Let the Colony handle the Requests its citizens make. This should allow for more then one Warehouse (maybe even filtered specific Warehouses) in a Colony as well as better and finer control when requests that were not full filled by the Warehouse are send to the User.
- Make it possible for requests to be made, both from Buildings and from Workers directly.
- Make it possible to withdraw requests made, again both from Buildings and Workers directly.
- Make it possible for the Colony to see the contents of a Building. (Special class indicating the use of a Content, like used for crafting, delivery, tools, stock, etc)
- Manage requests based on the contents of all buildings in a Colony.
Proposed Changes to the Warehouse
- Handle requests delegated by the Colony (by sending Deliverymans)
- Pull Stockpiles from Buildings and store them if possible.
- Full fill requests by delivering Contents from the Warehouse.
Proposed Changes to Buildings in general (if applicable)
- Make it possible for Buildings to supply Items on demand. (Expose what a Worker can make/craft)
- A Miner should only be able to supply what he has in stock.
- However a Smith should be able to supply everything he can make.
Advantages of the new system:
- A centralized way of handling request.
- A controlled environment that is used to manage interaction with the Player when missing items are needed, should reduce bugs that cause workers to get stuck when waiting for a specific Resource, and makes the Colony itself a that bit more self sustaining.
- It should allow for Colony to Colony interaction with regards to the economy.
The $10 bounty on this issue has been claimed at Bountysource.
Some more details before I start working on this:
https://gist.github.com/OrionDevelopment/1cf29da278f9fc0f306a6b1bc17299fe
This is definitely a direction I approve!
We have to solve multiple cases and should be clear what happens in them:
- A worker requests an item and no warehouse exist
- A worker requests an item and a warehouse but no deliveryman exist
- A worker requests an item and no warehouse but a deliveryman exist and has the item
- A worker requests an item and no warehouse has it in store
- A worker requests an item and two warehouses have this item
- A worker requests an item and a second worker can craft it, but he himself needs resources for it
- A resource is requested and two citizen can craft it (with different recipes)
- Two requests for stone appear but there is only one stone
- The deliveryman who fulfills a request dies
I guess that is enough for now. There are some requirements to the system we have to guarantee in all these cases:
- Liveness: There should always be progress, never gets a request lost
- Fallback: If a request cannot be fulfilled, the player should be asked, even if the situation changes (items used/taken away)
- Efficiency: Big colonies should not suffer under O(n2) operations
If we can have a design that fulfills all this then I am all for it.