mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Factorio: correctly cache control_template to allow multiple Factorio worlds
This commit is contained in:
@@ -15,6 +15,7 @@ from .Technologies import tech_table
|
|||||||
|
|
||||||
template: Optional[jinja2.Template] = None
|
template: Optional[jinja2.Template] = None
|
||||||
locale_template: Optional[jinja2.Template] = None
|
locale_template: Optional[jinja2.Template] = None
|
||||||
|
control_template: Optional[jinja2.Template] = None
|
||||||
|
|
||||||
template_load_lock = threading.Lock()
|
template_load_lock = threading.Lock()
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ rocket_recipes = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def generate_mod(world: MultiWorld, player: int, seedname: str):
|
def generate_mod(world: MultiWorld, player: int, seedname: str):
|
||||||
global template, locale_template
|
global template, locale_template, control_template
|
||||||
with template_load_lock:
|
with template_load_lock:
|
||||||
if not template:
|
if not template:
|
||||||
mod_template_folder = Utils.local_path("data", "factorio", "mod_template")
|
mod_template_folder = Utils.local_path("data", "factorio", "mod_template")
|
||||||
|
Reference in New Issue
Block a user