Skip to content

More Casting: Create a global API#38

Closed
VictoriaSilver wants to merge 2 commits into
LuziferSenpai:mainfrom
VictoriaSilver:main
Closed

More Casting: Create a global API#38
VictoriaSilver wants to merge 2 commits into
LuziferSenpai:mainfrom
VictoriaSilver:main

Conversation

@VictoriaSilver

Copy link
Copy Markdown

This PR adds a global API for manipulating banned items, casting substitutions, and the prototype types More Casting will attempt to create recipes for.

Using some Krastorio 2 items as an example;

MoreCasting.ban({
    -- Ban Krastorio items with their own casting recipes
    "kr-iron-beam",
    "kr-steel-beam",
    "kr-steel-gear-wheel",
    "kr-steel-pipe",
    "kr-steel-pipe-to-ground",
    -- Krastorio adds kr-iron-beam to the recipe, and only plain concrete is covered by MC's default bans
    "refined-concrete"
})

-- Allow these items to be substituted with molten iron
MoreCasting.add_castable_ingredients("moltenIron", {
    ["kr-iron-beam"] = 20,
    ["kr-steel-beam"] = 40,
    ["kr-steel-gear-wheel"] = 20,
    ["kr-steel-pipe"] = 20,
    ["kr-steel-pipe-to-ground"] = 300,
})

@LuziferSenpai

Copy link
Copy Markdown
Owner

Thanks for the PR, I did use it as a groundwork, but did my own implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants