Compare commits

...

22 commits

Author SHA1 Message Date
philipmi
28ce8e6c63 Merge branch 'olliy1or-patch-1' of https://github.com/olliy1or/capturetheflag
 Conflicts:
	mods/ctf/ctf_classes/classes.lua
2021-05-24 22:06:21 +02:00
olliy
3279f45c6c
Update mods/ctf/ctf_classes/ranged.lua
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-04-30 22:08:03 +05:00
olliy
d778b3a622
Delete mods/other/disallowed_names directory 2021-04-30 01:23:37 +05:00
olliy
b2ea5c6c8a
Update classes.lua 2021-04-30 01:20:51 +05:00
olliy
bdfc9d5ecd
Update ranged.lua 2021-04-30 01:17:13 +05:00
olliy
9c1339f6d7
Merge pull request #3 from MT-CTF/master
update
2021-04-30 01:01:20 +05:00
olliy
a9806b593e
Merge pull request #2 from MT-CTF/master
update
2021-04-20 19:24:20 +05:00
olliy
1225504258
Merge pull request #1 from MT-CTF/master
update
2021-04-01 15:00:47 +05:00
olliy
741e7d2bdc
Update mods/other/disallowed_names/init.lua
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-01-31 13:26:40 +05:00
olliy
d591aff727
Update mods/other/disallowed_names/init.lua
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-01-31 13:26:24 +05:00
olliy
0f41ee3fa2
Update mods/other/disallowed_names/license.txt
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-01-31 13:24:15 +05:00
olliy
9c8de618a2
Update mods/other/disallowed_names/init.lua
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-01-31 13:23:55 +05:00
olliy
5d82a2d813
Update mods/other/disallowed_names/init.lua
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-01-31 13:23:31 +05:00
olliy
c076f5fb4c
Update mods/other/disallowed_names/init.lua
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-01-31 13:23:16 +05:00
olliy
7b4a9ee146
Update mods/other/disallowed_names/init.lua
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-01-31 13:22:51 +05:00
olliy
03d05ea77f
Update mods/other/disallowed_names/init.lua
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-01-31 13:22:15 +05:00
olliy
932b471f36
Update mods/other/disallowed_names/init.lua
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-01-31 13:20:50 +05:00
olliy
8a65f94b81
Update mods/other/disallowed_names/init.lua
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-01-31 13:19:54 +05:00
olliy
c35bd98e34
Update mods/other/disallowed_names/init.lua
Co-authored-by: Avyukt More <65779812+moreavy@users.noreply.github.com>
2021-01-31 13:18:14 +05:00
olliy
5abb26cb28
Update mods/other/disallowed_names/init.lua
Co-authored-by: Apelta <54854228+TSafa-23@users.noreply.github.com>
2021-01-30 21:21:58 +05:00
olliy
9bc4491f2c
Update init.lua 2021-01-30 18:09:22 +05:00
olliy
e91b7c0521
Don't allow bad names
This mod stops people from using bad usernames and allows people with ban priv add and remove names from ingame
2021-01-30 17:58:19 +05:00
2 changed files with 22 additions and 0 deletions

View file

@ -163,6 +163,7 @@ 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",
@ -171,6 +172,7 @@ ctf_classes.register("rocketeer", {
additional_item_blacklist = {
"shooter_rocket:rocket_gun",
"shooter_rocket:rocket"
},
allowed_guns = {

View file

@ -66,10 +66,30 @@ 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, ...)