mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-02-07 13:31:40 +02:00
0.17 things
This commit is contained in:
parent
dc41efb24e
commit
9181b2ff32
@ -41,12 +41,12 @@ require "on_tick_schedule"
|
||||
---- enable maps here ----
|
||||
--require "maps.biter_battles"
|
||||
--require "maps.cave_miner"
|
||||
--require "maps.labyrinth"
|
||||
require "maps.labyrinth"
|
||||
--require "maps.junkyard"
|
||||
--require "maps.spooky_forest"
|
||||
--require "maps.nightfall"
|
||||
--require "maps.atoll"
|
||||
require "maps.choppy"
|
||||
--require "maps.choppy"
|
||||
--require "maps.tank_battles"
|
||||
--require "maps.spiral_troopers"
|
||||
--require "maps.fish_defender"
|
||||
|
@ -3,14 +3,14 @@
|
||||
local tick_tacks = {"*tick*", "*tick*", "*tack*", "*tak*", "*tik*", "*tok*"}
|
||||
|
||||
local kaboom_weights = {
|
||||
{name = "grenade", chance = 6},
|
||||
{name = "grenade", chance = 7},
|
||||
{name = "cluster-grenade", chance = 1},
|
||||
{name = "destroyer-capsule", chance = 1},
|
||||
{name = "defender-capsule", chance = 4},
|
||||
{name = "distractor-capsule", chance = 3},
|
||||
{name = "poison-capsule", chance = 3},
|
||||
{name = "explosive-uranium-cannon-projectile", chance = 2},
|
||||
{name = "explosive-cannon-projectile", chance = 4},
|
||||
{name = "poison-capsule", chance = 2},
|
||||
{name = "explosive-uranium-cannon-projectile", chance = 3},
|
||||
{name = "explosive-cannon-projectile", chance = 5},
|
||||
}
|
||||
|
||||
local kabooms = {}
|
||||
@ -33,6 +33,7 @@ end
|
||||
|
||||
local function create_kaboom(surface, position, name)
|
||||
local target = position
|
||||
local speed = 0.5
|
||||
if name == "defender-capsule" or name == "destroyer-capsule" or name == "distractor-capsule" then
|
||||
surface.create_entity({
|
||||
name = "flying-text",
|
||||
@ -41,14 +42,15 @@ local function create_kaboom(surface, position, name)
|
||||
color = {r=0.8, g=0.0, b=0.0}
|
||||
})
|
||||
local nearest_player_unit = surface.find_nearest_enemy({position = position, max_distance=128, force="enemy"})
|
||||
if nearest_player_unit then target = nearest_player_unit.position end
|
||||
if nearest_player_unit then target = nearest_player_unit.position end
|
||||
speed = 0.001
|
||||
end
|
||||
surface.create_entity({
|
||||
name = name,
|
||||
position = position,
|
||||
force = "enemy",
|
||||
target = target,
|
||||
speed = 0.001
|
||||
speed = speed
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -1332,9 +1332,10 @@ local function on_player_respawned(event)
|
||||
end
|
||||
|
||||
local function on_research_finished(event)
|
||||
game.forces.player.manual_mining_speed_modifier = game.forces.player.mining_drill_productivity_bonus * 4
|
||||
game.forces.player.character_inventory_slots_bonus = game.forces.player.mining_drill_productivity_bonus * 500
|
||||
event.research.force.character_inventory_slots_bonus = game.forces.player.mining_drill_productivity_bonus * 500
|
||||
refresh_gui()
|
||||
if not event.research.force.technologies["steel-axe"].researched then return end
|
||||
event.research.force.manual_mining_speed_modifier = 1 + game.forces.player.mining_drill_productivity_bonus * 4
|
||||
end
|
||||
|
||||
local function on_gui_click(event)
|
||||
|
@ -197,9 +197,9 @@ local function get_amount(entity)
|
||||
end
|
||||
|
||||
local function trap(entity)
|
||||
if math_random(1,256) == 1 then tick_tack_trap(entity.surface, entity.position) return end
|
||||
if math_random(1,512) == 1 then tick_tack_trap(entity.surface, entity.position) return end
|
||||
if math_random(1,128) == 1 then unearthing_worm(entity.surface, entity.position) return end
|
||||
if math_random(1,64) == 1 then unearthing_biters(entity.surface, entity.position, math_random(4,16)) return end
|
||||
if math_random(1,64) == 1 then unearthing_biters(entity.surface, entity.position, math_random(4,12)) return end
|
||||
end
|
||||
|
||||
local function on_player_mined_entity(event)
|
||||
@ -239,9 +239,9 @@ local function on_player_mined_entity(event)
|
||||
end
|
||||
|
||||
local function on_research_finished(event)
|
||||
event.research.force.character_inventory_slots_bonus = game.forces.player.mining_drill_productivity_bonus * 300
|
||||
event.research.force.character_inventory_slots_bonus = game.forces.player.mining_drill_productivity_bonus * 500
|
||||
if not event.research.force.technologies["steel-axe"].researched then return end
|
||||
event.research.force.manual_mining_speed_modifier = 1 + game.forces.player.mining_drill_productivity_bonus * 3
|
||||
event.research.force.manual_mining_speed_modifier = 1 + game.forces.player.mining_drill_productivity_bonus * 2
|
||||
end
|
||||
|
||||
local function on_entity_died(event)
|
||||
|
@ -991,8 +991,8 @@ local function on_player_joined_game(event)
|
||||
--game.forces.player.set_turret_attack_modifier("flamethrower-turret", -0.5)
|
||||
|
||||
global.entity_limits = {
|
||||
["gun-turret"] = {placed = 1, limit = 1, str = "gun turret", slot_price = 100},
|
||||
["laser-turret"] = {placed = 0, limit = 1, str = "laser turret", slot_price = 350},
|
||||
["gun-turret"] = {placed = 1, limit = 1, str = "gun turret", slot_price = 75},
|
||||
["laser-turret"] = {placed = 0, limit = 1, str = "laser turret", slot_price = 300},
|
||||
["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 = "mine", slot_price = 1}
|
||||
|
@ -422,12 +422,8 @@ local function grow_cell(chunk_position, surface)
|
||||
if v.autoplace_specification then
|
||||
decorative_names[#decorative_names+1] = k
|
||||
end
|
||||
end
|
||||
for _, surface in pairs(game.surfaces) do
|
||||
for chunk in surface.get_chunks() do
|
||||
surface.regenerate_decorative(decorative_names, {chunk_position})
|
||||
end
|
||||
end
|
||||
end
|
||||
surface.regenerate_decorative(decorative_names, {chunk_position})
|
||||
|
||||
if unique_room == "railway_roundabout" then
|
||||
local e = surface.create_entity {name="big-ship-wreck-1", position={left_top_x + 16, left_top_y + 22}, force = "player"}
|
||||
@ -678,14 +674,13 @@ local function spawn_infinity_chest(pos, surface)
|
||||
{"stone", math_random(3,5)},
|
||||
{"stone", math_random(3,5)},
|
||||
{"stone", math_random(3,5)},
|
||||
{"stone", math_random(3,5)},
|
||||
{"stone", math_random(3,5)},
|
||||
{"iron-ore", 1},
|
||||
{"copper-ore", 1},
|
||||
}
|
||||
local x = math_random(1, #infinity_chests)
|
||||
local e = surface.create_entity {name = "infinity-chest", position = pos, force = "player"}
|
||||
e.set_infinity_filter(1, {name = infinity_chests[x][1], count = infinity_chests[x][2]})
|
||||
e.set_infinity_container_filter(1, {name = infinity_chests[x][1], count = infinity_chests[x][2]})
|
||||
e.minable = false
|
||||
e.destructible = false
|
||||
e.operable = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user