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,
|
other_fields = false,
|
||||||
read_only = true,
|
read_only = true,
|
||||||
fields = {
|
fields = {
|
||||||
|
'set_visible',
|
||||||
'draw_line',
|
'draw_line',
|
||||||
'draw_text',
|
'draw_text',
|
||||||
'draw_circle',
|
'draw_circle',
|
||||||
@@ -323,6 +324,7 @@ stds.factorio_control = {
|
|||||||
other_fields = false,
|
other_fields = false,
|
||||||
read_only = false,
|
read_only = false,
|
||||||
fields = {
|
fields = {
|
||||||
|
"disable_tutorial_triggers",
|
||||||
"auto_save",
|
"auto_save",
|
||||||
"ban_player",
|
"ban_player",
|
||||||
"check_consistency",
|
"check_consistency",
|
||||||
@@ -617,7 +619,7 @@ stds.stdlib = {
|
|||||||
read_globals = {
|
read_globals = {
|
||||||
table = {
|
table = {
|
||||||
fields = {
|
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",
|
"each", "flatten", "keys", "filter", "remove_keys", "flexcopy", "find", "fullcopy", "values", "pack", "deepcopy", "concat", "clear", "min",
|
||||||
"is_empty", "merge", "size", "dictionary_merge", "unpack", "last"
|
"is_empty", "merge", "size", "dictionary_merge", "unpack", "last"
|
||||||
},
|
},
|
||||||
@@ -1069,6 +1071,7 @@ stds.factorio_defines = {
|
|||||||
},
|
},
|
||||||
input_action = {
|
input_action = {
|
||||||
fields = {
|
fields = {
|
||||||
|
'open_kills_gui',
|
||||||
'change_item_description',
|
'change_item_description',
|
||||||
'fast_entity_transfer',
|
'fast_entity_transfer',
|
||||||
'set_recipe_notifications',
|
'set_recipe_notifications',
|
||||||
|
@@ -109,17 +109,13 @@ commands.add_command(
|
|||||||
function(cmd)
|
function(cmd)
|
||||||
local trusted = session.get_trusted_table()
|
local trusted = session.get_trusted_table()
|
||||||
local player = game.player
|
local player = game.player
|
||||||
local p
|
|
||||||
|
|
||||||
if player then
|
if player then
|
||||||
if player ~= nil then
|
if player ~= nil then
|
||||||
p = player.print
|
|
||||||
if not player.admin then
|
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
|
return
|
||||||
end
|
end
|
||||||
else
|
|
||||||
p = log
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if cmd.parameter == nil then
|
if cmd.parameter == nil then
|
||||||
|
@@ -5,10 +5,9 @@ require 'modules.surrounded_by_worms'
|
|||||||
|
|
||||||
local simplex_noise = require 'utils.simplex_noise'
|
local simplex_noise = require 'utils.simplex_noise'
|
||||||
simplex_noise = simplex_noise.d2
|
simplex_noise = simplex_noise.d2
|
||||||
local event = require 'utils.event'
|
local Event = require 'utils.event'
|
||||||
local table_insert = table.insert
|
local table_insert = table.insert
|
||||||
local math_random = math.random
|
local math_random = math.random
|
||||||
local map_functions = require 'tools.map_functions'
|
|
||||||
|
|
||||||
local function get_noise(name, pos)
|
local function get_noise(name, pos)
|
||||||
local seed = game.surfaces[1].map_gen_settings.seed
|
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)
|
noise[3] = simplex_noise(pos.x * 0.05, pos.y * 0.05, seed)
|
||||||
seed = seed + noise_seed_add
|
seed = seed + noise_seed_add
|
||||||
noise[4] = simplex_noise(pos.x * 0.1, pos.y * 0.1, seed)
|
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
|
--noise = noise * 0.5
|
||||||
return noise
|
return noise
|
||||||
end
|
end
|
||||||
@@ -97,7 +96,6 @@ local function on_chunk_generated(event)
|
|||||||
end
|
end
|
||||||
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_marked_for_deconstruction, on_marked_for_deconstruction)
|
Event.add(defines.events.on_player_joined_game, on_player_joined_game)
|
||||||
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_chunk_generated, on_chunk_generated)
|
|
||||||
|
@@ -11,21 +11,6 @@ local WD = require 'modules.wave_defense.table'
|
|||||||
require 'modules.wave_defense.main'
|
require 'modules.wave_defense.main'
|
||||||
|
|
||||||
local math_random = math.random
|
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 = {
|
local landfill_drops = {
|
||||||
['small-biter'] = 1,
|
['small-biter'] = 1,
|
||||||
@@ -44,13 +29,6 @@ local landfill_drops = {
|
|||||||
['behemoth-worm-turret'] = 64
|
['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 = {}
|
local tile_coords = {}
|
||||||
for x = 0, 31, 1 do
|
for x = 0, 31, 1 do
|
||||||
for y = 0, 31, 1 do
|
for y = 0, 31, 1 do
|
||||||
@@ -70,7 +48,7 @@ local function north_side(surface, left_top)
|
|||||||
return
|
return
|
||||||
end
|
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 coord_modifier = tile_coords[math_random(1, #tile_coords)]
|
||||||
local pos = {left_top.x + coord_modifier[1], left_top.y + coord_modifier[2]}
|
local pos = {left_top.x + coord_modifier[1], left_top.y + coord_modifier[2]}
|
||||||
local name = 'biter-spawner'
|
local name = 'biter-spawner'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
-- Cave Miner -- mewmew made this --
|
-- Cave Miner -- mewmew made this --
|
||||||
|
|
||||||
require 'modules.rocks_heal_over_time'
|
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.
|
--This will add a new game mechanic so that containers with explosives actually go boom when they get damaged.
|
||||||
--Made by MewMew
|
--Made by MewMew
|
||||||
|
|
||||||
local event = require 'utils.event'
|
local Event = require 'utils.event'
|
||||||
|
|
||||||
local damage_per_explosive = 100
|
local damage_per_explosive = 100
|
||||||
local empty_tile_damage_decay = 100
|
local empty_tile_damage_decay = 100
|
||||||
@@ -1752,14 +1752,13 @@ local function on_entity_damaged(event)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_tick(event)
|
local function on_tick()
|
||||||
if global.explosion_schedule then
|
if global.explosion_schedule then
|
||||||
local tick = game.tick
|
local tick = game.tick
|
||||||
local explosion_schedule_is_alive = false
|
local explosion_schedule_is_alive = false
|
||||||
for explosion_index = 1, #global.explosion_schedule, 1 do
|
for explosion_index = 1, #global.explosion_schedule, 1 do
|
||||||
if #global.explosion_schedule[explosion_index] > 0 then
|
if #global.explosion_schedule[explosion_index] > 0 then
|
||||||
explosion_schedule_is_alive = true
|
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
|
for radius = 1, #global.explosion_schedule[explosion_index], 1 do
|
||||||
if global.explosion_schedule[explosion_index][radius].trigger_tick == tick then
|
if global.explosion_schedule[explosion_index][radius].trigger_tick == tick then
|
||||||
for tile_index = 1, #global.explosion_schedule[explosion_index][radius], 1 do
|
for tile_index = 1, #global.explosion_schedule[explosion_index][radius], 1 do
|
||||||
@@ -1783,5 +1782,5 @@ local function on_tick(event)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
Event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||||
event.add(defines.events.on_tick, on_tick)
|
Event.add(defines.events.on_tick, on_tick)
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--choppy-- mewmew made this --
|
--choppy-- mewmew made this --
|
||||||
|
|
||||||
require 'modules.dynamic_landfill'
|
require 'modules.dynamic_landfill'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--choppy-- mewmew made this --
|
--choppy-- mewmew made this --
|
||||||
--neko barons attempt to mix up map gen--
|
--neko barons attempt to mix up map gen--
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
local simplex_noise = require 'utils.simplex_noise'.d2
|
local simplex_noise = require 'utils.simplex_noise'.d2
|
||||||
require 'modules.satellite_score'
|
require 'modules.satellite_score'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
-- crossing -- by mewmew --
|
-- crossing -- by mewmew --
|
||||||
|
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
-- cuuuubee
|
-- cuuuubee
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--deep jungle-- mewmew made this --
|
--deep jungle-- mewmew made this --
|
||||||
require 'modules.no_deconstruction_of_neutral_entities'
|
require 'modules.no_deconstruction_of_neutral_entities'
|
||||||
require 'modules.spawners_contain_biters'
|
require 'modules.spawners_contain_biters'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--deep jungle-- mewmew made this --
|
--deep jungle-- mewmew made this --
|
||||||
local map_functions = require 'tools.map_functions'
|
local map_functions = require 'tools.map_functions'
|
||||||
local simplex_noise = require 'utils.simplex_noise'
|
local simplex_noise = require 'utils.simplex_noise'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
require 'modules.satellite_score'
|
require 'modules.satellite_score'
|
||||||
require 'modules.thirst'
|
require 'modules.thirst'
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
-- forest maze from mewmew
|
-- forest maze from mewmew
|
||||||
|
|
||||||
require 'modules.satellite_score'
|
require 'modules.satellite_score'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
|
|
||||||
local main_caption = ' --Hunger Games Mode-- '
|
local main_caption = ' --Hunger Games Mode-- '
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--junkyard-- mewmew made this --
|
--junkyard-- mewmew made this --
|
||||||
|
|
||||||
require 'modules.dynamic_landfill'
|
require 'modules.dynamic_landfill'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--labyrinth-- mewmew made this --
|
--labyrinth-- mewmew made this --
|
||||||
require 'maps.labyrinth_map_intro'
|
require 'maps.labyrinth_map_intro'
|
||||||
require 'modules.teleporters'
|
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 event = require 'utils.event'
|
||||||
|
|
||||||
local main_caption = ' --Labyrinth-- '
|
local main_caption = ' --Labyrinth-- '
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--lost-- mewmew made this --
|
--lost-- mewmew made this --
|
||||||
|
|
||||||
require 'modules.landfill_reveals_nauvis'
|
require 'modules.landfill_reveals_nauvis'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--lost desert-- mewmew made this --
|
--lost desert-- mewmew made this --
|
||||||
|
|
||||||
require 'modules.rocks_broken_paint_tiles'
|
require 'modules.rocks_broken_paint_tiles'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
require 'functions.maze'
|
require 'functions.maze'
|
||||||
|
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
|
|
||||||
require 'modules.spawners_contain_acid'
|
require 'modules.spawners_contain_acid'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
-- mountain digger fortress -- by mewmew --
|
-- mountain digger fortress -- by mewmew --
|
||||||
|
|
||||||
require 'modules.rpg'
|
require 'modules.rpg'
|
||||||
|
@@ -125,7 +125,7 @@ commands.add_command(
|
|||||||
commands.add_command(
|
commands.add_command(
|
||||||
'disable_biters',
|
'disable_biters',
|
||||||
'Usable only for admins - sets the queue speed of this map!',
|
'Usable only for admins - sets the queue speed of this map!',
|
||||||
function(cmd)
|
function()
|
||||||
local player = game.player
|
local player = game.player
|
||||||
|
|
||||||
if not player and player.valid then
|
if not player and player.valid then
|
||||||
|
@@ -578,8 +578,6 @@ local function on_chunk(event)
|
|||||||
end
|
end
|
||||||
if force_chunk then
|
if force_chunk then
|
||||||
do_chunk(event)
|
do_chunk(event)
|
||||||
elseif event.tick == 0 then
|
|
||||||
--do_chunk(event)
|
|
||||||
else
|
else
|
||||||
schedule_chunk(event)
|
schedule_chunk(event)
|
||||||
end
|
end
|
||||||
|
@@ -430,58 +430,58 @@ local function add_global_stats(frame)
|
|||||||
|
|
||||||
local t = frame.add {type = 'table', column_count = 6}
|
local t = frame.add {type = 'table', column_count = 6}
|
||||||
|
|
||||||
local l = t.add {type = 'label', caption = 'Rockets: '}
|
local rocket_label = t.add {type = 'label', caption = 'Rockets: '}
|
||||||
l.style.font = 'default-game'
|
rocket_label.style.font = 'default-game'
|
||||||
l.style.font_color = {r = 175, g = 75, b = 255}
|
rocket_label.style.font_color = {r = 175, g = 75, b = 255}
|
||||||
l.style.minimal_width = 100
|
rocket_label.style.minimal_width = 100
|
||||||
|
|
||||||
local l = t.add {type = 'label', caption = score.rockets_launched}
|
local launched_rockets_label = t.add {type = 'label', caption = score.rockets_launched}
|
||||||
l.style.font = 'heading-2'
|
launched_rockets_label.style.font = 'heading-2'
|
||||||
l.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
launched_rockets_label.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||||
l.style.minimal_width = 100
|
launched_rockets_label.style.minimal_width = 100
|
||||||
|
|
||||||
local l = t.add {type = 'label', caption = 'Dead bugs: '}
|
local dead_bugs_label = t.add {type = 'label', caption = 'Dead bugs: '}
|
||||||
l.style.font = 'default-game'
|
dead_bugs_label.style.font = 'default-game'
|
||||||
l.style.font_color = {r = 0.90, g = 0.3, b = 0.3}
|
dead_bugs_label.style.font_color = {r = 0.90, g = 0.3, b = 0.3}
|
||||||
l.style.minimal_width = 100
|
dead_bugs_label.style.minimal_width = 100
|
||||||
|
|
||||||
local l = t.add {type = 'label', caption = score.biters_killed}
|
local biters_killed_label = t.add {type = 'label', caption = score.biters_killed}
|
||||||
l.style.font = 'heading-2'
|
biters_killed_label.style.font = 'heading-2'
|
||||||
l.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
biters_killed_label.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||||
l.style.minimal_width = 100
|
biters_killed_label.style.minimal_width = 100
|
||||||
|
|
||||||
local l = t.add {type = 'label', caption = 'Breached zones: '}
|
local breached_zones_label = t.add {type = 'label', caption = 'Breached zones: '}
|
||||||
l.style.font = 'default-game'
|
breached_zones_label.style.font = 'default-game'
|
||||||
l.style.font_color = {r = 0, g = 128, b = 0}
|
breached_zones_label.style.font_color = {r = 0, g = 128, b = 0}
|
||||||
l.style.minimal_width = 100
|
breached_zones_label.style.minimal_width = 100
|
||||||
local zone = score.breached_zone - 1
|
local zone = score.breached_zone - 1
|
||||||
if score.breached_zone == 0 then
|
if score.breached_zone == 0 then
|
||||||
zone = 0
|
zone = 0
|
||||||
end
|
end
|
||||||
local l = t.add {type = 'label', caption = zone}
|
local zone_label = t.add {type = 'label', caption = zone}
|
||||||
l.style.font = 'heading-2'
|
zone_label.style.font = 'heading-2'
|
||||||
l.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
zone_label.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||||
l.style.minimal_width = 100
|
zone_label.style.minimal_width = 100
|
||||||
|
|
||||||
local l = t.add {type = 'label', caption = 'Highest wave: '}
|
local highest_wave_label = t.add {type = 'label', caption = 'Highest wave: '}
|
||||||
l.style.font = 'default-game'
|
highest_wave_label.style.font = 'default-game'
|
||||||
l.style.font_color = {r = 128, g = 128, b = 0.9}
|
highest_wave_label.style.font_color = {r = 128, g = 128, b = 0.9}
|
||||||
l.style.minimal_width = 100
|
highest_wave_label.style.minimal_width = 100
|
||||||
|
|
||||||
local l = t.add {type = 'label', caption = score.wave_number}
|
local wave_number_label = t.add {type = 'label', caption = score.wave_number}
|
||||||
l.style.font = 'heading-2'
|
wave_number_label.style.font = 'heading-2'
|
||||||
l.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
wave_number_label.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||||
l.style.minimal_width = 100
|
wave_number_label.style.minimal_width = 100
|
||||||
|
|
||||||
local l = t.add {type = 'label', caption = 'Last run total time: '}
|
local last_total_label = t.add {type = 'label', caption = 'Last run total time: '}
|
||||||
l.style.font = 'default-game'
|
last_total_label.style.font = 'default-game'
|
||||||
l.style.font_color = {r = 0.9, g = 128, b = 128}
|
last_total_label.style.font_color = {r = 0.9, g = 128, b = 128}
|
||||||
l.style.minimal_width = 100
|
last_total_label.style.minimal_width = 100
|
||||||
|
|
||||||
local l = t.add {type = 'label', caption = Core.format_time(score.total_time)}
|
local format_time_label = t.add {type = 'label', caption = Core.format_time(score.total_time)}
|
||||||
l.style.font = 'heading-2'
|
format_time_label.style.font = 'heading-2'
|
||||||
l.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
format_time_label.style.font_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||||
l.style.minimal_width = 100
|
format_time_label.style.minimal_width = 100
|
||||||
end
|
end
|
||||||
|
|
||||||
local show_score = (function(player, frame)
|
local show_score = (function(player, frame)
|
||||||
@@ -560,7 +560,7 @@ local show_score = (function(player, frame)
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
scroll_pane.style.maximal_height = 400
|
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
|
-- Score entries
|
||||||
for _, entry in pairs(score_list) do
|
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 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 m = entry.mined_entities > 0 and entry.mined_entities or 'Not MVP'
|
||||||
|
|
||||||
local line = {
|
line = {
|
||||||
{caption = entry.name, color = special_color},
|
{caption = entry.name, color = special_color},
|
||||||
{caption = tostring(k)},
|
{caption = tostring(k)},
|
||||||
{caption = tostring(d)},
|
{caption = tostring(d)},
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
require 'modules.biters_yield_ore'
|
require 'modules.biters_yield_ore'
|
||||||
require 'modules.rocks_yield_ore_veins'
|
require 'modules.rocks_yield_ore_veins'
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local Public = {}
|
local Public = {}
|
||||||
local math_random = math.random
|
local math_random = math.random
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local Public = {}
|
local Public = {}
|
||||||
local math_random = math.random
|
local math_random = math.random
|
||||||
local Immersive_cargo_wagons = require 'modules.immersive_cargo_wagons.main'
|
local Immersive_cargo_wagons = require 'modules.immersive_cargo_wagons.main'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local Public = {}
|
local Public = {}
|
||||||
local Team = require 'maps.native_war.team'
|
local Team = require 'maps.native_war.team'
|
||||||
local XP = require 'maps.native_war.xp'
|
local XP = require 'maps.native_war.xp'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local Public = {}
|
local Public = {}
|
||||||
|
|
||||||
function Public.settings()
|
function Public.settings()
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
require 'modules.biter_reanimator'
|
require 'modules.biter_reanimator'
|
||||||
require 'maps.native_war.share_chat'
|
require 'maps.native_war.share_chat'
|
||||||
require 'maps.native_war.mineable_wreckage_yields_scrap'
|
require 'maps.native_war.mineable_wreckage_yields_scrap'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local Public = {}
|
local Public = {}
|
||||||
|
|
||||||
local function create_map_intro_button(player)
|
local function create_map_intro_button(player)
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--mineable-wreckage yields scrap -- by mewmew
|
--mineable-wreckage yields scrap -- by mewmew
|
||||||
|
|
||||||
local mining_chance_weights = {
|
local mining_chance_weights = {
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
----------share chat with spectator force-------------------
|
----------share chat with spectator force-------------------
|
||||||
local function on_console_chat(event)
|
local function on_console_chat(event)
|
||||||
if not event.message then
|
if not event.message then
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local Public = {}
|
local Public = {}
|
||||||
local math_random = math.random
|
local math_random = math.random
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local Public = {}
|
local Public = {}
|
||||||
|
|
||||||
local wait_messages = {
|
local wait_messages = {
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local math_abs = math.abs
|
local math_abs = math.abs
|
||||||
local math_random = math.random
|
local math_random = math.random
|
||||||
local Map_functions = require 'tools.map_functions'
|
local Map_functions = require 'tools.map_functions'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local math_random = math.random
|
local math_random = math.random
|
||||||
local Global = require 'utils.global'
|
local Global = require 'utils.global'
|
||||||
local visuals_delay = 1800
|
local visuals_delay = 1800
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
-- nightfall -- by mewmew --
|
-- nightfall -- by mewmew --
|
||||||
|
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
|
|
||||||
local main_caption = ' --Nightfall-- '
|
local main_caption = ' --Nightfall-- '
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--overgrowth-- by mewmew --
|
--overgrowth-- by mewmew --
|
||||||
|
|
||||||
require 'modules.dynamic_landfill'
|
require 'modules.dynamic_landfill'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
|
|
||||||
local info =
|
local info =
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
local Public = {}
|
local Public = {}
|
||||||
|
|
||||||
local math_abs = math.abs
|
|
||||||
|
|
||||||
local score_values = {
|
local score_values = {
|
||||||
['small-spitter'] = 1,
|
['small-spitter'] = 1,
|
||||||
['small-biter'] = 1,
|
['small-biter'] = 1,
|
||||||
@@ -19,7 +17,7 @@ local score_values = {
|
|||||||
['spitter-spawner'] = 16
|
['spitter-spawner'] = 16
|
||||||
}
|
}
|
||||||
|
|
||||||
function Public.set_daytime_difficulty(surface, tick)
|
function Public.set_daytime_difficulty(surface)
|
||||||
local daytime = surface.daytime
|
local daytime = surface.daytime
|
||||||
if daytime < 0.30 then
|
if daytime < 0.30 then
|
||||||
surface.peaceful_mode = true
|
surface.peaceful_mode = true
|
||||||
|
@@ -17,7 +17,7 @@ local function create_score_gui(player)
|
|||||||
element.style.minimal_width = 56
|
element.style.minimal_width = 56
|
||||||
element.tooltip = tooltip
|
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 = 'heading-1'
|
||||||
element.style.font_color = {100, 0, 255}
|
element.style.font_color = {100, 0, 255}
|
||||||
element.style.horizontal_align = 'left'
|
element.style.horizontal_align = 'left'
|
||||||
|
@@ -526,8 +526,8 @@ Public.get_convex_hull = function(_vertices)
|
|||||||
vertices[3]
|
vertices[3]
|
||||||
}
|
}
|
||||||
local point
|
local point
|
||||||
for i = 4, #vertices do
|
for ii = 4, #vertices do
|
||||||
point = vertices[i]
|
point = vertices[ii]
|
||||||
|
|
||||||
while #stack > 1 and convex_hull_turn(point, rev(stack, 1), rev(stack)) >= 0 do
|
while #stack > 1 and convex_hull_turn(point, rev(stack, 1), rev(stack)) >= 0 do
|
||||||
remove(stack)
|
remove(stack)
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
require 'modules.mineable_wreckage_yields_scrap'
|
require 'modules.mineable_wreckage_yields_scrap'
|
||||||
require 'modules.wave_defense.main'
|
require 'modules.wave_defense.main'
|
||||||
local Map = require 'modules.map_info'
|
local Map = require 'modules.map_info'
|
||||||
|
@@ -5,9 +5,6 @@ require 'modules.biters_yield_ore'
|
|||||||
local math_random = math.random
|
local math_random = math.random
|
||||||
local math_floor = math.floor
|
local math_floor = math.floor
|
||||||
local table_insert = table.insert
|
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 math_abs = math.abs
|
||||||
|
|
||||||
local map_height = 96
|
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 = 'grenade', count = 32})
|
||||||
entity.get_inventory(defines.inventory.cargo_wagon).insert({name = 'pistol', count = 10})
|
entity.get_inventory(defines.inventory.cargo_wagon).insert({name = 'pistol', count = 10})
|
||||||
entity.get_inventory(defines.inventory.cargo_wagon).insert({name = 'rail', count = 100})
|
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})
|
entity.get_inventory(defines.inventory.fuel).insert({name = 'wood', count = 25})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -20,10 +20,6 @@ local map_height = 64
|
|||||||
|
|
||||||
local math_random = math.random
|
local math_random = math.random
|
||||||
local math_floor = math.floor
|
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 math_abs = math.abs
|
||||||
|
|
||||||
local function place_spawn_entities(surface)
|
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})
|
entity.get_inventory(defines.inventory.cargo_wagon).insert({name = 'rail', count = 200})
|
||||||
Immersive_cargo_wagons.register_wagon(entity)
|
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})
|
entity.get_inventory(defines.inventory.fuel).insert({name = 'wood', count = 25})
|
||||||
Immersive_cargo_wagons.register_wagon(entity)
|
Immersive_cargo_wagons.register_wagon(entity)
|
||||||
end
|
end
|
||||||
@@ -52,7 +48,6 @@ local function treasure_chest(surface, position)
|
|||||||
budget = budget * math_random(25, 175) * 0.01
|
budget = budget * math_random(25, 175) * 0.01
|
||||||
if math_random(1, 200) == 1 then
|
if math_random(1, 200) == 1 then
|
||||||
budget = budget * 10
|
budget = budget * 10
|
||||||
container_name = 'crash-site-chest-' .. math_random(1, 2)
|
|
||||||
end
|
end
|
||||||
budget = math_floor(budget) + 1
|
budget = math_floor(budget) + 1
|
||||||
|
|
||||||
@@ -64,8 +59,6 @@ local function treasure_chest(surface, position)
|
|||||||
container.minable = false
|
container.minable = false
|
||||||
end
|
end
|
||||||
|
|
||||||
local infini_ores = {'iron-ore', 'iron-ore', 'copper-ore', 'coal', 'stone'}
|
|
||||||
|
|
||||||
local function on_player_joined_game(event)
|
local function on_player_joined_game(event)
|
||||||
local surface = game.surfaces['railway_troopers']
|
local surface = game.surfaces['railway_troopers']
|
||||||
local player = game.players[event.player_index]
|
local player = game.players[event.player_index]
|
||||||
@@ -289,7 +282,7 @@ local function on_init()
|
|||||||
surface.delete_chunk({chunk.x, chunk.y})
|
surface.delete_chunk({chunk.x, chunk.y})
|
||||||
end
|
end
|
||||||
|
|
||||||
local map_gen_settings = {
|
local new_map_gen_settings = {
|
||||||
['water'] = 0.50,
|
['water'] = 0.50,
|
||||||
['starting_area'] = 0.60,
|
['starting_area'] = 0.60,
|
||||||
terrain_segmentation = 20,
|
terrain_segmentation = 20,
|
||||||
@@ -305,7 +298,7 @@ local function on_init()
|
|||||||
['enemy-base'] = {frequency = 256, size = 2, richness = 1}
|
['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
|
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_tick, on_tick)
|
||||||
Event.add(defines.events.on_research_finished, on_research_finished)
|
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_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_player_joined_game, on_player_joined_game)
|
||||||
Event.add(defines.events.on_chunk_generated, on_chunk_generated)
|
Event.add(defines.events.on_chunk_generated, on_chunk_generated)
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
local simplex_noise = require 'utils.simplex_noise'.d2
|
local simplex_noise = require 'utils.simplex_noise'.d2
|
||||||
local rainbow_colors = require 'tools.rainbow_colors'
|
local rainbow_colors = require 'tools.rainbow_colors'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
-- Refactor-io -- made by mewmew and p.p
|
-- Refactor-io -- made by mewmew and p.p
|
||||||
|
|
||||||
require 'modules.satellite_score'
|
require 'modules.satellite_score'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--rivers-- mewmew made this --
|
--rivers-- mewmew made this --
|
||||||
|
|
||||||
require 'modules.satellite_score'
|
require 'modules.satellite_score'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
local simplex_noise = require 'utils.simplex_noise'.d2
|
local simplex_noise = require 'utils.simplex_noise'.d2
|
||||||
require 'modules.satellite_score'
|
require 'modules.satellite_score'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--spaghettorio-- mewmew made this -- inspired by redlabel
|
--spaghettorio-- mewmew made this -- inspired by redlabel
|
||||||
|
|
||||||
local simplex_noise = require 'utils.simplex_noise'
|
local simplex_noise = require 'utils.simplex_noise'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--spiral troopers-- mewmew wrote this -- inspired from kyte
|
--spiral troopers-- mewmew wrote this -- inspired from kyte
|
||||||
|
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
-- spooky forest -- by mewmew --
|
-- spooky forest -- by mewmew --
|
||||||
|
|
||||||
require 'modules.trees_randomly_die'
|
require 'modules.trees_randomly_die'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local Basic_markets = require 'functions.basic_markets'
|
local Basic_markets = require 'functions.basic_markets'
|
||||||
local Biter_pets = require 'modules.biter_pets'
|
local Biter_pets = require 'modules.biter_pets'
|
||||||
local get_noise = require 'maps.stone_maze.noise'
|
local get_noise = require 'maps.stone_maze.noise'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local Basic_markets = require 'functions.basic_markets'
|
local Basic_markets = require 'functions.basic_markets'
|
||||||
local get_noise = require 'maps.stone_maze.noise'
|
local get_noise = require 'maps.stone_maze.noise'
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local room = {}
|
local room = {}
|
||||||
|
|
||||||
room.empty = function(surface, cell_left_top, direction)
|
room.empty = function(surface, cell_left_top, direction)
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
function get_biter()
|
function get_biter()
|
||||||
local max_chance = 0
|
local max_chance = 0
|
||||||
for i = 1, 4, 1 do
|
for i = 1, 4, 1 do
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--optionals
|
--optionals
|
||||||
require 'modules.satellite_score'
|
require 'modules.satellite_score'
|
||||||
require 'modules.dangerous_goods'
|
require 'modules.dangerous_goods'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
-- digging thingie -- by mewmew --
|
-- digging thingie -- by mewmew --
|
||||||
|
|
||||||
require 'modules.satellite_score'
|
require 'modules.satellite_score'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--tank battles (royale)-- mewmew made this --
|
--tank battles (royale)-- mewmew made this --
|
||||||
|
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--tank battles (royale)-- mewmew made this --
|
--tank battles (royale)-- mewmew made this --
|
||||||
|
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
-- factorio scenario -- tank conquest -- xalpha made this --
|
-- factorio scenario -- tank conquest -- xalpha made this --
|
||||||
|
|
||||||
local blueprint_poi_base_json = require 'maps.tank_conquest.blueprint_poi_base_json'
|
local blueprint_poi_base_json = require 'maps.tank_conquest.blueprint_poi_base_json'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
-- territorial control by Gerkiz
|
-- territorial control by Gerkiz
|
||||||
|
|
||||||
local Map = require 'modules.map_info'
|
local Map = require 'modules.map_info'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--tetris by mewmew
|
--tetris by mewmew
|
||||||
|
|
||||||
--18x10 gb
|
--18x10 gb
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local function is_position_inside_playfield(position)
|
local function is_position_inside_playfield(position)
|
||||||
if position.x > playfield_area.right_bottom.x then
|
if position.x > playfield_area.right_bottom.x then
|
||||||
return false
|
return false
|
||||||
|
@@ -25,7 +25,7 @@ local function on_player_joined_game(event)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_player_left_game(event)
|
local function on_player_left_game()
|
||||||
set_difficulty()
|
set_difficulty()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
-- Map by Kyte & MewMew
|
-- Map by Kyte & MewMew
|
||||||
|
|
||||||
require 'maps.wave_of_death.intro'
|
require 'maps.wave_of_death.intro'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local biter_waves = require 'maps.wave_of_death.biter_waves'
|
local biter_waves = require 'maps.wave_of_death.biter_waves'
|
||||||
local ai = {}
|
local ai = {}
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local game_status = {}
|
local game_status = {}
|
||||||
local Server = require 'utils.server'
|
local Server = require 'utils.server'
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local function init_surface()
|
local function init_surface()
|
||||||
local map_gen_settings = {}
|
local map_gen_settings = {}
|
||||||
map_gen_settings.water = '0'
|
map_gen_settings.water = '0'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
|
|
||||||
local info =
|
local info =
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local function spectate_button()
|
local function spectate_button()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local simplex_noise = require 'utils.simplex_noise'.d2
|
local simplex_noise = require 'utils.simplex_noise'.d2
|
||||||
local math_random = math.random
|
local math_random = math.random
|
||||||
local wod_logo_tiles = require 'maps.wave_of_death.logo'
|
local wod_logo_tiles = require 'maps.wave_of_death.logo'
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
local math_random = math.random
|
local math_random = math.random
|
||||||
local math_floor = math.floor
|
local math_floor = math.floor
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
--unlocks areas when the entity at the position is rotated
|
--unlocks areas when the entity at the position is rotated
|
||||||
--define the entities by position like this:
|
--define the entities by position like this:
|
||||||
-- global.level_unlocks = {
|
-- global.level_unlocks = {
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
local function is_depleted(drill, entity)
|
local function is_depleted(drill, entity)
|
||||||
local position = drill.position
|
local position = drill.position
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
--luacheck: ignore
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
|
|
||||||
local function get_empty_hotbar_slot(player)
|
local function get_empty_hotbar_slot(player)
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
-- backpack research -- researching mining efficiency increases your backpack capacity (inventory slots)
|
-- 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)
|
local function on_research_finished(event)
|
||||||
event.research.force.character_inventory_slots_bonus = game.forces.player.mining_drill_productivity_bonus * 100
|
event.research.force.character_inventory_slots_bonus = game.forces.player.mining_drill_productivity_bonus * 100
|
||||||
end
|
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 function on_player_banned(event)
|
||||||
local player = game.players[event.player_index]
|
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_main))
|
||||||
drop_inventory(player, player.get_inventory(defines.inventory.character_guns))
|
drop_inventory(player, player.get_inventory(defines.inventory.character_guns))
|
||||||
drop_inventory(player, player.get_inventory(defines.inventory.character_ammo))
|
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
|
-- 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
|
-- 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 random_max = 1000000
|
||||||
local types = {
|
local types = {
|
||||||
['unit'] = true,
|
['unit'] = true,
|
||||||
@@ -36,5 +36,5 @@ local function on_init()
|
|||||||
global.biter_evasion_health_increase_factor = 1
|
global.biter_evasion_health_increase_factor = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
event.on_init(on_init)
|
Event.on_init(on_init)
|
||||||
event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
Event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||||
|
@@ -26,7 +26,7 @@ local function clean_table()
|
|||||||
local units_to_delete = {}
|
local units_to_delete = {}
|
||||||
|
|
||||||
--Mark all health boost entries for deletion
|
--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
|
units_to_delete[key] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
--biters make comic like text sounds when they damage something -- mewmew
|
--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 math_random = math.random
|
||||||
|
|
||||||
local strings = {
|
local strings = {
|
||||||
@@ -69,4 +69,4 @@ local function on_entity_damaged(event)
|
|||||||
end
|
end
|
||||||
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 function floaty_hearts(entity, c)
|
||||||
local position = {x = entity.position.x - 0.75, y = entity.position.y - 1}
|
local position = {x = entity.position.x - 0.75, y = entity.position.y - 1}
|
||||||
local b = 1.35
|
local b = 1.35
|
||||||
for a = 1, c, 1 do
|
for _ = 1, c, 1 do
|
||||||
local p = {
|
local p = {
|
||||||
(position.x + 0.4) + (b * -1 + math_random(0, b * 20) * 0.1),
|
(position.x + 0.4) + (b * -1 + math_random(0, b * 20) * 0.1),
|
||||||
position.y + (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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
for i = 2, #valid_players, 1 do
|
-- for i = 2, #valid_players, 1 do
|
||||||
local player = valid_players[i + 1]
|
-- 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
|
-- 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
|
-- end
|
||||||
end
|
|
||||||
|
|
||||||
Public.biter_pets_tame_unit(nearest_player, unit, true)
|
Public.biter_pets_tame_unit(nearest_player, unit, true)
|
||||||
end
|
end
|
||||||
@@ -189,13 +188,13 @@ local function on_player_dropped_item(event)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_init(event)
|
local function on_init()
|
||||||
global.biter_pets = {}
|
global.biter_pets = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
local event = require 'utils.event'
|
local Event = require 'utils.event'
|
||||||
event.on_init(on_init)
|
Event.on_init(on_init)
|
||||||
event.add(defines.events.on_player_dropped_item, on_player_dropped_item)
|
Event.add(defines.events.on_player_dropped_item, on_player_dropped_item)
|
||||||
event.add(defines.events.on_player_changed_position, on_player_changed_position)
|
Event.add(defines.events.on_player_changed_position, on_player_changed_position)
|
||||||
|
|
||||||
return Public
|
return Public
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
-- biters gain strength scaling with player amount in the game -- by mewmew
|
-- 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()
|
local function refresh_difficulty()
|
||||||
global.connected_players = #game.connected_players
|
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
|
event.entity.health = event.entity.health + event.final_damage_amount
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_player_joined_game(event)
|
local function on_player_joined_game()
|
||||||
refresh_difficulty()
|
refresh_difficulty()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_player_left_game(event)
|
local function on_player_left_game()
|
||||||
refresh_difficulty()
|
refresh_difficulty()
|
||||||
end
|
end
|
||||||
|
|
||||||
event.add(defines.events.on_player_left_game, on_player_left_game)
|
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_player_joined_game, on_player_joined_game)
|
||||||
event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
Event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
--moving players attract biters from far away
|
--moving players attract biters from far away
|
||||||
|
|
||||||
local event = require 'utils.event'
|
local Event = require 'utils.event'
|
||||||
local math_random = math.random
|
local math_random = math.random
|
||||||
|
|
||||||
local function on_player_changed_position(event)
|
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
|
global.biters_attack_moving_players_last_action_tick = game.tick
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_init(event)
|
local function on_init()
|
||||||
global.biters_attack_moving_players_last_action_tick = 0
|
global.biters_attack_moving_players_last_action_tick = 0
|
||||||
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)
|
||||||
event.on_init(on_init)
|
Event.on_init(on_init)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
-- enemy biters have pseudo double hp -- by mewmew
|
-- enemy biters have pseudo double hp -- by mewmew
|
||||||
|
|
||||||
local event = require 'utils.event'
|
local Event = require 'utils.event'
|
||||||
|
|
||||||
local function on_entity_damaged(event)
|
local function on_entity_damaged(event)
|
||||||
if not event.entity.valid then
|
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
|
event.entity.health = event.entity.health + event.final_damage_amount
|
||||||
end
|
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('melee', 1)
|
||||||
game.forces.enemy.set_ammo_damage_modifier('biological', 1)
|
game.forces.enemy.set_ammo_damage_modifier('biological', 1)
|
||||||
game.forces.enemy.set_ammo_damage_modifier('artillery-shell', 0.5)
|
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)
|
game.forces.enemy.set_ammo_damage_modifier('laser-turret', 0.5)
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_init(event)
|
local function on_init()
|
||||||
script.on_event(defines.events.on_player_main_inventory_changed, check_burden)
|
script.on_event(defines.events.on_player_main_inventory_changed, check_burden)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_load(event)
|
local function on_load()
|
||||||
script.on_event(defines.events.on_player_main_inventory_changed, check_burden)
|
script.on_event(defines.events.on_player_main_inventory_changed, check_burden)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -71,7 +71,7 @@ local function charge(player)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_player_joined_game(event)
|
local function on_player_joined_game()
|
||||||
draw_charging_gui()
|
draw_charging_gui()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
local event = require 'utils.event'
|
local Event = require 'utils.event'
|
||||||
local math_random = math.random
|
local math_random = math.random
|
||||||
|
|
||||||
local function shuffle(tbl)
|
local function shuffle(tbl)
|
||||||
@@ -508,5 +508,5 @@ local function on_tick()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
Event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
||||||
event.add(defines.events.on_tick, on_tick)
|
Event.add(defines.events.on_tick, on_tick)
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
-- prints death messages to all forces with custom texts -- by mewmew
|
-- prints death messages to all forces with custom texts -- by mewmew
|
||||||
|
|
||||||
local event = require 'utils.event'
|
local Event = require 'utils.event'
|
||||||
local math_random = math.random
|
|
||||||
local message_color = {r = 0.9, g = 0.9, b = 0.9}
|
local message_color = {r = 0.9, g = 0.9, b = 0.9}
|
||||||
|
|
||||||
local messages = {
|
local messages = {
|
||||||
@@ -76,4 +75,4 @@ local function on_player_died(event)
|
|||||||
end
|
end
|
||||||
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
|
-- 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_worm = require 'functions.unearthing_worm'
|
||||||
local unearthing_biters = require 'functions.unearthing_biters'
|
local unearthing_biters = require 'functions.unearthing_biters'
|
||||||
@@ -74,4 +74,4 @@ local function on_player_changed_position(event)
|
|||||||
end
|
end
|
||||||
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
|
b.visible = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local b = frame.add({type = 'label', caption = '- - - - - - - - - - - - - - - - - -'})
|
frame.add({type = 'label', caption = '- - - - - - - - - - - - - - - - - -'})
|
||||||
local b =
|
local b =
|
||||||
frame.add(
|
frame.add(
|
||||||
{
|
{
|
||||||
|
@@ -162,7 +162,7 @@ local function poll_difficulty(player)
|
|||||||
b.style.minimal_width = 160
|
b.style.minimal_width = 160
|
||||||
b.tooltip = this.tooltip[i]
|
b.tooltip = this.tooltip[i]
|
||||||
end
|
end
|
||||||
local b = frame.add({type = 'label', caption = '- - - - - - - - - - - - - - - - - -'})
|
frame.add({type = 'label', caption = '- - - - - - - - - - - - - - - - - -'})
|
||||||
local b =
|
local b =
|
||||||
frame.add(
|
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