1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-03-05 15:05:57 +02:00

Merge pull request #820 from plague006/items_update

Update items
This commit is contained in:
Matthew 2019-02-26 16:05:24 -05:00 committed by GitHub
commit 708f991778
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 60 additions and 85 deletions

View File

@ -170,7 +170,6 @@ global.config = {
start_with_power_armor = true,
-- adds additional items to the player when _CHEATS is true
starting_items = {
{name = 'steel-axe', count = 10},
{name = 'submachine-gun', count = 1},
{name = 'uranium-rounds-magazine', count = 200},
{name = 'construction-robot', count = 250},

View File

@ -54,7 +54,7 @@ if global.config.market.enabled then
for i = #market_items, 1, -1 do
local name = market_items[i].name
-- cleanup items we don't need, construction bot has to be replaced for convenience
if name == 'temporary-mining-speed-bonus' or name == 'construction-robot' or name == 'steel-axe' then
if name == 'temporary-mining-speed-bonus' or name == 'construction-robot' then
remove(market_items, i)
end
end
@ -64,20 +64,6 @@ if global.config.market.enabled then
end
end
-- disable pickaxes from the start
Event.on_init(function ()
local recipes = game.forces.player.recipes
recipes['iron-axe'].enabled = false
recipes['steel-axe'].enabled = false
end)
-- ensure the recipes are disabled all the time
Event.add(defines.events.on_research_finished, function (event)
local recipes = event.research.force.recipes
recipes['iron-axe'].enabled = false
recipes['steel-axe'].enabled = false
end)
-- players cannot build anything, just place ghosts
Event.add(defines.events.on_built_entity, function(event)
local entity = event.created_entity

View File

@ -218,13 +218,12 @@ local item_pool = {
{name = 'land-mine', count = 100, weight = 250},
{name = 'shotgun-shell', count = 200, weight = 1250},
{name = 'piercing-rounds-magazine', count = 200, weight = 833.3333},
{name = 'science-pack-1', count = 200, weight = 100},
{name = 'science-pack-2', count = 200, weight = 100},
{name = 'automation-science-pack', count = 200, weight = 100},
{name = 'logistic-science-pack', count = 200, weight = 100},
{name = 'grenade', count = 100, weight = 500},
{name = 'defender-capsule', count = 50, weight = 500},
{name = 'railgun-dart', count = 100, weight = 500},
{name = 'piercing-shotgun-shell', count = 200, weight = 312.5},
{name = 'steel-axe', count = 5, weight = 166.6667},
{name = 'submachine-gun', count = 1, weight = 166.6667},
{name = 'shotgun', count = 1, weight = 166.6667},
{name = 'uranium-rounds-magazine', count = 200, weight = 166.6667},
@ -234,7 +233,7 @@ local item_pool = {
{name = 'railgun', count = 1, weight = 100},
{name = 'flamethrower-ammo', count = 50, weight = 100},
{name = 'military-science-pack', count = 200, weight = 100},
{name = 'science-pack-3', count = 200, weight = 100},
{name = 'chemical-science-pack', count = 200, weight = 100},
{name = 'explosive-rocket', count = 100, weight = 100},
{name = 'explosive-cannon-shell', count = 100, weight = 100},
{name = 'cluster-grenade', count = 100, weight = 100},
@ -264,7 +263,7 @@ local item_pool = {
{name = 'power-armor', count = 1, weight = 33.3333},
{name = 'fusion-reactor-equipment', count = 1, weight = 33.3333},
{name = 'production-science-pack', count = 200, weight = 100},
{name = 'high-tech-science-pack', count = 200, weight = 100},
{name = 'utility-science-pack', count = 200, weight = 100},
{name = 'artillery-turret', count = 1, weight = 2.5},
{name = 'artillery-wagon-cannon', count = 1, weight = 1},
{name = 'atomic-bomb', count = 1, weight = 1},

View File

@ -701,18 +701,18 @@ local function init()
upgrade_rate = 0.5,
upgrade_base_cost = 500,
upgrade_cost_base = 2,
{name = 'raw-wood', price = 1},
{name = 'wood', price = 1},
{name = 'iron-plate', price = 2},
{name = 'stone', price = 2},
{name = 'coal', price = 1.25},
{name = 'raw-fish', price = 4},
{name = 'firearm-magazine', price = 5},
{name = 'science-pack-1', price = 10},
{name = 'science-pack-2', price = 25},
{name = 'automation-science-pack', price = 10},
{name = 'logistic-science-pack', price = 25},
{name = 'military-science-pack', price = 50},
{name = 'science-pack-3', price = 75},
{name = 'chemical-science-pack', price = 75},
{name = 'production-science-pack', price = 100},
{name = 'high-tech-science-pack', price = 125},
{name = 'utility-science-pack', price = 125},
{
price = 100,
name = 'small-plane',

View File

@ -4,12 +4,12 @@ local Token = require 'utils.token'
local loot = {
{weight = 10},
{stack = {name = 'coin', count = 250, distance_factor = 1 / 20}, weight = 5},
{stack = {name = 'science-pack-1', count = 200, distance_factor = 1 / 10}, weight = 2},
{stack = {name = 'science-pack-2', count = 100, distance_factor = 1 / 10}, weight = 2},
{stack = {name = 'automation-science-pack', count = 200, distance_factor = 1 / 10}, weight = 2},
{stack = {name = 'logistic-science-pack', count = 100, distance_factor = 1 / 10}, weight = 2},
{stack = {name = 'military-science-pack', count = 75, distance_factor = 1 / 10}, weight = 3},
{stack = {name = 'science-pack-3', count = 75, distance_factor = 1 / 10}, weight = 3},
{stack = {name = 'chemical-science-pack', count = 75, distance_factor = 1 / 10}, weight = 3},
{stack = {name = 'production-science-pack', count = 50, distance_factor = 1 / 10}, weight = 5},
{stack = {name = 'high-tech-science-pack', count = 50, distance_factor = 1 / 10}, weight = 5}
{stack = {name = 'utility-science-pack', count = 50, distance_factor = 1 / 10}, weight = 5}
}
local weights = ob.prepare_weighted_loot(loot)
@ -32,8 +32,8 @@ local factory = {
local factory_b = {
callback = ob.magic_item_crafting_callback,
data = {
recipe = 'high-tech-science-pack',
output = {min_rate = 0.0625 / 60, distance_factor = 0.0625 / 60 / 512, item = 'high-tech-science-pack'}
recipe = 'utility-science-pack',
output = {min_rate = 0.0625 / 60, distance_factor = 0.0625 / 60 / 512, item = 'utility-science-pack'}
}
}
@ -45,13 +45,13 @@ local market = {
upgrade_base_cost = 500,
upgrade_cost_base = 2,
{
name = 'science-pack-1',
name = 'automation-science-pack',
price = 10,
distance_factor = 5 / 512,
min_price = 1
},
{
name = 'science-pack-2',
name = 'logistic-science-pack',
price = 20,
distance_factor = 10 / 512,
min_price = 2
@ -63,7 +63,7 @@ local market = {
min_price = 4
},
{
name = 'science-pack-3',
name = 'chemical-science-pack',
price = 60,
distance_factor = 30 / 512,
min_price = 4
@ -75,7 +75,7 @@ local market = {
min_price = 4
},
{
name = 'high-tech-science-pack',
name = 'utility-science-pack',
price = 180,
distance_factor = 90 / 512,
min_price = 4

View File

@ -4,10 +4,10 @@ local Token = require 'utils.token'
local loot = {
{weight = 10},
{stack = {name = 'coin', count = 75, distance_factor = 1 / 20}, weight = 5},
{stack = {name = 'science-pack-1', count = 100, distance_factor = 1 / 10}, weight = 5},
{stack = {name = 'science-pack-2', count = 50, distance_factor = 1 / 10}, weight = 5},
{stack = {name = 'automation-science-pack', count = 100, distance_factor = 1 / 10}, weight = 5},
{stack = {name = 'logistic-science-pack', count = 50, distance_factor = 1 / 10}, weight = 5},
{stack = {name = 'military-science-pack', count = 25, distance_factor = 1 / 10}, weight = 5},
{stack = {name = 'science-pack-3', count = 25, distance_factor = 1 / 10}, weight = 5}
{stack = {name = 'chemical-science-pack', count = 25, distance_factor = 1 / 10}, weight = 5}
}
local weights = ob.prepare_weighted_loot(loot)
@ -30,8 +30,8 @@ local factory = {
local factory_b = {
callback = ob.magic_item_crafting_callback,
data = {
recipe = 'science-pack-3',
output = {min_rate = 0.125 / 60, distance_factor = 0.125 / 60 / 512, item = 'science-pack-3'}
recipe = 'chemical-science-pack',
output = {min_rate = 0.125 / 60, distance_factor = 0.125 / 60 / 512, item = 'chemical-science-pack'}
}
}
@ -43,13 +43,13 @@ local market = {
upgrade_base_cost = 500,
upgrade_cost_base = 2,
{
name = 'science-pack-1',
name = 'automation-science-pack',
price = 10,
distance_factor = 5 / 512,
min_price = 1
},
{
name = 'science-pack-2',
name = 'logistic-science-pack',
price = 20,
distance_factor = 10 / 512,
min_price = 2
@ -61,7 +61,7 @@ local market = {
min_price = 4
},
{
name = 'science-pack-3',
name = 'chemical-science-pack',
price = 60,
distance_factor = 30 / 512,
min_price = 6

View File

@ -4,8 +4,8 @@ local Token = require 'utils.token'
local loot = {
{weight = 10},
{stack = {name = 'coin', count = 50, distance_factor = 1 / 20}, weight = 5},
{stack = {name = 'science-pack-1', count = 37, distance_factor = 1 / 20}, weight = 5},
{stack = {name = 'science-pack-2', count = 25, distance_factor = 1 / 20}, weight = 5}
{stack = {name = 'automation-science-pack', count = 37, distance_factor = 1 / 20}, weight = 5},
{stack = {name = 'logistic-science-pack', count = 25, distance_factor = 1 / 20}, weight = 5}
}
local weights = ob.prepare_weighted_loot(loot)
@ -20,15 +20,15 @@ local loot_callback =
local factory_loot = {
{
stack = {
recipe = 'science-pack-1',
output = {item = 'science-pack-1', min_rate = 1 / 5 / 60, distance_factor = 1 / 5 / 60 / 512}
recipe = 'automation-science-pack',
output = {item = 'automation-science-pack', min_rate = 1 / 5 / 60, distance_factor = 1 / 5 / 60 / 512}
},
weight = 5
},
{
stack = {
recipe = 'science-pack-2',
output = {item = 'science-pack-2', min_rate = 1 / 6 / 60, distance_factor = 1 / 6 / 60 / 512}
recipe = 'logistic-science-pack',
output = {item = 'logistic-science-pack', min_rate = 1 / 6 / 60, distance_factor = 1 / 6 / 60 / 512}
},
weight = 5
}

View File

@ -5,7 +5,7 @@ local loot = {
{weight = 10},
{stack = {name = 'coin', count = 75, distance_factor = 1 / 20}, weight = 5},
{stack = {name = 'military-science-pack', count = 12, distance_factor = 1 / 20}, weight = 5},
{stack = {name = 'science-pack-3', count = 12, distance_factor = 1 / 20}, weight = 5}
{stack = {name = 'chemical-science-pack', count = 12, distance_factor = 1 / 20}, weight = 5}
}
local weights = ob.prepare_weighted_loot(loot)
@ -27,8 +27,8 @@ local factory_loot = {
},
{
stack = {
recipe = 'science-pack-3',
output = {item = 'science-pack-3', min_rate = 1 / 12 / 60, distance_factor = 1 / 12 / 60 / 512}
recipe = 'chemical-science-pack',
output = {item = 'chemical-science-pack', min_rate = 1 / 12 / 60, distance_factor = 1 / 12 / 60 / 512}
},
weight = 5
}

View File

@ -5,7 +5,7 @@ local loot = {
{weight = 10},
{stack = {name = 'coin', count = 250, distance_factor = 1 / 20}, weight = 5},
{stack = {name = 'production-science-pack', count = 25, distance_factor = 1 / 20}, weight = 5},
{stack = {name = 'high-tech-science-pack', count = 25, distance_factor = 1 / 20}, weight = 5}
{stack = {name = 'utility-science-pack', count = 25, distance_factor = 1 / 20}, weight = 5}
}
local weights = ob.prepare_weighted_loot(loot)
@ -27,8 +27,8 @@ local factory_loot = {
},
{
stack = {
recipe = 'high-tech-science-pack',
output = {item = 'high-tech-science-pack', min_rate = 2 / 14 / 60, distance_factor = 1 / 14 / 60 / 512}
recipe = 'utility-science-pack',
output = {item = 'utility-science-pack', min_rate = 2 / 14 / 60, distance_factor = 1 / 14 / 60 / 512}
},
weight = 5
}

View File

@ -4,8 +4,8 @@ local Token = require 'utils.token'
local loot = {
{weight = 10},
{stack = {name = 'coin', count = 50, distance_factor = 1 / 20}, weight = 5},
{stack = {name = 'science-pack-1', count = 50, distance_factor = 1 / 10}, weight = 5},
{stack = {name = 'science-pack-2', count = 25, distance_factor = 1 / 10}, weight = 5}
{stack = {name = 'automation-science-pack', count = 50, distance_factor = 1 / 10}, weight = 5},
{stack = {name = 'logistic-science-pack', count = 25, distance_factor = 1 / 10}, weight = 5}
}
local weights = ob.prepare_weighted_loot(loot)
@ -20,16 +20,16 @@ local loot_callback =
local factory = {
callback = ob.magic_item_crafting_callback,
data = {
recipe = 'science-pack-1',
output = {min_rate = 0.175 / 60, distance_factor = 0.175 / 60 / 512, item = 'science-pack-1'}
recipe = 'automation-science-pack',
output = {min_rate = 0.175 / 60, distance_factor = 0.175 / 60 / 512, item = 'automation-science-pack'}
}
}
local factory_b = {
callback = ob.magic_item_crafting_callback,
data = {
recipe = 'science-pack-2',
output = {min_rate = 0.175 / 60, distance_factor = 0.175 / 60 / 512, item = 'science-pack-2'}
recipe = 'logistic-science-pack',
output = {min_rate = 0.175 / 60, distance_factor = 0.175 / 60 / 512, item = 'logistic-science-pack'}
}
}
@ -41,13 +41,13 @@ local market = {
upgrade_base_cost = 350,
upgrade_cost_base = 2,
{
name = 'science-pack-1',
name = 'automation-science-pack',
price = 10,
distance_factor = 5 / 512,
min_price = 1
},
{
name = 'science-pack-2',
name = 'logistic-science-pack',
price = 20,
distance_factor = 10 / 512,
min_price = 2

View File

@ -26,7 +26,6 @@ local Config = {
setup_player = {
enabled = true,
starting_items = {
{name = 'iron-axe', count = 2},
{name = 'stone-wall', count = 12},
{name = 'iron-gear-wheel', count = 8},
{name = 'iron-plate', count = 16},
@ -147,7 +146,6 @@ local Config = {
treasure_chest_raffle = {
['coin'] = {chance = 1.00, min = 20, max = 255},
['steel-axe'] = {chance = 0.55, min = 1, max = 3},
['stone'] = {chance = 0.20, min = 15, max = 40},
['copper-ore'] = {chance = 0.25, min = 30, max = 60},
['copper-plate'] = {chance = 0.10, min = 12, max = 25},
@ -370,12 +368,12 @@ local Config = {
['rock-big'] = 5,
['rock-huge'] = 10,
['rocket_launch'] = 0.01, -- XP reward in percentage of total experience when a rocket launches (Diggy default: 0.01 which equals 1%)
['science-pack-1'] = 4,
['science-pack-2'] = 8,
['science-pack-3'] = 15,
['automation-science-pack'] = 4,
['logistic-science-pack'] = 8,
['chemical-science-pack'] = 15,
['military-science-pack'] = 12,
['production-science-pack'] = 25,
['high-tech-science-pack'] = 50,
['utility-science-pack'] = 50,
['space-science-pack'] = 10,
['enemy_killed'] = 10, -- Base XP for killing biters and spitters.
['death-penalty'] = 0.0035, -- XP deduct in percentage of total experience when a player dies (Diggy default: 0.0035 which equals 0.35%)
@ -393,8 +391,7 @@ local Config = {
-- add or remove a table entry to add or remove a unlockable item from the market.
unlockables = {
{level = 1, price = 5, name = 'iron-axe'},
{level = 2, price = 4, name = 'raw-wood'},
{level = 2, price = 4, name = 'wood'},
{level = 3, price = 5, name = 'stone-wall'},
{level = 4, price = 20, name = 'pistol'},
{level = 4, price = 5, name = 'firearm-magazine'},
@ -405,7 +402,6 @@ local Config = {
{level = 10, price = 85, name = 'shotgun'},
{level = 10, price = 4, name = 'shotgun-shell'},
{level = 12, price = 200, name = 'heavy-armor'},
{level = 13, price = 30, name = 'steel-axe'},
{level = 14, price = 35, name = 'landfill'},
{level = 15, price = 85, name = 'submachine-gun'},
{level = 18, price = 10, name = 'piercing-rounds-magazine'},

View File

@ -72,7 +72,7 @@ local function on_player_created(event)
Game.get_player_by_index(event.player_index).gui.top.add({
name = 'Diggy.CoinGathering.Button',
type = 'sprite-button',
sprite = 'item/steel-axe',
sprite = 'item/coin',
})
end

View File

@ -323,7 +323,6 @@ local function on_init()
Retailer.set_item('items', {price = 15, name = 'train-stop'})
Retailer.set_item('items', {price = 75, name = 'locomotive'})
Retailer.set_item('items', {price = 30, name = 'cargo-wagon'})
Retailer.set_item('items', {price = 15, name = 'steel-axe'})
Retailer.set_item('items', {price = 15, name = 'submachine-gun'})
Retailer.set_item('items', {price = 15, name = 'shotgun'})
Retailer.set_item('items', {price = 250, name = 'combat-shotgun'})

View File

@ -12,7 +12,6 @@ local config = global.config
local enemy_seed = 420420
table.insert(config.player_create.starting_items, {name = 'steel-axe', count = 2})
config.market.create_standard_market = false -- stop standard market from spawning
global.config.hail_hydra.enabled = true
@ -58,7 +57,7 @@ RecipeLocker.lock_recipes(
{
'military-science-pack',
'production-science-pack',
'high-tech-science-pack'
'utility-science-pack'
}
)
@ -104,7 +103,7 @@ local function on_init()
Retailer.set_item('items', {price = 2, name = 'raw-fish'})
Retailer.set_item('items', {price = 25, name = 'military-science-pack'})
Retailer.set_item('items', {price = 50, name = 'production-science-pack'})
Retailer.set_item('items', {price = 125, name = 'high-tech-science-pack'})
Retailer.set_item('items', {price = 125, name = 'utility-science-pack'})
Retailer.set_item('items', {price = 1, name = 'rail'})
Retailer.set_item('items', {price = 2, name = 'rail-signal'})
Retailer.set_item('items', {price = 2, name = 'rail-chain-signal'})
@ -117,7 +116,6 @@ local function on_init()
Retailer.set_item('items', {price = 3, name = 'arithmetic-combinator'})
Retailer.set_item('items', {price = 3, name = 'constant-combinator'})
Retailer.set_item('items', {price = 7, name = 'programmable-speaker'})
Retailer.set_item('items', {price = 15, name = 'steel-axe'})
Retailer.set_item('items', {price = 15, name = 'submachine-gun'})
Retailer.set_item('items', {price = 15, name = 'shotgun'})
Retailer.set_item('items', {price = 250, name = 'combat-shotgun'})

View File

@ -201,13 +201,12 @@ local item_pool = {
{name = 'land-mine', count = 100, weight = 250},
{name = 'shotgun-shell', count = 200, weight = 1250},
{name = 'piercing-rounds-magazine', count = 200, weight = 833.3333},
{name = 'science-pack-1', count = 200, weight = 100},
{name = 'science-pack-2', count = 200, weight = 100},
{name = 'automation-science-pack', count = 200, weight = 100},
{name = 'logistic-science-pack', count = 200, weight = 100},
{name = 'grenade', count = 100, weight = 500},
{name = 'defender-capsule', count = 50, weight = 500},
{name = 'railgun-dart', count = 100, weight = 500},
{name = 'piercing-shotgun-shell', count = 200, weight = 312.5},
{name = 'steel-axe', count = 5, weight = 166.6667},
{name = 'submachine-gun', count = 1, weight = 166.6667},
{name = 'shotgun', count = 1, weight = 166.6667},
{name = 'uranium-rounds-magazine', count = 200, weight = 166.6667},
@ -217,7 +216,7 @@ local item_pool = {
{name = 'railgun', count = 1, weight = 100},
{name = 'flamethrower-ammo', count = 50, weight = 100},
{name = 'military-science-pack', count = 200, weight = 100},
{name = 'science-pack-3', count = 200, weight = 100},
{name = 'chemical-science-pack', count = 200, weight = 100},
{name = 'explosive-rocket', count = 100, weight = 100},
{name = 'explosive-cannon-shell', count = 100, weight = 100},
{name = 'cluster-grenade', count = 100, weight = 100},
@ -247,7 +246,7 @@ local item_pool = {
{name = 'power-armor', count = 1, weight = 33.3333},
{name = 'fusion-reactor-equipment', count = 1, weight = 33.3333},
{name = 'production-science-pack', count = 200, weight = 100},
{name = 'high-tech-science-pack', count = 200, weight = 100},
{name = 'utility-science-pack', count = 200, weight = 100},
{name = 'artillery-turret', count = 1, weight = 2.5},
{name = 'artillery-wagon-cannon', count = 1, weight = 1},
{name = 'atomic-bomb', count = 1, weight = 1},

View File

@ -10,7 +10,6 @@ local item_pool = {
{name = 'defender-capsule', count = 50, weight = 500},
{name = 'railgun-dart', count = 100, weight = 500},
{name = 'piercing-shotgun-shell', count = 200, weight = 312.5},
{name = 'steel-axe', count = 5, weight = 166.6667},
{name = 'submachine-gun', count = 1, weight = 166.6667},
{name = 'shotgun', count = 1, weight = 166.6667},
{name = 'uranium-rounds-magazine', count = 200, weight = 166.6667},