From 93bc1c347737b436ffa54837dea27dd52af03292 Mon Sep 17 00:00:00 2001 From: Gerkiz Date: Thu, 30 May 2024 10:46:27 +0200 Subject: [PATCH] Luacheck fix --- maps/mountain_fortress_v3/ic/functions.lua | 1 - maps/mountain_fortress_v3/stateful/table.lua | 75 -------------------- 2 files changed, 76 deletions(-) diff --git a/maps/mountain_fortress_v3/ic/functions.lua b/maps/mountain_fortress_v3/ic/functions.lua index 45b2d46f..b8aa8f4d 100644 --- a/maps/mountain_fortress_v3/ic/functions.lua +++ b/maps/mountain_fortress_v3/ic/functions.lua @@ -1,4 +1,3 @@ -local Utils = require 'utils.core' local Color = require 'utils.color_presets' local Alert = require 'utils.alert' local Task = require 'utils.task_token' diff --git a/maps/mountain_fortress_v3/stateful/table.lua b/maps/mountain_fortress_v3/stateful/table.lua index 076e3204..72d3b9fd 100644 --- a/maps/mountain_fortress_v3/stateful/table.lua +++ b/maps/mountain_fortress_v3/stateful/table.lua @@ -1396,81 +1396,6 @@ local apply_settings_token = end ) -local function apply_startup_dev_settings(settings) - local current_date = { - year = 2023, - month = 10, - day = 30 - } - if not current_date then - return - end - - local current_time = 1600509719 - if not current_time then - return - end - - current_date = round(Utils.convert_date(current_date.year, current_date.month, current_date.day)) - - local server_name_matches = true - - settings = settings or {} - local stored_date = this.current_date - if not stored_date then - return - end - local stored_date_raw = Server.get_current_date(false, true, stored_date) - local converted_stored_date = round(Utils.convert_date(stored_date_raw.year, stored_date_raw.month, stored_date_raw.day)) - - local time_to_reset = (current_date - converted_stored_date) - this.time_to_reset = this.reset_after - time_to_reset - if time_to_reset and time_to_reset > this.reset_after then - settings.current_date = current_time - settings.test_mode = false - settings.rounds_survived = 0 - settings.buffs = {} - this.buffs = {} - this.buffs_collected = {} - this.rounds_survived = 0 - this.season = this.season + 1 - this.current_date = current_time - settings.season = this.season - this.time_to_reset = this.reset_after - local message = ({'stateful.reset'}) - local message_discord = ({'stateful.reset_discord'}) - Task.set_timeout_in_ticks_text(60, {text = message}) - Server.to_discord_embed(message_discord, true) - - if server_name_matches then - Server.set_data(dataset, dataset_key, settings) - else - Server.set_data(dataset, dataset_key_dev, settings) - end - end -end - ----@diagnostic disable-next-line: unused-local -local apply_settings_dev_token = - Task.register( - function(data) - local settings = data and data.value or nil - local current_time = 1700509719 - if not current_time then - return - end - - this.current_date = settings.current_date - this.buffs = settings.buffs - - apply_startup_dev_settings(settings) - - this.rounds_survived = settings.rounds_survived - - Public.increase_enemy_damage_and_health() - end -) - local function grant_non_limit_reached_buff() local all_buffs = get_random_buff(true) local starting_items = Public.get_func('starting_items')