/* * Copyright (C) 2024 NotEnoughUpdates contributors * * This file is part of NotEnoughUpdates. * * NotEnoughUpdates is free software: you can redistribute it * and/or modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation, either * version 3 of the License, or (at your option) any later version. * * NotEnoughUpdates is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with NotEnoughUpdates. If not, see . */ package io.github.moulberry.notenoughupdates.miscfeatures.profileviewer import com.google.gson.annotations.SerializedName data class GardenDataJson( val success: Boolean, val garden: GardenData, ) data class GardenData( @SerializedName("unlocked_plots_ids") val unlockedPlotIds: List, @SerializedName("commission_data") val commissionData: VisitorCommissions, @SerializedName("resources_collected") val resourcesCollected: Map, @SerializedName("garden_experience") val gardenExperience: Int, @SerializedName("composter_data") val composterData: ComposterData, @SerializedName("selected_barn_skin") val selectedBarnSkin: String, @SerializedName("crop_upgrade_levels") val cropUpgradeLevels: Map, ) data class VisitorCommissions( val visits: Map, val completed: Map, @SerializedName("total_completed") val totalCompleted: Int, @SerializedName("unique_npcs_served") val uniqueNpcsServed: Int, ) data class ComposterData( val upgrades: APIComposterUpgrades, ) data class APIComposterUpgrades( val speed: Int, @SerializedName("multi_drop") val multiDrop: Int, @SerializedName("fuel_cap") val fuelCap: Int, @SerializedName("organic_matter_cap") val organicMatterCap: Int, @SerializedName("cost_reduction") val costReduction: Int, ) data class ComposterUpgrade( val upgrade: Int, val items: Map, val copper: Int, ) data class GardenRepoJson( @SerializedName("garden_exp") val gardenExperience: List, @SerializedName("crop_milestones") val cropMilestones: Map>, @SerializedName("visitors") val visitors: Map, val plots: Map, @SerializedName("plot_costs") val plotCosts: Map>, @SerializedName("barn") val barn: Map, @SerializedName("crop_upgrades") val cropUpgrades: List, @SerializedName("composter_upgrades") val composterUpgrades: Map>, @SerializedName("composter_tooltips") val composterTooltips: Map, ) data class PlotData( val name: String, val x: Int, val y: Int, ) data class PlotCost( val item: String, val amount: Int, ) data class BarnSkin( val name: String, val item: String, ) data class EliteWeightJson( val totalWeight: Double, val cropWeight: Map, val bonusWeight: Map, ) enum class CropType(val itemId: String, val apiName: String, val displayName: String) { WHEAT("ENCHANTED_HAY_BLOCK", "WHEAT", "Wheat"), NETHER_WART("ENCHANTED_NETHER_STALK", "NETHER_STALK", "Nether Wart"), SUGAR_CANE("ENCHANTED_SUGAR", "SUGAR_CANE", "Sugar Cane"), CARROT("ENCHANTED_CARROT", "CARROT_ITEM", "Carrot"), POTATO("ENCHANTED_POTATO", "POTATO_ITEM", "Potato"), COCOA_BEANS("ENCHANTED_COCOA", "INK_SACK:3", "Cocoa Beans"), PUMPKIN("ENCHANTED_PUMPKIN", "PUMPKIN", "Pumpkin"), MELON("ENCHANTED_MELON", "MELON", "Melon"), CACTUS("ENCHANTED_CACTUS_GREEN", "CACTUS", "Cactus"), MUSHROOM("ENCHANTED_BROWN_MUSHROOM", "MUSHROOM_COLLECTION", "Mushroom"), ; companion object { fun fromApiName(apiName: String): CropType? { val fixedInput = apiName.uppercase().replace(" ", "_") val fromApiName = values().firstOrNull { it.apiName == fixedInput } if (fromApiName != null) return fromApiName return values().firstOrNull { it.name == fixedInput } } } } enum class VisitorRarity(val displayName: String) { UNCOMMON("§aUncommon"), RARE("§9Rare"), LEGENDARY("§6Legendary"), MYTHIC("§dMythic"), SPECIAL("§cSpecial"), TOTAL("§7Total"), ; }