mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2024-12-26 22:56:43 +02:00
tweaks
This commit is contained in:
parent
97d009ac71
commit
e90ddec69f
@ -265,8 +265,37 @@ Public.mining_events = {
|
|||||||
end, 300000, "Nothing"},
|
end, 300000, "Nothing"},
|
||||||
|
|
||||||
{function(cave_miner, entity, player_index)
|
{function(cave_miner, entity, player_index)
|
||||||
Public.rock_spawns_biters(cave_miner, entity.position)
|
local amount = Public.roll_biter_amount()
|
||||||
end, 20000, "Biters"},
|
local position = entity.position
|
||||||
|
local surface = entity.surface
|
||||||
|
local difficulty_modifier = Public.get_difficulty_modifier(position)
|
||||||
|
local tick = game.tick
|
||||||
|
for c = 1, amount, 1 do
|
||||||
|
Esq.add_to_queue(tick + c * 25, surface, {name = BiterRaffle.roll("mixed", difficulty_modifier), position = position, force = "enemy"}, 8)
|
||||||
|
end
|
||||||
|
end, 20000, "Mixed_Biters"},
|
||||||
|
|
||||||
|
{function(cave_miner, entity, player_index)
|
||||||
|
local amount = Public.roll_biter_amount()
|
||||||
|
local position = entity.position
|
||||||
|
local surface = entity.surface
|
||||||
|
local difficulty_modifier = Public.get_difficulty_modifier(position)
|
||||||
|
local tick = game.tick
|
||||||
|
for c = 1, amount, 1 do
|
||||||
|
Esq.add_to_queue(tick + c * 25, surface, {name = BiterRaffle.roll("biter", difficulty_modifier), position = position, force = "enemy"}, 8)
|
||||||
|
end
|
||||||
|
end, 2048, "Biters"},
|
||||||
|
|
||||||
|
{function(cave_miner, entity, player_index)
|
||||||
|
local amount = Public.roll_biter_amount()
|
||||||
|
local position = entity.position
|
||||||
|
local surface = entity.surface
|
||||||
|
local difficulty_modifier = Public.get_difficulty_modifier(position)
|
||||||
|
local tick = game.tick
|
||||||
|
for c = 1, amount, 1 do
|
||||||
|
Esq.add_to_queue(tick + c * 25, surface, {name = BiterRaffle.roll("spitter", difficulty_modifier), position = position, force = "enemy"}, 8)
|
||||||
|
end
|
||||||
|
end, 2048, "Spitters"},
|
||||||
|
|
||||||
{function(cave_miner, entity, player_index)
|
{function(cave_miner, entity, player_index)
|
||||||
local position = entity.position
|
local position = entity.position
|
||||||
|
@ -119,7 +119,8 @@ function Public.offer_bought(event, cave_miner)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Public.spawn_random_cave_market(surface, position)
|
function Public.spawn_random_cave_market(surface, position)
|
||||||
if surface.count_entities_filtered({name = "market", area = {{position.x - 32, position.y - 32}, {position.x + 32, position.y + 32}}}) > 0 then return end
|
local r = 48
|
||||||
|
if surface.count_entities_filtered({name = "market", area = {{position.x - r, position.y - r}, {position.x + r, position.y + r}}}) > 0 then return end
|
||||||
|
|
||||||
local difficulty_modifier = Functions.get_difficulty_modifier(position)
|
local difficulty_modifier = Functions.get_difficulty_modifier(position)
|
||||||
local market = surface.create_entity({name = "market", position = position, force = "player"})
|
local market = surface.create_entity({name = "market", position = position, force = "player"})
|
||||||
|
Loading…
Reference in New Issue
Block a user