Skip to content

Commit

Permalink
Merge pull request #423 from ComfyFactory/towny
Browse files Browse the repository at this point in the history
Towny and antigrief fix
  • Loading branch information
Gerkiz authored Oct 22, 2023
2 parents 8bc0bb3 + 733b412 commit 4367fd4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 7 additions & 3 deletions maps/scrap_towny_ffa/scrap_towny_ffa_layout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
Expand Down
3 changes: 1 addition & 2 deletions utils/antigrief.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4367fd4

Please sign in to comment.