Skip to content

Commit

Permalink
Make pots/crates shuffle their vanilla items (Roman971#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrealmuto committed Sep 22, 2022
1 parent 55a505e commit c8b9834
Show file tree
Hide file tree
Showing 7 changed files with 564 additions and 375 deletions.
Binary file modified ASM/build/bundle.o
Binary file not shown.
2 changes: 1 addition & 1 deletion ASM/c/get_items.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ uint8_t item_give_collectible(uint8_t item, z64_link_t *link, z64_actor_t *from_
PLAYER_NAME_ID = player;

// If it's a junk item (aka a regular collectible) don't do the fanfare music/message box.
if (item_row->collectible > 0) { // Item is one of our base collectibles
if (item_row->collectible >= 0) { // Item is one of our base collectibles
collectible_mutex = NULL;
pItem->actor.health = 1;
z64_GiveItem(&z64_game, item_row->action_id);
Expand Down
378 changes: 189 additions & 189 deletions ASM/c/item_table.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ASM/c/item_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ typedef struct {
effect_fn effect;
int16_t effect_arg1;
int16_t effect_arg2;
uint8_t collectible;
int8_t collectible;
} item_row_t;

uint16_t resolve_upgrades(uint16_t item_id);
Expand Down
20 changes: 10 additions & 10 deletions ItemPool.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,13 +516,13 @@ def get_pool_core(world):
elif location.type == 'ActorOverride' or (location.type == 'Collectable' and ('Freestanding' in location.filter_tags or 'RupeeTower' in location.filter_tags)):
if world.settings.shuffle_freestanding_items == 'all':
shuffle_item = True
item = get_new_junk()
#item = get_new_junk()
elif world.settings.shuffle_freestanding_items == 'dungeons' and location.dungeon is not None:
shuffle_item = True
item = get_new_junk()
#item = get_new_junk()
elif world.settings.shuffle_freestanding_items == 'overworld' and location.dungeon is None:
shuffle_item = True
item = get_new_junk()
#item = get_new_junk()
else:
shuffle_item = False
location.disabled = DisableType.DISABLED
Expand All @@ -531,13 +531,13 @@ def get_pool_core(world):
elif location.type == 'Collectable' and ('Pot' in location.filter_tags or 'FlyingPot' in location.filter_tags):
if world.settings.shuffle_pots == 'all':
shuffle_item = True
item = get_new_junk()
#item = get_new_junk()
elif world.settings.shuffle_pots == 'dungeons' and location.dungeon is not None:
shuffle_item = True
item = get_new_junk()
#item = get_new_junk()
elif world.settings.shuffle_pots == 'overworld' and location.dungeon is None:
shuffle_item = True
item = get_new_junk()
#item = get_new_junk()
else:
shuffle_item = False
location.disabled = DisableType.DISABLED
Expand All @@ -546,13 +546,13 @@ def get_pool_core(world):
elif location.type == 'Collectable' and ('Crate' in location.filter_tags or 'SmallCrate' in location.filter_tags):
if world.settings.shuffle_crates == 'all':
shuffle_item = True
item = get_new_junk()
#item = get_new_junk()
elif world.settings.shuffle_crates == 'dungeons' and location.dungeon is not None:
shuffle_item = True
item = get_new_junk()
#item = get_new_junk()
elif world.settings.shuffle_crates == 'overworld' and location.dungeon is None:
shuffle_item = True
item = get_new_junk()
#item = get_new_junk()
else:
shuffle_item = False
location.disabled = DisableType.DISABLED
Expand All @@ -561,7 +561,7 @@ def get_pool_core(world):
elif location.type == 'Collectable' and 'Beehive' in location.filter_tags:
if world.settings.shuffle_beehives:
shuffle_item = True
item = get_new_junk()
#item = get_new_junk()
else:
shuffle_item = False
location.disabled = DisableType.DISABLED
Expand Down
Loading

0 comments on commit c8b9834

Please sign in to comment.