Compare commits

..

No commits in common. "28ce8e6c6377270a585b65df9e6f4e2037a69b65" and "b0b4052408821ef19c2cd9a817f372573b98c8a1" have entirely different histories.

2 changed files with 0 additions and 22 deletions

View file

@ -163,7 +163,6 @@ ctf_classes.register("rocketeer", {
-- Disallow rocketeers from capturing flags - they're intended to be support
can_capture = false,
max_hp = 15,
allow_rockets = true,
initial_stuff = {
"shooter_rocket:rocket_gun_loaded",
@ -172,7 +171,6 @@ ctf_classes.register("rocketeer", {
additional_item_blacklist = {
"shooter_rocket:rocket_gun",
"shooter_rocket:rocket"
},
allowed_guns = {

View file

@ -66,30 +66,10 @@ local function check_grapple(itemname)
})
end
local function check_rocket(itemname)
local def = minetest.registered_items[itemname]
local old_func = def.on_use
minetest.override_item(itemname, {
on_use = function(itemstack, user, ...)
if not ctf_classes.get(user).properties.allow_rockets then
minetest.chat_send_player(user:get_player_name(),
"You can't use that weapon! Change your class at base.")
return itemstack
end
return old_func(itemstack, user, ...)
end,
})
end
check_grapple("shooter_hook:grapple_gun_loaded")
check_grapple("shooter_hook:grapple_gun")
check_grapple("shooter_hook:grapple_hook")
check_rocket("shooter_rocket:rocket_gun_loaded")
check_rocket("shooter_rocket:rocket_gun")
-- Override grappling hook entity to check if player has flag before teleporting
local old_grapple_step = minetest.registered_entities["shooter_hook:hook"].on_step
minetest.registered_entities["shooter_hook:hook"].on_step = function(self, dtime, ...)