More scaling time definitions
Also, scaling_time completely overrides group-based scaling time logic.
This commit is contained in:
parent
1c612ee1f7
commit
0012c2673b
@ -19,7 +19,8 @@ minetest.register_node(modname .. ":shelf", {
|
||||
cracky = 3,
|
||||
visinv = 1,
|
||||
storebox = 2,
|
||||
totable = 1
|
||||
totable = 1,
|
||||
scaling_time = 50
|
||||
},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
|
@ -15,7 +15,8 @@ minetest.register_node(modname .. ":glass", {
|
||||
groups = {
|
||||
silica = 1,
|
||||
silica_clear = 1,
|
||||
cracky = 3
|
||||
cracky = 3,
|
||||
scaling_time = 300
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
@ -27,7 +28,8 @@ minetest.register_node(modname .. ":glass_opaque", {
|
||||
tiles = {modname .. "_glass_frost.png"},
|
||||
groups = {
|
||||
silica = 1,
|
||||
cracky = 3
|
||||
cracky = 3,
|
||||
scaling_time = 300
|
||||
},
|
||||
paramtype = "light",
|
||||
sounds = nodecore.sounds("nc_optics_glassy")
|
||||
@ -44,7 +46,8 @@ minetest.register_node(modname .. ":glass_crude", {
|
||||
groups = {
|
||||
silica = 1,
|
||||
falling_node = 1,
|
||||
crumbly = 2
|
||||
crumbly = 2,
|
||||
scaling_time = 150
|
||||
},
|
||||
sounds = nodecore.sounds("nc_terrain_crunchy")
|
||||
})
|
||||
@ -61,7 +64,8 @@ minetest.register_node(modname .. ":glass_float", {
|
||||
groups = {
|
||||
silica = 1,
|
||||
silica_clear = 1,
|
||||
cracky = 3
|
||||
cracky = 3,
|
||||
scaling_time = 300
|
||||
},
|
||||
sounds = nodecore.sounds("nc_optics_glassy")
|
||||
})
|
||||
|
@ -43,7 +43,8 @@ local basedef = {
|
||||
silica = 1,
|
||||
silica_lens = 1,
|
||||
optic_check = 1,
|
||||
cracky = 3
|
||||
cracky = 3,
|
||||
scaling_time = 125
|
||||
},
|
||||
drop = modname .. ":lens",
|
||||
on_construct = nodecore.optic_check,
|
||||
|
@ -41,7 +41,8 @@ local basedef = {
|
||||
silica = 1,
|
||||
optic_check = 1,
|
||||
cracky = 3,
|
||||
silica_prism = 1
|
||||
silica_prism = 1,
|
||||
scaling_time = 125
|
||||
},
|
||||
drop = modname .. ":prism",
|
||||
on_construct = nodecore.optic_check,
|
||||
|
@ -26,7 +26,8 @@ minetest.register_node(modname .. ":shelf", {
|
||||
fire_fuel = 2,
|
||||
visinv = 1,
|
||||
storebox = 1,
|
||||
totable = 1
|
||||
totable = 1,
|
||||
scaling_time = 200
|
||||
},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
|
@ -47,9 +47,13 @@ hand.on_place = function(stack, player, pointed, ...)
|
||||
cache[pname] = stats
|
||||
|
||||
local timecost = (pointed.under.y > pointed.above.y) and 5 or 3
|
||||
timecost = timecost * ((groups.scaling_time or 100) / 100)
|
||||
if groups.cobbley then timecost = timecost * 0.75 end
|
||||
if groups.falling_node then timecost = timecost * 1.2 end
|
||||
if groups.scaling_time then
|
||||
timecost = timecost * groups.scaling_time / 100
|
||||
else
|
||||
if def.climbable then timecost = timecost * 0.25 end
|
||||
if groups.cobbley then timecost = timecost * 0.75 end
|
||||
if groups.falling_node then timecost = timecost * 1.2 end
|
||||
end
|
||||
if now < stats.start + timecost then return end
|
||||
|
||||
cache[pname] = nil
|
||||
|
@ -154,7 +154,8 @@ local function reg(suff, inner)
|
||||
snappy = 1,
|
||||
container = 100,
|
||||
flammable = 5,
|
||||
tote = 1
|
||||
tote = 1,
|
||||
scaling_time = 50
|
||||
},
|
||||
on_ignite = tote_ignite,
|
||||
stack_max = 1,
|
||||
|
@ -84,7 +84,8 @@ minetest.register_node(modname .. ":tree_bud", {
|
||||
choppy = 2,
|
||||
flammable = 12,
|
||||
fire_fuel = 6,
|
||||
falling_node = 1
|
||||
falling_node = 1,
|
||||
scaling_time = 80
|
||||
},
|
||||
crush_damage = 1,
|
||||
sounds = nodecore.sounds("nc_tree_woody"),
|
||||
@ -103,7 +104,8 @@ minetest.register_node(modname .. ":leaves_bud", {
|
||||
snappy = 1,
|
||||
flammable = 5,
|
||||
fire_fuel = 2,
|
||||
green = 4
|
||||
green = 4,
|
||||
scaling_time = 90
|
||||
},
|
||||
treeable_to = true,
|
||||
drop = "",
|
||||
|
@ -16,7 +16,8 @@ minetest.register_node(modname .. ":root", {
|
||||
groups = {
|
||||
flammable = 50,
|
||||
fire_fuel = 4,
|
||||
choppy = 4
|
||||
choppy = 4,
|
||||
scaling_time = 80
|
||||
},
|
||||
drop = "nc_tree:stick 8",
|
||||
sounds = nodecore.sounds("nc_tree_woody")
|
||||
@ -33,7 +34,8 @@ minetest.register_node(modname .. ":log", {
|
||||
choppy = 2,
|
||||
flammable = 8,
|
||||
fire_fuel = 6,
|
||||
log = 1
|
||||
log = 1,
|
||||
scaling_time = 75
|
||||
},
|
||||
sounds = nodecore.sounds("nc_tree_woody"),
|
||||
paramtype2 = "facedir",
|
||||
@ -52,7 +54,8 @@ minetest.register_node(modname .. ":tree", {
|
||||
flammable = 8,
|
||||
fire_fuel = 6,
|
||||
log = 1,
|
||||
falling_node = 1
|
||||
falling_node = 1,
|
||||
scaling_time = 80
|
||||
},
|
||||
crush_damage = 1,
|
||||
sounds = nodecore.sounds("nc_tree_woody"),
|
||||
@ -82,7 +85,8 @@ minetest.register_node(modname .. ":leaves", {
|
||||
snappy = 1,
|
||||
flammable = 3,
|
||||
fire_fuel = 2,
|
||||
green = 3
|
||||
green = 3,
|
||||
scaling_time = 90
|
||||
},
|
||||
alternate_loose = {
|
||||
tiles = {modname .. "_leaves_dry.png"},
|
||||
|
@ -24,7 +24,7 @@ minetest.register_node(modname .. ":ladder", {
|
||||
snappy = 1,
|
||||
flammable = 2,
|
||||
fire_fuel = 1,
|
||||
falling_node = 1,
|
||||
falling_node = 1
|
||||
},
|
||||
crush_damage = 0.25,
|
||||
paramtype = "light",
|
||||
|
@ -19,7 +19,8 @@ minetest.register_node(modname .. ":shelf", {
|
||||
flammable = 2,
|
||||
fire_fuel = 3,
|
||||
storebox = 1,
|
||||
totable = 1
|
||||
totable = 1,
|
||||
scaling_time = 50
|
||||
},
|
||||
paramtype = "light",
|
||||
sounds = nodecore.sounds("nc_tree_woody"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user