mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Merge branch 'aperx' into main
This commit is contained in:
@@ -44,7 +44,7 @@ local speech_bubble_async =
|
||||
local function circle_messages()
|
||||
for name, ent in pairs(Public.compilatrons) do
|
||||
if not ent.valid then
|
||||
Public.spawn_compilatron(game.players[1].surface, name)
|
||||
Public.spawn_compilatron(game.surfaces[1] or game.players[1].surface, name)
|
||||
end
|
||||
local current_message = Public.current_messages[name]
|
||||
local msg_number
|
||||
@@ -94,9 +94,9 @@ end
|
||||
-- @tparam string location the location tag that is in the config file
|
||||
function Public.spawn_compilatron(surface, location)
|
||||
local position = locations[location]
|
||||
local pos = surface.find_non_colliding_position("small-biter", position, 1.5, 0.5)
|
||||
local pos = surface.find_non_colliding_position("behemoth-biter", position, 1.5, 0.5)
|
||||
if pos then
|
||||
local compi = surface.create_entity{ name = "small-biter", position = pos, force = game.forces.neutral }
|
||||
local compi = surface.create_entity{ name = "behemoth-biter", position = pos, force = game.forces.neutral }
|
||||
Public.add_compilatron(compi, location)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -73,10 +73,10 @@ Event.add(defines.events.on_player_died, function(event)
|
||||
inventory = inventory,
|
||||
surface = corpse.surface,
|
||||
position = corpse.position,
|
||||
name = "iron-chest",
|
||||
name = "steel-chest",
|
||||
allow_creation = true,
|
||||
}
|
||||
|
||||
|
||||
corpse.destroy()
|
||||
corpse = chest
|
||||
end
|
||||
@@ -155,7 +155,7 @@ if config.auto_collect_bodies then
|
||||
ExpUtil.transfer_inventory_to_surface{
|
||||
inventory = inventory,
|
||||
surface = corpse.surface,
|
||||
name = "iron-chest",
|
||||
name = "steel-chest",
|
||||
allow_creation = true,
|
||||
}
|
||||
end)
|
||||
|
||||
@@ -43,12 +43,3 @@ for _, inventory in ipairs(config.inventories) do
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
if config.disable_nuke_research then
|
||||
Event.add(defines.events.on_research_started, function(event)
|
||||
local name = event.research.name
|
||||
if config.disable_nuke_research_names[name] then
|
||||
event.research.force.cancel_current_research()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user