advanced carbon furnace

This commit is contained in:
Brevven 2021-05-20 03:00:27 -07:00
parent da645902f6
commit d23ef09f0a
5 changed files with 327 additions and 0 deletions

300
advanced-carbon-furnace.lua Normal file
View file

@ -0,0 +1,300 @@
local futil = require("util");
local util = require("__bztungsten__.tungsten-util");
if util.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mods["Krastorio2"] then
log("Using advanced carbon furnace")
data:extend({
{
type = "item",
name = "advanced-carbon-furnace",
icons = {{
icon = "__base__/graphics/icons/steel-furnace.png",
icon_size = 64, icon_mipmaps = 4,
tint = {a = 1, r = .55, g = .6, b = .6},
}},
subgroup = "smelting-machine",
order = "c[advanced-carbon-furnace]",
place_result = "advanced-carbon-furnace",
stack_size = 50,
},
{
type = "recipe",
name = "advanced-carbon-furnace",
ingredients = {{"steel-furnace", 2}, {"stone-brick", 5}, {"tungsten-plate", 5}},
result = "advanced-carbon-furnace",
energy_required = 6,
enabled = false,
},
{
type = "technology",
name = "advanced-carbon-furnace",
icons = {{
icon = "__base__/graphics/technology/advanced-material-processing.png",
icon_size = 256, icon_mipmaps = 4,
tint = {a = 1, r = .55, g = .6, b = .6},
}},
effects =
{
{
type = "unlock-recipe",
recipe = "advanced-carbon-furnace",
},
},
unit =
{
count = 500,
ingredients =
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1},
},
time = 30,
},
prerequisites = {"advanced-material-processing-2", "productivity-module-3"},
order = "b-b"
},
{
type = "furnace",
name = "advanced-carbon-furnace",
icon = "__base__/graphics/icons/steel-furnace.png",
icon_size = 64, icon_mipmaps = 4,
flags = {"placeable-neutral", "placeable-player", "player-creation"},
minable = {mining_time = 0.2, result = "advanced-carbon-furnace"},
max_health = 300,
corpse = "steel-furnace-remnants",
dying_explosion = "steel-furnace-explosion",
vehicle_impact_sound = data.raw.furnace["steel-furnace"].vehicle_impact_sound,
open_sound = data.raw.furnace["steel-furnace"].machine_open,
close_sound = data.raw.furnace["steel-furnace"].machine_close,
working_sound =
{
sound =
{
{
filename = "__base__/sound/steel-furnace.ogg",
volume = 0.46
}
},
max_sounds_per_type = 4,
audible_distance_modifier = 0.37,
fade_in_ticks = 4,
fade_out_ticks = 20
},
resistances =
{
{
type = "fire",
percent = 100
}
},
collision_box = {{-0.7, -0.7}, {0.7, 0.7}},
selection_box = {{-0.8, -1}, {0.8, 1}},
damaged_trigger_effect = data.raw.furnace["steel-furnace"].hit_effects,
crafting_categories = {}, -- added later
result_inventory_size = 1,
energy_usage = "720kW",
crafting_speed = 8,
base_productivity = 0.3,
source_inventory_size = 1,
energy_source =
{
type = "burner",
fuel_category = "chemical",
effectivity = 1,
emissions_per_minute = 4,
fuel_inventory_size = 1,
light_flicker =
{
color = {0,0,0},
minimum_intensity = 0.6,
maximum_intensity = 0.95
},
smoke =
{
{
name = "smoke",
frequency = 10,
position = {0.7, -1.2},
starting_vertical_speed = 0.08,
starting_frame_deviation = 60
}
}
},
animation =
{
layers =
{
{
filename = "__base__/graphics/entity/steel-furnace/steel-furnace.png",
priority = "high",
width = 85,
height = 87,
frame_count = 1,
shift = futil.by_pixel(-1.5, 1.5),
tint = {a = 1, r = .55, g = .6, b = .6},
hr_version =
{
filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace.png",
priority = "high",
width = 171,
height = 174,
frame_count = 1,
shift = futil.by_pixel(-1.25, 2),
scale = 0.5,
tint = {a = 1, r = .55, g = .6, b = .6},
}
},
{
filename = "__base__/graphics/entity/steel-furnace/steel-furnace-shadow.png",
priority = "high",
width = 139,
height = 43,
frame_count = 1,
draw_as_shadow = true,
shift = futil.by_pixel(39.5, 11.5),
hr_version =
{
filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace-shadow.png",
priority = "high",
width = 277,
height = 85,
frame_count = 1,
draw_as_shadow = true,
shift = futil.by_pixel(39.25, 11.25),
scale = 0.5
}
}
}
},
working_visualisations =
{
{
draw_as_light = true,
fadeout = true,
effect = "flicker",
animation =
{
filename = "__base__/graphics/entity/steel-furnace/steel-furnace-fire.png",
priority = "high",
line_length = 8,
width = 29,
height = 40,
frame_count = 48,
direction_count = 1,
shift = futil.by_pixel(-0.5, 6),
hr_version =
{
filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace-fire.png",
priority = "high",
line_length = 8,
width = 57,
height = 81,
frame_count = 48,
direction_count = 1,
shift = futil.by_pixel(-0.75, 5.75),
scale = 0.5
}
},
},
{
fadeout = true,
draw_as_light = true,
effect = "flicker",
animation =
{
filename = "__base__/graphics/entity/steel-furnace/steel-furnace-glow.png",
priority = "high",
width = 60,
height = 43,
frame_count = 1,
shift = {0.03125, 0.640625},
blend_mode = "additive"
}
},
{
fadeout = true,
draw_as_light = true,
effect = "flicker",
animation =
{
filename = "__base__/graphics/entity/steel-furnace/steel-furnace-working.png",
priority = "high",
line_length = 1,
width = 64,
height = 74,
frame_count = 1,
direction_count = 1,
shift = futil.by_pixel(0, -4),
blend_mode = "additive",
hr_version =
{
filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace-working.png",
priority = "high",
line_length = 1,
width = 128,
height = 150,
frame_count = 1,
direction_count = 1,
shift = futil.by_pixel(0, -5),
blend_mode = "additive",
scale = 0.5,
}
}
},
{
draw_as_light = true,
draw_as_sprite = false,
fadeout = true,
effect = "flicker",
animation =
{
filename = "__base__/graphics/entity/steel-furnace/steel-furnace-ground-light.png",
priority = "high",
line_length = 1,
draw_as_sprite = false,
width = 78,
height = 64,
frame_count = 1,
direction_count = 1,
shift = futil.by_pixel(0, 48),
blend_mode = "additive",
hr_version =
{
filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace-ground-light.png",
priority = "high",
line_length = 1,
draw_as_sprite = false,
width = 152,
height = 126,
frame_count = 1,
direction_count = 1,
shift = futil.by_pixel(1, 48),
blend_mode = "additive",
scale = 0.5,
}
},
},
},
fast_replaceable_group = "furnace",
water_reflection =
{
pictures =
{
filename = "__base__/graphics/entity/steel-furnace/steel-furnace-reflection.png",
priority = "extra-high",
width = 20,
height = 24,
shift = futil.by_pixel(0, 45),
tint = {a = 1, r = .55, g = .6, b = .6},
variation_count = 1,
scale = 5
},
rotate = false,
orientation_to_variation = false
}
},
})
end

View file

@ -1,4 +1,13 @@
---------------------------------------------------------------------------------------------------
Version: 0.0.7
Date: 2021-05-20
Features:
- Optional advanced carbon furnace for megabase tungsten carbide production
Changes:
- Wolframite is richer, farther from the start (no change within 1000 tiles)
Fixes:
- Aircraft afterburner recipe
---------------------------------------------------------------------------------------------------
Version: 0.0.6
Date: 2021-05-19
Features:

View file

@ -4,3 +4,4 @@ require("tungsten-recipe")
require("tungsten-enriched") -- Enriched for Krastorio 2
require("tungsten-recipe-se") -- Space Exploration special recipes (depends on K2 if present)
require("tungsten-compressed")
require("advanced-carbon-furnace")

View file

@ -1,6 +1,11 @@
[entity-name]
tungsten-ore=Wolframite
tungsten-chest=Tungsten chest
advanced-carbon-furnace=__ITEM__advanced-carbon-furnace__
[entity-description]
advanced-carbon-furnace=For making tungsten carbide quickly and efficiently. Burns a lot of fuel.
[autoplace-control-names]
tungsten-ore=[item=tungsten-ore] Wolframite
@ -14,15 +19,18 @@ rocket-engine-nozzle=Rocket engine nozzle
enriched-tungsten=Enriched tungsten
tungsten-chest=Tungsten chest
compressed-tungsten-ore=Compressed tungsten ore
advanced-carbon-furnace=Advanced carbon furnace
[item-description]
tungsten-ore=Can be smelted into tungsten plates
enriched-tungsten=Can be efficiently smelted into tungsten plates
advanced-carbon-furnace=For making tungsten carbide quickly and efficiently. Burns a lot of fuel.
[technology-name]
tungsten-processing=Tungsten processing
enriched-tungsten=Enriched tungsten
tungsten-matter-processing=Tungsten conversion
advanced-carbon-furnace=__ITEM__advanced-carbon-furnace__
[technology-description]
enriched-tungsten=Enrich tungsten ore, purifying with ammonia [fluid=ammonia] and water [fluid=water], improving the final yield. Produce dirty water [fluid=dirty-water] as a byproduct.
@ -43,6 +51,8 @@ dirty-water-filtration-tungsten=Filter dirty water, giving wolframite [item=tung
[mod-setting-name]
bztungsten-avoid-military=Avoid military science pack
bztungsten-advanced-carbon-furnace=Enable the advanced carbon furnace
[mod-setting-description]
bztungsten-avoid-military=If 'yes', rocketry will no longer require military science.
bztungsten-advanced-carbon-furnace=A furnace to smelt tungsten carbide quickly. Meant only for very large factories.

View file

@ -7,4 +7,11 @@ data:extend(
default_value = "no",
allowed_values = {"yes", "no"},
},
{
type = "string-setting",
name = "bztungsten-advanced-carbon-furnace",
setting_type = "startup",
default_value = "no",
allowed_values = {"yes", "no"},
},
})