mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-20 03:29:47 +02:00
updates
This commit is contained in:
parent
56cea737cd
commit
a8eeb2fc82
@ -131,11 +131,24 @@ local function on_player_used_capsule(event)
|
||||
end
|
||||
end
|
||||
|
||||
local blacklisted_types = {
|
||||
["transport-belt"] = true,
|
||||
["wall"] = true,
|
||||
["underground-belt"] = true,
|
||||
["inserter"] = true,
|
||||
["land-mine"] = true,
|
||||
["gate"] = true,
|
||||
["lamp"] = true,
|
||||
["mining-drill"] = true,
|
||||
["splitter"] = true
|
||||
}
|
||||
|
||||
--Friendly Fire History
|
||||
local function on_entity_died(event)
|
||||
if not event.cause then return end
|
||||
if event.cause.name ~= "player" then return end
|
||||
if event.cause.force.name ~= event.entity.force.name then return end
|
||||
if blacklisted_types[event.entity.type] then return end
|
||||
local player = event.cause.player
|
||||
if not global.friendly_fire_history then global.friendly_fire_history = {} end
|
||||
if #global.friendly_fire_history > 999 then global.friendly_fire_history = {} end
|
||||
@ -151,10 +164,6 @@ local function on_entity_died(event)
|
||||
end
|
||||
|
||||
--Mining Thieves History
|
||||
local blacklisted_types = {
|
||||
["transport-belt"] = true,
|
||||
["inserter"] = true
|
||||
}
|
||||
local function on_player_mined_entity(event)
|
||||
if not event.entity.last_user then return end
|
||||
local player = game.players[event.player_index]
|
||||
|
@ -417,7 +417,7 @@ local function refresh_market_offers()
|
||||
{price = {{"coin", 125}}, offer = {type = 'give-item', item = 'heavy-armor', count = 1}},
|
||||
{price = {{"coin", 350}}, offer = {type = 'give-item', item = 'modular-armor', count = 1}},
|
||||
{price = {{"coin", 1500}}, offer = {type = 'give-item', item = 'power-armor', count = 1}},
|
||||
{price = {{"coin", 12000}}, offer = {type = 'give-item', item = 'power-armor-mk2', count = 1}},
|
||||
{price = {{"coin", 10000}}, offer = {type = 'give-item', item = 'power-armor-mk2', count = 1}},
|
||||
{price = {{"coin", 50}}, offer = {type = 'give-item', item = 'solar-panel-equipment', count = 1}},
|
||||
{price = {{"coin", 2250}}, offer = {type = 'give-item', item = 'fusion-reactor-equipment', count = 1}},
|
||||
{price = {{"coin", 100}}, offer = {type = 'give-item', item = 'battery-equipment', count = 1}},
|
||||
@ -552,7 +552,7 @@ local function damage_entities_in_radius(position, radius, damage)
|
||||
if radius > 5 then radius = 5 end
|
||||
local entities_to_damage = game.surfaces["fish_defender"].find_entities_filtered({area = {{position.x - radius, position.y - radius},{position.x + radius, position.y + radius}}})
|
||||
for _, entity in pairs(entities_to_damage) do
|
||||
if entity.health then
|
||||
if entity.health and entity.name ~= "land-mine" then
|
||||
if entity.force.name ~= "enemy" then
|
||||
if entity.name == "player" then
|
||||
entity.damage(damage, "enemy")
|
||||
@ -764,7 +764,7 @@ local function on_player_joined_game(event)
|
||||
["laser-turret"] = {placed = 0, limit = 1, str = "laser turret", slot_price = 250},
|
||||
["artillery-turret"] = {placed = 0, limit = 1, str = "artillery turret", slot_price = 500},
|
||||
["flamethrower-turret"] = {placed = 0, limit = 0, str = "flamethrower turret", slot_price = 50000},
|
||||
["land-mine"] = {placed = 0, limit = 1, str = "landmine", slot_price = 2}
|
||||
["land-mine"] = {placed = 0, limit = 1, str = "landmine", slot_price = 1}
|
||||
}
|
||||
|
||||
global.wave_grace_period = wave_interval * 21
|
||||
|
@ -182,13 +182,14 @@ local function uncover_map(surface, position, radius_min, radius_max)
|
||||
if surface.get_tile(pos).name == "out-of-map" then
|
||||
local tile_name = get_noise_tile(pos)
|
||||
insert(tiles, {name = tile_name, position = pos})
|
||||
if tile_name == "water" or tile_name == "deepwater" then
|
||||
if math_random(1, 8) == 1 then insert(fishes, pos) end
|
||||
end
|
||||
local entity = get_entity(pos)
|
||||
if entity then
|
||||
surface.create_entity({name = entity, position = pos})
|
||||
end
|
||||
if tile_name == "water" or tile_name == "deepwater" or tile_name == "water-green" then
|
||||
if math_random(1, 9) == 1 then insert(fishes, pos) end
|
||||
else
|
||||
local entity = get_entity(pos)
|
||||
if entity then
|
||||
surface.create_entity({name = entity, position = pos})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -214,17 +215,17 @@ local function uncover_map_for_player(player)
|
||||
if surface.get_tile(pos).name == "out-of-map" then
|
||||
local tile_name = get_noise_tile(pos)
|
||||
insert(tiles, {name = tile_name, position = pos})
|
||||
if tile_name == "water" or tile_name == "deepwater" then
|
||||
if math_random(1, 8) == 1 then insert(fishes, pos) end
|
||||
end
|
||||
|
||||
local entity = get_entity(pos)
|
||||
if entity then
|
||||
surface.create_entity({name = entity, position = pos})
|
||||
if entity == "biter-spawner" or entity == "spitter-spawner" then
|
||||
insert(uncover_map_schedule, {x = pos.x, y = pos.y})
|
||||
if tile_name == "water" or tile_name == "deepwater" or tile_name == "water-green" then
|
||||
if math_random(1, 9) == 1 then insert(fishes, pos) end
|
||||
else
|
||||
local entity = get_entity(pos)
|
||||
if entity then
|
||||
surface.create_entity({name = entity, position = pos})
|
||||
if entity == "biter-spawner" or entity == "spitter-spawner" then
|
||||
insert(uncover_map_schedule, {x = pos.x, y = pos.y})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -285,16 +286,16 @@ local function on_entity_died(event)
|
||||
if p then surface.create_entity {name=t[1], position=p} end
|
||||
end
|
||||
end
|
||||
|
||||
local name = ore_spawn_raffle[math.random(1,#ore_spawn_raffle)]
|
||||
local pos = {x = event.entity.position.x, y = event.entity.position.y}
|
||||
local amount_modifier = 1 + game.forces.enemy.evolution_factor * 10
|
||||
if name == "crude-oil" then
|
||||
map_functions.draw_oil_circle(pos, name, surface, 5, math.ceil(100000 * amount_modifier))
|
||||
else
|
||||
map_functions.draw_smoothed_out_ore_circle(pos, name, surface, 7, math.ceil(600 * amount_modifier))
|
||||
if math_random(1, 4) == 1 then
|
||||
local name = ore_spawn_raffle[math.random(1,#ore_spawn_raffle)]
|
||||
local pos = {x = event.entity.position.x, y = event.entity.position.y}
|
||||
local amount_modifier = 1 + game.forces.enemy.evolution_factor * 10
|
||||
if name == "crude-oil" then
|
||||
map_functions.draw_oil_circle(pos, name, surface, 5, math.ceil(100000 * amount_modifier))
|
||||
else
|
||||
map_functions.draw_smoothed_out_ore_circle(pos, name, surface, 7, math.ceil(600 * amount_modifier))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if entity_drop_amount[event.entity.name] then
|
||||
@ -338,7 +339,7 @@ local function on_player_joined_game(event)
|
||||
game.forces["player"].set_spawn_position({0, 0}, surface)
|
||||
|
||||
game.map_settings.enemy_expansion.enabled = true
|
||||
game.map_settings.enemy_evolution.destroy_factor = 0.0035
|
||||
game.map_settings.enemy_evolution.destroy_factor = 0.0012
|
||||
game.map_settings.enemy_evolution.time_factor = 0
|
||||
game.map_settings.enemy_evolution.pollution_factor = 0
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
0.05
|
||||
map reveal fixes
|
||||
reduced evolution
|
||||
|
||||
0.04
|
||||
disabled flamethrower turret
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user