Skip to main content
The Deno 2 Release Candidate is here
Learn more
class RagfairAssortGenerator
Re-export
import { RagfairAssortGenerator } from "https://deno.land/x/sptaki@1.2.0/generators/mod.ts";

Constructors

new
RagfairAssortGenerator(
jsonUtil: JsonUtil,
hashUtil: HashUtil,
itemHelper: ItemHelper,
presetHelper: PresetHelper,
databaseServer: DatabaseServer,
seasonalEventService: SeasonalEventService,
configServer: ConfigServer,
)

Properties

protected
configServer: ConfigServer
protected
databaseServer: DatabaseServer
protected
generatedAssortItems: Item[][]
protected
hashUtil: HashUtil
protected
itemHelper: ItemHelper
protected
jsonUtil: JsonUtil
protected
presetHelper: PresetHelper
protected
ragfairConfig: IRagfairConfig
protected
ragfairItemInvalidBaseTypes: string[]
protected
seasonalEventService: SeasonalEventService

Methods

protected
assortsAreGenerated(): boolean

Check internal generatedAssortItems array has objects

protected
createRagfairAssortRootItem(tplId: string, id?: string): Item

Create a base assort item and return it with populated values + 999999 stack count + unlimited count = true

Generate an array of arrays (item + children) the flea can sell

protected
getPresetsToAdd(): IPreset[]

Get presets from globals to add to flea ragfairConfig.dynamic.showDefaultPresetsOnly decides if its all presets or just defaults

Get an array of arrays that can be sold on the flea Each sub array contains item + children (if any)