-
-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support FP roll and No Support Found for TranslateFGO (#1667)
- Loading branch information
Showing
5 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
scripts/src/main/java/io/github/fate_grand_automata/scripts/IFgoAutomataApi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
package io.github.fate_grand_automata.scripts | ||
|
||
import io.github.fate_grand_automata.scripts.enums.GameServer | ||
import io.github.fate_grand_automata.scripts.locations.Locations | ||
import io.github.fate_grand_automata.scripts.prefs.IPreferences | ||
import io.github.lib_automata.AutomataApi | ||
import io.github.lib_automata.Region | ||
|
||
interface IFgoAutomataApi : AutomataApi { | ||
val prefs: IPreferences | ||
val images: IImageLoader | ||
val locations: Locations | ||
val messages: IScriptMessages | ||
|
||
/** | ||
* Helper method to search for the current server's image and to also search for the English one in case of TranslateFGO. | ||
*/ | ||
fun findImage(region: Region, image: Images) = | ||
images[image] in region || (prefs.gameServer is GameServer.Jp && images[image, GameServer.default] in region) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters