Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Artisanal production + buying from market #230

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wvpm
Copy link
Contributor

@wvpm wvpm commented Nov 4, 2024

Artisans will buy inputs from the market using BuyUpToOrder.
They will buy up to input amount - amount in stockpile.
As each input can bottleneck production, artisans aim to maximise min(inputs satisfied).
Based on this they allocate money to buy the inputs.

Each GoodInstance has a maximum next price, this is the price artisans take into account when allocating funds.

@wvpm wvpm changed the base branch from master to placeholder_market November 4, 2024 13:48
@wvpm wvpm force-pushed the placeholder_market branch 3 times, most recently from eac4711 to 98ed3fa Compare November 6, 2024 11:57
@wvpm wvpm force-pushed the placeholder_market branch 5 times, most recently from ba40193 to 00d84ea Compare November 13, 2024 16:55
@wvpm wvpm added the enhancement New feature or request label Nov 13, 2024
@wvpm wvpm force-pushed the placeholder_market branch 3 times, most recently from b6eb317 to 1939e7c Compare November 15, 2024 09:47
@wvpm wvpm force-pushed the artisanal_production branch 2 times, most recently from 9fba632 to 4a8ef4d Compare November 15, 2024 14:48
@wvpm wvpm requested a review from Hop311 November 15, 2024 20:57
@wvpm wvpm force-pushed the placeholder_market branch from 1939e7c to 72c6e54 Compare November 15, 2024 21:27
@wvpm wvpm force-pushed the artisanal_production branch 3 times, most recently from e704edf to 02c146b Compare November 16, 2024 09:55
@wvpm wvpm force-pushed the placeholder_market branch 2 times, most recently from f3370e7 to 835231f Compare November 16, 2024 19:51
{}

void ArtisanalProducer::artisan_tick() {
GoodDefinition::good_definition_map_t goods_to_buy_and_max_price { };
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we merge artisanal inputs and pop needs?
Can pops consume their own produce?
How is money allocated between inputs and needs?

@wvpm wvpm force-pushed the placeholder_market branch from 835231f to 72c6040 Compare November 18, 2024 19:23
@wvpm wvpm force-pushed the artisanal_production branch from 02c146b to 4e8897d Compare November 18, 2024 19:28
@wvpm wvpm force-pushed the placeholder_market branch 3 times, most recently from 52be17e to aa58b23 Compare November 19, 2024 08:51
@wvpm wvpm force-pushed the artisanal_production branch 4 times, most recently from 898b598 to 98d7f85 Compare November 19, 2024 12:02
GoodInstance const& good_instance = market_instance.get_good_instance_manager().get_good_instance_from_definition(
production_type.get_output_good()
);
if (!good_instance.get_is_available()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are artisanal production types unlocked globally or per country?
If per country, we need to add that here.

@wvpm wvpm force-pushed the artisanal_production branch from 98d7f85 to 463e645 Compare November 19, 2024 12:09
@wvpm wvpm marked this pull request as ready for review November 19, 2024 12:18
@wvpm wvpm force-pushed the placeholder_market branch from aa58b23 to 6cca419 Compare November 19, 2024 15:00
@wvpm wvpm force-pushed the artisanal_production branch 2 times, most recently from 8ba4fe8 to 6ce5e09 Compare November 19, 2024 18:47
Base automatically changed from placeholder_market to master November 19, 2024 21:28
@wvpm wvpm force-pushed the artisanal_production branch 3 times, most recently from 092a655 to e943341 Compare November 24, 2024 19:59
@Spartan322 Spartan322 changed the title Artisanal production + buying from market Add Artisanal production + buying from market Nov 24, 2024
@wvpm wvpm force-pushed the artisanal_production branch from e943341 to bd97d8f Compare November 24, 2024 20:31
@wvpm wvpm force-pushed the artisanal_production branch 3 times, most recently from 00063dc to 6cf07b5 Compare December 1, 2024 15:07
@wvpm wvpm force-pushed the artisanal_production branch from 6cf07b5 to 342373c Compare December 1, 2024 19:33
@wvpm wvpm force-pushed the artisanal_production branch from 342373c to b9882a8 Compare December 1, 2024 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants