Skip to content

Commit

Permalink
Updated deprecated methods and fixed game_mode type
Browse files Browse the repository at this point in the history
  • Loading branch information
gtnardy committed Jul 27, 2023
1 parent 554a3da commit 1a8528b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Client/Index.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Package.Subscribe("Load", function()
end)

-- Toggles the Scoreboard
Client.Subscribe("KeyUp", function(key_name)
Input.Subscribe("KeyUp", function(key_name)
if (key_name == "Tab") then
if (Deathmatch.match_state == MATCH_STATES.POST_TIME) then return end

Expand All @@ -30,7 +30,7 @@ Client.Subscribe("KeyUp", function(key_name)
end)

-- Toggles the Scoreboard
Client.Subscribe("KeyDown", function(key_name)
Input.Subscribe("KeyDown", function(key_name)
if (key_name == "Tab") then
if (Deathmatch.match_state == MATCH_STATES.POST_TIME) then return end

Expand Down
43 changes: 28 additions & 15 deletions Package.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,37 @@
# package configurations
[package]
# package name
name = "Deathmatch"
# vault configurations
[meta]
# friendly name
title = "Deathmatch"
# contributors
author = "nanos™"
author = "nanos™"
# version
version = "1.4.0"
# image URL
image = "https://i.imgur.com/vW4rOb3.jpg"
# package type: 'script' (normal package), 'game-mode' (unique package - can only load one at a time) or 'loading-screen' (special package loaded in loading screen)
type = "script"
# whether to force the custom map Script to do not load
force_no_map_script = false
version = "1.5.0"

# game-mode configurations
[game_mode]
# whether to force the custom map package to do not load
force_no_map_package = false
# auto destroy all entities spawned by this package when it unloads
auto_cleanup = true
auto_cleanup = true
# whether to load all level entities on client - only enable it if your package needs to use level static meshes entities
load_level_entities = false
# the game version (major.minor) at the time this package was created, for granting compatibility between breaking changes
compatibility_version = "1.45"
# packages requirements
packages_requirements = [

]
# asset packs requirements
assets_requirements = [
"unreal-tournament-announcer",
"unreal-tournament-announcer",
]
# compatible maps - maps to be highlighted when starting a new game through main menu
compatible_maps = [

]

# game-mode custom settings configurations
# those settings can be configured through new game menu, Config.toml and server command line
# and can be accessed through Server.GetCustomSettings() method from any package
[custom_settings]
# my_toggle_example = { label = "awesome toggle", type = "boolean", description = "press this!", default = true }
8 changes: 4 additions & 4 deletions Server/Index.lua
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ function UpdateMatchState(new_state)
if (new_state == MATCH_STATES.WARM_UP) then
Deathmatch.remaining_time = DeathmatchSettings.warmup_time

Package.Log("[Deathmatch] Warm-up!")
Console.Log("[Deathmatch] Warm-up!")
Server.BroadcastChatMessage("<grey>Warm-up!</>")

CleanUp()
Expand All @@ -531,7 +531,7 @@ function UpdateMatchState(new_state)

Events.BroadcastRemote("SpawnSound", Vector(), "unreal-tournament-announcer::A_Prepare", true, 1, 1)

Package.Log("[Deathmatch] Preparing!")
Console.Log("[Deathmatch] Preparing!")
Server.BroadcastChatMessage("<grey>Preparing!</>")

CleanUp()
Expand All @@ -548,7 +548,7 @@ function UpdateMatchState(new_state)

Events.BroadcastRemote("SpawnSound", Vector(), "unreal-tournament-announcer::A_Proceed", true, 1, 1)

Package.Log("[Deathmatch] Round started!")
Console.Log("[Deathmatch] Round started!")
Server.BroadcastChatMessage("<grey>Round Started!</>")

-- Unfreeze all characters
Expand Down Expand Up @@ -591,7 +591,7 @@ function UpdateMatchState(new_state)

Server.BroadcastChatMessage("<grey>=============================</>")

Package.Log("[Deathmatch] Post time!")
Console.Log("[Deathmatch] Post time!")
Server.BroadcastChatMessage("<grey>Post time!</>")
end

Expand Down

0 comments on commit 1a8528b

Please sign in to comment.