Skip to content

Commit

Permalink
Add a HUD event to allow new players to understand
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtechtroid authored Jun 25, 2024
1 parent 352274a commit 09e51b4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions mods/ctf/ctf_modes/ctf_mode_classes/classes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ ctf_melee.simple_register_sword("ctf_mode_classes:knight_sword", {
if not ctl.sneak and not ctl.aux1 then return end
end
if not ctf_modebase.match_started then
local uname = user:get_player_name()
hud_events.new(uname, {
quick = true,
text = "You cannot activate special ability during build time!",
color = "warning",
})
return
end
local pname = user:get_player_name()
Expand Down Expand Up @@ -219,6 +225,12 @@ ctf_ranged.simple_register_gun("ctf_mode_classes:ranged_rifle", {
return
end
if not ctf_modebase.match_started then
local uname = user:get_player_name()
hud_events.new(uname, {
quick = true,
text = "You cannot activate special ability during build time!",
color = "warning",
})
return
end
if itemstack:get_wear() == 0 then
Expand Down Expand Up @@ -302,6 +314,12 @@ ctf_healing.register_bandage("ctf_mode_classes:support_bandage", {
if not ctl.sneak and not ctl.aux1 then return end
end
if not ctf_modebase.match_started then
local uname = user:get_player_name()
hud_events.new(uname, {
quick = true,
text = "You cannot activate special ability during build time!",
color = "warning",
})
return
end
local pname = user:get_player_name()
Expand Down

0 comments on commit 09e51b4

Please sign in to comment.