Frozen Goodies Library


Small library to create Frozen Goodies dynamically.

Internal
12 days ago
2.0 - 2.1
26
Factorio: Space Age Icon Space Age Mod
Manufacturing Cheats
Owner:
QuingKhaos
Source:
https://github.com/QuingKhaos/frozen-...
Homepage:
https://discord.gg/SYmkaDjFCt
License:
GNU LGPLv3
Created:
a month ago
Latest Version:
2.0.1 (12 days ago)
Factorio version:
2.0 - 2.1
Downloaded by:
26 users

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.