Skip to content

Commit

Permalink
1.0.28 (Test continues)
Browse files Browse the repository at this point in the history
Possible fix for dedicated servers
Mouse cursor fix when closing/going back windows
  • Loading branch information
Rafacasari committed Jun 26, 2024
1 parent 8febb0c commit 3e89b1f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ class CobbledexCollectionGUI : Screen(cobbledexTextTranslation("cobbledex")) {
tooltip.add(translation)
}


entryForm.getDiscoveredTimestamp()?.let { timestamp ->
val translation = cobbledexTextTranslation("discovered_on", timestamp)
tooltip.add(translation)
Expand Down Expand Up @@ -400,7 +399,6 @@ class CobbledexCollectionGUI : Screen(cobbledexTextTranslation("cobbledex")) {
{
val species = if(filteredSpecies.size > entry) filteredSpecies[entry] else null
if (species != null) {
close()
playSound(CobblemonSounds.PC_CLICK)
CobbledexGUI.openCobbledexScreen(species.standardForm, setOf(),
skipSound = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@ class CobbledexGUI(var selectedPokemon: FormData?, var selectedAspects: Set<Stri
val y = (height - BASE_HEIGHT) / 2

this.addDrawableChild(ExitButton(pX = x + 315, pY = y + 172) {
this.close()
if (cameFromCollection)
CobbledexCollectionGUI.show(true)
else
this.close()
})

evolutionDisplay = PokemonEvolutionDisplay(x + 260, y + 37)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ class CobbledexItem(settings: Settings) : Item(settings) {

val target = entity.pokemon

val discoveryRegister = CobbledexCollectionGUI.discoveredList[target.species.showdownId()]?.contains(target.form.formOnlyShowdownId())
if (world.isClient && discoveryRegister == true) {
CobbledexGUI.openCobbledexScreen(target.form, target.aspects)
return TypedActionResult.success(itemStack, false)
if (world.isClient) {
val discoveryRegister = CobbledexCollectionGUI.discoveredList[target.species.showdownId()]?.contains(target.form.formOnlyShowdownId())
if (discoveryRegister == true) {
CobbledexGUI.openCobbledexScreen(target.form, target.aspects)
return TypedActionResult.success(itemStack, false)
}
}

if (user is ServerPlayerEntity) {
Expand Down

0 comments on commit 3e89b1f

Please sign in to comment.