mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-02-09 13:37:02 +02:00
junkyard update
This commit is contained in:
parent
8fb7649919
commit
37adad634a
@ -18,14 +18,14 @@ end
|
||||
local function spawn_biter(surface, position, evolution_index)
|
||||
local biter_table = {
|
||||
[1] = {"small-biter"},
|
||||
[2] = {"small-biter","small-biter","small-biter","small-biter","small-biter","medium-biter"},
|
||||
[3] = {"small-biter","small-biter","small-biter","small-biter","medium-biter","medium-biter"},
|
||||
[2] = {"small-biter","small-biter","small-biter","small-biter","small-spitter","small-biter"},
|
||||
[3] = {"small-biter","small-biter","small-biter","small-biter","medium-biter","small-spitter"},
|
||||
[4] = {"small-biter","small-biter","small-biter","medium-biter","medium-biter","small-spitter"},
|
||||
[5] = {"small-biter","small-biter","medium-biter","medium-biter","medium-biter","small-spitter"},
|
||||
[6] = {"small-biter","small-biter","medium-biter","medium-biter","big-biter","small-spitter"},
|
||||
[7] = {"small-biter","small-biter","medium-biter","medium-biter","big-biter","medium-spitter"},
|
||||
[8] = {"small-biter","medium-biter","medium-biter","medium-biter","big-biter","medium-spitter"},
|
||||
[9] = {"small-biter","medium-biter","medium-biter","big-biter","big-biter","medium-spitter"},
|
||||
[5] = {"small-biter","small-biter","small-biter","medium-biter","medium-biter","medium-spitter"},
|
||||
[6] = {"small-biter","small-biter","medium-biter","medium-biter","medium-biter","medium-spitter"},
|
||||
[7] = {"small-biter","medium-biter","medium-biter","medium-biter","medium-biter","medium-spitter"},
|
||||
[8] = {"medium-biter","medium-biter","medium-biter","medium-biter","big-biter","medium-spitter"},
|
||||
[9] = {"medium-biter","medium-biter","medium-biter","big-biter","big-biter","medium-spitter"},
|
||||
[10] = {"medium-biter","medium-biter","medium-biter","big-biter","big-biter","big-spitter"},
|
||||
[11] = {"medium-biter","medium-biter","big-biter","big-biter","big-biter","big-spitter"},
|
||||
[12] = {"medium-biter","big-biter","big-biter","big-biter","big-biter","big-spitter"},
|
||||
|
@ -290,7 +290,7 @@ local function on_chunk_generated(event)
|
||||
|
||||
if global.spawn_generated then return end
|
||||
if left_top.x < 96 then return end
|
||||
map_functions.draw_rainbow_patch_v2({x = 0, y = 0}, surface, 14, 1500)
|
||||
map_functions.draw_rainbow_patch({x = 0, y = 0}, surface, 14, 1500)
|
||||
for _, wreck in pairs (surface.find_entities_filtered({area = {{-10, -10},{10, 10}}, name = "mineable-wreckage"})) do
|
||||
local distance_to_center = math.sqrt(wreck.position.x^2 + wreck.position.y^2)
|
||||
if distance_to_center < 8 then wreck.destroy() end
|
||||
@ -321,7 +321,7 @@ local function on_chunk_charted(event)
|
||||
local size = 5 + math.floor(distance_to_center * 0.0075)
|
||||
if size > 20 then size = 20 end
|
||||
local amount = 100 + distance_to_center
|
||||
map_functions.draw_rainbow_patch_v2(pos, surface, size, amount)
|
||||
map_functions.draw_rainbow_patch(pos, surface, size, amount)
|
||||
end
|
||||
|
||||
local function on_marked_for_deconstruction(event)
|
||||
|
@ -11,7 +11,8 @@ local mining_chance_weights = {
|
||||
{name = "steel-plate", chance = 200},
|
||||
{name = "solid-fuel", chance = 150},
|
||||
{name = "pipe", chance = 100},
|
||||
{name = "iron-stick", chance = 50},
|
||||
{name = "iron-stick", chance = 50},
|
||||
{name = "battery", chance = 20},
|
||||
{name = "empty-barrel", chance = 10},
|
||||
{name = "crude-oil-barrel", chance = 30},
|
||||
{name = "lubricant-barrel", chance = 20},
|
||||
@ -19,15 +20,14 @@ local mining_chance_weights = {
|
||||
{name = "sulfuric-acid-barrel", chance = 15},
|
||||
{name = "heavy-oil-barrel", chance = 15},
|
||||
{name = "light-oil-barrel", chance = 15},
|
||||
{name = "water-barrel", chance = 10},
|
||||
{name = "battery", chance = 10},
|
||||
{name = "water-barrel", chance = 10},
|
||||
{name = "green-wire", chance = 10},
|
||||
{name = "red-wire", chance = 10},
|
||||
{name = "explosives", chance = 5},
|
||||
{name = "explosives", chance = 8},
|
||||
{name = "advanced-circuit", chance = 5},
|
||||
{name = "nuclear-fuel", chance = 1},
|
||||
{name = "pipe-to-ground", chance = 5},
|
||||
{name = "plastic-bar", chance = 4},
|
||||
{name = "pipe-to-ground", chance = 10},
|
||||
{name = "plastic-bar", chance = 5},
|
||||
{name = "processing-unit", chance = 2},
|
||||
{name = "used-up-uranium-fuel-cell", chance = 1},
|
||||
{name = "uranium-fuel-cell", chance = 1},
|
||||
@ -35,19 +35,19 @@ local mining_chance_weights = {
|
||||
{name = "rocket-control-unit", chance = 1},
|
||||
{name = "low-density-structure", chance = 1},
|
||||
{name = "heat-pipe", chance = 1},
|
||||
{name = "engine-unit", chance = 3},
|
||||
{name = "engine-unit", chance = 4},
|
||||
{name = "electric-engine-unit", chance = 2},
|
||||
{name = "logistic-robot", chance = 1},
|
||||
{name = "construction-robot", chance = 1},
|
||||
|
||||
{name = "land-mine", chance = 10},
|
||||
{name = "grenade", chance = 10},
|
||||
{name = "rocket", chance = 5},
|
||||
{name = "explosive-rocket", chance = 5},
|
||||
{name = "rocket", chance = 3},
|
||||
{name = "explosive-rocket", chance = 3},
|
||||
{name = "cannon-shell", chance = 2},
|
||||
{name = "explosive-cannon-shell", chance = 2},
|
||||
{name = "uranium-cannon-shell", chance = 2},
|
||||
{name = "explosive-uranium-cannon-shell", chance = 2},
|
||||
{name = "uranium-cannon-shell", chance = 1},
|
||||
{name = "explosive-uranium-cannon-shell", chance = 1},
|
||||
{name = "artillery-shell", chance = 1},
|
||||
{name = "cluster-grenade", chance = 2},
|
||||
{name = "defender-capsule", chance = 5},
|
||||
@ -123,8 +123,9 @@ local function on_player_mined_entity(event)
|
||||
event.buffer.clear()
|
||||
|
||||
local scrap = scrap_raffle[math.random(1, #scrap_raffle)]
|
||||
local evolution_bonus = game.forces.enemy.evolution_factor
|
||||
|
||||
local amount = math.random(math.ceil(scrap_yield_amounts[scrap] * 0.3), math.ceil(scrap_yield_amounts[scrap] * 1.7))
|
||||
local amount = math.random(math.ceil(scrap_yield_amounts[scrap] * (0.3 + evolution_bonus)), math.ceil(scrap_yield_amounts[scrap] * (1.7 + evolution_bonus)))
|
||||
|
||||
local player = game.players[event.player_index]
|
||||
local inserted_count = player.insert({name = scrap, count = amount})
|
||||
|
Loading…
x
Reference in New Issue
Block a user