Add rocket crafting

This commit is contained in:
rubenwardy 2020-03-14 22:48:50 +00:00
parent 43b4b761cc
commit 59d199a7a5
5 changed files with 29 additions and 2 deletions

View file

@ -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)

View file

@ -96,5 +96,9 @@ ctf_classes.register("rocketeer", {
"shooter_guns:smg",
"shooter_guns:shotgun",
},
crafting = {
"shooter_rocket:rocket"
},
},
})

View file

@ -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