Skip to content

Commit

Permalink
more tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePhar committed Jul 2, 2023
1 parent 15fc9c9 commit 7355d4e
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 51 deletions.
12 changes: 6 additions & 6 deletions MultiServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ def register_location_checks(ctx: Context, team: int, slot: int, locations: typi
info_text = json_format_triforce_event(new_item, target_player)
else:
info_text = json_format_send_event(new_item, target_player)

ctx.broadcast_team(team, [info_text])

ctx.location_checks[team, slot] |= new_locations
Expand Down Expand Up @@ -1047,7 +1047,7 @@ def json_format_send_event(net_item: NetworkItem, receiving_player: int):

def json_format_stone_event(net_item: NetworkItem, receiving_player: int):
parts = []
NetUtils.add_json_text(parts, net_item, type=NetUtils.JSONTypes.player_id)
NetUtils.add_json_text(parts, net_item.player, type=NetUtils.JSONTypes.player_id)
NetUtils.add_json_text(parts, " found the ")
NetUtils.add_json_item(parts, net_item.item, net_item.player, net_item.flags)
NetUtils.add_json_text(parts, " (")
Expand All @@ -1061,10 +1061,10 @@ def json_format_stone_event(net_item: NetworkItem, receiving_player: int):

def json_format_triforce_event(net_item: NetworkItem, receiving_player: int):
parts = []
NetUtils.add_json_text(parts, net_item, type=NetUtils.JSONTypes.player_id)
NetUtils.add_json_text(parts, " also found a ")
NetUtils.add_json_text(parts, receiving_player, type=NetUtils.JSONTypes.player_id)
NetUtils.add_json_text(parts, " also got a ")
NetUtils.add_json_item(parts, net_item.item, net_item.player, net_item.flags)
NetUtils.add_json_text(parts, "taped to the back of the stone!")
NetUtils.add_json_text(parts, "! It was taped to the back of the stone.")

return {"cmd": "PrintJSON", "data": parts, "type": "ItemSend",
"receiving": receiving_player,
Expand All @@ -1073,7 +1073,7 @@ def json_format_triforce_event(net_item: NetworkItem, receiving_player: int):

def json_format_dust_event(net_item: NetworkItem, receiving_player: int):
parts = []
NetUtils.add_json_text(parts, net_item, type=NetUtils.JSONTypes.player_id)
NetUtils.add_json_text(parts, net_item.player, type=NetUtils.JSONTypes.player_id)
NetUtils.add_json_text(parts, " found ")
NetUtils.add_json_item(parts, net_item.item, net_item.player, net_item.flags)
NetUtils.add_json_text(parts, ". (")
Expand Down
2 changes: 1 addition & 1 deletion WebHostLib/templates/gauntletTracker.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<body>
<div class="container">
<h1>Found Pieces:</h1>
<h1>Found Stones</h1>
<div class="items">
<img
src="{{ icons['Space Stone'] }}"
Expand Down
42 changes: 21 additions & 21 deletions worlds/alttp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,28 +470,28 @@ def stage_pre_fill(cls, world: MultiWorld):
from worlds.infinity_gauntlet import IGItem, IGWorld

replacement_table: typing.Dict[str, str] = {
"Single Arrow": "the dusted remains of a single arrow",
"Arrows (10)": "the dusted remains of 10 arrows",
"Single Bomb": "the dusted remains of a single bomb",
"Bombs (3)": "the dusted remains of 3 bombs",
"Bombs (10)": "the dusted remains of 10 bombs",
"Boss Heart Container": "the dusted remains of a Boss Heart Container",
"Sanctuary Heart Container": "the dusted remains of a Sanctuary Heart Container",
"Piece of Heart": "the dusted remains of a Piece of Heart",
"Rupee (1)": "the dusted remains of a green rupee",
"Rupees (5)": "the dusted remains of a blue rupee",
"Rupees (20)": "the dusted remains of a red rupee",
"Rupees (50)": "the dusted remains of a purple rupee",
"Rupees (100)": "the dusted remains of an orange rupee",
"Rupees (300)": "the dusted remains of a silver rupee",
"Bee": "the dusted remains of a bee",
"Bee Trap": "the dusted remains of a bunch of bees",
"Single Arrow": "the dusty remains of a single arrow",
"Arrows (10)": "the dusty remains of 10 arrows",
"Single Bomb": "the dusty remains of a single bomb",
"Bombs (3)": "the dusty remains of 3 bombs",
"Bombs (10)": "the dusty remains of 10 bombs",
"Boss Heart Container": "the dusty remains of a Boss Heart Container",
"Sanctuary Heart Container": "the dusty remains of a Sanctuary Heart Container",
"Piece of Heart": "the dusty remains of a Piece of Heart",
"Rupee (1)": "the dusty remains of a green rupee",
"Rupees (5)": "the dusty remains of a blue rupee",
"Rupees (20)": "the dusty remains of a red rupee",
"Rupees (50)": "the dusty remains of a purple rupee",
"Rupees (100)": "the dusty remains of an orange rupee",
"Rupees (300)": "the dusty remains of a silver rupee",
"Bee": "the dusty remains of a bee",
"Bee Trap": "the dusty remains of a bunch of bees",
}

prog_replacement_table: typing.Dict[str, str] = {
"Progressive Mail": "the dusted remains of some Red Mail",
"Progressive Shield": "the dusted remains of a Mirror Shield",
"Progressive Sword": "the dusted remains of a sword",
"Progressive Mail": "the dusty remains of some Red Mail",
"Progressive Shield": "the dusty remains of a Mirror Shield",
"Progressive Sword": "the dusty remains of a sword",
}

prog_item_snapped: typing.Dict[str, typing.List[int]] = {
Expand Down Expand Up @@ -546,12 +546,12 @@ def stage_pre_fill(cls, world: MultiWorld):
continue

if item.name.startswith("Map "):
item = IGItem("the dusted remains of a map", ItemClassification.trap, 69898999, infinity_player)
item = IGItem("the dusty remains of a map", ItemClassification.trap, 69898999, infinity_player)
new_item_pool.append(item)
continue

if item.name.startswith("Compass "):
item = IGItem("the dusted remains of a compass", ItemClassification.trap, 69898998, infinity_player)
item = IGItem("the dusty remains of a compass", ItemClassification.trap, 69898998, infinity_player)
new_item_pool.append(item)
continue

Expand Down
46 changes: 23 additions & 23 deletions worlds/infinity_gauntlet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,32 @@ class IGWorld(World):
"Time Stone": 69_888_005,

# "Snapped" Items
"the dusted remains of a single arrow": 69_889_000 + 0x43,
"the dusted remains of 10 arrows": 69_889_000 + 0x44,
"the dusted remains of a single bomb": 69_889_000 + 0x27,
"the dusted remains of 3 bombs": 69_889_000 + 0x28,
"the dusted remains of 10 bombs": 69_889_000 + 0x31,
"the dusted remains of some Red Mail": 69_889_000 + 0x60,
"the dusted remains of a Mirror Shield": 69_889_000 + 0x5F,
"the dusted remains of a Boss Heart Container": 69_889_000 + 0x3E,
"the dusted remains of a Sanctuary Heart Container": 69_889_000 + 0x3F,
"the dusted remains of a Piece of Heart": 69_889_000 + 0x17,
"the dusted remains of a green rupee": 69_889_000 + 0x34,
"the dusted remains of a blue rupee": 69_889_000 + 0x35,
"the dusted remains of a red rupee": 69_889_000 + 0x36,
"the dusted remains of a purple rupee": 69_889_000 + 0x41,
"the dusted remains of an orange rupee": 69_889_000 + 0x40,
"the dusted remains of a silver rupee": 69_889_000 + 0x46,
"the dusted remains of a map": 69_889_000 + 9999,
"the dusted remains of a compass": 69_889_000 + 9998,
"the dusted remains of a bee": 69_889_000 + 0x0E,
"the dusted remains of a bunch of bees": 69_889_000 + 0xB0,
"the dusted remains of a sword": 69_889_000 + 0x5E,
"the dusty remains of a single arrow": 69_889_000 + 0x43,
"the dusty remains of 10 arrows": 69_889_000 + 0x44,
"the dusty remains of a single bomb": 69_889_000 + 0x27,
"the dusty remains of 3 bombs": 69_889_000 + 0x28,
"the dusty remains of 10 bombs": 69_889_000 + 0x31,
"the dusty remains of some Red Mail": 69_889_000 + 0x60,
"the dusty remains of a Mirror Shield": 69_889_000 + 0x5F,
"the dusty remains of a Boss Heart Container": 69_889_000 + 0x3E,
"the dusty remains of a Sanctuary Heart Container": 69_889_000 + 0x3F,
"the dusty remains of a Piece of Heart": 69_889_000 + 0x17,
"the dusty remains of a green rupee": 69_889_000 + 0x34,
"the dusty remains of a blue rupee": 69_889_000 + 0x35,
"the dusty remains of a red rupee": 69_889_000 + 0x36,
"the dusty remains of a purple rupee": 69_889_000 + 0x41,
"the dusty remains of an orange rupee": 69_889_000 + 0x40,
"the dusty remains of a silver rupee": 69_889_000 + 0x46,
"the dusty remains of a map": 69_889_000 + 9999,
"the dusty remains of a compass": 69_889_000 + 9998,
"the dusty remains of a bee": 69_889_000 + 0x0E,
"the dusty remains of a bunch of bees": 69_889_000 + 0xB0,
"the dusty remains of a sword": 69_889_000 + 0x5E,
}

def create_item(self, name: str) -> IGItem:
classification = ItemClassification.progression_skip_balancing
if name.startswith("The dusted"):
if name.startswith("the dusty"):
classification = ItemClassification.trap

return IGItem(name, classification, self.item_name_to_id[name], self.player)
Expand All @@ -75,7 +75,7 @@ def get_filler_item_name(self) -> str:

def has_all_stones(self, state: CollectionState):
return state.has_all(
set([item for item in self.item_name_to_id.keys() if not item.startswith("The dusted")]),
set([item for item in self.item_name_to_id.keys() if not item.startswith("The dusty")]),
self.player
)

Expand Down

0 comments on commit 7355d4e

Please sign in to comment.