This commit is contained in:
2025-12-04 01:31:25 +09:00
104 changed files with 3215 additions and 2592 deletions

View File

@@ -6,28 +6,6 @@
return {
"expcore.player_data", -- must be loaded first to register event handlers
--- Addons
"modules.addons.chat-popups",
"modules.addons.damage-popups",
"modules.addons.death-logger",
"modules.addons.advanced-start",
"modules.addons.spawn-area",
"modules.addons.compilatron",
--"modules.addons.scorched-earth",
--"modules.addons.pollution-grading",
--"modules.addons.station-auto-name",
"modules.addons.discord-alerts",
"modules.addons.chat-reply",
"modules.addons.tree-decon",
"modules.addons.afk-kick",
"modules.addons.report-jail",
"modules.addons.protection-jail",
"modules.addons.deconlog",
"modules.addons.nukeprotect",
"modules.addons.inserter",
"modules.addons.miner",
"modules.addons.logging",
-- Control
"modules.control.vlayer",

View File

@@ -82,6 +82,7 @@ return {
skip_intro = true, --- @setting skip_intro skips the intro given in the default factorio free play scenario
skip_victory = true, --- @setting skip_victory will skip the victory screen when a rocket is launched
friendly_fire = false, --- @setting friendly_fire weather players will be able to attack each other on the same force
disable_crashsite = true, --- @setting disable_crashsite weather to disable creation of the crashsite
enemy_expansion = false, --- @setting enemy_expansion a catch all for in case the map settings file fails to load
chart_radius = 16 * 32, --- @setting chart_radius the number of tiles that will be charted when the map starts
items = { --- @setting items items and there condition for being given

View File

@@ -1,9 +1,13 @@
local Roles = require("modules.exp_legacy.expcore.roles")
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 checks for active players
custom_active_check = function(player)
return Roles.get_player_highest_role(player).index <= Roles.get_role_from_any("Veteran").index
end,
}

View File

@@ -4,9 +4,14 @@
local ExpUtil = require("modules/exp_util")
local Async = require("modules/exp_util/async")
local floor = math.floor
local random = math.random
local format_string = string.format
local locale_reply = "exp_chat-auto-reply.chat-reply"
local send_message_async =
Async.register(function(player, message)
if player == true then
if player == nil then
game.print(message)
else
player.print(message)
@@ -18,9 +23,7 @@ local afk_time_units = {
seconds = true,
}
-- luacheck:ignore 212/player 212/is_command
return {
allow_command_prefix_for_messages = true, --- @setting allow_command_prefix_for_messages when true any message trigger will print to all player when prefixed
messages = { --- @setting messages will trigger when ever the word is said
["discord"] = { "info.discord" },
["aperx"] = { "info.website" },
@@ -29,14 +32,23 @@ return {
["command"] = { "info.custom-commands" },
["commands"] = { "info.custom-commands" },
["softmod"] = { "info.softmod" },
["plugin"] = { "info.softmod" },
["script"] = { "info.softmod" },
["loop"] = { "chat-bot.loops" },
["redmew"] = { "info.redmew" },
["comfy"] = { "info.redmew" },
["rhd"] = { "info.lhd" },
["lhd"] = { "info.lhd" },
["roundabout"] = { "chat-bot.loops" },
["roundabouts"] = { "chat-bot.loops" },
["redmew"] = { "info.redmew" },
["afk"] = function(player, _is_command)
["loop"] = { "exp_chat-auto-reply.reply-loops" },
["roundabout"] = { "exp_chat-auto-reply.reply-loops" },
["roundabouts"] = { "exp_chat-auto-reply.reply-loops" },
["clusterio"] = { "exp_chat-auto-reply.reply-clusterio" },
["players"] = function()
return { "exp_chat-auto-reply.reply-players", #game.players }
end,
["online"] = function()
return { "exp_chat-auto-reply.reply-online", #game.connected_players }
end,
["afk"] = function(player)
local max = player
for _, next_player in pairs(game.connected_players) do
if max.afk_time < next_player.afk_time then
@@ -44,84 +56,76 @@ return {
end
end
return { "chat-bot.afk", max.name, ExpUtil.format_time_locale(max.afk_time, "long", afk_time_units) }
end,
["players"] = function(_player, _is_command)
return { "chat-bot.players", #game.players }
end,
["online"] = function(_player, _is_command)
return { "chat-bot.players-online", #game.connected_players }
end,
["r!verify"] = function(player, _is_command)
return { "chat-bot.verify", player.name }
return { "exp_chat-auto-reply.reply-afk", max.name, ExpUtil.format_time_locale(max.afk_time, "long", afk_time_units) }
end,
},
allow_command_prefix_for_messages = true, --- @setting allow_command_prefix_for_messages when true any message trigger will print to all player when prefixed
command_admin_only = false, --- @setting command_admin_only when true will only allow chat commands for admins
command_permission = "command/chat-bot", --- @setting command_permission the permission used to allow command prefixes
command_permission = "command/chat-commands", --- @setting command_permission the permission used to allow command prefixes
command_prefix = "!", --- @setting command_prefix prefix used for commands below and to print to all players (if enabled above)
commands = { --- @setting commands will trigger only when command prefix is given
["dev"] = { "chat-bot.not-real-dev" },
["blame"] = function(player, _is_command)
["dev"] = { "exp_chat-auto-reply.reply-dev" },
["magic"] = { "exp_chat-auto-reply.reply-magic" },
["aids"] = { "exp_chat-auto-reply.reply-aids" },
["riot"] = { "exp_chat-auto-reply.reply-riot" },
["lenny"] = { "exp_chat-auto-reply.reply-lenny" },
["blame"] = function(player)
local names = { "Cooldude2606", "arty714", "badgamernl", "mark9064", "aldldl", "Drahc_pro", player.name }
for _, next_player in pairs(game.connected_players) do
names[#names + 1] = next_player.name
end
return { "chat-bot.blame", table.get_random(names) }
return { "exp_chat-auto-reply.reply-blame", table.get_random(names) }
end,
["magic"] = { "chat-bot.magic" },
["aids"] = { "chat-bot.aids" },
["riot"] = { "chat-bot.riot" },
["lenny"] = { "chat-bot.lenny" },
["hodor"] = function(_player, _is_command)
["hodor"] = function()
local options = { "?", ".", "!", "!!!" }
return { "chat-bot.hodor", table.get_random(options) }
return { "exp_chat-auto-reply.reply-hodor", table.get_random(options) }
end,
["evolution"] = function(player, _is_command)
return { "chat-bot.current-evolution", string.format("%.2f", game.forces["enemy"].get_evolution_factor(player.surface)) }
["evolution"] = function(player)
return { "exp_chat-auto-reply.reply-evolution", format_string("%.2f", game.forces["enemy"].get_evolution_factor(player.surface)) }
end,
["makepopcorn"] = function(player, _is_command)
local timeout = math.floor(180 * (math.random() + 0.5))
send_message_async(true, { "chat-bot.reply", { "chat-bot.get-popcorn-1" } })
send_message_async:start_after(timeout, true, { "chat-bot.reply", { "chat-bot.get-popcorn-2", player.name } })
["makepopcorn"] = function(player)
local timeout = floor(180 * (random() + 0.5))
send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-popcorn-2", player.name } })
return { locale_reply, { "exp_chat-auto-reply.reply-popcorn-1" } }
end,
["passsomesnaps"] = function(player, _is_command)
local timeout = math.floor(180 * (math.random() + 0.5))
send_message_async(player, { "chat-bot.reply", { "chat-bot.get-snaps-1" } })
send_message_async:start_after(timeout, true, { "chat-bot.reply", { "chat-bot.get-snaps-2", player.name } })
send_message_async:start_after(timeout * (math.random() + 0.5), true, { "chat-bot.reply", { "chat-bot.get-snaps-3", player.name } })
["passsomesnaps"] = function(player)
local timeout = floor(180 * (random() + 0.5))
send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-snaps-2", player.name } })
send_message_async:start_after(timeout * (random() + 0.5), nil, { locale_reply, { "exp_chat-auto-reply.reply-snaps-3", player.name } })
return { locale_reply, { "exp_chat-auto-reply.reply-snaps-1" } }
end,
["makecocktail"] = function(player, _is_command)
local timeout = math.floor(180 * (math.random() + 0.5))
send_message_async(true, { "chat-bot.reply", { "chat-bot.get-cocktail-1" } })
send_message_async:start_after(timeout, true, { "chat-bot.reply", { "chat-bot.get-cocktail-2", player.name } })
send_message_async:start_after(timeout * (math.random() + 0.5), true, { "chat-bot.reply", { "chat-bot.get-cocktail-3", player.name } })
["makecocktail"] = function(player)
local timeout = floor(180 * (random() + 0.5))
send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-cocktail-2", player.name } })
send_message_async:start_after(timeout * (random() + 0.5), nil, { locale_reply, { "exp_chat-auto-reply.reply-cocktail-3", player.name } })
return { locale_reply, { "exp_chat-auto-reply.reply-cocktail-1" } }
end,
["makecoffee"] = function(player, _is_command)
local timeout = math.floor(180 * (math.random() + 0.5))
send_message_async(true, { "chat-bot.reply", { "chat-bot.make-coffee-1" } })
send_message_async:start_after(timeout, true, { "chat-bot.reply", { "chat-bot.make-coffee-2", player.name } })
["makecoffee"] = function(player)
local timeout = floor(180 * (random() + 0.5))
send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-coffee-2", player.name } })
return { locale_reply, { "exp_chat-auto-reply.reply-coffee-1" } }
end,
["orderpizza"] = function(player, _is_command)
local timeout = math.floor(180 * (math.random() + 0.5))
send_message_async(true, { "chat-bot.reply", { "chat-bot.order-pizza-1" } })
send_message_async:start_after(timeout, true, { "chat-bot.reply", { "chat-bot.order-pizza-2", player.name } })
send_message_async:start_after(timeout * (math.random() + 0.5), true, { "chat-bot.reply", { "chat-bot.order-pizza-3", player.name } })
["orderpizza"] = function(player)
local timeout = floor(180 * (random() + 0.5))
send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-pizza-2", player.name } })
send_message_async:start_after(timeout * (random() + 0.5), nil, { locale_reply, { "exp_chat-auto-reply.reply-pizza-3", player.name } })
return { locale_reply, { "exp_chat-auto-reply.reply-pizza-1" } }
end,
["maketea"] = function(player, _is_command)
local timeout = math.floor(180 * (math.random() + 0.5))
send_message_async(true, { "chat-bot.reply", { "chat-bot.make-tea-1" } })
send_message_async:start_after(timeout, true, { "chat-bot.reply", { "chat-bot.make-tea-2", player.name } })
["maketea"] = function(player)
local timeout = floor(180 * (random() + 0.5))
send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-tea-2", player.name } })
return { locale_reply, { "exp_chat-auto-reply.reply-tea-1" } }
end,
["meadplease"] = function(player, _is_command)
local timeout = math.floor(180 * (math.random() + 0.5))
send_message_async(true, { "chat-bot.reply", { "chat-bot.get-mead-1" } })
send_message_async:start_after(timeout, true, { "chat-bot.reply", { "chat-bot.get-mead-2", player.name } })
["meadplease"] = function(player)
local timeout = floor(180 * (random() + 0.5))
send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-mead-2", player.name } })
return { locale_reply, { "exp_chat-auto-reply.reply-mead-1" } }
end,
["passabeer"] = function(player, _is_command)
local timeout = math.floor(180 * (math.random() + 0.5))
send_message_async(true, { "chat-bot.reply", { "chat-bot.get-beer-1" } })
send_message_async:start_after(timeout, true, { "chat-bot.reply", { "chat-bot.get-beer-2", player.name } })
["passabeer"] = function(player)
local timeout = floor(180 * (random() + 0.5))
send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-beer-2", player.name } })
return { locale_reply, { "exp_chat-auto-reply.reply-beer-1" } }
end,
},
}

View File

@@ -3,17 +3,23 @@
return {
message_cycle = 60 * 15, --- @setting message_cycle 15 seconds default, how often (in ticks) the messages will cycle
locations = { --- @setting locations defines the spawn locations for all compilatrons
["Spawn"] = { x = 0, y = 0 },
},
messages = { --- @setting messages the messages that each one will say, must be same name as its location
locations = {
["Spawn"] = {
{ "info.website" },
{ "info.github" },
{ "info.read-readme" },
{ "info.softmod" },
{ "info.custom-commands" },
{ "info.lhd" },
},
spawn_position = { x = 0, y = 0 },
spawn_surface = "nauvis",
entity_name = "small-biter",
messages = {
{ "info.website" },
{ "info.read-readme" },
{ "info.discord" },
{ "info.softmod" },
{ "info.redmew" },
{ "info.custom-commands" },
{ "info.status" },
{ "info.lhd" },
{ "info.github" },
{ "info.patreon" },
},
}
},
}

View File

@@ -4,13 +4,12 @@
-- @config Death-Logger
return {
-- WIP_allow_teleport_to_body_command=false, -- allows use of /return-to-body which teleports you to your last death
-- WIP_allow_collect_bodies_command=false, -- allows use of /collect-body which returns all your items to you and removes the body
use_chests_as_bodies = false, --- @setting use_chests_as_bodies weather items should be moved into a chest when a player dies
auto_collect_bodies = true, --- @setting auto_collect_bodies enables items being returned to the spawn point in chests upon corpse expiring
collect_corpses = true, --- @setting collect_corpses enables items being returned to the spawn point in chests upon corpse expiring
show_map_markers = true, --- @setting show_map_markers shows markers on the map where bodies are
clean_map_markers = false,
include_time_of_death = true, --- @setting include_time_of_death weather to include the time of death on the map marker
map_icon = nil, --- @setting map_icon the icon that the map marker shows; nil means no icon; format as a SingleID
show_light_at_corpse = true, --- @setting show_light_at_corpse if a light should be rendered at the corpse
show_line_to_corpse = true, --- @setting show_line_to_corpse if a line should be rendered from you to your corpse
period_check_map_tags = 60 * 60 * 5,
}

View File

@@ -217,6 +217,7 @@ Roles.new_role("Veteran", "Vet")
"gui/warp-list/add",
"gui/warp-list/edit",
"command/chat-bot",
"command/chat-commands",
"command/clear-ground-items",
"command/clear-blueprints-radius",
"command/set-trains-to-automatic",

View File

@@ -15,16 +15,16 @@ return {
},
rocket_launch_display_rate = 500,
disconnect_reason = {
[defines.disconnect_reason.quit] = " left the game",
[defines.disconnect_reason.dropped] = " was dropped from the game",
[defines.disconnect_reason.reconnect] = " is reconnecting",
[defines.disconnect_reason.wrong_input] = " was having a wrong input",
[defines.disconnect_reason.desync_limit_reached] = " had desync limit reached",
[defines.disconnect_reason.cannot_keep_up] = " cannot keep up",
[defines.disconnect_reason.afk] = " was afk",
[defines.disconnect_reason.kicked] = " was kicked",
[defines.disconnect_reason.kicked_and_deleted] = " was kicked and deleted",
[defines.disconnect_reason.banned] = " was banned",
[defines.disconnect_reason.switching_servers] = " is switching servers",
[defines.disconnect_reason.quit] = "left the game",
[defines.disconnect_reason.dropped] = "was dropped from the game",
[defines.disconnect_reason.reconnect] = "is reconnecting",
[defines.disconnect_reason.wrong_input] = "was having a wrong input",
[defines.disconnect_reason.desync_limit_reached] = "had desync limit reached",
[defines.disconnect_reason.cannot_keep_up] = "cannot keep up",
[defines.disconnect_reason.afk] = "was afk",
[defines.disconnect_reason.kicked] = "was kicked",
[defines.disconnect_reason.kicked_and_deleted] = "was kicked and deleted",
[defines.disconnect_reason.banned] = "was banned",
[defines.disconnect_reason.switching_servers] = "is switching servers",
},
}

View File

@@ -25,6 +25,6 @@ return {
},
},
},
ignore_permisison = "bypass-nukeprotect", -- @setting ignore_permisison The permission that nukeprotect will ignore
ignore_permission = "bypass-nukeprotect", -- @setting ignore_permission The permission that nukeprotect will ignore
ignore_admins = true, -- @setting ignore_admins Ignore admins, true by default. Allows usage outside of the roles module
}

View File

@@ -15,11 +15,11 @@ return {
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 = 2, y = 2 } },
{ surface = 1, position = { x = 2, y = -2 } },
{ surface = 1, position = { x = -2, y = 2 } },
{ surface = 1, position = { x = -2, y = -2 } },
}
{ -2, -2 },
{ 2, -2 },
{ -2, 2 },
{ 2, 2 },
},
},
afk_belts = { --- @setting afk_belts Settings relating to adding afk belts to spawn
enabled = true, --- @setting enabled Whether afk belts will be added to spawn
@@ -142,6 +142,7 @@ return {
resource_refill_nearby = {
enabled = false,
range = 128,
refill_time = 36000,
resources_name = {
"iron-ore",
"copper-ore",