Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Warhammer Test
- local warhammer = GLOBAL.Recipe("Warhammer",
- {
- Ingredient("purplegem", 1),
- Ingredient("cutstone", 3),
- Ingredient("flint", 12)
- },
- RECIPETABS.MAGIC, TECH.MAGIC_TWO)
- local function warhammer_return()
- local ingredients = {
- "spear",
- "spear",
- }
- for k,ingredient in pairs(ingredients) do
- local item = SpawnPrefab(ingredient)
- local player = GLOBAL.GetPlayer()
- print("Giving player ingredients back.")
- player.components.inventory:GiveItem(item)
- end
- end
- warhammer.oncraftfn = warhammer_return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement