From 57434f4b68a8a092d96cf2991f9064d00ded3226 Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Wed, 31 Mar 2021 00:43:57 +0100
Subject: [PATCH 01/27] Added spectate control
---
modules/control/spectate.lua | 146 +++++++++++++++++++++++++++++++++++
1 file changed, 146 insertions(+)
create mode 100644 modules/control/spectate.lua
diff --git a/modules/control/spectate.lua b/modules/control/spectate.lua
new file mode 100644
index 00000000..25354854
--- /dev/null
+++ b/modules/control/spectate.lua
@@ -0,0 +1,146 @@
+
+local Event = require 'utils.event' --- @dep utils.event
+local Global = require 'utils.global' --- @dep utils.global
+local Gui = require 'expcore.gui' --- @dep expcore.gui
+
+----- Locals -----
+local follow_label -- Gui constructor
+local following = {}
+local spectating = {}
+local Public = {}
+
+----- Global data -----
+Global.register({
+ following = following,
+ spectating = spectating
+}, function(tbl)
+ following = tbl.following
+ spectating = tbl.spectating
+end)
+
+----- Public Functions -----
+
+--- Puts a player into spectator while maintaining an association to their character
+-- @tparam LuaPlayer player The player that will be placed into spectator
+-- @treturn boolean Returns false if the player was already in spectator
+function Public.start_spectate(player)
+ assert(player and player.valid, 'Invalid player given to follower')
+ if spectating[player.index] or not player.character then return false end
+ local character = player.character
+ player.set_controller{ type = defines.controllers.spectator }
+ player.associate_character(character)
+ spectating[player.index] = character
+ return true
+end
+
+--- Return a player from spectator back to their character, if the character was killed then respawn the character
+-- @tparam LuaPlayer player The player that will leave spectator
+function Public.stop_spectate(player)
+ assert(player and player.valid, 'Invalid player given to follower')
+ local character = spectating[player.index]
+ spectating[player.index] = nil
+ if character and character.valid then
+ player.teleport(character.position, character.surface)
+ player.set_controller{ type = defines.controllers.character, character = character }
+ else
+ player.ticks_to_respawn = 300
+ end
+end
+
+--- Puts a player into spectator and follows an entity as it moves
+-- @tparam LuaPlayer player The player that will follow the entity
+-- @tparam ?LuaPlayer|LuaEntity entity The player or entity that will be followed
+function Public.start_follow(player, entity)
+ assert(player and player.valid, 'Invalid player given to follower')
+ assert(entity and entity.valid, 'Invalid entity given to follower')
+ local spectate = Public.start_spectate(player)
+
+ player.close_map()
+ follow_label(player.gui.screen, entity)
+ player.teleport(entity.position, entity.surface)
+ following[player.index] = { player, entity, entity.position, spectate }
+end
+
+--- Stops a player from following their current entity, can also return a player from spectate
+-- @tparam LuaPlayer player The player that you want to stop following their entity
+function Public.stop_follow(player)
+ assert(player and player.valid, 'Invalid player given to follower')
+ if following[player.index] and following[player.index][4] then Public.stop_spectate(player) end
+
+ Gui.destroy_if_valid(player.gui.screen[follow_label.name])
+ following[player.index] = nil
+end
+
+--- Used to stop all players following an entity or player
+function Public.stop_all()
+ for key, data in pairs(following) do
+ Public.stop_follow(data[1])
+ end
+end
+
+----- Gui -----
+
+--- Label used to show that the player is following, also used to allow esc to stop following
+-- @element follow_label
+follow_label =
+Gui.element(function(event_trigger, parent, target)
+ Gui.destroy_if_valid(parent[event_trigger])
+
+ local label = parent.add{
+ name = event_trigger,
+ type = 'label',
+ style = 'heading_1_label',
+ caption = 'Following '..target.name..'.\nClick here or press esc to stop following.'
+ }
+
+ local player = Gui.get_player_from_element(parent)
+ local res = player.display_resolution
+ label.location = {0, res.height-150}
+ label.style.width = res.width
+ label.style.horizontal_align = 'center'
+ player.opened = label
+
+ return label
+end)
+:on_close(Public.stop_follow)
+:on_click(Public.stop_follow)
+
+----- Events -----
+
+--- Updates the location of the player as well as doing some sanity checks
+-- @tparam LuaPlayer player The player to update the position of
+-- @tparam ?LuaPlayer|LuaEntity entity The player or entity being followed
+local function update_player_location(player, entity, old_position)
+ if player.character or not entity.valid then
+ Public.stop_follow(player)
+ elseif player.position.x ~= old_position.x or player.position.y ~= old_position.y then
+ Public.stop_follow(player)
+ else
+ player.teleport(entity.position, entity.surface)
+ end
+end
+
+--- Updates the locations of all players currently following something
+local function update_all()
+ for _, data in pairs(following) do
+ update_player_location(data[1], data[2], data[3])
+ data[3] = data[1].position
+ end
+end
+
+-- Update the location of all players each tick
+Event.add(defines.events.on_tick, update_all)
+
+-- Check for player leaving
+Event.add(defines.events.on_player_left_game, function(event)
+ local player = game.players[event.player_index]
+ Public.stop_follow(player)
+ for _, data in pairs(following) do
+ if data[2] == player then
+ Public.stop_follow(data[1])
+ end
+ end
+end)
+
+----- Module Return -----
+return Public
\ No newline at end of file
From f56eb4c145e73c07162165cfd16fb09d976a9b78 Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Wed, 31 Mar 2021 01:06:57 +0100
Subject: [PATCH 02/27] Added spectate commands
---
config/_file_loader.lua | 1 +
config/expcore/roles.lua | 4 ++++
locale/en/commands.cfg | 5 ++++-
modules/commands/spectate.lua | 33 +++++++++++++++++++++++++++++++++
modules/control/spectate.lua | 16 ++++++++++++++++
5 files changed, 58 insertions(+), 1 deletion(-)
create mode 100644 modules/commands/spectate.lua
diff --git a/config/_file_loader.lua b/config/_file_loader.lua
index 16a135af..f42a33d7 100644
--- a/config/_file_loader.lua
+++ b/config/_file_loader.lua
@@ -29,6 +29,7 @@ return {
'modules.commands.home',
'modules.commands.connect',
'modules.commands.last-location',
+ 'modules.commands.spectate',
--- Addons
'modules.addons.chat-popups',
diff --git a/config/expcore/roles.lua b/config/expcore/roles.lua
index 9b826202..62932b07 100644
--- a/config/expcore/roles.lua
+++ b/config/expcore/roles.lua
@@ -102,6 +102,8 @@ Roles.new_role('Trainee','TrMod')
'command/unjail',
'command/kick',
'command/ban',
+ 'command/spectate',
+ 'command/follow',
}
--- Trusted Roles
@@ -115,6 +117,8 @@ Roles.new_role('Board Member','Board')
:allow{
'command/goto',
'command/repair',
+ 'command/spectate',
+ 'command/follow',
}
Roles.new_role('Senior Backer','Backer')
diff --git a/locale/en/commands.cfg b/locale/en/commands.cfg
index dea7b935..c2f91450 100644
--- a/locale/en/commands.cfg
+++ b/locale/en/commands.cfg
@@ -82,4 +82,7 @@ offline=You cannot connect as the server is currently offline: __1__
none-matching=No servers were found with that name, if you used an address please append true to the end of your command.
[expcom-lastlocation]
-response=Last location of __1__ was [gps=__2__,__3__]
\ No newline at end of file
+response=Last location of __1__ was [gps=__2__,__3__]
+
+[expcom-spectate]
+follow-self=You can not follow your self
\ No newline at end of file
diff --git a/modules/commands/spectate.lua b/modules/commands/spectate.lua
new file mode 100644
index 00000000..51f28bd3
--- /dev/null
+++ b/modules/commands/spectate.lua
@@ -0,0 +1,33 @@
+--[[-- Commands Module - Spectate
+ - Adds a commands relating to spectate and follow
+ @commands Spectate
+]]
+
+local Spectate = require 'modules.control.spectate' --- @dep modules.control.spectate
+local Commands = require 'expcore.commands' --- @dep expcore.commands
+require 'config.expcore.command_general_parse'
+
+--- Toggles spectator mode for the caller
+-- @command spectate
+Commands.new_command('spectate', 'Toggles spectator mode')
+:register(function(player)
+ if Spectate.is_spectating(player) then
+ Spectate.stop_spectate(player)
+ else
+ Spectate.start_spectate(player)
+ end
+end)
+
+--- Enters follow mode for the caller, following the given player.
+-- @command follow
+-- @tparam LuaPlayer player The player that will be followed
+Commands.new_command('follow', 'Start following a player in spectator')
+:add_alias('f')
+:add_param('player', false, 'player-online')
+:register(function(player, action_player)
+ if player == action_player then
+ return Commands.error{'expcom-spectate.follow-self'}
+ else
+ Spectate.start_follow(player, action_player)
+ end
+end)
\ No newline at end of file
diff --git a/modules/control/spectate.lua b/modules/control/spectate.lua
index 25354854..d9320ae7 100644
--- a/modules/control/spectate.lua
+++ b/modules/control/spectate.lua
@@ -20,6 +20,14 @@ end)
----- Public Functions -----
+--- Test if a player is in spectator mode
+-- @tparam LuaPlayer player The player to test the controller type of
+-- @treturn boolean True if the player is in spectator mode
+function Public.is_spectating(player)
+ assert(player and player.valid, 'Invalid player given to follower')
+ return player.controller_type == defines.controllers.spectator
+end
+
--- Puts a player into spectator while maintaining an association to their character
-- @tparam LuaPlayer player The player that will be placed into spectator
-- @treturn boolean Returns false if the player was already in spectator
@@ -47,6 +55,14 @@ function Public.stop_spectate(player)
end
end
+--- Test if a player is in follow mode
+-- @tparam LuaPlayer player The player to test the follow mode of
+-- @treturn boolean True if the player is in follow mode
+function Public.is_following(player)
+ assert(player and player.valid, 'Invalid player given to follower')
+ return following[player.index] ~= nil
+end
+
--- Puts a player into spectator and follows an entity as it moves
-- @tparam LuaPlayer player The player that will follow the entity
-- @tparam ?LuaPlayer|LuaEntity entity The player or entity that will be followed
From 0c859c228b7bd3fb50b02053e2899b0f91e611de Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Mon, 5 Apr 2021 22:21:46 +0100
Subject: [PATCH 03/27] Added report jail
---
config/_file_loader.lua | 1 +
locale/en/addons.cfg | 5 ++++-
modules/addons/report-jail.lua | 25 +++++++++++++++++++++++++
3 files changed, 30 insertions(+), 1 deletion(-)
create mode 100644 modules/addons/report-jail.lua
diff --git a/config/_file_loader.lua b/config/_file_loader.lua
index 16a135af..c09715d1 100644
--- a/config/_file_loader.lua
+++ b/config/_file_loader.lua
@@ -43,6 +43,7 @@ return {
'modules.addons.discord-alerts',
'modules.addons.chat-reply',
'modules.addons.tree-decon',
+ 'modules.addons.report-jail',
--- Data
'modules.data.statistics',
diff --git a/locale/en/addons.cfg b/locale/en/addons.cfg
index 95defd53..9acd4abc 100644
--- a/locale/en/addons.cfg
+++ b/locale/en/addons.cfg
@@ -75,4 +75,7 @@ get-mead-1= Filling the drinking horn
get-mead-2= Skål!
get-beer-1= 🍺 Pouring A Glass 🍺
get-beer-2= 🍻 Chears Mate 🍻
-verify=Please return to our discord and type r!verify __1__
\ No newline at end of file
+verify=Please return to our discord and type r!verify __1__
+
+[report-jail]
+jail=__1__ was jailed because they have been reported too many times.
\ No newline at end of file
diff --git a/modules/addons/report-jail.lua b/modules/addons/report-jail.lua
new file mode 100644
index 00000000..b98c3ce0
--- /dev/null
+++ b/modules/addons/report-jail.lua
@@ -0,0 +1,25 @@
+--- When a player is reported by players with a greater combined delta playtime, the player is automatically jailed
+-- @addon report-jail
+
+local Event = require 'utils.event' ---@dep utils.event
+local Jail = require 'modules.control.jail' ---@dep modules.control.jail
+local Reports = require 'modules.control.reports' --- @dep modules.control.reports
+local format_chat_player_name = _C.format_chat_player_name --- @dep expcore.common
+
+--- Returns the playtime of the reporter, used to sum the playtime of all reporters
+local function reporter_playtime(_, by_player_name, _)
+ local player = game.get_player(by_player_name)
+ if player == nil then return 0 end
+ return player.online_time
+end
+
+--- Tests the combined playtime of all reporters against the reported player
+Event.add(Reports.events.on_player_reported, function(event)
+ local player = game.get_player(event.player_index)
+ local total_playtime = Reports.count_reports(player, reporter_playtime)
+ if total_playtime < player.online_time*1.5 then return end
+ -- Combined playtime is greater than 150% of the reported's playtime
+ local player_name_color = format_chat_player_name(player)
+ Jail.jail_player(player, '', 'Reported by too many players, please wait for a moderator.')
+ game.print{'report-jail.jail', player_name_color}
+end)
\ No newline at end of file
From 5328a5bb1ca8d6bb5cde47fb28214a199f9319df Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Mon, 5 Apr 2021 22:41:04 +0100
Subject: [PATCH 04/27] Fixed double report message to admins
---
modules/commands/reports.lua | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/modules/commands/reports.lua b/modules/commands/reports.lua
index 00aff1b2..f5923066 100644
--- a/modules/commands/reports.lua
+++ b/modules/commands/reports.lua
@@ -9,6 +9,15 @@ local Reports = require 'modules.control.reports' --- @dep modules.control.repor
local format_chat_player_name = _C.format_chat_player_name--- @dep expcore.common
require 'config.expcore.command_general_parse'
+--- Print a message to all players who match the value of admin
+local function print_to_players(admin, message)
+ for _, player in ipairs(game.connected_players) do
+ if player.admin == admin then
+ player.print(message)
+ end
+ end
+end
+
--- Reports a player and notifies moderators
-- @command report
-- @tparam LuaPlayer player the player to report, some players are immune
@@ -30,8 +39,8 @@ end)
local action_player_name_color = format_chat_player_name(action_player)
local by_player_name_color = format_chat_player_name(player)
if Reports.report_player(action_player, player.name, reason) then
- game.print{'expcom-report.non-admin', action_player_name_color, reason}
- Roles.print_to_roles_higher('Trainee', {'expcom-report.admin', action_player_name_color, by_player_name_color, reason})
+ print_to_players(false, {'expcom-report.non-admin', action_player_name_color, reason})
+ print_to_players(true, {'expcom-report.admin', action_player_name_color, by_player_name_color, reason})
else
return Commands.error{'expcom-report.already-reported'}
end
From 3c718fa081771ef590e3877176d80d513ded2a40 Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Mon, 5 Apr 2021 22:50:16 +0100
Subject: [PATCH 05/27] Fixed empty reasons
---
modules/control/reports.lua | 2 +-
modules/gui/player-list.lua | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/control/reports.lua b/modules/control/reports.lua
index ea2a710f..354c8235 100644
--- a/modules/control/reports.lua
+++ b/modules/control/reports.lua
@@ -132,7 +132,7 @@ function Reports.report_player(player, by_player_name, reason)
if not player then return end
local player_name = player.name
- reason = reason or 'Non given.'
+ if reason == nil or not reason:find("/S") then reason = 'Non given' end
local reports = user_reports[player_name]
if not reports then
diff --git a/modules/gui/player-list.lua b/modules/gui/player-list.lua
index f0923073..8d273a5f 100644
--- a/modules/gui/player-list.lua
+++ b/modules/gui/player-list.lua
@@ -72,9 +72,10 @@ Gui.element{
}
:style(Gui.sprite_style(30, -1, { left_margin = -2, right_margin = -1 }))
:on_click(function(player, element)
- local reason = element.parent.entry.text or 'Non Given'
+ local reason = element.parent.entry.text
local action_name = SelectedAction:get(player)
local reason_callback = config.buttons[action_name].reason_callback
+ if reason == nil or not reason:find("/S") then reason = 'no reason given' end
reason_callback(player, reason)
SelectedPlayer:remove(player)
SelectedAction:remove(player)
From 93a446747bed210aa83cbf0a203cd98a3a2211b2 Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Mon, 5 Apr 2021 22:55:25 +0100
Subject: [PATCH 06/27] Fixed self reporting
---
config/gui/player_list_actions.lua | 1 +
locale/en/commands.cfg | 1 +
modules/commands/reports.lua | 2 ++
3 files changed, 4 insertions(+)
diff --git a/config/gui/player_list_actions.lua b/config/gui/player_list_actions.lua
index 1464a1d3..411d2395 100644
--- a/config/gui/player_list_actions.lua
+++ b/config/gui/player_list_actions.lua
@@ -173,6 +173,7 @@ return {
},
['command/report'] = {
auth=function(player,selected_player)
+ if player == selected_player then return false end
if not Roles.player_allowed(player,'command/give-warning') then
return not Roles.player_has_flag(selected_player,'report-immune')
end
diff --git a/locale/en/commands.cfg b/locale/en/commands.cfg
index dea7b935..1a053c7e 100644
--- a/locale/en/commands.cfg
+++ b/locale/en/commands.cfg
@@ -29,6 +29,7 @@ not-jailed=__1__ is not currently in jail.
[expcom-report]
player-immune=This player can not be reported.
+self-report=You can not report your self.
non-admin=__1__ was reported for __2__.
admin=__1__ was reported by __2__ for __3__.
already-reported=You can only report a player once, you can ask a moderator to clear this report.
diff --git a/modules/commands/reports.lua b/modules/commands/reports.lua
index f5923066..6609189e 100644
--- a/modules/commands/reports.lua
+++ b/modules/commands/reports.lua
@@ -28,6 +28,8 @@ Commands.new_command('report', 'Reports a player and notifies moderators')
if not input then return end
if Roles.player_has_flag(input, 'report-immune') then
return reject{'expcom-report.player-immune'}
+ elseif player == input then
+ return reject{'expcom-report.self-report'}
else
return input
end
From 91bcda6d487b9827381480723bdf329edcfe1d6c Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Tue, 6 Apr 2021 01:22:31 +0100
Subject: [PATCH 07/27] Added afk kick
---
config/_file_loader.lua | 1 +
config/afk_kick.lua | 9 +++++
modules/addons/afk-kick.lua | 66 +++++++++++++++++++++++++++++++++++++
3 files changed, 76 insertions(+)
create mode 100644 config/afk_kick.lua
create mode 100644 modules/addons/afk-kick.lua
diff --git a/config/_file_loader.lua b/config/_file_loader.lua
index 16a135af..ab25db07 100644
--- a/config/_file_loader.lua
+++ b/config/_file_loader.lua
@@ -43,6 +43,7 @@ return {
'modules.addons.discord-alerts',
'modules.addons.chat-reply',
'modules.addons.tree-decon',
+ 'modules.addons.afk-kick',
--- Data
'modules.data.statistics',
diff --git a/config/afk_kick.lua b/config/afk_kick.lua
new file mode 100644
index 00000000..800b9730
--- /dev/null
+++ b/config/afk_kick.lua
@@ -0,0 +1,9 @@
+return {
+ admin_as_active = true, --- @setting admin_as_active When true admins will be treated as active regardless of afk time
+ trust_as_active = true, --- @setting trust_as_active When true trusted players (by playtime) will be treated as active regardless of afk time
+ active_role = 'Veteran', --- @setting active_role When not nil a player with this role will be treated as active regardless of afk time
+ afk_time = 3600*10, --- @setting afk_time The time in ticks that must pass for a player to be considered afk
+ kick_time = 3600*30, --- @setting kick_time The time in ticks that must pass without any active players for all players to be kicked
+ trust_time = 3600*60*10, --- @setting trust_time The time in ticks that a player must be online for to count as trusted
+ update_time = 3600*30, --- @setting update_time How often in ticks the script check for active players
+}
\ No newline at end of file
diff --git a/modules/addons/afk-kick.lua b/modules/addons/afk-kick.lua
new file mode 100644
index 00000000..578e57b8
--- /dev/null
+++ b/modules/addons/afk-kick.lua
@@ -0,0 +1,66 @@
+--- Kicks players when all players on the server are afk
+-- @addon afk-kick
+
+local Event = require 'utils.event' --- @dep utils.event
+local Global = require 'utils.global' --- @dep utils.global
+local config = require 'config.afk_kick' --- @dep config.afk_kick
+local Async = require 'expcore.async' --- @dep expcore.async
+
+--- Optional roles require
+local Roles
+if config.active_role then
+ Roles = require 'expcore.roles'
+end
+
+--- Globals
+local primitives = { last_active = 0 }
+Global.register(primitives, function(tbl)
+ primitives = tbl
+end)
+
+--- Kicks an afk player, used to give to for gui to show
+local kick_player =
+Async.register(function(player)
+ if game.tick - primitives.last_active < config.kick_time then return end -- Safety Catch
+ game.kick_player(player, 'Afk while no active players on the server')
+end)
+
+--- Check for an active player every 5 minutes
+Event.on_nth_tick(config.update_time, function()
+ -- Check for active players
+ for _, player in ipairs(game.connected_players) do
+ if player.afk_time < config.afk_time
+ or config.admin_as_active and config.player.admin
+ or config.trust_as_active and player.online_time > config.trust_time
+ or config.active_role and Roles.player_has_role(player, config.active_role) then
+ -- Active player was found
+ primitives.last_active = game.tick
+ return
+ end
+ end
+
+ -- No active player was found, check if players should be kicked
+ if game.tick - primitives.last_active < config.kick_time then return end
+
+ -- Kick time exceeded, kick all players
+ for _, player in ipairs(game.connected_players) do
+ -- Add a frame to say why the player was kicked
+ local res = player.display_resolution
+ local uis = player.display_scale
+ player.gui.screen.add{
+ type = 'frame',
+ name = 'afk-kick',
+ caption = 'All players were kicked because everyone was afk.',
+ }.location = { x=res.width*(0.5 - 0.11*uis), y=res.height*(0.5 - 0.14*uis) }
+
+ -- Kick the player, some delay needed because network delay
+ Async.wait(10, kick_player, player)
+ end
+end)
+
+--- Remove the screen gui if it is present
+Event.add(defines.events.on_player_joined_game, function(event)
+ local player = game.get_player(event.player_index)
+ local frame = player.gui.screen["afk-kick"]
+ if frame and frame.valid then frame.destroy() end
+end)
\ No newline at end of file
From 4e9e2747fb5eb61e152aa178f786f1eed445e2b4 Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Tue, 6 Apr 2021 22:58:10 +0100
Subject: [PATCH 08/27] Made requested changes
---
config/afk_kick.lua | 2 +-
locale/en/addons.cfg | 5 ++++-
modules/addons/afk-kick.lua | 8 ++++----
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/config/afk_kick.lua b/config/afk_kick.lua
index 800b9730..d0be3e1b 100644
--- a/config/afk_kick.lua
+++ b/config/afk_kick.lua
@@ -5,5 +5,5 @@ return {
afk_time = 3600*10, --- @setting afk_time The time in ticks that must pass for a player to be considered afk
kick_time = 3600*30, --- @setting kick_time The time in ticks that must pass without any active players for all players to be kicked
trust_time = 3600*60*10, --- @setting trust_time The time in ticks that a player must be online for to count as trusted
- update_time = 3600*30, --- @setting update_time How often in ticks the script check for active players
+ update_time = 3600*30, --- @setting update_time How often in ticks the script checks for active players
}
\ No newline at end of file
diff --git a/locale/en/addons.cfg b/locale/en/addons.cfg
index 95defd53..af26b91a 100644
--- a/locale/en/addons.cfg
+++ b/locale/en/addons.cfg
@@ -75,4 +75,7 @@ get-mead-1= Filling the drinking horn
get-mead-2= Skål!
get-beer-1= 🍺 Pouring A Glass 🍺
get-beer-2= 🍻 Chears Mate 🍻
-verify=Please return to our discord and type r!verify __1__
\ No newline at end of file
+verify=Please return to our discord and type r!verify __1__
+
+[afk-kick]
+message=All players were kicked because everyone was AFK.
\ No newline at end of file
diff --git a/modules/addons/afk-kick.lua b/modules/addons/afk-kick.lua
index 578e57b8..9bea3b05 100644
--- a/modules/addons/afk-kick.lua
+++ b/modules/addons/afk-kick.lua
@@ -18,14 +18,14 @@ Global.register(primitives, function(tbl)
primitives = tbl
end)
---- Kicks an afk player, used to give to for gui to show
+--- Kicks an afk player, used to add a delay so the gui has time to appear
local kick_player =
Async.register(function(player)
if game.tick - primitives.last_active < config.kick_time then return end -- Safety Catch
- game.kick_player(player, 'Afk while no active players on the server')
+ game.kick_player(player, 'AFK while no active players on the server')
end)
---- Check for an active player every 5 minutes
+--- Check for an active player every update_time number of ticks
Event.on_nth_tick(config.update_time, function()
-- Check for active players
for _, player in ipairs(game.connected_players) do
@@ -50,7 +50,7 @@ Event.on_nth_tick(config.update_time, function()
player.gui.screen.add{
type = 'frame',
name = 'afk-kick',
- caption = 'All players were kicked because everyone was afk.',
+ caption = {'afk-kick.message'},
}.location = { x=res.width*(0.5 - 0.11*uis), y=res.height*(0.5 - 0.14*uis) }
-- Kick the player, some delay needed because network delay
From 51c5a5b1f83365b780dd208433965f036b864135 Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Wed, 7 Apr 2021 01:01:41 +0100
Subject: [PATCH 09/27] Added search commands
---
config/_file_loader.lua | 1 +
config/expcore/roles.lua | 4 +
locale/en/commands.cfg | 8 +-
modules/commands/search.lua | 167 ++++++++++++++++++++++++++++++++++++
4 files changed, 179 insertions(+), 1 deletion(-)
create mode 100644 modules/commands/search.lua
diff --git a/config/_file_loader.lua b/config/_file_loader.lua
index 16a135af..caa311da 100644
--- a/config/_file_loader.lua
+++ b/config/_file_loader.lua
@@ -29,6 +29,7 @@ return {
'modules.commands.home',
'modules.commands.connect',
'modules.commands.last-location',
+ 'modules.commands.search',
--- Addons
'modules.addons.chat-popups',
diff --git a/config/expcore/roles.lua b/config/expcore/roles.lua
index 9b826202..4125677c 100644
--- a/config/expcore/roles.lua
+++ b/config/expcore/roles.lua
@@ -102,6 +102,10 @@ Roles.new_role('Trainee','TrMod')
'command/unjail',
'command/kick',
'command/ban',
+ 'command/search',
+ 'command/search-amount',
+ 'command/search-recent',
+ 'command/search-online',
}
--- Trusted Roles
diff --git a/locale/en/commands.cfg b/locale/en/commands.cfg
index dea7b935..cb5ab590 100644
--- a/locale/en/commands.cfg
+++ b/locale/en/commands.cfg
@@ -82,4 +82,10 @@ offline=You cannot connect as the server is currently offline: __1__
none-matching=No servers were found with that name, if you used an address please append true to the end of your command.
[expcom-lastlocation]
-response=Last location of __1__ was [gps=__2__,__3__]
\ No newline at end of file
+response=Last location of __1__ was [gps=__2__,__3__]
+
+[expcom-inv-search]
+reject-item=No item was found with internal name __1__; try using rich text selection.
+results-heading=Players found with [item=__1__]:
+results-item=__1__) __2__ has __3__ items. (__4__)
+results-none=No players have [item=__1__]
\ No newline at end of file
diff --git a/modules/commands/search.lua b/modules/commands/search.lua
new file mode 100644
index 00000000..52143bdd
--- /dev/null
+++ b/modules/commands/search.lua
@@ -0,0 +1,167 @@
+--[[-- Commands Module - Inventory Search
+ - Adds commands that will search all players inventories for an item
+ @commands InventorySearch
+]]
+
+local Commands = require 'expcore.commands' --- @dep expcore.commands
+local format_number = require('util').format_number --- @dep util
+local format_chat_player_name = _C.format_chat_player_name --- @dep expcore.common
+local format_time = _C.format_time
+require 'config.expcore.command_general_parse'
+
+--- Input parse for items by name
+local function item_parse(input, _, reject)
+ if input == nil then return end
+ local lower_input = input:lower():gsub(' ', '-')
+
+ -- Simple Case - internal name is given
+ local item = game.item_prototypes[lower_input]
+ if item then return item end
+
+ -- Second Case - rich text is given
+ local item_name = input:match('%[item=([0-9a-z-]+)%]')
+ item = game.item_prototypes[item_name]
+ if item then return item end
+
+ -- No item found, we do not attempt to search all prototypes as this will be expensive
+ return reject{'expcom-inv-search.reject-item', lower_input}
+end
+
+--- Search all players for this item
+local function search_players(players, item)
+ local head = 1
+ local found = {}
+
+ -- Check the item count of all players
+ for _, player in pairs(players) do
+ local item_count = player.get_item_count(item.name)
+ if item_count > 0 then
+ -- Add the player to the array as they have the item
+ found[head] = { player=player, count=item_count, online_time=player.online_time }
+ head = head + 1
+ end
+ end
+
+ return found
+end
+
+--- Custom sort function which only retains 5 greatest values
+local function sort_players(players, func)
+ local sorted = {}
+ local values = {}
+ local threshold = nil
+
+ -- Loop over all provided players
+ for index, player in ipairs(players) do
+ local value = func(player)
+ -- Check if the item will make the top 10 elements
+ if value > threshold or index <= 5 then
+ local inserted = false
+ values[player] = value
+ -- Find where in the top 10 to insert the element
+ for next_index, next_player in ipairs(sorted) do
+ if value > values[next_player] then
+ table.insert(sorted, next_index, player)
+ inserted = true
+ break
+ end
+ end
+ -- Insert the element, this can only be called when index <= 5
+ if not inserted then
+ sorted[#sorted+1] = player
+ end
+ -- Update the threshold
+ if sorted[6] then
+ threshold = values[sorted[5]]
+ values[sorted[6]] = nil
+ sorted[6] = nil
+ else
+ threshold = values[sorted[#sorted]]
+ end
+ end
+ end
+
+ return sorted
+end
+
+--- Display to the player the top players which were found
+local function display_players(player, players, item)
+ player.print{'expcom-inv-search.results-heading', item.name}
+ for index, data in ipairs(players) do
+ local player_name_color = format_chat_player_name(data.player)
+ local amount = format_number(data.count)
+ local time = format_time(data.online_time)
+ player.print{'expcom-inv-search.results-item', index, player_name_color, amount, time}
+ end
+end
+
+--- Return the amount of an item a player has
+local function amount_sort(data)
+ return data.count
+end
+
+--- Get a list of players sorted by the quantity of an item in their inventory
+-- @command search-amount
+-- @tparam LuaItemPrototype item The item to search for in players inventories
+Commands.new_command('search-amount', 'Display players sorted by the quantity of an item held')
+:add_alias('ia')
+:add_param('item', false, item_parse)
+:enable_auto_concat()
+:register(function(player, item)
+ local players = search_players(game.players, item)
+ if #players == 0 then return {'expcom-inv-search.results-none', item.name} end
+ local top_players = sort_players(players, amount_sort)
+ display_players(player, top_players, item)
+end)
+
+--- Return the index of the player, higher means they joined more recently
+local function recent_sort(data)
+ return data.player.index
+end
+
+--- Get a list of players who have the given item, sorted by how recently they joined
+-- @command search-recent
+-- @tparam LuaItemPrototype item The item to search for in players inventories
+Commands.new_command('search-recent', 'Display players who hold an item sorted by join time')
+:add_alias('ir')
+:add_param('item', false, item_parse)
+:enable_auto_concat()
+:register(function(player, item)
+ local players = search_players(game.players, item)
+ if #players == 0 then return {'expcom-inv-search.results-none', item.name} end
+ local top_players = sort_players(players, recent_sort)
+ display_players(player, top_players, item)
+end)
+
+--- Return the index of the player, higher means they joined more recently
+local function combined_sort(data)
+ return data.count/data.online_time
+end
+
+--- Get a list of players sorted by quantity held and play time
+-- @command search
+-- @tparam LuaItemPrototype item The item to search for in players inventories
+Commands.new_command('search', 'Display players sorted by the quantity of an item held and playtime')
+:add_alias('i')
+:add_param('item', false, item_parse)
+:enable_auto_concat()
+:register(function(player, item)
+ local players = search_players(game.players, item)
+ if #players == 0 then return {'expcom-inv-search.results-none', item.name} end
+ local top_players = sort_players(players, combined_sort)
+ display_players(player, top_players, item)
+end)
+
+--- Get a list of online players sorted by quantity held and play time
+-- @command search-online
+-- @tparam LuaItemPrototype item The item to search for in players inventories
+Commands.new_command('search-online', 'Display online players sorted by the quantity of an item held and playtime')
+:add_alias('io')
+:add_param('item', false, item_parse)
+:enable_auto_concat()
+:register(function(player, item)
+ local players = search_players(game.connected_players, item)
+ if #players == 0 then return {'expcom-inv-search.results-none', item.name} end
+ local top_players = sort_players(players, combined_sort)
+ display_players(player, top_players, item)
+end)
\ No newline at end of file
From fa38e3438030ec3864a8c22a8f425c19ed91d89b Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Wed, 7 Apr 2021 01:59:56 +0100
Subject: [PATCH 10/27] Fixed inline bug
---
modules/addons/discord-alerts.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/addons/discord-alerts.lua b/modules/addons/discord-alerts.lua
index fbeabf8a..a5309b12 100644
--- a/modules/addons/discord-alerts.lua
+++ b/modules/addons/discord-alerts.lua
@@ -59,7 +59,7 @@ local function emit_event(args)
}
local new_value, inline = value:gsub('', '', 1)
- if inline then
+ if inline > 0 then
field.value = new_value
field.inline = true
end
From fd70ea3bd050ae9fb101ba740265e5fa2c6065f5 Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Wed, 7 Apr 2021 02:02:49 +0100
Subject: [PATCH 11/27] Added report and warning count
---
modules/addons/discord-alerts.lua | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/addons/discord-alerts.lua b/modules/addons/discord-alerts.lua
index a5309b12..d1c4646c 100644
--- a/modules/addons/discord-alerts.lua
+++ b/modules/addons/discord-alerts.lua
@@ -87,6 +87,7 @@ if config.player_reports then
color=Colors.yellow,
['Player']=''..player_name,
['By']=''..by_player_name,
+ ['Report Count']=''..Reports.count_reports(player_name),
['Reason']=event.reason
}
end)
@@ -99,7 +100,7 @@ if config.player_reports then
color=Colors.green,
['Player']=''..player_name,
['By']=''..event.removed_by_name,
- ['Amount']=''..event.batch_count
+ ['Report Count']=''..event.batch_count
}
end)
end
@@ -109,12 +110,14 @@ if config.player_warnings then
local Warnings = require 'modules.control.warnings' --- @dep modules.control.warnings
Event.add(Warnings.events.on_warning_added, function(event)
local player_name, by_player_name = get_player_name(event)
+ local player = game.get_player(player_name)
emit_event{
title='Warning',
description='A player has been given a warning',
color=Colors.yellow,
['Player']=''..player_name,
['By']=''..by_player_name,
+ ['Warning Count']=''..Warnings.count_warnings(player),
['Reason']=event.reason
}
end)
@@ -127,7 +130,7 @@ if config.player_warnings then
color=Colors.green,
['Player']=''..player_name,
['By']=''..event.removed_by_name,
- ['Amount']=''..event.batch_count
+ ['Warning Count']=''..event.batch_count
}
end)
end
From b86efbb9435f50346e3f4ae07c12e51e17325492 Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Wed, 7 Apr 2021 18:07:04 +0100
Subject: [PATCH 12/27] Made requested changes
---
modules/commands/search.lua | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/commands/search.lua b/modules/commands/search.lua
index 52143bdd..62d1ab33 100644
--- a/modules/commands/search.lua
+++ b/modules/commands/search.lua
@@ -54,11 +54,11 @@ local function sort_players(players, func)
-- Loop over all provided players
for index, player in ipairs(players) do
local value = func(player)
- -- Check if the item will make the top 10 elements
+ -- Check if the item will make the top 5 elements
if value > threshold or index <= 5 then
local inserted = false
values[player] = value
- -- Find where in the top 10 to insert the element
+ -- Find where in the top 5 to insert the element
for next_index, next_player in ipairs(sorted) do
if value > values[next_player] then
table.insert(sorted, next_index, player)
@@ -133,7 +133,7 @@ Commands.new_command('search-recent', 'Display players who hold an item sorted b
display_players(player, top_players, item)
end)
---- Return the index of the player, higher means they joined more recently
+--- Return the the amount of an item a player has divided by their playtime
local function combined_sort(data)
return data.count/data.online_time
end
From 70664ffd0c88b37e96abfa2ebc122119ac6c24ec Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Thu, 8 Apr 2021 18:08:41 +0100
Subject: [PATCH 13/27] Made requested changes
---
locale/en/addons.cfg | 2 +-
locale/en/commands.cfg | 2 +-
modules/addons/report-jail.lua | 4 ++--
modules/control/reports.lua | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/locale/en/addons.cfg b/locale/en/addons.cfg
index 9acd4abc..65510fae 100644
--- a/locale/en/addons.cfg
+++ b/locale/en/addons.cfg
@@ -78,4 +78,4 @@ get-beer-2= 🍻 Chears Mate 🍻
verify=Please return to our discord and type r!verify __1__
[report-jail]
-jail=__1__ was jailed because they have been reported too many times.
\ No newline at end of file
+jail=__1__ was jailed because they were reported too many times.
\ No newline at end of file
diff --git a/locale/en/commands.cfg b/locale/en/commands.cfg
index 1a053c7e..3aea89ed 100644
--- a/locale/en/commands.cfg
+++ b/locale/en/commands.cfg
@@ -29,7 +29,7 @@ not-jailed=__1__ is not currently in jail.
[expcom-report]
player-immune=This player can not be reported.
-self-report=You can not report your self.
+self-report=You cannot report yourself.
non-admin=__1__ was reported for __2__.
admin=__1__ was reported by __2__ for __3__.
already-reported=You can only report a player once, you can ask a moderator to clear this report.
diff --git a/modules/addons/report-jail.lua b/modules/addons/report-jail.lua
index b98c3ce0..f9211993 100644
--- a/modules/addons/report-jail.lua
+++ b/modules/addons/report-jail.lua
@@ -1,4 +1,4 @@
---- When a player is reported by players with a greater combined delta playtime, the player is automatically jailed
+--- When a player is reported, the player is automatically jailed if the combined playtime of the reporters exceeds the reported player
-- @addon report-jail
local Event = require 'utils.event' ---@dep utils.event
@@ -6,7 +6,7 @@ local Jail = require 'modules.control.jail' ---@dep modules.control.jail
local Reports = require 'modules.control.reports' --- @dep modules.control.reports
local format_chat_player_name = _C.format_chat_player_name --- @dep expcore.common
---- Returns the playtime of the reporter, used to sum the playtime of all reporters
+--- Returns the playtime of the reporter. Used when calculating the total playtime of all reporters
local function reporter_playtime(_, by_player_name, _)
local player = game.get_player(by_player_name)
if player == nil then return 0 end
diff --git a/modules/control/reports.lua b/modules/control/reports.lua
index 354c8235..62d3bea7 100644
--- a/modules/control/reports.lua
+++ b/modules/control/reports.lua
@@ -132,7 +132,7 @@ function Reports.report_player(player, by_player_name, reason)
if not player then return end
local player_name = player.name
- if reason == nil or not reason:find("/S") then reason = 'Non given' end
+ if reason == nil or not reason:find("/S") then reason = 'No reason given' end
local reports = user_reports[player_name]
if not reports then
From 0866e9f9c31912b8204f3602a328f4ac559936b8 Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Thu, 15 Apr 2021 21:55:41 +0100
Subject: [PATCH 14/27] Refactored spawn area
---
config/spawn_area.lua | 311 ++++++++++++++++++----------------
modules/addons/spawn-area.lua | 199 ++++++++++++----------
2 files changed, 280 insertions(+), 230 deletions(-)
diff --git a/config/spawn_area.lua b/config/spawn_area.lua
index 889fc20e..588f9d3c 100644
--- a/config/spawn_area.lua
+++ b/config/spawn_area.lua
@@ -2,156 +2,179 @@
-- @config Spawn-Area
return {
- infinite_ammo_turrets = { --- @setting infinite_ammo_turrets These turrets will have they ammo refilled automatically and can not be looted
- enabled=true, --- @setting enabled weather the turrets will be created and refilled
- ammo_type='uranium-rounds-magazine', --- @setting ammo_type the ammo type that will be used
- locations={ --- @setting locations locations of all turrets, this is default it can be changed during runtime
+ spawn_area = { --- @setting spawn_area Settings relating to the whole spawn area
+ deconstruction_radius = 20, --- @setting deconstruction_radius All entities within this radius will be removed
+ deconstruction_tile = 'concrete', --- @setting deconstruction_tile Tile to be placed in the deconstruction radius, use nil for map gen
+ landfill_radius = 50, --- @setting pattern_radius All water within this radius will be land filled
+ },
+ turrets = { --- @setting turrets Settings relating to adding turrets to spawn
+ enabled = true, --- @setting enabled Weather turrets will be added to spawn
+ ammo_type = 'uranium-rounds-magazine', --- @setting ammo_type The ammo type that will be used during refills
+ refill_time = 60*60*5, --- @setting refill_time The time in ticks between each refill of the turrets, only change if having lag issues
+ offset = { x=0, y=0 }, --- @setting offset The position offset to apply to turrets
+ locations = { --- @setting locations The locations of all turrets, this list can change during runtime
{surface=1,position={x=-3,y=-3}},
- {surface=1,position={x=3 ,y=-3}},
- {surface=1,position={x=-3,y=3 }},
- {surface=1,position={x=3 ,y=3 }}
+ {surface=1,position={x= 3,y=-3}},
+ {surface=1,position={x=-3,y= 3}},
+ {surface=1,position={x= 3,y= 3}}
}
},
- afk_belts = { --- @setting afk_belts setting relating to afk belts round the spawn point
- enabled=true, --- @setting enabled weather afk belts will be generated
- locations={ --- @setting locations top left connors of any afk belt loops to be added
- {x=-5,y=-5},
- {x=5, y=-5},
- {x=-5,y=5 },
- {x=5, y=5 }
+ afk_belts = { --- @setting afk_belts Settings relating to adding afk belts to spawn
+ enabled = true, --- @setting enabled Weather afk belts will be added to spawn
+ belt_type = 'transport-belt', --- @setting belt_type The belt to used used as afk belts
+ protected = true, --- @settins protected Weather belts will be protected from player interaction
+ offset = { x=0, y=0 }, --- @setting offset The position offset to apply to afk belts
+ locations={ --- @setting locations The locations to spawn afk belts at, given as the top left position
+ {-5, -5}, { 5, -5},
+ {-5, 5}, { 5, 5}
}
},
- corrections = { --- @setting corrections Some settings that have no where else to go
- protect_entities=true, --- @setting protect_entities if the spawn entites will be protected
- offset = {x=0,y=-2}, --- @setting offset a global offset value to correct the x and y values of the tables below
- deconstruction_radius=20, --- @setting deconstruction_radius when the spawn is made this area will have all entities removed first
- deconstruction_tile='concrete', --- @setting deconstruction_tile this is the tile that will spawn in the deconstruction radius
- pattern_radius = 50, --- @setting pattern_radius this is the radius of the pattern all water in this area will be filled
- pattern_tile = 'stone-path' --- @setting pattern_tile the tile that is used for the pattern
+ water = { --- @setting water Settings relating to adding water to spawn
+ enabled = true, --- @setting enabled Weather water tiles will be added to spawn
+ water_tile = 'water-mud', --- @setting water_tile The tile to be used as the water tile
+ offset = { x=0, y=0 }, --- @setting offset The position offset to apply to water tiles
+ locations = { --- @setting locations The location of the water tiles {x,y}
+ -- Each is a 3x3 with the closest tile to 0,0 removed
+ { 7, 8}, { 7, 9 }, { 8, 7}, { 8, 8}, { 8, 9 }, { 9, 7}, { 9, 8}, { 9, 9 }, -- Bottom Right
+ { 7, -9}, { 7, -10}, { 8, -8}, { 8, -9}, { 8, -10}, { 9, -8}, { 9, -9}, { 9, -10}, -- Top Right
+ {-8, -9}, {-8, -10}, {-9, -8}, {-9, -9}, {-9, -10}, {-10, -8}, {-10, -9}, {-10, -10}, -- Top Left
+ {-8, 8}, {-8, 9 }, {-9, 7}, {-9, 8}, {-9, 9 }, {-10, 7}, {-10, 8}, {-10, 9 }, -- Bottom Left
+ }
},
- entities = { --- @setting entities All entities that will be created as part of spawn {entity-name,x-pos,y-pos}
- {"stone-wall",-10,-6},{"stone-wall",-10,-5},{"stone-wall",-10,-4},{"stone-wall",-10,-3},{"stone-wall",-10,-2},{"stone-wall",-10,-1},{"stone-wall",-10,0},{"stone-wall",-10,3},{"stone-wall",-10,4},{"stone-wall",-10,5},
- {"stone-wall",-10,6},{"stone-wall",-10,7},{"stone-wall",-10,8},{"stone-wall",-10,9},{"stone-wall",-8,-8},{"small-lamp",-8,-4},{"small-lamp",-8,-1},{"iron-chest",-8,0},{"iron-chest",-8,3},{"small-lamp",-8,4},
- {"small-lamp",-8,7},{"stone-wall",-8,11},{"stone-wall",-7,-8},{"small-electric-pole",-7,-2},{"iron-chest",-7,0},{"iron-chest",-7,3},{"small-electric-pole",-7,5},{"stone-wall",-7,11},{"stone-wall",-6,-8},{"small-lamp",-6,-6},
- {"iron-chest",-6,0},{"iron-chest",-6,3},{"small-lamp",-6,9},{"stone-wall",-6,11},{"stone-wall",-5,-8},{"small-lamp",-5,-1},{"iron-chest",-5,0},{"iron-chest",-5,3},{"small-lamp",-5,4},{"stone-wall",-5,11},
- {"stone-wall",-4,-8},{"small-electric-pole",-4,-5},{"iron-chest",-4,0},{"iron-chest",-4,3},{"small-electric-pole",-4,8},{"stone-wall",-4,11},{"stone-wall",-3,-8},{"small-lamp",-3,-6},{"small-lamp",-3,-3},{"small-lamp",-3,6},
- {"small-lamp",-3,9},{"stone-wall",-3,11},{"stone-wall",-2,-8},{"iron-chest",-2,-6},{"iron-chest",-2,-5},{"iron-chest",-2,-4},{"iron-chest",-2,-3},{"iron-chest",-2,-2},{"iron-chest",-2,5},{"iron-chest",-2,6},
- {"iron-chest",-2,7},{"iron-chest",-2,8},{"iron-chest",-2,9},{"stone-wall",-2,11},{"stone-wall",1,-8},{"iron-chest",1,-6},
- {"iron-chest",1,-5},{"iron-chest",1,-4},{"iron-chest",1,-3},{"iron-chest",1,-2},{"iron-chest",1,5},{"iron-chest",1,6},{"iron-chest",1,7},{"iron-chest",1,8},{"iron-chest",1,9},{"stone-wall",1,11},
- {"stone-wall",2,-8},{"small-lamp",2,-6},{"small-lamp",2,-3},{"small-lamp",2,6},{"small-lamp",2,9},{"stone-wall",2,11},{"stone-wall",3,-8},{"small-electric-pole",3,-5},{"iron-chest",3,0},{"iron-chest",3,3},
- {"small-electric-pole",3,8},{"stone-wall",3,11},{"stone-wall",4,-8},{"small-lamp",4,-1},{"iron-chest",4,0},{"iron-chest",4,3},{"small-lamp",4,4},{"stone-wall",4,11},{"stone-wall",5,-8},{"small-lamp",5,-6},
- {"iron-chest",5,0},{"iron-chest",5,3},{"small-lamp",5,9},{"stone-wall",5,11},{"stone-wall",6,-8},{"small-electric-pole",6,-2},{"iron-chest",6,0},{"iron-chest",6,3},{"small-electric-pole",6,5},{"stone-wall",6,11},
- {"stone-wall",7,-8},{"small-lamp",7,-4},{"small-lamp",7,-1},{"iron-chest",7,0},{"iron-chest",7,3},{"small-lamp",7,4},{"small-lamp",7,7},{"stone-wall",7,11},{"stone-wall",9,-6},{"stone-wall",9,-5},
- {"stone-wall",9,-4},{"stone-wall",9,-3},{"stone-wall",9,-2},{"stone-wall",9,-1},{"stone-wall",9,0},{"stone-wall",9,3},{"stone-wall",9,4},{"stone-wall",9,5},{"stone-wall",9,6},{"stone-wall",9,7},
- {"stone-wall",9,8},{"stone-wall",9,9}
+ entities = { --- @setting entities Settings relating to adding entities to spawn
+ enabled = true, --- @settings enabled Weather entities will be added to spawn
+ protected = true, --- @settins protected Weather entities will be protected from player interaction
+ operable = true, --- @settings operable Weather entities can be opened by players, must be true if chests are used
+ offset = { x=0, y=-2 }, --- @settings offset The position offset to apply to entities
+ locations = { --- @setting locations The location and names of entities {name,x,y}
+ {"stone-wall",-10,-5},{"stone-wall",-10,-4},{"stone-wall",-10,-3},{"stone-wall",-10,-2},{"stone-wall",-10,-1},{"stone-wall",-10,0},{"stone-wall",-10,3},{"stone-wall",-10,4},{"stone-wall",-10,5},
+ {"stone-wall",-10,6},{"stone-wall",-10,7},{"stone-wall",-10,8},{"small-lamp",-8,-4},{"small-lamp",-8,-1},{"iron-chest",-8,0},{"iron-chest",-8,3},{"small-lamp",-8,4},
+ {"small-lamp",-8,7},{"stone-wall",-7,-8},{"small-electric-pole",-7,-2},{"iron-chest",-7,0},{"iron-chest",-7,3},{"small-electric-pole",-7,5},{"stone-wall",-7,11},{"stone-wall",-6,-8},{"small-lamp",-6,-6},
+ {"iron-chest",-6,0},{"iron-chest",-6,3},{"small-lamp",-6,9},{"stone-wall",-6,11},{"stone-wall",-5,-8},{"small-lamp",-5,-1},{"iron-chest",-5,0},{"iron-chest",-5,3},{"small-lamp",-5,4},{"stone-wall",-5,11},
+ {"stone-wall",-4,-8},{"small-electric-pole",-4,-5},{"iron-chest",-4,0},{"iron-chest",-4,3},{"small-electric-pole",-4,8},{"stone-wall",-4,11},{"stone-wall",-3,-8},{"small-lamp",-3,-6},{"small-lamp",-3,-3},{"small-lamp",-3,6},
+ {"small-lamp",-3,9},{"stone-wall",-3,11},{"stone-wall",-2,-8},{"iron-chest",-2,-6},{"iron-chest",-2,-5},{"iron-chest",-2,-4},{"iron-chest",-2,-3},{"iron-chest",-2,-2},{"iron-chest",-2,5},{"iron-chest",-2,6},
+ {"iron-chest",-2,7},{"iron-chest",-2,8},{"iron-chest",-2,9},{"stone-wall",-2,11},{"stone-wall",1,-8},{"iron-chest",1,-6},
+ {"iron-chest",1,-5},{"iron-chest",1,-4},{"iron-chest",1,-3},{"iron-chest",1,-2},{"iron-chest",1,5},{"iron-chest",1,6},{"iron-chest",1,7},{"iron-chest",1,8},{"iron-chest",1,9},{"stone-wall",1,11},
+ {"stone-wall",2,-8},{"small-lamp",2,-6},{"small-lamp",2,-3},{"small-lamp",2,6},{"small-lamp",2,9},{"stone-wall",2,11},{"stone-wall",3,-8},{"small-electric-pole",3,-5},{"iron-chest",3,0},{"iron-chest",3,3},
+ {"small-electric-pole",3,8},{"stone-wall",3,11},{"stone-wall",4,-8},{"small-lamp",4,-1},{"iron-chest",4,0},{"iron-chest",4,3},{"small-lamp",4,4},{"stone-wall",4,11},{"stone-wall",5,-8},{"small-lamp",5,-6},
+ {"iron-chest",5,0},{"iron-chest",5,3},{"small-lamp",5,9},{"stone-wall",5,11},{"stone-wall",6,-8},{"small-electric-pole",6,-2},{"iron-chest",6,0},{"iron-chest",6,3},{"small-electric-pole",6,5},{"stone-wall",6,11},
+ {"small-lamp",7,-4},{"small-lamp",7,-1},{"iron-chest",7,0},{"iron-chest",7,3},{"small-lamp",7,4},{"small-lamp",7,7},{"stone-wall",9,-5},
+ {"stone-wall",9,-4},{"stone-wall",9,-3},{"stone-wall",9,-2},{"stone-wall",9,-1},{"stone-wall",9,0},{"stone-wall",9,3},{"stone-wall",9,4},{"stone-wall",9,5},{"stone-wall",9,6},{"stone-wall",9,7},
+ {"stone-wall",9,8}
+ }
},
- tiles = { --- @setting tiles The location of the "pattern" tiles {x-pos,y-pos}
- {-49,-3},{-49,-2},{-49,1},{-49,2},{-49,5},{-49,6},{-48,-4},{-48,-3},{-48,-2},{-48,1},{-48,2},{-48,5},{-48,6},{-48,7},{-47,-7},{-47,-6},{-47,-5},{-47,-4},{-47,-3},{-47,-2},{-47,5},{-47,6},{-47,7},{-47,8},{-47,9},{-47,10},{-46,-8},{-46,-7},{-46,-6},{-46,-5},
- {-46,-4},{-46,-3},{-46,-2},{-46,-1},{-46,4},{-46,5},{-46,6},{-46,7},{-46,8},{-46,9},{-46,10},{-46,11},{-45,-17},{-45,-16},{-45,-15},{-45,-14},{-45,-13},{-45,-12},{-45,-9},{-45,-8},{-45,-7},{-45,-2},{-45,-1},{-45,0},{-45,1},{-45,2},{-45,3},{-45,4},{-45,5},{-45,10},
- {-45,11},{-45,12},{-45,15},{-45,16},{-45,17},{-45,18},{-45,19},{-45,20},{-44,-18},{-44,-17},{-44,-16},{-44,-15},{-44,-14},{-44,-13},{-44,-12},{-44,-9},{-44,-8},{-44,-1},{-44,0},{-44,1},{-44,2},{-44,3},{-44,4},{-44,11},{-44,12},{-44,15},{-44,16},{-44,17},{-44,18},{-44,19},
- {-44,20},{-44,21},{-43,-19},{-43,-18},{-43,-17},{-43,-1},{-43,0},{-43,1},{-43,2},{-43,3},{-43,4},{-43,20},{-43,21},{-43,22},{-42,-19},{-42,-18},{-42,-1},{-42,0},{-42,1},{-42,2},{-42,3},{-42,4},{-42,21},{-42,22},{-41,-25},{-41,-24},{-41,-19},{-41,-18},{-41,-13},{-41,-12},
- {-41,-11},{-41,-10},{-41,-5},{-41,-4},{-41,7},{-41,8},{-41,13},{-41,14},{-41,15},{-41,16},{-41,21},{-41,22},{-41,27},{-41,28},{-40,-26},{-40,-25},{-40,-24},{-40,-20},{-40,-19},{-40,-18},{-40,-13},{-40,-12},{-40,-11},{-40,-10},{-40,-5},{-40,-4},{-40,7},{-40,8},{-40,13},{-40,14},
- {-40,15},{-40,16},{-40,21},{-40,22},{-40,23},{-40,27},{-40,28},{-40,29},{-39,-27},{-39,-26},{-39,-25},{-39,-24},{-39,-21},{-39,-20},{-39,-19},{-39,-13},{-39,-12},{-39,-5},{-39,-4},{-39,-3},{-39,-2},{-39,-1},{-39,0},{-39,1},{-39,2},{-39,3},{-39,4},{-39,5},{-39,6},{-39,7},
- {-39,8},{-39,15},{-39,16},{-39,22},{-39,23},{-39,24},{-39,27},{-39,28},{-39,29},{-39,30},{-38,-27},{-38,-26},{-38,-25},{-38,-24},{-38,-21},{-38,-20},{-38,-13},{-38,-12},{-38,-5},{-38,-4},{-38,-3},{-38,-2},{-38,-1},{-38,0},{-38,1},{-38,2},{-38,3},{-38,4},{-38,5},{-38,6},
- {-38,7},{-38,8},{-38,15},{-38,16},{-38,23},{-38,24},{-38,27},{-38,28},{-38,29},{-38,30},{-37,-17},{-37,-16},{-37,-13},{-37,-12},{-37,-11},{-37,-10},{-37,-4},{-37,-3},{-37,-2},{-37,-1},{-37,0},{-37,3},{-37,4},{-37,5},{-37,6},{-37,7},{-37,13},{-37,14},{-37,15},{-37,16},
- {-37,19},{-37,20},{-36,-17},{-36,-16},{-36,-13},{-36,-12},{-36,-11},{-36,-10},{-36,-9},{-36,-3},{-36,-2},{-36,-1},{-36,0},{-36,3},{-36,4},{-36,5},{-36,6},{-36,12},{-36,13},{-36,14},{-36,15},{-36,16},{-36,19},{-36,20},{-35,-29},{-35,-28},{-35,-23},{-35,-22},{-35,-17},{-35,-16},
- {-35,-12},{-35,-11},{-35,-10},{-35,-9},{-35,-8},{-35,11},{-35,12},{-35,13},{-35,14},{-35,15},{-35,19},{-35,20},{-35,25},{-35,26},{-35,31},{-35,32},{-34,-30},{-34,-29},{-34,-28},{-34,-23},{-34,-22},{-34,-17},{-34,-16},{-34,-15},{-34,-11},{-34,-10},{-34,-9},{-34,-8},{-34,11},{-34,12},
- {-34,13},{-34,14},{-34,18},{-34,19},{-34,20},{-34,25},{-34,26},{-34,31},{-34,32},{-34,33},{-33,-31},{-33,-30},{-33,-29},{-33,-28},{-33,-23},{-33,-22},{-33,-16},{-33,-15},{-33,-14},{-33,-5},{-33,-4},{-33,-1},{-33,0},{-33,3},{-33,4},{-33,7},{-33,8},{-33,17},{-33,18},{-33,19},
- {-33,25},{-33,26},{-33,31},{-33,32},{-33,33},{-33,34},{-32,-32},{-32,-31},{-32,-30},{-32,-29},{-32,-28},{-32,-27},{-32,-23},{-32,-22},{-32,-21},{-32,-15},{-32,-14},{-32,-6},{-32,-5},{-32,-4},{-32,-1},{-32,0},{-32,3},{-32,4},{-32,7},{-32,8},{-32,9},{-32,17},{-32,18},{-32,24},
- {-32,25},{-32,26},{-32,30},{-32,31},{-32,32},{-32,33},{-32,34},{-32,35},{-31,-33},{-31,-32},{-31,-31},{-31,-30},{-31,-29},{-31,-28},{-31,-27},{-31,-26},{-31,-22},{-31,-21},{-31,-20},{-31,-19},{-31,-18},{-31,-11},{-31,-10},{-31,-9},{-31,-8},{-31,-7},{-31,-6},{-31,-5},{-31,-1},{-31,0},
- {-31,1},{-31,2},{-31,3},{-31,4},{-31,8},{-31,9},{-31,10},{-31,11},{-31,12},{-31,13},{-31,14},{-31,21},{-31,22},{-31,23},{-31,24},{-31,25},{-31,29},{-31,30},{-31,31},{-31,32},{-31,33},{-31,34},{-31,35},{-31,36},{-30,-33},{-30,-32},{-30,-31},{-30,-30},{-30,-29},{-30,-28},
- {-30,-27},{-30,-26},{-30,-21},{-30,-20},{-30,-19},{-30,-18},{-30,-11},{-30,-10},{-30,-9},{-30,-8},{-30,-7},{-30,-6},{-30,-1},{-30,0},{-30,1},{-30,2},{-30,3},{-30,4},{-30,9},{-30,10},{-30,11},{-30,12},{-30,13},{-30,14},{-30,21},{-30,22},{-30,23},{-30,24},{-30,29},{-30,30},
- {-30,31},{-30,32},{-30,33},{-30,34},{-30,35},{-30,36},{-29,-37},{-29,-36},{-29,-30},{-29,-29},{-29,-28},{-29,-27},{-29,-26},{-29,-15},{-29,-14},{-29,-10},{-29,-9},{-29,-8},{-29,-7},{-29,10},{-29,11},{-29,12},{-29,13},{-29,17},{-29,18},{-29,29},{-29,30},{-29,31},{-29,32},{-29,33},
- {-29,39},{-29,40},{-28,-38},{-28,-37},{-28,-36},{-28,-29},{-28,-28},{-28,-27},{-28,-26},{-28,-16},{-28,-15},{-28,-14},{-28,-9},{-28,-8},{-28,11},{-28,12},{-28,17},{-28,18},{-28,19},{-28,29},{-28,30},{-28,31},{-28,32},{-28,39},{-28,40},{-28,41},{-27,-39},{-27,-38},{-27,-37},{-27,-36},
- {-27,-23},{-27,-22},{-27,-19},{-27,-18},{-27,-17},{-27,-16},{-27,-15},{-27,-5},{-27,-4},{-27,-1},{-27,0},{-27,1},{-27,2},{-27,3},{-27,4},{-27,7},{-27,8},{-27,18},{-27,19},{-27,20},{-27,21},{-27,22},{-27,25},{-27,26},{-27,39},{-27,40},{-27,41},{-27,42},{-26,-39},{-26,-38},
- {-26,-37},{-26,-36},{-26,-24},{-26,-23},{-26,-22},{-26,-19},{-26,-18},{-26,-17},{-26,-16},{-26,-6},{-26,-5},{-26,-4},{-26,-1},{-26,0},{-26,1},{-26,2},{-26,3},{-26,4},{-26,7},{-26,8},{-26,9},{-26,19},{-26,20},{-26,21},{-26,22},{-26,25},{-26,26},{-26,27},{-26,39},{-26,40},
- {-26,41},{-26,42},{-25,-33},{-25,-32},{-25,-31},{-25,-30},{-25,-25},{-25,-24},{-25,-23},{-25,-22},{-25,-19},{-25,-18},{-25,-17},{-25,-9},{-25,-8},{-25,-7},{-25,-6},{-25,-5},{-25,-4},{-25,-1},{-25,0},{-25,1},{-25,2},{-25,3},{-25,4},{-25,7},{-25,8},{-25,9},{-25,10},{-25,11},
- {-25,12},{-25,20},{-25,21},{-25,22},{-25,25},{-25,26},{-25,27},{-25,28},{-25,33},{-25,34},{-25,35},{-25,36},{-24,-33},{-24,-32},{-24,-31},{-24,-30},{-24,-29},{-24,-25},{-24,-24},{-24,-23},{-24,-22},{-24,-19},{-24,-18},{-24,-9},{-24,-8},{-24,-7},{-24,-6},{-24,-5},{-24,-4},{-24,-1},
- {-24,0},{-24,1},{-24,2},{-24,3},{-24,4},{-24,7},{-24,8},{-24,9},{-24,10},{-24,11},{-24,12},{-24,21},{-24,22},{-24,25},{-24,26},{-24,27},{-24,28},{-24,32},{-24,33},{-24,34},{-24,35},{-24,36},{-23,-37},{-23,-36},{-23,-30},{-23,-29},{-23,-28},{-23,-19},{-23,-18},{-23,-15},
- {-23,-14},{-23,-9},{-23,-8},{-23,-7},{-23,-6},{-23,-5},{-23,0},{-23,1},{-23,2},{-23,3},{-23,8},{-23,9},{-23,10},{-23,11},{-23,12},{-23,17},{-23,18},{-23,21},{-23,22},{-23,31},{-23,32},{-23,33},{-23,39},{-23,40},{-22,-38},{-22,-37},{-22,-36},{-22,-29},{-22,-28},{-22,-19},
- {-22,-18},{-22,-15},{-22,-14},{-22,-13},{-22,-9},{-22,-8},{-22,-7},{-22,-6},{-22,1},{-22,2},{-22,9},{-22,10},{-22,11},{-22,12},{-22,16},{-22,17},{-22,18},{-22,21},{-22,22},{-22,31},{-22,32},{-22,39},{-22,40},{-22,41},{-21,-41},{-21,-40},{-21,-39},{-21,-38},{-21,-37},{-21,-29},
- {-21,-28},{-21,-25},{-21,-24},{-21,-23},{-21,-22},{-21,-21},{-21,-20},{-21,-19},{-21,-18},{-21,-15},{-21,-14},{-21,-13},{-21,-12},{-21,-3},{-21,-2},{-21,5},{-21,6},{-21,15},{-21,16},{-21,17},{-21,18},{-21,21},{-21,22},{-21,23},{-21,24},{-21,25},{-21,26},{-21,27},{-21,28},{-21,31},
- {-21,32},{-21,40},{-21,41},{-21,42},{-21,43},{-21,44},{-20,-42},{-20,-41},{-20,-40},{-20,-39},{-20,-38},{-20,-29},{-20,-28},{-20,-25},{-20,-24},{-20,-23},{-20,-22},{-20,-21},{-20,-20},{-20,-19},{-20,-18},{-20,-15},{-20,-14},{-20,-13},{-20,-12},{-20,-3},{-20,-2},{-20,-1},{-20,4},{-20,5},
- {-20,6},{-20,15},{-20,16},{-20,17},{-20,18},{-20,21},{-20,22},{-20,23},{-20,24},{-20,25},{-20,26},{-20,27},{-20,28},{-20,31},{-20,32},{-20,41},{-20,42},{-20,43},{-20,44},{-20,45},{-19,-43},{-19,-42},{-19,-41},{-19,-35},{-19,-34},{-19,-33},{-19,-32},{-19,-25},{-19,-24},{-19,-23},
- {-19,-15},{-19,-14},{-19,-13},{-19,-9},{-19,-8},{-19,-7},{-19,-6},{-19,-2},{-19,-1},{-19,0},{-19,1},{-19,2},{-19,3},{-19,4},{-19,5},{-19,9},{-19,10},{-19,11},{-19,12},{-19,16},{-19,17},{-19,18},{-19,26},{-19,27},{-19,28},{-19,35},{-19,36},{-19,37},{-19,38},{-19,44},
- {-19,45},{-19,46},{-18,-43},{-18,-42},{-18,-35},{-18,-34},{-18,-33},{-18,-32},{-18,-31},{-18,-26},{-18,-25},{-18,-24},{-18,-15},{-18,-14},{-18,-10},{-18,-9},{-18,-8},{-18,-7},{-18,-6},{-18,-1},{-18,0},{-18,1},{-18,2},{-18,3},{-18,4},{-18,9},{-18,10},{-18,11},{-18,12},{-18,13},
- {-18,17},{-18,18},{-18,27},{-18,28},{-18,29},{-18,34},{-18,35},{-18,36},{-18,37},{-18,38},{-18,45},{-18,46},{-17,-43},{-17,-42},{-17,-32},{-17,-31},{-17,-30},{-17,-27},{-17,-26},{-17,-25},{-17,-21},{-17,-20},{-17,-19},{-17,-18},{-17,-17},{-17,-16},{-17,-15},{-17,-14},{-17,-11},{-17,-10},
- {-17,-9},{-17,-8},{-17,-7},{-17,-6},{-17,0},{-17,1},{-17,2},{-17,3},{-17,9},{-17,10},{-17,11},{-17,12},{-17,13},{-17,14},{-17,17},{-17,18},{-17,19},{-17,20},{-17,21},{-17,22},{-17,23},{-17,24},{-17,28},{-17,29},{-17,30},{-17,33},{-17,34},{-17,35},{-17,45},{-17,46},
- {-16,-43},{-16,-42},{-16,-31},{-16,-30},{-16,-27},{-16,-26},{-16,-21},{-16,-20},{-16,-19},{-16,-18},{-16,-17},{-16,-16},{-16,-15},{-16,-14},{-16,-11},{-16,-10},{-16,-9},{-16,-8},{-16,-7},{-16,-6},{-16,1},{-16,2},{-16,9},{-16,10},{-16,11},{-16,12},{-16,13},{-16,14},{-16,17},{-16,18},
- {-16,19},{-16,20},{-16,21},{-16,22},{-16,23},{-16,24},{-16,29},{-16,30},{-16,33},{-16,34},{-16,45},{-16,46},{-15,-43},{-15,-42},{-15,-39},{-15,-38},{-15,-37},{-15,-36},{-15,-35},{-15,-34},{-15,-20},{-15,-19},{-15,-18},{-15,-17},{-15,-10},{-15,-9},{-15,-8},{-15,-7},{-15,-3},{-15,-2},
- {-15,1},{-15,2},{-15,5},{-15,6},{-15,10},{-15,11},{-15,12},{-15,13},{-15,20},{-15,21},{-15,22},{-15,23},{-15,37},{-15,38},{-15,39},{-15,40},{-15,41},{-15,42},{-15,45},{-15,46},{-14,-43},{-14,-42},{-14,-39},{-14,-38},{-14,-37},{-14,-36},{-14,-35},{-14,-34},{-14,-33},{-14,-19},
- {-14,-18},{-14,-9},{-14,-8},{-14,-4},{-14,-3},{-14,-2},{-14,1},{-14,2},{-14,5},{-14,6},{-14,7},{-14,11},{-14,12},{-14,21},{-14,22},{-14,36},{-14,37},{-14,38},{-14,39},{-14,40},{-14,41},{-14,42},{-14,45},{-14,46},{-13,-39},{-13,-38},{-13,-35},{-13,-34},{-13,-33},{-13,-32},
- {-13,-29},{-13,-28},{-13,-15},{-13,-14},{-13,-5},{-13,-4},{-13,-3},{-13,-2},{-13,5},{-13,6},{-13,7},{-13,8},{-13,17},{-13,18},{-13,31},{-13,32},{-13,35},{-13,36},{-13,37},{-13,38},{-13,41},{-13,42},{-12,-39},{-12,-38},{-12,-35},{-12,-34},{-12,-33},{-12,-32},{-12,-29},{-12,-28},
- {-12,-27},{-12,-16},{-12,-15},{-12,-14},{-12,-13},{-12,-5},{-12,-4},{-12,-3},{-12,-2},{-12,5},{-12,6},{-12,7},{-12,8},{-12,16},{-12,17},{-12,18},{-12,19},{-12,30},{-12,31},{-12,32},{-12,35},{-12,36},{-12,37},{-12,38},{-12,41},{-12,42},{-11,-43},{-11,-42},{-11,-34},{-11,-33},
- {-11,-32},{-11,-29},{-11,-28},{-11,-27},{-11,-26},{-11,-23},{-11,-22},{-11,-21},{-11,-20},{-11,-17},{-11,-16},{-11,-15},{-11,-14},{-11,-13},{-11,-12},{-11,-9},{-11,-8},{-11,1},{-11,2},{-11,11},{-11,12},{-11,15},{-11,16},{-11,17},{-11,18},{-11,19},{-11,20},{-11,23},{-11,24},{-11,25},
- {-11,26},{-11,29},{-11,30},{-11,31},{-11,32},{-11,35},{-11,36},{-11,37},{-11,45},{-11,46},{-10,-44},{-10,-43},{-10,-42},{-10,-33},{-10,-32},{-10,-29},{-10,-28},{-10,-27},{-10,-26},{-10,-23},{-10,-22},{-10,-21},{-10,-20},{-10,-17},{-10,-16},{-10,-15},{-10,-14},{-10,-13},{-10,-12},{-10,-9},
- {-10,-8},{-10,-7},{-10,0},{-10,1},{-10,2},{-10,3},{-10,10},{-10,11},{-10,12},{-10,15},{-10,16},{-10,17},{-10,18},{-10,19},{-10,20},{-10,23},{-10,24},{-10,25},{-10,26},{-10,29},{-10,30},{-10,31},{-10,32},{-10,35},{-10,36},{-10,45},{-10,46},{-10,47},{-9,-45},{-9,-44},
- {-9,-43},{-9,-29},{-9,-28},{-9,-27},{-9,-23},{-9,-22},{-9,-21},{-9,-20},{-9,-17},{-9,-16},{-9,-15},{-9,-14},{-9,-13},{-9,-8},{-9,-7},{-9,-6},{-9,-5},{-9,-1},{-9,0},{-9,1},{-9,2},{-9,3},{-9,4},{-9,8},{-9,9},{-9,10},{-9,11},{-9,16},{-9,17},{-9,18},
- {-9,19},{-9,20},{-9,23},{-9,24},{-9,25},{-9,26},{-9,30},{-9,31},{-9,32},{-9,46},{-9,47},{-9,48},{-8,-45},{-8,-44},{-8,-30},{-8,-29},{-8,-28},{-8,-24},{-8,-23},{-8,-22},{-8,-21},{-8,-20},{-8,-17},{-8,-16},{-8,-15},{-8,-14},{-8,-7},{-8,-6},{-8,-5},{-8,-4},
- {-8,-1},{-8,0},{-8,1},{-8,2},{-8,3},{-8,4},{-8,7},{-8,8},{-8,9},{-8,10},{-8,17},{-8,18},{-8,19},{-8,20},{-8,23},{-8,24},{-8,25},{-8,26},{-8,27},{-8,31},{-8,32},{-8,33},{-8,47},{-8,48},{-7,-45},{-7,-44},{-7,-39},{-7,-38},{-7,-37},{-7,-36},
- {-7,-31},{-7,-30},{-7,-29},{-7,-25},{-7,-24},{-7,-23},{-7,-22},{-7,-21},{-7,-11},{-7,-10},{-7,-7},{-7,-6},{-7,-5},{-7,-4},{-7,7},{-7,8},{-7,9},{-7,10},{-7,13},{-7,14},{-7,24},{-7,25},{-7,26},{-7,27},{-7,28},{-7,32},{-7,33},{-7,34},{-7,39},{-7,40},
- {-7,41},{-7,42},{-7,47},{-7,48},{-6,-46},{-6,-45},{-6,-44},{-6,-39},{-6,-38},{-6,-37},{-6,-36},{-6,-35},{-6,-31},{-6,-30},{-6,-25},{-6,-24},{-6,-23},{-6,-22},{-6,-12},{-6,-11},{-6,-10},{-6,-6},{-6,-5},{-6,8},{-6,9},{-6,13},{-6,14},{-6,15},{-6,25},{-6,26},
- {-6,27},{-6,28},{-6,33},{-6,34},{-6,38},{-6,39},{-6,40},{-6,41},{-6,42},{-6,47},{-6,48},{-6,49},{-5,-47},{-5,-46},{-5,-45},{-5,-44},{-5,-37},{-5,-36},{-5,-35},{-5,-34},{-5,-19},{-5,-18},{-5,-13},{-5,-12},{-5,-11},{-5,-10},{-5,-1},{-5,0},{-5,1},{-5,2},
- {-5,3},{-5,4},{-5,13},{-5,14},{-5,15},{-5,16},{-5,21},{-5,22},{-5,37},{-5,38},{-5,39},{-5,40},{-5,47},{-5,48},{-5,49},{-5,50},{-4,-47},{-4,-46},{-4,-45},{-4,-44},{-4,-43},{-4,-37},{-4,-36},{-4,-35},{-4,-34},{-4,-19},{-4,-18},{-4,-17},{-4,-13},{-4,-12},
- {-4,-11},{-4,-10},{-4,-2},{-4,-1},{-4,0},{-4,1},{-4,2},{-4,3},{-4,4},{-4,5},{-4,13},{-4,14},{-4,15},{-4,16},{-4,20},{-4,21},{-4,22},{-4,37},{-4,38},{-4,39},{-4,40},{-4,46},{-4,47},{-4,48},{-4,49},{-4,50},{-3,-44},{-3,-43},{-3,-42},{-3,-41},
- {-3,-40},{-3,-37},{-3,-36},{-3,-35},{-3,-34},{-3,-31},{-3,-30},{-3,-29},{-3,-28},{-3,-25},{-3,-24},{-3,-23},{-3,-22},{-3,-18},{-3,-17},{-3,-16},{-3,-7},{-3,-6},{-3,-3},{-3,-2},{-3,-1},{-3,0},{-3,3},{-3,4},{-3,5},{-3,6},{-3,9},{-3,10},{-3,19},{-3,20},
- {-3,21},{-3,25},{-3,26},{-3,27},{-3,28},{-3,31},{-3,32},{-3,33},{-3,34},{-3,37},{-3,38},{-3,39},{-3,40},{-3,43},{-3,44},{-3,45},{-3,46},{-3,47},{-2,-43},{-2,-42},{-2,-41},{-2,-40},{-2,-37},{-2,-36},{-2,-35},{-2,-34},{-2,-31},{-2,-30},{-2,-29},{-2,-28},
- {-2,-25},{-2,-24},{-2,-23},{-2,-22},{-2,-21},{-2,-17},{-2,-16},{-2,-15},{-2,-8},{-2,-7},{-2,-6},{-2,-3},{-2,-2},{-2,-1},{-2,0},{-2,3},{-2,4},{-2,5},{-2,6},{-2,9},{-2,10},{-2,11},{-2,18},{-2,19},{-2,20},{-2,24},{-2,25},{-2,26},{-2,27},{-2,28},
- {-2,31},{-2,32},{-2,33},{-2,34},{-2,37},{-2,38},{-2,39},{-2,40},{-2,43},{-2,44},{-2,45},{-2,46},{-1,-47},{-1,-46},{-1,-43},{-1,-42},{-1,-41},{-1,-40},{-1,-37},{-1,-36},{-1,-29},{-1,-28},{-1,-25},{-1,-24},{-1,-23},{-1,-22},{-1,-21},{-1,-20},{-1,-17},{-1,-16},
- {-1,-15},{-1,-14},{-1,-13},{-1,-12},{-1,-9},{-1,-8},{-1,-7},{-1,-6},{-1,-3},{-1,-2},{-1,5},{-1,6},{-1,9},{-1,10},{-1,11},{-1,12},{-1,15},{-1,16},{-1,17},{-1,18},{-1,19},{-1,20},{-1,23},{-1,24},{-1,25},{-1,26},{-1,27},{-1,28},{-1,31},{-1,32},
- {-1,39},{-1,40},{-1,43},{-1,44},{-1,45},{-1,46},{-1,49},{-1,50},{0,-47},{0,-46},{0,-43},{0,-42},{0,-41},{0,-40},{0,-37},{0,-36},{0,-29},{0,-28},{0,-25},{0,-24},{0,-23},{0,-22},{0,-21},{0,-20},{0,-17},{0,-16},{0,-15},{0,-14},{0,-13},{0,-12},
- {0,-9},{0,-8},{0,-7},{0,-6},{0,-3},{0,-2},{0,5},{0,6},{0,9},{0,10},{0,11},{0,12},{0,15},{0,16},{0,17},{0,18},{0,19},{0,20},{0,23},{0,24},{0,25},{0,26},{0,27},{0,28},{0,31},{0,32},{0,39},{0,40},{0,43},{0,44},
- {0,45},{0,46},{0,49},{0,50},{1,-43},{1,-42},{1,-41},{1,-40},{1,-37},{1,-36},{1,-35},{1,-34},{1,-31},{1,-30},{1,-29},{1,-28},{1,-25},{1,-24},{1,-23},{1,-22},{1,-21},{1,-17},{1,-16},{1,-15},{1,-8},{1,-7},{1,-6},{1,-3},{1,-2},{1,-1},
- {1,0},{1,3},{1,4},{1,5},{1,6},{1,9},{1,10},{1,11},{1,18},{1,19},{1,20},{1,24},{1,25},{1,26},{1,27},{1,28},{1,31},{1,32},{1,33},{1,34},{1,37},{1,38},{1,39},{1,40},{1,43},{1,44},{1,45},{1,46},{2,-44},{2,-43},
- {2,-42},{2,-41},{2,-40},{2,-37},{2,-36},{2,-35},{2,-34},{2,-31},{2,-30},{2,-29},{2,-28},{2,-25},{2,-24},{2,-23},{2,-22},{2,-18},{2,-17},{2,-16},{2,-7},{2,-6},{2,-3},{2,-2},{2,-1},{2,0},{2,3},{2,4},{2,5},{2,6},{2,9},{2,10},
- {2,19},{2,20},{2,21},{2,25},{2,26},{2,27},{2,28},{2,31},{2,32},{2,33},{2,34},{2,37},{2,38},{2,39},{2,40},{2,43},{2,44},{2,45},{2,46},{2,47},{3,-47},{3,-46},{3,-45},{3,-44},{3,-43},{3,-37},{3,-36},{3,-35},{3,-34},{3,-19},
- {3,-18},{3,-17},{3,-13},{3,-12},{3,-11},{3,-10},{3,-2},{3,-1},{3,0},{3,1},{3,2},{3,3},{3,4},{3,5},{3,13},{3,14},{3,15},{3,16},{3,20},{3,21},{3,22},{3,37},{3,38},{3,39},{3,40},{3,46},{3,47},{3,48},{3,49},{3,50},
- {4,-47},{4,-46},{4,-45},{4,-44},{4,-37},{4,-36},{4,-35},{4,-34},{4,-19},{4,-18},{4,-13},{4,-12},{4,-11},{4,-10},{4,-1},{4,0},{4,1},{4,2},{4,3},{4,4},{4,13},{4,14},{4,15},{4,16},{4,21},{4,22},{4,37},{4,38},{4,39},{4,40},
- {4,47},{4,48},{4,49},{4,50},{5,-46},{5,-45},{5,-44},{5,-39},{5,-38},{5,-37},{5,-36},{5,-35},{5,-31},{5,-30},{5,-25},{5,-24},{5,-23},{5,-22},{5,-12},{5,-11},{5,-10},{5,-6},{5,-5},{5,8},{5,9},{5,13},{5,14},{5,15},{5,25},{5,26},
- {5,27},{5,28},{5,33},{5,34},{5,38},{5,39},{5,40},{5,41},{5,42},{5,47},{5,48},{5,49},{6,-45},{6,-44},{6,-39},{6,-38},{6,-37},{6,-36},{6,-31},{6,-30},{6,-29},{6,-25},{6,-24},{6,-23},{6,-22},{6,-21},{6,-11},{6,-10},{6,-7},{6,-6},
- {6,-5},{6,-4},{6,7},{6,8},{6,9},{6,10},{6,13},{6,14},{6,24},{6,25},{6,26},{6,27},{6,28},{6,32},{6,33},{6,34},{6,39},{6,40},{6,41},{6,42},{6,47},{6,48},{7,-45},{7,-44},{7,-30},{7,-29},{7,-28},{7,-24},{7,-23},{7,-22},
- {7,-21},{7,-20},{7,-17},{7,-16},{7,-15},{7,-14},{7,-7},{7,-6},{7,-5},{7,-4},{7,-1},{7,0},{7,1},{7,2},{7,3},{7,4},{7,7},{7,8},{7,9},{7,10},{7,17},{7,18},{7,19},{7,20},{7,23},{7,24},{7,25},{7,26},{7,27},{7,31},
- {7,32},{7,33},{7,47},{7,48},{8,-45},{8,-44},{8,-43},{8,-29},{8,-28},{8,-27},{8,-23},{8,-22},{8,-21},{8,-20},{8,-17},{8,-16},{8,-15},{8,-14},{8,-13},{8,-8},{8,-7},{8,-6},{8,-5},{8,-1},{8,0},{8,1},{8,2},{8,3},{8,4},{8,8},
- {8,9},{8,10},{8,11},{8,16},{8,17},{8,18},{8,19},{8,20},{8,23},{8,24},{8,25},{8,26},{8,30},{8,31},{8,32},{8,46},{8,47},{8,48},{9,-44},{9,-43},{9,-42},{9,-33},{9,-32},{9,-29},{9,-28},{9,-27},{9,-26},{9,-23},{9,-22},{9,-21},
- {9,-20},{9,-17},{9,-16},{9,-15},{9,-14},{9,-13},{9,-12},{9,-9},{9,-8},{9,-7},{9,0},{9,1},{9,2},{9,3},{9,10},{9,11},{9,12},{9,15},{9,16},{9,17},{9,18},{9,19},{9,20},{9,23},{9,24},{9,25},{9,26},{9,29},{9,30},{9,31},
- {9,32},{9,35},{9,36},{9,45},{9,46},{9,47},{10,-43},{10,-42},{10,-34},{10,-33},{10,-32},{10,-29},{10,-28},{10,-27},{10,-26},{10,-23},{10,-22},{10,-21},{10,-20},{10,-17},{10,-16},{10,-15},{10,-14},{10,-13},{10,-12},{10,-9},{10,-8},{10,1},{10,2},{10,11},
- {10,12},{10,15},{10,16},{10,17},{10,18},{10,19},{10,20},{10,23},{10,24},{10,25},{10,26},{10,29},{10,30},{10,31},{10,32},{10,35},{10,36},{10,37},{10,45},{10,46},{11,-39},{11,-38},{11,-35},{11,-34},{11,-33},{11,-32},{11,-29},{11,-28},{11,-27},{11,-16},
- {11,-15},{11,-14},{11,-13},{11,-5},{11,-4},{11,-3},{11,-2},{11,5},{11,6},{11,7},{11,8},{11,16},{11,17},{11,18},{11,19},{11,30},{11,31},{11,32},{11,35},{11,36},{11,37},{11,38},{11,41},{11,42},{12,-39},{12,-38},{12,-35},{12,-34},{12,-33},{12,-32},
- {12,-29},{12,-28},{12,-15},{12,-14},{12,-5},{12,-4},{12,-3},{12,-2},{12,5},{12,6},{12,7},{12,8},{12,17},{12,18},{12,31},{12,32},{12,35},{12,36},{12,37},{12,38},{12,41},{12,42},{13,-43},{13,-42},{13,-39},{13,-38},{13,-37},{13,-36},{13,-35},{13,-34},
- {13,-33},{13,-19},{13,-18},{13,-9},{13,-8},{13,-4},{13,-3},{13,-2},{13,1},{13,2},{13,5},{13,6},{13,7},{13,11},{13,12},{13,21},{13,22},{13,36},{13,37},{13,38},{13,39},{13,40},{13,41},{13,42},{13,45},{13,46},{14,-43},{14,-42},{14,-39},{14,-38},
- {14,-37},{14,-36},{14,-35},{14,-34},{14,-20},{14,-19},{14,-18},{14,-17},{14,-10},{14,-9},{14,-8},{14,-7},{14,-3},{14,-2},{14,1},{14,2},{14,5},{14,6},{14,10},{14,11},{14,12},{14,13},{14,20},{14,21},{14,22},{14,23},{14,37},{14,38},{14,39},{14,40},
- {14,41},{14,42},{14,45},{14,46},{15,-43},{15,-42},{15,-31},{15,-30},{15,-27},{15,-26},{15,-21},{15,-20},{15,-19},{15,-18},{15,-17},{15,-16},{15,-15},{15,-14},{15,-11},{15,-10},{15,-9},{15,-8},{15,-7},{15,-6},{15,1},{15,2},{15,9},{15,10},{15,11},{15,12},
- {15,13},{15,14},{15,17},{15,18},{15,19},{15,20},{15,21},{15,22},{15,23},{15,24},{15,29},{15,30},{15,33},{15,34},{15,45},{15,46},{16,-43},{16,-42},{16,-32},{16,-31},{16,-30},{16,-27},{16,-26},{16,-25},{16,-21},{16,-20},{16,-19},{16,-18},{16,-17},{16,-16},
- {16,-15},{16,-14},{16,-11},{16,-10},{16,-9},{16,-8},{16,-7},{16,-6},{16,0},{16,1},{16,2},{16,3},{16,9},{16,10},{16,11},{16,12},{16,13},{16,14},{16,17},{16,18},{16,19},{16,20},{16,21},{16,22},{16,23},{16,24},{16,28},{16,29},{16,30},{16,33},
- {16,34},{16,35},{16,45},{16,46},{17,-43},{17,-42},{17,-35},{17,-34},{17,-33},{17,-32},{17,-31},{17,-26},{17,-25},{17,-24},{17,-15},{17,-14},{17,-10},{17,-9},{17,-8},{17,-7},{17,-6},{17,-1},{17,0},{17,1},{17,2},{17,3},{17,4},{17,9},{17,10},{17,11},
- {17,12},{17,13},{17,17},{17,18},{17,27},{17,28},{17,29},{17,34},{17,35},{17,36},{17,37},{17,38},{17,45},{17,46},{18,-43},{18,-42},{18,-41},{18,-35},{18,-34},{18,-33},{18,-32},{18,-25},{18,-24},{18,-23},{18,-15},{18,-14},{18,-13},{18,-9},{18,-8},{18,-7},
- {18,-6},{18,-2},{18,-1},{18,0},{18,1},{18,2},{18,3},{18,4},{18,5},{18,9},{18,10},{18,11},{18,12},{18,16},{18,17},{18,18},{18,26},{18,27},{18,28},{18,35},{18,36},{18,37},{18,38},{18,44},{18,45},{18,46},{19,-42},{19,-41},{19,-40},{19,-39},
- {19,-38},{19,-29},{19,-28},{19,-25},{19,-24},{19,-23},{19,-22},{19,-21},{19,-20},{19,-19},{19,-18},{19,-15},{19,-14},{19,-13},{19,-12},{19,-3},{19,-2},{19,-1},{19,4},{19,5},{19,6},{19,15},{19,16},{19,17},{19,18},{19,21},{19,22},{19,23},{19,24},{19,25},
- {19,26},{19,27},{19,28},{19,31},{19,32},{19,41},{19,42},{19,43},{19,44},{19,45},{20,-41},{20,-40},{20,-39},{20,-38},{20,-37},{20,-29},{20,-28},{20,-25},{20,-24},{20,-23},{20,-22},{20,-21},{20,-20},{20,-19},{20,-18},{20,-15},{20,-14},{20,-13},{20,-12},{20,-3},
- {20,-2},{20,5},{20,6},{20,15},{20,16},{20,17},{20,18},{20,21},{20,22},{20,23},{20,24},{20,25},{20,26},{20,27},{20,28},{20,31},{20,32},{20,40},{20,41},{20,42},{20,43},{20,44},{21,-38},{21,-37},{21,-36},{21,-29},{21,-28},{21,-19},{21,-18},{21,-15},
- {21,-14},{21,-13},{21,-9},{21,-8},{21,-7},{21,-6},{21,1},{21,2},{21,9},{21,10},{21,11},{21,12},{21,16},{21,17},{21,18},{21,21},{21,22},{21,31},{21,32},{21,39},{21,40},{21,41},{22,-37},{22,-36},{22,-30},{22,-29},{22,-28},{22,-19},{22,-18},{22,-15},
- {22,-14},{22,-9},{22,-8},{22,-7},{22,-6},{22,-5},{22,0},{22,1},{22,2},{22,3},{22,8},{22,9},{22,10},{22,11},{22,12},{22,17},{22,18},{22,21},{22,22},{22,31},{22,32},{22,33},{22,39},{22,40},{23,-33},{23,-32},{23,-31},{23,-30},{23,-29},{23,-25},
- {23,-24},{23,-23},{23,-22},{23,-19},{23,-18},{23,-9},{23,-8},{23,-7},{23,-6},{23,-5},{23,-4},{23,-1},{23,0},{23,1},{23,2},{23,3},{23,4},{23,7},{23,8},{23,9},{23,10},{23,11},{23,12},{23,21},{23,22},{23,25},{23,26},{23,27},{23,28},{23,32},
- {23,33},{23,34},{23,35},{23,36},{24,-33},{24,-32},{24,-31},{24,-30},{24,-25},{24,-24},{24,-23},{24,-22},{24,-19},{24,-18},{24,-17},{24,-9},{24,-8},{24,-7},{24,-6},{24,-5},{24,-4},{24,-1},{24,0},{24,1},{24,2},{24,3},{24,4},{24,7},{24,8},{24,9},
- {24,10},{24,11},{24,12},{24,20},{24,21},{24,22},{24,25},{24,26},{24,27},{24,28},{24,33},{24,34},{24,35},{24,36},{25,-39},{25,-38},{25,-37},{25,-36},{25,-24},{25,-23},{25,-22},{25,-19},{25,-18},{25,-17},{25,-16},{25,-6},{25,-5},{25,-4},{25,-1},{25,0},
- {25,1},{25,2},{25,3},{25,4},{25,7},{25,8},{25,9},{25,19},{25,20},{25,21},{25,22},{25,25},{25,26},{25,27},{25,39},{25,40},{25,41},{25,42},{26,-39},{26,-38},{26,-37},{26,-36},{26,-23},{26,-22},{26,-19},{26,-18},{26,-17},{26,-16},{26,-15},{26,-5},
- {26,-4},{26,-1},{26,0},{26,1},{26,2},{26,3},{26,4},{26,7},{26,8},{26,18},{26,19},{26,20},{26,21},{26,22},{26,25},{26,26},{26,39},{26,40},{26,41},{26,42},{27,-38},{27,-37},{27,-36},{27,-29},{27,-28},{27,-27},{27,-26},{27,-16},{27,-15},{27,-14},
- {27,-9},{27,-8},{27,11},{27,12},{27,17},{27,18},{27,19},{27,29},{27,30},{27,31},{27,32},{27,39},{27,40},{27,41},{28,-37},{28,-36},{28,-30},{28,-29},{28,-28},{28,-27},{28,-26},{28,-15},{28,-14},{28,-10},{28,-9},{28,-8},{28,-7},{28,10},{28,11},{28,12},
- {28,13},{28,17},{28,18},{28,29},{28,30},{28,31},{28,32},{28,33},{28,39},{28,40},{29,-33},{29,-32},{29,-31},{29,-30},{29,-29},{29,-28},{29,-27},{29,-26},{29,-21},{29,-20},{29,-19},{29,-18},{29,-11},{29,-10},{29,-9},{29,-8},{29,-7},{29,-6},{29,-1},{29,0},
- {29,1},{29,2},{29,3},{29,4},{29,9},{29,10},{29,11},{29,12},{29,13},{29,14},{29,21},{29,22},{29,23},{29,24},{29,29},{29,30},{29,31},{29,32},{29,33},{29,34},{29,35},{29,36},{30,-33},{30,-32},{30,-31},{30,-30},{30,-29},{30,-28},{30,-27},{30,-26},
- {30,-22},{30,-21},{30,-20},{30,-19},{30,-18},{30,-11},{30,-10},{30,-9},{30,-8},{30,-7},{30,-6},{30,-5},{30,-1},{30,0},{30,1},{30,2},{30,3},{30,4},{30,8},{30,9},{30,10},{30,11},{30,12},{30,13},{30,14},{30,21},{30,22},{30,23},{30,24},{30,25},
- {30,29},{30,30},{30,31},{30,32},{30,33},{30,34},{30,35},{30,36},{31,-32},{31,-31},{31,-30},{31,-29},{31,-28},{31,-27},{31,-23},{31,-22},{31,-21},{31,-15},{31,-14},{31,-6},{31,-5},{31,-4},{31,-1},{31,0},{31,3},{31,4},{31,7},{31,8},{31,9},{31,17},
- {31,18},{31,24},{31,25},{31,26},{31,30},{31,31},{31,32},{31,33},{31,34},{31,35},{32,-31},{32,-30},{32,-29},{32,-28},{32,-23},{32,-22},{32,-16},{32,-15},{32,-14},{32,-5},{32,-4},{32,-1},{32,0},{32,3},{32,4},{32,7},{32,8},{32,17},{32,18},{32,19},
- {32,25},{32,26},{32,31},{32,32},{32,33},{32,34},{33,-30},{33,-29},{33,-28},{33,-23},{33,-22},{33,-17},{33,-16},{33,-15},{33,-11},{33,-10},{33,-9},{33,-8},{33,11},{33,12},{33,13},{33,14},{33,18},{33,19},{33,20},{33,25},{33,26},{33,31},{33,32},{33,33},
- {34,-29},{34,-28},{34,-23},{34,-22},{34,-17},{34,-16},{34,-12},{34,-11},{34,-10},{34,-9},{34,-8},{34,11},{34,12},{34,13},{34,14},{34,15},{34,19},{34,20},{34,25},{34,26},{34,31},{34,32},{35,-17},{35,-16},{35,-13},{35,-12},{35,-11},{35,-10},{35,-9},{35,-3},
- {35,-2},{35,-1},{35,0},{35,3},{35,4},{35,5},{35,6},{35,12},{35,13},{35,14},{35,15},{35,16},{35,19},{35,20},{36,-17},{36,-16},{36,-13},{36,-12},{36,-11},{36,-10},{36,-4},{36,-3},{36,-2},{36,-1},{36,0},{36,3},{36,4},{36,5},{36,6},{36,7},
- {36,13},{36,14},{36,15},{36,16},{36,19},{36,20},{37,-27},{37,-26},{37,-25},{37,-24},{37,-21},{37,-20},{37,-13},{37,-12},{37,-5},{37,-4},{37,-3},{37,-2},{37,-1},{37,0},{37,1},{37,2},{37,3},{37,4},{37,5},{37,6},{37,7},{37,8},{37,15},{37,16},
- {37,23},{37,24},{37,27},{37,28},{37,29},{37,30},{38,-27},{38,-26},{38,-25},{38,-24},{38,-21},{38,-20},{38,-19},{38,-13},{38,-12},{38,-5},{38,-4},{38,-3},{38,-2},{38,-1},{38,0},{38,1},{38,2},{38,3},{38,4},{38,5},{38,6},{38,7},{38,8},{38,15},
- {38,16},{38,22},{38,23},{38,24},{38,27},{38,28},{38,29},{38,30},{39,-26},{39,-25},{39,-24},{39,-20},{39,-19},{39,-18},{39,-13},{39,-12},{39,-11},{39,-10},{39,-5},{39,-4},{39,7},{39,8},{39,13},{39,14},{39,15},{39,16},{39,21},{39,22},{39,23},{39,27},
- {39,28},{39,29},{40,-25},{40,-24},{40,-19},{40,-18},{40,-13},{40,-12},{40,-11},{40,-10},{40,-5},{40,-4},{40,7},{40,8},{40,13},{40,14},{40,15},{40,16},{40,21},{40,22},{40,27},{40,28},{41,-19},{41,-18},{41,-1},{41,0},{41,1},{41,2},{41,3},{41,4},
- {41,21},{41,22},{42,-19},{42,-18},{42,-17},{42,-1},{42,0},{42,1},{42,2},{42,3},{42,4},{42,20},{42,21},{42,22},{43,-18},{43,-17},{43,-16},{43,-15},{43,-14},{43,-13},{43,-12},{43,-9},{43,-8},{43,-1},{43,0},{43,1},{43,2},{43,3},{43,4},{43,11},
- {43,12},{43,15},{43,16},{43,17},{43,18},{43,19},{43,20},{43,21},{44,-17},{44,-16},{44,-15},{44,-14},{44,-13},{44,-12},{44,-9},{44,-8},{44,-7},{44,-2},{44,-1},{44,0},{44,1},{44,2},{44,3},{44,4},{44,5},{44,10},{44,11},{44,12},{44,15},{44,16},
- {44,17},{44,18},{44,19},{44,20},{45,-8},{45,-7},{45,-6},{45,-5},{45,-4},{45,-3},{45,-2},{45,-1},{45,4},{45,5},{45,6},{45,7},{45,8},{45,9},{45,10},{45,11},{46,-7},{46,-6},{46,-5},{46,-4},{46,-3},{46,-2},{46,5},{46,6},{46,7},{46,8},
- {46,9},{46,10},{47,-4},{47,-3},{47,-2},{47,1},{47,2},{47,5},{47,6},{47,7},{48,-3},{48,-2},{48,1},{48,2},{48,5},{48,6}
+ pattern = {
+ enabled = true, --- @settings enabled Weather pattern tiles will be added to spawn
+ pattern_tile = 'stone-path', --- @setting pattern_tile The tile to be used for the pattern
+ offset = { x=0, y=-2 }, --- @settings offset The position offset to apply to pattern tiles
+ locations = { --- @setting locations The location of the pattern tiles {x,y}
+ {-49,-3},{-49,-2},{-49,1},{-49,2},{-49,5},{-49,6},{-48,-4},{-48,-3},{-48,-2},{-48,1},{-48,2},{-48,5},{-48,6},{-48,7},{-47,-7},{-47,-6},{-47,-5},{-47,-4},{-47,-3},{-47,-2},{-47,5},{-47,6},{-47,7},{-47,8},{-47,9},{-47,10},{-46,-8},{-46,-7},{-46,-6},{-46,-5},
+ {-46,-4},{-46,-3},{-46,-2},{-46,-1},{-46,4},{-46,5},{-46,6},{-46,7},{-46,8},{-46,9},{-46,10},{-46,11},{-45,-17},{-45,-16},{-45,-15},{-45,-14},{-45,-13},{-45,-12},{-45,-9},{-45,-8},{-45,-7},{-45,-2},{-45,-1},{-45,0},{-45,1},{-45,2},{-45,3},{-45,4},{-45,5},{-45,10},
+ {-45,11},{-45,12},{-45,15},{-45,16},{-45,17},{-45,18},{-45,19},{-45,20},{-44,-18},{-44,-17},{-44,-16},{-44,-15},{-44,-14},{-44,-13},{-44,-12},{-44,-9},{-44,-8},{-44,-1},{-44,0},{-44,1},{-44,2},{-44,3},{-44,4},{-44,11},{-44,12},{-44,15},{-44,16},{-44,17},{-44,18},{-44,19},
+ {-44,20},{-44,21},{-43,-19},{-43,-18},{-43,-17},{-43,-1},{-43,0},{-43,1},{-43,2},{-43,3},{-43,4},{-43,20},{-43,21},{-43,22},{-42,-19},{-42,-18},{-42,-1},{-42,0},{-42,1},{-42,2},{-42,3},{-42,4},{-42,21},{-42,22},{-41,-25},{-41,-24},{-41,-19},{-41,-18},{-41,-13},{-41,-12},
+ {-41,-11},{-41,-10},{-41,-5},{-41,-4},{-41,7},{-41,8},{-41,13},{-41,14},{-41,15},{-41,16},{-41,21},{-41,22},{-41,27},{-41,28},{-40,-26},{-40,-25},{-40,-24},{-40,-20},{-40,-19},{-40,-18},{-40,-13},{-40,-12},{-40,-11},{-40,-10},{-40,-5},{-40,-4},{-40,7},{-40,8},{-40,13},{-40,14},
+ {-40,15},{-40,16},{-40,21},{-40,22},{-40,23},{-40,27},{-40,28},{-40,29},{-39,-27},{-39,-26},{-39,-25},{-39,-24},{-39,-21},{-39,-20},{-39,-19},{-39,-13},{-39,-12},{-39,-5},{-39,-4},{-39,-3},{-39,-2},{-39,-1},{-39,0},{-39,1},{-39,2},{-39,3},{-39,4},{-39,5},{-39,6},{-39,7},
+ {-39,8},{-39,15},{-39,16},{-39,22},{-39,23},{-39,24},{-39,27},{-39,28},{-39,29},{-39,30},{-38,-27},{-38,-26},{-38,-25},{-38,-24},{-38,-21},{-38,-20},{-38,-13},{-38,-12},{-38,-5},{-38,-4},{-38,-3},{-38,-2},{-38,-1},{-38,0},{-38,1},{-38,2},{-38,3},{-38,4},{-38,5},{-38,6},
+ {-38,7},{-38,8},{-38,15},{-38,16},{-38,23},{-38,24},{-38,27},{-38,28},{-38,29},{-38,30},{-37,-17},{-37,-16},{-37,-13},{-37,-12},{-37,-11},{-37,-10},{-37,-4},{-37,-3},{-37,-2},{-37,-1},{-37,0},{-37,3},{-37,4},{-37,5},{-37,6},{-37,7},{-37,13},{-37,14},{-37,15},{-37,16},
+ {-37,19},{-37,20},{-36,-17},{-36,-16},{-36,-13},{-36,-12},{-36,-11},{-36,-10},{-36,-9},{-36,-3},{-36,-2},{-36,-1},{-36,0},{-36,3},{-36,4},{-36,5},{-36,6},{-36,12},{-36,13},{-36,14},{-36,15},{-36,16},{-36,19},{-36,20},{-35,-29},{-35,-28},{-35,-23},{-35,-22},{-35,-17},{-35,-16},
+ {-35,-12},{-35,-11},{-35,-10},{-35,-9},{-35,-8},{-35,11},{-35,12},{-35,13},{-35,14},{-35,15},{-35,19},{-35,20},{-35,25},{-35,26},{-35,31},{-35,32},{-34,-30},{-34,-29},{-34,-28},{-34,-23},{-34,-22},{-34,-17},{-34,-16},{-34,-15},{-34,-11},{-34,-10},{-34,-9},{-34,-8},{-34,11},{-34,12},
+ {-34,13},{-34,14},{-34,18},{-34,19},{-34,20},{-34,25},{-34,26},{-34,31},{-34,32},{-34,33},{-33,-31},{-33,-30},{-33,-29},{-33,-28},{-33,-23},{-33,-22},{-33,-16},{-33,-15},{-33,-14},{-33,-5},{-33,-4},{-33,-1},{-33,0},{-33,3},{-33,4},{-33,7},{-33,8},{-33,17},{-33,18},{-33,19},
+ {-33,25},{-33,26},{-33,31},{-33,32},{-33,33},{-33,34},{-32,-32},{-32,-31},{-32,-30},{-32,-29},{-32,-28},{-32,-27},{-32,-23},{-32,-22},{-32,-21},{-32,-15},{-32,-14},{-32,-6},{-32,-5},{-32,-4},{-32,-1},{-32,0},{-32,3},{-32,4},{-32,7},{-32,8},{-32,9},{-32,17},{-32,18},{-32,24},
+ {-32,25},{-32,26},{-32,30},{-32,31},{-32,32},{-32,33},{-32,34},{-32,35},{-31,-33},{-31,-32},{-31,-31},{-31,-30},{-31,-29},{-31,-28},{-31,-27},{-31,-26},{-31,-22},{-31,-21},{-31,-20},{-31,-19},{-31,-18},{-31,-11},{-31,-10},{-31,-9},{-31,-8},{-31,-7},{-31,-6},{-31,-5},{-31,-1},{-31,0},
+ {-31,1},{-31,2},{-31,3},{-31,4},{-31,8},{-31,9},{-31,10},{-31,11},{-31,12},{-31,13},{-31,14},{-31,21},{-31,22},{-31,23},{-31,24},{-31,25},{-31,29},{-31,30},{-31,31},{-31,32},{-31,33},{-31,34},{-31,35},{-31,36},{-30,-33},{-30,-32},{-30,-31},{-30,-30},{-30,-29},{-30,-28},
+ {-30,-27},{-30,-26},{-30,-21},{-30,-20},{-30,-19},{-30,-18},{-30,-11},{-30,-10},{-30,-9},{-30,-8},{-30,-7},{-30,-6},{-30,-1},{-30,0},{-30,1},{-30,2},{-30,3},{-30,4},{-30,9},{-30,10},{-30,11},{-30,12},{-30,13},{-30,14},{-30,21},{-30,22},{-30,23},{-30,24},{-30,29},{-30,30},
+ {-30,31},{-30,32},{-30,33},{-30,34},{-30,35},{-30,36},{-29,-37},{-29,-36},{-29,-30},{-29,-29},{-29,-28},{-29,-27},{-29,-26},{-29,-15},{-29,-14},{-29,-10},{-29,-9},{-29,-8},{-29,-7},{-29,10},{-29,11},{-29,12},{-29,13},{-29,17},{-29,18},{-29,29},{-29,30},{-29,31},{-29,32},{-29,33},
+ {-29,39},{-29,40},{-28,-38},{-28,-37},{-28,-36},{-28,-29},{-28,-28},{-28,-27},{-28,-26},{-28,-16},{-28,-15},{-28,-14},{-28,-9},{-28,-8},{-28,11},{-28,12},{-28,17},{-28,18},{-28,19},{-28,29},{-28,30},{-28,31},{-28,32},{-28,39},{-28,40},{-28,41},{-27,-39},{-27,-38},{-27,-37},{-27,-36},
+ {-27,-23},{-27,-22},{-27,-19},{-27,-18},{-27,-17},{-27,-16},{-27,-15},{-27,-5},{-27,-4},{-27,-1},{-27,0},{-27,1},{-27,2},{-27,3},{-27,4},{-27,7},{-27,8},{-27,18},{-27,19},{-27,20},{-27,21},{-27,22},{-27,25},{-27,26},{-27,39},{-27,40},{-27,41},{-27,42},{-26,-39},{-26,-38},
+ {-26,-37},{-26,-36},{-26,-24},{-26,-23},{-26,-22},{-26,-19},{-26,-18},{-26,-17},{-26,-16},{-26,-6},{-26,-5},{-26,-4},{-26,-1},{-26,0},{-26,1},{-26,2},{-26,3},{-26,4},{-26,7},{-26,8},{-26,9},{-26,19},{-26,20},{-26,21},{-26,22},{-26,25},{-26,26},{-26,27},{-26,39},{-26,40},
+ {-26,41},{-26,42},{-25,-33},{-25,-32},{-25,-31},{-25,-30},{-25,-25},{-25,-24},{-25,-23},{-25,-22},{-25,-19},{-25,-18},{-25,-17},{-25,-9},{-25,-8},{-25,-7},{-25,-6},{-25,-5},{-25,-4},{-25,-1},{-25,0},{-25,1},{-25,2},{-25,3},{-25,4},{-25,7},{-25,8},{-25,9},{-25,10},{-25,11},
+ {-25,12},{-25,20},{-25,21},{-25,22},{-25,25},{-25,26},{-25,27},{-25,28},{-25,33},{-25,34},{-25,35},{-25,36},{-24,-33},{-24,-32},{-24,-31},{-24,-30},{-24,-29},{-24,-25},{-24,-24},{-24,-23},{-24,-22},{-24,-19},{-24,-18},{-24,-9},{-24,-8},{-24,-7},{-24,-6},{-24,-5},{-24,-4},{-24,-1},
+ {-24,0},{-24,1},{-24,2},{-24,3},{-24,4},{-24,7},{-24,8},{-24,9},{-24,10},{-24,11},{-24,12},{-24,21},{-24,22},{-24,25},{-24,26},{-24,27},{-24,28},{-24,32},{-24,33},{-24,34},{-24,35},{-24,36},{-23,-37},{-23,-36},{-23,-30},{-23,-29},{-23,-28},{-23,-19},{-23,-18},{-23,-15},
+ {-23,-14},{-23,-9},{-23,-8},{-23,-7},{-23,-6},{-23,-5},{-23,0},{-23,1},{-23,2},{-23,3},{-23,8},{-23,9},{-23,10},{-23,11},{-23,12},{-23,17},{-23,18},{-23,21},{-23,22},{-23,31},{-23,32},{-23,33},{-23,39},{-23,40},{-22,-38},{-22,-37},{-22,-36},{-22,-29},{-22,-28},{-22,-19},
+ {-22,-18},{-22,-15},{-22,-14},{-22,-13},{-22,-9},{-22,-8},{-22,-7},{-22,-6},{-22,1},{-22,2},{-22,9},{-22,10},{-22,11},{-22,12},{-22,16},{-22,17},{-22,18},{-22,21},{-22,22},{-22,31},{-22,32},{-22,39},{-22,40},{-22,41},{-21,-41},{-21,-40},{-21,-39},{-21,-38},{-21,-37},{-21,-29},
+ {-21,-28},{-21,-25},{-21,-24},{-21,-23},{-21,-22},{-21,-21},{-21,-20},{-21,-19},{-21,-18},{-21,-15},{-21,-14},{-21,-13},{-21,-12},{-21,-3},{-21,-2},{-21,5},{-21,6},{-21,15},{-21,16},{-21,17},{-21,18},{-21,21},{-21,22},{-21,23},{-21,24},{-21,25},{-21,26},{-21,27},{-21,28},{-21,31},
+ {-21,32},{-21,40},{-21,41},{-21,42},{-21,43},{-21,44},{-20,-42},{-20,-41},{-20,-40},{-20,-39},{-20,-38},{-20,-29},{-20,-28},{-20,-25},{-20,-24},{-20,-23},{-20,-22},{-20,-21},{-20,-20},{-20,-19},{-20,-18},{-20,-15},{-20,-14},{-20,-13},{-20,-12},{-20,-3},{-20,-2},{-20,-1},{-20,4},{-20,5},
+ {-20,6},{-20,15},{-20,16},{-20,17},{-20,18},{-20,21},{-20,22},{-20,23},{-20,24},{-20,25},{-20,26},{-20,27},{-20,28},{-20,31},{-20,32},{-20,41},{-20,42},{-20,43},{-20,44},{-20,45},{-19,-43},{-19,-42},{-19,-41},{-19,-35},{-19,-34},{-19,-33},{-19,-32},{-19,-25},{-19,-24},{-19,-23},
+ {-19,-15},{-19,-14},{-19,-13},{-19,-9},{-19,-8},{-19,-7},{-19,-6},{-19,-2},{-19,-1},{-19,0},{-19,1},{-19,2},{-19,3},{-19,4},{-19,5},{-19,9},{-19,10},{-19,11},{-19,12},{-19,16},{-19,17},{-19,18},{-19,26},{-19,27},{-19,28},{-19,35},{-19,36},{-19,37},{-19,38},{-19,44},
+ {-19,45},{-19,46},{-18,-43},{-18,-42},{-18,-35},{-18,-34},{-18,-33},{-18,-32},{-18,-31},{-18,-26},{-18,-25},{-18,-24},{-18,-15},{-18,-14},{-18,-10},{-18,-9},{-18,-8},{-18,-7},{-18,-6},{-18,-1},{-18,0},{-18,1},{-18,2},{-18,3},{-18,4},{-18,9},{-18,10},{-18,11},{-18,12},{-18,13},
+ {-18,17},{-18,18},{-18,27},{-18,28},{-18,29},{-18,34},{-18,35},{-18,36},{-18,37},{-18,38},{-18,45},{-18,46},{-17,-43},{-17,-42},{-17,-32},{-17,-31},{-17,-30},{-17,-27},{-17,-26},{-17,-25},{-17,-21},{-17,-20},{-17,-19},{-17,-18},{-17,-17},{-17,-16},{-17,-15},{-17,-14},{-17,-11},{-17,-10},
+ {-17,-9},{-17,-8},{-17,-7},{-17,-6},{-17,0},{-17,1},{-17,2},{-17,3},{-17,9},{-17,10},{-17,11},{-17,12},{-17,13},{-17,14},{-17,17},{-17,18},{-17,19},{-17,20},{-17,21},{-17,22},{-17,23},{-17,24},{-17,28},{-17,29},{-17,30},{-17,33},{-17,34},{-17,35},{-17,45},{-17,46},
+ {-16,-43},{-16,-42},{-16,-31},{-16,-30},{-16,-27},{-16,-26},{-16,-21},{-16,-20},{-16,-19},{-16,-18},{-16,-17},{-16,-16},{-16,-15},{-16,-14},{-16,-11},{-16,-10},{-16,-9},{-16,-8},{-16,-7},{-16,-6},{-16,1},{-16,2},{-16,9},{-16,10},{-16,11},{-16,12},{-16,13},{-16,14},{-16,17},{-16,18},
+ {-16,19},{-16,20},{-16,21},{-16,22},{-16,23},{-16,24},{-16,29},{-16,30},{-16,33},{-16,34},{-16,45},{-16,46},{-15,-43},{-15,-42},{-15,-39},{-15,-38},{-15,-37},{-15,-36},{-15,-35},{-15,-34},{-15,-20},{-15,-19},{-15,-18},{-15,-17},{-15,-10},{-15,-9},{-15,-8},{-15,-7},{-15,-3},{-15,-2},
+ {-15,1},{-15,2},{-15,5},{-15,6},{-15,10},{-15,11},{-15,12},{-15,13},{-15,20},{-15,21},{-15,22},{-15,23},{-15,37},{-15,38},{-15,39},{-15,40},{-15,41},{-15,42},{-15,45},{-15,46},{-14,-43},{-14,-42},{-14,-39},{-14,-38},{-14,-37},{-14,-36},{-14,-35},{-14,-34},{-14,-33},{-14,-19},
+ {-14,-18},{-14,-9},{-14,-8},{-14,-4},{-14,-3},{-14,-2},{-14,1},{-14,2},{-14,5},{-14,6},{-14,7},{-14,11},{-14,12},{-14,21},{-14,22},{-14,36},{-14,37},{-14,38},{-14,39},{-14,40},{-14,41},{-14,42},{-14,45},{-14,46},{-13,-39},{-13,-38},{-13,-35},{-13,-34},{-13,-33},{-13,-32},
+ {-13,-29},{-13,-28},{-13,-15},{-13,-14},{-13,-5},{-13,-4},{-13,-3},{-13,-2},{-13,5},{-13,6},{-13,7},{-13,8},{-13,17},{-13,18},{-13,31},{-13,32},{-13,35},{-13,36},{-13,37},{-13,38},{-13,41},{-13,42},{-12,-39},{-12,-38},{-12,-35},{-12,-34},{-12,-33},{-12,-32},{-12,-29},{-12,-28},
+ {-12,-27},{-12,-16},{-12,-15},{-12,-14},{-12,-13},{-12,-5},{-12,-4},{-12,-3},{-12,-2},{-12,5},{-12,6},{-12,7},{-12,8},{-12,16},{-12,17},{-12,18},{-12,19},{-12,30},{-12,31},{-12,32},{-12,35},{-12,36},{-12,37},{-12,38},{-12,41},{-12,42},{-11,-43},{-11,-42},{-11,-34},{-11,-33},
+ {-11,-32},{-11,-29},{-11,-28},{-11,-27},{-11,-26},{-11,-23},{-11,-22},{-11,-21},{-11,-20},{-11,-17},{-11,-16},{-11,-15},{-11,-14},{-11,-13},{-11,-12},{-11,-9},{-11,-8},{-11,1},{-11,2},{-11,11},{-11,12},{-11,15},{-11,16},{-11,17},{-11,18},{-11,19},{-11,20},{-11,23},{-11,24},{-11,25},
+ {-11,26},{-11,29},{-11,30},{-11,31},{-11,32},{-11,35},{-11,36},{-11,37},{-11,45},{-11,46},{-10,-44},{-10,-43},{-10,-42},{-10,-33},{-10,-32},{-10,-29},{-10,-28},{-10,-27},{-10,-26},{-10,-23},{-10,-22},{-10,-21},{-10,-20},{-10,-17},{-10,-16},{-10,-15},{-10,-14},{-10,-13},{-10,-12},{-10,-9},
+ {-10,-8},{-10,-7},{-10,0},{-10,1},{-10,2},{-10,3},{-10,10},{-10,11},{-10,12},{-10,15},{-10,16},{-10,17},{-10,18},{-10,19},{-10,20},{-10,23},{-10,24},{-10,25},{-10,26},{-10,29},{-10,30},{-10,31},{-10,32},{-10,35},{-10,36},{-10,45},{-10,46},{-10,47},{-9,-45},{-9,-44},
+ {-9,-43},{-9,-29},{-9,-28},{-9,-27},{-9,-23},{-9,-22},{-9,-21},{-9,-20},{-9,-17},{-9,-16},{-9,-15},{-9,-14},{-9,-13},{-9,-8},{-9,-7},{-9,-6},{-9,-5},{-9,-1},{-9,0},{-9,1},{-9,2},{-9,3},{-9,4},{-9,8},{-9,9},{-9,10},{-9,11},{-9,16},{-9,17},{-9,18},
+ {-9,19},{-9,20},{-9,23},{-9,24},{-9,25},{-9,26},{-9,30},{-9,31},{-9,32},{-9,46},{-9,47},{-9,48},{-8,-45},{-8,-44},{-8,-30},{-8,-29},{-8,-28},{-8,-24},{-8,-23},{-8,-22},{-8,-21},{-8,-20},{-8,-17},{-8,-16},{-8,-15},{-8,-14},{-8,-7},{-8,-6},{-8,-5},{-8,-4},
+ {-8,-1},{-8,0},{-8,1},{-8,2},{-8,3},{-8,4},{-8,7},{-8,8},{-8,9},{-8,10},{-8,17},{-8,18},{-8,19},{-8,20},{-8,23},{-8,24},{-8,25},{-8,26},{-8,27},{-8,31},{-8,32},{-8,33},{-8,47},{-8,48},{-7,-45},{-7,-44},{-7,-39},{-7,-38},{-7,-37},{-7,-36},
+ {-7,-31},{-7,-30},{-7,-29},{-7,-25},{-7,-24},{-7,-23},{-7,-22},{-7,-21},{-7,-11},{-7,-10},{-7,-7},{-7,-6},{-7,-5},{-7,-4},{-7,7},{-7,8},{-7,9},{-7,10},{-7,13},{-7,14},{-7,24},{-7,25},{-7,26},{-7,27},{-7,28},{-7,32},{-7,33},{-7,34},{-7,39},{-7,40},
+ {-7,41},{-7,42},{-7,47},{-7,48},{-6,-46},{-6,-45},{-6,-44},{-6,-39},{-6,-38},{-6,-37},{-6,-36},{-6,-35},{-6,-31},{-6,-30},{-6,-25},{-6,-24},{-6,-23},{-6,-22},{-6,-12},{-6,-11},{-6,-10},{-6,-6},{-6,-5},{-6,8},{-6,9},{-6,13},{-6,14},{-6,15},{-6,25},{-6,26},
+ {-6,27},{-6,28},{-6,33},{-6,34},{-6,38},{-6,39},{-6,40},{-6,41},{-6,42},{-6,47},{-6,48},{-6,49},{-5,-47},{-5,-46},{-5,-45},{-5,-44},{-5,-37},{-5,-36},{-5,-35},{-5,-34},{-5,-19},{-5,-18},{-5,-13},{-5,-12},{-5,-11},{-5,-10},{-5,-1},{-5,0},{-5,1},{-5,2},
+ {-5,3},{-5,4},{-5,13},{-5,14},{-5,15},{-5,16},{-5,21},{-5,22},{-5,37},{-5,38},{-5,39},{-5,40},{-5,47},{-5,48},{-5,49},{-5,50},{-4,-47},{-4,-46},{-4,-45},{-4,-44},{-4,-43},{-4,-37},{-4,-36},{-4,-35},{-4,-34},{-4,-19},{-4,-18},{-4,-17},{-4,-13},{-4,-12},
+ {-4,-11},{-4,-10},{-4,-2},{-4,-1},{-4,0},{-4,1},{-4,2},{-4,3},{-4,4},{-4,5},{-4,13},{-4,14},{-4,15},{-4,16},{-4,20},{-4,21},{-4,22},{-4,37},{-4,38},{-4,39},{-4,40},{-4,46},{-4,47},{-4,48},{-4,49},{-4,50},{-3,-44},{-3,-43},{-3,-42},{-3,-41},
+ {-3,-40},{-3,-37},{-3,-36},{-3,-35},{-3,-34},{-3,-31},{-3,-30},{-3,-29},{-3,-28},{-3,-25},{-3,-24},{-3,-23},{-3,-22},{-3,-18},{-3,-17},{-3,-16},{-3,-7},{-3,-6},{-3,-3},{-3,-2},{-3,-1},{-3,0},{-3,3},{-3,4},{-3,5},{-3,6},{-3,9},{-3,10},{-3,19},{-3,20},
+ {-3,21},{-3,25},{-3,26},{-3,27},{-3,28},{-3,31},{-3,32},{-3,33},{-3,34},{-3,37},{-3,38},{-3,39},{-3,40},{-3,43},{-3,44},{-3,45},{-3,46},{-3,47},{-2,-43},{-2,-42},{-2,-41},{-2,-40},{-2,-37},{-2,-36},{-2,-35},{-2,-34},{-2,-31},{-2,-30},{-2,-29},{-2,-28},
+ {-2,-25},{-2,-24},{-2,-23},{-2,-22},{-2,-21},{-2,-17},{-2,-16},{-2,-15},{-2,-8},{-2,-7},{-2,-6},{-2,-3},{-2,-2},{-2,-1},{-2,0},{-2,3},{-2,4},{-2,5},{-2,6},{-2,9},{-2,10},{-2,11},{-2,18},{-2,19},{-2,20},{-2,24},{-2,25},{-2,26},{-2,27},{-2,28},
+ {-2,31},{-2,32},{-2,33},{-2,34},{-2,37},{-2,38},{-2,39},{-2,40},{-2,43},{-2,44},{-2,45},{-2,46},{-1,-47},{-1,-46},{-1,-43},{-1,-42},{-1,-41},{-1,-40},{-1,-37},{-1,-36},{-1,-29},{-1,-28},{-1,-25},{-1,-24},{-1,-23},{-1,-22},{-1,-21},{-1,-20},{-1,-17},{-1,-16},
+ {-1,-15},{-1,-14},{-1,-13},{-1,-12},{-1,-9},{-1,-8},{-1,-7},{-1,-6},{-1,-3},{-1,-2},{-1,5},{-1,6},{-1,9},{-1,10},{-1,11},{-1,12},{-1,15},{-1,16},{-1,17},{-1,18},{-1,19},{-1,20},{-1,23},{-1,24},{-1,25},{-1,26},{-1,27},{-1,28},{-1,31},{-1,32},
+ {-1,39},{-1,40},{-1,43},{-1,44},{-1,45},{-1,46},{-1,49},{-1,50},{0,-47},{0,-46},{0,-43},{0,-42},{0,-41},{0,-40},{0,-37},{0,-36},{0,-29},{0,-28},{0,-25},{0,-24},{0,-23},{0,-22},{0,-21},{0,-20},{0,-17},{0,-16},{0,-15},{0,-14},{0,-13},{0,-12},
+ {0,-9},{0,-8},{0,-7},{0,-6},{0,-3},{0,-2},{0,5},{0,6},{0,9},{0,10},{0,11},{0,12},{0,15},{0,16},{0,17},{0,18},{0,19},{0,20},{0,23},{0,24},{0,25},{0,26},{0,27},{0,28},{0,31},{0,32},{0,39},{0,40},{0,43},{0,44},
+ {0,45},{0,46},{0,49},{0,50},{1,-43},{1,-42},{1,-41},{1,-40},{1,-37},{1,-36},{1,-35},{1,-34},{1,-31},{1,-30},{1,-29},{1,-28},{1,-25},{1,-24},{1,-23},{1,-22},{1,-21},{1,-17},{1,-16},{1,-15},{1,-8},{1,-7},{1,-6},{1,-3},{1,-2},{1,-1},
+ {1,0},{1,3},{1,4},{1,5},{1,6},{1,9},{1,10},{1,11},{1,18},{1,19},{1,20},{1,24},{1,25},{1,26},{1,27},{1,28},{1,31},{1,32},{1,33},{1,34},{1,37},{1,38},{1,39},{1,40},{1,43},{1,44},{1,45},{1,46},{2,-44},{2,-43},
+ {2,-42},{2,-41},{2,-40},{2,-37},{2,-36},{2,-35},{2,-34},{2,-31},{2,-30},{2,-29},{2,-28},{2,-25},{2,-24},{2,-23},{2,-22},{2,-18},{2,-17},{2,-16},{2,-7},{2,-6},{2,-3},{2,-2},{2,-1},{2,0},{2,3},{2,4},{2,5},{2,6},{2,9},{2,10},
+ {2,19},{2,20},{2,21},{2,25},{2,26},{2,27},{2,28},{2,31},{2,32},{2,33},{2,34},{2,37},{2,38},{2,39},{2,40},{2,43},{2,44},{2,45},{2,46},{2,47},{3,-47},{3,-46},{3,-45},{3,-44},{3,-43},{3,-37},{3,-36},{3,-35},{3,-34},{3,-19},
+ {3,-18},{3,-17},{3,-13},{3,-12},{3,-11},{3,-10},{3,-2},{3,-1},{3,0},{3,1},{3,2},{3,3},{3,4},{3,5},{3,13},{3,14},{3,15},{3,16},{3,20},{3,21},{3,22},{3,37},{3,38},{3,39},{3,40},{3,46},{3,47},{3,48},{3,49},{3,50},
+ {4,-47},{4,-46},{4,-45},{4,-44},{4,-37},{4,-36},{4,-35},{4,-34},{4,-19},{4,-18},{4,-13},{4,-12},{4,-11},{4,-10},{4,-1},{4,0},{4,1},{4,2},{4,3},{4,4},{4,13},{4,14},{4,15},{4,16},{4,21},{4,22},{4,37},{4,38},{4,39},{4,40},
+ {4,47},{4,48},{4,49},{4,50},{5,-46},{5,-45},{5,-44},{5,-39},{5,-38},{5,-37},{5,-36},{5,-35},{5,-31},{5,-30},{5,-25},{5,-24},{5,-23},{5,-22},{5,-12},{5,-11},{5,-10},{5,-6},{5,-5},{5,8},{5,9},{5,13},{5,14},{5,15},{5,25},{5,26},
+ {5,27},{5,28},{5,33},{5,34},{5,38},{5,39},{5,40},{5,41},{5,42},{5,47},{5,48},{5,49},{6,-45},{6,-44},{6,-39},{6,-38},{6,-37},{6,-36},{6,-31},{6,-30},{6,-29},{6,-25},{6,-24},{6,-23},{6,-22},{6,-21},{6,-11},{6,-10},{6,-7},{6,-6},
+ {6,-5},{6,-4},{6,7},{6,8},{6,9},{6,10},{6,13},{6,14},{6,24},{6,25},{6,26},{6,27},{6,28},{6,32},{6,33},{6,34},{6,39},{6,40},{6,41},{6,42},{6,47},{6,48},{7,-45},{7,-44},{7,-30},{7,-29},{7,-28},{7,-24},{7,-23},{7,-22},
+ {7,-21},{7,-20},{7,-17},{7,-16},{7,-15},{7,-14},{7,-7},{7,-6},{7,-5},{7,-4},{7,-1},{7,0},{7,1},{7,2},{7,3},{7,4},{7,7},{7,8},{7,9},{7,10},{7,17},{7,18},{7,19},{7,20},{7,23},{7,24},{7,25},{7,26},{7,27},{7,31},
+ {7,32},{7,33},{7,47},{7,48},{8,-45},{8,-44},{8,-43},{8,-29},{8,-28},{8,-27},{8,-23},{8,-22},{8,-21},{8,-20},{8,-17},{8,-16},{8,-15},{8,-14},{8,-13},{8,-8},{8,-7},{8,-6},{8,-5},{8,-1},{8,0},{8,1},{8,2},{8,3},{8,4},{8,8},
+ {8,9},{8,10},{8,11},{8,16},{8,17},{8,18},{8,19},{8,20},{8,23},{8,24},{8,25},{8,26},{8,30},{8,31},{8,32},{8,46},{8,47},{8,48},{9,-44},{9,-43},{9,-42},{9,-33},{9,-32},{9,-29},{9,-28},{9,-27},{9,-26},{9,-23},{9,-22},{9,-21},
+ {9,-20},{9,-17},{9,-16},{9,-15},{9,-14},{9,-13},{9,-12},{9,-9},{9,-8},{9,-7},{9,0},{9,1},{9,2},{9,3},{9,10},{9,11},{9,12},{9,15},{9,16},{9,17},{9,18},{9,19},{9,20},{9,23},{9,24},{9,25},{9,26},{9,29},{9,30},{9,31},
+ {9,32},{9,35},{9,36},{9,45},{9,46},{9,47},{10,-43},{10,-42},{10,-34},{10,-33},{10,-32},{10,-29},{10,-28},{10,-27},{10,-26},{10,-23},{10,-22},{10,-21},{10,-20},{10,-17},{10,-16},{10,-15},{10,-14},{10,-13},{10,-12},{10,-9},{10,-8},{10,1},{10,2},{10,11},
+ {10,12},{10,15},{10,16},{10,17},{10,18},{10,19},{10,20},{10,23},{10,24},{10,25},{10,26},{10,29},{10,30},{10,31},{10,32},{10,35},{10,36},{10,37},{10,45},{10,46},{11,-39},{11,-38},{11,-35},{11,-34},{11,-33},{11,-32},{11,-29},{11,-28},{11,-27},{11,-16},
+ {11,-15},{11,-14},{11,-13},{11,-5},{11,-4},{11,-3},{11,-2},{11,5},{11,6},{11,7},{11,8},{11,16},{11,17},{11,18},{11,19},{11,30},{11,31},{11,32},{11,35},{11,36},{11,37},{11,38},{11,41},{11,42},{12,-39},{12,-38},{12,-35},{12,-34},{12,-33},{12,-32},
+ {12,-29},{12,-28},{12,-15},{12,-14},{12,-5},{12,-4},{12,-3},{12,-2},{12,5},{12,6},{12,7},{12,8},{12,17},{12,18},{12,31},{12,32},{12,35},{12,36},{12,37},{12,38},{12,41},{12,42},{13,-43},{13,-42},{13,-39},{13,-38},{13,-37},{13,-36},{13,-35},{13,-34},
+ {13,-33},{13,-19},{13,-18},{13,-9},{13,-8},{13,-4},{13,-3},{13,-2},{13,1},{13,2},{13,5},{13,6},{13,7},{13,11},{13,12},{13,21},{13,22},{13,36},{13,37},{13,38},{13,39},{13,40},{13,41},{13,42},{13,45},{13,46},{14,-43},{14,-42},{14,-39},{14,-38},
+ {14,-37},{14,-36},{14,-35},{14,-34},{14,-20},{14,-19},{14,-18},{14,-17},{14,-10},{14,-9},{14,-8},{14,-7},{14,-3},{14,-2},{14,1},{14,2},{14,5},{14,6},{14,10},{14,11},{14,12},{14,13},{14,20},{14,21},{14,22},{14,23},{14,37},{14,38},{14,39},{14,40},
+ {14,41},{14,42},{14,45},{14,46},{15,-43},{15,-42},{15,-31},{15,-30},{15,-27},{15,-26},{15,-21},{15,-20},{15,-19},{15,-18},{15,-17},{15,-16},{15,-15},{15,-14},{15,-11},{15,-10},{15,-9},{15,-8},{15,-7},{15,-6},{15,1},{15,2},{15,9},{15,10},{15,11},{15,12},
+ {15,13},{15,14},{15,17},{15,18},{15,19},{15,20},{15,21},{15,22},{15,23},{15,24},{15,29},{15,30},{15,33},{15,34},{15,45},{15,46},{16,-43},{16,-42},{16,-32},{16,-31},{16,-30},{16,-27},{16,-26},{16,-25},{16,-21},{16,-20},{16,-19},{16,-18},{16,-17},{16,-16},
+ {16,-15},{16,-14},{16,-11},{16,-10},{16,-9},{16,-8},{16,-7},{16,-6},{16,0},{16,1},{16,2},{16,3},{16,9},{16,10},{16,11},{16,12},{16,13},{16,14},{16,17},{16,18},{16,19},{16,20},{16,21},{16,22},{16,23},{16,24},{16,28},{16,29},{16,30},{16,33},
+ {16,34},{16,35},{16,45},{16,46},{17,-43},{17,-42},{17,-35},{17,-34},{17,-33},{17,-32},{17,-31},{17,-26},{17,-25},{17,-24},{17,-15},{17,-14},{17,-10},{17,-9},{17,-8},{17,-7},{17,-6},{17,-1},{17,0},{17,1},{17,2},{17,3},{17,4},{17,9},{17,10},{17,11},
+ {17,12},{17,13},{17,17},{17,18},{17,27},{17,28},{17,29},{17,34},{17,35},{17,36},{17,37},{17,38},{17,45},{17,46},{18,-43},{18,-42},{18,-41},{18,-35},{18,-34},{18,-33},{18,-32},{18,-25},{18,-24},{18,-23},{18,-15},{18,-14},{18,-13},{18,-9},{18,-8},{18,-7},
+ {18,-6},{18,-2},{18,-1},{18,0},{18,1},{18,2},{18,3},{18,4},{18,5},{18,9},{18,10},{18,11},{18,12},{18,16},{18,17},{18,18},{18,26},{18,27},{18,28},{18,35},{18,36},{18,37},{18,38},{18,44},{18,45},{18,46},{19,-42},{19,-41},{19,-40},{19,-39},
+ {19,-38},{19,-29},{19,-28},{19,-25},{19,-24},{19,-23},{19,-22},{19,-21},{19,-20},{19,-19},{19,-18},{19,-15},{19,-14},{19,-13},{19,-12},{19,-3},{19,-2},{19,-1},{19,4},{19,5},{19,6},{19,15},{19,16},{19,17},{19,18},{19,21},{19,22},{19,23},{19,24},{19,25},
+ {19,26},{19,27},{19,28},{19,31},{19,32},{19,41},{19,42},{19,43},{19,44},{19,45},{20,-41},{20,-40},{20,-39},{20,-38},{20,-37},{20,-29},{20,-28},{20,-25},{20,-24},{20,-23},{20,-22},{20,-21},{20,-20},{20,-19},{20,-18},{20,-15},{20,-14},{20,-13},{20,-12},{20,-3},
+ {20,-2},{20,5},{20,6},{20,15},{20,16},{20,17},{20,18},{20,21},{20,22},{20,23},{20,24},{20,25},{20,26},{20,27},{20,28},{20,31},{20,32},{20,40},{20,41},{20,42},{20,43},{20,44},{21,-38},{21,-37},{21,-36},{21,-29},{21,-28},{21,-19},{21,-18},{21,-15},
+ {21,-14},{21,-13},{21,-9},{21,-8},{21,-7},{21,-6},{21,1},{21,2},{21,9},{21,10},{21,11},{21,12},{21,16},{21,17},{21,18},{21,21},{21,22},{21,31},{21,32},{21,39},{21,40},{21,41},{22,-37},{22,-36},{22,-30},{22,-29},{22,-28},{22,-19},{22,-18},{22,-15},
+ {22,-14},{22,-9},{22,-8},{22,-7},{22,-6},{22,-5},{22,0},{22,1},{22,2},{22,3},{22,8},{22,9},{22,10},{22,11},{22,12},{22,17},{22,18},{22,21},{22,22},{22,31},{22,32},{22,33},{22,39},{22,40},{23,-33},{23,-32},{23,-31},{23,-30},{23,-29},{23,-25},
+ {23,-24},{23,-23},{23,-22},{23,-19},{23,-18},{23,-9},{23,-8},{23,-7},{23,-6},{23,-5},{23,-4},{23,-1},{23,0},{23,1},{23,2},{23,3},{23,4},{23,7},{23,8},{23,9},{23,10},{23,11},{23,12},{23,21},{23,22},{23,25},{23,26},{23,27},{23,28},{23,32},
+ {23,33},{23,34},{23,35},{23,36},{24,-33},{24,-32},{24,-31},{24,-30},{24,-25},{24,-24},{24,-23},{24,-22},{24,-19},{24,-18},{24,-17},{24,-9},{24,-8},{24,-7},{24,-6},{24,-5},{24,-4},{24,-1},{24,0},{24,1},{24,2},{24,3},{24,4},{24,7},{24,8},{24,9},
+ {24,10},{24,11},{24,12},{24,20},{24,21},{24,22},{24,25},{24,26},{24,27},{24,28},{24,33},{24,34},{24,35},{24,36},{25,-39},{25,-38},{25,-37},{25,-36},{25,-24},{25,-23},{25,-22},{25,-19},{25,-18},{25,-17},{25,-16},{25,-6},{25,-5},{25,-4},{25,-1},{25,0},
+ {25,1},{25,2},{25,3},{25,4},{25,7},{25,8},{25,9},{25,19},{25,20},{25,21},{25,22},{25,25},{25,26},{25,27},{25,39},{25,40},{25,41},{25,42},{26,-39},{26,-38},{26,-37},{26,-36},{26,-23},{26,-22},{26,-19},{26,-18},{26,-17},{26,-16},{26,-15},{26,-5},
+ {26,-4},{26,-1},{26,0},{26,1},{26,2},{26,3},{26,4},{26,7},{26,8},{26,18},{26,19},{26,20},{26,21},{26,22},{26,25},{26,26},{26,39},{26,40},{26,41},{26,42},{27,-38},{27,-37},{27,-36},{27,-29},{27,-28},{27,-27},{27,-26},{27,-16},{27,-15},{27,-14},
+ {27,-9},{27,-8},{27,11},{27,12},{27,17},{27,18},{27,19},{27,29},{27,30},{27,31},{27,32},{27,39},{27,40},{27,41},{28,-37},{28,-36},{28,-30},{28,-29},{28,-28},{28,-27},{28,-26},{28,-15},{28,-14},{28,-10},{28,-9},{28,-8},{28,-7},{28,10},{28,11},{28,12},
+ {28,13},{28,17},{28,18},{28,29},{28,30},{28,31},{28,32},{28,33},{28,39},{28,40},{29,-33},{29,-32},{29,-31},{29,-30},{29,-29},{29,-28},{29,-27},{29,-26},{29,-21},{29,-20},{29,-19},{29,-18},{29,-11},{29,-10},{29,-9},{29,-8},{29,-7},{29,-6},{29,-1},{29,0},
+ {29,1},{29,2},{29,3},{29,4},{29,9},{29,10},{29,11},{29,12},{29,13},{29,14},{29,21},{29,22},{29,23},{29,24},{29,29},{29,30},{29,31},{29,32},{29,33},{29,34},{29,35},{29,36},{30,-33},{30,-32},{30,-31},{30,-30},{30,-29},{30,-28},{30,-27},{30,-26},
+ {30,-22},{30,-21},{30,-20},{30,-19},{30,-18},{30,-11},{30,-10},{30,-9},{30,-8},{30,-7},{30,-6},{30,-5},{30,-1},{30,0},{30,1},{30,2},{30,3},{30,4},{30,8},{30,9},{30,10},{30,11},{30,12},{30,13},{30,14},{30,21},{30,22},{30,23},{30,24},{30,25},
+ {30,29},{30,30},{30,31},{30,32},{30,33},{30,34},{30,35},{30,36},{31,-32},{31,-31},{31,-30},{31,-29},{31,-28},{31,-27},{31,-23},{31,-22},{31,-21},{31,-15},{31,-14},{31,-6},{31,-5},{31,-4},{31,-1},{31,0},{31,3},{31,4},{31,7},{31,8},{31,9},{31,17},
+ {31,18},{31,24},{31,25},{31,26},{31,30},{31,31},{31,32},{31,33},{31,34},{31,35},{32,-31},{32,-30},{32,-29},{32,-28},{32,-23},{32,-22},{32,-16},{32,-15},{32,-14},{32,-5},{32,-4},{32,-1},{32,0},{32,3},{32,4},{32,7},{32,8},{32,17},{32,18},{32,19},
+ {32,25},{32,26},{32,31},{32,32},{32,33},{32,34},{33,-30},{33,-29},{33,-28},{33,-23},{33,-22},{33,-17},{33,-16},{33,-15},{33,-11},{33,-10},{33,-9},{33,-8},{33,11},{33,12},{33,13},{33,14},{33,18},{33,19},{33,20},{33,25},{33,26},{33,31},{33,32},{33,33},
+ {34,-29},{34,-28},{34,-23},{34,-22},{34,-17},{34,-16},{34,-12},{34,-11},{34,-10},{34,-9},{34,-8},{34,11},{34,12},{34,13},{34,14},{34,15},{34,19},{34,20},{34,25},{34,26},{34,31},{34,32},{35,-17},{35,-16},{35,-13},{35,-12},{35,-11},{35,-10},{35,-9},{35,-3},
+ {35,-2},{35,-1},{35,0},{35,3},{35,4},{35,5},{35,6},{35,12},{35,13},{35,14},{35,15},{35,16},{35,19},{35,20},{36,-17},{36,-16},{36,-13},{36,-12},{36,-11},{36,-10},{36,-4},{36,-3},{36,-2},{36,-1},{36,0},{36,3},{36,4},{36,5},{36,6},{36,7},
+ {36,13},{36,14},{36,15},{36,16},{36,19},{36,20},{37,-27},{37,-26},{37,-25},{37,-24},{37,-21},{37,-20},{37,-13},{37,-12},{37,-5},{37,-4},{37,-3},{37,-2},{37,-1},{37,0},{37,1},{37,2},{37,3},{37,4},{37,5},{37,6},{37,7},{37,8},{37,15},{37,16},
+ {37,23},{37,24},{37,27},{37,28},{37,29},{37,30},{38,-27},{38,-26},{38,-25},{38,-24},{38,-21},{38,-20},{38,-19},{38,-13},{38,-12},{38,-5},{38,-4},{38,-3},{38,-2},{38,-1},{38,0},{38,1},{38,2},{38,3},{38,4},{38,5},{38,6},{38,7},{38,8},{38,15},
+ {38,16},{38,22},{38,23},{38,24},{38,27},{38,28},{38,29},{38,30},{39,-26},{39,-25},{39,-24},{39,-20},{39,-19},{39,-18},{39,-13},{39,-12},{39,-11},{39,-10},{39,-5},{39,-4},{39,7},{39,8},{39,13},{39,14},{39,15},{39,16},{39,21},{39,22},{39,23},{39,27},
+ {39,28},{39,29},{40,-25},{40,-24},{40,-19},{40,-18},{40,-13},{40,-12},{40,-11},{40,-10},{40,-5},{40,-4},{40,7},{40,8},{40,13},{40,14},{40,15},{40,16},{40,21},{40,22},{40,27},{40,28},{41,-19},{41,-18},{41,-1},{41,0},{41,1},{41,2},{41,3},{41,4},
+ {41,21},{41,22},{42,-19},{42,-18},{42,-17},{42,-1},{42,0},{42,1},{42,2},{42,3},{42,4},{42,20},{42,21},{42,22},{43,-18},{43,-17},{43,-16},{43,-15},{43,-14},{43,-13},{43,-12},{43,-9},{43,-8},{43,-1},{43,0},{43,1},{43,2},{43,3},{43,4},{43,11},
+ {43,12},{43,15},{43,16},{43,17},{43,18},{43,19},{43,20},{43,21},{44,-17},{44,-16},{44,-15},{44,-14},{44,-13},{44,-12},{44,-9},{44,-8},{44,-7},{44,-2},{44,-1},{44,0},{44,1},{44,2},{44,3},{44,4},{44,5},{44,10},{44,11},{44,12},{44,15},{44,16},
+ {44,17},{44,18},{44,19},{44,20},{45,-8},{45,-7},{45,-6},{45,-5},{45,-4},{45,-3},{45,-2},{45,-1},{45,4},{45,5},{45,6},{45,7},{45,8},{45,9},{45,10},{45,11},{46,-7},{46,-6},{46,-5},{46,-4},{46,-3},{46,-2},{46,5},{46,6},{46,7},{46,8},
+ {46,9},{46,10},{47,-4},{47,-3},{47,-2},{47,1},{47,2},{47,5},{47,6},{47,7},{48,-3},{48,-2},{48,1},{48,2},{48,5},{48,6}
+ }
}
}
\ No newline at end of file
diff --git a/modules/addons/spawn-area.lua b/modules/addons/spawn-area.lua
index 4b9daf3b..61a73096 100644
--- a/modules/addons/spawn-area.lua
+++ b/modules/addons/spawn-area.lua
@@ -4,16 +4,23 @@
local Global = require 'utils.global' --- @dep utils.global
local Event = require 'utils.event' --- @dep utils.event
local config = require 'config.spawn_area' --- @dep config.spawn_area
-local tiles = config.tiles
-local entities = config.entities
-local belts = config.afk_belts.locations
-local turrets = config.infinite_ammo_turrets.locations
+local turrets = config.turrets.locations
Global.register(turrets, function(tbl)
turrets = tbl
end)
--- returns the Spawn force or creates it
+-- Apply an offset to a LuaPosition
+local function apply_offset(position, offset)
+ return { x = position.x + (offset.x or offset[1]), y = position.y + (offset.y or offset[2]) }
+end
+
+-- Apply the offset to the turrets default position
+for _, turret in ipairs(turrets) do
+ turret.position = apply_offset(turret.position, config.turrets.offset)
+end
+
+-- Get or create the force used for entities in spawn
local function get_spawn_force()
local force = game.forces['Spawn']
if force and force.valid then return force end
@@ -23,7 +30,7 @@ local function get_spawn_force()
return force
end
--- protects and entity so players cant do anything to it
+-- Protects an entity and sets its force to the spawn force
local function protect_entity(entity, set_force)
if entity and entity.valid then
entity.destructible = false
@@ -35,113 +42,133 @@ local function protect_entity(entity, set_force)
end
end
--- handles the infinite ammo turrets
+-- Will spawn all infinite ammo turrets and keep them refilled
local function spawn_turrets()
- if config.infinite_ammo_turrets.enabled then
- for _, turret_pos in pairs(turrets) do
- local surface = game.surfaces[turret_pos.surface]
- local pos = turret_pos.position
- local turret = surface.find_entity('gun-turret', pos)
- -- Makes a new turret if it is not found
- if not turret or not turret.valid then
- turret = surface.create_entity{name='gun-turret', position=pos, force='Spawn'}
- protect_entity(turret, true)
- end
- -- adds ammo to the turret
- local inv = turret.get_inventory(defines.inventory.turret_ammo)
- if inv.can_insert{name=config.infinite_ammo_turrets.ammo_type, count=10} then
- inv.insert{name=config.infinite_ammo_turrets.ammo_type, count=10}
- end
+ for _, turret_pos in pairs(turrets) do
+ local surface = game.surfaces[turret_pos.surface]
+ local pos = turret_pos.position
+ local turret = surface.find_entity('gun-turret', pos)
+
+ -- Makes a new turret if it is not found
+ if not turret or not turret.valid then
+ turret = surface.create_entity{name='gun-turret', position=pos, force='Spawn'}
+ protect_entity(turret, true)
+ end
+
+ -- Adds ammo to the turret
+ local inv = turret.get_inventory(defines.inventory.turret_ammo)
+ if inv.can_insert{name=config.turrets.ammo_type, count=10} then
+ inv.insert{name=config.turrets.ammo_type, count=10}
end
end
end
--- makes a 2x2 afk belt where set in config
+-- Makes a 2x2 afk belt at the locations in the config
local function spawn_belts(surface, position)
+ position = apply_offset(position, config.afk_belts.offset)
+ local belt_type = config.afk_belts.belt_type
local belt_details = {{-0.5, -0.5, 2}, {0.5, -0.5, 4}, {-0.5, 0.5, 0}, {0.5, 0.5, 6}} -- x, y,dir
- for _, belt_set in pairs(belts) do
- local o = position
- local p = belt_set
+ for _, belt_set in pairs(config.afk_belts.locations) do
+ local set_position = apply_offset(position, belt_set)
for _, belt in pairs(belt_details) do
- local pos = {x=o.x+p.x+belt[1], y=o.y+p.y+belt[2]}
- local belt_entity = surface.create_entity{name='transport-belt', position=pos, force='neutral', direction=belt[3]}
- protect_entity(belt_entity)
+ local pos = apply_offset(set_position, belt)
+ local belt_entity = surface.create_entity{name=belt_type, position=pos, force='neutral', direction=belt[3]}
+ if config.afk_belts.protected then protect_entity(belt_entity) end
end
end
end
--- generates an area with no water and removes entities in the decon area
-local function spawn_base(surface, position)
- local dr = config.corrections.deconstruction_radius
- local dr2 = dr^2
- local dtile = config.corrections.deconstruction_tile
- local pr = config.corrections.pattern_radius
- local pr2 = pr^2
- local ptile = surface.get_tile(position).name
- if ptile == 'deepwater' or ptile == 'water' then ptile = 'grass-1' end
+-- Generates extra tiles in a set pattern set out in the config
+local function spawn_pattern(surface, position)
+ position = apply_offset(position, config.pattern.offset)
local tiles_to_make = {}
- for x = -pr, pr do -- loop over x
- local x2 = x^2
- for y = -pr, pr do -- loop over y
- local y2 = y^2
- local prod = x2+y2
- local p = {x=position.x+x, y=position.y+y}
- if prod < dr2 then
- -- if it is inside the decon radius
- table.insert(tiles_to_make, {name=dtile, position=p})
- local entities_to_remove = surface.find_entities_filtered{area={{p.x-1, p.y-1}, {p.x, p.y}}}
- for _, entity in pairs(entities_to_remove) do
- if entity.name ~= 'character' then entity.destroy() end
- end
- elseif prod < pr2 then
- -- if it is inside the pattern radius
- table.insert(tiles_to_make, {name=ptile, position=p})
+ local pattern_tile = config.pattern.pattern_tile
+ for _, tile in pairs(config.pattern.locations) do
+ table.insert(tiles_to_make, {name=pattern_tile, position=apply_offset(position, tile)})
+ end
+ surface.set_tiles(tiles_to_make)
+end
+
+-- Generates extra water as set out in the config
+local function spawn_water(surface, position)
+ position = apply_offset(position, config.water.offset)
+ local tiles_to_make = {}
+ local water_tile = config.water.water_tile
+ for _, tile in pairs(config.water.locations) do
+ table.insert(tiles_to_make, {name=water_tile, position=apply_offset(position, tile)})
+ end
+ surface.set_tiles(tiles_to_make)
+end
+
+-- Generates the entities that are in the config
+local function spawn_entities(surface, position)
+ position = apply_offset(position, config.entities.offset)
+ for _, entity in pairs(config.entities.locations) do
+ local pos = apply_offset(position, { x=entity[2], y=entity[3] })
+ entity = surface.create_entity{name=entity[1], position=pos, force='neutral'}
+ if config.entities.protected then protect_entity(entity) end
+ entity.operable = config.entities.operable
+ end
+end
+
+-- Generates an area with no water or entities, no water area is larger
+local function spawn_area(surface, position)
+ local dr = config.spawn_area.deconstruction_radius
+ local dr2 = dr^2
+ local decon_tile = config.spawn_area.deconstruction_tile
+
+ local fr = config.spawn_area.landfill_radius
+ local fr2 = fr^2
+ local fill_tile = surface.get_tile(position).name
+
+ -- Make sure a non water tile is used for each tile
+ if surface.get_tile(position).collides_with('player-layer') then fill_tile = 'landfill' end
+ if decon_tile == nil then decon_tile = fill_tile end
+
+ local tiles_to_make = {}
+ for x = -fr, fr do -- loop over x
+ local x2 = (x+0.5)^2
+ for y = -fr, fr do -- loop over y
+ local y2 = (y+0.5)^2
+ local dst = x2+y2
+ local pos = {x=position.x+x, y=position.y+y}
+ if dst < dr2 then
+ -- If it is inside the decon radius always set the tile
+ table.insert(tiles_to_make, {name=decon_tile, position=pos})
+ elseif dst < fr2 and surface.get_tile(pos).collides_with('player-layer') then
+ -- If it is inside the fill radius only set the tile if its water
+ table.insert(tiles_to_make, {name=fill_tile, position=pos})
end
end
end
+
+ -- Remove entities then set the tiles
+ local entities_to_remove = surface.find_entities_filtered{position=position, radius=dr, name='character', invert=true}
+ for _, entity in pairs(entities_to_remove) do entity.destroy() end
surface.set_tiles(tiles_to_make)
end
--- generates the pattern that is in the config
-local function spawn_pattern(surface, position)
- local tiles_to_make = {}
- local ptile = config.corrections.pattern_tile
- local o = config.corrections.offset
- local p = {x=position.x+o.x, y=position.y+o.y}
- for _, tile in pairs(tiles) do
- table.insert(tiles_to_make, {name=ptile, position={tile[1]+p.x, tile[2]+p.y}})
- end
- surface.set_tiles(tiles_to_make)
+-- Only add a event handler if the turrets are enabled
+if config.turrets.enabled then
+ Event.on_nth_tick(config.turrets.refill_time, function()
+ if game.tick < 10 then return end
+ spawn_turrets()
+ end)
end
--- generates the entities that are in the config
-local function spawn_entities(surface, position)
- local o = config.corrections.offset
- local p = {x=position.x+o.x, y=position.y+o.y}
- for _, entity in pairs(entities) do
- entity = surface.create_entity{name=entity[1], position={entity[2]+p.x, entity[3]+p.y}, force='neutral'}
- protect_entity(entity)
- entity.operable = true
- end
-end
-
-local refill_time = 60*60*5 -- 5 minutes
-Event.on_nth_tick(refill_time, function()
- if game.tick < 10 then return end
- spawn_turrets()
-end)
-
+-- When the first player joins create the spawn area
Event.add(defines.events.on_player_created, function(event)
if event.player_index ~= 1 then return end
local player = game.players[event.player_index]
local p = {x=0, y=0}
local s = player.surface
- spawn_base(s, p)
- spawn_pattern(s, p)
get_spawn_force()
- spawn_entities(s, p)
- spawn_belts(s, p)
- spawn_turrets()
+ spawn_area(s, p)
+ if config.pattern.enabled then spawn_pattern(s, p) end
+ if config.water.enabled then spawn_water(s, p) end
+ if config.afk_belts.enabled then spawn_belts(s, p) end
+ if config.turrets.enabled then spawn_turrets() end
+ if config.entities.enabled then spawn_entities(s, p) end
player.teleport(p, s)
end)
From 49e056fee18f27fb2c6a038aafd363bd7b0ea65a Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Thu, 15 Apr 2021 22:03:32 +0100
Subject: [PATCH 15/27] Fixed doc comments
---
config/spawn_area.lua | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/config/spawn_area.lua b/config/spawn_area.lua
index 588f9d3c..5092f514 100644
--- a/config/spawn_area.lua
+++ b/config/spawn_area.lua
@@ -22,7 +22,7 @@ return {
afk_belts = { --- @setting afk_belts Settings relating to adding afk belts to spawn
enabled = true, --- @setting enabled Weather afk belts will be added to spawn
belt_type = 'transport-belt', --- @setting belt_type The belt to used used as afk belts
- protected = true, --- @settins protected Weather belts will be protected from player interaction
+ protected = true, --- @setting protected Weather belts will be protected from player interaction
offset = { x=0, y=0 }, --- @setting offset The position offset to apply to afk belts
locations={ --- @setting locations The locations to spawn afk belts at, given as the top left position
{-5, -5}, { 5, -5},
@@ -42,10 +42,10 @@ return {
}
},
entities = { --- @setting entities Settings relating to adding entities to spawn
- enabled = true, --- @settings enabled Weather entities will be added to spawn
- protected = true, --- @settins protected Weather entities will be protected from player interaction
- operable = true, --- @settings operable Weather entities can be opened by players, must be true if chests are used
- offset = { x=0, y=-2 }, --- @settings offset The position offset to apply to entities
+ enabled = true, --- @setting enabled Weather entities will be added to spawn
+ protected = true, --- @setting protected Weather entities will be protected from player interaction
+ operable = true, --- @setting operable Weather entities can be opened by players, must be true if chests are used
+ offset = { x=0, y=-2 }, --- @setting offset The position offset to apply to entities
locations = { --- @setting locations The location and names of entities {name,x,y}
{"stone-wall",-10,-5},{"stone-wall",-10,-4},{"stone-wall",-10,-3},{"stone-wall",-10,-2},{"stone-wall",-10,-1},{"stone-wall",-10,0},{"stone-wall",-10,3},{"stone-wall",-10,4},{"stone-wall",-10,5},
{"stone-wall",-10,6},{"stone-wall",-10,7},{"stone-wall",-10,8},{"small-lamp",-8,-4},{"small-lamp",-8,-1},{"iron-chest",-8,0},{"iron-chest",-8,3},{"small-lamp",-8,4},
@@ -64,9 +64,9 @@ return {
}
},
pattern = {
- enabled = true, --- @settings enabled Weather pattern tiles will be added to spawn
+ enabled = true, --- @setting enabled Weather pattern tiles will be added to spawn
pattern_tile = 'stone-path', --- @setting pattern_tile The tile to be used for the pattern
- offset = { x=0, y=-2 }, --- @settings offset The position offset to apply to pattern tiles
+ offset = { x=0, y=-2 }, --- @setting offset The position offset to apply to pattern tiles
locations = { --- @setting locations The location of the pattern tiles {x,y}
{-49,-3},{-49,-2},{-49,1},{-49,2},{-49,5},{-49,6},{-48,-4},{-48,-3},{-48,-2},{-48,1},{-48,2},{-48,5},{-48,6},{-48,7},{-47,-7},{-47,-6},{-47,-5},{-47,-4},{-47,-3},{-47,-2},{-47,5},{-47,6},{-47,7},{-47,8},{-47,9},{-47,10},{-46,-8},{-46,-7},{-46,-6},{-46,-5},
{-46,-4},{-46,-3},{-46,-2},{-46,-1},{-46,4},{-46,5},{-46,6},{-46,7},{-46,8},{-46,9},{-46,10},{-46,11},{-45,-17},{-45,-16},{-45,-15},{-45,-14},{-45,-13},{-45,-12},{-45,-9},{-45,-8},{-45,-7},{-45,-2},{-45,-1},{-45,0},{-45,1},{-45,2},{-45,3},{-45,4},{-45,5},{-45,10},
From bb46d44ea3c51970e08a9d6cb65817e1f799da34 Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Thu, 15 Apr 2021 23:24:27 +0100
Subject: [PATCH 16/27] Added admin markers
---
config/_file_loader.lua | 1 +
config/expcore/roles.lua | 1 +
locale/en/commands.cfg | 8 ++-
modules/commands/admin-markers.lua | 80 ++++++++++++++++++++++++++++++
4 files changed, 89 insertions(+), 1 deletion(-)
create mode 100644 modules/commands/admin-markers.lua
diff --git a/config/_file_loader.lua b/config/_file_loader.lua
index 16a135af..376cb6d3 100644
--- a/config/_file_loader.lua
+++ b/config/_file_loader.lua
@@ -12,6 +12,7 @@ return {
'modules.commands.me',
'modules.commands.kill',
'modules.commands.admin-chat',
+ 'modules.commands.admin-markers',
'modules.commands.teleport',
'modules.commands.cheat-mode',
'modules.commands.ratio',
diff --git a/config/expcore/roles.lua b/config/expcore/roles.lua
index 9b826202..0a629063 100644
--- a/config/expcore/roles.lua
+++ b/config/expcore/roles.lua
@@ -92,6 +92,7 @@ Roles.new_role('Trainee','TrMod')
:set_parent('Veteran')
:allow{
'command/admin-chat',
+ 'command/admin-marker',
'command/teleport',
'command/bring',
'command/goto',
diff --git a/locale/en/commands.cfg b/locale/en/commands.cfg
index dea7b935..4255195b 100644
--- a/locale/en/commands.cfg
+++ b/locale/en/commands.cfg
@@ -82,4 +82,10 @@ offline=You cannot connect as the server is currently offline: __1__
none-matching=No servers were found with that name, if you used an address please append true to the end of your command.
[expcom-lastlocation]
-response=Last location of __1__ was [gps=__2__,__3__]
\ No newline at end of file
+response=Last location of __1__ was [gps=__2__,__3__]
+
+[expcom-admin-marker]
+exit=You have left admin marker mode, all new makers will not be protected.
+enter=You have entered admin marker mode, all new makers will be protected.
+edit=You have edited an admin marker.
+revert=You cannot edit admin markers.
\ No newline at end of file
diff --git a/modules/commands/admin-markers.lua b/modules/commands/admin-markers.lua
new file mode 100644
index 00000000..cc43510b
--- /dev/null
+++ b/modules/commands/admin-markers.lua
@@ -0,0 +1,80 @@
+--[[-- Commands Module - Admin Markers
+ - Adds a command that creates map markers which can only be edited by admins
+ @commands Admin-Markers
+]]
+
+local Commands = require 'expcore.commands' --- @dep expcore.commands
+local Global = require 'utils.global' --- @dep utils.global
+local Event = require 'utils.event' --- @dep utils.event
+
+local admins = {} -- Stores all players in admin marker mode
+local markers = {} -- Stores all admin markers
+
+--- Global variables
+Global.register({
+ admins = admins,
+ markers = markers
+}, function(tbl)
+ admins = tbl.admins
+ markers = tbl.markers
+end)
+
+--- Toggle admin marker mode, can only be applied to yourself
+-- @command admin-marker
+Commands.new_command('admin-marker', 'Toggles admin marker mode, new markers can only be edited by admins')
+:set_flag('admin_only')
+:add_alias('am', 'admin-markers')
+:register(function(player)
+ if admins[player.name] then
+ -- Exit admin mode
+ admins[player.name] = nil
+ return Commands.success{'expcom-admin-marker.exit'}
+ else
+ -- Enter admin mode
+ admins[player.name] = true
+ return Commands.success{'expcom-admin-marker.enter'}
+ end
+end)
+
+--- Listen for new map markers being added
+Event.add(defines.events.on_chart_tag_added, function(event)
+ if not event.player_index then return end
+ local player = game.get_player(event.player_index)
+ if not admins[player.name] then return end
+ local tag = event.tag
+ markers[tag.force.name..tag.tag_number] = true
+end)
+
+--- Listen for tags being removed or edited
+local function maintain_tag(event)
+ local tag = event.tag
+ if not event.player_index then return end
+ if not markers[tag.force.name..tag.tag_number] then return end
+ local player = game.get_player(event.player_index)
+ if player.admin then
+ -- Player is added, tell them it was an admin marker
+ Commands.print({'expcom-admin-marker.edit'}, nil, player)
+ elseif event.name == defines.events.on_chart_tag_modified then
+ -- Tag was modified, revert the changes
+ tag.text = event.old_text
+ tag.last_user = event.old_player
+ if event.old_icon then tag.icon = event.old_icon end
+ player.play_sound{path='utility/wire_pickup'}
+ Commands.print({'expcom-admin-marker.revert'}, nil, player)
+ else
+ -- Tag was removed, remake the tag
+ player.play_sound{path='utility/wire_pickup'}
+ Commands.print({'expcom-admin-marker.revert'}, 'orange_red', player)
+ local new_tag = tag.force.add_chart_tag(tag.surface, {
+ last_user = tag.last_user,
+ position = tag.position,
+ icon = tag.icon,
+ text = tag.text,
+ })
+ markers[tag.force.name..tag.tag_number] = nil
+ markers[new_tag.force.name..new_tag.tag_number] = true
+ end
+end
+
+Event.add(defines.events.on_chart_tag_modified, maintain_tag)
+Event.add(defines.events.on_chart_tag_removed, maintain_tag)
\ No newline at end of file
From 573dfd781bb50d0f4306a0440f8be7bb9c051b37 Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Thu, 15 Apr 2021 23:28:30 +0100
Subject: [PATCH 17/27] Added tag placed message
---
locale/en/commands.cfg | 1 +
modules/commands/admin-markers.lua | 12 ++++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/locale/en/commands.cfg b/locale/en/commands.cfg
index 4255195b..1cb2e86f 100644
--- a/locale/en/commands.cfg
+++ b/locale/en/commands.cfg
@@ -87,5 +87,6 @@ response=Last location of __1__ was [gps=__2__,__3__]
[expcom-admin-marker]
exit=You have left admin marker mode, all new makers will not be protected.
enter=You have entered admin marker mode, all new makers will be protected.
+place=You have placed an admin marker.
edit=You have edited an admin marker.
revert=You cannot edit admin markers.
\ No newline at end of file
diff --git a/modules/commands/admin-markers.lua b/modules/commands/admin-markers.lua
index cc43510b..95062705 100644
--- a/modules/commands/admin-markers.lua
+++ b/modules/commands/admin-markers.lua
@@ -36,16 +36,24 @@ Commands.new_command('admin-marker', 'Toggles admin marker mode, new markers can
end
end)
---- Listen for new map markers being added
+--- Listen for new map markers being added, add admin marker if done by player in admin mode
Event.add(defines.events.on_chart_tag_added, function(event)
if not event.player_index then return end
local player = game.get_player(event.player_index)
if not admins[player.name] then return end
local tag = event.tag
markers[tag.force.name..tag.tag_number] = true
+ Commands.print({'expcom-admin-marker.place'}, nil, player)
end)
---- Listen for tags being removed or edited
+--- Listen for players leaving the game, leave admin mode to avoid unexpected admin markers
+Event.add(defines.events.on_player_left_game, function(event)
+ if not event.player_index then return end
+ local player = game.get_player(event.player_index)
+ admins[player.name] = nil
+end)
+
+--- Listen for tags being removed or edited, maintain tags edited by non admins
local function maintain_tag(event)
local tag = event.tag
if not event.player_index then return end
From d485e2148061369278c040fc3dbb29a4d37ca73c Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Fri, 16 Apr 2021 18:13:41 +0100
Subject: [PATCH 18/27] Fixed calling set_controller during on_close
---
modules/control/spectate.lua | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/modules/control/spectate.lua b/modules/control/spectate.lua
index d9320ae7..5fec23af 100644
--- a/modules/control/spectate.lua
+++ b/modules/control/spectate.lua
@@ -48,8 +48,10 @@ function Public.stop_spectate(player)
local character = spectating[player.index]
spectating[player.index] = nil
if character and character.valid then
+ local opened = player.opened
player.teleport(character.position, character.surface)
player.set_controller{ type = defines.controllers.character, character = character }
+ if opened then player.opened = opened end -- Maintain opened after controller change
else
player.ticks_to_respawn = 300
end
@@ -118,8 +120,12 @@ Gui.element(function(event_trigger, parent, target)
return label
end)
-:on_close(Public.stop_follow)
:on_click(Public.stop_follow)
+:on_close(function(player)
+ -- Dont call set_controller during on_close as it invalidates the controller
+ -- Setting an invalid position (as to not equal their current) will call stop_follow on the next tick
+ following[player.index][3] = {}
+end)
----- Events -----
@@ -148,7 +154,7 @@ end
Event.add(defines.events.on_tick, update_all)
-- Check for player leaving
-Event.add(defines.events.on_player_left_game, function(event)
+Event.add(defines.events.on_pre_player_left_game, function(event)
local player = game.players[event.player_index]
Public.stop_follow(player)
for _, data in pairs(following) do
From 5c0e3b65e40484e4b1a8e16783ca3733b1e0bce5 Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Sat, 24 Apr 2021 20:23:46 +0000
Subject: [PATCH 19/27] Automatic Doc Update
---
docs/addons/Advanced-Start.html | 3 +-
docs/addons/Chat-Popups.html | 3 +-
docs/addons/Chat-Reply.html | 3 +-
docs/addons/Compilatron.html | 3 +-
docs/addons/Damage-Popups.html | 3 +-
docs/addons/Death-Logger.html | 3 +-
docs/addons/Discord-Alerts.html | 3 +-
docs/addons/Inventory-Clear.html | 3 +-
docs/addons/Pollution-Grading.html | 3 +-
docs/addons/Scorched-Earth.html | 3 +-
docs/addons/Spawn-Area.html | 3 +-
docs/addons/Tree-Decon.html | 3 +-
docs/addons/report-jail.html | 404 ++++++++++++++++++
docs/commands/Admin-Chat.html | 3 +-
docs/commands/Cheat-Mode.html | 3 +-
docs/commands/Clear-Inventory.html | 3 +-
docs/commands/Connect.html | 3 +-
docs/commands/Debug.html | 3 +-
docs/commands/Find.html | 3 +-
docs/commands/Help.html | 3 +-
docs/commands/Home.html | 3 +-
docs/commands/Interface.html | 3 +-
docs/commands/Jail.html | 3 +-
docs/commands/Kill.html | 3 +-
docs/commands/LastLocation.html | 3 +-
docs/commands/Me.html | 3 +-
docs/commands/Rainbow.html | 3 +-
docs/commands/Repair.html | 3 +-
docs/commands/Reports.html | 3 +-
docs/commands/Roles.html | 3 +-
docs/commands/Spawn.html | 3 +-
docs/commands/Teleport.html | 3 +-
docs/commands/Warnings.html | 3 +-
docs/configs/Advanced-Start.html | 3 +-
docs/configs/Autofill.html | 3 +-
docs/configs/Bonuses.html | 3 +-
docs/configs/Chat-Reply.html | 3 +-
docs/configs/Commands-Auth-Admin.html | 3 +-
docs/configs/Commands-Auth-Roles.html | 3 +-
.../Commands-Auth-Runtime-Disable.html | 3 +-
docs/configs/Commands-Color-Parse.html | 3 +-
docs/configs/Commands-Parse-Roles.html | 3 +-
docs/configs/Commands-Parse.html | 3 +-
docs/configs/Compilatron.html | 3 +-
docs/configs/Death-Logger.html | 3 +-
docs/configs/Discord-Alerts.html | 3 +-
docs/configs/File-Loader.html | 3 +-
docs/configs/Permission-Groups.html | 3 +-
docs/configs/Player-List.html | 3 +-
docs/configs/Pollution-Grading.html | 3 +-
docs/configs/Popup-Messages.html | 3 +-
docs/configs/Preset-Player-Colours.html | 3 +-
docs/configs/Preset-Player-Quickbar.html | 3 +-
docs/configs/Repair.html | 3 +-
docs/configs/Rockets.html | 3 +-
docs/configs/Roles.html | 3 +-
docs/configs/Science.html | 3 +-
docs/configs/Scorched-Earth.html | 3 +-
docs/configs/Spawn-Area.html | 3 +-
docs/configs/Statistics.html | 3 +-
docs/configs/Tasks.html | 3 +-
docs/configs/Warnings.html | 3 +-
docs/configs/Warps.html | 3 +-
docs/configs/inventory_clear.html | 3 +-
docs/control/Jail.html | 3 +-
docs/control/Production.html | 3 +-
docs/control/Reports.html | 3 +-
docs/control/Rockets.html | 3 +-
docs/control/Tasks.html | 3 +-
docs/control/Warnings.html | 3 +-
docs/control/Warps.html | 3 +-
docs/core/Async.html | 3 +-
docs/core/Commands.html | 3 +-
docs/core/Common.html | 3 +-
docs/core/Datastore.html | 3 +-
docs/core/External.html | 3 +-
docs/core/Groups.html | 3 +-
docs/core/Gui.html | 3 +-
docs/core/PlayerData.html | 3 +-
docs/core/Roles.html | 3 +-
docs/data/Alt-View.html | 3 +-
docs/data/Bonus.html | 3 +-
docs/data/Greetings.html | 3 +-
docs/data/Player-Colours.html | 3 +-
docs/data/Quickbar.html | 3 +-
docs/data/Tag.html | 3 +-
docs/guis/Autofill.html | 3 +-
docs/guis/Player-List.html | 3 +-
docs/guis/Readme.html | 3 +-
docs/guis/Rocket-Info.html | 3 +-
docs/guis/Science-Info.html | 3 +-
docs/guis/Task-List.html | 3 +-
docs/guis/Warps-List.html | 3 +-
docs/guis/server-ups.html | 3 +-
docs/index.html | 6 +-
docs/modules/control.html | 3 +-
.../modules.addons.station-auto-name.html | 3 +-
docs/modules/overrides.debug.html | 3 +-
docs/modules/overrides.math.html | 3 +-
docs/modules/overrides.table.html | 3 +-
docs/modules/utils.event.html | 3 +-
docs/modules/utils.event_core.html | 3 +-
docs/modules/utils.task.html | 3 +-
docs/topics/LICENSE.html | 3 +-
docs/topics/README.md.html | 3 +-
105 files changed, 615 insertions(+), 104 deletions(-)
create mode 100644 docs/addons/report-jail.html
diff --git a/docs/addons/Advanced-Start.html b/docs/addons/Advanced-Start.html
index b62dd959..f7f66160 100644
--- a/docs/addons/Advanced-Start.html
+++ b/docs/addons/Advanced-Start.html
@@ -58,6 +58,7 @@
@@ -2432,7 +2433,7 @@ nb: use error(error_message) within your callback to trigger do not trigger dire
generated by LDoc
diff --git a/docs/core/Common.html b/docs/core/Common.html
index f9323565..f659cf9d 100644
--- a/docs/core/Common.html
+++ b/docs/core/Common.html
@@ -92,6 +92,7 @@
@@ -3395,7 +3396,7 @@ nb: this is one way, failing false after already gaining the role will not revok
generated by LDoc
diff --git a/docs/data/Alt-View.html b/docs/data/Alt-View.html
index ee809c01..c231c94e 100644
--- a/docs/data/Alt-View.html
+++ b/docs/data/Alt-View.html
@@ -101,6 +101,7 @@
@@ -2433,7 +2434,7 @@ nb: use error(error_message) within your callback to trigger do not trigger dire
generated by LDoc
diff --git a/docs/core/Common.html b/docs/core/Common.html
index f659cf9d..c6034145 100644
--- a/docs/core/Common.html
+++ b/docs/core/Common.html
@@ -84,6 +84,7 @@
@@ -3396,7 +3397,7 @@ nb: this is one way, failing false after already gaining the role will not revok
generated by LDoc
diff --git a/docs/data/Alt-View.html b/docs/data/Alt-View.html
index c231c94e..7db3f458 100644
--- a/docs/data/Alt-View.html
+++ b/docs/data/Alt-View.html
@@ -93,6 +93,7 @@
@@ -2434,7 +2435,7 @@ nb: use error(error_message) within your callback to trigger do not trigger dire
generated by LDoc
diff --git a/docs/core/Common.html b/docs/core/Common.html
index c6034145..9d8479d7 100644
--- a/docs/core/Common.html
+++ b/docs/core/Common.html
@@ -149,6 +149,7 @@
@@ -3397,7 +3398,7 @@ nb: this is one way, failing false after already gaining the role will not revok
generated by LDoc
diff --git a/docs/data/Alt-View.html b/docs/data/Alt-View.html
index 7db3f458..1c48b0db 100644
--- a/docs/data/Alt-View.html
+++ b/docs/data/Alt-View.html
@@ -145,6 +145,7 @@
@@ -514,7 +515,7 @@
generated by LDoc
diff --git a/docs/index.html b/docs/index.html
index e58e2d4b..50153a2b 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -350,6 +350,11 @@
- Adds a commands that allow interaction with the role system
@@ -2435,7 +2436,7 @@ nb: use error(error_message) within your callback to trigger do not trigger dire
generated by LDoc
diff --git a/docs/core/Common.html b/docs/core/Common.html
index f278d160..97d4a3e8 100644
--- a/docs/core/Common.html
+++ b/docs/core/Common.html
@@ -133,6 +133,7 @@
@@ -3398,7 +3399,7 @@ nb: this is one way, failing false after already gaining the role will not revok
generated by LDoc
diff --git a/docs/data/Alt-View.html b/docs/data/Alt-View.html
index 5dc3a0a8..6d1fbe39 100644
--- a/docs/data/Alt-View.html
+++ b/docs/data/Alt-View.html
@@ -129,6 +129,7 @@
@@ -515,7 +516,7 @@
generated by LDoc
diff --git a/docs/index.html b/docs/index.html
index 90889585..c501375b 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -270,6 +270,11 @@
- Adds a command that allows admins to talk in a private chat
@@ -366,7 +367,7 @@ Please report these errors to [the issues page](issues).
generated by LDoc
From ca25dc7cb7ddccb10b904fa72bbfeb90026f4c9f Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Sun, 25 Apr 2021 23:52:19 +0100
Subject: [PATCH 26/27] Implemented requested changes
---
locale/en/commands.cfg | 2 +-
modules/commands/spectate.lua | 2 +-
modules/control/spectate.lua | 24 ++++++++++++------------
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/locale/en/commands.cfg b/locale/en/commands.cfg
index c2f91450..e3f622ce 100644
--- a/locale/en/commands.cfg
+++ b/locale/en/commands.cfg
@@ -85,4 +85,4 @@ none-matching=No servers were found with that name, if you used an address pleas
response=Last location of __1__ was [gps=__2__,__3__]
[expcom-spectate]
-follow-self=You can not follow your self
\ No newline at end of file
+follow-self=You can not follow yourself
\ No newline at end of file
diff --git a/modules/commands/spectate.lua b/modules/commands/spectate.lua
index 51f28bd3..aa74d591 100644
--- a/modules/commands/spectate.lua
+++ b/modules/commands/spectate.lua
@@ -1,5 +1,5 @@
--[[-- Commands Module - Spectate
- - Adds a commands relating to spectate and follow
+ - Adds commands relating to spectate and follow
@commands Spectate
]]
diff --git a/modules/control/spectate.lua b/modules/control/spectate.lua
index 5fec23af..6f9944f8 100644
--- a/modules/control/spectate.lua
+++ b/modules/control/spectate.lua
@@ -22,15 +22,15 @@ end)
--- Test if a player is in spectator mode
-- @tparam LuaPlayer player The player to test the controller type of
--- @treturn boolean True if the player is in spectator mode
+-- @treturn boolean Returns true if the player is in spectator mode
function Public.is_spectating(player)
assert(player and player.valid, 'Invalid player given to follower')
return player.controller_type == defines.controllers.spectator
end
---- Puts a player into spectator while maintaining an association to their character
--- @tparam LuaPlayer player The player that will be placed into spectator
--- @treturn boolean Returns false if the player was already in spectator
+--- Puts a player into spectator mode while maintaining an association to their character
+-- @tparam LuaPlayer player The player that will be placed into spectator mode
+-- @treturn boolean Returns false if the player was already in spectator mode
function Public.start_spectate(player)
assert(player and player.valid, 'Invalid player given to follower')
if spectating[player.index] or not player.character then return false end
@@ -41,8 +41,8 @@ function Public.start_spectate(player)
return true
end
---- Return a player from spectator back to their character, if the character was killed then respawn the character
--- @tparam LuaPlayer player The player that will leave spectator
+--- Return a player from spectator mode back to their character, if their character was killed then respawn them
+-- @tparam LuaPlayer player The player that will leave spectator mode
function Public.stop_spectate(player)
assert(player and player.valid, 'Invalid player given to follower')
local character = spectating[player.index]
@@ -59,13 +59,13 @@ end
--- Test if a player is in follow mode
-- @tparam LuaPlayer player The player to test the follow mode of
--- @treturn boolean True if the player is in follow mode
+-- @treturn boolean Returns true if the player is in follow mode
function Public.is_following(player)
assert(player and player.valid, 'Invalid player given to follower')
return following[player.index] ~= nil
end
---- Puts a player into spectator and follows an entity as it moves
+--- Puts a player into spectator mode and follows an entity as it moves
-- @tparam LuaPlayer player The player that will follow the entity
-- @tparam ?LuaPlayer|LuaEntity entity The player or entity that will be followed
function Public.start_follow(player, entity)
@@ -79,8 +79,8 @@ function Public.start_follow(player, entity)
following[player.index] = { player, entity, entity.position, spectate }
end
---- Stops a player from following their current entity, can also return a player from spectate
--- @tparam LuaPlayer player The player that you want to stop following their entity
+--- Returns camera control to the player, will return a player to their character if start_follow placed them into spectator mode
+-- @tparam LuaPlayer player The player that will regain control of their camera
function Public.stop_follow(player)
assert(player and player.valid, 'Invalid player given to follower')
if following[player.index] and following[player.index][4] then Public.stop_spectate(player) end
@@ -89,7 +89,7 @@ function Public.stop_follow(player)
following[player.index] = nil
end
---- Used to stop all players following an entity or player
+--- Returns camera control to all players, will return a player to their character if start_follow placed them into spectator mode
function Public.stop_all()
for key, data in pairs(following) do
Public.stop_follow(data[1])
@@ -122,7 +122,7 @@ Gui.element(function(event_trigger, parent, target)
end)
:on_click(Public.stop_follow)
:on_close(function(player)
- -- Dont call set_controller during on_close as it invalidates the controller
+ -- Don't call set_controller during on_close as it invalidates the controller
-- Setting an invalid position (as to not equal their current) will call stop_follow on the next tick
following[player.index][3] = {}
end)
From 1cce4284c67ce3b10b6e59d903b1d5f0998db373 Mon Sep 17 00:00:00 2001
From: Cooldude2606
Date: Sun, 25 Apr 2021 22:55:00 +0000
Subject: [PATCH 27/27] Automatic Doc Update
---
docs/addons/Advanced-Start.html | 3 +-
docs/addons/Chat-Popups.html | 3 +-
docs/addons/Chat-Reply.html | 3 +-
docs/addons/Compilatron.html | 3 +-
docs/addons/Damage-Popups.html | 3 +-
docs/addons/Death-Logger.html | 3 +-
docs/addons/Discord-Alerts.html | 3 +-
docs/addons/Inventory-Clear.html | 3 +-
docs/addons/Pollution-Grading.html | 3 +-
docs/addons/Scorched-Earth.html | 3 +-
docs/addons/Spawn-Area.html | 3 +-
docs/addons/Tree-Decon.html | 3 +-
docs/addons/afk-kick.html | 3 +-
docs/addons/report-jail.html | 3 +-
docs/commands/Admin-Chat.html | 3 +-
docs/commands/Admin-Markers.html | 3 +-
docs/commands/Cheat-Mode.html | 3 +-
docs/commands/Clear-Inventory.html | 3 +-
docs/commands/Connect.html | 3 +-
docs/commands/Debug.html | 3 +-
docs/commands/Find.html | 3 +-
docs/commands/Help.html | 3 +-
docs/commands/Home.html | 3 +-
docs/commands/Interface.html | 3 +-
docs/commands/InventorySearch.html | 3 +-
docs/commands/Jail.html | 3 +-
docs/commands/Kill.html | 3 +-
docs/commands/LastLocation.html | 3 +-
docs/commands/Me.html | 3 +-
docs/commands/Rainbow.html | 3 +-
docs/commands/Repair.html | 3 +-
docs/commands/Reports.html | 3 +-
docs/commands/Roles.html | 3 +-
docs/commands/Spawn.html | 3 +-
docs/commands/Spectate.html | 451 ++++++++++++++++++
docs/commands/Teleport.html | 3 +-
docs/commands/Warnings.html | 3 +-
docs/configs/Advanced-Start.html | 3 +-
docs/configs/Autofill.html | 3 +-
docs/configs/Bonuses.html | 3 +-
docs/configs/Chat-Reply.html | 3 +-
docs/configs/Commands-Auth-Admin.html | 3 +-
docs/configs/Commands-Auth-Roles.html | 3 +-
.../Commands-Auth-Runtime-Disable.html | 3 +-
docs/configs/Commands-Color-Parse.html | 3 +-
docs/configs/Commands-Parse-Roles.html | 3 +-
docs/configs/Commands-Parse.html | 3 +-
docs/configs/Compilatron.html | 3 +-
docs/configs/Death-Logger.html | 3 +-
docs/configs/Discord-Alerts.html | 3 +-
docs/configs/File-Loader.html | 3 +-
docs/configs/Permission-Groups.html | 3 +-
docs/configs/Player-List.html | 3 +-
docs/configs/Pollution-Grading.html | 3 +-
docs/configs/Popup-Messages.html | 3 +-
docs/configs/Preset-Player-Colours.html | 3 +-
docs/configs/Preset-Player-Quickbar.html | 3 +-
docs/configs/Repair.html | 3 +-
docs/configs/Rockets.html | 3 +-
docs/configs/Roles.html | 3 +-
docs/configs/Science.html | 3 +-
docs/configs/Scorched-Earth.html | 3 +-
docs/configs/Spawn-Area.html | 3 +-
docs/configs/Statistics.html | 3 +-
docs/configs/Tasks.html | 3 +-
docs/configs/Warnings.html | 3 +-
docs/configs/Warps.html | 3 +-
docs/configs/inventory_clear.html | 3 +-
docs/control/Jail.html | 3 +-
docs/control/Production.html | 3 +-
docs/control/Reports.html | 3 +-
docs/control/Rockets.html | 3 +-
docs/control/Tasks.html | 3 +-
docs/control/Warnings.html | 3 +-
docs/control/Warps.html | 3 +-
docs/core/Async.html | 3 +-
docs/core/Commands.html | 3 +-
docs/core/Common.html | 3 +-
docs/core/Datastore.html | 3 +-
docs/core/External.html | 3 +-
docs/core/Groups.html | 3 +-
docs/core/Gui.html | 3 +-
docs/core/PlayerData.html | 3 +-
docs/core/Roles.html | 3 +-
docs/data/Alt-View.html | 3 +-
docs/data/Bonus.html | 3 +-
docs/data/Greetings.html | 3 +-
docs/data/Player-Colours.html | 3 +-
docs/data/Quickbar.html | 3 +-
docs/data/Tag.html | 3 +-
docs/guis/Autofill.html | 3 +-
docs/guis/Player-List.html | 3 +-
docs/guis/Readme.html | 3 +-
docs/guis/Rocket-Info.html | 3 +-
docs/guis/Science-Info.html | 3 +-
docs/guis/Task-List.html | 3 +-
docs/guis/Warps-List.html | 3 +-
docs/guis/server-ups.html | 3 +-
docs/index.html | 7 +-
docs/modules/control.html | 3 +-
.../modules.addons.station-auto-name.html | 3 +-
docs/modules/overrides.debug.html | 3 +-
docs/modules/overrides.math.html | 3 +-
docs/modules/overrides.table.html | 3 +-
docs/modules/utils.event.html | 3 +-
docs/modules/utils.event_core.html | 3 +-
docs/modules/utils.task.html | 3 +-
docs/topics/LICENSE.html | 3 +-
docs/topics/README.md.html | 3 +-
109 files changed, 671 insertions(+), 108 deletions(-)
create mode 100644 docs/commands/Spectate.html
diff --git a/docs/addons/Advanced-Start.html b/docs/addons/Advanced-Start.html
index dd1acf48..00f1d2f1 100644
--- a/docs/addons/Advanced-Start.html
+++ b/docs/addons/Advanced-Start.html
@@ -148,6 +148,7 @@
@@ -2436,7 +2437,7 @@ nb: use error(error_message) within your callback to trigger do not trigger dire
generated by LDoc
diff --git a/docs/core/Common.html b/docs/core/Common.html
index 97d4a3e8..ce66c54c 100644
--- a/docs/core/Common.html
+++ b/docs/core/Common.html
@@ -152,6 +152,7 @@
@@ -3399,7 +3400,7 @@ nb: this is one way, failing false after already gaining the role will not revok
generated by LDoc
diff --git a/docs/data/Alt-View.html b/docs/data/Alt-View.html
index 6d1fbe39..aa161fbd 100644
--- a/docs/data/Alt-View.html
+++ b/docs/data/Alt-View.html
@@ -148,6 +148,7 @@
@@ -516,7 +517,7 @@
generated by LDoc
diff --git a/docs/index.html b/docs/index.html
index c501375b..cd27201c 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -365,6 +365,11 @@
- Adds a command that allows players to teleport to their spawn point