diff --git a/mods/ctf/ctf_classes/api.lua b/mods/ctf/ctf_classes/api.lua index 1de7c29..174c81c 100644 --- a/mods/ctf/ctf_classes/api.lua +++ b/mods/ctf/ctf_classes/api.lua @@ -119,6 +119,11 @@ function ctf_classes.update(player) physics.set(player:get_player_name(), "ctf_classes:speed", { speed = speed, }) + + crafting.lock_all(player:get_player_name()) + for i=1, #(class.properties.crafting or {}) do + crafting.unlock(player:get_player_name(), class.properties.crafting[i]) + end end local function sqdist(a, b) diff --git a/mods/ctf/ctf_classes/classes.lua b/mods/ctf/ctf_classes/classes.lua index 5142e63..5502488 100644 --- a/mods/ctf/ctf_classes/classes.lua +++ b/mods/ctf/ctf_classes/classes.lua @@ -96,5 +96,9 @@ ctf_classes.register("rocketeer", { "shooter_guns:smg", "shooter_guns:shotgun", }, + + crafting = { + "shooter_rocket:rocket" + }, }, }) diff --git a/mods/ctf/ctf_classes/mod.conf b/mods/ctf/ctf_classes/mod.conf index 4b3a279..ba549d8 100644 --- a/mods/ctf/ctf_classes/mod.conf +++ b/mods/ctf/ctf_classes/mod.conf @@ -1,3 +1,3 @@ name = ctf_classes -depends = ctf, ctf_flag, ctf_colors, ctf_map_core, ctf_bandages, physics, shooter, hpregen, give_initial_stuff, dropondie +depends = ctf, ctf_flag, ctf_colors, ctf_map_core, ctf_bandages, physics, shooter, hpregen, give_initial_stuff, dropondie, crafting description = Adds classes, including knight, shooter, and medic diff --git a/mods/ctf/ctf_crafting/init.lua b/mods/ctf/ctf_crafting/init.lua index 36fd84c..d4ef1de 100644 --- a/mods/ctf/ctf_crafting/init.lua +++ b/mods/ctf/ctf_crafting/init.lua @@ -11,6 +11,24 @@ local upgrades = { mese = "diamond", } +-- Rocket <== Gold ingot x16 + Coal lump x5 +crafting.register_recipe({ + type = "inv", + output = "shooter_rocket:rocket", + items = { "default:gold_ingot 16", "default:coal_lump 5" }, + always_known = false, + level = 1, +}) + +-- Rocket <== Mese x5 + Coal lump x5 +crafting.register_recipe({ + type = "inv", + output = "shooter_rocket:rocket", + items = { "default:mese 5", "default:coal_lump 5" }, + always_known = false, + level = 1, +}) + -- Swords for from, to in pairs(upgrades) do crafting.register_recipe({ diff --git a/mods/other/crafting b/mods/other/crafting index c6cd6ad..6072315 160000 --- a/mods/other/crafting +++ b/mods/other/crafting @@ -1 +1 @@ -Subproject commit c6cd6ad62d9f4076a22d985defc8a966a17f569d +Subproject commit 60723159bba3893e9750177b2d6a6f09e077bd72