You've already forked ComfyFactorio
mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-11-06 08:56:27 +02:00
Caver Miner Update
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
0.18
|
||||||
|
cargo wagons, tanks and cars can now only detonate with less than 150 health
|
||||||
|
|
||||||
0.17
|
0.17
|
||||||
explosives are now a new game mechanic
|
explosives are now a new game mechanic
|
||||||
loot rebalances
|
loot rebalances
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ end
|
|||||||
|
|
||||||
local function create_explosion_schedule(entity)
|
local function create_explosion_schedule(entity)
|
||||||
local inventory = defines.inventory.chest
|
local inventory = defines.inventory.chest
|
||||||
if entity.name == "car" then inventory = defines.inventory.car_trunk end
|
if entity.type == "car" then inventory = defines.inventory.car_trunk end
|
||||||
local i = entity.get_inventory(inventory)
|
local i = entity.get_inventory(inventory)
|
||||||
local explosives_amount = i.get_item_count("explosives")
|
local explosives_amount = i.get_item_count("explosives")
|
||||||
if explosives_amount < 1 then return end
|
if explosives_amount < 1 then return end
|
||||||
@@ -113,9 +113,14 @@ local function create_explosion_schedule(entity)
|
|||||||
entity.die("player")
|
entity.die("player")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_entity_damaged(event)
|
local function on_entity_damaged(event)
|
||||||
if event.entity.type == "container" or event.entity.type == "logistic-container" or event.entity.type == "cargo-wagon" or event.entity.name == "car" then
|
local entity = event.entity
|
||||||
if math.random(1,3) == 1 or event.entity.health <= 0 then create_explosion_schedule(event.entity) end
|
if entity.type == "container" or entity.type == "logistic-container" then
|
||||||
|
if math.random(1,3) == 1 or entity.health <= 0 then create_explosion_schedule(event.entity) return end
|
||||||
|
end
|
||||||
|
if entity.type == "cargo-wagon" or entity.type == "car" then
|
||||||
|
if entity.health <= 0 then create_explosion_schedule(entity) return end
|
||||||
|
if entity.health < 150 and math.random(1,3) == 1 then create_explosion_schedule(entity) return end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ simplex_noise = simplex_noise.d2
|
|||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
local unique_rooms = require "maps.labyrinth_unique_rooms"
|
local unique_rooms = require "maps.labyrinth_unique_rooms"
|
||||||
|
|
||||||
local labyrinth_difficulty_curve = 500 --- How much size the labyrinth needs to have the highest difficulty.
|
local labyrinth_difficulty_curve = 400 --- How much size the labyrinth needs to have the highest difficulty.
|
||||||
|
|
||||||
local function create_labyrinth_difficulty_gui(player)
|
local function create_labyrinth_difficulty_gui(player)
|
||||||
if player.gui.top["labyrinth_difficulty"] then player.gui.top["labyrinth_difficulty"].destroy() end
|
if player.gui.top["labyrinth_difficulty"] then player.gui.top["labyrinth_difficulty"].destroy() end
|
||||||
@@ -898,7 +898,8 @@ local function on_player_joined_game(event)
|
|||||||
player.insert {name = 'iron-axe', count = 1}
|
player.insert {name = 'iron-axe', count = 1}
|
||||||
player.insert {name = 'pistol', count = 1}
|
player.insert {name = 'pistol', count = 1}
|
||||||
player.insert {name = 'firearm-magazine', count = 32}
|
player.insert {name = 'firearm-magazine', count = 32}
|
||||||
end
|
end
|
||||||
|
create_labyrinth_difficulty_gui(player)
|
||||||
end
|
end
|
||||||
|
|
||||||
local inserters = {"inserter", "long-handed-inserter", "burner-inserter", "fast-inserter", "filter-inserter", "stack-filter-inserter", "stack-inserter"}
|
local inserters = {"inserter", "long-handed-inserter", "burner-inserter", "fast-inserter", "filter-inserter", "stack-filter-inserter", "stack-inserter"}
|
||||||
|
|||||||
Reference in New Issue
Block a user