Compare commits
30 Commits
ab57094041
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 184f68b01b | |||
| edfa234e56 | |||
| fb47a2f398 | |||
| 4b9d71d09c | |||
| 3e49fae3bc | |||
| e2f1e685cd | |||
| cb544aa8fc | |||
| c3265f84b7 | |||
| 90e17fb049 | |||
| 420819362e | |||
| 9da5fca304 | |||
| 3013e73cfa | |||
| 9814c3803d | |||
| ecfbebdcdf | |||
| 358ad9e8db | |||
| 443fa6d4b1 | |||
| d68b29d487 | |||
| c64cb69d50 | |||
| 487a0e6e16 | |||
| 98159766c4 | |||
| 971d055046 | |||
| f9ca86504b | |||
| bcc501f9ad | |||
| bbe754bd61 | |||
| 46d69f3a45 | |||
| b5ed31105c | |||
| d63441e5fd | |||
| c84ab187b6 | |||
| a1aa7138ce | |||
| 66ca187349 |
@@ -61,7 +61,6 @@ return
|
||||
{"stone-wall", {x = -14.5, y = -4.5}, {}},
|
||||
{"stone-wall", {x = -14.5, y = -3.5}, {}},
|
||||
{"tree-04", {x = -12.5, y = -3.5}, {}},
|
||||
{"offshore-pump", {x = 12.5, y = -4.5}, {dir = "south", fluids = {water = 100}, }},
|
||||
{"stone-wall", {x = 14.5, y = -3.5}, {}},
|
||||
{"stone-wall", {x = -14.5, y = -1.5}, {}},
|
||||
{"tree-04", {x = 8.5, y = -1.5}, {}},
|
||||
|
||||
|
Before Width: | Height: | Size: 571 B After Width: | Height: | Size: 570 B |
@@ -5,7 +5,6 @@ return
|
||||
{"storage-tank", {x = -1.5, y = -1.5}, {dir = "east", dmg = {dmg = {type = "random", min = 40, max = 150}}, dead = 0.3}},
|
||||
{"pipe", {x = -2.5, y = 1.5}, {dmg = {dmg = {type = "random", min = 0, max = 50}}}},
|
||||
{"pipe", {x = -2.5, y = 0.5}, {dmg = {dmg = {type = "random", min = 0, max = 50}}}},
|
||||
{"offshore-pump", {x = -1.5, y = 1.5}, {dir = "east"}},
|
||||
},
|
||||
tiles =
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 171 KiB |
|
Before Width: | Height: | Size: 631 KiB After Width: | Height: | Size: 558 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 238 KiB After Width: | Height: | Size: 238 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 818 KiB After Width: | Height: | Size: 760 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 769 KiB After Width: | Height: | Size: 668 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 229 KiB After Width: | Height: | Size: 221 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 802 B |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -148,7 +148,7 @@ for p=1,#global.player_forces do
|
||||
local pforce = game.forces[global.player_forces[p]]
|
||||
if surface and the_event and pforce and (not surfacename or surface.name==surfacename) and (not forcename or pforce.name==forcename) then
|
||||
--DRD
|
||||
if surface.peaceful_mode then
|
||||
if (surface.peaceful_mode or surface.map_gen_settings.autoplace_controls["enemy-base"].size == 0) and not settings.global["bm-events-when-peaceful"].value then
|
||||
break
|
||||
end
|
||||
--DRD
|
||||
@@ -315,10 +315,10 @@ end
|
||||
|
||||
|
||||
function get_pos_near_enemy_nest(surface,spawn,pforce)
|
||||
local enemy = surface.find_nearest_enemy{position=spawn, max_distance=500, force=pforce}
|
||||
local enemy = surface.find_nearest_enemy{position=spawn, max_distance=3000, force=pforce}
|
||||
if enemy then
|
||||
local f = enemy.force
|
||||
local nests = surface.find_entities_filtered{type='unit-spawner', position=enemy.position, radius=300, force=f, limit=5}
|
||||
local nests = surface.find_entities_filtered{type='unit-spawner', position=enemy.position, radius=300, force=f}
|
||||
if #nests>0 then
|
||||
spawn = get_random_pos_near(nests[math.random(#nests)].position,30)
|
||||
spawn = surface.find_non_colliding_position('assembling-machine-1', spawn, 0, 1)
|
||||
@@ -329,7 +329,7 @@ end
|
||||
|
||||
function Create_Position_Event(the_event, surface, position, pforce)
|
||||
--DRD
|
||||
if surface.peaceful_mode then
|
||||
if (surface.peaceful_mode or surface.map_gen_settings.autoplace_controls["enemy-base"].size == 0) and not settings.global["bm-events-when-peaceful"].value then
|
||||
return
|
||||
end
|
||||
--DRD
|
||||
|
||||
|
Before Width: | Height: | Size: 464 KiB After Width: | Height: | Size: 437 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 524 KiB After Width: | Height: | Size: 322 KiB |
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 70 KiB |
@@ -62,6 +62,7 @@ bm-volcano=This volcano spread fire streams all around. These eruptions will las
|
||||
|
||||
|
||||
[mod-setting-name]
|
||||
bm-events-when-peaceful=Enabled in peaceful mode
|
||||
bm-big-enemy-hp-multiplier=Big enemies HP multiplyer
|
||||
bm-big-enemy-hp-variant=Big enemies HP variant
|
||||
bm-worm-enemy-hp-multiplier=Worms HP multiplyer
|
||||
@@ -99,6 +100,7 @@ bm_camera_size=Camera size
|
||||
|
||||
|
||||
[mod-setting-description]
|
||||
bm-events-when-peaceful=If enabled, events will occur even in peaceful mode
|
||||
bm-event-days=How often the attacks will happen (1 game day = 7 minutes). Values 0-20 (Zero = disable all)
|
||||
bm-enable-silo-attack=If enabled, you will be seriously attacked after the Rocket-Silo is built
|
||||
bm-big-enemy-hp-multiplier=0.2-10.0 (default 1)
|
||||
|
||||
@@ -4,12 +4,21 @@ data:extend({
|
||||
type = "int-setting",
|
||||
name = "bm-event-days",
|
||||
setting_type = "runtime-global",
|
||||
default_value = 6,
|
||||
default_value = 100, --drd
|
||||
minimum_value = 0,
|
||||
maximum_value = 20,
|
||||
maximum_value = 365, --drd
|
||||
order = "a"
|
||||
},
|
||||
|
||||
-- skp, drd
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "bm-events-when-peaceful",
|
||||
setting_type = "runtime-global",
|
||||
default_value = false,
|
||||
order = "a"
|
||||
},
|
||||
-- skp, drd
|
||||
|
||||
|
||||
{
|
||||
@@ -300,7 +309,7 @@ data:extend({
|
||||
type = "double-setting",
|
||||
name = "bm-tree-events-chance",
|
||||
setting_type = "runtime-global",
|
||||
default_value = 1.0,
|
||||
default_value = 0.0, --drd
|
||||
minimum_value = 0.0,
|
||||
maximum_value = 100,
|
||||
order = "w"
|
||||
|
||||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -147,9 +147,9 @@ BioInd.show("Need to check these tables in global", compound_entity_tables)
|
||||
BioInd.writeDebug("Removed %s invalid entries from global[%s]!",
|
||||
{result, compound_tab})
|
||||
-- Restore missing hidden entities
|
||||
result = BioInd.restore_missing_entities(compound_name)
|
||||
BioInd.writeDebug("Checked %s compound entities and restored %s missing hidden entries for global[\"%s\"]!",
|
||||
{result.checked, result.restored, compound_tab})
|
||||
-- result = BioInd.restore_missing_entities(compound_name)
|
||||
-- BioInd.writeDebug("Checked %s compound entities and restored %s missing hidden entries for global[\"%s\"]!",
|
||||
-- {result.checked, result.restored, compound_tab})
|
||||
end
|
||||
end
|
||||
-- Search all surfaces for unregistered compound entities
|
||||
@@ -253,7 +253,7 @@ BioInd.writeDebug("Entered function On_Built with these data: " .. serpent.block
|
||||
if base then
|
||||
-- Make sure we work with a copy of the original table! We don't want to
|
||||
-- remove anything from it for real.
|
||||
local hidden_entities = util.table.deepcopy(base_entry.hidden)
|
||||
-- local hidden_entities = util.table.deepcopy(base_entry.hidden)
|
||||
|
||||
BioInd.writeDebug("%s (%s) is a compound entity. Need to create %s", {base.name, base.unit_number, hidden_entities})
|
||||
BioInd.show("hidden_entities", hidden_entities)
|
||||
@@ -296,7 +296,7 @@ BioInd.show("hidden_entities", hidden_entities)
|
||||
-- We must call create_entities even if there are no hidden entities (e.g. if
|
||||
-- the "Easy Gardens" setting is disabled and no hidden poles are required)
|
||||
-- because the compound entity gets registered there!
|
||||
BioInd.create_entities(global[base_entry.tab], base, hidden_entities)
|
||||
-- BioInd.create_entities(global[base_entry.tab], base, hidden_entities)
|
||||
BioInd.writeDebug("Stored %s in table: %s",
|
||||
{BioInd.print_name_id(base), global[base_entry.tab][base.unit_number]})
|
||||
end
|
||||
@@ -462,15 +462,15 @@ Event.register(Event.pre_remove_events, On_Pre_Remove)
|
||||
-- FIND LOCAL VARIABLES THAT ARE USED GLOBALLY --
|
||||
-- (Thanks to eradicator!) --
|
||||
------------------------------------------------------------------------------------
|
||||
setmetatable(_ENV, {
|
||||
__newindex = function (self, key, value) --locked_global_write
|
||||
error('\n\n[ER Global Lock] Forbidden global *write*:\n'
|
||||
.. serpent.line{key = key or '<nil>', value = value or '<nil>'} .. '\n')
|
||||
end,
|
||||
__index = function (self, key) --locked_global_read
|
||||
if not (key == "game" or key == "mods") then
|
||||
error('\n\n[ER Global Lock] Forbidden global *read*:\n'
|
||||
.. serpent.line{key = key or '<nil>'} .. '\n')
|
||||
end
|
||||
end
|
||||
})
|
||||
-- setmetatable(_ENV, {
|
||||
-- __newindex = function (self, key, value) --locked_global_write
|
||||
-- error('\n\n[ER Global Lock] Forbidden global *write*:\n'
|
||||
-- .. serpent.line{key = key or '<nil>', value = value or '<nil>'} .. '\n')
|
||||
-- end,
|
||||
-- __index = function (self, key) --locked_global_read
|
||||
-- if not (key == "game" or key == "mods") then
|
||||
-- error('\n\n[ER Global Lock] Forbidden global *read*:\n'
|
||||
-- .. serpent.line{key = key or '<nil>'} .. '\n')
|
||||
-- end
|
||||
-- end
|
||||
-- })
|
||||
|
Before Width: | Height: | Size: 1021 B After Width: | Height: | Size: 878 B |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 600 B |
|
Before Width: | Height: | Size: 914 B After Width: | Height: | Size: 649 B |
|
Before Width: | Height: | Size: 713 B After Width: | Height: | Size: 480 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 948 B |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 986 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 944 B After Width: | Height: | Size: 743 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.4 KiB |