add seed_name to multidata and RoomInfo

This commit is contained in:
Fabian Dill
2021-04-12 09:36:45 +02:00
parent 764e6e7926
commit 2df7e4e537
6 changed files with 13 additions and 11 deletions

View File

@@ -27,7 +27,7 @@ base_info = {
"factorio_version": "1.1"
}
def generate_mod(world: MultiWorld, player: int):
def generate_mod(world: MultiWorld, player: int, seedname: str):
global template, locale_template
with template_load_lock:
if not template:
@@ -41,7 +41,7 @@ def generate_mod(world: MultiWorld, player: int):
for location in world.get_filled_locations(player):
if not location.name.startswith("recipe-"): # introduce this as a new location property?
locations.append((location.name, location.item.name, location.item.player))
mod_name = f"archipelago-client-{world.seed}-{player}"
mod_name = f"archipelago-client-{seedname}-{player}"
tech_cost = {0: 0.1,
1: 0.25,
2: 0.5,

View File

@@ -76,9 +76,6 @@ def get_shapes(world: MultiWorld, player: int) -> Dict[str, List[str]]:
# https://www.wolframalpha.com/input/?i=x+=+1/2+(n++++1)+(2++++n)+solve+for+n
import math
slice_size = int(0.5*(math.sqrt(8*len(tech_names)+1)-3))
import logging
logging.info(slice_size)
tech_names.sort()
world.random.shuffle(tech_names)
tech_names.sort(key=lambda tech_name: len(technology_table[tech_name].ingredients))