Add bronze as material, some melter/caster fixes

This commit is contained in:
Evert 2018-04-07 10:07:31 +03:00
parent af627a6b41
commit a98f214a1b
No known key found for this signature in database
GPG Key ID: 1688DA83D222D0B5
8 changed files with 61 additions and 38 deletions

@ -1,7 +1,7 @@
-- Register molten metals
-- Default metals
local metals = {"steel", "copper", "tin", "gold", "mese", "obsidian", "lead", "chromium", "zinc", "silver", "mithril"}
local metals = {"steel", "copper", "tin", "bronze", "gold", "mese", "obsidian", "lead", "chromium", "zinc", "silver", "mithril"}
for _,v in pairs(metals) do
fluidity.register_molten_metal(v)

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

@ -9,9 +9,9 @@ metal_caster.max_metal = 16000
metal_caster.spec = metal_melter.spec
metal_caster.casts = {
ingot = {description = "Ingot", result = "ingot", cost = 2, typenames = {"ingot"}},
ingot = {description = "Ingot", result = "ingot", cost = 1, typenames = {"ingot"}},
lump = {description = "Lump", result = "lump", cost = 2, typenames = {"lump"}},
gem = {description = "Gem", result = "crystal", cost = 2, typenames = {"crystal", "gem"}}
gem = {description = "Gem", result = "crystal", cost = 1, typenames = {"crystal", "gem"}}
}
local metal_cache = {}
@ -31,10 +31,10 @@ function metal_caster.get_metal_caster_formspec_default()
"image[6.68,0;1.4,2.8;melter_gui_barbg.png]"..
"image[6.68,0;1.4,2.8;melter_gui_gauge.png]"..
"label[0.08,3.75;No Molten Metal]"..
"list[context;bucket_in;4.75,0.2;1,1;]"..
"list[context;bucket_out;4.75,1.4;1,1;]"..
"image[5.75,0.2;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
"image[5.75,1.4;1,1;gui_furnace_arrow_bg.png^[transformR90]"..
"list[context;bucket_in;4.7,0.2;1,1;]"..
"list[context;bucket_out;4.7,1.4;1,1;]"..
"image[5.7,0.2;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
"image[5.7,1.4;1,1;gui_furnace_arrow_bg.png^[transformR90]"..
"button[6.68,2.48;1.33,1;dump;Dump]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
@ -77,10 +77,10 @@ function metal_caster.get_metal_caster_formspec(data)
"image[6.68,"..(2.44 - metal_percent * 2.44)..";1.4,"..(metal_percent * 2.8)..";"..data.metal_texture.."]"..
"image[6.68,0;1.4,2.8;melter_gui_gauge.png]"..
metal_formspec..
"list[context;bucket_in;4.75,0.2;1,1;]"..
"list[context;bucket_out;4.75,1.4;1,1;]"..
"image[5.75,0.2;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
"image[5.75,1.4;1,1;gui_furnace_arrow_bg.png^[transformR90]"..
"list[context;bucket_in;4.7,0.2;1,1;]"..
"list[context;bucket_out;4.7,1.4;1,1;]"..
"image[5.7,0.2;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
"image[5.7,1.4;1,1;gui_furnace_arrow_bg.png^[transformR90]"..
"button[6.68,2.48;1.33,1;dump;Dump]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
@ -384,6 +384,11 @@ local function caster_node_timer(pos, elapsed)
inv:set_stack("output", 1, increment_stack(output_stack, stack))
metal_count = metal_count - result_cost
coolant_count = coolant_count - coolant_cost
if metal_count == 0 then
metal = ""
end
refresh = true
end
end
@ -404,6 +409,11 @@ local function caster_node_timer(pos, elapsed)
inv:set_stack("cast", 1, decrement_stack(cast_stack))
metal_count = metal_count - result_cost
coolant_count = coolant_count - coolant_cost
if metal_count == 0 then
metal = ""
end
refresh = true
end
end

@ -63,10 +63,10 @@ function metal_melter.get_metal_melter_formspec_default()
"image[6.68,0;1.4,2.8;melter_gui_barbg.png]"..
"image[6.68,0;1.4,2.8;melter_gui_gauge.png]"..
"label[0.08,3.75;No Molten Metal]"..
"list[context;bucket_in;4.75,0.2;1,1;]"..
"list[context;bucket_out;4.75,1.4;1,1;]"..
"image[5.75,0.2;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
"image[5.75,1.4;1,1;gui_furnace_arrow_bg.png^[transformR90]"..
"list[context;bucket_in;4.7,0.2;1,1;]"..
"list[context;bucket_out;4.7,1.4;1,1;]"..
"image[5.7,0.2;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
"image[5.7,1.4;1,1;gui_furnace_arrow_bg.png^[transformR90]"..
"button[6.68,2.48;1.33,1;dump;Dump]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
@ -106,10 +106,10 @@ function metal_melter.get_metal_melter_formspec(data)
"image[6.68,"..(2.44 - metal_percent * 2.44)..";1.4,"..(metal_percent * 2.8)..";"..data.metal_texture.."]"..
"image[6.68,0;1.4,2.8;melter_gui_gauge.png]"..
metal_formspec..
"list[context;bucket_in;4.75,0.2;1,1;]"..
"list[context;bucket_out;4.75,1.4;1,1;]"..
"image[5.75,0.2;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
"image[5.75,1.4;1,1;gui_furnace_arrow_bg.png^[transformR90]"..
"list[context;bucket_in;4.7,0.2;1,1;]"..
"list[context;bucket_out;4.7,1.4;1,1;]"..
"image[5.7,0.2;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
"image[5.7,1.4;1,1;gui_furnace_arrow_bg.png^[transformR90]"..
"button[6.68,2.48;1.33,1;dump;Dump]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..

@ -60,6 +60,34 @@ local modifiers = {
}
},
copper = {
cracky = {times={[1]=3.80, [2]=1.50, [3]=0.70}, uses=20, maxlevel=2},
crumbly = {times={[1]=1.30, [2]=0.80, [3]=0.30}, uses=30, maxlevel=2},
snappy = {times={[1]=2.30, [2]=1.10, [3]=0.20}, uses=30, maxlevel=2},
choppy = {times={[1]=2.30, [2]=1.30, [3]=0.90}, uses=20, maxlevel=2},
damagegroups = {fleshy = 5},
explody = nil,
binding = {increase = 0.05, uses = 3},
rod = {increase = 0.06, uses = 5},
tags = {
{name = "cold", description = "Cold"}
}
},
tin = {
cracky = {times={[1]=3.70, [2]=1.40, [3]=0.60}, uses=20, maxlevel=2},
crumbly = {times={[1]=1.20, [2]=0.70, [3]=0.20}, uses=30, maxlevel=2},
snappy = {times={[1]=2.20, [2]=1.00, [3]=0.10}, uses=30, maxlevel=2},
choppy = {times={[1]=2.20, [2]=1.20, [3]=0.80}, uses=20, maxlevel=2},
damagegroups = {fleshy = 5},
explody = nil,
binding = {increase = 0.02, uses = -2},
rod = {increase = 0.06, uses = -3},
tags = {
{name = "cheap", description = "Cheap"}
}
},
bronze = {
cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=30, maxlevel=2},
crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=40, maxlevel=2},
snappy = {times={[1]=2.50, [2]=1.20, [3]=0.35}, uses=40, maxlevel=2},
@ -67,25 +95,9 @@ local modifiers = {
damagegroups = {fleshy = 6},
explody = nil,
binding = {increase = 0.08, uses = 3},
rod = {increase = 0.08, uses = 5},
tags = {
{name = "cold", description = "Cold"}
}
},
tin = {
cracky = {times={[1]=3.80, [2]=1.50, [3]=0.70}, uses=20, maxlevel=2},
crumbly = {times={[1]=1.30, [2]=0.80, [3]=0.30}, uses=30, maxlevel=2},
snappy = {times={[1]=2.30, [2]=1.10, [3]=0.20}, uses=30, maxlevel=2},
choppy = {times={[1]=2.30, [2]=1.30, [3]=0.90}, uses=20, maxlevel=2},
damagegroups = {fleshy = 6},
explody = nil,
binding = {increase = 0.07, uses = -2},
rod = {increase = 0.07, uses = -3},
tags = {
{name = "cheap", description = "Cheap"}
}
binding = {increase = 0.09, uses = 2},
rod = {increase = 0.01, uses = 10},
tags = {}
},
mese = {
cracky = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=20, maxlevel=3},
@ -258,6 +270,7 @@ tinkering.materials = {
steel = {name = "Steel", default = "default:steel_ingot", color = "#FFF", base = "ingot", cast = true, modifier = modifiers.steel},
copper = {name = "Copper", default = "default:copper_ingot", color = "#E87945", base = "ingot", cast = true, modifier = modifiers.copper},
tin = {name = "Tin", default = "default:tin_ingot", color = "#C1C1C1", base = "ingot", cast = true, modifier = modifiers.tin},
bronze = {name = "Bronze", default = "default:bronze_ingot", color = "#C14E19", base = "ingot", cast = true, modifier = modifiers.bronze},
gold = {name = "Gold", default = "default:gold_ingot", color = "#FFFF54", base = "ingot", cast = true, modifier = modifiers.gold},
mese = {name = "Mese", default = "default:mese_crystal", color = "#FFFF02", base = "gem", cast = true, modifier = modifiers.mese},