Добавление изменение, которые "слетели"
This commit is contained in:
parent
487a0e6e16
commit
c64cb69d50
@ -1,19 +0,0 @@
|
||||
Copyright 2020 darkfrei
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom
|
||||
the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -1,37 +0,0 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.1.5
|
||||
Date: 2020-09-26
|
||||
Changes:
|
||||
- Update to Factorio 1.1
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.0.5
|
||||
Date: 2020-09-26
|
||||
Changes:
|
||||
- Added events on script_raised_built, script_raised_destroy for Klonan's construction drones compatibility
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.0.4
|
||||
Date: 2020-09-22
|
||||
Changes:
|
||||
- Resistor will be indestructible
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.0.3
|
||||
Date: 2020-09-05
|
||||
Changes:
|
||||
- Fixed issue with damage and ghosts
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.0.2
|
||||
Date: 2020-09-05
|
||||
Changes:
|
||||
- Update to 1.0
|
||||
- Fixed issue with deconstruction planer
|
||||
- Added settings value; default is 1 kW
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.0.2
|
||||
Date: 2020-08-14
|
||||
Changes:
|
||||
- Fixed issue with mined entity without entity
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.0.1
|
||||
Date: 2020-07-20
|
||||
Changes:
|
||||
- First release
|
@ -1,100 +0,0 @@
|
||||
|
||||
|
||||
script.on_configuration_changed(function(data)
|
||||
for i, surface in pairs (game.surfaces) do
|
||||
local resistors = surface.find_entities_filtered{name="hidden-electric-resistance"}
|
||||
for j, resistor in pairs (resistors) do
|
||||
-- surface.find_entity("", position)
|
||||
local count = surface.count_entities_filtered{position=resistor.position, type="electric-pole"}
|
||||
if count == 0 then
|
||||
resistor.destroy() -- 1.0.2
|
||||
elseif resistor.destructible then
|
||||
resistor.destructible = false
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
script.on_init(function(data)
|
||||
local n = 0
|
||||
for i, surface in pairs (game.surfaces) do
|
||||
local entities = surface.find_entities_filtered({type="electric-pole"})
|
||||
for j, entity in pairs (entities) do
|
||||
add_resistor(entity)
|
||||
end
|
||||
n=n+#entities
|
||||
end
|
||||
game.print ('[Electric Resistance]: added ' .. n .. ' resistors')
|
||||
end)
|
||||
|
||||
|
||||
script.on_event(defines.events.on_robot_mined_entity, function(event)
|
||||
|
||||
end)
|
||||
|
||||
function add_resistor(entity)
|
||||
local surface = entity.surface
|
||||
-- local position = entity.position
|
||||
-- create_entity{name=…, position=…, direction=…, force=…, target=…, source=…, fast_replace=…, player=…, spill=…, raise_built=…, create_build_effect_smoke=…}
|
||||
local resistor = surface.create_entity{name="hidden-electric-resistance",
|
||||
position = entity.position,
|
||||
force = entity.force,
|
||||
create_build_effect_smoke=false
|
||||
}
|
||||
resistor.destructible = false -- added in 1.0.4
|
||||
end
|
||||
|
||||
function on_built_entity (entity)
|
||||
if entity.type == "electric-pole" then
|
||||
add_resistor(entity)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
script.on_event(defines.events.on_built_entity, function(event)
|
||||
on_built_entity (event.created_entity)
|
||||
end)
|
||||
|
||||
script.on_event(defines.events.on_robot_built_entity, function(event)
|
||||
on_built_entity (event.created_entity)
|
||||
end)
|
||||
|
||||
-- added in 1.0.5
|
||||
script.on_event(defines.events.script_raised_built, function(event)
|
||||
on_built_entity (event.entity) -- why not created_entity, devs?
|
||||
end)
|
||||
|
||||
|
||||
function on_mined_entity (entity)
|
||||
-- if entity.valid
|
||||
if entity and entity.type == "electric-pole" then
|
||||
local surface = entity.surface
|
||||
local resistor = surface.find_entity("hidden-electric-resistance", entity.position)
|
||||
if resistor then
|
||||
resistor.destroy()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
script.on_event(defines.events.on_player_mined_entity, function(event)
|
||||
-- game.print('on_player_mined_entity')
|
||||
on_mined_entity (event.entity)
|
||||
end)
|
||||
|
||||
script.on_event(defines.events.on_robot_mined_entity, function(event) -- changed in 1.0.3
|
||||
-- game.print('on_robot_mined_entity')
|
||||
on_mined_entity (event.entity)
|
||||
end)
|
||||
|
||||
script.on_event(defines.events.on_entity_died, function(event)
|
||||
-- game.print('on_entity_died')
|
||||
on_mined_entity (event.entity)
|
||||
end)
|
||||
|
||||
-- added in 1.0.5
|
||||
script.on_event(defines.events.script_raised_destroy, function(event)
|
||||
-- game.print('on_entity_died')
|
||||
on_mined_entity (event.entity)
|
||||
end)
|
||||
|
||||
|
@ -1,64 +0,0 @@
|
||||
-- I have a lot of mods, but sometimes I get errors like:
|
||||
|
||||
-- ===================================== --
|
||||
-- 33.126 Error ModManager.cpp:1024: Error in assignID, item with name 'clowns-plate-osmium' does not exist.
|
||||
-- Source: alt2-production-science-pack (recipe).
|
||||
|
||||
-- 33.295 Mods to disable:Failed to load mods: Error in assignID, item with name 'clowns-plate-osmium' does not exist.
|
||||
-- Source: alt2-production-science-pack (recipe).
|
||||
-- Mods to be disabled:
|
||||
-- Clowns-Science
|
||||
-- angelsrefining
|
||||
-- ===================================== --
|
||||
|
||||
-- let's fix it!
|
||||
|
||||
log ('adding lost items and fluids')
|
||||
local mod_name = "__RITEG__"
|
||||
|
||||
function is_wrong_item (item_name)
|
||||
if not item_name then return end
|
||||
local item_type_list = {"ammo", "armor", "gun", "item", "capsule", "repair-tool", "mining-tool", "item-with-entity-data", "rail-planner", "tool", "blueprint", "deconstruction-item", "blueprint-book", "selection-tool", "item-with-tags", "item-with-label", "item-with-inventory", "module"}
|
||||
local item_prot
|
||||
for _,typ in pairs(item_type_list) do
|
||||
local prot = data.raw[typ][item_name]
|
||||
if prot then item_prot = prot end
|
||||
end
|
||||
|
||||
if not item_prot then
|
||||
-- new_item =
|
||||
-- {
|
||||
-- type = "item",
|
||||
-- name = item_name,
|
||||
-- -- flags = {"goes-to-main-inventory"},
|
||||
-- icons = {{icon = mod_name.."/graphics/icons/no-icon.png"}}, icon_size = 32,
|
||||
-- -- order = "e[electric-energy-interface]-b[electric-energy-interface]",
|
||||
-- stack_size = 50,
|
||||
-- -- subgroup = "energy",
|
||||
-- }
|
||||
log ('Deleted wrong item: '.. item_name)
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
for recipe_name, recipe in pairs (data.raw.recipe) do
|
||||
local handlers = {recipe}
|
||||
if recipe.normal and recipe.expensive then handlers = {recipe.normal, recipe.expensive} end
|
||||
for i, handler in pairs (handlers) do
|
||||
if handler.ingredients then
|
||||
for j, ingredient in pairs (handler.ingredients) do
|
||||
local item_name, fluid_name
|
||||
if ingredient.type and ingredient.type == "item" or ingredient[1] then
|
||||
item_name = ingredient.name or ingredient[1]
|
||||
elseif ingredient.type and ingredient.type == "fluid" then
|
||||
fluid_name = ingredient.name
|
||||
end
|
||||
if is_wrong_item (item_name) then
|
||||
handler.ingredients[j] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
@ -1,113 +0,0 @@
|
||||
local mod_name = "__ElectricResistance__"
|
||||
local name = "hidden-electric-resistance"
|
||||
|
||||
local consumption = (settings.startup["electric-resistance-power-consumption"].value) .. "kW"
|
||||
|
||||
local buffer_capacity = (17*settings.startup["electric-resistance-power-consumption"].value) .. "J"
|
||||
|
||||
local energy_usage = (10*settings.startup["electric-resistance-power-consumption"].value) .. "kW"
|
||||
|
||||
data:extend({
|
||||
-- items --
|
||||
{
|
||||
type = "item",
|
||||
icons = {{icon = mod_name.."/graphics/icons/"..name..".png"}},
|
||||
icon_size = 32,
|
||||
name = name,
|
||||
order = "e[electric-energy-interface]-b[electric-energy-interface]",
|
||||
place_result = name,
|
||||
stack_size = 50,
|
||||
subgroup = "energy"
|
||||
|
||||
},
|
||||
|
||||
|
||||
-- entities --
|
||||
{
|
||||
type = "electric-energy-interface",
|
||||
name = name,
|
||||
-- flags = {"placeable-off-grid", "not-on-map"}, -- fixed in 1.0.3
|
||||
-- added from WiredLamps 1.0.3
|
||||
flags = {
|
||||
"placeable-neutral",
|
||||
"player-creation",
|
||||
"fast-replaceable-no-build-while-moving",
|
||||
"placeable-off-grid",
|
||||
"not-on-map",
|
||||
"not-blueprintable",
|
||||
"not-deconstructable",
|
||||
"not-selectable-in-game",
|
||||
-- "hidden" -- not added in 1.0.4
|
||||
},
|
||||
collision_mask = {}, -- nothing
|
||||
selectable_in_game = false,
|
||||
|
||||
|
||||
allow_copy_paste = false,
|
||||
|
||||
-- gui_mode = "all",
|
||||
gui_mode = "none",
|
||||
|
||||
energy_production = "0kW",
|
||||
energy_source = {
|
||||
type = "electric",
|
||||
-- buffer_capacity = "17J",
|
||||
buffer_capacity = buffer_capacity,
|
||||
-- input_flow_limit = "1kW",
|
||||
input_flow_limit = consumption,
|
||||
output_flow_limit = "0kW",
|
||||
|
||||
render_no_power_icon = false,
|
||||
-- usage_priority = "tertiary",
|
||||
usage_priority = "primary-input",
|
||||
drain = "10kW"
|
||||
},
|
||||
-- energy_usage = "10kW",
|
||||
energy_usage = energy_usage,
|
||||
icon = mod_name.."/graphics/icons/"..name..".png",
|
||||
icon_size = 32,
|
||||
max_health = 100,
|
||||
-- minable = {
|
||||
-- hardness = 0.2,
|
||||
-- mining_time = 5,
|
||||
-- results = {{used_up_name, 1},{"used-up-uranium-fuel-cell", 5}}
|
||||
-- },
|
||||
|
||||
picture = {
|
||||
filename = mod_name.."/graphics/entities/"..name..".png",
|
||||
width = 32,
|
||||
height = 32,
|
||||
priority = "low",
|
||||
},
|
||||
|
||||
collision_box = {{-0.23, -0.23}, {0.23, 0.23}},
|
||||
selection_box = {{-0.23, -0.23}, {0.23, 0.23}},
|
||||
|
||||
|
||||
-- vehicle_impact_sound = {
|
||||
-- filename = "__base__/sound/car-metal-impact.ogg",
|
||||
-- volume = 0.65
|
||||
-- }
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 437 B |
Binary file not shown.
Before Width: | Height: | Size: 96 B |
Binary file not shown.
Before Width: | Height: | Size: 437 B |
Binary file not shown.
Before Width: | Height: | Size: 250 B |
@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "ElectricResistance",
|
||||
"version": "1.1.5",
|
||||
"date": "2020-11-28",
|
||||
|
||||
"title": "Electric Resistance",
|
||||
"description": "Every electric pole needs 1 kW of electric power; UPS-free",
|
||||
|
||||
"author": "darkfrei",
|
||||
"license": "MIT",
|
||||
|
||||
"dependencies": ["base"],
|
||||
"factorio_version": "1.1"
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
[entity-name]
|
||||
hidden-electric-resistance=Electric Resistance
|
||||
|
||||
[mod-setting-name]
|
||||
electric-resistance-power-consumption=Power Consumption, kW
|
@ -1,10 +0,0 @@
|
||||
data:extend({
|
||||
{
|
||||
type = "int-setting",
|
||||
name = "electric-resistance-power-consumption",
|
||||
setting_type = "startup",
|
||||
minimum_value = 1,
|
||||
maximum_value = 600,
|
||||
default_value = 1
|
||||
}
|
||||
})
|
@ -1,53 +0,0 @@
|
||||
|
||||
--[[
|
||||
--from
|
||||
data.raw.ammo["firearm-magazine"].type = "ammo"
|
||||
data.raw.ammo["firearm-magazine"].name = "firearm-magazine"
|
||||
data.raw.ammo["firearm-magazine"].icon = "__base__/graphics/icons/firearm-magazine.png"
|
||||
data.raw.ammo["firearm-magazine"].icon_size = 64
|
||||
data.raw.ammo["firearm-magazine"].icon_mipmaps = 4
|
||||
data.raw.ammo["firearm-magazine"].ammo_type.category = "bullet"
|
||||
data.raw.ammo["firearm-magazine"].ammo_type.action[1].type = "direct"
|
||||
data.raw.ammo["firearm-magazine"].ammo_type.action[1].action_delivery[1].type = "instant"
|
||||
data.raw.ammo["firearm-magazine"].ammo_type.action[1].action_delivery[1].source_effects[1] = {type = "create-explosion", entity_name = "explosion-gunshot"}
|
||||
data.raw.ammo["firearm-magazine"].ammo_type.action[1].action_delivery[1].target_effects[1].type = "create-entity"
|
||||
data.raw.ammo["firearm-magazine"].ammo_type.action[1].action_delivery[1].target_effects[1].entity_name = "explosion-hit"
|
||||
data.raw.ammo["firearm-magazine"].ammo_type.action[1].action_delivery[1].target_effects[1].offsets[1] = {0, 1}
|
||||
data.raw.ammo["firearm-magazine"].ammo_type.action[1].action_delivery[1].target_effects[1].offset_deviation[1] = {-0.5, -0.5}
|
||||
data.raw.ammo["firearm-magazine"].ammo_type.action[1].action_delivery[1].target_effects[1].offset_deviation[2] = {0.5, 0.5}
|
||||
data.raw.ammo["firearm-magazine"].ammo_type.action[1].action_delivery[1].target_effects[2].type = "damage"
|
||||
data.raw.ammo["firearm-magazine"].ammo_type.action[1].action_delivery[1].target_effects[2].damage = {amount = 5, type = "physical"}
|
||||
data.raw.ammo["firearm-magazine"].magazine_size = 10
|
||||
data.raw.ammo["firearm-magazine"].subgroup = "ammo"
|
||||
data.raw.ammo["firearm-magazine"].order = "a[basic-clips]-a[firearm-magazine]"
|
||||
data.raw.ammo["firearm-magazine"].stack_size = 200
|
||||
|
||||
--to
|
||||
data.raw.item.stone.type = "item"
|
||||
data.raw.item.stone.name = "stone"
|
||||
data.raw.item.stone.icon = "__base__/graphics/icons/stone.png"
|
||||
data.raw.item.stone.icon_size = 64
|
||||
data.raw.item.stone.icon_mipmaps = 4
|
||||
data.raw.item.stone.pictures[1] = {size = 64, filename = "__base__/graphics/icons/stone.png", scale = 0.25, mipmap_count = 4}
|
||||
data.raw.item.stone.pictures[2] = {size = 64, filename = "__base__/graphics/icons/stone-1.png", scale = 0.25, mipmap_count = 4}
|
||||
data.raw.item.stone.pictures[3] = {size = 64, filename = "__base__/graphics/icons/stone-2.png", scale = 0.25, mipmap_count = 4}
|
||||
data.raw.item.stone.pictures[4] = {size = 64, filename = "__base__/graphics/icons/stone-3.png", scale = 0.25, mipmap_count = 4}
|
||||
data.raw.item.stone.subgroup = "raw-resource"
|
||||
data.raw.item.stone.order = "d[stone]"
|
||||
data.raw.item.stone.stack_size = 50
|
||||
|
||||
--]]
|
||||
|
||||
|
||||
local stone = data.raw.item.stone
|
||||
data.raw.item.stone = nil
|
||||
local ammo_stone = table.deepcopy (data.raw.ammo["firearm-magazine"])
|
||||
|
||||
|
||||
stone.type = ammo_stone.type
|
||||
stone.ammo_type = ammo_stone.ammo_type
|
||||
stone.magazine_size = ammo_stone.magazine_size
|
||||
stone.subgroup = ammo_stone.subgroup
|
||||
stone.ammo_type.action[1].action_delivery[1].target_effects[2].damage = {amount = 1, type = "physical"}
|
||||
|
||||
data:extend({stone})
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB |
@ -4,8 +4,8 @@
|
||||
-- data.raw["item"]["wood"].stack_size = 200
|
||||
--end
|
||||
if data.raw["item"]["slag"] then
|
||||
data.raw["item"]["slag"].stack_size = 400
|
||||
data.raw["item"]["stone-crushed"].stack_size = 400
|
||||
data.raw["item"]["stone-brick"].stack_size = 400
|
||||
data.raw["item"]["slag"].stack_size = 4000
|
||||
data.raw["item"]["stone-crushed"].stack_size = 4000
|
||||
data.raw["item"]["stone-brick"].stack_size = 4000
|
||||
data.raw["item"]["iron-gear-wheel"].stack_size = 200
|
||||
end
|
@ -1,45 +0,0 @@
|
||||
# Noxys Trees
|
||||
|
||||
A Factorio modification that makes the trees spread slowly but also die off with certain condition.
|
||||
|
||||
## Discord
|
||||
|
||||
Want to discuss this mod or talk to Noxy directly? You can just go to the discord!
|
||||
|
||||
[<img src="http://cyanox.nl/discord.png" align="middle" title="Discord Invite to Noxys Naughty Nook" /> Invite to Noxys Naughty Nook](https://discord.gg/0bly1P1wIaTXv9W5)
|
||||
|
||||
## Factorio mod portal
|
||||
|
||||
[Factorio mod portal page.](https://mods.factorio.com/mods/CobaltSky/Noxys_Trees)
|
||||
|
||||
## Settings
|
||||
|
||||
### Startup
|
||||
|
||||
| Name | Description |
|
||||
| -------- | -------- |
|
||||
| Tree dying factor from fire | Percentage of how many trees should be removed after they've been burnt by fire.<br>Vanilla default is 0.8 (80%).<br><br>Set this to 0 to not alter this behavior. |
|
||||
|
||||
### Global
|
||||
|
||||
| Name | Description |
|
||||
| -------- | -------- |
|
||||
| Enabled | When enabled trees will spread and die. |
|
||||
| Debug mode | Enables the output of debug messages. |
|
||||
| Debug Interval | The interval in ticks between debug messages. |
|
||||
| Degrade tiles | Over time slowly degrades floor tiles that block tree growth until the trees can grow there again. |
|
||||
| Overpopulation kills trees | If a chunk is overpopulated it will slowly kill off trees at random in that chunk. |
|
||||
| Kill trees near unwanted | Randomly kills trees that are near biter bases, uranium ore or player entities. This also affects the death of trees by lack of fertility or too much pollution. |
|
||||
| Ticks between operations | Allows fine grained control over the performance of this mod and the speed at which the trees expand. |
|
||||
| Chunks per operation | Allows fine grained control over the performance of this mod and the speed at which the trees expand. |
|
||||
| Enable chunks per operation scaling bias | Allows fine grained control over the performance of this mod and the speed at which the trees expand.<br><br>WARNING: This option makes tree growth more consistent throughout a playthrough but will cost more performance the bigger the map becomes.<br><br>Therefore this is a choice between consistent performance versus consistent tree spreading. |
|
||||
| Chunks per operation scaling bias | Allows fine grained control over the performance of this mod and the speed at which the trees expand.<br><br>Chunks per operation are multiplied with the total chunks divided by this value (if enabled) (this * (TotalChunks / ScalingBias)). |
|
||||
| Minimum distance between trees | Minimum distance between trees for trees to be able to grow. |
|
||||
| Minimum distance to enemies | Minimum distance to enemy bases or worms for trees to be able to grow. |
|
||||
| Minimum distance to uranium ore | Minimum distance to uranium ore for trees to be able to grow. |
|
||||
| Minimum distance to player entities | Minimum distance to player entities for trees to be able to grow.<br><br>Set this to 0 to skip this check and thus slightly increase performance. |
|
||||
| Tree deaths by lack of fertility minimum | If the fertility of the ground is lower than this value the tree on top of it has a chance to die. |
|
||||
| Tree deaths by pollution bias | How quickly trees die from pollution.<br><br>Set this to 0 to disable deaths by pollution.<br><br>Additional trees attempted to be killed = math.ceil(pollution / this). |
|
||||
| Trees to grow per chunk percentage | Allows fine grained control over the performance of this mod and the speed at which the trees expand.<br><br>Each chunk will at least try to generate one tree but this percentage can increase it to more based on the existing trees in the chunk.<br><br>If the percentage is 0.01 (1%) and the chunk has 200 trees it will try to generate 2 additional trees per operation. |
|
||||
| Maximum trees per chunk | If there are more trees than this number in a chunk it will not expand any trees in that chunk.<br>(Vanilla dense forests seem to be around 512 trees per chunk) |
|
||||
| Expansion distance | How far in tiles a tree can generate from its originating tree. |
|
@ -1,30 +0,0 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.3.1
|
||||
Date: 15. 09. 2020
|
||||
Changes:
|
||||
- Made it so that tree deaths don't plant dead trees near player entities.
|
||||
- Added changelog.
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.3.0
|
||||
Date: 7. 09. 2020
|
||||
Changes:
|
||||
- RU and FR Translation updates.
|
||||
- Factorio 1.0.0!
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.2.2
|
||||
Date: 7. 06. 2020
|
||||
Changes:
|
||||
- Add support for various 0.18 tiles (that may not actually have been fully released yet).
|
||||
- Optimized some of the filtered searches with newer methods.
|
||||
- Added "Minimum distance to degradable tiles" setting.
|
||||
- RU and FR Translation updates.
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.2.1
|
||||
Date: 16. 05. 2020
|
||||
Changes:
|
||||
- Change locale filename for better integration with Factorio mods localization helper.
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.2.0
|
||||
Date: 21. 01. 2020
|
||||
Changes:
|
||||
- Update to 0.18.
|
@ -1,970 +0,0 @@
|
||||
-- luacheck: globals game global settings script defines, ignore 631
|
||||
local noxy_trees = {}
|
||||
|
||||
local mathfloor = math.floor
|
||||
local mathceil = math.ceil
|
||||
local config = {}
|
||||
|
||||
|
||||
noxy_trees.disabled = { -- Disables the spreading of these specific entities.
|
||||
["dead-dry-hairy-tree"] = true,
|
||||
["dead-grey-trunk"] = true,
|
||||
["dead-tree"] = true,
|
||||
["dead-tree-desert"] = true,
|
||||
["dry-hairy-tree"] = true,
|
||||
["dry-tree"] = true,
|
||||
["green-coral"] = true,
|
||||
-- Angels Bio Processings special trees.
|
||||
["temperate-tree"] = true,
|
||||
["swamp-tree"] = true,
|
||||
["desert-tree"] = true,
|
||||
["temperate-garden"] = true,
|
||||
["swamp-garden"] = true,
|
||||
["desert-garden"] = true,
|
||||
["puffer-nest"] = true,
|
||||
}
|
||||
noxy_trees.disabled_match = {
|
||||
["[-]planted"] = true,
|
||||
["sapling[-]stage[-]"] = true,
|
||||
}
|
||||
noxy_trees.degradable = { -- The floor tiles that can be degraded and into what.
|
||||
-- Vanilla tiles
|
||||
["concrete"] = "stone-path",
|
||||
["stone-path"] = true,
|
||||
["hazard-concrete-left"] = "stone-path",
|
||||
["hazard-concrete-right"] = "stone-path",
|
||||
["lab-dark-1"] = "concrete",
|
||||
["lab-dark-2"] = "concrete",
|
||||
-- More Floors 0.15
|
||||
["alien-metal"] = "circuit-floor",
|
||||
["express-arrow-grate"] = "concrete",
|
||||
["express-arrow-grate-right"] = "concrete",
|
||||
["express-arrow-grate-down"] = "concrete",
|
||||
["express-arrow-grate-left"] = "concrete",
|
||||
["fast-arrow-grate"] = "concrete",
|
||||
["fast-arrow-grate-right"] = "concrete",
|
||||
["fast-arrow-grate-down"] = "concrete",
|
||||
["fast-arrow-grate-left"] = "concrete",
|
||||
["nitinol-arrow-grate"] = "concrete",
|
||||
["nitinol-arrow-grate-right"] = "concrete",
|
||||
["nitinol-arrow-grate-down"] = "concrete",
|
||||
["nitinol-arrow-grate-left"] = "concrete",
|
||||
["titanium-arrow-grate"] = "concrete",
|
||||
["titanium-arrow-grate-right"] = "concrete",
|
||||
["titanium-arrow-grate-down"] = "concrete",
|
||||
["titanium-arrow-grate-left"] = "concrete",
|
||||
["arrow-grate"] = "concrete",
|
||||
["arrow-grate-right"] = "concrete",
|
||||
["arrow-grate-down"] = "concrete",
|
||||
["arrow-grate-left"] = "concrete",
|
||||
["asphalt"] = "concrete",
|
||||
["checkerboard"] = "stone-path",
|
||||
["circuit-floor"] = "concrete",
|
||||
["mf-concrete-blue"] = "concrete",
|
||||
["mf-concrete-darkgrey"] = "concrete",
|
||||
["mf-concrete-gold"] = "concrete",
|
||||
["mf-concrete-green"] = "concrete",
|
||||
["mf-concrete-limegreen"] = "concrete",
|
||||
["mf-concrete-magenta"] = "concrete",
|
||||
["mf-concrete-orange"] = "concrete",
|
||||
["mf-concrete-pink"] = "concrete",
|
||||
["mf-concrete-purple"] = "concrete",
|
||||
["mf-concrete-red"] = "concrete",
|
||||
["mf-concrete-skyblue"] = "concrete",
|
||||
["mf-concrete-white"] = "concrete",
|
||||
["mf-concrete-yellow"] = "concrete",
|
||||
["mf-concrete-black"] = "concrete",
|
||||
["cobblestone"] = true,
|
||||
["decal1"] = "stone-path",
|
||||
["decal2"] = "stone-path",
|
||||
["decal3"] = "stone-path",
|
||||
["decal4"] = "stone-path",
|
||||
["diamond-plate"] = "concrete",
|
||||
["mf_dirt_dark"] = true,
|
||||
["mf_dirt"] = true,
|
||||
["dirt_dark_blueprint"] = true,
|
||||
["dirt_blueprint"] = true,
|
||||
["experiment"] = "stone-path",
|
||||
["mf_green_grass"] = true,
|
||||
["mf_grass_dry"] = true,
|
||||
["mf_grass_dry_blueprint"] = true,
|
||||
["mf_green_grass_blueprint"] = true,
|
||||
["gravel"] = true,
|
||||
["hexagonb"] = "metal-scraps",
|
||||
["lava"] = true,
|
||||
["metal-scraps"] = true,
|
||||
["redbrick"] = true,
|
||||
["reinforced-concrete"] = "concrete",
|
||||
["road-line"] = "asphalt",
|
||||
["road-line-right"] = "asphalt",
|
||||
["road-line-down"] = "asphalt",
|
||||
["road-line-left"] = "asphalt",
|
||||
["rusty-metal"] = "metal-scraps",
|
||||
["rusty-grate"] = "metal-scraps",
|
||||
["mf_sand_dark"] = true,
|
||||
["mf_sand_light"] = true,
|
||||
["sand_dark_blueprint"] = true,
|
||||
["sand_light_blueprint"] = true,
|
||||
["smooth-concrete"] = "stone-path",
|
||||
["snow"] = true,
|
||||
-- ["tar"] = true, -- Makes this stuff look weird (incorrect edges everywhere)
|
||||
-- ["toxic"] = true, -- Makes this stuff look weird (incorrect edges everywhere)
|
||||
["wood-floor"] = true,
|
||||
["darkwood"] = true,
|
||||
["herringbone"] = true,
|
||||
["yellowbrick"] = true,
|
||||
-- Asphalt Roads
|
||||
["Arci-asphalt"] = true,
|
||||
["Arci-asphalt-zebra-crossing-horizontal"] = "Arci-asphalt",
|
||||
["Arci-asphalt-zebra-crossing-vertical"] = "Arci-asphalt",
|
||||
["Arci-asphalt-triangle-white-up"] = "Arci-asphalt",
|
||||
["Arci-asphalt-triangle-white-right"] = "Arci-asphalt",
|
||||
["Arci-asphalt-triangle-white-down"] = "Arci-asphalt",
|
||||
["Arci-asphalt-triangle-white-left"] = "Arci-asphalt",
|
||||
["Arci-asphalt-hazard-white-right"] = "Arci-asphalt",
|
||||
["Arci-asphalt-hazard-white-left"] = "Arci-asphalt",
|
||||
["Arci-asphalt-hazard-yellow-right"] = "Arci-asphalt",
|
||||
["Arci-asphalt-hazard-yellow-left"] = "Arci-asphalt",
|
||||
["Arci-asphalt-hazard-red-right"] = "Arci-asphalt",
|
||||
["Arci-asphalt-hazard-red-left"] = "Arci-asphalt",
|
||||
["Arci-asphalt-hazard-blue-right"] = "Arci-asphalt",
|
||||
["Arci-asphalt-hazard-blue-left"] = "Arci-asphalt",
|
||||
["Arci-asphalt-hazard-green-right"] = "Arci-asphalt",
|
||||
["Arci-asphalt-hazard-green-left"] = "Arci-asphalt",
|
||||
["Arci-marking-white-straight-horizontal"] = "Arci-asphalt",
|
||||
["Arci-marking-white-straight-vertical"] = "Arci-asphalt",
|
||||
["Arci-marking-white-diagonal-left"] = "Arci-asphalt",
|
||||
["Arci-marking-white-diagonal-right"] = "Arci-asphalt",
|
||||
["Arci-marking-white-right-turn-up"] = "Arci-asphalt",
|
||||
["Arci-marking-white-right-turn-right"] = "Arci-asphalt",
|
||||
["Arci-marking-white-right-turn-down"] = "Arci-asphalt",
|
||||
["Arci-marking-white-right-turn-left"] = "Arci-asphalt",
|
||||
["Arci-marking-white-left-turn-up"] = "Arci-asphalt",
|
||||
["Arci-marking-white-left-turn-right"] = "Arci-asphalt",
|
||||
["Arci-marking-white-left-turn-down"] = "Arci-asphalt",
|
||||
["Arci-marking-white-left-turn-left"] = "Arci-asphalt",
|
||||
["Arci-marking-white-dl-straight-horizontal"] = "Arci-asphalt",
|
||||
["Arci-marking-white-dl-straight-vertical"] = "Arci-asphalt",
|
||||
["Arci-marking-white-dl-diagonal-left"] = "Arci-asphalt",
|
||||
["Arci-marking-white-dl-diagonal-right"] = "Arci-asphalt",
|
||||
["Arci-marking-white-dl-right-turn-up"] = "Arci-asphalt",
|
||||
["Arci-marking-white-dl-right-turn-right"] = "Arci-asphalt",
|
||||
["Arci-marking-white-dl-right-turn-down"] = "Arci-asphalt",
|
||||
["Arci-marking-white-dl-right-turn-left"] = "Arci-asphalt",
|
||||
["Arci-marking-white-dl-left-turn-up"] = "Arci-asphalt",
|
||||
["Arci-marking-white-dl-left-turn-right"] = "Arci-asphalt",
|
||||
["Arci-marking-white-dl-left-turn-down"] = "Arci-asphalt",
|
||||
["Arci-marking-white-dl-left-turn-left"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-straight-horizontal"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-straight-vertical"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-diagonal-left"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-diagonal-right"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-right-turn-up"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-right-turn-right"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-right-turn-down"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-right-turn-left"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-left-turn-up"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-left-turn-right"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-left-turn-down"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-left-turn-left"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-dl-straight-horizontal"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-dl-straight-vertical"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-dl-diagonal-left"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-dl-diagonal-right"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-dl-right-turn-up"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-dl-right-turn-right"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-dl-right-turn-down"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-dl-right-turn-left"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-dl-left-turn-up"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-dl-left-turn-right"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-dl-left-turn-down"] = "Arci-asphalt",
|
||||
["Arci-marking-yellow-dl-left-turn-left"] = "Arci-asphalt",
|
||||
-- Dectorio
|
||||
["dect-wood-floor"] = true,
|
||||
["dect-concrete-grid"] = true,
|
||||
["dect-stone-gravel"] = true,
|
||||
["dect-iron-ore-gravel"] = true,
|
||||
["dect-copper-ore-gravel"] = true,
|
||||
["dect-coal-gravel"] = true,
|
||||
["dect-paint-danger-left"] = "stone-path",
|
||||
["dect-paint-danger-right"] = "stone-path",
|
||||
["dect-paint-emergency-left"] = "stone-path",
|
||||
["dect-paint-emergency-right"] = "stone-path",
|
||||
["dect-paint-caution-left"] = "stone-path",
|
||||
["dect-paint-caution-right"] = "stone-path",
|
||||
["dect-paint-radiation-left"] = "stone-path",
|
||||
["dect-paint-radiation-right"] = "stone-path",
|
||||
["dect-paint-defect-left"] = "stone-path",
|
||||
["dect-paint-defect-right"] = "stone-path",
|
||||
["dect-paint-operations-left"] = "stone-path",
|
||||
["dect-paint-operations-right"] = "stone-path",
|
||||
["dect-paint-safety-left"] = "stone-path",
|
||||
["dect-paint-safety-right"] = "stone-path",
|
||||
-- Other mods
|
||||
["wood floors_brick speed"] = true,
|
||||
}
|
||||
|
||||
noxy_trees.reinforced_degradable = {
|
||||
-- Vanilla tiles 0.18
|
||||
["refined-concrete"] = "concrete",
|
||||
["refined-hazard-concrete-left"] = "refined-concrete",
|
||||
["refined-hazard-concrete-right"] = "refined-concrete",
|
||||
["red-refined-concrete"] = "refined-concrete",
|
||||
["green-refined-concrete"] = "refined-concrete",
|
||||
["blue-refined-concrete"] = "refined-concrete",
|
||||
["orange-refined-concrete"] = "refined-concrete",
|
||||
["yellow-refined-concrete"] = "refined-concrete",
|
||||
["pink-refined-concrete"] = "refined-concrete",
|
||||
["purple-refined-concrete"] = "refined-concrete",
|
||||
["black-refined-concrete"] = "refined-concrete",
|
||||
["brown-refined-concrete"] = "refined-concrete",
|
||||
["cyan-refined-concrete"] = "refined-concrete",
|
||||
["acid-refined-concrete"] = "refined-concrete",
|
||||
}
|
||||
|
||||
-- Create a list for use in a filter function based of the degradable tiles.
|
||||
noxy_trees.tilefilter = {}
|
||||
for k,_ in pairs(noxy_trees.degradable) do
|
||||
noxy_trees.tilefilter[#noxy_trees.tilefilter + 1] = k
|
||||
end
|
||||
for k,_ in pairs(noxy_trees.reinforced_degradable) do
|
||||
noxy_trees.tilefilter[#noxy_trees.tilefilter + 1] = k
|
||||
end
|
||||
|
||||
noxy_trees.fertility = { -- Tiles not listed here are considered non fertile (no spreading at all).
|
||||
-- Vanilla 0.16
|
||||
["dirt-1"] = 0.1,
|
||||
["dirt-2"] = 0.15,
|
||||
["dirt-3"] = 0.2,
|
||||
["dirt-4"] = 0.3,
|
||||
["dirt-5"] = 0.35,
|
||||
["dirt-6"] = 0.4,
|
||||
["dirt-7"] = 0.45,
|
||||
["dry-dirt"] = 0.1,
|
||||
["grass-1"] = 0.9,
|
||||
["grass-2"] = 1,
|
||||
["grass-3"] = 0.95,
|
||||
["grass-4"] = 0.75,
|
||||
["red-desert-0"] = 0.6,
|
||||
["red-desert-1"] = 0.3,
|
||||
["red-desert-2"] = 0.2,
|
||||
["red-desert-3"] = 0.1,
|
||||
["sand-1"] = 0.05,
|
||||
["sand-2"] = 0.1,
|
||||
["sand-3"] = 0.05,
|
||||
["sand-4"] = 0.15, -- Seems to not be used / defined
|
||||
-- Vanilla 0.15
|
||||
["grass-medium"] = 1, -- The most fertile
|
||||
["grass"] = 0.9,
|
||||
["grass-dry"] = 0.75,
|
||||
["dirt-dark"] = 0.45,
|
||||
["dirt"] = 0.35,
|
||||
["red-desert"] = 0.2,
|
||||
["red-desert-dark"] = 0.15,
|
||||
["sand-dark"] = 0.15,
|
||||
["sand"] = 0.1,
|
||||
["landfill"] = 0, -- Not fertile
|
||||
-- Alien biomes 0.15
|
||||
["grass-red"] = 1,
|
||||
["grass-orange"] = 1,
|
||||
["grass-yellow"] = 1,
|
||||
["grass-yellow-fade"] = 0.9,
|
||||
["grass-purple-fade"] = 0.9,
|
||||
["grass-purple"] = 1,
|
||||
["dirt-red-dark"] = 0.45,
|
||||
["dirt-brown-dark"] = 0.45,
|
||||
["grass-blue-fade"] = 0.9,
|
||||
["grass-blue"] = 1,
|
||||
["dirt-red"] = 0.35,
|
||||
["dirt-brown"] = 0.35,
|
||||
["dirt-tan-dark"] = 0.45,
|
||||
["dirt-dull-dark"] = 0.45,
|
||||
["dirt-grey-dark"] = 0.45,
|
||||
["dirt-tan"] = 0.25,
|
||||
["dirt-dull"] = 0.25,
|
||||
["dirt-grey"] = 0.25,
|
||||
["sand-red-dark"] = 0.15,
|
||||
["sand-orange-dark"] = 0.15,
|
||||
["sand-gold-dark"] = 0.15,
|
||||
["sand-dull-dark"] = 0.1,
|
||||
["sand-grey-dark"] = 0.1,
|
||||
["sand-red"] = 0.1,
|
||||
["sand-orange"] = 0.1,
|
||||
["sand-gold"] = 0.1,
|
||||
["sand-dull"] = 0.075,
|
||||
["sand-grey"] = 0.075,
|
||||
["snow"] = 0.25,
|
||||
["volcanic-cool"] = 0.1,
|
||||
-- Alien biomes 0.16
|
||||
["mineral-purple-dirt-1"] = 0.45,
|
||||
["mineral-purple-dirt-2"] = 0.45,
|
||||
["mineral-purple-dirt-3"] = 0.45,
|
||||
["mineral-purple-dirt-4"] = 0.45,
|
||||
["mineral-purple-dirt-5"] = 0.45,
|
||||
["mineral-purple-dirt-6"] = 0.45,
|
||||
["mineral-purple-sand-1"] = 0.15,
|
||||
["mineral-purple-sand-2"] = 0.15,
|
||||
["mineral-purple-sand-3"] = 0.15,
|
||||
["mineral-violet-dirt-1"] = 0.45,
|
||||
["mineral-violet-dirt-2"] = 0.45,
|
||||
["mineral-violet-dirt-3"] = 0.45,
|
||||
["mineral-violet-dirt-4"] = 0.45,
|
||||
["mineral-violet-dirt-5"] = 0.45,
|
||||
["mineral-violet-dirt-6"] = 0.45,
|
||||
["mineral-violet-sand-1"] = 0.15,
|
||||
["mineral-violet-sand-2"] = 0.15,
|
||||
["mineral-violet-sand-3"] = 0.15,
|
||||
["mineral-red-dirt-1"] = 0.45,
|
||||
["mineral-red-dirt-2"] = 0.45,
|
||||
["mineral-red-dirt-3"] = 0.45,
|
||||
["mineral-red-dirt-4"] = 0.45,
|
||||
["mineral-red-dirt-5"] = 0.45,
|
||||
["mineral-red-dirt-6"] = 0.45,
|
||||
["mineral-red-sand-1"] = 0.15,
|
||||
["mineral-red-sand-2"] = 0.15,
|
||||
["mineral-red-sand-3"] = 0.15,
|
||||
["mineral-brown-dirt-1"] = 0.45,
|
||||
["mineral-brown-dirt-2"] = 0.45,
|
||||
["mineral-brown-dirt-3"] = 0.45,
|
||||
["mineral-brown-dirt-4"] = 0.45,
|
||||
["mineral-brown-dirt-5"] = 0.45,
|
||||
["mineral-brown-dirt-6"] = 0.45,
|
||||
["mineral-brown-sand-1"] = 0.15,
|
||||
["mineral-brown-sand-2"] = 0.15,
|
||||
["mineral-brown-sand-3"] = 0.15,
|
||||
["mineral-tan-dirt-1"] = 0.45,
|
||||
["mineral-tan-dirt-2"] = 0.45,
|
||||
["mineral-tan-dirt-3"] = 0.45,
|
||||
["mineral-tan-dirt-4"] = 0.45,
|
||||
["mineral-tan-dirt-5"] = 0.45,
|
||||
["mineral-tan-dirt-6"] = 0.45,
|
||||
["mineral-tan-sand-1"] = 0.15,
|
||||
["mineral-tan-sand-2"] = 0.15,
|
||||
["mineral-tan-sand-3"] = 0.15,
|
||||
["mineral-aubergine-dirt-1"] = 0.45,
|
||||
["mineral-aubergine-dirt-2"] = 0.45,
|
||||
["mineral-aubergine-dirt-3"] = 0.45,
|
||||
["mineral-aubergine-dirt-4"] = 0.45,
|
||||
["mineral-aubergine-dirt-5"] = 0.45,
|
||||
["mineral-aubergine-dirt-6"] = 0.45,
|
||||
["mineral-aubergine-sand-1"] = 0.15,
|
||||
["mineral-aubergine-sand-2"] = 0.15,
|
||||
["mineral-aubergine-sand-3"] = 0.15,
|
||||
["mineral-dustyrose-dirt-1"] = 0.45,
|
||||
["mineral-dustyrose-dirt-2"] = 0.45,
|
||||
["mineral-dustyrose-dirt-3"] = 0.45,
|
||||
["mineral-dustyrose-dirt-4"] = 0.45,
|
||||
["mineral-dustyrose-dirt-5"] = 0.45,
|
||||
["mineral-dustyrose-dirt-6"] = 0.45,
|
||||
["mineral-dustyrose-sand-1"] = 0.15,
|
||||
["mineral-dustyrose-sand-2"] = 0.15,
|
||||
["mineral-dustyrose-sand-3"] = 0.15,
|
||||
["mineral-beige-dirt-1"] = 0.45,
|
||||
["mineral-beige-dirt-2"] = 0.45,
|
||||
["mineral-beige-dirt-3"] = 0.45,
|
||||
["mineral-beige-dirt-4"] = 0.45,
|
||||
["mineral-beige-dirt-5"] = 0.45,
|
||||
["mineral-beige-dirt-6"] = 0.45,
|
||||
["mineral-beige-sand-1"] = 0.15,
|
||||
["mineral-beige-sand-2"] = 0.15,
|
||||
["mineral-beige-sand-3"] = 0.15,
|
||||
["mineral-cream-dirt-1"] = 0.45,
|
||||
["mineral-cream-dirt-2"] = 0.45,
|
||||
["mineral-cream-dirt-3"] = 0.45,
|
||||
["mineral-cream-dirt-4"] = 0.45,
|
||||
["mineral-cream-dirt-5"] = 0.45,
|
||||
["mineral-cream-dirt-6"] = 0.45,
|
||||
["mineral-cream-sand-1"] = 0.15,
|
||||
["mineral-cream-sand-2"] = 0.15,
|
||||
["mineral-cream-sand-3"] = 0.15,
|
||||
["mineral-black-dirt-1"] = 0.45,
|
||||
["mineral-black-dirt-2"] = 0.45,
|
||||
["mineral-black-dirt-3"] = 0.45,
|
||||
["mineral-black-dirt-4"] = 0.45,
|
||||
["mineral-black-dirt-5"] = 0.45,
|
||||
["mineral-black-dirt-6"] = 0.45,
|
||||
["mineral-black-sand-1"] = 0.15,
|
||||
["mineral-black-sand-2"] = 0.15,
|
||||
["mineral-black-sand-3"] = 0.15,
|
||||
["mineral-grey-dirt-1"] = 0.45,
|
||||
["mineral-grey-dirt-2"] = 0.45,
|
||||
["mineral-grey-dirt-3"] = 0.45,
|
||||
["mineral-grey-dirt-4"] = 0.45,
|
||||
["mineral-grey-dirt-5"] = 0.45,
|
||||
["mineral-grey-dirt-6"] = 0.45,
|
||||
["mineral-grey-sand-1"] = 0.15,
|
||||
["mineral-grey-sand-2"] = 0.15,
|
||||
["mineral-grey-sand-3"] = 0.15,
|
||||
["mineral-white-dirt-1"] = 0.45,
|
||||
["mineral-white-dirt-2"] = 0.45,
|
||||
["mineral-white-dirt-3"] = 0.45,
|
||||
["mineral-white-dirt-4"] = 0.45,
|
||||
["mineral-white-dirt-5"] = 0.45,
|
||||
["mineral-white-dirt-6"] = 0.45,
|
||||
["mineral-white-sand-1"] = 0.15,
|
||||
["mineral-white-sand-2"] = 0.15,
|
||||
["mineral-white-sand-3"] = 0.15,
|
||||
["vegetation-turquoise-grass-1"] = 0.95,
|
||||
["vegetation-turquoise-grass-2"] = 0.95,
|
||||
["vegetation-green-grass-1"] = 1,
|
||||
["vegetation-green-grass-2"] = 1,
|
||||
["vegetation-green-grass-3"] = 1,
|
||||
["vegetation-green-grass-4"] = 1,
|
||||
["vegetation-olive-grass-1"] = 1,
|
||||
["vegetation-olive-grass-2"] = 1,
|
||||
["vegetation-yellow-grass-1"] = 0.85,
|
||||
["vegetation-yellow-grass-2"] = 0.85,
|
||||
["vegetation-orange-grass-1"] = 0.85,
|
||||
["vegetation-orange-grass-2"] = 0.85,
|
||||
["vegetation-red-grass-1"] = 0.85,
|
||||
["vegetation-red-grass-2"] = 0.85,
|
||||
["vegetation-violet-grass-1"] = 0.95,
|
||||
["vegetation-violet-grass-2"] = 0.95,
|
||||
["vegetation-purple-grass-1"] = 0.95,
|
||||
["vegetation-purple-grass-2"] = 0.95,
|
||||
["vegetation-mauve-grass-1"] = 0.95,
|
||||
["vegetation-mauve-grass-2"] = 0.95,
|
||||
["vegetation-blue-grass-1"] = 0.95,
|
||||
["vegetation-blue-grass-2"] = 0.95,
|
||||
["volcanic-orange-heat-1"] = 0.05,
|
||||
["volcanic-orange-heat-2"] = 0.05,
|
||||
["volcanic-orange-heat-3"] = 0.05,
|
||||
["volcanic-orange-heat-4"] = 0.05,
|
||||
["volcanic-green-heat-1"] = 0.15,
|
||||
["volcanic-green-heat-2"] = 0.15,
|
||||
["volcanic-green-heat-3"] = 0.15,
|
||||
["volcanic-green-heat-4"] = 0.15,
|
||||
["volcanic-blue-heat-1"] = 0.05,
|
||||
["volcanic-blue-heat-2"] = 0.05,
|
||||
["volcanic-blue-heat-3"] = 0.05,
|
||||
["volcanic-blue-heat-4"] = 0.05,
|
||||
["volcanic-purple-heat-1"] = 0.05,
|
||||
["volcanic-purple-heat-2"] = 0.05,
|
||||
["volcanic-purple-heat-3"] = 0.05,
|
||||
["volcanic-purple-heat-4"] = 0.05,
|
||||
["frozen-snow-0"] = 0.5,
|
||||
["frozen-snow-1"] = 0.5,
|
||||
["frozen-snow-2"] = 0.5,
|
||||
["frozen-snow-3"] = 0.5,
|
||||
["frozen-snow-4"] = 0.5,
|
||||
["frozen-snow-5"] = 0.5,
|
||||
["frozen-snow-6"] = 0.5,
|
||||
["frozen-snow-7"] = 0.5,
|
||||
["frozen-snow-8"] = 0.5,
|
||||
["frozen-snow-9"] = 0.5,
|
||||
}
|
||||
|
||||
noxy_trees.deathselector = {
|
||||
"dead-grey-trunk",
|
||||
"dry-hairy-tree",
|
||||
"dead-tree-desert"
|
||||
}
|
||||
noxy_trees.dead = {
|
||||
["dry-tree"] = true,
|
||||
["dry-hairy-tree"] = "dead-dry-hairy-tree",
|
||||
["dead-grey-trunk"] = "dry-tree",
|
||||
["dead-dry-hairy-tree"] = true,
|
||||
["dead-tree-desert"] = "dry-tree",
|
||||
}
|
||||
noxy_trees.alive = {
|
||||
"tree-01",
|
||||
"tree-01",
|
||||
"tree-02-red",
|
||||
"tree-03",
|
||||
"tree-04",
|
||||
"tree-05",
|
||||
"tree-06",
|
||||
"tree-06-brown",
|
||||
"tree-07",
|
||||
"tree-08",
|
||||
"tree-08-brown",
|
||||
"tree-08-red",
|
||||
"tree-09",
|
||||
"tree-09-brown",
|
||||
"tree-09-red",
|
||||
-- Alien Biomes
|
||||
"tree-wetland-a",
|
||||
"tree-wetland-b",
|
||||
"tree-wetland-c",
|
||||
"tree-wetland-d",
|
||||
"tree-wetland-e",
|
||||
"tree-wetland-f",
|
||||
"tree-wetland-g",
|
||||
"tree-wetland-h",
|
||||
"tree-wetland-i",
|
||||
"tree-wetland-j",
|
||||
"tree-wetland-k",
|
||||
"tree-wetland-l",
|
||||
"tree-wetland-m",
|
||||
"tree-wetland-n",
|
||||
"tree-wetland-o",
|
||||
"tree-grassland-a",
|
||||
"tree-grassland-b",
|
||||
"tree-grassland-c",
|
||||
"tree-grassland-d",
|
||||
"tree-grassland-e",
|
||||
"tree-grassland-f",
|
||||
"tree-grassland-g",
|
||||
"tree-grassland-h",
|
||||
"tree-grassland-h2",
|
||||
"tree-grassland-h3",
|
||||
"tree-grassland-i",
|
||||
"tree-grassland-k",
|
||||
"tree-grassland-l",
|
||||
"tree-grassland-m",
|
||||
"tree-grassland-n",
|
||||
"tree-grassland-0",
|
||||
"tree-grassland-p",
|
||||
"tree-grassland-q",
|
||||
"tree-dryland-a",
|
||||
"tree-dryland-b",
|
||||
"tree-dryland-c",
|
||||
"tree-dryland-d",
|
||||
"tree-dryland-e",
|
||||
"tree-dryland-f",
|
||||
"tree-dryland-g",
|
||||
"tree-dryland-h",
|
||||
"tree-dryland-i",
|
||||
"tree-dryland-j",
|
||||
"tree-dryland-k",
|
||||
"tree-dryland-l",
|
||||
"tree-dryland-m",
|
||||
"tree-dryland-n",
|
||||
"tree-dryland-o",
|
||||
"tree-desert-a",
|
||||
"tree-desert-b",
|
||||
"tree-desert-c",
|
||||
"tree-desert-d",
|
||||
"tree-desert-e",
|
||||
"tree-desert-f",
|
||||
"tree-desert-g",
|
||||
"tree-desert-h",
|
||||
"tree-desert-i",
|
||||
"tree-desert-j",
|
||||
"tree-desert-k",
|
||||
"tree-desert-l",
|
||||
"tree-desert-m",
|
||||
"tree-desert-n",
|
||||
"tree-snow-a",
|
||||
"tree-volcanic-a"
|
||||
}
|
||||
|
||||
local function round(num, numDecimalPlaces)
|
||||
local mult = 10^(numDecimalPlaces or 0)
|
||||
return mathfloor(num * mult + 0.5) / mult
|
||||
end
|
||||
|
||||
local function cache_forces()
|
||||
for _, force in pairs(game.forces) do
|
||||
if #force.players > 0 then
|
||||
global.forces[#global.forces + 1] = force.name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function cache_surfaces()
|
||||
if game then
|
||||
global.surfaces = {}
|
||||
for s in string.gmatch(config.surfaces, '([^,;]+)') do
|
||||
local su = game.get_surface(s)
|
||||
if not su then
|
||||
if tonumber(s) then
|
||||
su = game.get_surface(tonumber(s))
|
||||
end
|
||||
end
|
||||
if su and su.valid then
|
||||
table.insert(global.surfaces, su.index)
|
||||
end
|
||||
end
|
||||
if (#global.surfaces < 1) then
|
||||
global.surfaces = {1}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function initialize()
|
||||
global.chunks = {}
|
||||
global.chunkindex = 0
|
||||
global.surfaces = {}
|
||||
global.last_surface = nil
|
||||
global.forces = {}
|
||||
global.tick = 0
|
||||
global.rng = game.create_random_generator()
|
||||
global.chunkcycles = 0
|
||||
global.spawnedcount = 0
|
||||
global.deadedcount = 0
|
||||
global.killedcount = 0
|
||||
global.degradedcount = 0
|
||||
global.resurrected = 0
|
||||
global.lastdebugmessage = 0
|
||||
global.lasttotalchunks = 0
|
||||
|
||||
cache_surfaces()
|
||||
|
||||
cache_forces()
|
||||
end
|
||||
|
||||
local function cache_settings()
|
||||
config.enabled = settings.global["Noxys_Trees-enabled"].value
|
||||
config.debug = settings.global["Noxys_Trees-debug"].value
|
||||
config.debug_interval = settings.global["Noxys_Trees-debug-interval"].value
|
||||
config.degrade_tiles = settings.global["Noxys_Trees-degrade-tiles"].value
|
||||
config.do_not_degrade_reinforced_tiles = settings.global["Noxys_Trees-do-not-degrade-reinforced-tiles"].value
|
||||
config.overpopulation_kills_trees = settings.global["Noxys_Trees-overpopulation-kills-trees"].value
|
||||
config.kill_trees_near_unwanted = settings.global["Noxys_Trees-kill-trees-near-unwanted"].value
|
||||
config.ticks_between_operations = settings.global["Noxys_Trees-ticks-between-operations"].value
|
||||
config.chunks_per_operation = settings.global["Noxys_Trees-chunks-per-operation"].value
|
||||
config.chunks_per_operation_enable_scaling = settings.global["Noxys_Trees-chunks-per-operation-enable-scaling"].value
|
||||
config.chunks_per_operation_scaling_bias = settings.global["Noxys_Trees-chunks-per-operation-scaling-bias"].value
|
||||
config.minimum_distance_between_tree = settings.global["Noxys_Trees-minimum-distance-between-tree"].value
|
||||
config.minimum_distance_to_enemies = settings.global["Noxys_Trees-minimum-distance-to-enemies"].value
|
||||
config.minimum_distance_to_uranium = settings.global["Noxys_Trees-minimum-distance-to-uranium"].value
|
||||
config.minimum_distance_to_player_entities = settings.global["Noxys_Trees-minimum-distance-to-player-entities"].value
|
||||
config.minimum_distance_to_degradetiles = settings.global["Noxys_Trees-minimum-distance-to-degradeable-tiles"].value
|
||||
config.deaths_by_lack_of_fertility_minimum = settings.global["Noxys_Trees-deaths-by-lack-of-fertility-minimum"].value
|
||||
config.deaths_by_pollution_bias = settings.global["Noxys_Trees-deaths-by-pollution-bias"].value
|
||||
config.trees_to_grow_per_chunk_percentage = settings.global["Noxys_Trees-trees-to-grow-per-chunk-percentage"].value
|
||||
config.maximum_trees_per_chunk = settings.global["Noxys_Trees-maximum-trees-per-chunk"].value
|
||||
config.expansion_distance = settings.global["Noxys_Trees-expansion-distance"].value
|
||||
config.surfaces = settings.global["Noxys_Trees-surfaces"].value
|
||||
config.trees_grow_on_landfill = settings.global["Noxys_Trees-trees-grow-on-landfill"].value
|
||||
|
||||
if config.trees_grow_on_landfill then
|
||||
noxy_trees.fertility["landfill"] = 0.5
|
||||
end
|
||||
|
||||
cache_surfaces()
|
||||
end
|
||||
|
||||
cache_settings()
|
||||
|
||||
local function nx_debug(message)
|
||||
if config.debug then
|
||||
game.print("NX Debug: " .. message)
|
||||
end
|
||||
end
|
||||
|
||||
local function get_trees_in_chunk(surface, chunk)
|
||||
return surface.find_entities_filtered{area = {{ chunk.x * 32, chunk.y * 32}, {chunk.x * 32 + 32, chunk.y * 32 + 32}}, type = "tree"}
|
||||
end
|
||||
|
||||
local function deadening_tree(surface, tree)
|
||||
if noxy_trees.dead[tree.name] and noxy_trees.dead[tree.name] == true then
|
||||
tree.die()
|
||||
global.killedcount = global.killedcount + 1
|
||||
return
|
||||
end
|
||||
|
||||
-- Remove tree if a player entity is near it instead of spawning a dead tree.
|
||||
local rp = config.minimum_distance_to_player_entities
|
||||
if rp > 0 then
|
||||
for _, force in pairs(game.forces) do
|
||||
if #force.players > 0 then
|
||||
if surface.count_entities_filtered{position = tree.position, radius = rp, force = force, limit = 1} > 0 then
|
||||
tree.die()
|
||||
global.deadedcount = global.deadedcount + 1
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if noxy_trees.dead[tree.name] then
|
||||
if noxy_trees.dead[tree.name] ~= true then
|
||||
surface.create_entity{name = noxy_trees.dead[tree.name], position = tree.position}
|
||||
tree.die()
|
||||
global.deadedcount = global.deadedcount + 1
|
||||
end
|
||||
else
|
||||
local deadtree = noxy_trees.deathselector[global.rng(1, #noxy_trees.deathselector)]
|
||||
surface.create_entity{name = deadtree, position = tree.position}
|
||||
tree.die()
|
||||
global.deadedcount = global.deadedcount + 1
|
||||
end
|
||||
end
|
||||
|
||||
local function spawn_trees(surface, parent, tilestoupdate, newpos)
|
||||
if noxy_trees.disabled[parent.name] then return end
|
||||
if not newpos then
|
||||
local distance = config.expansion_distance
|
||||
newpos = {
|
||||
parent.position.x + global.rng(distance * 2) - distance + (global.rng() - 0.5),
|
||||
parent.position.y + global.rng(distance * 2) - distance + (global.rng() - 0.5),
|
||||
}
|
||||
end
|
||||
local tile = surface.get_tile(newpos[1], newpos[2])
|
||||
if tile and tile.valid == true then
|
||||
-- Tile degradation
|
||||
local degrade_to = nil
|
||||
if config.degrade_tiles and noxy_trees.degradable[tile.name] then
|
||||
degrade_to = noxy_trees.degradable[tile.name]
|
||||
end
|
||||
if not config.do_not_degrade_reinforced_tiles and noxy_trees.reinforced_degradable[tile.name] then
|
||||
degrade_to = noxy_trees.reinforced_degradable[tile.name]
|
||||
end
|
||||
if degrade_to ~= nil then
|
||||
if degrade_to == true then
|
||||
if tile.hidden_tile then
|
||||
tilestoupdate[#tilestoupdate + 1] = {["name"] = tile.hidden_tile, ["position"] = tile.position}
|
||||
else
|
||||
nx_debug("ERROR: Can't degrade tile because no hidden_tile: " .. tile.name)
|
||||
end
|
||||
else
|
||||
if
|
||||
game.tile_prototypes[degrade_to]
|
||||
then
|
||||
tilestoupdate[#tilestoupdate + 1] = {["name"] = degrade_to, ["position"] = tile.position}
|
||||
else
|
||||
nx_debug("ERROR: Invalid tile?: " .. degrade_to .. " Tried to convert from: " .. tile.name)
|
||||
end
|
||||
end
|
||||
elseif -- Tree spreading
|
||||
(noxy_trees.fertility[tile.name] or 0) > 0 and
|
||||
not noxy_trees.dead[parent.name] and -- Stop dead trees from spreading.
|
||||
noxy_trees.fertility[tile.name] > global.rng() and
|
||||
surface.can_place_entity{name = parent.name, position = newpos}
|
||||
then
|
||||
local r = config.minimum_distance_between_tree / noxy_trees.fertility[tile.name]
|
||||
if surface.count_entities_filtered{position = newpos, radius = r, type = "tree", limit = 1} > 0 then
|
||||
return
|
||||
end
|
||||
local rp = config.minimum_distance_to_player_entities
|
||||
if rp > 0 then
|
||||
for _, force in pairs(game.forces) do
|
||||
if #force.players > 0 then
|
||||
if surface.count_entities_filtered{position = newpos, radius = rp, force = force, limit = 1} > 0 then
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
local er = config.minimum_distance_to_enemies
|
||||
if surface.count_entities_filtered{position = newpos, radius = er, type = "unit-spawner", force = "enemy", limit = 1} > 0 or
|
||||
surface.count_entities_filtered{position = newpos, radius = er, type = "turret", force = "enemy", limit = 1} > 0 then
|
||||
return
|
||||
end
|
||||
local ur = config.minimum_distance_to_uranium
|
||||
if surface.count_entities_filtered{position = newpos, radius = ur, type = "resource", name = "uranium-ore", limit = 1} > 0 then
|
||||
return
|
||||
end
|
||||
local tr = config.minimum_distance_to_degradetiles
|
||||
if tr > 0 then
|
||||
if surface.count_tiles_filtered{position = newpos, radius = tr, name = noxy_trees.tilefilter, limit = 1, has_hidden_tile = true} > 0 then
|
||||
return
|
||||
end
|
||||
end
|
||||
surface.create_entity{name = parent.name, position = newpos}
|
||||
global.spawnedcount = global.spawnedcount + 1
|
||||
elseif -- Tree resurrections
|
||||
(noxy_trees.fertility[tile.name] or 0) > 0 and
|
||||
noxy_trees.dead[parent.name] and
|
||||
noxy_trees.fertility[tile.name] > global.rng()
|
||||
then
|
||||
-- Only if polution is low enough we do a resurrect (which can also be seen as a mutation)
|
||||
if surface.get_pollution{parent.position.x, parent.position.y} / config.deaths_by_pollution_bias < 1 + global.rng() then
|
||||
-- We can skip the distance checks here since the parent tree already exists and we are just going to replace that one.
|
||||
local newname = noxy_trees.combined[global.rng(#noxy_trees.combined)]
|
||||
newpos = parent.position
|
||||
parent.destroy()
|
||||
surface.create_entity{name = newname, position = newpos}
|
||||
global.resurrected = global.resurrected + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function process_chunk(surface, chunk)
|
||||
if not chunk then return end
|
||||
local tilestoupdate = {}
|
||||
local trees = get_trees_in_chunk(surface, chunk)
|
||||
local trees_count = #trees
|
||||
if trees_count >= config.maximum_trees_per_chunk then
|
||||
if config.overpopulation_kills_trees then
|
||||
local tokill = 1 + (trees_count / config.maximum_trees_per_chunk)
|
||||
repeat
|
||||
local tree = trees[global.rng(1, trees_count)]
|
||||
if tree and tree.valid == true then
|
||||
deadening_tree(surface, tree)
|
||||
end
|
||||
tokill = tokill - 1
|
||||
until tokill < 1
|
||||
end
|
||||
elseif trees_count > 0 then
|
||||
-- Grow new trees
|
||||
local togen = 1 + mathceil(trees_count * config.trees_to_grow_per_chunk_percentage)
|
||||
repeat
|
||||
local parent = trees[global.rng(1, trees_count)]
|
||||
if parent.valid then
|
||||
spawn_trees(surface, parent, tilestoupdate)
|
||||
end
|
||||
togen = togen - 1
|
||||
until togen <= 0
|
||||
end
|
||||
if trees_count < 1 then return end
|
||||
-- Check random trees for things that would kill them nearby (enemies / uranium / players / fertility)
|
||||
if config.kill_trees_near_unwanted then
|
||||
local tokill = 1 + mathceil(trees_count * config.trees_to_grow_per_chunk_percentage)
|
||||
if config.deaths_by_pollution_bias > 0 then
|
||||
tokill = tokill + mathceil(surface.get_pollution{chunk.x * 32 + 16, chunk.y * 32 + 16} / config.deaths_by_pollution_bias)
|
||||
end
|
||||
repeat
|
||||
local treetocheck = trees[global.rng(1, trees_count)]
|
||||
if treetocheck and treetocheck.valid == true then
|
||||
local er = config.minimum_distance_to_enemies
|
||||
local ur = config.minimum_distance_to_uranium
|
||||
if surface.count_entities_filtered{position = treetocheck.position, radius = er, type = "unit-spawner", force = "enemy", limit = 1} > 0 or
|
||||
surface.count_entities_filtered{position = treetocheck.position, radius = er, type = "turret", force = "enemy", limit = 1} > 0 then
|
||||
deadening_tree(surface, treetocheck)
|
||||
elseif surface.count_entities_filtered{position = treetocheck.position, radius = ur, type = "resource", name = "uranium-ore", limit = 1} > 0 then
|
||||
deadening_tree(surface, treetocheck)
|
||||
else
|
||||
local rp = config.minimum_distance_to_player_entities
|
||||
if rp > 0 then
|
||||
for _, force in pairs(game.forces) do
|
||||
if #force.players > 0 then
|
||||
if surface.count_entities_filtered{position = treetocheck.position, radius = rp, force = force, limit = 1} > 0 then
|
||||
deadening_tree(surface, treetocheck)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if treetocheck and treetocheck.valid == true then
|
||||
local tile = surface.get_tile(treetocheck.position.x, treetocheck.position.y)
|
||||
if tile and tile.valid == true then
|
||||
local fertility = 0
|
||||
if noxy_trees.fertility[tile.name] then
|
||||
fertility = noxy_trees.fertility[tile.name]
|
||||
end
|
||||
if fertility < config.deaths_by_lack_of_fertility_minimum and fertility < global.rng() then
|
||||
if trees_count / config.maximum_trees_per_chunk > global.rng() then
|
||||
deadening_tree(surface, treetocheck)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if config.deaths_by_pollution_bias > 0 then
|
||||
if treetocheck and treetocheck.valid == true then
|
||||
if surface.get_pollution{treetocheck.position.x, treetocheck.position.y} / config.deaths_by_pollution_bias > 1 + global.rng() then
|
||||
deadening_tree(surface, treetocheck)
|
||||
end
|
||||
end
|
||||
end
|
||||
tokill = tokill - 1
|
||||
until tokill <= 0
|
||||
end
|
||||
if #tilestoupdate > 0 then
|
||||
surface.set_tiles(tilestoupdate)
|
||||
global.degradedcount = global.degradedcount + #tilestoupdate
|
||||
end
|
||||
end
|
||||
|
||||
script.on_configuration_changed(function()
|
||||
if global.noxy_trees then
|
||||
for k,v in pairs(global.noxy_trees) do
|
||||
global[k] = v
|
||||
end
|
||||
global.noxy_trees = nil
|
||||
end
|
||||
initialize()
|
||||
end)
|
||||
|
||||
script.on_init(function ()
|
||||
initialize()
|
||||
end)
|
||||
|
||||
script.on_event({defines.events.on_runtime_mod_setting_changed}, cache_settings)
|
||||
|
||||
script.on_event({defines.events.on_forces_merging, defines.events.on_player_changed_force}, cache_forces)
|
||||
|
||||
script.on_event({defines.events.on_tick}, function(event)
|
||||
local global = global
|
||||
if config.enabled then
|
||||
global.tick = global.tick - 1
|
||||
-- Check alive trees this should only run once
|
||||
if not noxy_trees.combined then
|
||||
noxy_trees.combined = {}
|
||||
for _, tree in pairs(noxy_trees.alive) do
|
||||
if game.entity_prototypes[tree] then
|
||||
noxy_trees.combined[#noxy_trees.combined + 1] = tree
|
||||
end
|
||||
end
|
||||
end
|
||||
-- Add disabled prototypes
|
||||
if next(noxy_trees.disabled_match) then
|
||||
for e,_ in pairs(game.entity_prototypes) do
|
||||
for k,_ in pairs(noxy_trees.disabled_match) do
|
||||
if e:find(k) then
|
||||
noxy_trees.disabled[e] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
-- Clear so we don't do this again.
|
||||
noxy_trees.disabled_match = {}
|
||||
end
|
||||
-- Debug
|
||||
if config.debug then
|
||||
if global.lastdebugmessage + config.debug_interval < event.tick then
|
||||
local timegap = (event.tick - global.lastdebugmessage) / 60
|
||||
if not global.chunkcycles then global.chunkcycles = 0 end
|
||||
nx_debug("Chunks: " .. global.chunkindex .. "/" .. #global.chunks .. "(" .. global.lasttotalchunks .. ")."
|
||||
.. " Grown: " .. global.spawnedcount .. " (" .. round(global.spawnedcount / timegap, 2) .. "/s)."
|
||||
.. " Deaded: " .. global.deadedcount .. " (" .. round(global.deadedcount / timegap, 2) .. "/s)."
|
||||
.. " Killed: " .. global.killedcount .. " (" .. round(global.killedcount / timegap, 2) .. "/s)."
|
||||
.. " Degrade: " .. global.degradedcount .. " (" .. round(global.degradedcount / timegap, 2) .. "/s)."
|
||||
.. " Rezzed: " .. global.resurrected .. " (" .. round(global.resurrected / timegap, 2) .. "/s)."
|
||||
.. " Chunk Cycle: " .. global.chunkcycles .. "."
|
||||
)
|
||||
global.lastdebugmessage = event.tick
|
||||
global.spawnedcount = 0
|
||||
global.deadedcount = 0
|
||||
global.killedcount = 0
|
||||
global.degradedcount = 0
|
||||
global.resurrected = 0
|
||||
end
|
||||
end
|
||||
if global.tick <= 0 or global.tick == nil then
|
||||
global.tick = config.ticks_between_operations
|
||||
-- Do the stuff
|
||||
local last_surface, surface_index = next(global.surfaces, global.last_surface)
|
||||
if surface_index then
|
||||
local surface = game.get_surface(surface_index)
|
||||
if surface and surface.valid then
|
||||
local chunksdone = 0
|
||||
local chunkstodo = config.chunks_per_operation
|
||||
if config.chunks_per_operation_enable_scaling then --todo: Add cap on number of chunks per operation; maybe change the scaling so that it increases how often it runs instead of how many chunks
|
||||
chunkstodo = mathfloor(chunkstodo * (global.lasttotalchunks / config.chunks_per_operation_scaling_bias))
|
||||
end
|
||||
if chunkstodo < 1 then chunkstodo = 1 end
|
||||
repeat
|
||||
if #global.chunks < 1 then
|
||||
-- populate our chunk array
|
||||
for chunk in surface.get_chunks() do
|
||||
global.chunks[#global.chunks + 1] = chunk
|
||||
end
|
||||
global.chunkcycles = global.chunkcycles + 1
|
||||
global.lasttotalchunks = #global.chunks
|
||||
end
|
||||
if #global.chunks < 1 then nx_debug("Bailing because no chunks!") break end
|
||||
-- Select a chunk
|
||||
global.chunkindex = global.chunkindex + 1
|
||||
if global.chunkindex > #global.chunks then
|
||||
global.chunkindex = 0
|
||||
global.chunks = {}
|
||||
break
|
||||
end
|
||||
process_chunk(surface, global.chunks[global.chunkindex])
|
||||
-- Done
|
||||
chunksdone = chunksdone + 1
|
||||
until chunksdone >= chunkstodo
|
||||
end
|
||||
end
|
||||
global.last_surface = last_surface
|
||||
end
|
||||
if global.tick > config.ticks_between_operations then
|
||||
global.tick = config.ticks_between_operations
|
||||
end
|
||||
end
|
||||
end)
|
@ -1,17 +0,0 @@
|
||||
if settings.startup["Noxys_Trees-tree_dying_factor"].value > 0.00001 then
|
||||
data.raw.fire["fire-flame-on-tree"].tree_dying_factor = settings.startup["Noxys_Trees-tree_dying_factor"].value
|
||||
end
|
||||
|
||||
local val = settings.startup["Noxys_Trees-tree_fire_spread_speed_factor"].value
|
||||
local f = data.raw.fire["fire-flame-on-tree"]
|
||||
f.spread_delay = f.spread_delay / val
|
||||
f.spread_delay_deviation = f.spread_delay_deviation / val
|
||||
|
||||
local mul = settings.startup["Noxys_Trees-emission_multiplier"].value
|
||||
if mul ~= 1 then
|
||||
for _,v in pairs(data.raw.tree) do
|
||||
if v.emissions_per_second then
|
||||
v.emissions_per_second = v.emissions_per_second * mul
|
||||
end
|
||||
end
|
||||
end
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
"name": "Noxys_Trees",
|
||||
"version": "0.4.6",
|
||||
"factorio_version": "1.1",
|
||||
"title": "Noxys Trees",
|
||||
"author": "Noxy",
|
||||
"contact": "not.a.valid.email.address@example.com",
|
||||
"homepage": "https://mods.factorio.com/user/_noxy_",
|
||||
"description": "Makes the trees spread slowly but also die off with certain condition. Made to be performant and multiplayer friendly. Very configurable.",
|
||||
"dependencies": [
|
||||
"base >= 1.1.0"
|
||||
]
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
[mod-setting-name]
|
||||
Noxys_Trees-tree_dying_factor=Tree dying factor from fire
|
||||
Noxys_Trees-emission_multiplier=Emmision multiplier
|
||||
Noxys_Trees-enabled=Enabled
|
||||
Noxys_Trees-debug=Debug mode
|
||||
Noxys_Trees-debug-interval=Debug Interval
|
||||
Noxys_Trees-degrade-tiles=Degrade tiles
|
||||
Noxys_Trees-overpopulation-kills-trees=Overpopulation kills trees
|
||||
Noxys_Trees-kill-trees-near-unwanted=Kill trees near unwanted
|
||||
Noxys_Trees-ticks-between-operations=Ticks between operations
|
||||
Noxys_Trees-chunks-per-operation=Chunks per operation
|
||||
Noxys_Trees-chunks-per-operation-enable-scaling=Enable chunks per operation scaling bias
|
||||
Noxys_Trees-chunks-per-operation-scaling-bias=Chunks per operation scaling bias
|
||||
Noxys_Trees-minimum-distance-between-tree=Minimum distance between trees
|
||||
Noxys_Trees-minimum-distance-to-enemies=Minimum distance to enemies
|
||||
Noxys_Trees-minimum-distance-to-uranium=Minimum distance to uranium ore
|
||||
Noxys_Trees-minimum-distance-to-player-entities=Minimum distance to player entities
|
||||
Noxys_Trees-minimum-distance-to-degradeable-tiles=Minimum distance to degradable tiles
|
||||
Noxys_Trees-deaths-by-lack-of-fertility-minimum=Tree deaths by lack of fertility minimum
|
||||
Noxys_Trees-deaths-by-pollution-bias=Tree deaths by pollution bias
|
||||
Noxys_Trees-trees-to-grow-per-chunk-percentage=Trees to grow per chunk percentage
|
||||
Noxys_Trees-maximum-trees-per-chunk=Maximum trees per chunk
|
||||
Noxys_Trees-expansion-distance=Expansion distance
|
||||
Noxys_Trees-surfaces=Surfaces
|
||||
|
||||
[mod-setting-description]
|
||||
Noxys_Trees-tree_dying_factor=Percentage of how many trees should be removed after they've been burnt by fire.\nVanilla default is 0.8 (80%).\n\nSet this to 0 to not alter this behavior.
|
||||
Noxys_Trees-emission_multiplier=A multiplier of how much pollution is consumes by trees.
|
||||
Noxys_Trees-enabled=When enabled trees will spread and die.
|
||||
Noxys_Trees-debug=Enables the output of debug messages.
|
||||
Noxys_Trees-debug-interval=The interval in ticks between debug messages.
|
||||
Noxys_Trees-degrade-tiles=Over time slowly degrades floor tiles that block tree growth until the trees can grow there again.
|
||||
Noxys_Trees-overpopulation-kills-trees=If a chunk is overpopulated it will slowly kill off trees at random in that chunk.
|
||||
Noxys_Trees-kill-trees-near-unwanted=Randomly kills trees that are near biter bases, uranium ore or player entities. This also affects the death of trees by lack of fertility or too much pollution.
|
||||
Noxys_Trees-ticks-between-operations=Allows fine grained control over the performance of this mod and the speed at which the trees expand.
|
||||
Noxys_Trees-chunks-per-operation=Allows fine grained control over the performance of this mod and the speed at which the trees expand.
|
||||
Noxys_Trees-chunks-per-operation-enable-scaling=Allows fine grained control over the performance of this mod and the speed at which the trees expand.\n\nWARNING: This option makes tree growth more consistent throughout a playthrough but will cost more performance the bigger the map becomes.\n\nTherefore this is a choice between consistent performance versus consistent tree spreading.
|
||||
Noxys_Trees-chunks-per-operation-scaling-bias=Allows fine grained control over the performance of this mod and the speed at which the trees expand.\n\nChunks per operation are multiplied with the total chunks divided by this value (if enabled) (this * (TotalChunks / ScalingBias)).
|
||||
Noxys_Trees-minimum-distance-between-tree=Minimum distance between trees for trees to be able to grow.
|
||||
Noxys_Trees-minimum-distance-to-enemies=Minimum distance to enemy bases or worms for trees to be able to grow.
|
||||
Noxys_Trees-minimum-distance-to-uranium=Minimum distance to uranium ore for trees to be able to grow.
|
||||
Noxys_Trees-minimum-distance-to-player-entities=Minimum distance to player entities for trees to be able to grow.\n\nSet this to 0 to skip this check and thus slightly increase performance.
|
||||
Noxys_Trees-minimum-distance-to-degradeable-tiles=Minimum distance to tiles that are considered to be degradabel (regardless of if tile degredation is enabled or not). Set to 0 to disable this check.\n\nWARNING: This option impacts performance more than any of the other "minimum distance" options and has a potential to cause periodic lag spikes especially if you use larger numbers.
|
||||
Noxys_Trees-deaths-by-lack-of-fertility-minimum=If the fertility of the ground is lower than this value the tree on top of it has a chance to die.
|
||||
Noxys_Trees-deaths-by-pollution-bias=How quickly trees die from pollution.\n\nSet this to 0 to disable deaths by pollution.\n\nAdditional trees attempted to be killed = math.ceil(pollution / this).
|
||||
Noxys_Trees-trees-to-grow-per-chunk-percentage=Allows fine grained control over the performance of this mod and the speed at which the trees expand.\n\nEach chunk will at least try to generate one tree but this percentage can increase it to more based on the existing trees in the chunk.\n\nIf the percentage is 0.01 (1%) and the chunk has 200 trees it will try to generate 2 additional trees per operation.
|
||||
Noxys_Trees-maximum-trees-per-chunk=If there are more trees than this number in a chunk it will not expand any trees in that chunk.\n(Vanilla dense forests seem to be around 512 trees per chunk)
|
||||
Noxys_Trees-expansion-distance=How far in tiles a tree can generate from its originating tree.
|
||||
Noxys_Trees-surfaces=A comma seperated list of all the surfaces the tree mod should be active on.\n\nBy default this is only '1' which is 'Nauvis'.
|
@ -1,48 +0,0 @@
|
||||
[mod-setting-name]
|
||||
Noxys_Trees-tree_dying_factor=Фактор гибели деревьев от огня
|
||||
Noxys_Trees-emission_multiplier=Множитель поглощения
|
||||
Noxys_Trees-enabled=Включено
|
||||
Noxys_Trees-debug=Режим отладки
|
||||
Noxys_Trees-debug-interval=Интервал отладки
|
||||
Noxys_Trees-degrade-tiles=Деградация плитки
|
||||
Noxys_Trees-overpopulation-kills-trees=Перенаселенность убивает деревья
|
||||
Noxys_Trees-kill-trees-near-unwanted=Случайная гибель деревьев
|
||||
Noxys_Trees-ticks-between-operations=Количество тиков между операциями
|
||||
Noxys_Trees-chunks-per-operation=Количество блоков в одной операции
|
||||
Noxys_Trees-chunks-per-operation-enable-scaling=Масштабирование блоков с увеличением открытой карты
|
||||
Noxys_Trees-chunks-per-operation-scaling-bias=Масштабирование в расчете на одну операцию
|
||||
Noxys_Trees-minimum-distance-between-tree=Минимальное расстояние между деревьями
|
||||
Noxys_Trees-minimum-distance-to-enemies=Минимальное расстояние от ульев кусак или червей
|
||||
Noxys_Trees-minimum-distance-to-uranium=Минимальное расстояние от урановой руды
|
||||
Noxys_Trees-minimum-distance-to-player-entities=Минимальное расстояние до объектов игрока
|
||||
Noxys_Trees-minimum-distance-to-degradeable-tiles=Минимальное расстояние до разлагаемых плиток
|
||||
Noxys_Trees-deaths-by-lack-of-fertility-minimum=Гибель деревьев из-за отсутствия минимального плодородия
|
||||
Noxys_Trees-deaths-by-pollution-bias=Гибель деревьев из-за загрязнения
|
||||
Noxys_Trees-trees-to-grow-per-chunk-percentage=Количество деревьев на блок в процентах
|
||||
Noxys_Trees-maximum-trees-per-chunk=Максимум деревьев в блоке
|
||||
Noxys_Trees-expansion-distance=Дистанция экспансии
|
||||
|
||||
[mod-setting-description]
|
||||
Noxys_Trees-tree_dying_factor=Процент того, сколько деревьев должно быть удалено после того, как они сгорели. Стандартно 0.8 (80%).\nУстановите ноль, что бы не изменять этот параметр.
|
||||
Noxys_Trees-emission_multiplier=Множитель поглощения загрязнения деревьями.
|
||||
Noxys_Trees-enabled=Позволяет деревьям умирать и распространятся.
|
||||
Noxys_Trees-debug=Включает вывод отладочных сообщений.
|
||||
Noxys_Trees-debug-interval=Интервал между отладочными сообщениями.
|
||||
Noxys_Trees-degrade-tiles=Со временем медленно разрушается плитка для пола, которая блокирует рост деревьев, пока деревья не смогут вырасти снова.
|
||||
Noxys_Trees-overpopulation-kills-trees=Если участок будет перенаселен, то деревья будут медленно погибать.
|
||||
Noxys_Trees-kill-trees-near-unwanted=Случайная гибель деревьев, которые находятся около ульев кусак, залежами урановой руды или объектами игрока. Это также влияет на смерть деревьев из-за отсутствия плодородия или чрезмерного загрязнения.
|
||||
Noxys_Trees-ticks-between-operations=Позволяет точно контролировать производительность этого мода и скорость, с которой количество деревьев увеличивается.
|
||||
Noxys_Trees-chunks-per-operation=Позволяет точно контролировать производительность этого мода и скорость, с которой количество деревьев увеличивается.
|
||||
Noxys_Trees-chunks-per-operation-enable-scaling=Позволяет точно контролировать производительность этого мода и скорость, с которой количество деревьев увеличивается.\nПРЕДУПРЕЖДЕНИЕ: этот параметр делает рост деревьев более последовательным на протяжении всей игры, но будет стоить больше производительности с увеличением карты.\nПоэтому это выбор между стабильной производительностью и постоянным распространением деревьев.
|
||||
Noxys_Trees-chunks-per-operation-scaling-bias=Позволяет точно контролировать производительность этого мода и скорость, с которой количество деревьев увеличивается.\nКоличество блоков на операцию умножается на общее количество блоков, деленное на это значение (если включено) (значение*(количество блоков/пересчет масштаба)).
|
||||
Noxys_Trees-minimum-distance-between-tree=Минимальное расстояние между деревьями, на котором могут расти деревья.
|
||||
Noxys_Trees-minimum-distance-to-enemies=Минимальное расстояние от ульев кусак или червей, на котором могут расти деревья.
|
||||
Noxys_Trees-minimum-distance-to-uranium=Минимальное расстояние от залежей урановой руды, на котором могут расти деревья.
|
||||
Noxys_Trees-minimum-distance-to-player-entities=Минимальное расстояние до объектов игрока, чтобы деревья могли расти.\nУстановите значение 0, чтобы пропустить эту проверку и, таким образом, немного повысить производительность.
|
||||
Noxys_Trees-minimum-distance-to-degradeable-tiles=Минимальное расстояние до плиток, считающихся деграбителем (независимо от того, включена ли градуировка плитки). Установите на 0, чтобы отключить эту проверку.\n\nПРЕДУПРЕЖДЕНИЕ: Этот параметр влияет на производительность больше, чем любой из других вариантов «минимального расстояния» и может вызвать периодические шипы лагов, особенно если вы используете большие числа.
|
||||
Noxys_Trees-deaths-by-lack-of-fertility-minimum=Если плодородие земли ниже этого значения, у дерева есть шанс погибнуть.
|
||||
Noxys_Trees-deaths-by-pollution-bias=Как быстро деревья погибают от загрязнения.\nУстановите это в 0, чтобы отключить смертельные случаи из-за загрязнения.\nПроцент смерти деревьев = math.ceil (загрязнение/значение).
|
||||
Noxys_Trees-trees-to-grow-per-chunk-percentage=Позволяет точно контролировать производительность этого мода и скорость, с которой количество деревьев увеличивается.\nКаждый блок, попытается сгенерировать одно дерево, но этот процент может увеличить его до большего на основе существующих деревьев в блоке.\nЕсли процент составляет 0,01 (1%), а блок имеет 200 деревьев, он попытается сгенерировать 2 дополнительных дерева за операцию.
|
||||
Noxys_Trees-maximum-trees-per-chunk=Если деревьев в блоке больше, чем заданное число, количество деревьев увеличиваться не будет. Стандартные густые леса, приблизительно 512 деревьев на блок.
|
||||
Noxys_Trees-expansion-distance=На каком расстоянии исходное дерево может сгенерировать дерево.
|
||||
|
@ -1,219 +0,0 @@
|
||||
data:extend({
|
||||
-- Startup
|
||||
{
|
||||
type = "double-setting",
|
||||
name = "Noxys_Trees-tree_dying_factor",
|
||||
setting_type = "startup",
|
||||
minimum_value = 0,
|
||||
default_value = 0.98,
|
||||
maximum_value = 1,
|
||||
order = "b",
|
||||
},
|
||||
{
|
||||
type = "double-setting",
|
||||
name = "Noxys_Trees-tree_fire_spread_speed_factor",
|
||||
setting_type = "startup",
|
||||
minimum_value = 0.0001,
|
||||
default_value = 1.0,
|
||||
maximum_value = 10.0,
|
||||
order = "b",
|
||||
},
|
||||
{
|
||||
type = "double-setting",
|
||||
name = "Noxys_Trees-emission_multiplier",
|
||||
setting_type = "startup",
|
||||
default_value = 1,
|
||||
order = "c",
|
||||
},
|
||||
-- Global
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "Noxys_Trees-enabled",
|
||||
setting_type = "runtime-global",
|
||||
default_value = true,
|
||||
order = "a-a"
|
||||
},
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "Noxys_Trees-debug",
|
||||
setting_type = "runtime-global",
|
||||
default_value = false,
|
||||
order = "a-b-a"
|
||||
},
|
||||
{
|
||||
type = "int-setting",
|
||||
name = "Noxys_Trees-debug-interval",
|
||||
setting_type = "runtime-global",
|
||||
minimum_value = 1,
|
||||
default_value = 300,
|
||||
maximum_value = 3600,
|
||||
order = "a-b-b",
|
||||
},
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "Noxys_Trees-degrade-tiles",
|
||||
setting_type = "runtime-global",
|
||||
default_value = true,
|
||||
order = "a-c-a"
|
||||
},
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "Noxys_Trees-do-not-degrade-reinforced-tiles",
|
||||
setting_type = "runtime-global",
|
||||
default_value = false,
|
||||
order = "a-c-a"
|
||||
},
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "Noxys_Trees-overpopulation-kills-trees",
|
||||
setting_type = "runtime-global",
|
||||
default_value = true,
|
||||
order = "a-c-b"
|
||||
},
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "Noxys_Trees-kill-trees-near-unwanted",
|
||||
setting_type = "runtime-global",
|
||||
default_value = true,
|
||||
order = "a-c-d"
|
||||
},
|
||||
{
|
||||
type = "int-setting",
|
||||
name = "Noxys_Trees-ticks-between-operations",
|
||||
setting_type = "runtime-global",
|
||||
minimum_value = 1,
|
||||
default_value = 60,
|
||||
maximum_value = 3600,
|
||||
order = "a-d",
|
||||
},
|
||||
{
|
||||
type = "int-setting",
|
||||
name = "Noxys_Trees-chunks-per-operation",
|
||||
setting_type = "runtime-global",
|
||||
minimum_value = 1,
|
||||
default_value = 1,
|
||||
maximum_value = 3600,
|
||||
order = "a-e",
|
||||
},
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "Noxys_Trees-chunks-per-operation-enable-scaling",
|
||||
setting_type = "runtime-global",
|
||||
default_value = true,
|
||||
order = "a-f-a"
|
||||
},
|
||||
{
|
||||
type = "int-setting",
|
||||
name = "Noxys_Trees-chunks-per-operation-scaling-bias",
|
||||
setting_type = "runtime-global",
|
||||
minimum_value = 1,
|
||||
default_value = 2000,
|
||||
maximum_value = 1000000,
|
||||
order = "a-f-b",
|
||||
},
|
||||
{
|
||||
type = "double-setting",
|
||||
name = "Noxys_Trees-minimum-distance-between-tree",
|
||||
setting_type = "runtime-global",
|
||||
minimum_value = 0.1,
|
||||
default_value = 0.8,
|
||||
maximum_value = 16,
|
||||
order = "a-h-a",
|
||||
},
|
||||
{
|
||||
type = "double-setting",
|
||||
name = "Noxys_Trees-minimum-distance-to-enemies",
|
||||
setting_type = "runtime-global",
|
||||
minimum_value = 0.5,
|
||||
default_value = 4.5,
|
||||
maximum_value = 16,
|
||||
order = "a-h-b",
|
||||
},
|
||||
{
|
||||
type = "double-setting",
|
||||
name = "Noxys_Trees-minimum-distance-to-uranium",
|
||||
setting_type = "runtime-global",
|
||||
minimum_value = 0.5,
|
||||
default_value = 8,
|
||||
maximum_value = 16,
|
||||
order = "a-h-c",
|
||||
},
|
||||
{
|
||||
type = "double-setting",
|
||||
name = "Noxys_Trees-minimum-distance-to-player-entities",
|
||||
setting_type = "runtime-global",
|
||||
minimum_value = 0,
|
||||
default_value = 2,
|
||||
maximum_value = 16,
|
||||
order = "a-h-d",
|
||||
},
|
||||
{
|
||||
type = "double-setting",
|
||||
name = "Noxys_Trees-minimum-distance-to-degradeable-tiles",
|
||||
setting_type = "runtime-global",
|
||||
minimum_value = 0,
|
||||
default_value = 0,
|
||||
maximum_value = 16,
|
||||
order = "a-h-e",
|
||||
},
|
||||
{
|
||||
type = "double-setting",
|
||||
name = "Noxys_Trees-deaths-by-lack-of-fertility-minimum",
|
||||
setting_type = "runtime-global",
|
||||
minimum_value = 0,
|
||||
default_value = 0.5,
|
||||
maximum_value = 1,
|
||||
order = "a-h-f",
|
||||
},
|
||||
{
|
||||
type = "int-setting",
|
||||
name = "Noxys_Trees-deaths-by-pollution-bias",
|
||||
setting_type = "runtime-global",
|
||||
minimum_value = 0,
|
||||
default_value = 7000,
|
||||
maximum_value = 100000,
|
||||
order = "a-h-g",
|
||||
},
|
||||
{
|
||||
type = "double-setting",
|
||||
name = "Noxys_Trees-trees-to-grow-per-chunk-percentage",
|
||||
setting_type = "runtime-global",
|
||||
minimum_value = 0.0001,
|
||||
default_value = 0.005,
|
||||
maximum_value = 0.1,
|
||||
order = "a-i",
|
||||
},
|
||||
{
|
||||
type = "int-setting",
|
||||
name = "Noxys_Trees-maximum-trees-per-chunk",
|
||||
setting_type = "runtime-global",
|
||||
minimum_value = 1,
|
||||
default_value = 512,
|
||||
maximum_value = 4096,
|
||||
order = "a-j",
|
||||
},
|
||||
{
|
||||
type = "int-setting",
|
||||
name = "Noxys_Trees-expansion-distance",
|
||||
setting_type = "runtime-global",
|
||||
minimum_value = 1,
|
||||
default_value = 12,
|
||||
maximum_value = 64,
|
||||
order = "a-k",
|
||||
},
|
||||
{
|
||||
type = "string-setting",
|
||||
name = "Noxys_Trees-surfaces",
|
||||
setting_type = "runtime-global",
|
||||
default_value = "1",
|
||||
order = "a-l",
|
||||
},
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "Noxys_Trees-trees-grow-on-landfill",
|
||||
setting_type = "runtime-global",
|
||||
default_value = false,
|
||||
order = "a-m",
|
||||
},
|
||||
-- Per user
|
||||
})
|
Binary file not shown.
Before Width: | Height: | Size: 5.9 KiB |
@ -7,7 +7,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-aluminium",
|
||||
order = "a",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING INTERMEDIATE
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-chrome",
|
||||
order = "a",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING INTERMEDIATE
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-cobalt",
|
||||
order = "a",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING INTERMEDIATE
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-gold",
|
||||
order = "a",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING INTERMEDIATE
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-lead",
|
||||
order = "a",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING INTERMEDIATE
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-manganese",
|
||||
order = "a",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING INTERMEDIATE
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-nickel",
|
||||
order = "a",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING INTERMEDIATE
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-platinum",
|
||||
order = "a",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING INTERMEDIATE
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-silicon",
|
||||
order = "a",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING INTERMEDIATE
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-silver",
|
||||
order = "a",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING INTERMEDIATE
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-stone",
|
||||
order = "b",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING RESULTS
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-tin",
|
||||
order = "a",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING INTERMEDIATE
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-titanium",
|
||||
order = "a",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING INTERMEDIATE
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-tungsten",
|
||||
order = "a",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING INTERMEDIATE
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ data:extend({
|
||||
icon_size = 32,
|
||||
subgroup = "angels-zinc",
|
||||
order = "a",
|
||||
stack_size = 200,
|
||||
stack_size = 2000,
|
||||
},
|
||||
-- SMELTING INTERMEDIATE
|
||||
{
|
||||
|
@ -113,7 +113,7 @@ end
|
||||
|
||||
data.raw.item["copper-ore"].stack_size = 200
|
||||
data.raw.item["iron-ore"].stack_size = 200
|
||||
data.raw.item["stone"].stack_size = 200
|
||||
data.raw.item["stone"].stack_size = 2000
|
||||
data.raw.item["coal"].stack_size = 200
|
||||
data.raw.item["uranium-ore"].stack_size = 200
|
||||
data.raw.item["sulfur"].stack_size = 200
|
||||
data.raw.item["uranium-ore"].stack_size = 2000
|
||||
data.raw.item["sulfur"].stack_size = 2000
|
||||
|
@ -313,11 +313,6 @@
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "DeleteEmptyChunks",
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "DewPointAggregator",
|
||||
"enabled": true
|
||||
@ -333,11 +328,6 @@
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "ElectricResistance",
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Enhanced_Map_Colors",
|
||||
"enabled": true
|
||||
@ -673,11 +663,6 @@
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Noxys_Trees",
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Oberhaul",
|
||||
"enabled": true
|
||||
|
BIN
mod-settings.dat
BIN
mod-settings.dat
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user