Scrap Library deprecated


Functions used by the Production Scrap 2 mod. Other mods can use this to add their own compatibility.

5 years ago
0.17
4

FAQ

To make your own mod compatible with the Production Scrap 2 mod, just use one or both of the following functions:

scraplib.addScrap(recipe, scrapType, scrapProbability, scrapAmount)
Ex: scraplib.addScrap("iron-plate", "iron-plate-scrap", 0.06, 1)

  • recipe: This is simply the recipe name for the item you are creating scrap for.
  • scrapType: (see below for the current list of scrap types available)
  • scrapProbability: A number between 0 and 1; you may use any number you wish. The default number used in
    Production Scrap 2 is 0.06
  • scrapAmount: The number of pieces of scrap produced with each cycle.

scraplib.addFurnaceResult(furnace, amount)
Ex: scraplib.addFurnaceResult("electric-furnace", 2)

  • furnace: The name of the new type of furnace your mod uses (vanilla furnaces are covered in Production Scrap 2)
  • amount: This represents the field "result_inventory_size". Basically, the number of output items for your furnace.

List of scrap types currently available:

  • "iron-plate-scrap"
  • "copper-plate-scrap"
  • "steel-plate-scrap"
  • "belt-scrap"
  • "inserter-scrap"
  • "machine-scrap"
  • "circuit-scrap"
  • "military-scrap"
  • "engine-scrap"
  • "electric-scrap"
  • "battery-scrap"
  • "module-scrap"
  • "advanced-steel-scrap"
  • "wood"
  • "stone"
  • "solid-fuel"