UNPKG

farming-weight

Version:

Tools for calculating farming weight and fortune in Hypixel Skyblock

68 lines (67 loc) 2.63 kB
import { Crop } from '../constants/crops.js'; export declare function createFarmingWeightCalculator(info?: FarmingWeightInfo): FarmingWeight; export interface FarmingWeightInfo { collection?: Record<string, number>; farmingXp?: number; levelCapUpgrade?: number; anitaBonusFarmingFortuneLevel?: number; minions?: string[]; contests?: { collected: number; claimed_position?: number; claimed_participants?: number; claimed_medal?: 'bronze' | 'silver' | 'gold' | 'platinum' | 'diamond' | string; }[]; pests?: Record<string, number>; } declare class FarmingWeight { collection: Record<Crop, number>; levelCapUpgrade: number; farmingXp: number; anitaBonusFarmingFortuneLevel: number; tier12MinionCount: number; earnedMedals: Record<'diamond' | 'platinum' | 'gold', number>; cropWeights: Record<Crop, number>; bonusSources: Record<string, number>; uncountedCrops: Partial<Record<Crop, number>>; readonly info?: FarmingWeightInfo; constructor(info?: FarmingWeightInfo); /** * Expects a dictionary of collections and amounts with the default Hypixel SkyBlock IDs * @param {Record<string, number>} collections * @returns {FarmingWeight} */ setCropsFromCollections(collections: Record<string, number>): FarmingWeight; setCrop: (crop: Crop, collection: number) => this; setLevelCap: (levelCap: number) => this; setFarmingXp: (farmingXp: number) => this; setAnitaBonusLevel: (anitaBonusFarmingFortuneLevel: number) => this; addMinions: (minions: string[]) => this; setEarnedMedals: ({ diamond, platinum, gold }: { diamond?: number; platinum?: number; gold?: number; }) => this; setTier12MinionCount: (count: number) => this; setContests: (contests: FarmingWeightInfo["contests"]) => this; getWeightInfo: () => { totalWeight: number; bonusWeight: number; cropWeight: number; bonusSources: Record<string, number>; uncountedCrops: Partial<Record<Crop, number>>; }; getBonusWeights: () => Record<string, number>; getCropWeights: () => Record<Crop, number>; calcUncountedCrops: (bestiary: Record<string, number>) => this; getCropWeight: (crop: Crop) => void; } /** * Get the weight of a single crop based on the collection amount. * Use `createFarmingWeightCalculator` to calculate accurate weight of multiple crops * @param {Crop} crop * @param {number} collection * @returns {number} */ export declare function calcWeightForCrop(crop: Crop, collection: number): number; export {};