Code In Question:
Code: Select all
--Functions
function create_gas(parameters)
return--Takes gas name,flow color,default temperature and when it turns into a gas and
{ --puts this into a form that can be passed into data:extend
icon="__highfleet-ships__/graphics/icons/"..parameters.name..".png",
icon_mipmaps=4,
icon_size=64,
type="fluid",
name=parameters.name,
subgroup="fluid",
base_color={},
flow_color=parameters.flow_color,
default_temperature=parameters.default_temperature,
gas_temperature=parameters.gas_temperature,
for keys,values in ipairs(flow_color) do
table.insert(base_color,math.floor(0.5*values))
end
}
end