mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
.
This commit is contained in:
@@ -25,6 +25,7 @@ end
|
||||
|
||||
--- Use to make a split point for the number of items given based on amount made
|
||||
-- ['firearm-magazine']=cutoff_amount_made(100, 10, 0) -- give 10 items until 100 items have been made
|
||||
--[[
|
||||
local function cutoff_amount_made(amount, before, after)
|
||||
return function(amount_made, items_made, player)
|
||||
if amount_made < amount then
|
||||
@@ -34,9 +35,11 @@ local function cutoff_amount_made(amount, before, after)
|
||||
end
|
||||
end
|
||||
end
|
||||
]]
|
||||
|
||||
--- Same as above but will not give any items if x amount has been made of another item, useful for tiers
|
||||
-- ['light-armor']=cutoff_amount_made_unless(5, 0,1,'heavy-armor',5) -- give light armor once 5 have been made unless 5 heavy armor has been made
|
||||
--[[
|
||||
local function cutoff_amount_made_unless(amount, before, after, second_item, second_amount)
|
||||
return function(amount_made, items_made, player)
|
||||
if items_made(second_item) < second_amount then
|
||||
@@ -50,9 +53,11 @@ local function cutoff_amount_made_unless(amount, before, after, second_item, sec
|
||||
end
|
||||
end
|
||||
end
|
||||
]]
|
||||
|
||||
-- Use for mass production items where you want the amount to change based on the amount already made
|
||||
-- ['iron-plate']=scale_amount_made(5*minutes, 10, 10) -- for first 5 minutes give 10 items then after apply a factor of 10
|
||||
--[[
|
||||
local function scale_amount_made(amount, before, scalar)
|
||||
return function(amount_made, items_made, player)
|
||||
if amount_made < amount then
|
||||
@@ -62,6 +67,7 @@ local function scale_amount_made(amount, before, scalar)
|
||||
end
|
||||
end
|
||||
end
|
||||
]]
|
||||
|
||||
--[[
|
||||
Common values
|
||||
@@ -79,33 +85,28 @@ return {
|
||||
enemy_expansion = false, --- @setting enemy_expansion a catch all for in case the map settings file fails to load
|
||||
chart_radius = 10 * 32, --- @setting chart_radius the number of tiles that will be charted when the map starts
|
||||
items = { --- @setting items items and there condition for being given
|
||||
-- ['item-name'] = function(amount_made, production_stats, player) return <Number> end -- 0 means no items given
|
||||
-- Plates
|
||||
["iron-plate"] = scale_amount_made(100, 10, 10),
|
||||
["copper-plate"] = scale_amount_made(100, 0, 8),
|
||||
["steel-plate"] = scale_amount_made(100, 0, 4),
|
||||
-- Secondary Items
|
||||
["electronic-circuit"] = scale_amount_made(1000, 0, 6),
|
||||
["iron-gear-wheel"] = scale_amount_made(1000, 0, 6),
|
||||
-- Starting Items
|
||||
["burner-mining-drill"] = cutoff_time(10 * minutes, 4, 0),
|
||||
["stone-furnace"] = cutoff_time(10 * minutes, 4, 0),
|
||||
-- Armor
|
||||
["light-armor"] = cutoff_amount_made_unless(5, 0, 1, "heavy-armor", 5),
|
||||
["heavy-armor"] = cutoff_amount_made(5, 0, 1),
|
||||
-- Weapon
|
||||
["pistol"] = cutoff_amount_made_unless(0, 1, 1, "submachine-gun", 5),
|
||||
["submachine-gun"] = cutoff_amount_made(5, 0, 1),
|
||||
-- Ammo
|
||||
["firearm-magazine"] = cutoff_amount_made_unless(100, 10, 0, "piercing-rounds-magazine", 100),
|
||||
["piercing-rounds-magazine"] = cutoff_amount_made(100, 0, 10),
|
||||
--[[
|
||||
['iron-ore']=cutoff_time(20 * minutes, 80, 0),
|
||||
['stone']=cutoff_time(20 * minutes, 20, 0),
|
||||
['coal']=cutoff_time(20 * minutes, 20, 0),
|
||||
-- ['burner-mining-drill']=cutoff_time(20 * minutes, 8, 0),
|
||||
-- ['stone-furnace']=cutoff_time(20 * minutes, 8, 0),
|
||||
['submachine-gun'] = 1,
|
||||
['piercing-rounds-magazine'] = 20,
|
||||
['construction-robot'] = 10,
|
||||
['modular-armor'] = 1,
|
||||
['solar-panel-equipment'] = 16,
|
||||
['belt-immunity-equipment'] = 1,
|
||||
['battery-equipment'] = 2,
|
||||
['personal-roboport-equipment'] = 1
|
||||
--[[
|
||||
['construction-robot'] = 50,
|
||||
['spidertron'] = 1,
|
||||
['spidertron-remote'] = 1,
|
||||
['modular-armor'] = 1,
|
||||
['solar-panel-equipment'] = 60,
|
||||
['belt-immunity-equipment'] = 1,
|
||||
['battery-equipment'] = 6,
|
||||
['personal-roboport-equipment'] = 5
|
||||
]]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user