aboutsummaryrefslogtreecommitdiff
path: root/prototypes/energy-pad.lua
blob: 4c79661cce49f5d59fe5e132eaa012ad39b890c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
local portable_nuclear_reactor = data.raw["generator-equipment"]["fission-reactor-equipment"]
local clp = data.raw["cargo-landing-pad"]["cargo-landing-pad"]
local energy_source = util.table.deepcopy(data.raw["electric-energy-interface"]["hidden-electric-energy-interface"])

energy_source.name = "clp-electric-source"
energy_source.localised_name =  {"entity-name.cargo-landing-pad"}
energy_source.icon = clp.icon
energy_source.energy_source = {
    type = "electric",
    buffer_capacity = "5MJ",
    usage_priority = "tertiary"
}
energy_source.energy_production = portable_nuclear_reactor.power
energy_source.collision_box = clp.collision_box
energy_source.selection_box = clp.selection_box


local clp_recipe = util.table.deepcopy(data.raw["recipe"]["cargo-landing-pad"])
clp_recipe.ingredients =
{
    {type = "item", name = "concrete", amount = 250},
    {type = "item", name = "processing-unit", amount = 35},
    {type = "item", name = "steel-plate", amount = 80},
    {type = "item", name = "accumulator", amount = 1},
    {type = "item", name = "fission-reactor-equipment", amount = 1},
    {type = "item", name = "construction-robot", amount = 10}
}


local thermal_pad = util.table.deepcopy(data.raw["heat-interface"]["heat-interface"])
thermal_pad.minable = nil
thermal_pad.gui_mode = "none"
thermal_pad.heat_buffer.default_temperature = 15
thermal_pad.heat_buffer.max_temperature = 31
thermal_pad.heat_buffer.min_working_temperature = 30
thermal_pad.flags = {"placeable-neutral", "player-creation", "not-deconstructable"}
thermal_pad.name = "clp-heat-interface"

--entity.set_heat_setting{temperature = 1000, mode = "exactly"}

local heat_pipe = util.table.deepcopy(data.raw["heat-pipe"]["heat-pipe"])
heat_pipe.name = "clp-heat-pipe"
heat_pipe.flags = {"placeable-neutral", "player-creation", "not-deconstructable"}
heat_pipe.minable = nil

data:extend({
    energy_source,
    clp_recipe,
    heat_pipe,
    thermal_pad
})