mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-02-03 13:11:21 +02:00
Migrate logistic chests internal names
This commit is contained in:
parent
9ed64a66a5
commit
1dae30a316
@ -41,11 +41,11 @@ if storage.config.market.enabled then
|
||||
{price = 5, name = 'construction-robot'},
|
||||
{price = 15, name = 'logistic-robot'},
|
||||
{price = 50, name = 'roboport'},
|
||||
{price = 5, name = 'logistic-chest-passive-provider'},
|
||||
{price = 5, name = 'logistic-chest-active-provider'},
|
||||
{price = 5, name = 'logistic-chest-buffer'},
|
||||
{price = 5, name = 'logistic-chest-requester'},
|
||||
{price = 5, name = 'logistic-chest-storage'},
|
||||
{price = 5, name = 'passive-provider-chest'},
|
||||
{price = 5, name = 'active-provider-chest'},
|
||||
{price = 5, name = 'buffer-chest'},
|
||||
{price = 5, name = 'requester-chest'},
|
||||
{price = 5, name = 'storage-chest'},
|
||||
|
||||
}
|
||||
local market_items = require 'resources.market_items'
|
||||
@ -121,8 +121,8 @@ Command.add('lazy-bastard-bootstrap', {
|
||||
local templates = {
|
||||
{name = 'medium-electric-pole', force = force, position = {x = pos.x - 2, y = pos.y - 1}},
|
||||
{name = 'roboport', force = force, position = {x = pos.x, y = pos.y}},
|
||||
{name = 'logistic-chest-storage', force = force, position = {x = pos.x + 1, y = pos.y + 1}},
|
||||
{name = 'logistic-chest-storage', force = force, position = {x = pos.x - 2, y = pos.y + 1}},
|
||||
{name = 'storage-chest', force = force, position = {x = pos.x + 1, y = pos.y + 1}},
|
||||
{name = 'storage-chest', force = force, position = {x = pos.x - 2, y = pos.y + 1}},
|
||||
}
|
||||
|
||||
for i = 1, #templates do
|
||||
|
@ -128,11 +128,11 @@ local item_worths = {
|
||||
['light-armor'] = 32,
|
||||
['light-oil-barrel'] = 16,
|
||||
['locomotive'] = 512,
|
||||
['logistic-chest-active-provider'] = 256,
|
||||
['logistic-chest-buffer'] = 512,
|
||||
['logistic-chest-passive-provider'] = 256,
|
||||
['logistic-chest-requester'] = 512,
|
||||
['logistic-chest-storage'] = 256,
|
||||
['active-provider-chest'] = 256,
|
||||
['buffer-chest'] = 512,
|
||||
['passive-provider-chest'] = 256,
|
||||
['requester-chest'] = 512,
|
||||
['storage-chest'] = 256,
|
||||
['logistic-robot'] = 256,
|
||||
['logistic-science-pack'] = 16,
|
||||
['long-handed-inserter'] = 16,
|
||||
|
@ -38,7 +38,7 @@ end)
|
||||
-- If placed from a bp and the bp has restrictions on the chest, it takes priority.
|
||||
local restrict_chest = Token.register(function(event)
|
||||
local entity = event.entity
|
||||
if entity and entity.valid and (entity.name == 'logistic-chest-passive-provider' or entity.type == 'container') then
|
||||
if entity and entity.valid and (entity.name == 'passive-provider-chest' or entity.type == 'container') then
|
||||
local chest_inventory = entity.get_inventory(defines.inventory.chest)
|
||||
if #chest_inventory + 1 == chest_inventory.getbar() then
|
||||
chest_inventory.setbar(2)
|
||||
|
@ -134,11 +134,11 @@ local entity_tiers = {
|
||||
['substation'] = 3,
|
||||
['laser-turret'] = 3,
|
||||
['stack-inserter'] = 3,
|
||||
['logistic-chest-active-provider'] = 3,
|
||||
['logistic-chest-passive-provider'] = 3,
|
||||
['logistic-chest-buffer'] = 3,
|
||||
['logistic-chest-storage'] = 3,
|
||||
['logistic-chest-requester'] = 3
|
||||
['active-provider-chest'] = 3,
|
||||
['passive-provider-chest'] = 3,
|
||||
['buffer-chest'] = 3,
|
||||
['storage-chest'] = 3,
|
||||
['requester-chest'] = 3
|
||||
}
|
||||
|
||||
--Creates rich text icons of the tiered entities
|
||||
|
@ -7,11 +7,11 @@ local loot = {
|
||||
{stack = {name = 'logistic-robot', count = 50, distance_factor = 1 / 16}, weight = 4},
|
||||
{stack = {name = 'construction-robot', count = 50, distance_factor = 1 / 16}, weight = 7},
|
||||
{stack = {name = 'roboport', count = 5, distance_factor = 1 / 64}, weight = 2},
|
||||
{stack = {name = 'logistic-chest-storage', count = 20, distance_factor = 1 / 48}, weight = 4},
|
||||
{stack = {name = 'logistic-chest-requester', count = 20, distance_factor = 1 / 48}, weight = 4},
|
||||
{stack = {name = 'logistic-chest-passive-provider', count = 20, distance_factor = 1 / 48}, weight = 4},
|
||||
{stack = {name = 'logistic-chest-buffer', count = 20, distance_factor = 1 / 48}, weight = 4},
|
||||
{stack = {name = 'logistic-chest-active-provider', count = 20, distance_factor = 1 / 48}, weight = 4}
|
||||
{stack = {name = 'storage-chest', count = 20, distance_factor = 1 / 48}, weight = 4},
|
||||
{stack = {name = 'requester-chest', count = 20, distance_factor = 1 / 48}, weight = 4},
|
||||
{stack = {name = 'passive-provider-chest', count = 20, distance_factor = 1 / 48}, weight = 4},
|
||||
{stack = {name = 'buffer-chest', count = 20, distance_factor = 1 / 48}, weight = 4},
|
||||
{stack = {name = 'active-provider-chest', count = 20, distance_factor = 1 / 48}, weight = 4}
|
||||
}
|
||||
|
||||
local weights = ob.prepare_weighted_loot(loot)
|
||||
|
@ -50,8 +50,8 @@ Event.add(defines.events.on_research_finished,
|
||||
return
|
||||
end
|
||||
game.forces.player.recipes['roboport'].enabled = false
|
||||
game.forces.player.recipes['logistic-chest-passive-provider'].enabled = false
|
||||
game.forces.player.recipes['logistic-chest-storage'].enabled = false
|
||||
game.forces.player.recipes['passive-provider-chest'].enabled = false
|
||||
game.forces.player.recipes['storage-chest'].enabled = false
|
||||
end
|
||||
)
|
||||
|
||||
|
@ -927,16 +927,16 @@ local function init(config)
|
||||
[1] = {
|
||||
market = market,
|
||||
chest = chest,
|
||||
[4] = {entity = {name = 'logistic-chest-requester', force = 'player', callback = 'chest'}},
|
||||
[4] = {entity = {name = 'requester-chest', force = 'player', callback = 'chest'}},
|
||||
[29] = {entity = {name = 'market', force = 'neutral', callback = 'market'}},
|
||||
[32] = {entity = {name = 'logistic-chest-requester', force = 'player', callback = 'chest'}}
|
||||
[32] = {entity = {name = 'requester-chest', force = 'player', callback = 'chest'}}
|
||||
},
|
||||
[2] = {
|
||||
force = 'player',
|
||||
factory = factory,
|
||||
inserter = inserter,
|
||||
chest = chest,
|
||||
[4] = {entity = {name = 'logistic-chest-requester', force = 'player', callback = 'chest'}},
|
||||
[4] = {entity = {name = 'requester-chest', force = 'player', callback = 'chest'}},
|
||||
[25] = {entity = {name = 'burner-inserter', direction = 2, callback = 'inserter'}},
|
||||
[27] = {entity = {name = 'electric-furnace', callback = 'factory'}},
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ return function(config)
|
||||
end
|
||||
|
||||
local function process_chest(entity, budget)
|
||||
if entity.name ~= 'logistic-chest-requester' then
|
||||
if entity.name ~= 'requester-chest' then
|
||||
return
|
||||
end
|
||||
if not chest_data[entity.unit_number] then
|
||||
@ -363,7 +363,7 @@ return function(config)
|
||||
local chests = {}
|
||||
for _, position in pairs(positions) do
|
||||
if is_container_position_valid(position) then
|
||||
local e = surface.create_entity({ name = 'logistic-chest-requester', position = position, force = 'neutral' })
|
||||
local e = surface.create_entity({ name = 'requester-chest', position = position, force = 'neutral' })
|
||||
e.destructible = false
|
||||
e.minable = false
|
||||
table.insert(chests, e)
|
||||
@ -381,7 +381,7 @@ return function(config)
|
||||
end
|
||||
|
||||
-- first, remove all adjacent chests & destroy those
|
||||
local old_chests = surface.find_entities_filtered{name = 'logistic-chest-requester', force = 'neutral', area = {
|
||||
local old_chests = surface.find_entities_filtered{name = 'requester-chest', force = 'neutral', area = {
|
||||
left_top = {
|
||||
x = left_top.x-1,
|
||||
y = left_top.y-1,
|
||||
@ -455,7 +455,7 @@ return function(config)
|
||||
|
||||
local delay_cost = Token.register(function()
|
||||
local rs = RS.get_surface()
|
||||
local chests = rs.find_entities_filtered{name = 'logistic-chest-requester', force = 'neutral'}
|
||||
local chests = rs.find_entities_filtered{name = 'requester-chest', force = 'neutral'}
|
||||
for _, chest in pairs(chests) do
|
||||
if chest_data[chest.unit_number] then
|
||||
remove_old_renders(chest_data[chest.unit_number])
|
||||
|
@ -156,7 +156,7 @@ end)
|
||||
end
|
||||
|
||||
local name = effect.recipe
|
||||
if name == 'logistic-chest-requester' then -- TODO: This doesn't prevent later tier requester chests.
|
||||
if name == 'requester-chest' then -- TODO: This doesn't prevent later tier requester chests.
|
||||
game.forces.player.recipes[name].enabled = false
|
||||
end
|
||||
|
||||
|
@ -30,7 +30,7 @@ ScenarioInfo.add_map_extra_info([[
|
||||
The map size is restricted by the Hungry Chests. Provide the requested materials to unlock new chunks.
|
||||
Use the Elder Tree [entity=tree-01], the Infinity Rock [entity=huge-rock], and the Precious Oil patch [entity=crude-oil] located at spawn [gps=0,0.redmew]
|
||||
to draw more resources when in need, but always favor Danger Ores first if you can.
|
||||
If you find yourself stuck with the requests, insert a Coin [item=coin] into the Hungry Chest [item=logistic-chest-requester] to reroll the request.
|
||||
If you find yourself stuck with the requests, insert a Coin [item=coin] into the Hungry Chest [item=requester-chest] to reroll the request.
|
||||
You can fulfill part of the request & then reroll to change the remaining part (it will always reroll based on its remaining content to be fulfilled).
|
||||
Unlocking new land may or may not reward you with another Coin.
|
||||
]])
|
||||
|
@ -373,10 +373,10 @@ local function on_init()
|
||||
Retailer.set_item('items', {price = 10, name = 'construction-robot'})
|
||||
Retailer.set_item('items', {price = 2, name = 'logistic-robot'})
|
||||
Retailer.set_item('items', {price = 75, name = 'roboport'})
|
||||
Retailer.set_item('items', {price = 50, name = 'logistic-chest-active-provider'})
|
||||
Retailer.set_item('items', {price = 50, name = 'logistic-chest-passive-provider'})
|
||||
Retailer.set_item('items', {price = 50, name = 'logistic-chest-requester'})
|
||||
Retailer.set_item('items', {price = 50, name = 'logistic-chest-storage'})
|
||||
Retailer.set_item('items', {price = 50, name = 'active-provider-chest'})
|
||||
Retailer.set_item('items', {price = 50, name = 'passive-provider-chest'})
|
||||
Retailer.set_item('items', {price = 50, name = 'requester-chest'})
|
||||
Retailer.set_item('items', {price = 50, name = 'storage-chest'})
|
||||
Retailer.set_item('items', {price = 6, name = 'big-electric-pole'})
|
||||
Retailer.set_item('items', {price = 3, name = 'medium-electric-pole'})
|
||||
Retailer.set_item('items', {price = 50, name = 'substation'})
|
||||
|
@ -211,11 +211,11 @@ local recipes = {
|
||||
['logistic-robot'] = true,
|
||||
['construction-robot'] = true,
|
||||
['flying-robot-frame'] = true,
|
||||
['logistic-chest-active-provider'] = true,
|
||||
['logistic-chest-passive-provider'] = true,
|
||||
['logistic-chest-storage'] = true,
|
||||
['logistic-chest-buffer'] = true,
|
||||
['logistic-chest-requester'] = true,
|
||||
['active-provider-chest'] = true,
|
||||
['passive-provider-chest'] = true,
|
||||
['storage-chest'] = true,
|
||||
['buffer-chest'] = true,
|
||||
['requester-chest'] = true,
|
||||
['roboport'] = true,
|
||||
['electric-mining-drill'] = true,
|
||||
['steel-furnace'] = true,
|
||||
|
@ -50,9 +50,9 @@ RecipeLocker.lock_recipes(
|
||||
'fast-underground-belt',
|
||||
'express-underground-belt',
|
||||
'pipe-to-ground',
|
||||
'logistic-chest-requester',
|
||||
'logistic-chest-buffer',
|
||||
'logistic-chest-active-provider'
|
||||
'requester-chest',
|
||||
'buffer-chest',
|
||||
'active-provider-chest'
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -71,11 +71,11 @@ return {
|
||||
'laser-turret',
|
||||
'light-oil-barrel',
|
||||
'loader',
|
||||
'logistic-chest-active-provider',
|
||||
'logistic-chest-buffer',
|
||||
'logistic-chest-passive-provider',
|
||||
'logistic-chest-requester',
|
||||
'logistic-chest-storage',
|
||||
'active-provider-chest',
|
||||
'buffer-chest',
|
||||
'passive-provider-chest',
|
||||
'requester-chest',
|
||||
'storage-chest',
|
||||
'logistic-robot',
|
||||
'long-handed-inserter',
|
||||
'low-density-structure',
|
||||
|
Loading…
x
Reference in New Issue
Block a user