Update to 2.0
This commit is contained in:
parent
b5beff4ea4
commit
038e666ae8
39 changed files with 208 additions and 530 deletions
|
|
@ -1,8 +1,12 @@
|
|||
local resource_autoplace = require('resource-autoplace');
|
||||
local noise = require('noise');
|
||||
|
||||
local item_sounds = require('__base__.prototypes.item_sounds')
|
||||
local util = require("__bztungsten__.data-util");
|
||||
|
||||
data.raw.planet.nauvis.map_gen_settings.autoplace_controls["tungsten-ore"] = {}
|
||||
data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["tungsten-ore"] = {}
|
||||
resource_autoplace.initialize_patch_set("tungsten-ore", true)
|
||||
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "autoplace-control",
|
||||
|
|
@ -12,10 +16,6 @@ data:extend({
|
|||
order = "b-e"
|
||||
},
|
||||
{
|
||||
type = "noise-layer",
|
||||
name = "tungsten-ore"
|
||||
},
|
||||
{
|
||||
type = "resource",
|
||||
icon_size = 64, icon_mipmaps = 3,
|
||||
name = "tungsten-ore",
|
||||
|
|
@ -53,43 +53,35 @@ data:extend({
|
|||
{
|
||||
filename = "__bztungsten__/graphics/entity/ores/tungsten-ore.png",
|
||||
priority = "extra-high",
|
||||
size = 64,
|
||||
size = 128,
|
||||
frame_count = 8,
|
||||
variation_count = 8,
|
||||
hr_version =
|
||||
{
|
||||
filename = "__bztungsten__/graphics/entity/ores/hr-tungsten-ore.png",
|
||||
priority = "extra-high",
|
||||
size = 128,
|
||||
frame_count = 8,
|
||||
variation_count = 8,
|
||||
scale = 0.5
|
||||
}
|
||||
scale = 0.5,
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
type = "item",
|
||||
name = "tungsten-ore",
|
||||
icon_size = 64, icon_mipmaps = 3,
|
||||
icon = "__bztungsten__/graphics/icons/tungsten-ore.png",
|
||||
pictures = {
|
||||
{filename="__bztungsten__/graphics/icons/tungsten-ore.png", size=64, scale=0.25},
|
||||
{filename="__bztungsten__/graphics/icons/tungsten-ore-2.png", size=64, scale=0.25},
|
||||
{filename="__bztungsten__/graphics/icons/tungsten-ore-3.png", size=64, scale=0.25},
|
||||
{filename="__bztungsten__/graphics/icons/tungsten-ore-4.png", size=64, scale=0.25},
|
||||
},
|
||||
subgroup = "raw-resource",
|
||||
order = "t-c-a",
|
||||
stack_size = util.get_stack_size(50)
|
||||
type = "item",
|
||||
name = "tungsten-ore",
|
||||
icon_size = 64, icon_mipmaps = 3,
|
||||
icon = "__bztungsten__/graphics/icons/tungsten-ore.png",
|
||||
pictures = {
|
||||
{filename="__bztungsten__/graphics/icons/tungsten-ore.png", size=64, scale=0.5},
|
||||
{filename="__bztungsten__/graphics/icons/tungsten-ore-2.png", size=64, scale=0.5},
|
||||
{filename="__bztungsten__/graphics/icons/tungsten-ore-3.png", size=64, scale=0.5},
|
||||
{filename="__bztungsten__/graphics/icons/tungsten-ore-4.png", size=64, scale=0.5},
|
||||
},
|
||||
subgroup = "raw-resource",
|
||||
order = "t-c-a",
|
||||
stack_size = 50,
|
||||
weight = 20 * kg,
|
||||
inventory_move_sound = item_sounds.resource_inventory_move,
|
||||
pick_sound = item_sounds.resource_inventory_pickup,
|
||||
drop_sound = item_sounds.resource_inventory_move
|
||||
},
|
||||
})
|
||||
|
||||
-- Wolframite becomes 20% richer past 1000 tiles, 60% richer past 10000 tiles. Very close to start, it's 25% richness
|
||||
local richness = data.raw.resource["tungsten-ore"].autoplace.richness_expression
|
||||
data.raw.resource["tungsten-ore"].autoplace.richness_expression =
|
||||
richness * noise.if_else_chain(
|
||||
noise.less_than(noise.distance_from(noise.var("x"), noise.var("y"), noise.var("starting_positions")), noise.to_noise_expression(100)), 0.25,
|
||||
noise.less_than(noise.distance_from(noise.var("x"), noise.var("y"), noise.var("starting_positions")), noise.to_noise_expression(1000)), 1,
|
||||
noise.less_than(noise.distance_from(noise.var("x"), noise.var("y"), noise.var("starting_positions")), noise.to_noise_expression(10000)), 1.2,
|
||||
1.6)
|
||||
data.raw.resource["tungsten-ore"].autoplace.richness_expression = richness ..
|
||||
"* if(distance_from_nearest_point(x, y, starting_positions) < 100, 0.25, if(distance_from_nearest_point(x, y, starting_positions) < 1000, 1, if(distance_from_nearest_point(x, y, starting_positions) < 100, 1.2, 1.6)))"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue