forked from mtcontrib/spears
Deprecate completely defaults.lua
This commit is contained in:
parent
ee21ce3826
commit
dd5c92c0bc
@ -3,9 +3,9 @@
|
|||||||
-- minetest.settings:set("spears_throw_speed", 13)
|
-- minetest.settings:set("spears_throw_speed", 13)
|
||||||
--end
|
--end
|
||||||
|
|
||||||
if minetest.settings:get("spears_drag_coeff") == nil then
|
--[[ if minetest.settings:get("spears_drag_coeff") == nil then
|
||||||
minetest.settings:set("spears_drag_coeff", 0.1)
|
minetest.settings:set("spears_drag_coeff", 0.1)
|
||||||
end
|
end ]]
|
||||||
|
|
||||||
-- if minetest.settings:get("spears_node_cracky_limit") == nil then
|
-- if minetest.settings:get("spears_node_cracky_limit") == nil then
|
||||||
-- minetest.settings:set("spears_node_cracky_limit", 3)
|
-- minetest.settings:set("spears_node_cracky_limit", 3)
|
||||||
|
@ -131,7 +131,7 @@ function spears_set_entity(spear_type, base_damage, toughness)
|
|||||||
end
|
end
|
||||||
else -- Get drag
|
else -- Get drag
|
||||||
local viscosity = minetest.registered_nodes[node.name].liquid_viscosity
|
local viscosity = minetest.registered_nodes[node.name].liquid_viscosity
|
||||||
local drag_coeff = tonumber(minetest.settings:get("spears_drag_coeff"))
|
local drag_coeff = tonumber(minetest.settings:get("spears_drag_coeff") or 0.1)
|
||||||
local drag = math.max(viscosity, drag_coeff)
|
local drag = math.max(viscosity, drag_coeff)
|
||||||
local acceleration = vector.multiply(velocity, -drag)
|
local acceleration = vector.multiply(velocity, -drag)
|
||||||
acceleration.y = acceleration.y - 10 * ((7 - drag) / 7)
|
acceleration.y = acceleration.y - 10 * ((7 - drag) / 7)
|
||||||
|
2
init.lua
2
init.lua
@ -1,4 +1,4 @@
|
|||||||
dofile(minetest.get_modpath("spears").."/defaults.lua")
|
-- dofile(minetest.get_modpath("spears").."/defaults.lua")
|
||||||
|
|
||||||
-- local input = io.open(minetest.get_modpath("spears").."/spears.conf", "r")
|
-- local input = io.open(minetest.get_modpath("spears").."/spears.conf", "r")
|
||||||
-- if input then
|
-- if input then
|
||||||
|
Loading…
Reference in New Issue
Block a user