You've already forked ComfyFactorio
mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-09-16 09:06:21 +02:00
luacheck more fixes
This commit is contained in:
@@ -232,6 +232,7 @@ stds.factorio_control = {
|
||||
other_fields = false,
|
||||
read_only = true,
|
||||
fields = {
|
||||
'set_visible',
|
||||
'draw_line',
|
||||
'draw_text',
|
||||
'draw_circle',
|
||||
@@ -323,6 +324,7 @@ stds.factorio_control = {
|
||||
other_fields = false,
|
||||
read_only = false,
|
||||
fields = {
|
||||
"disable_tutorial_triggers",
|
||||
"auto_save",
|
||||
"ban_player",
|
||||
"check_consistency",
|
||||
@@ -617,7 +619,7 @@ stds.stdlib = {
|
||||
read_globals = {
|
||||
table = {
|
||||
fields = {
|
||||
"shuffle_table", "map", "avg", "count_keys", "sum", "max", "remove", "insert", "invert", "first", "sort", "compare", "maxn", "any", "array_to_dictionary",
|
||||
"mean", "binary_search", "shuffle_table", "map", "avg", "count_keys", "sum", "max", "remove", "insert", "invert", "first", "sort", "compare", "maxn", "any", "array_to_dictionary",
|
||||
"each", "flatten", "keys", "filter", "remove_keys", "flexcopy", "find", "fullcopy", "values", "pack", "deepcopy", "concat", "clear", "min",
|
||||
"is_empty", "merge", "size", "dictionary_merge", "unpack", "last"
|
||||
},
|
||||
@@ -1069,6 +1071,7 @@ stds.factorio_defines = {
|
||||
},
|
||||
input_action = {
|
||||
fields = {
|
||||
'open_kills_gui',
|
||||
'change_item_description',
|
||||
'fast_entity_transfer',
|
||||
'set_recipe_notifications',
|
||||
|
@@ -109,17 +109,13 @@ commands.add_command(
|
||||
function(cmd)
|
||||
local trusted = session.get_trusted_table()
|
||||
local player = game.player
|
||||
local p
|
||||
|
||||
if player then
|
||||
if player ~= nil then
|
||||
p = player.print
|
||||
if not player.admin then
|
||||
p("You're not admin!", {r = 1, g = 0.5, b = 0.1})
|
||||
player.print("You're not admin!", {r = 1, g = 0.5, b = 0.1})
|
||||
return
|
||||
end
|
||||
else
|
||||
p = log
|
||||
end
|
||||
|
||||
if cmd.parameter == nil then
|
||||
|
@@ -5,10 +5,9 @@ require 'modules.surrounded_by_worms'
|
||||
|
||||
local simplex_noise = require 'utils.simplex_noise'
|
||||
simplex_noise = simplex_noise.d2
|
||||
local event = require 'utils.event'
|
||||
local Event = require 'utils.event'
|
||||
local table_insert = table.insert
|
||||
local math_random = math.random
|
||||
local map_functions = require 'tools.map_functions'
|
||||
|
||||
local function get_noise(name, pos)
|
||||
local seed = game.surfaces[1].map_gen_settings.seed
|
||||
@@ -23,7 +22,7 @@ local function get_noise(name, pos)
|
||||
noise[3] = simplex_noise(pos.x * 0.05, pos.y * 0.05, seed)
|
||||
seed = seed + noise_seed_add
|
||||
noise[4] = simplex_noise(pos.x * 0.1, pos.y * 0.1, seed)
|
||||
local noise = noise[1] + noise[2] * 0.3 + noise[3] * 0.2 + noise[4] * 0.1
|
||||
noise = noise[1] + noise[2] * 0.3 + noise[3] * 0.2 + noise[4] * 0.1
|
||||
--noise = noise * 0.5
|
||||
return noise
|
||||
end
|
||||
@@ -97,7 +96,6 @@ local function on_chunk_generated(event)
|
||||
end
|
||||
end
|
||||
|
||||
event.add(defines.events.on_entity_died, on_entity_died)
|
||||
event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction)
|
||||
event.add(defines.events.on_player_joined_game, on_player_joined_game)
|
||||
event.add(defines.events.on_chunk_generated, on_chunk_generated)
|
||||
Event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction)
|
||||
Event.add(defines.events.on_player_joined_game, on_player_joined_game)
|
||||
Event.add(defines.events.on_chunk_generated, on_chunk_generated)
|
||||
|
@@ -11,21 +11,6 @@ local WD = require 'modules.wave_defense.table'
|
||||
require 'modules.wave_defense.main'
|
||||
|
||||
local math_random = math.random
|
||||
local simplex_noise = require 'utils.simplex_noise'.d2
|
||||
|
||||
local function get_noise(name, pos)
|
||||
local seed = game.surfaces[1].map_gen_settings.seed
|
||||
local noise_seed_add = 25000
|
||||
seed = seed + noise_seed_add
|
||||
if name == 'sands' then
|
||||
local noise = {}
|
||||
noise[1] = simplex_noise(pos.x * 0.016, pos.y * 0.012, seed)
|
||||
seed = seed + noise_seed_add
|
||||
noise[2] = simplex_noise(pos.x * 0.064, pos.y * 0.048, seed)
|
||||
local noise = noise[1] + noise[2] * 0.1
|
||||
return noise
|
||||
end
|
||||
end
|
||||
|
||||
local landfill_drops = {
|
||||
['small-biter'] = 1,
|
||||
@@ -44,13 +29,6 @@ local landfill_drops = {
|
||||
['behemoth-worm-turret'] = 64
|
||||
}
|
||||
|
||||
local turrets = {
|
||||
[1] = 'small-worm-turret',
|
||||
[2] = 'medium-worm-turret',
|
||||
[3] = 'big-worm-turret',
|
||||
[4] = 'behemoth-worm-turret'
|
||||
}
|
||||
|
||||
local tile_coords = {}
|
||||
for x = 0, 31, 1 do
|
||||
for y = 0, 31, 1 do
|
||||
@@ -70,7 +48,7 @@ local function north_side(surface, left_top)
|
||||
return
|
||||
end
|
||||
|
||||
for a = 1, math_random(3, 5), 1 do
|
||||
for _ = 1, math_random(3, 5), 1 do
|
||||
local coord_modifier = tile_coords[math_random(1, #tile_coords)]
|
||||
local pos = {left_top.x + coord_modifier[1], left_top.y + coord_modifier[2]}
|
||||
local name = 'biter-spawner'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
-- Cave Miner -- mewmew made this --
|
||||
|
||||
require 'modules.rocks_heal_over_time'
|
||||
|
@@ -1,115 +0,0 @@
|
||||
0.21
|
||||
Ore bonus yield limited at the maximum biter difficulty.
|
||||
|
||||
0.20
|
||||
a big part of the lootboxes are now hidden within the rocks
|
||||
|
||||
0.19
|
||||
markets are now also fish bank terminals
|
||||
fish can not be deconstructed anymore
|
||||
|
||||
0.18
|
||||
cargo wagons, tanks and cars can now only detonate with less than 150 health
|
||||
|
||||
0.17
|
||||
explosives are now a new game mechanic
|
||||
loot rebalances
|
||||
ore yield balance
|
||||
|
||||
0.16
|
||||
oil should no longer clutter
|
||||
increased rock destruction performance (maybe)
|
||||
rocks now heal over time
|
||||
|
||||
0.15
|
||||
players in vehicles no longer get hungry
|
||||
faster mining speed but lower ore yield for more exploration
|
||||
new fully staged chest loot
|
||||
|
||||
0.14
|
||||
hunger over time reduced
|
||||
reduced worms
|
||||
ore vein spawn fix
|
||||
|
||||
0.13
|
||||
biter attack events frequency reduced
|
||||
players in vehicles are safe from random biter spawns
|
||||
hunger gain from passing time reduced
|
||||
|
||||
0.12
|
||||
reduced ore spill from rock destruction to reduce lagspike
|
||||
ore veins are usually bigger now and can appear earlier
|
||||
biters have a bit more damage against rocks
|
||||
market adjustments
|
||||
readded worms in main tunnels
|
||||
crude oil is allowed to spawn a bit closer
|
||||
access to the lakes and labyrinth areas should be a bit wider now
|
||||
damage against huge rocks has been increased
|
||||
biter spawn interval adjustments
|
||||
|
||||
0.11
|
||||
mining speed buff
|
||||
ore veins are more common
|
||||
|
||||
0.10
|
||||
difficulty adjustments
|
||||
spawn fixes
|
||||
|
||||
0.09
|
||||
ore veins are more common with more yield
|
||||
added info panel
|
||||
added more worms
|
||||
added extra bases in main mine shafts
|
||||
adjusted running speed modifier
|
||||
adjusted biter attack events
|
||||
modified chest loot tables
|
||||
mining trees now makes you earn fish
|
||||
|
||||
0.08
|
||||
rock "labyrinth" biome
|
||||
periodic biter attack events, the mines have become more dangerous
|
||||
custom spawn trees
|
||||
|
||||
0.07
|
||||
small chance that rocks might reveal an ore vein
|
||||
rocks now always drop stone
|
||||
players are now getting hungry
|
||||
|
||||
0.06
|
||||
added stats gui
|
||||
mining productivity research will now upgrade your backpack to ease your mining
|
||||
fishing is more enjoyable now
|
||||
rebalanced oil spots
|
||||
spawn inventory loadout changes
|
||||
|
||||
0.05
|
||||
biter & worm generation is now completely custom
|
||||
biters claws now have a hard time to dig through the solid rock
|
||||
secret shops spawn now in lake biomes
|
||||
mining productivity research boosts cave rock mining speed for triple the value
|
||||
|
||||
0.04
|
||||
biters no longer instantly surround the player
|
||||
|
||||
0.03
|
||||
market nerf
|
||||
darkness buff
|
||||
mining productivity research now applies to cave rock mining
|
||||
lakes now have fish
|
||||
added cave treasure
|
||||
|
||||
0.02
|
||||
space cleared around enemy spawners
|
||||
fish market adjustments
|
||||
maximum ore spill variable (rest gets inserted directly)
|
||||
biters now also pop out of destroyed rocks
|
||||
adjustments to ore chances
|
||||
noise adjustments
|
||||
different enemies now spawn the deeper you dig
|
||||
enemy spawn pool redone
|
||||
darkness is now a hazard, stay near lamps for survival
|
||||
caves are now permanently dark
|
||||
added lake biomes
|
||||
|
||||
0.01
|
||||
diggy diggy hole
|
@@ -1,7 +1,7 @@
|
||||
--This will add a new game mechanic so that containers with explosives actually go boom when they get damaged.
|
||||
--Made by MewMew
|
||||
|
||||
local event = require 'utils.event'
|
||||
local Event = require 'utils.event'
|
||||
|
||||
local damage_per_explosive = 100
|
||||
local empty_tile_damage_decay = 100
|
||||
@@ -1752,14 +1752,13 @@ local function on_entity_damaged(event)
|
||||
end
|
||||
end
|
||||
|
||||
local function on_tick(event)
|
||||
local function on_tick()
|
||||
if global.explosion_schedule then
|
||||
local tick = game.tick
|
||||
local explosion_schedule_is_alive = false
|
||||
for explosion_index = 1, #global.explosion_schedule, 1 do
|
||||
if #global.explosion_schedule[explosion_index] > 0 then
|
||||
explosion_schedule_is_alive = true
|
||||
local surface = game.surfaces[global.explosion_schedule[explosion_index].surface]
|
||||
for radius = 1, #global.explosion_schedule[explosion_index], 1 do
|
||||
if global.explosion_schedule[explosion_index][radius].trigger_tick == tick then
|
||||
for tile_index = 1, #global.explosion_schedule[explosion_index][radius], 1 do
|
||||
@@ -1783,5 +1782,5 @@ local function on_tick(event)
|
||||
end
|
||||
end
|
||||
|
||||
event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||
event.add(defines.events.on_tick, on_tick)
|
||||
Event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||
Event.add(defines.events.on_tick, on_tick)
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--choppy-- mewmew made this --
|
||||
|
||||
require 'modules.dynamic_landfill'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--choppy-- mewmew made this --
|
||||
--neko barons attempt to mix up map gen--
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local event = require 'utils.event'
|
||||
local simplex_noise = require 'utils.simplex_noise'.d2
|
||||
require 'modules.satellite_score'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
-- crossing -- by mewmew --
|
||||
|
||||
local event = require 'utils.event'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
-- cuuuubee
|
||||
local event = require 'utils.event'
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--deep jungle-- mewmew made this --
|
||||
require 'modules.no_deconstruction_of_neutral_entities'
|
||||
require 'modules.spawners_contain_biters'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--deep jungle-- mewmew made this --
|
||||
local map_functions = require 'tools.map_functions'
|
||||
local simplex_noise = require 'utils.simplex_noise'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
require 'modules.satellite_score'
|
||||
require 'modules.thirst'
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
-- forest maze from mewmew
|
||||
|
||||
require 'modules.satellite_score'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local event = require 'utils.event'
|
||||
|
||||
local main_caption = ' --Hunger Games Mode-- '
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--junkyard-- mewmew made this --
|
||||
|
||||
require 'modules.dynamic_landfill'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--labyrinth-- mewmew made this --
|
||||
require 'maps.labyrinth_map_intro'
|
||||
require 'modules.teleporters'
|
||||
|
@@ -1,12 +0,0 @@
|
||||
0.03
|
||||
biters will spawn weighted
|
||||
drops from enemies will stop more soon
|
||||
infinity chests have been nerfed
|
||||
more ore patches
|
||||
|
||||
0.02
|
||||
anti-turret creep things
|
||||
|
||||
0.01
|
||||
loot table adjustments
|
||||
the dungeon inhabitants will now try to swarm to the entrance sometimes
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local event = require 'utils.event'
|
||||
|
||||
local main_caption = ' --Labyrinth-- '
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--lost-- mewmew made this --
|
||||
|
||||
require 'modules.landfill_reveals_nauvis'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--lost desert-- mewmew made this --
|
||||
|
||||
require 'modules.rocks_broken_paint_tiles'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
require 'functions.maze'
|
||||
|
||||
local event = require 'utils.event'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local event = require 'utils.event'
|
||||
|
||||
require 'modules.spawners_contain_acid'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
-- mountain digger fortress -- by mewmew --
|
||||
|
||||
require 'modules.rpg'
|
||||
|
@@ -125,7 +125,7 @@ commands.add_command(
|
||||
commands.add_command(
|
||||
'disable_biters',
|
||||
'Usable only for admins - sets the queue speed of this map!',
|
||||
function(cmd)
|
||||
function()
|
||||
local player = game.player
|
||||
|
||||
if not player and player.valid then
|
||||
|
@@ -578,8 +578,6 @@ local function on_chunk(event)
|
||||
end
|
||||
if force_chunk then
|
||||
do_chunk(event)
|
||||
elseif event.tick == 0 then
|
||||
--do_chunk(event)
|
||||
else
|
||||
schedule_chunk(event)
|
||||
end
|
||||
|
@@ -430,58 +430,58 @@ local function add_global_stats(frame)
|
||||
|
||||
local t = frame.add {type = 'table', column_count = 6}
|
||||
|
||||
local l = t.add {type = 'label', caption = 'Rockets: '}
|
||||
l.style.font = 'default-game'
|
||||
l.style.font_color = {r = 175, g = 75, b = 255}
|
||||
l.style.minimal_width = 100
|
||||
local rocket_label = t.add {type = 'label', caption = 'Rockets: '}
|
||||
rocket_label.style.font = 'default-game'
|
||||
rocket_label.style.font_color = {r = 175, g = 75, b = 255}
|
||||
rocket_label.style.minimal_width = 100
|
||||
|
||||
local l = t.add {type = 'label', caption = score.rockets_launched}
|
||||
l.style.font = 'heading-2'
|
||||
l.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||
l.style.minimal_width = 100
|
||||
local launched_rockets_label = t.add {type = 'label', caption = score.rockets_launched}
|
||||
launched_rockets_label.style.font = 'heading-2'
|
||||
launched_rockets_label.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||
launched_rockets_label.style.minimal_width = 100
|
||||
|
||||
local l = t.add {type = 'label', caption = 'Dead bugs: '}
|
||||
l.style.font = 'default-game'
|
||||
l.style.font_color = {r = 0.90, g = 0.3, b = 0.3}
|
||||
l.style.minimal_width = 100
|
||||
local dead_bugs_label = t.add {type = 'label', caption = 'Dead bugs: '}
|
||||
dead_bugs_label.style.font = 'default-game'
|
||||
dead_bugs_label.style.font_color = {r = 0.90, g = 0.3, b = 0.3}
|
||||
dead_bugs_label.style.minimal_width = 100
|
||||
|
||||
local l = t.add {type = 'label', caption = score.biters_killed}
|
||||
l.style.font = 'heading-2'
|
||||
l.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||
l.style.minimal_width = 100
|
||||
local biters_killed_label = t.add {type = 'label', caption = score.biters_killed}
|
||||
biters_killed_label.style.font = 'heading-2'
|
||||
biters_killed_label.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||
biters_killed_label.style.minimal_width = 100
|
||||
|
||||
local l = t.add {type = 'label', caption = 'Breached zones: '}
|
||||
l.style.font = 'default-game'
|
||||
l.style.font_color = {r = 0, g = 128, b = 0}
|
||||
l.style.minimal_width = 100
|
||||
local breached_zones_label = t.add {type = 'label', caption = 'Breached zones: '}
|
||||
breached_zones_label.style.font = 'default-game'
|
||||
breached_zones_label.style.font_color = {r = 0, g = 128, b = 0}
|
||||
breached_zones_label.style.minimal_width = 100
|
||||
local zone = score.breached_zone - 1
|
||||
if score.breached_zone == 0 then
|
||||
zone = 0
|
||||
end
|
||||
local l = t.add {type = 'label', caption = zone}
|
||||
l.style.font = 'heading-2'
|
||||
l.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||
l.style.minimal_width = 100
|
||||
local zone_label = t.add {type = 'label', caption = zone}
|
||||
zone_label.style.font = 'heading-2'
|
||||
zone_label.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||
zone_label.style.minimal_width = 100
|
||||
|
||||
local l = t.add {type = 'label', caption = 'Highest wave: '}
|
||||
l.style.font = 'default-game'
|
||||
l.style.font_color = {r = 128, g = 128, b = 0.9}
|
||||
l.style.minimal_width = 100
|
||||
local highest_wave_label = t.add {type = 'label', caption = 'Highest wave: '}
|
||||
highest_wave_label.style.font = 'default-game'
|
||||
highest_wave_label.style.font_color = {r = 128, g = 128, b = 0.9}
|
||||
highest_wave_label.style.minimal_width = 100
|
||||
|
||||
local l = t.add {type = 'label', caption = score.wave_number}
|
||||
l.style.font = 'heading-2'
|
||||
l.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||
l.style.minimal_width = 100
|
||||
local wave_number_label = t.add {type = 'label', caption = score.wave_number}
|
||||
wave_number_label.style.font = 'heading-2'
|
||||
wave_number_label.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||
wave_number_label.style.minimal_width = 100
|
||||
|
||||
local l = t.add {type = 'label', caption = 'Last run total time: '}
|
||||
l.style.font = 'default-game'
|
||||
l.style.font_color = {r = 0.9, g = 128, b = 128}
|
||||
l.style.minimal_width = 100
|
||||
local last_total_label = t.add {type = 'label', caption = 'Last run total time: '}
|
||||
last_total_label.style.font = 'default-game'
|
||||
last_total_label.style.font_color = {r = 0.9, g = 128, b = 128}
|
||||
last_total_label.style.minimal_width = 100
|
||||
|
||||
local l = t.add {type = 'label', caption = Core.format_time(score.total_time)}
|
||||
l.style.font = 'heading-2'
|
||||
l.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||
l.style.minimal_width = 100
|
||||
local format_time_label = t.add {type = 'label', caption = Core.format_time(score.total_time)}
|
||||
format_time_label.style.font = 'heading-2'
|
||||
format_time_label.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||
format_time_label.style.minimal_width = 100
|
||||
end
|
||||
|
||||
local show_score = (function(player, frame)
|
||||
@@ -560,7 +560,7 @@ local show_score = (function(player, frame)
|
||||
}
|
||||
)
|
||||
scroll_pane.style.maximal_height = 400
|
||||
local t = scroll_pane.add {type = 'table', column_count = 5}
|
||||
t = scroll_pane.add {type = 'table', column_count = 5}
|
||||
|
||||
-- Score entries
|
||||
for _, entry in pairs(score_list) do
|
||||
@@ -585,7 +585,7 @@ local show_score = (function(player, frame)
|
||||
local b = entry.built_entities > 0 and entry.built_entities or 'Not MVP'
|
||||
local m = entry.mined_entities > 0 and entry.mined_entities or 'Not MVP'
|
||||
|
||||
local line = {
|
||||
line = {
|
||||
{caption = entry.name, color = special_color},
|
||||
{caption = tostring(k)},
|
||||
{caption = tostring(d)},
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
require 'modules.biters_yield_ore'
|
||||
require 'modules.rocks_yield_ore_veins'
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local Public = {}
|
||||
local math_random = math.random
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local Public = {}
|
||||
local math_random = math.random
|
||||
local Immersive_cargo_wagons = require 'modules.immersive_cargo_wagons.main'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local Public = {}
|
||||
local Team = require 'maps.native_war.team'
|
||||
local XP = require 'maps.native_war.xp'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local Public = {}
|
||||
|
||||
function Public.settings()
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
require 'modules.biter_reanimator'
|
||||
require 'maps.native_war.share_chat'
|
||||
require 'maps.native_war.mineable_wreckage_yields_scrap'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local Public = {}
|
||||
|
||||
local function create_map_intro_button(player)
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--mineable-wreckage yields scrap -- by mewmew
|
||||
|
||||
local mining_chance_weights = {
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
----------share chat with spectator force-------------------
|
||||
local function on_console_chat(event)
|
||||
if not event.message then
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local Public = {}
|
||||
local math_random = math.random
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local Public = {}
|
||||
|
||||
local wait_messages = {
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local math_abs = math.abs
|
||||
local math_random = math.random
|
||||
local Map_functions = require 'tools.map_functions'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local math_random = math.random
|
||||
local Global = require 'utils.global'
|
||||
local visuals_delay = 1800
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
-- nightfall -- by mewmew --
|
||||
|
||||
local event = require 'utils.event'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local event = require 'utils.event'
|
||||
|
||||
local main_caption = ' --Nightfall-- '
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--overgrowth-- by mewmew --
|
||||
|
||||
require 'modules.dynamic_landfill'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local event = require 'utils.event'
|
||||
|
||||
local info =
|
||||
|
@@ -1,7 +1,5 @@
|
||||
local Public = {}
|
||||
|
||||
local math_abs = math.abs
|
||||
|
||||
local score_values = {
|
||||
['small-spitter'] = 1,
|
||||
['small-biter'] = 1,
|
||||
@@ -19,7 +17,7 @@ local score_values = {
|
||||
['spitter-spawner'] = 16
|
||||
}
|
||||
|
||||
function Public.set_daytime_difficulty(surface, tick)
|
||||
function Public.set_daytime_difficulty(surface)
|
||||
local daytime = surface.daytime
|
||||
if daytime < 0.30 then
|
||||
surface.peaceful_mode = true
|
||||
|
@@ -17,7 +17,7 @@ local function create_score_gui(player)
|
||||
element.style.minimal_width = 56
|
||||
element.tooltip = tooltip
|
||||
|
||||
local element = t.add({type = 'label', caption = 0})
|
||||
element = t.add({type = 'label', caption = 0})
|
||||
element.style.font = 'heading-1'
|
||||
element.style.font_color = {100, 0, 255}
|
||||
element.style.horizontal_align = 'left'
|
||||
|
@@ -526,8 +526,8 @@ Public.get_convex_hull = function(_vertices)
|
||||
vertices[3]
|
||||
}
|
||||
local point
|
||||
for i = 4, #vertices do
|
||||
point = vertices[i]
|
||||
for ii = 4, #vertices do
|
||||
point = vertices[ii]
|
||||
|
||||
while #stack > 1 and convex_hull_turn(point, rev(stack, 1), rev(stack)) >= 0 do
|
||||
remove(stack)
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
require 'modules.mineable_wreckage_yields_scrap'
|
||||
require 'modules.wave_defense.main'
|
||||
local Map = require 'modules.map_info'
|
||||
|
@@ -5,9 +5,6 @@ require 'modules.biters_yield_ore'
|
||||
local math_random = math.random
|
||||
local math_floor = math.floor
|
||||
local table_insert = table.insert
|
||||
local table_remove = table.remove
|
||||
local math_sqrt = math.sqrt
|
||||
local math_round = math.round
|
||||
local math_abs = math.abs
|
||||
|
||||
local map_height = 96
|
||||
@@ -149,7 +146,7 @@ local function draw_east_side(surface, left_top)
|
||||
entity.get_inventory(defines.inventory.cargo_wagon).insert({name = 'grenade', count = 32})
|
||||
entity.get_inventory(defines.inventory.cargo_wagon).insert({name = 'pistol', count = 10})
|
||||
entity.get_inventory(defines.inventory.cargo_wagon).insert({name = 'rail', count = 100})
|
||||
local entity = surface.create_entity({name = 'locomotive', position = {-18, 0}, force = 'player', direction = 2})
|
||||
entity = surface.create_entity({name = 'locomotive', position = {-18, 0}, force = 'player', direction = 2})
|
||||
entity.get_inventory(defines.inventory.fuel).insert({name = 'wood', count = 25})
|
||||
end
|
||||
end
|
||||
|
@@ -20,10 +20,6 @@ local map_height = 64
|
||||
|
||||
local math_random = math.random
|
||||
local math_floor = math.floor
|
||||
local table_insert = table.insert
|
||||
local table_remove = table.remove
|
||||
local math_sqrt = math.sqrt
|
||||
local math_round = math.round
|
||||
local math_abs = math.abs
|
||||
|
||||
local function place_spawn_entities(surface)
|
||||
@@ -42,7 +38,7 @@ local function place_spawn_entities(surface)
|
||||
entity.get_inventory(defines.inventory.cargo_wagon).insert({name = 'rail', count = 200})
|
||||
Immersive_cargo_wagons.register_wagon(entity)
|
||||
|
||||
local entity = surface.create_entity({name = 'locomotive', position = {-18, 0}, force = 'player', direction = 2})
|
||||
entity = surface.create_entity({name = 'locomotive', position = {-18, 0}, force = 'player', direction = 2})
|
||||
entity.get_inventory(defines.inventory.fuel).insert({name = 'wood', count = 25})
|
||||
Immersive_cargo_wagons.register_wagon(entity)
|
||||
end
|
||||
@@ -52,7 +48,6 @@ local function treasure_chest(surface, position)
|
||||
budget = budget * math_random(25, 175) * 0.01
|
||||
if math_random(1, 200) == 1 then
|
||||
budget = budget * 10
|
||||
container_name = 'crash-site-chest-' .. math_random(1, 2)
|
||||
end
|
||||
budget = math_floor(budget) + 1
|
||||
|
||||
@@ -64,8 +59,6 @@ local function treasure_chest(surface, position)
|
||||
container.minable = false
|
||||
end
|
||||
|
||||
local infini_ores = {'iron-ore', 'iron-ore', 'copper-ore', 'coal', 'stone'}
|
||||
|
||||
local function on_player_joined_game(event)
|
||||
local surface = game.surfaces['railway_troopers']
|
||||
local player = game.players[event.player_index]
|
||||
@@ -289,7 +282,7 @@ local function on_init()
|
||||
surface.delete_chunk({chunk.x, chunk.y})
|
||||
end
|
||||
|
||||
local map_gen_settings = {
|
||||
local new_map_gen_settings = {
|
||||
['water'] = 0.50,
|
||||
['starting_area'] = 0.60,
|
||||
terrain_segmentation = 20,
|
||||
@@ -305,7 +298,7 @@ local function on_init()
|
||||
['enemy-base'] = {frequency = 256, size = 2, richness = 1}
|
||||
}
|
||||
}
|
||||
game.create_surface('railway_troopers', map_gen_settings)
|
||||
game.create_surface('railway_troopers', new_map_gen_settings)
|
||||
|
||||
global.reset_railway_troopers = 2
|
||||
|
||||
@@ -317,6 +310,5 @@ Event.on_init(on_init)
|
||||
Event.add(defines.events.on_tick, on_tick)
|
||||
Event.add(defines.events.on_research_finished, on_research_finished)
|
||||
Event.add(defines.events.on_entity_died, on_entity_died)
|
||||
Event.add(defines.events.on_entity_spawned, on_entity_spawned)
|
||||
Event.add(defines.events.on_player_joined_game, on_player_joined_game)
|
||||
Event.add(defines.events.on_chunk_generated, on_chunk_generated)
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local event = require 'utils.event'
|
||||
local simplex_noise = require 'utils.simplex_noise'.d2
|
||||
local rainbow_colors = require 'tools.rainbow_colors'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
-- Refactor-io -- made by mewmew and p.p
|
||||
|
||||
require 'modules.satellite_score'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--rivers-- mewmew made this --
|
||||
|
||||
require 'modules.satellite_score'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local event = require 'utils.event'
|
||||
local simplex_noise = require 'utils.simplex_noise'.d2
|
||||
require 'modules.satellite_score'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--spaghettorio-- mewmew made this -- inspired by redlabel
|
||||
|
||||
local simplex_noise = require 'utils.simplex_noise'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--spiral troopers-- mewmew wrote this -- inspired from kyte
|
||||
|
||||
local event = require 'utils.event'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
-- spooky forest -- by mewmew --
|
||||
|
||||
require 'modules.trees_randomly_die'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local Basic_markets = require 'functions.basic_markets'
|
||||
local Biter_pets = require 'modules.biter_pets'
|
||||
local get_noise = require 'maps.stone_maze.noise'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local Basic_markets = require 'functions.basic_markets'
|
||||
local get_noise = require 'maps.stone_maze.noise'
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local room = {}
|
||||
|
||||
room.empty = function(surface, cell_left_top, direction)
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
function get_biter()
|
||||
local max_chance = 0
|
||||
for i = 1, 4, 1 do
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--optionals
|
||||
require 'modules.satellite_score'
|
||||
require 'modules.dangerous_goods'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
-- digging thingie -- by mewmew --
|
||||
|
||||
require 'modules.satellite_score'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--tank battles (royale)-- mewmew made this --
|
||||
|
||||
local event = require 'utils.event'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--tank battles (royale)-- mewmew made this --
|
||||
|
||||
local event = require 'utils.event'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
-- factorio scenario -- tank conquest -- xalpha made this --
|
||||
|
||||
local blueprint_poi_base_json = require 'maps.tank_conquest.blueprint_poi_base_json'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
-- territorial control by Gerkiz
|
||||
|
||||
local Map = require 'modules.map_info'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--tetris by mewmew
|
||||
|
||||
--18x10 gb
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local function is_position_inside_playfield(position)
|
||||
if position.x > playfield_area.right_bottom.x then
|
||||
return false
|
||||
|
@@ -25,7 +25,7 @@ local function on_player_joined_game(event)
|
||||
end
|
||||
end
|
||||
|
||||
local function on_player_left_game(event)
|
||||
local function on_player_left_game()
|
||||
set_difficulty()
|
||||
end
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
-- Map by Kyte & MewMew
|
||||
|
||||
require 'maps.wave_of_death.intro'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local biter_waves = require 'maps.wave_of_death.biter_waves'
|
||||
local ai = {}
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local game_status = {}
|
||||
local Server = require 'utils.server'
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local function init_surface()
|
||||
local map_gen_settings = {}
|
||||
map_gen_settings.water = '0'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local event = require 'utils.event'
|
||||
|
||||
local info =
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local function spectate_button()
|
||||
end
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local simplex_noise = require 'utils.simplex_noise'.d2
|
||||
local math_random = math.random
|
||||
local wod_logo_tiles = require 'maps.wave_of_death.logo'
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local event = require 'utils.event'
|
||||
local math_random = math.random
|
||||
local math_floor = math.floor
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
--unlocks areas when the entity at the position is rotated
|
||||
--define the entities by position like this:
|
||||
-- global.level_unlocks = {
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local event = require 'utils.event'
|
||||
local function is_depleted(drill, entity)
|
||||
local position = drill.position
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--luacheck: ignore
|
||||
local event = require 'utils.event'
|
||||
|
||||
local function get_empty_hotbar_slot(player)
|
||||
|
@@ -1,9 +1,9 @@
|
||||
-- backpack research -- researching mining efficiency increases your backpack capacity (inventory slots)
|
||||
|
||||
local event = require 'utils.event'
|
||||
local Event = require 'utils.event'
|
||||
|
||||
local function on_research_finished(event)
|
||||
event.research.force.character_inventory_slots_bonus = game.forces.player.mining_drill_productivity_bonus * 100
|
||||
end
|
||||
|
||||
event.add(defines.events.on_research_finished, on_research_finished)
|
||||
Event.add(defines.events.on_research_finished, on_research_finished)
|
||||
|
@@ -22,7 +22,6 @@ end
|
||||
|
||||
local function on_player_banned(event)
|
||||
local player = game.players[event.player_index]
|
||||
local position = player.position
|
||||
drop_inventory(player, player.get_inventory(defines.inventory.character_main))
|
||||
drop_inventory(player, player.get_inventory(defines.inventory.character_guns))
|
||||
drop_inventory(player, player.get_inventory(defines.inventory.character_ammo))
|
||||
|
@@ -1,7 +1,7 @@
|
||||
-- biters and their buildings gain pseudo hp increase through the means of evasion mechanics -- by mewmew
|
||||
-- use global.biter_evasion_health_increase_factor to modify their health
|
||||
|
||||
local event = require 'utils.event'
|
||||
local Event = require 'utils.event'
|
||||
local random_max = 1000000
|
||||
local types = {
|
||||
['unit'] = true,
|
||||
@@ -36,5 +36,5 @@ local function on_init()
|
||||
global.biter_evasion_health_increase_factor = 1
|
||||
end
|
||||
|
||||
event.on_init(on_init)
|
||||
event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||
Event.on_init(on_init)
|
||||
Event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||
|
@@ -26,7 +26,7 @@ local function clean_table()
|
||||
local units_to_delete = {}
|
||||
|
||||
--Mark all health boost entries for deletion
|
||||
for key, health in pairs(global.biter_health_boost_units) do
|
||||
for key, _ in pairs(global.biter_health_boost_units) do
|
||||
units_to_delete[key] = true
|
||||
end
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--biters make comic like text sounds when they damage something -- mewmew
|
||||
|
||||
local event = require 'utils.event'
|
||||
local Event = require 'utils.event'
|
||||
local math_random = math.random
|
||||
|
||||
local strings = {
|
||||
@@ -69,4 +69,4 @@ local function on_entity_damaged(event)
|
||||
end
|
||||
end
|
||||
|
||||
event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||
Event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||
|
@@ -17,7 +17,7 @@ end
|
||||
local function floaty_hearts(entity, c)
|
||||
local position = {x = entity.position.x - 0.75, y = entity.position.y - 1}
|
||||
local b = 1.35
|
||||
for a = 1, c, 1 do
|
||||
for _ = 1, c, 1 do
|
||||
local p = {
|
||||
(position.x + 0.4) + (b * -1 + math_random(0, b * 20) * 0.1),
|
||||
position.y + (b * -1 + math_random(0, b * 20) * 0.1)
|
||||
@@ -117,12 +117,11 @@ function Public.tame_unit_for_closest_player(unit)
|
||||
return
|
||||
end
|
||||
|
||||
for i = 2, #valid_players, 1 do
|
||||
local player = valid_players[i + 1]
|
||||
if player.position.x ^ 2 + player.position.y ^ 2 < nearest_player.position.x ^ 2 + nearest_player.position.y ^ 2 then
|
||||
nearest_player = spawner
|
||||
end
|
||||
end
|
||||
-- for i = 2, #valid_players, 1 do
|
||||
-- local player = valid_players[i + 1]
|
||||
-- if player.position.x ^ 2 + player.position.y ^ 2 < nearest_player.position.x ^ 2 + nearest_player.position.y ^ 2 then
|
||||
-- end
|
||||
-- end
|
||||
|
||||
Public.biter_pets_tame_unit(nearest_player, unit, true)
|
||||
end
|
||||
@@ -189,13 +188,13 @@ local function on_player_dropped_item(event)
|
||||
end
|
||||
end
|
||||
|
||||
local function on_init(event)
|
||||
local function on_init()
|
||||
global.biter_pets = {}
|
||||
end
|
||||
|
||||
local event = require 'utils.event'
|
||||
event.on_init(on_init)
|
||||
event.add(defines.events.on_player_dropped_item, on_player_dropped_item)
|
||||
event.add(defines.events.on_player_changed_position, on_player_changed_position)
|
||||
local Event = require 'utils.event'
|
||||
Event.on_init(on_init)
|
||||
Event.add(defines.events.on_player_dropped_item, on_player_dropped_item)
|
||||
Event.add(defines.events.on_player_changed_position, on_player_changed_position)
|
||||
|
||||
return Public
|
||||
|
@@ -1,6 +1,6 @@
|
||||
-- biters gain strength scaling with player amount in the game -- by mewmew
|
||||
|
||||
local event = require 'utils.event'
|
||||
local Event = require 'utils.event'
|
||||
|
||||
local function refresh_difficulty()
|
||||
global.connected_players = #game.connected_players
|
||||
@@ -34,14 +34,14 @@ local function on_entity_damaged(event)
|
||||
event.entity.health = event.entity.health + event.final_damage_amount
|
||||
end
|
||||
|
||||
local function on_player_joined_game(event)
|
||||
local function on_player_joined_game()
|
||||
refresh_difficulty()
|
||||
end
|
||||
|
||||
local function on_player_left_game(event)
|
||||
local function on_player_left_game()
|
||||
refresh_difficulty()
|
||||
end
|
||||
|
||||
event.add(defines.events.on_player_left_game, on_player_left_game)
|
||||
event.add(defines.events.on_player_joined_game, on_player_joined_game)
|
||||
event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||
Event.add(defines.events.on_player_left_game, on_player_left_game)
|
||||
Event.add(defines.events.on_player_joined_game, on_player_joined_game)
|
||||
Event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--moving players attract biters from far away
|
||||
|
||||
local event = require 'utils.event'
|
||||
local Event = require 'utils.event'
|
||||
local math_random = math.random
|
||||
|
||||
local function on_player_changed_position(event)
|
||||
@@ -34,9 +34,9 @@ local function on_player_changed_position(event)
|
||||
global.biters_attack_moving_players_last_action_tick = game.tick
|
||||
end
|
||||
|
||||
local function on_init(event)
|
||||
local function on_init()
|
||||
global.biters_attack_moving_players_last_action_tick = 0
|
||||
end
|
||||
|
||||
event.add(defines.events.on_player_changed_position, on_player_changed_position)
|
||||
event.on_init(on_init)
|
||||
Event.add(defines.events.on_player_changed_position, on_player_changed_position)
|
||||
Event.on_init(on_init)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
-- enemy biters have pseudo double hp -- by mewmew
|
||||
|
||||
local event = require 'utils.event'
|
||||
local Event = require 'utils.event'
|
||||
|
||||
local function on_entity_damaged(event)
|
||||
if not event.entity.valid then
|
||||
@@ -18,4 +18,4 @@ local function on_entity_damaged(event)
|
||||
event.entity.health = event.entity.health + event.final_damage_amount
|
||||
end
|
||||
|
||||
event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||
Event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
local event = require 'utils.event'
|
||||
local Event = require 'utils.event'
|
||||
|
||||
local function on_player_joined_game(event)
|
||||
local function on_player_joined_game()
|
||||
game.forces.enemy.set_ammo_damage_modifier('melee', 1)
|
||||
game.forces.enemy.set_ammo_damage_modifier('biological', 1)
|
||||
game.forces.enemy.set_ammo_damage_modifier('artillery-shell', 0.5)
|
||||
@@ -8,4 +8,4 @@ local function on_player_joined_game(event)
|
||||
game.forces.enemy.set_ammo_damage_modifier('laser-turret', 0.5)
|
||||
end
|
||||
|
||||
event.add(defines.events.on_player_joined_game, on_player_joined_game)
|
||||
Event.add(defines.events.on_player_joined_game, on_player_joined_game)
|
||||
|
@@ -54,11 +54,11 @@ local function check_burden(event)
|
||||
end
|
||||
end
|
||||
|
||||
local function on_init(event)
|
||||
local function on_init()
|
||||
script.on_event(defines.events.on_player_main_inventory_changed, check_burden)
|
||||
end
|
||||
|
||||
local function on_load(event)
|
||||
local function on_load()
|
||||
script.on_event(defines.events.on_player_main_inventory_changed, check_burden)
|
||||
end
|
||||
|
||||
|
@@ -71,7 +71,7 @@ local function charge(player)
|
||||
end
|
||||
end
|
||||
|
||||
local function on_player_joined_game(event)
|
||||
local function on_player_joined_game()
|
||||
draw_charging_gui()
|
||||
end
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
local event = require 'utils.event'
|
||||
local Event = require 'utils.event'
|
||||
local math_random = math.random
|
||||
|
||||
local function shuffle(tbl)
|
||||
@@ -508,5 +508,5 @@ local function on_tick()
|
||||
end
|
||||
end
|
||||
|
||||
event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||
event.add(defines.events.on_tick, on_tick)
|
||||
Event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||
Event.add(defines.events.on_tick, on_tick)
|
||||
|
@@ -1,7 +1,6 @@
|
||||
-- prints death messages to all forces with custom texts -- by mewmew
|
||||
|
||||
local event = require 'utils.event'
|
||||
local math_random = math.random
|
||||
local Event = require 'utils.event'
|
||||
local message_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||
|
||||
local messages = {
|
||||
@@ -76,4 +75,4 @@ local function on_player_died(event)
|
||||
end
|
||||
end
|
||||
|
||||
event.add(defines.events.on_player_died, on_player_died)
|
||||
Event.add(defines.events.on_player_died, on_player_died)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
-- nighttime is dangerous, stay near your lamps -- by mewmew
|
||||
|
||||
local event = require 'utils.event'
|
||||
local Event = require 'utils.event'
|
||||
|
||||
local unearthing_worm = require 'functions.unearthing_worm'
|
||||
local unearthing_biters = require 'functions.unearthing_biters'
|
||||
@@ -74,4 +74,4 @@ local function on_player_changed_position(event)
|
||||
end
|
||||
end
|
||||
|
||||
event.add(defines.events.on_player_changed_position, on_player_changed_position)
|
||||
Event.add(defines.events.on_player_changed_position, on_player_changed_position)
|
||||
|
@@ -171,7 +171,7 @@ local function poll_difficulty(player)
|
||||
b.visible = false
|
||||
end
|
||||
end
|
||||
local b = frame.add({type = 'label', caption = '- - - - - - - - - - - - - - - - - -'})
|
||||
frame.add({type = 'label', caption = '- - - - - - - - - - - - - - - - - -'})
|
||||
local b =
|
||||
frame.add(
|
||||
{
|
||||
|
@@ -162,7 +162,7 @@ local function poll_difficulty(player)
|
||||
b.style.minimal_width = 160
|
||||
b.tooltip = this.tooltip[i]
|
||||
end
|
||||
local b = frame.add({type = 'label', caption = '- - - - - - - - - - - - - - - - - -'})
|
||||
frame.add({type = 'label', caption = '- - - - - - - - - - - - - - - - - -'})
|
||||
local b =
|
||||
frame.add(
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user