From 733b41239a24da0a23733c9cfbf8927918b03373 Mon Sep 17 00:00:00 2001 From: Gerkiz Date: Sun, 22 Oct 2023 21:34:20 +0200 Subject: [PATCH] Towny and antigrief fix --- maps/scrap_towny_ffa/scrap_towny_ffa_layout.lua | 10 +++++++--- utils/antigrief.lua | 3 +-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/maps/scrap_towny_ffa/scrap_towny_ffa_layout.lua b/maps/scrap_towny_ffa/scrap_towny_ffa_layout.lua index 0d252c2ce..4367c1987 100644 --- a/maps/scrap_towny_ffa/scrap_towny_ffa_layout.lua +++ b/maps/scrap_towny_ffa/scrap_towny_ffa_layout.lua @@ -284,13 +284,17 @@ local function on_chunk_generated(event) for x = 0, 31, 1 do for y = 0, 31, 1 do position = {x = left_top_x + x, y = left_top_y + y} - local cave_ponds = get_perlin('cave_ponds', position, seed + seed) + local cave_ponds = get_perlin('cave_ponds', position, seed) + local bridges = get_perlin('cave_rivers', position, seed) - if cave_ponds > 0.02 and cave_ponds < 0.3 then + if cave_ponds > 0.1 and cave_ponds < 0.3 then if cave_ponds > 0.2 then surface.set_tiles({{name = 'water-shallow', position = position}}, true) - else + elseif cave_ponds > 0.1 and cave_ponds < 0.25 then surface.set_tiles({{name = 'water', position = position}}, true) + if cave_ponds > 0.1 and bridges > 0.15 then + surface.set_tiles({{name = 'water-shallow', position = position}}, true) + end end if math_random(1, 48) == 1 then surface.create_entity({name = 'fish', position = position, force = 'neutral'}) diff --git a/utils/antigrief.lua b/utils/antigrief.lua index 8a158f02e..aba8c6632 100644 --- a/utils/antigrief.lua +++ b/utils/antigrief.lua @@ -711,8 +711,7 @@ local function on_console_chat(event) if this.enable_jail_on_long_texts and not player.admin then if not this.players_warn_on_long_texts[player.index] then this.players_warn_on_long_texts[player.index] = 1 - local r = random(7200, 18000) - Task.set_timeout_in_ticks(r, clear_players_warn_on_long_texts, {player_index = player.index}) + Task.set_timeout_in_ticks(108000, clear_players_warn_on_long_texts, {player_index = player.index}) end local warnings = this.players_warn_on_long_texts[player.index] if warnings then