Skip to content

Commit c8e82cf

Browse files
committed
updated deprecated methods
1 parent fcd0da0 commit c8e82cf

File tree

3 files changed

+29
-20
lines changed

3 files changed

+29
-20
lines changed

Client/Index.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Events.Subscribe("UpdateMatchState", function(new_state, remaining_time, total_p
202202
if (Halloween.current_role == 0) then
203203
HUD:CallEvent("UpdatePumpkinsFound", total_pumpkins, pumpkins_found)
204204

205-
-- Updates amount of knights and survivors
205+
-- Updates amount of knights and survivors
206206
for k, p in pairs(Player.GetPairs()) do
207207
local role = p:GetValue("Role")
208208
local is_alive = p:GetValue("IsAlive")
@@ -343,7 +343,7 @@ Timer.SetInterval(function()
343343
if (not Halloween.is_trapdoor_opened) then
344344
for k, p in pairs(Prop) do
345345
local distance = local_character:GetLocation():Distance(p:GetLocation())
346-
if (p:GetAssetName() == "halloween-city-park::SM_Pumpkin_Lit" and distance < 5000) then
346+
if (p:GetMesh() == "halloween-city-park::SM_Pumpkin_Lit" and distance < 5000) then
347347
HUD:CallEvent("TriggerRadar")
348348

349349
local pitch = 1

Package.toml

+21-12
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
# package configurations
2-
[package]
3-
# package name
4-
name = "Halloween"
1+
# vault configurations
2+
[meta]
3+
# friendly name
4+
title = "Halloween"
55
# contributors
66
author = "nanos™"
77
# version
8-
version = "1.3.4"
9-
# image URL
10-
image = "https://i.imgur.com/WJDACbZ.jpg"
11-
# package type: 'script' (normal package), 'game-mode' (unique package - can only load one at a time), 'library' (doesn't start a Lua VM) or 'loading-screen' (special package for loading screen)
12-
type = "game-mode"
13-
# whether to force the custom map script to do not load
14-
force_no_map_script = false
8+
version = "1.3.5"
9+
10+
# game-mode configurations
11+
[game_mode]
12+
# whether to force the custom map package to do not load
13+
force_no_map_package = false
1514
# auto destroy all entities spawned by this package when it unloads
1615
auto_cleanup = true
16+
# whether to load all level entities on client - only enable it if your package needs to use level static meshes entities
17+
load_level_entities = false
18+
# the game version (major.minor) at the time this package was created, for granting compatibility between breaking changes
19+
compatibility_version = "1.62"
1720
# packages requirements
1821
packages_requirements = [
19-
22+
2023
]
2124
# asset packs requirements
2225
assets_requirements = [
@@ -26,3 +29,9 @@
2629
compatible_maps = [
2730
"halloween-city-park::Halloween_CityPark",
2831
]
32+
33+
# game-mode custom settings configurations
34+
# those settings can be configured through new game menu, Config.toml and server command line
35+
# and can be accessed through Server.GetCustomSettings() method from any package
36+
[custom_settings]
37+
# my_toggle = { label = "awesome toggle", type = "boolean", description = "press this!", default = true }

Server/Index.lua

+6-6
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ Player.Subscribe("Destroy", function (player)
398398
end
399399
end)
400400

401-
Character.Subscribe("WeaponAimModeChanged", function(character, old_state, new_state)
401+
Character.Subscribe("WeaponAimModeChange", function(character, old_state, new_state)
402402
local player = character:GetPlayer()
403403
if (not player) then return end
404404

@@ -554,11 +554,11 @@ function FinishRound(role_winner)
554554
end
555555

556556
if (role_winner == ROLES.SURVIVOR) then
557-
Package.Log("[Halloween] Round finished! Survivors win!")
557+
Console.Log("[Halloween] Round finished! Survivors win!")
558558
Server.BroadcastChatMessage("Round finished! <blue>Survivors</> Win!")
559559
Events.BroadcastRemote("SurvivorWins", player_mvp:GetName(), player_most_damage:GetName() .. " - " .. value_most_damage, player_most_pumpkins:GetName() .. " - " .. value_most_pumpkins)
560560
else
561-
Package.Log("[Halloween] Round finished! Knights win!")
561+
Console.Log("[Halloween] Round finished! Knights win!")
562562
Server.BroadcastChatMessage("Round finished! <red>Horseless Headless Horseman</> Win!")
563563
Events.BroadcastRemote("KnightWins", player_mvp:GetName(), player_most_damage:GetName() .. " - " .. value_most_damage, player_most_pumpkins:GetName() .. " - " .. value_most_pumpkins)
564564
end
@@ -714,10 +714,10 @@ function UpdateMatchState(new_state)
714714

715715
HalloweenSettings.entities_spawn()
716716

717-
Package.Log("[Halloween] Warm-up! We have " .. tostring(knight_count) .. " Knights and " .. tostring(player_count - knight_count) .. " Survivors!")
717+
Console.Log("[Halloween] Warm-up! We have " .. tostring(knight_count) .. " Knights and " .. tostring(player_count - knight_count) .. " Survivors!")
718718

719719
elseif (new_state == MATCH_STATES.IN_PROGRESS) then
720-
Package.Log("[Halloween] Round started!")
720+
Console.Log("[Halloween] Round started!")
721721
Server.BroadcastChatMessage("<grey>Round Started!</>")
722722

723723
Halloween.current_knights_special_cooldown = 15
@@ -730,7 +730,7 @@ function UpdateMatchState(new_state)
730730
Halloween.remaining_time = HalloweenSettings.match_time
731731

732732
elseif (new_state == MATCH_STATES.WAITING_PLAYERS) then
733-
Package.Log("[Halloween] Waiting for players to start the match... Type 'start' here to force start!")
733+
Console.Log("[Halloween] Waiting for players to start the match... Type 'start' here to force start!")
734734
Server.BroadcastChatMessage("<grey>Waiting for players (" .. Player.GetCount() .. "/" .. HalloweenSettings.players_to_start .. ").</>")
735735

736736
ClearServer()

0 commit comments

Comments
 (0)