Frozen Goodies Library
Small library to create Frozen Goodies dynamically.
Additionally it recreates all vanilla frozen goodies icons with the built-in layering mechanism for consistency.
Usage
Example usage:
local frozen_goodies = require("__frozen-goodies-lib__.lib")
frozen_goodies.create_frozen_goodie {
name = "coconut",
icons = {{icon = data.raw.item["coconut"].icon, icon_size = data.raw.item["coconut"].icon_size}},
unlock = "coconut-processing-technology",
default_import_location = "pelagos",
}
create_frozen_goodie takes a table with the following fields:
--- @class FrozenGoodies.FrozenGoodDefinition
--- @field public name data.ItemID Name of the good that should be frozen.
--- @field public icons data.IconData[] The icons of the good that should be frozen.
--- @field public scale double? The scale of the the icons in the frozen goodie icon. Defaults to `0.7`.
--- @field public shift data.Vector? The shift of the the icons in the frozen goodie icon. Defaults to `{0, -3}`.
--- @field public unlock data.TechnologyID? The technology to unlock the freeze/melt recipes with.
--- @field public default_import_location data.SpaceLocationID? The default import location of the frozen good. Defaults to Gleba.