mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
DS3: Use slot_data instead of the external Json file (#1155)
* Update items_data.py added `Red and White Round Shield`, `Crystal Scroll`, `Magic Stoneplate Ring`, and `Outrider Knight` gear. * Update locations_data.py Added `US: Red and White Round Shield`, `CKG: Magic Stoneplate Ring`, `GA: Outrider Knight` set, and `GA: Crystal Scroll` * Update __init__.py Add `Karla's Ashes` requirements * Update items_data.py Add `Irithyll Rapier, Hollow's Ashes, Irina's Ashes, Karla's Ashes, Cornyx's Ashes, and Orbeck's Ashes` * Update locations_data.py Add `Irithyll Rapier, Hollow's Ashes, Irina's Ashes, Karla's Ashes, Orbeck's Ashes, and Cornyx's Ashes` * Update items_data.py removed "hollows ashes" * Update locations_data.py remove "hollows ashes" * Revert "WebHost: Add the DarkSouls3 entry to upload and download the client file" This reverts commit 5e7c2d4cee485e373ffe60932134013548192c8e. * ds3: Use fill_slot_data instead of generate_output * DS3: Increment data_version * DS3: Fix item name in rule * DS3: Set required client version to 0.3.6 and added offsets between items and location tables for backward compatibility * DS3: Resolve Python 3.8 compatibility * DS3: Removed useless region for locations IDs consistency * DS3: Changed i in loop * DS3: Remove AP.json from the documentation * DS3: Put back json upload and download * DS3: Avoid empty downloads (cherry picked from commit c4c485140d2c427fe49c5b23444a4f1dd111d5b7) Co-authored-by: Br00ty <83629348+Br00ty@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# world/dark_souls_3/__init__.py
|
||||
import json
|
||||
import os
|
||||
from typing import Dict
|
||||
|
||||
from .Items import DarkSouls3Item
|
||||
from .Locations import DarkSouls3Location
|
||||
@@ -237,7 +238,9 @@ class DarkSouls3World(World):
|
||||
for i in range(item_pool_len, total_required_locations):
|
||||
self.multiworld.itempool += [self.create_item("Soul of an Intrepid Hero")]
|
||||
|
||||
def generate_output(self, output_directory: str):
|
||||
def fill_slot_data(self) -> Dict[str, object]:
|
||||
slot_data: Dict[str, object] = {}
|
||||
|
||||
# Depending on the specified option, modify items hexadecimal value to add an upgrade level
|
||||
item_dictionary_copy = item_dictionary.copy()
|
||||
if self.multiworld.randomize_weapons_level[self.player]:
|
||||
@@ -271,7 +274,7 @@ class DarkSouls3World(World):
|
||||
else:
|
||||
locations_target.append(0)
|
||||
|
||||
data = {
|
||||
slot_data = {
|
||||
"options": {
|
||||
"auto_equip": self.multiworld.auto_equip[self.player].value,
|
||||
"lock_equip": self.multiworld.lock_equip[self.player].value,
|
||||
@@ -287,7 +290,4 @@ class DarkSouls3World(World):
|
||||
"itemsAddress": items_address
|
||||
}
|
||||
|
||||
# generate the file
|
||||
filename = f"AP-{self.multiworld.seed_name}-P{self.player}-{self.multiworld.player_name[self.player]}.json"
|
||||
with open(os.path.join(output_directory, filename), 'w') as outfile:
|
||||
json.dump(data, outfile)
|
||||
return slot_data
|
||||
|
Reference in New Issue
Block a user