@expcluster/legacy 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/LICENSE.md +21 -0
  2. package/dist/browser/package.json +40 -0
  3. package/dist/browser/tsconfig.browser.tsbuildinfo +1 -0
  4. package/dist/browser/web/index.d.ts +1 -0
  5. package/dist/browser/web/index.d.ts.map +1 -0
  6. package/dist/browser/web/index.js +2 -0
  7. package/dist/browser/web/index.js.map +1 -0
  8. package/dist/node/index.d.ts +3 -0
  9. package/dist/node/index.d.ts.map +1 -0
  10. package/dist/node/index.js +10 -0
  11. package/dist/node/index.js.map +1 -0
  12. package/dist/node/instance.d.ts +4 -0
  13. package/dist/node/instance.d.ts.map +1 -0
  14. package/dist/node/instance.js +8 -0
  15. package/dist/node/instance.js.map +1 -0
  16. package/dist/node/tsconfig.node.tsbuildinfo +1 -0
  17. package/dist/web/manifest.json +7 -0
  18. package/dist/web/static/exp_legacy.9b6538559ed5e689539c.js +355 -0
  19. package/dist/web/static/index_ts.8f9d451c8d3f7f293da6.js +22 -0
  20. package/dist/web/static/main.94e1b48804112ca8bdfc.js +118 -0
  21. package/dist/web/static/package_json.a83729efdb0697b12396.js +22 -0
  22. package/dist/web/static/web_index_tsx.e5a01ac0e4b0a6f6517f.js +21 -0
  23. package/index.ts +8 -0
  24. package/instance.ts +7 -0
  25. package/module/config/_file_loader.lua +29 -0
  26. package/module/config/advanced_start.lua +112 -0
  27. package/module/config/afk_kick.lua +14 -0
  28. package/module/config/bonus.lua +105 -0
  29. package/module/config/chat_reply.lua +136 -0
  30. package/module/config/compilatron.lua +25 -0
  31. package/module/config/death_logger.lua +15 -0
  32. package/module/config/deconlog.lua +11 -0
  33. package/module/config/discord_alerts.lua +25 -0
  34. package/module/config/expcore/permission_groups.lua +143 -0
  35. package/module/config/graftorio.lua +7 -0
  36. package/module/config/gui/autofill.lua +129 -0
  37. package/module/config/gui/player_list_actions.lua +201 -0
  38. package/module/config/gui/rockets.lua +47 -0
  39. package/module/config/gui/science.lua +21 -0
  40. package/module/config/gui/tasks.lua +13 -0
  41. package/module/config/gui/warps.lua +52 -0
  42. package/module/config/inventory_clear.lua +9 -0
  43. package/module/config/join_messages.lua +8 -0
  44. package/module/config/lawnmower.lua +6 -0
  45. package/module/config/logging.lua +30 -0
  46. package/module/config/miner.lua +8 -0
  47. package/module/config/module.lua +86 -0
  48. package/module/config/nukeprotect.lua +30 -0
  49. package/module/config/pollution_grading.lua +9 -0
  50. package/module/config/popup_messages.lua +10 -0
  51. package/module/config/preset_player_colours.lua +33 -0
  52. package/module/config/preset_player_quickbar.lua +6 -0
  53. package/module/config/protection.lua +17 -0
  54. package/module/config/repair.lua +8 -0
  55. package/module/config/research.lua +179 -0
  56. package/module/config/scorched_earth.lua +116 -0
  57. package/module/config/spawn_area.lua +255 -0
  58. package/module/config/station_auto_name.lua +11 -0
  59. package/module/config/statistics.lua +46 -0
  60. package/module/config/vlayer.lua +180 -0
  61. package/module/config/warnings.lua +38 -0
  62. package/module/control.lua +46 -0
  63. package/module/expcore/datastore.lua +884 -0
  64. package/module/expcore/external.lua +146 -0
  65. package/module/expcore/permission_groups.lua +355 -0
  66. package/module/expcore/player_data.lua +152 -0
  67. package/module/locale/en/addons.cfg +31 -0
  68. package/module/locale/en/data.cfg +114 -0
  69. package/module/locale/en/expcore.cfg +16 -0
  70. package/module/locale/en/gui.cfg +114 -0
  71. package/module/locale/zh-CN/addons.cfg +31 -0
  72. package/module/locale/zh-CN/data.cfg +114 -0
  73. package/module/locale/zh-CN/expcore.cfg +16 -0
  74. package/module/locale/zh-CN/gui.cfg +122 -0
  75. package/module/locale/zh-TW/addons.cfg +31 -0
  76. package/module/locale/zh-TW/data.cfg +114 -0
  77. package/module/locale/zh-TW/expcore.cfg +16 -0
  78. package/module/locale/zh-TW/gui.cfg +122 -0
  79. package/module/module.json +14 -0
  80. package/module/module_exports.lua +3 -0
  81. package/module/modules/control/jail.lua +119 -0
  82. package/module/modules/control/protection.lua +204 -0
  83. package/module/modules/control/reports.lua +225 -0
  84. package/module/modules/control/spectate.lua +173 -0
  85. package/module/modules/control/vlayer.lua +807 -0
  86. package/module/modules/control/warnings.lua +331 -0
  87. package/module/modules/control/warps.lua +488 -0
  88. package/module/modules/data/alt-view.lua +26 -0
  89. package/module/modules/data/greetings.lua +45 -0
  90. package/module/modules/data/language.lua +21 -0
  91. package/module/modules/data/player-colours.lua +63 -0
  92. package/module/modules/data/quickbar.lua +72 -0
  93. package/module/modules/data/statistics.lua +181 -0
  94. package/module/modules/data/tag.lua +82 -0
  95. package/module/modules/data/toolbar.lua +31 -0
  96. package/module/modules/graftorio/forcestats.lua +196 -0
  97. package/module/modules/graftorio/general.lua +63 -0
  98. package/module/modules/graftorio/require.lua +28 -0
  99. package/module/modules/graftorio/statics.lua +36 -0
  100. package/module/modules/gui/vlayer.lua +547 -0
  101. package/module/modules/gui/warp-list.lua +909 -0
  102. package/module/utils/event.lua +86 -0
  103. package/package.json +38 -0
  104. package/tsconfig.browser.json +4 -0
  105. package/tsconfig.json +7 -0
  106. package/tsconfig.node.json +5 -0
  107. package/web/index.tsx +0 -0
  108. package/webpack.config.js +29 -0
@@ -0,0 +1,112 @@
1
+ --- This file is used to setup the map starting settings and the items players will start with
2
+ -- @config Advanced-Start
3
+
4
+ --- These are called factories because they return another function
5
+ -- use these as a simple methods of adding new items
6
+ -- they will do most of the work for you
7
+ -- ['item-name'] = factory(params)
8
+ -- luacheck:ignore 212/amount_made 212/items_made 212/player
9
+
10
+ -- Use these to adjust for ticks ie game.tick < 5*minutes
11
+ -- luacheck:ignore 211/seconds 211/minutes 211/hours
12
+ local seconds, minutes, hours = 60, 3600, 216000
13
+
14
+ --- Use to make a split point for the number of items given based on time
15
+ -- ['stone-furnace']=cutoff_time(5*minutes, 4,0) -- before 5 minutes give four items after 5 minutes give none
16
+ local function cutoff_time(time, before, after)
17
+ return function(amount_made, items_made, player)
18
+ if game.tick < time then
19
+ return before
20
+ else
21
+ return after
22
+ end
23
+ end
24
+ end
25
+
26
+ --- Use to make a split point for the number of items given based on amount made
27
+ -- ['firearm-magazine']=cutoff_amount_made(100, 10, 0) -- give 10 items until 100 items have been made
28
+ local function cutoff_amount_made(amount, before, after)
29
+ return function(amount_made, items_made, player)
30
+ if amount_made < amount then
31
+ return before
32
+ else
33
+ return after
34
+ end
35
+ end
36
+ end
37
+
38
+ --- Same as above but will not give any items if x amount has been made of another item, useful for tiers
39
+ -- ['light-armor']=cutoff_amount_made_unless(5, 0,1,'heavy-armor',5) -- give light armor once 5 have been made unless 5 heavy armor has been made
40
+ local function cutoff_amount_made_unless(amount, before, after, second_item, second_amount)
41
+ return function(amount_made, items_made, player)
42
+ if items_made(second_item) < second_amount then
43
+ if amount_made < amount then
44
+ return before
45
+ else
46
+ return after
47
+ end
48
+ else
49
+ return 0
50
+ end
51
+ end
52
+ end
53
+
54
+ -- Use for mass production items where you want the amount to change based on the amount already made
55
+ -- ['iron-plate']=scale_amount_made(5*minutes, 10, 10) -- for first 5 minutes give 10 items then after apply a factor of 10
56
+ local function scale_amount_made(amount, before, scalar)
57
+ return function(amount_made, items_made, player)
58
+ if amount_made < amount then
59
+ return before
60
+ else
61
+ return (amount_made * scalar) / ((game.tick / minutes) ^ 2)
62
+ end
63
+ end
64
+ end
65
+
66
+ --[[
67
+ Common values
68
+ game.tick is the amount of time the game has been on for
69
+ amount_made is the amount of that item which has been made
70
+ items_made('item-name') will return the amount of any item made
71
+ player is the player who just spawned
72
+ hours, minutes, seconds are the number of ticks in each unit of time
73
+ ]]
74
+
75
+ return {
76
+ skip_intro = true, --- @setting skip_intro skips the intro given in the default factorio free play scenario
77
+ skip_victory = true, --- @setting skip_victory will skip the victory screen when a rocket is launched
78
+ friendly_fire = false, --- @setting friendly_fire weather players will be able to attack each other on the same force
79
+ disable_crashsite = true, --- @setting disable_crashsite weather to disable creation of the crashsite
80
+ enemy_expansion = false, --- @setting enemy_expansion a catch all for in case the map settings file fails to load
81
+ chart_radius = 10 * 32, --- @setting chart_radius the number of tiles that will be charted when the map starts
82
+ items = { --- @setting items items and there condition for being given
83
+ -- ['item-name'] = function(amount_made, production_stats, player) return <Number> end -- 0 means no items given
84
+ -- Plates
85
+ ["iron-plate"] = scale_amount_made(100, 10, 10),
86
+ ["copper-plate"] = scale_amount_made(100, 0, 8),
87
+ ["steel-plate"] = scale_amount_made(100, 0, 4),
88
+ -- Secondary Items
89
+ ["electronic-circuit"] = scale_amount_made(1000, 0, 6),
90
+ ["iron-gear-wheel"] = scale_amount_made(1000, 0, 6),
91
+ -- Starting Items
92
+ ["burner-mining-drill"] = cutoff_time(10 * minutes, 4, 0),
93
+ ["stone-furnace"] = cutoff_time(10 * minutes, 4, 0),
94
+ -- Armor
95
+ ["light-armor"] = cutoff_amount_made_unless(5, 0, 1, "heavy-armor", 5),
96
+ ["heavy-armor"] = cutoff_amount_made(5, 0, 1),
97
+ -- Weapon
98
+ ["pistol"] = cutoff_amount_made_unless(0, 1, 1, "submachine-gun", 5),
99
+ ["submachine-gun"] = cutoff_amount_made(5, 0, 1),
100
+ -- Ammo
101
+ ["firearm-magazine"] = cutoff_amount_made_unless(100, 10, 0, "piercing-rounds-magazine", 100),
102
+ ["piercing-rounds-magazine"] = cutoff_amount_made(100, 0, 10),
103
+ --[[
104
+ ['construction-robot'] = 10,
105
+ ['modular-armor'] = 1,
106
+ ['solar-panel-equipment'] = 16,
107
+ ['belt-immunity-equipment'] = 1,
108
+ ['battery-equipment'] = 2,
109
+ ['personal-roboport-equipment'] = 1
110
+ ]]
111
+ }
112
+ }
@@ -0,0 +1,14 @@
1
+ local Roles = require("modules/exp_roles")
2
+
3
+ return {
4
+ admin_as_active = true, --- @setting admin_as_active When true admins will be treated as active regardless of afk time
5
+ trust_as_active = true, --- @setting trust_as_active When true trusted players (by playtime) will be treated as active regardless of afk time
6
+ afk_time = 3600 * 10, --- @setting afk_time The time in ticks that must pass for a player to be considered afk
7
+ kick_time = 3600 * 30, --- @setting kick_time The time in ticks that must pass without any active players for all players to be kicked
8
+ trust_time = 3600 * 60 * 10, --- @setting trust_time The time in ticks that a player must be online for to count as trusted
9
+ update_time = 3600 * 30, --- @setting update_time How often in ticks the script checks for active players
10
+ custom_active_check = function(player)
11
+ local veteran = Roles.get_role_by_name("Veteran")
12
+ return veteran ~= nil and not Roles.get_player_highest_role(player):is_lower_than(veteran)
13
+ end,
14
+ }
@@ -0,0 +1,105 @@
1
+ --- Lists all bonuses which can be used, name followed by min max
2
+ -- @config Bonuses
3
+
4
+ return {
5
+ --[[
6
+ Base point is equal to the amount of standard value in each parameter.
7
+
8
+ CMMS CRS CCS CISB CHB CRDB PBR
9
+ STD 20 60 24 10 12 8 40
10
+ = 174
11
+
12
+ MAX 40 120 48 20 24 16 80
13
+ = 348
14
+ ]]
15
+ points = {
16
+ base = 174,
17
+ increase_percentage_per_role_level = 0.03,
18
+ role_name = "Member",
19
+ },
20
+ periodic_bonus_rate = 300,
21
+ player_bonus = {
22
+ {
23
+ name = "character_mining_speed_modifier",
24
+ scale = 1,
25
+ cost = 10,
26
+ max_value = 4,
27
+ value_step = 0.5,
28
+ is_percentage = true,
29
+ },
30
+ {
31
+ name = "character_running_speed_modifier",
32
+ scale = 1,
33
+ cost = 60,
34
+ max_value = 2,
35
+ value_step = 0.25,
36
+ is_percentage = true,
37
+ },
38
+ {
39
+ name = "character_crafting_speed_modifier",
40
+ scale = 1,
41
+ cost = 4,
42
+ max_value = 12,
43
+ value_step = 1,
44
+ is_percentage = true,
45
+ },
46
+ {
47
+ name = "character_inventory_slots_bonus",
48
+ scale = 10,
49
+ cost = 2,
50
+ max_value = 100,
51
+ value_step = 10,
52
+ },
53
+ {
54
+ name = "character_health_bonus",
55
+ scale = 50,
56
+ cost = 4,
57
+ max_value = 300,
58
+ value_step = 50,
59
+ },
60
+ {
61
+ name = "character_reach_distance_bonus",
62
+ scale = 1,
63
+ cost = 1,
64
+ max_value = 16,
65
+ value_step = 2,
66
+ combined_bonus = {
67
+ "character_resource_reach_distance_bonus",
68
+ "character_build_distance_bonus",
69
+ },
70
+ },
71
+ {
72
+ name = "personal_battery_recharge",
73
+ scale = 4,
74
+ cost = 40,
75
+ max_value = 8,
76
+ value_step = 1,
77
+ is_special = true,
78
+ },
79
+ },
80
+ force_bonus = {
81
+ ["worker_robots_battery_modifier"] = {
82
+ max_value = 1,
83
+ value_step = 1,
84
+ scale = 1,
85
+ cost = 1,
86
+ is_percentage = false,
87
+ },
88
+ ["worker_robots_storage_bonus"] = {
89
+ max_value = 1,
90
+ value_step = 1,
91
+ scale = 1,
92
+ cost = 1,
93
+ is_percentage = false,
94
+ },
95
+ ["following_robots_lifetime_modifier"] = {
96
+ max_value = 1,
97
+ value_step = 1,
98
+ scale = 1,
99
+ cost = 1,
100
+ is_percentage = false,
101
+ },
102
+ },
103
+ surface_bonus = {
104
+ },
105
+ }
@@ -0,0 +1,136 @@
1
+ --- This file defines the different triggers for the chat bot
2
+ -- @config Chat-Reply
3
+
4
+ local ExpUtil = require("modules/exp_util")
5
+ local Async = require("modules/exp_util/async")
6
+
7
+ local floor = math.floor
8
+ local random = math.random
9
+ local format_string = string.format
10
+ local locale_reply = "exp_chat-auto-reply.chat-reply"
11
+
12
+ local send_message_async =
13
+ Async.register(function(player, message)
14
+ if player == nil then
15
+ game.print(message)
16
+ else
17
+ player.print(message)
18
+ end
19
+ end)
20
+
21
+ local afk_time_units = {
22
+ minutes = true,
23
+ seconds = true,
24
+ }
25
+
26
+ return {
27
+ --- @type table<string, LocalisedString | fun(player: LuaPlayer, is_command: boolean): LocalisedString>
28
+ messages = { --- @setting messages will trigger when ever the word is said
29
+ ["discord"] = { "info.discord" },
30
+ ["expgaming"] = { "info.website" },
31
+ ["website"] = { "info.website" },
32
+ ["status"] = { "info.status" },
33
+ ["github"] = { "info.github" },
34
+ ["patreon"] = { "info.patreon" },
35
+ ["donate"] = { "info.patreon" },
36
+ ["command"] = { "info.custom-commands" },
37
+ ["commands"] = { "info.custom-commands" },
38
+ ["softmod"] = { "info.softmod" },
39
+ ["plugin"] = { "info.softmod" },
40
+ ["script"] = { "info.softmod" },
41
+ ["redmew"] = { "info.redmew" },
42
+ ["comfy"] = { "info.redmew" },
43
+ ["rhd"] = { "info.lhd" },
44
+ ["lhd"] = { "info.lhd" },
45
+ ["loop"] = { "exp_chat-auto-reply.reply-loops" },
46
+ ["roundabout"] = { "exp_chat-auto-reply.reply-loops" },
47
+ ["roundabouts"] = { "exp_chat-auto-reply.reply-loops" },
48
+ ["clusterio"] = { "exp_chat-auto-reply.reply-clusterio" },
49
+ ["players"] = function()
50
+ return { "exp_chat-auto-reply.reply-players", #game.players }
51
+ end,
52
+ ["online"] = function()
53
+ return { "exp_chat-auto-reply.reply-online", #game.connected_players }
54
+ end,
55
+ ["afk"] = function(player)
56
+ local max = player
57
+ for _, next_player in pairs(game.connected_players) do
58
+ if max.afk_time < next_player.afk_time then
59
+ max = next_player
60
+ end
61
+ end
62
+
63
+ return { "exp_chat-auto-reply.reply-afk", max.name, ExpUtil.format_time_locale(max.afk_time, "long", afk_time_units) }
64
+ end,
65
+ },
66
+ allow_command_prefix_for_messages = true, --- @setting allow_command_prefix_for_messages when true any message trigger will print to all player when prefixed
67
+ command_admin_only = false, --- @setting command_admin_only when true will only allow chat commands for admins
68
+ command_permission = "exp_scenario.chat.commands", --- @setting command_permission the permission used to allow command prefixes
69
+ command_prefix = "!", --- @setting command_prefix prefix used for commands below and to print to all players (if enabled above)
70
+ --- @type table<string, LocalisedString | fun(player: LuaPlayer, is_command: boolean): LocalisedString>
71
+ commands = { --- @setting commands will trigger only when command prefix is given
72
+ ["dev"] = { "exp_chat-auto-reply.reply-dev" },
73
+ ["magic"] = { "exp_chat-auto-reply.reply-magic" },
74
+ ["aids"] = { "exp_chat-auto-reply.reply-aids" },
75
+ ["riot"] = { "exp_chat-auto-reply.reply-riot" },
76
+ ["lenny"] = { "exp_chat-auto-reply.reply-lenny" },
77
+ ["blame"] = function(player)
78
+ local names = { "Cooldude2606", "arty714", "badgamernl", "mark9064", "aldldl", "Drahc_pro", player.name }
79
+ for _, next_player in pairs(game.connected_players) do
80
+ names[#names + 1] = next_player.name
81
+ end
82
+
83
+ return { "exp_chat-auto-reply.reply-blame", table.get_random(names) }
84
+ end,
85
+ ["hodor"] = function()
86
+ local options = { "?", ".", "!", "!!!" }
87
+ return { "exp_chat-auto-reply.reply-hodor", table.get_random(options) }
88
+ end,
89
+ ["evolution"] = function(player)
90
+ return { "exp_chat-auto-reply.reply-evolution", format_string("%.2f", game.forces["enemy"].get_evolution_factor(player.surface)) }
91
+ end,
92
+ ["makepopcorn"] = function(player)
93
+ local timeout = floor(180 * (random() + 0.5))
94
+ send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-popcorn-2", player.name } })
95
+ return { locale_reply, { "exp_chat-auto-reply.reply-popcorn-1" } }
96
+ end,
97
+ ["passsomesnaps"] = function(player)
98
+ local timeout = floor(180 * (random() + 0.5))
99
+ send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-snaps-2", player.name } })
100
+ send_message_async:start_after(timeout * (random() + 0.5), nil, { locale_reply, { "exp_chat-auto-reply.reply-snaps-3", player.name } })
101
+ return { locale_reply, { "exp_chat-auto-reply.reply-snaps-1" } }
102
+ end,
103
+ ["makecocktail"] = function(player)
104
+ local timeout = floor(180 * (random() + 0.5))
105
+ send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-cocktail-2", player.name } })
106
+ send_message_async:start_after(timeout * (random() + 0.5), nil, { locale_reply, { "exp_chat-auto-reply.reply-cocktail-3", player.name } })
107
+ return { locale_reply, { "exp_chat-auto-reply.reply-cocktail-1" } }
108
+ end,
109
+ ["makecoffee"] = function(player)
110
+ local timeout = floor(180 * (random() + 0.5))
111
+ send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-coffee-2", player.name } })
112
+ return { locale_reply, { "exp_chat-auto-reply.reply-coffee-1" } }
113
+ end,
114
+ ["orderpizza"] = function(player)
115
+ local timeout = floor(180 * (random() + 0.5))
116
+ send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-pizza-2", player.name } })
117
+ send_message_async:start_after(timeout * (random() + 0.5), nil, { locale_reply, { "exp_chat-auto-reply.reply-pizza-3", player.name } })
118
+ return { locale_reply, { "exp_chat-auto-reply.reply-pizza-1" } }
119
+ end,
120
+ ["maketea"] = function(player)
121
+ local timeout = floor(180 * (random() + 0.5))
122
+ send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-tea-2", player.name } })
123
+ return { locale_reply, { "exp_chat-auto-reply.reply-tea-1" } }
124
+ end,
125
+ ["meadplease"] = function(player)
126
+ local timeout = floor(180 * (random() + 0.5))
127
+ send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-mead-2", player.name } })
128
+ return { locale_reply, { "exp_chat-auto-reply.reply-mead-1" } }
129
+ end,
130
+ ["passabeer"] = function(player)
131
+ local timeout = floor(180 * (random() + 0.5))
132
+ send_message_async:start_after(timeout, nil, { locale_reply, { "exp_chat-auto-reply.reply-beer-2", player.name } })
133
+ return { locale_reply, { "exp_chat-auto-reply.reply-beer-1" } }
134
+ end,
135
+ },
136
+ }
@@ -0,0 +1,25 @@
1
+ --- Config file for the compliatrons including where they spawn and what messages they show
2
+ -- @config Compilatron
3
+
4
+ return {
5
+ message_cycle = 60 * 15, --- @setting message_cycle 15 seconds default, how often (in ticks) the messages will cycle
6
+ locations = {
7
+ ["Spawn"] = {
8
+ spawn_position = { x = 0, y = 0 },
9
+ spawn_surface = "nauvis",
10
+ entity_name = "small-biter",
11
+ messages = {
12
+ { "info.website" },
13
+ { "info.read-readme" },
14
+ { "info.discord" },
15
+ { "info.softmod" },
16
+ { "info.redmew" },
17
+ { "info.custom-commands" },
18
+ { "info.status" },
19
+ { "info.lhd" },
20
+ { "info.github" },
21
+ { "info.patreon" },
22
+ },
23
+ }
24
+ },
25
+ }
@@ -0,0 +1,15 @@
1
+ --- This config controls what happens when a player dies mostly about map markers and item collection;
2
+ -- allow_teleport_to_body_command and allow_collect_bodies_command can be over ridden if command_auth_runtime_disable is present;
3
+ -- if not present then the commands will not be loaded into the game
4
+ -- @config Death-Logger
5
+
6
+ return {
7
+ collect_corpses = true, --- @setting collect_corpses enables items being returned to the spawn point in chests upon corpse expiring
8
+ show_map_markers = true, --- @setting show_map_markers shows markers on the map where bodies are
9
+ clean_map_markers = false,
10
+ include_time_of_death = true, --- @setting include_time_of_death weather to include the time of death on the map marker
11
+ map_icon = nil, --- @setting map_icon the icon that the map marker shows; nil means no icon; format as a SingleID
12
+ show_light_at_corpse = true, --- @setting show_light_at_corpse if a light should be rendered at the corpse
13
+ show_line_to_corpse = true, --- @setting show_line_to_corpse if a line should be rendered from you to your corpse
14
+ period_check_map_tags = 60 * 60 * 5,
15
+ }
@@ -0,0 +1,11 @@
1
+ --- This config controls whether actions such as deconning by players without sufficient permissions is logged or not
2
+ -- @config Deconlog
3
+
4
+ return {
5
+ decon_area = true, --- @setting decon_area whether to log when an area is being deconstructed
6
+ built_entity = true, --- @setting built_entity whether to log when an entity is built
7
+ mined_entity = true, --- @setting mined_entity whether to log when an entity is mined
8
+ fired_rocket = true, --- @setting fired_nuke whether to log when a rocket is fired
9
+ fired_explosive_rocket = true, --- @setting fired_nuke whether to log when a explosive rocket is fired
10
+ fired_nuke = true, --- @setting fired_nuke whether to log when a nuke is fired
11
+ }
@@ -0,0 +1,25 @@
1
+ --- Config file used to enable and disable different push messages for discord
2
+ -- @config Discord-Alerts
3
+
4
+ return {
5
+ show_playtime = true,
6
+ entity_protection = true,
7
+ player_reports = true,
8
+ player_warnings = true,
9
+ player_bans = true,
10
+ player_mutes = true,
11
+ player_kicks = true,
12
+ player_promotes = false,
13
+ player_jail = true,
14
+ ["config"] = true,
15
+ ["purge"] = true,
16
+ ["c"] = true,
17
+ ["command"] = true,
18
+ ["silent-command"] = true,
19
+ ["measured-command"] = true,
20
+ ["banlist"] = true,
21
+ ["permissions"] = true,
22
+ ["editor"] = true,
23
+ ["cheat"] = true,
24
+ ["open"] = false,
25
+ }
@@ -0,0 +1,143 @@
1
+ --- Use this file to add new permission groups to the game;
2
+ -- start with Permission_Groups.new_group('name');
3
+ -- then use either :allow_all() or :disallow_all() to set the default for non specified actions;
4
+ -- then use :allow{} and :disallow{} to specify certain actions to allow/disallow
5
+ -- @config Permission-Groups
6
+
7
+ -- local Event = require("modules/exp_legacy/utils/event") -- @dep utils.event
8
+ local Groups = require("modules.exp_legacy.expcore.permission_groups") --- @dep expcore.permission_groups
9
+
10
+ Groups.new_group("Admin")
11
+ :allow_all()
12
+ :disallow{
13
+ "add_permission_group", -- admin
14
+ "delete_permission_group",
15
+ "edit_permission_group",
16
+ "import_permissions_string",
17
+ "map_editor_action",
18
+ "toggle_map_editor",
19
+ "change_multiplayer_config",
20
+ "set_heat_interface_mode",
21
+ "set_heat_interface_temperature",
22
+ "set_infinity_container_filter_item",
23
+ "set_infinity_container_remove_unfiltered_items",
24
+ "set_infinity_pipe_filter",
25
+ }
26
+
27
+ Groups.new_group("Trusted")
28
+ :allow_all()
29
+ :disallow{
30
+ "add_permission_group", -- admin
31
+ "delete_permission_group",
32
+ "edit_permission_group",
33
+ "import_permissions_string",
34
+ "map_editor_action",
35
+ "toggle_map_editor",
36
+ "change_multiplayer_config",
37
+ "set_heat_interface_mode",
38
+ "set_heat_interface_temperature",
39
+ "set_infinity_container_filter_item",
40
+ "set_infinity_container_remove_unfiltered_items",
41
+ "set_infinity_pipe_filter",
42
+ "admin_action", -- trusted
43
+ }
44
+
45
+ Groups.new_group("Standard")
46
+ :allow_all()
47
+ :disallow{
48
+ "add_permission_group", -- admin
49
+ "delete_permission_group",
50
+ "edit_permission_group",
51
+ "import_permissions_string",
52
+ "map_editor_action",
53
+ "toggle_map_editor",
54
+ "change_multiplayer_config",
55
+ "set_heat_interface_mode",
56
+ "set_heat_interface_temperature",
57
+ "set_infinity_container_filter_item",
58
+ "set_infinity_container_remove_unfiltered_items",
59
+ "set_infinity_pipe_filter",
60
+ "admin_action", -- trusted
61
+ "change_programmable_speaker_alert_parameters", -- standard
62
+ "drop_item",
63
+ "open_new_platform_button_from_rocket_silo",
64
+ "set_rocket_silo_send_to_orbit_automated_mode",
65
+ }
66
+
67
+ Groups.new_group("Guest")
68
+ :allow_all()
69
+ :disallow{
70
+ "add_permission_group", -- admin
71
+ "delete_permission_group",
72
+ "edit_permission_group",
73
+ "import_permissions_string",
74
+ "map_editor_action",
75
+ "toggle_map_editor",
76
+ "change_multiplayer_config",
77
+ "set_heat_interface_mode",
78
+ "set_heat_interface_temperature",
79
+ "set_infinity_container_filter_item",
80
+ "set_infinity_container_remove_unfiltered_items",
81
+ "set_infinity_pipe_filter",
82
+ "admin_action", -- trusted
83
+ "change_programmable_speaker_alert_parameters", -- standard
84
+ "drop_item",
85
+ "open_new_platform_button_from_rocket_silo",
86
+ "set_rocket_silo_send_to_orbit_automated_mode",
87
+ "change_programmable_speaker_parameters", -- guest
88
+ "change_train_stop_station",
89
+ -- 'deconstruct',
90
+ "remove_cables",
91
+ "remove_train_station",
92
+ "reset_assembling_machine",
93
+ "rotate_entity",
94
+ -- 'use_artillery_remote', -- not in 2.0
95
+ "launch_rocket",
96
+ "cancel_research",
97
+ -- 'activate_cut', -- not in 2.0
98
+ "flush_opened_entity_fluid",
99
+ "flush_opened_entity_specific_fluid",
100
+ }
101
+
102
+ Groups.new_group("Restricted")
103
+ :disallow_all()
104
+ :allow("write_to_console")
105
+
106
+ --[[ These events are used until a role system is added to make it easier for our admins
107
+
108
+ local trusted_time = 60*60*60*10 -- 10 hour
109
+ local standard_time = 60*60*60*3 -- 3 hour
110
+ local function assign_group(player)
111
+ local current_group_name = player.permission_group and player.permission_group.name or 'None'
112
+ if player.admin then
113
+ Permission_Groups.set_player_group(player,'Admin')
114
+ elseif player.online_time > trusted_time or current_group_name == 'Trusted' then
115
+ Permission_Groups.set_player_group(player,'Trusted')
116
+ elseif player.online_time > standard_time or current_group_name == 'Standard' then
117
+ Permission_Groups.set_player_group(player,'Standard')
118
+ else
119
+ Permission_Groups.set_player_group(player,'Guest')
120
+ end
121
+ end
122
+
123
+ Event.add(defines.events.on_player_joined_game,function(event)
124
+ local player = game.players[event.player_index]
125
+ assign_group(player)
126
+ end)
127
+
128
+ Event.add(defines.events.on_player_promoted,function(event)
129
+ local player = game.players[event.player_index]
130
+ assign_group(player)
131
+ end)
132
+
133
+ Event.add(defines.events.on_player_demoted,function(event)
134
+ local player = game.players[event.player_index]
135
+ assign_group(player)
136
+ end)
137
+
138
+ local check_interval = 60*60*15 -- 15 minutes
139
+ Event.on_nth_tick(check_interval,function(event)
140
+ for _,player in pairs(game.connected_players) do
141
+ assign_group(player)
142
+ end
143
+ end)]]
@@ -0,0 +1,7 @@
1
+ return {
2
+ modules = {
3
+ ["forcestats"] = true,
4
+ ["logistorage"] = false,
5
+ ["other"] = true,
6
+ },
7
+ }