mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
Update
This commit is contained in:
@@ -3,6 +3,7 @@ local items = {
|
|||||||
enabled = true,
|
enabled = true,
|
||||||
type = 'solar-panel',
|
type = 'solar-panel',
|
||||||
name = 'solar-panel',
|
name = 'solar-panel',
|
||||||
|
ref_name = 'solar-panel',
|
||||||
min = 2,
|
min = 2,
|
||||||
max = 8,
|
max = 8,
|
||||||
base = 60
|
base = 60
|
||||||
@@ -11,6 +12,7 @@ local items = {
|
|||||||
enabled = true,
|
enabled = true,
|
||||||
type = 'accumulator',
|
type = 'accumulator',
|
||||||
name = 'accumulator',
|
name = 'accumulator',
|
||||||
|
ref_name = 'accumulator',
|
||||||
min = 2,
|
min = 2,
|
||||||
max = 8,
|
max = 8,
|
||||||
base = 5
|
base = 5
|
||||||
@@ -19,6 +21,7 @@ local items = {
|
|||||||
enabled = true,
|
enabled = true,
|
||||||
type = 'boiler',
|
type = 'boiler',
|
||||||
name = 'boiler',
|
name = 'boiler',
|
||||||
|
ref_name = 'boiler',
|
||||||
min = 2,
|
min = 2,
|
||||||
max = 5
|
max = 5
|
||||||
},
|
},
|
||||||
@@ -26,6 +29,7 @@ local items = {
|
|||||||
enabled = true,
|
enabled = true,
|
||||||
type = 'generator',
|
type = 'generator',
|
||||||
name = 'steam-engine',
|
name = 'steam-engine',
|
||||||
|
ref_name = 'steam-engine',
|
||||||
min = 2,
|
min = 2,
|
||||||
max = 5
|
max = 5
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ end
|
|||||||
|
|
||||||
-- item
|
-- item
|
||||||
local function EI(source, tier)
|
local function EI(source, tier)
|
||||||
local item = table.deepcopy(data.raw.item[source.type])
|
local item = table.deepcopy(data.raw.item[source.ref_name])
|
||||||
item.name = source.name .. '-' .. tier
|
item.name = source.name .. '-' .. tier
|
||||||
item.place_result = source.name .. '-' .. tier
|
item.place_result = source.name .. '-' .. tier
|
||||||
item.max_health = 200 * (2 ^ (tier - 1))
|
item.max_health = 200 * (2 ^ (tier - 1))
|
||||||
@@ -114,7 +114,7 @@ local function ET(source, tier)
|
|||||||
if tier <= source.max then
|
if tier <= source.max then
|
||||||
table.insert(item.effects, {
|
table.insert(item.effects, {
|
||||||
type = 'unlock-recipe',
|
type = 'unlock-recipe',
|
||||||
recipe = source.name .. tier
|
recipe = source.name .. '-' .. tier
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ local items = {
|
|||||||
min = 2,
|
min = 2,
|
||||||
max = 8,
|
max = 8,
|
||||||
base = 30,
|
base = 30,
|
||||||
graphics_source = nil,
|
|
||||||
graphics_name = 'solar-panel-equipment'
|
graphics_name = 'solar-panel-equipment'
|
||||||
},
|
},
|
||||||
['fusion-reactor'] = {
|
['fusion-reactor'] = {
|
||||||
@@ -23,7 +22,6 @@ local items = {
|
|||||||
min = 2,
|
min = 2,
|
||||||
max = 8,
|
max = 8,
|
||||||
base = 750,
|
base = 750,
|
||||||
graphics_source = nil,
|
|
||||||
graphics_name = 'fusion-reactor-equipment'
|
graphics_name = 'fusion-reactor-equipment'
|
||||||
},
|
},
|
||||||
['battery'] = {
|
['battery'] = {
|
||||||
@@ -35,8 +33,7 @@ local items = {
|
|||||||
min = 3,
|
min = 3,
|
||||||
max = 8,
|
max = 8,
|
||||||
base = 100,
|
base = 100,
|
||||||
graphics_source = nil,
|
graphics_name = 'battery-mk2-equipment'
|
||||||
graphics_name = 'battery-equipment'
|
|
||||||
},
|
},
|
||||||
['personal-laser-defense'] = {
|
['personal-laser-defense'] = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
@@ -47,7 +44,6 @@ local items = {
|
|||||||
min = 2,
|
min = 2,
|
||||||
max = 8,
|
max = 8,
|
||||||
base = 3,
|
base = 3,
|
||||||
graphics_source = nil,
|
|
||||||
graphics_name = 'personal-laser-defense-equipment'
|
graphics_name = 'personal-laser-defense-equipment'
|
||||||
},
|
},
|
||||||
['energy-shield'] = {
|
['energy-shield'] = {
|
||||||
@@ -59,8 +55,7 @@ local items = {
|
|||||||
min = 3,
|
min = 3,
|
||||||
max = 8,
|
max = 8,
|
||||||
base = 150,
|
base = 150,
|
||||||
graphics_source = nil,
|
graphics_name = 'energy-shield-mk2-equipment'
|
||||||
graphics_name = 'energy-shield-equipment'
|
|
||||||
},
|
},
|
||||||
['personal-roboport'] = {
|
['personal-roboport'] = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
@@ -71,8 +66,7 @@ local items = {
|
|||||||
min = 3,
|
min = 3,
|
||||||
max = 8,
|
max = 8,
|
||||||
base = 0.5,
|
base = 0.5,
|
||||||
graphics_source = nil,
|
graphics_name = 'personal-roboport-mk2-equipment'
|
||||||
graphics_name = 'personal-roboport-equipment'
|
|
||||||
},
|
},
|
||||||
['night-vision'] = {
|
['night-vision'] = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
@@ -83,7 +77,6 @@ local items = {
|
|||||||
min = 2,
|
min = 2,
|
||||||
max = 2,
|
max = 2,
|
||||||
base = 1,
|
base = 1,
|
||||||
graphics_source = nil,
|
|
||||||
graphics_name = 'night-vision-equipment'
|
graphics_name = 'night-vision-equipment'
|
||||||
},
|
},
|
||||||
['exoskeleton'] = {
|
['exoskeleton'] = {
|
||||||
@@ -95,7 +88,6 @@ local items = {
|
|||||||
min = 2,
|
min = 2,
|
||||||
max = 2,
|
max = 2,
|
||||||
base = 0.6,
|
base = 0.6,
|
||||||
graphics_source = nil,
|
|
||||||
graphics_name = 'exoskeleton-equipment'
|
graphics_name = 'exoskeleton-equipment'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -197,15 +189,8 @@ local function EE(source, tier)
|
|||||||
end
|
end
|
||||||
|
|
||||||
item['shape'] = {width = w, height = h, type = 'full'}
|
item['shape'] = {width = w, height = h, type = 'full'}
|
||||||
|
item['sprite'] = {filename = '__base__/graphics/equipment/' .. source.graphics_name .. '.png', width = w * 32, height = h * 32, priority = 'medium', hr_version = {filename = '__base__/graphics/equipment/hr-' .. source.graphics_name .. '.png', width = w * 64, height = h *64, priority = 'medium', scale = 0.5}}
|
||||||
|
|
||||||
--[[
|
|
||||||
if source.graphics_source == nil then
|
|
||||||
item['sprite'] = {filename = graphics_location .. source.graphics_name .. '-e.png', width = w * 32, height = h * 32, priority = 'medium', hr_version = {filename = graphics_location .. source.graphics_name .. '-eh.png', width = w * 64, height = h *64, priority = 'medium', scale = 0.5}}
|
|
||||||
else
|
|
||||||
item['sprite'] = {filename = source.graphics_source, width = w * 32, height = h * 32, priority = 'medium'}
|
|
||||||
end
|
|
||||||
]]
|
|
||||||
|
|
||||||
data:extend({item})
|
data:extend({item})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user