More sane depends and load order, trees no longer breakable by hand, removed level from energy formula, start player with steel axe and landrush claims
This commit is contained in:
parent
a065aeef13
commit
cbccea7ac5
1
mods/adventuretest/depends.txt
Normal file
1
mods/adventuretest/depends.txt
Normal file
@ -0,0 +1 @@
|
||||
default
|
@ -1 +0,0 @@
|
||||
skills?
|
@ -13,9 +13,20 @@ intllib=minetest.get_modpath("intllib")
|
||||
-- Definitions made by this mod that other mods can use too
|
||||
default = {}
|
||||
|
||||
-- HAVE TO PUT SKILL IDS HERE BECAUSE THEY ARE USED IN nodes.lua and others
|
||||
-- CONSTANT IDs
|
||||
SKILL_WOOD = 1
|
||||
SKILL_STONE = 2
|
||||
SKILL_METAL = 4
|
||||
SKILL_CRYSTAL = 8
|
||||
|
||||
SKILL_SMELTING= 16
|
||||
SKILL_CRAFTING= 32
|
||||
SKILL_ARROW = 64
|
||||
SKILL_MAGIC = 128
|
||||
|
||||
-- Load files
|
||||
dofile(minetest.get_modpath("default").."/functions.lua")
|
||||
dofile(minetest.get_modpath("default").."/register_skills.lua")
|
||||
dofile(minetest.get_modpath("default").."/nodes.lua")
|
||||
dofile(minetest.get_modpath("default").."/tools.lua")
|
||||
dofile(minetest.get_modpath("default").."/craftitems.lua")
|
||||
|
@ -280,7 +280,7 @@ minetest.register_node("default:tree", {
|
||||
tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
||||
groups = {tree=1,choppy=2,flammable=2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
@ -290,7 +290,7 @@ minetest.register_node("default:jungletree", {
|
||||
tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"},
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
||||
groups = {tree=1,choppy=2,flammable=2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
@ -19,7 +19,7 @@ function energy.update_energy(p,name)
|
||||
end
|
||||
|
||||
local anim = default.player_get_animation(p)
|
||||
local adj = 0.2 + ( 0.2 * ( skills.player_levels[name].level / 5 ) )
|
||||
local adj = 0.2
|
||||
if anim.animation == "lay" then
|
||||
adj = adj + 0.75
|
||||
if math.random(0,4) == 1 then
|
||||
|
@ -4,5 +4,9 @@ minetest.register_on_newplayer(function(player)
|
||||
player:get_inventory():add_item('main', 'default:stick 6')
|
||||
player:get_inventory():add_item('main', 'default:torch 25')
|
||||
player:get_inventory():add_item('main', 'default:tree 3')
|
||||
player:get_inventory():add_item('main', 'default:axe_steel')
|
||||
if minetest.get_modpath("landrush") ~= nil then
|
||||
player:get_inventory():add_item('main', 'landrush:landclaim 4')
|
||||
end
|
||||
end)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
minetest.register_node("mg:savannatree", {
|
||||
description = "Savannawood Tree",
|
||||
tiles = {"mg_dry_tree_top.png", "mg_dry_tree_top.png", "mg_dry_tree.png"},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
||||
groups = {tree=1,choppy=2,flammable=2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
@ -31,7 +31,7 @@ minetest.register_node("mg:savannaleaves", {
|
||||
minetest.register_node("mg:savannawood", {
|
||||
description = "Savannawood Planks",
|
||||
tiles = {"mg_dry_wood.png"},
|
||||
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
|
||||
groups = {choppy=2,flammable=3,wood=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
@ -127,7 +127,7 @@ minetest.register_abm({
|
||||
minetest.register_node("mg:pinetree", {
|
||||
description = "Pine Tree",
|
||||
tiles = {"mg_pine_tree_top.png", "mg_pine_tree_top.png", "mg_pine_tree.png"},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
||||
groups = {tree=1,choppy=2,flammable=2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
@ -157,7 +157,7 @@ minetest.register_node("mg:pineleaves", {
|
||||
minetest.register_node("mg:pinewood", {
|
||||
description = "Pine Planks",
|
||||
tiles = {"mg_pine_wood.png"},
|
||||
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
|
||||
groups = {choppy=2,flammable=3,wood=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
default
|
||||
fire
|
||||
cottages?
|
||||
cottages?
|
||||
throwing?
|
1
mods/physics/depends.txt
Normal file
1
mods/physics/depends.txt
Normal file
@ -0,0 +1 @@
|
||||
default
|
@ -0,0 +1 @@
|
||||
default
|
@ -14,6 +14,7 @@ function skills.initialize()
|
||||
minetest.log("action","Loading player skills and levels")
|
||||
skills.player_skills = default.deserialize_from_file(skill_file)
|
||||
skills.player_levels = default.deserialize_from_file(level_file)
|
||||
dofile(minetest.get_modpath("skills").."/register_skills.lua")
|
||||
end
|
||||
|
||||
function skills.get_def(skill_id)
|
||||
@ -138,6 +139,9 @@ minetest.register_on_joinplayer(function (player)
|
||||
skill_inv:set_size(list, 1)
|
||||
skill_inv:set_stack(list, 1, player_inv:get_stack(list, 1))
|
||||
end
|
||||
if skills.player_levels[name] == nil then
|
||||
skills.player_levels[name] = {level=1,exp=1}
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_shutdown(function()
|
||||
@ -147,7 +151,7 @@ end)
|
||||
|
||||
minetest.register_on_newplayer(function(player)
|
||||
skills.set_default_skills(player:get_player_name())
|
||||
skills.player_levels[player:get_player_name()] = {level=1, exp=0}
|
||||
skills.player_levels[player:get_player_name()] = {level=1,exp=1}
|
||||
end)
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
@ -175,4 +179,4 @@ minetest.register_on_dieplayer(function(player)
|
||||
skills.add_exp(name,decrease)
|
||||
end)
|
||||
|
||||
minetest.after(1, skills.initialize)
|
||||
skills.initialize()
|
@ -1,17 +1,3 @@
|
||||
-- REGISTER SKILLS
|
||||
|
||||
|
||||
-- CONSTANT IDs
|
||||
SKILL_WOOD = 1
|
||||
SKILL_STONE = 2
|
||||
SKILL_METAL = 4
|
||||
SKILL_CRYSTAL = 8
|
||||
|
||||
SKILL_SMELTING= 16
|
||||
SKILL_CRAFTING= 32
|
||||
SKILL_ARROW = 64
|
||||
SKILL_MAGIC = 128
|
||||
|
||||
-- REGISTER THE SKILLS
|
||||
skills.register_skill(SKILL_WOOD, { desc = 'Wood', max_level = 10, level_exp = 15 })
|
||||
skills.register_skill(SKILL_STONE, { desc = 'Stone', max_level = 10, level_exp = 15 })
|
Loading…
x
Reference in New Issue
Block a user