Skip to content

Commit

Permalink
fix(ui): Route encounter & dungeon loot modal fixes (pokeclicker#5426)
Browse files Browse the repository at this point in the history
* Update dungeonInfoModal.html

fixes pokeclicker#5419

* Update routeInfoModal.html

fix pokeclicker#5418

* Update dungeonInfoModal.html

scolls in dunjon loot too

* Update routeInfoModal.html

remove the shwoad status to the route modal

* Update routeInfoModal.html

bad argument to function getImage

* fixes

---------

Co-authored-by: CypherX <[email protected]>
  • Loading branch information
Sinonea and CypherX authored Jul 20, 2024
1 parent 60b0f8b commit ba4dc76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/components/dungeonInfoModal.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div class="modal fade noselect" id="dungeonInfoModal" tabindex="-1" role="dialog" aria-labelledby="dungeonInfoLabel">
<div class="modal-dialog modal-dialog-scrollable modal-lg role="document">
<div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
<div class="modal-content">
<div class="modal-header" style='justify-content: space-around;'>
<h4 class="modal-title" data-bind="text: DungeonInfo.getFullName()">name</h4>
<button type="button" class="btn btn-danger position-absolute" data-dismiss="modal" style="right:0; top:0; font-size: 18px; font-weight: 700;">×</button>
</div>
<div class="modal-body pt-0 overflow-hidden" style="background-color: inherit;">
<div class="modal-body pt-0" style="background-color: inherit;">
<!-- ko foreach: { data: Object.entries(DungeonInfo.getLootList()), as: 'lootEntries' } -->
<div class="bg-primary text-left rounded px-3 py-2 mb-1 d-flex align-items-center" data-toggle="collapse" data-bind="attr: { 'data-target': `#tier-${lootEntries[0]}` }">
<img width="42px" data-bind="attr: { src: `assets/images/dungeons/chest-${lootEntries[0]}.png` }" />
Expand All @@ -19,7 +19,7 @@ <h5 class="my-0 mx-1 text-light d-inline-block" data-bind="text: GameConstants.c
<!-- ko using: PokemonHelper.getPokemonByName(item.loot).name != 'MissingNo.' && !App.game.party.getPokemonByName(item.loot), as: 'isPokemonAndNotCaught' -->
<!-- ko using: isPokemonAndNotCaught ? '???' : DungeonInfo.getLootName(item.loot), as: 'lootName' -->
<div class="btn btn-secondary px-1 py-0 d-flex align-items-center text-left" style="cursor: default;">
<img width="42px" data-bind="attr: { src: DungeonInfo.getLootImage(item.loot) },
<img width="42px" data-bind="attr: { src: DungeonInfo.getLootImage(item.loot) },
style: { 'filter': isPokemonAndNotCaught ? 'brightness(0)' : '' }">
<div class="flex-grow-1 small ml-2" style="min-width: 0;">
<div class="text-truncate" data-bind="text: lootName"></div>
Expand All @@ -29,7 +29,7 @@ <h5 class="my-0 mx-1 text-light d-inline-block" data-bind="text: GameConstants.c
title: item.requirement?.hint() || '',
placement: 'bottom',
trigger: 'hover'
}, visible: item.requirement" />
}, visible: item.requirement && !item.requirement.isCompleted()" />
</div>
<!-- /ko -->
<!-- /ko -->
Expand Down
6 changes: 3 additions & 3 deletions src/components/routeInfoModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<h4 class="modal-title" data-bind="text: RouteInfo.getFullName()">name</h4>
<button type="button" class="btn btn-danger position-absolute" data-dismiss="modal" style="right:0; top:0; font-size: 18px; font-weight: 700;">×</button>
</div>
<div class="modal-body pt-0 overflow-hidden" style="background-color: inherit;">
<div class="modal-body pt-0" style="background-color: inherit;">
<ul class="row justify-content-center w-100 p-0 m-0" data-bind="foreach: RouteInfo.pokemonList()">
<li class="col-sm-4 col-md-3 col-lg-2 pokedexEntry" data-bind="style:{background: PokedexHelper.getBackgroundColors($data.name)}">
<span class="id pokedex-top-text" data-bind="text: (($data.id > 0 && App.game.party.alreadyCaughtPokemon($data.id)) ? Math.floor($data.id) + '' : '???').padStart(3, 0)">number</span>
Expand All @@ -25,14 +25,14 @@ <h4 class="modal-title" data-bind="text: RouteInfo.getFullName()">name</h4>
<!-- ko if: $data.roamer -->
<div data-bind="if: $data.roamer" style="position: absolute;left: 2px;bottom: 5px;">
<img width="24px" src="" data-bind="attr: { src: 'assets/images/encountersInfo/roaming.png' },
tooltip: {
tooltip: {
title: 'Roaming Pokémon',
placement: 'bottom',
trigger: 'hover'
}"/>
</div>
<!-- /ko -->
<img src="" class="pokedex-pokemon-sprite" data-bind="css: { 'pokemon-not-seen': !App.game.party.alreadyCaughtPokemon($data.id) }, attr:{ src: PokemonHelper.getImage($data.id)}">
<img src="" class="pokedex-pokemon-sprite" data-bind="css: { 'pokemon-not-seen': !App.game.party.alreadyCaughtPokemon($data.id) }, attr:{ src: PokemonHelper.getImage($data.id, undefined, undefined, GameConstants.ShadowStatus.None)}">
<span class="pokedex-bottom-text text-truncate px-1" data-bind="text: (($data.id > 0 && App.game.party.alreadyCaughtPokemon($data.id)) ? PokemonHelper.displayName($data.name) : '???')">name</span>
</li>
</ul>
Expand Down

0 comments on commit ba4dc76

Please sign in to comment.