Added multiplier options.

This commit is contained in:
2026-06-05 12:01:55 +02:00
parent f76d0ce63a
commit bb2388c914

View File

@@ -17,7 +17,7 @@ def create_ui():
pages.add("/", lambda: main_page(rows))
pages.add("/create", lambda: creator_page())
# ui.dark_mode().enable()
ui.run(reload=False)
ui.run(reload=False, show=False)
def main_page(rows):
@@ -90,6 +90,7 @@ def creator_page():
hwrap = ui.checkbox("East West Wrapping")
description_container = ui.row()
toggle_container = ui.row()
# TODO: Are these containers still needed?
with toggle_container:
event_rarity = ui.toggle({1: "Common", 2: "Rare"}, value=1)
random_map = ui.toggle([10, 15, 20], value=15)
@@ -97,6 +98,42 @@ def creator_page():
ui.label("Event Rarity")
# TODO: Fix Padding
ui.label("Provinces per player:")
with ui.row():
ui.label("Gold Multiplier:").classes("w-36")
richness = ui.input(
validation={
"Value must be between 50 and 300": lambda value: value.isdigit()
and 50 <= int(value) <= 300,
},
value="100",
)
with ui.row():
ui.label("Resource Multiplier:").classes("w-36")
resources = ui.input(
validation={
"Value must be between 50 and 300": lambda value: value.isdigit()
and 50 <= int(value) <= 300,
},
value="100",
)
with ui.row():
ui.label("Recruitment Multiplier:").classes("w-36")
recruitment = ui.input(
validation={
"Value must be between 50 and 300": lambda value: value.isdigit()
and 50 <= int(value) <= 300,
},
value="100",
)
with ui.row():
ui.label("Supplies Multiplier:").classes("w-36")
supplies = ui.input(
validation={
"Value must be between 50 and 300": lambda value: value.isdigit()
and 50 <= int(value) <= 300,
},
value="100",
)
# TODO: REMOVE THIS it is just for testing
ui.button(
@@ -107,7 +144,23 @@ def creator_page():
port=int(port.value),
era=int(era.value),
ai_slots=ai_slots,
random_map=15,
random_map=int(random_map.value),
event_rarity=int(event_rarity.value),
hwrap=hwrap.value,
vwrap=vwrap.value,
no_new_ai=no_new_ai.value,
no_artifact_rest=no_artifact_rest.value,
no_cheat_det=no_cheat_det.value,
renaming=renaming.value,
score_graphs=score_graphs.value,
random_start_research=random_start_research.value,
clustered_start=clustered_start.value,
team_game=team_game.value,
no_nation_info=no_nation_info.value,
recruitment=int(recruitment.value),
resources=int(resources.value),
richness=int(richness.value),
supplies=int(supplies.value),
)
),
)