forked from hannibal002/SkyHanni
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1e0deb
commit df8315e
Showing
18 changed files
with
1,194 additions
and
1,242 deletions.
There are no files selected for viewing
163 changes: 0 additions & 163 deletions
163
src/main/java/at/hannibal2/skyhanni/config/Features.java
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,168 @@ | ||
package at.hannibal2.skyhanni.config | ||
|
||
import at.hannibal2.skyhanni.SkyHanniMod | ||
import at.hannibal2.skyhanni.SkyHanniMod.Companion.version | ||
import at.hannibal2.skyhanni.config.features.About | ||
import at.hannibal2.skyhanni.config.features.chat.ChatConfig | ||
import at.hannibal2.skyhanni.config.features.combat.CombatConfig | ||
import at.hannibal2.skyhanni.config.features.crimsonisle.CrimsonIsleConfig | ||
import at.hannibal2.skyhanni.config.features.dev.DevConfig | ||
import at.hannibal2.skyhanni.config.features.dungeon.DungeonConfig | ||
import at.hannibal2.skyhanni.config.features.event.EventConfig | ||
import at.hannibal2.skyhanni.config.features.fishing.FishingConfig | ||
import at.hannibal2.skyhanni.config.features.garden.GardenConfig | ||
import at.hannibal2.skyhanni.config.features.gui.GUIConfig | ||
import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig | ||
import at.hannibal2.skyhanni.config.features.mining.MiningConfig | ||
import at.hannibal2.skyhanni.config.features.misc.MiscConfig | ||
import at.hannibal2.skyhanni.config.features.rift.RiftConfig | ||
import at.hannibal2.skyhanni.config.features.skillprogress.SkillProgressConfig | ||
import at.hannibal2.skyhanni.config.features.slayer.SlayerConfig | ||
import at.hannibal2.skyhanni.config.storage.Storage | ||
import at.hannibal2.skyhanni.utils.LorenzUtils.isAprilFoolsDay | ||
import com.google.gson.annotations.Expose | ||
import io.github.notenoughupdates.moulconfig.Config | ||
import io.github.notenoughupdates.moulconfig.Social | ||
import io.github.notenoughupdates.moulconfig.annotations.Category | ||
import io.github.notenoughupdates.moulconfig.gui.HorizontalAlign | ||
import io.github.notenoughupdates.moulconfig.processor.ProcessedCategory | ||
import net.minecraft.util.ResourceLocation | ||
|
||
class Features : Config() { | ||
private val discord: ResourceLocation = ResourceLocation("notenoughupdates:social/discord.png") | ||
private val github: ResourceLocation = ResourceLocation("notenoughupdates:social/github.png") | ||
private val patreon: ResourceLocation = ResourceLocation("notenoughupdates:social/patreon.png") | ||
|
||
override fun shouldAutoFocusSearchbar(): Boolean { | ||
return true | ||
} | ||
|
||
override fun alignCategory(category: ProcessedCategory?, isSelected: Boolean): HorizontalAlign { | ||
if (isAprilFoolsDay) return HorizontalAlign.RIGHT | ||
return super.alignCategory(category, isSelected) | ||
} | ||
|
||
override fun getSocials(): List<Social> { | ||
return listOf( | ||
Social.forLink("Discord", discord, "https://discord.com/invite/skyhanni-997079228510117908"), | ||
Social.forLink("GitHub", github, "https://github.com/hannibal002/SkyHanni"), | ||
Social.forLink("Patreon", patreon, "https://www.patreon.com/hannibal2"), | ||
) | ||
} | ||
|
||
override fun saveNow() { | ||
SkyHanniMod.configManager.saveConfig(ConfigFileType.FEATURES, "close-gui") | ||
} | ||
|
||
override fun getTitle(): String { | ||
// Minecraft does not render RTL strings very nicely, so we reverse the string here. Not authentic, but close enough. | ||
val modName = if (isAprilFoolsDay) StringBuilder().append("اسکای هانی").reverse().toString() | ||
else "SkyHanni" | ||
|
||
return "$modName $version by §channibal2§r, config by §5Moulberry §rand §5nea89" | ||
} | ||
|
||
/* | ||
* If you are adding a new category, please insert it alphabetically | ||
* The only exceptions to this are About and GUI, which are pinned to the top | ||
* and Misc and Dev, which are to be at the bottom. Thanks! | ||
*/ | ||
// Top | ||
@Expose | ||
@Category(name = "About", desc = "Information about SkyHanni and updates.") | ||
@JvmField | ||
var about: About = About() | ||
|
||
@Expose | ||
@Category(name = "GUI", desc = "Change the locations of GUI elements (§e/sh gui§7).") | ||
@JvmField | ||
var gui: GUIConfig = GUIConfig() | ||
|
||
|
||
// Islands | ||
@Expose | ||
@Category(name = "Garden", desc = "Features for the Garden island.") | ||
@JvmField | ||
var garden: GardenConfig = GardenConfig() | ||
|
||
@Expose | ||
@Category(name = "Crimson Isle", desc = "Things to do on the Crimson Isle/Nether island.") | ||
@JvmField | ||
var crimsonIsle: CrimsonIsleConfig = CrimsonIsleConfig() | ||
|
||
@Expose | ||
@Category(name = "The Rift", desc = "Features for The Rift dimension.") | ||
@JvmField | ||
var rift: RiftConfig = RiftConfig() | ||
|
||
|
||
// Skills | ||
@Expose | ||
@Category(name = "Fishing", desc = "Fishing stuff.") | ||
@JvmField | ||
var fishing: FishingConfig = FishingConfig() | ||
|
||
@Expose | ||
@Category(name = "Mining", desc = "Features that help you break blocks.") | ||
@JvmField | ||
var mining: MiningConfig = MiningConfig() | ||
|
||
|
||
// Combat like | ||
@Expose | ||
@Category(name = "Combat", desc = "Everything combat and PvE related.") | ||
@JvmField | ||
var combat: CombatConfig = CombatConfig() | ||
|
||
@Expose | ||
@Category(name = "Slayer", desc = "Slayer features.") | ||
@JvmField | ||
var slayer: SlayerConfig = SlayerConfig() | ||
|
||
@Expose | ||
@Category(name = "Dungeon", desc = "Features that change the Dungeons experience in The Catacombs.") | ||
@JvmField | ||
var dungeon: DungeonConfig = DungeonConfig() | ||
|
||
|
||
// Misc | ||
@Expose | ||
@Category(name = "Inventory", desc = "Change the behavior of items and the inventory.") | ||
@JvmField | ||
var inventory: InventoryConfig = InventoryConfig() | ||
|
||
@Expose | ||
@Category(name = "Events", desc = "Stuff that is not always available.") | ||
@JvmField | ||
var event: EventConfig = EventConfig() | ||
|
||
@Expose | ||
@Category(name = "Skill Progress", desc = "Skill Progress related config options.") | ||
@JvmField | ||
var skillProgress: SkillProgressConfig = SkillProgressConfig() | ||
|
||
@Expose | ||
@Category(name = "Chat", desc = "Change how the chat looks.") | ||
@JvmField | ||
var chat: ChatConfig = ChatConfig() | ||
|
||
@Expose | ||
@Category(name = "Misc", desc = "Settings without a category.") | ||
@JvmField | ||
var misc: MiscConfig = MiscConfig() | ||
|
||
|
||
// Bottom | ||
@Expose | ||
@Category(name = "Dev", desc = "Debug and test stuff. Developers are cool.") | ||
@JvmField | ||
var dev: DevConfig = DevConfig() | ||
|
||
@Expose | ||
@JvmField | ||
var storage: Storage = Storage() | ||
|
||
@Expose | ||
@Suppress("unused") | ||
var lastVersion: Int = ConfigUpdaterMigrator.CONFIG_VERSION | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package at.hannibal2.skyhanni.config | ||
|
||
import at.hannibal2.skyhanni.data.SackItem | ||
import at.hannibal2.skyhanni.utils.NEUInternalName | ||
import com.google.gson.annotations.Expose | ||
import java.util.UUID | ||
|
||
class SackData { | ||
@Expose | ||
var players: MutableMap<UUID, PlayerSpecific> = HashMap() | ||
|
||
class PlayerSpecific { | ||
@Expose | ||
var profiles: MutableMap<String, ProfileSpecific> = HashMap() | ||
} | ||
|
||
class ProfileSpecific { | ||
@Expose | ||
var sackContents: Map<NEUInternalName, SackItem> = HashMap() | ||
} | ||
} |
Oops, something went wrong.