Regnum 3.2.7 upload
|
@ -0,0 +1,21 @@
|
||||||
|
A subgame by 1248
|
||||||
|
I develop the Regnum subgame over the last 5 years
|
||||||
|
Thanks to:
|
||||||
|
NightmareLP who build a mod for my subgame
|
||||||
|
et77 who had some great ideas
|
||||||
|
wuschel1912 who tests the subgame
|
||||||
|
|
||||||
|
|
||||||
|
If you want better tools and/or to upgrade them, Regnum is the right choice for you.
|
||||||
|
With Regnum you can get very fast tools. Some tools can double your ores when you dig for them.
|
||||||
|
You have to craft more then 120 battleaxes to get the best one. The Regnum battle-axe!
|
||||||
|
Only simple things are needed to upgrade your tools. Dirt, cobble…but you need lots of it.
|
||||||
|
Or you need some new ores such as uranium, titanium or more then 20 others.
|
||||||
|
Dig up uranium and you get green experience. Dig up a red or blue ore and you get red or blue experience.
|
||||||
|
Get the highest level, the xp key, the craft key or the bag key.
|
||||||
|
With the craft key you can craft 4x4.
|
||||||
|
Look with the xp key for all xp you need.
|
||||||
|
Get coins, laser-guns and many other rewards
|
||||||
|
Get a gift from 4 mobs.
|
||||||
|
More then 1800 different blocks, items, tools and lots more.
|
||||||
|
It will take a long time before you get the regnum battle-axe, the highest level, all keys,8 Regnum bags and the best armor
|
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
|
@ -0,0 +1,8 @@
|
||||||
|
## Generic ignorable patterns and files
|
||||||
|
*~
|
||||||
|
.*.swp
|
||||||
|
*bak*
|
||||||
|
tags
|
||||||
|
*.vim
|
||||||
|
armor.conf
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
[mod] Visible Player Armor [3d_armor]
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
Depends: default
|
||||||
|
|
||||||
|
Recommends: inventory_plus or unified_inventory (use only one)
|
||||||
|
|
||||||
|
Adds craftable armor that is visible to other players. Each armor item worn contributes to
|
||||||
|
a player's armor group level making them less vulnerable to weapons.
|
||||||
|
|
||||||
|
Armor takes damage when a player is hurt but also offers a percentage chance of healing.
|
||||||
|
Overall level is boosted by 10% when wearing a full matching set.
|
||||||
|
|
||||||
|
Fire protection added by TenPlus1 when using crystal armor if Ethereal mod active, level 1
|
||||||
|
protects against torches, level 2 for crystal spike, level 3 for fire, level 5 for lava.
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Armor can be configured by adding a file called armor.conf in 3d_armor mod and/or world directory.
|
||||||
|
see armor.conf.example for all available options.
|
||||||
|
|
||||||
|
Note: worldpath config settings override any settings made in the mod's directory.
|
||||||
|
|
|
@ -0,0 +1,243 @@
|
||||||
|
minetest.register_alias("adminboots","3d_armor:boots_admin")
|
||||||
|
minetest.register_alias("adminhelmet","3d_armor:helmet_admin")
|
||||||
|
minetest.register_alias("adminchestplate","3d_armor:chestplate_admin")
|
||||||
|
minetest.register_alias("adminlegginss","3d_armor:leggings_admin")
|
||||||
|
|
||||||
|
minetest.register_tool("3d_armor:helmet_admin", {
|
||||||
|
description = "Admin Helmet Mode 1 (no speed and no jump)",
|
||||||
|
inventory_image = "3d_armor_inv_helmet_admin.png^technic_tool_mode1.png",
|
||||||
|
wield_image = "3d_armor_inv_helmet_admin.png",
|
||||||
|
groups = {armor_head=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:helmet_admin2")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("3d_armor:helmet_admin2", {
|
||||||
|
description = "Admin Helmet Mode 2 (speed and no jump)",
|
||||||
|
inventory_image = "3d_armor_inv_helmet_admin.png^technic_tool_mode2.png",
|
||||||
|
wield_image = "3d_armor_inv_helmet_admin.png",
|
||||||
|
groups = {armor_head=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_speed=0.25},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:helmet_admin3")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("3d_armor:helmet_admin3", {
|
||||||
|
description = "Admin Helmet Mode 3 (no speed and jump)",
|
||||||
|
inventory_image = "3d_armor_inv_helmet_admin.png^technic_tool_mode3.png",
|
||||||
|
wield_image = "3d_armor_inv_helmet_admin.png",
|
||||||
|
groups = {armor_head=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:helmet_admin4")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("3d_armor:helmet_admin4", {
|
||||||
|
description = "Admin Helmet Mode 4 (speed and jump)",
|
||||||
|
inventory_image = "3d_armor_inv_helmet_admin.png^technic_tool_mode4.png",
|
||||||
|
wield_image = "3d_armor_inv_helmet_admin.png",
|
||||||
|
groups = {armor_head=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25, physics_speed=0.25},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:helmet_admin")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("3d_armor:chestplate_admin", {
|
||||||
|
description = "Admin Chestplate Mode 1 (no speed and no jump)",
|
||||||
|
inventory_image = "3d_armor_inv_chestplate_admin.png^technic_tool_mode1.png",
|
||||||
|
wield_image = "3d_armor_inv_chestplate_admin.png",
|
||||||
|
groups = {armor_torso=10000, armor_heal=5000, armor_use=0, not_in_creative_inventory=1, armor_fire=2000},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:chestplate_admin2")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("3d_armor:chestplate_admin2", {
|
||||||
|
description = "Admin Chestplate Mode 2 (speed and no jump)",
|
||||||
|
inventory_image = "3d_armor_inv_chestplate_admin.png^technic_tool_mode2.png",
|
||||||
|
wield_image = "3d_armor_inv_chestplate_admin.png",
|
||||||
|
groups = {armor_torso=10000, armor_heal=5000, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_speed=0.25},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:chestplate_admin3")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:chestplate_admin3", {
|
||||||
|
description = "Admin Chestplate Mode 3 (no speed and jump)",
|
||||||
|
inventory_image = "3d_armor_inv_chestplate_admin.png^technic_tool_mode3.png",
|
||||||
|
wield_image = "3d_armor_inv_chestplate_admin.png",
|
||||||
|
groups = {armor_torso=10000, armor_heal=5000, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:chestplate_admin4")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:chestplate_admin4", {
|
||||||
|
description = "Admin Chestplate Mode 4 (speed and jump)",
|
||||||
|
inventory_image = "3d_armor_inv_chestplate_admin.png^technic_tool_mode4.png",
|
||||||
|
wield_image = "3d_armor_inv_chestplate_admin.png",
|
||||||
|
groups = {armor_torso=10000, armor_heal=5000, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25, physics_speed=0.25},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:chestplate_admin")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:leggings_admin", {
|
||||||
|
description = "Admin Leggings Mode 1 (no speed and no jump)",
|
||||||
|
wield_image = "3d_armor_inv_leggings_admin.png",
|
||||||
|
inventory_image = "3d_armor_inv_leggings_admin.png^technic_tool_mode1.png",
|
||||||
|
groups = {armor_legs=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:leggings_admin2")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("3d_armor:leggings_admin2", {
|
||||||
|
description = "Admin Leggings Mode 2 (speed and no jump)",
|
||||||
|
wield_image = "3d_armor_inv_leggings_admin.png",
|
||||||
|
inventory_image = "3d_armor_inv_leggings_admin.png^technic_tool_mode2.png",
|
||||||
|
groups = {armor_legs=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_speed=0.25},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:leggings_admin3")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("3d_armor:leggings_admin3", {
|
||||||
|
description = "Admin Leggings Mode 3 (no speed and jump)",
|
||||||
|
wield_image = "3d_armor_inv_leggings_admin.png",
|
||||||
|
inventory_image = "3d_armor_inv_leggings_admin.png^technic_tool_mode3.png",
|
||||||
|
groups = {armor_legs=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:leggings_admin4")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("3d_armor:leggings_admin4", {
|
||||||
|
description = "Admin Leggings Mode 4 (speed and jump)",
|
||||||
|
inventory_image = "3d_armor_inv_leggings_admin.png^technic_tool_mode4.png",
|
||||||
|
wield_image = "3d_armor_inv_leggings_admin.png",
|
||||||
|
groups = {armor_legs=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25, physics_speed=0.25},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:leggings_admin")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_tool("3d_armor:boots_admin", {
|
||||||
|
description = "Admin Boots Mode 1 (no speed and no jump)",
|
||||||
|
inventory_image = "3d_armor_inv_boots_admin.png^technic_tool_mode1.png",
|
||||||
|
wield_image = "3d_armor_inv_boots_admin.png",
|
||||||
|
groups = {armor_feet=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:boots_admin2")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("3d_armor:boots_admin2", {
|
||||||
|
description = "Admin Boots Mode 2 (speed and no jump)",
|
||||||
|
inventory_image = "3d_armor_inv_boots_admin.png^technic_tool_mode2.png",
|
||||||
|
wield_image = "3d_armor_inv_boots_admin.png",
|
||||||
|
groups = {armor_feet=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_speed=0.25},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:boots_admin3")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("3d_armor:boots_admin3", {
|
||||||
|
description = "Admin Boots Mode 3 (no speed and jump)",
|
||||||
|
inventory_image = "3d_armor_inv_boots_admin.png^technic_tool_mode3.png",
|
||||||
|
wield_image = "3d_armor_inv_boots_admin.png",
|
||||||
|
groups = {armor_feet=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:boots_admin4")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("3d_armor:boots_admin4", {
|
||||||
|
description = "Admin Boots Mode 4 (speed and jump)",
|
||||||
|
inventory_image = "3d_armor_inv_boots_admin.png^technic_tool_mode4.png",
|
||||||
|
wield_image = "3d_armor_inv_boots_admin.png",
|
||||||
|
groups = {armor_feet=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25, physics_speed=0.25},
|
||||||
|
wear = 0,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
if keys["sneak"] == true then
|
||||||
|
itemstack:set_name("3d_armor:boots_admin")
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
|
@ -0,0 +1,56 @@
|
||||||
|
-- Armor Configuration (defaults)
|
||||||
|
|
||||||
|
-- You can remove any unwanted armor materials from this table.
|
||||||
|
-- Note that existing armor that is removed will show up as an unknown item.
|
||||||
|
ARMOR_MATERIALS = {
|
||||||
|
wood = "group:wood",
|
||||||
|
cactus = "default:cactus",
|
||||||
|
steel = "default:steel_ingot",
|
||||||
|
bronze = "default:bronze_ingot",
|
||||||
|
diamond = "default:diamond",
|
||||||
|
gold = "default:gold_ingot",
|
||||||
|
mithril = "moreores:mithril_ingot",
|
||||||
|
crystal = "ethereal:crystal_ingot",
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Enable fire protection (defaults true if using ethereal mod)
|
||||||
|
ARMOR_FIRE_PROTECT = false
|
||||||
|
|
||||||
|
-- Fire protection nodes, (name, protection level, damage)
|
||||||
|
ARMOR_FIRE_NODES = {
|
||||||
|
{"default:lava_source", 5, 4},
|
||||||
|
{"default:lava_flowing", 5, 4},
|
||||||
|
{"fire:basic_flame", 3, 4},
|
||||||
|
{"ethereal:crystal_spike", 2, 1},
|
||||||
|
{"bakedclay:safe_fire", 2, 1},
|
||||||
|
--{"default:torch", 1, 1},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Increase this if you get initialization glitches when a player first joins.
|
||||||
|
ARMOR_INIT_DELAY = 1
|
||||||
|
|
||||||
|
-- Number of initialization attempts.
|
||||||
|
-- Use in conjunction with ARMOR_INIT_DELAY if initialization problems persist.
|
||||||
|
ARMOR_INIT_TIMES = 1
|
||||||
|
|
||||||
|
-- Increase this if armor is not getting into bones due to server lag.
|
||||||
|
ARMOR_BONES_DELAY = 1
|
||||||
|
|
||||||
|
-- How often player armor/wield items are updated.
|
||||||
|
ARMOR_UPDATE_TIME = 1
|
||||||
|
|
||||||
|
-- Drop armor when a player dies.
|
||||||
|
-- Uses bones mod if present, otherwise items are dropped around the player.
|
||||||
|
ARMOR_DROP = true
|
||||||
|
|
||||||
|
-- Pulverise armor when a player dies, overrides ARMOR_DROP.
|
||||||
|
ARMOR_DESTROY = false
|
||||||
|
|
||||||
|
-- You can use this to increase or decrease overall armor effectiveness,
|
||||||
|
-- eg: ARMOR_LEVEL_MULTIPLIER = 0.5 will reduce armor level by half.
|
||||||
|
ARMOR_LEVEL_MULTIPLIER = 1
|
||||||
|
|
||||||
|
-- You can use this to increase or decrease overall armor healing,
|
||||||
|
-- eg: ARMOR_HEAL_MULTIPLIER = 0 will disable healing altogether.
|
||||||
|
ARMOR_HEAL_MULTIPLIER = 1
|
||||||
|
|
|
@ -0,0 +1,734 @@
|
||||||
|
|
||||||
|
ARMOR_INIT_DELAY = 1
|
||||||
|
ARMOR_INIT_TIMES = 1
|
||||||
|
ARMOR_BONES_DELAY = 1
|
||||||
|
ARMOR_UPDATE_TIME = 1
|
||||||
|
ARMOR_DROP = false
|
||||||
|
ARMOR_DESTROY = false
|
||||||
|
ARMOR_LEVEL_MULTIPLIER = 1
|
||||||
|
ARMOR_HEAL_MULTIPLIER = 1
|
||||||
|
ARMOR_MATERIALS = {
|
||||||
|
wood = "default:stick",
|
||||||
|
cactus = "default:cactus",
|
||||||
|
steel = "default:steel_ingot",
|
||||||
|
bronze = "default:bronze_ingot",
|
||||||
|
diamond = "default:diamond",
|
||||||
|
gold = "default:gold_ingot",
|
||||||
|
mithril = "moreores:mithril_ingot",
|
||||||
|
crystal = "ethereal:crystal_ingot",
|
||||||
|
}
|
||||||
|
ARMOR_FIRE_PROTECT = true
|
||||||
|
ARMOR_FIRE_NODES = {
|
||||||
|
{"default:lava_source", 5, 4},
|
||||||
|
{"default:lava_flowing", 5, 4},
|
||||||
|
{"fire:basic_flame", 3, 4},
|
||||||
|
{"ethereal:crystal_spike", 2, 1},
|
||||||
|
{"bakedclay:safe_fire", 2, 1},
|
||||||
|
{"technic:corium_source", 2, 2},
|
||||||
|
{"technic:corium_flowing", 2, 2},
|
||||||
|
{"tutorial:xp_block", 2, 5},
|
||||||
|
}
|
||||||
|
|
||||||
|
local skin_mod = nil
|
||||||
|
local inv_mod = nil
|
||||||
|
|
||||||
|
local modpath = minetest.get_modpath(ARMOR_MOD_NAME)
|
||||||
|
local worldpath = minetest.get_worldpath()
|
||||||
|
local input = io.open(modpath.."/armor.conf", "r")
|
||||||
|
if input then
|
||||||
|
dofile(modpath.."/armor.conf")
|
||||||
|
input:close()
|
||||||
|
input = nil
|
||||||
|
end
|
||||||
|
input = io.open(worldpath.."/armor.conf", "r")
|
||||||
|
if input then
|
||||||
|
dofile(worldpath.."/armor.conf")
|
||||||
|
input:close()
|
||||||
|
input = nil
|
||||||
|
end
|
||||||
|
if not minetest.get_modpath("moreores") then
|
||||||
|
ARMOR_MATERIALS.mithril = nil
|
||||||
|
end
|
||||||
|
if not minetest.get_modpath("ethereal") then
|
||||||
|
ARMOR_MATERIALS.crystal = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- override hot nodes so they do not hurt player anywhere but mod
|
||||||
|
if ARMOR_FIRE_PROTECT == true then
|
||||||
|
minetest.after(2, function()
|
||||||
|
for _, row in ipairs(ARMOR_FIRE_NODES) do
|
||||||
|
if minetest.registered_nodes[row[1]] then
|
||||||
|
minetest.override_item(row[1], {damage_per_second = 0, radioaktive = 0})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
local time = 0
|
||||||
|
|
||||||
|
armor = {
|
||||||
|
player_hp = {},
|
||||||
|
elements = {"head", "torso", "legs", "feet"},
|
||||||
|
physics = {"jump","speed","gravity"},
|
||||||
|
formspec = "size[8,8.5]list[detached:player_name_armor;armor;0,1;2,3;]"
|
||||||
|
.."list[detached:player_name_armor;arm2;6,2;1,1;]"
|
||||||
|
.."image[2,0.75;2,4;armor_preview]"
|
||||||
|
.."list[current_player;main;0,4.5;8,4;]"
|
||||||
|
.."list[current_player;craft;4,1;3,3;]"
|
||||||
|
.."list[current_player;craftpreview;7,2;1,1;]",
|
||||||
|
textures = {},
|
||||||
|
default_skin = "character",
|
||||||
|
version = "0.4.3",
|
||||||
|
}
|
||||||
|
|
||||||
|
if minetest.get_modpath("inventory_plus") then
|
||||||
|
inv_mod = "inventory_plus"
|
||||||
|
armor.formspec = "size[10,9.5]button[0,0;2,0.5;inven;Back]"
|
||||||
|
.."button[2,0;2,0.5;main;Main]"
|
||||||
|
.."background[10,9.5;1,1;gui_formbg.png;true]"
|
||||||
|
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||||
|
.."bgcolor[#080808BB;true]"
|
||||||
|
.."list[detached:player_name_armor;armor;0,1;1,4;]"
|
||||||
|
.."list[detached:player_name_armor;armor;1,2.5;1,1;4]"
|
||||||
|
.."image[2.5,0.75;2,4;armor_preview]"
|
||||||
|
.."label[4.5,1;Level: armor_level]"
|
||||||
|
.."label[4.5,1.5;Heal: armor_heal]"
|
||||||
|
.."label[4.5,2;Fire: armor_fire]"
|
||||||
|
.."label[4.5,2.5.5;Speed: armor_speed]"
|
||||||
|
.."label[4.5,3;Jump: armor_jump]"
|
||||||
|
.."label[8,3;Armor key]"
|
||||||
|
.."label[5.9,3;Protectionkey]"
|
||||||
|
.."list[current_player;main;1,5.5;8,1;]"
|
||||||
|
.."list[current_player;main;1,6.75;8,3;8]"
|
||||||
|
.."list[current_player;arm;8,2;1,1;]"
|
||||||
|
.."list[detached:player_name_armor;arm2;6,2;1,1;]"
|
||||||
|
|
||||||
|
elseif minetest.get_modpath("unified_inventory") then
|
||||||
|
inv_mod = "unified_inventory"
|
||||||
|
unified_inventory.register_button("armor", {
|
||||||
|
type = "image",
|
||||||
|
image = "inventory_plus_armor.png",
|
||||||
|
})
|
||||||
|
unified_inventory.register_page("armor", {
|
||||||
|
get_formspec = function(player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
local formspec = "background[0.06,0.99;7.92,7.52;3d_armor_ui_form.png]"
|
||||||
|
.."label[0,0;Armor]"
|
||||||
|
.."list[detached:"..name.."_armor;armor;0,1;2,3;]"
|
||||||
|
.."image[2.5,0.75;2,4;"..armor.textures[name].preview.."]"
|
||||||
|
.."label[5,1;Level: "..armor.def[name].level.."]"
|
||||||
|
.."label[5,1.5;Heal: "..armor.def[name].heal.."]"
|
||||||
|
.."label[5,2;Fire: "..armor.def[name].fire.."]"
|
||||||
|
return {formspec=formspec}
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
elseif minetest.get_modpath("inventory_enhanced") then
|
||||||
|
inv_mod = "inventory_enhanced"
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath("skins") then
|
||||||
|
skin_mod = "skins"
|
||||||
|
elseif minetest.get_modpath("simple_skins") then
|
||||||
|
skin_mod = "simple_skins"
|
||||||
|
elseif minetest.get_modpath("u_skins") then
|
||||||
|
skin_mod = "u_skins"
|
||||||
|
elseif minetest.get_modpath("wardrobe") then
|
||||||
|
skin_mod = "wardrobe"
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.def = {
|
||||||
|
state = 0,
|
||||||
|
count = 0,
|
||||||
|
}
|
||||||
|
|
||||||
|
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
|
if fields.armoff then
|
||||||
|
|
||||||
|
local player_inv = player:get_inventory()
|
||||||
|
player_inv:set_size("am", 1)
|
||||||
|
local type = player:get_inventory():get_stack("arm",1):get_name()
|
||||||
|
if type == "tutorial:armor_key" then
|
||||||
|
player_inv:set_stack("am", 1, "default:dirt")
|
||||||
|
else
|
||||||
|
end
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
armor:update_inventory(player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
local formspec = armor:get_armor_formspec(name)
|
||||||
|
if inv_mod == "inventory_plus" then
|
||||||
|
local page = player:get_inventory_formspec()
|
||||||
|
if page:find("detached:"..name.."_armor") then
|
||||||
|
inventory_plus.set_inventory_formspec(player, formspec)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if fields.armon then
|
||||||
|
|
||||||
|
local player_inv = player:get_inventory()
|
||||||
|
player_inv:set_size("am", 1)
|
||||||
|
player_inv:set_stack("am", 1, nil)
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
armor:update_inventory(player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
local formspec = armor:get_armor_formspec(name)
|
||||||
|
if inv_mod == "inventory_plus" then
|
||||||
|
local page = player:get_inventory_formspec()
|
||||||
|
if page:find("detached:"..name.."_armor") then
|
||||||
|
inventory_plus.set_inventory_formspec(player, formspec)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
armor.update_player_visuals = function(self, player)
|
||||||
|
if not player then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if self.textures[name] then
|
||||||
|
default.player_set_textures(player, {
|
||||||
|
self.textures[name].skin,
|
||||||
|
self.textures[name].armor,
|
||||||
|
self.textures[name].wielditem,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.set_player_armor = function(self, player)
|
||||||
|
local name, player_inv = armor:get_valid_player(player, "[set_player_armor]")
|
||||||
|
if not name then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local armor_texture = "3d_armor_trans.png"
|
||||||
|
local armor_level = 0
|
||||||
|
local armor_heal = 0
|
||||||
|
local armor_fire = 0
|
||||||
|
local state = 0
|
||||||
|
local items = 0
|
||||||
|
local elements = {}
|
||||||
|
local textures = {}
|
||||||
|
local physics_o = {speed=1,gravity=1,jump=1}
|
||||||
|
local material = {type=nil, count=1}
|
||||||
|
local preview = armor:get_preview(name) or "character_preview.png"
|
||||||
|
for _,v in ipairs(self.elements) do
|
||||||
|
elements[v] = false
|
||||||
|
end
|
||||||
|
for i=1, 5 do
|
||||||
|
local stack = player_inv:get_stack("armor", i)
|
||||||
|
local item = stack:get_name()
|
||||||
|
if stack:get_count() == 1 then
|
||||||
|
local def = stack:get_definition()
|
||||||
|
for k, v in pairs(elements) do
|
||||||
|
if v == false then
|
||||||
|
local level = def.groups["armor_"..k]
|
||||||
|
if level then
|
||||||
|
local texture = item:gsub("%:", "_")
|
||||||
|
local player_inv = player:get_inventory()
|
||||||
|
local coun = player_inv:get_stack("am", 1):get_count()
|
||||||
|
if coun == 0 then
|
||||||
|
table.insert(textures, texture..".png")
|
||||||
|
else
|
||||||
|
end
|
||||||
|
preview = preview.."^"..texture.."_preview.png"
|
||||||
|
armor_level = armor_level + level
|
||||||
|
state = state + stack:get_wear()
|
||||||
|
items = items + 1
|
||||||
|
local heal = def.groups["armor_heal"] or 0
|
||||||
|
armor_heal = armor_heal + heal
|
||||||
|
local fire = def.groups["armor_fire"] or 0
|
||||||
|
armor_fire = armor_fire + fire
|
||||||
|
for kk,vv in ipairs(self.physics) do
|
||||||
|
local o_value = def.groups["physics_"..vv]
|
||||||
|
if o_value then
|
||||||
|
physics_o[vv] = physics_o[vv] + o_value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local mat = string.match(item, "%:.+_(.+)$")
|
||||||
|
if material.type then
|
||||||
|
if material.type == mat then
|
||||||
|
material.count = material.count + 1
|
||||||
|
end
|
||||||
|
else
|
||||||
|
material.type = mat
|
||||||
|
end
|
||||||
|
elements[k] = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
armor_level = armor_level * ARMOR_LEVEL_MULTIPLIER
|
||||||
|
armor_heal = armor_heal * ARMOR_HEAL_MULTIPLIER
|
||||||
|
local player_inv = player:get_inventory()
|
||||||
|
local arm = player_inv:get_stack("arm2", 1):get_name()
|
||||||
|
if arm == "tutorial:protection_schluessel1" then
|
||||||
|
armor_level = armor_level+armor_level*0.1
|
||||||
|
armor_heal = armor_heal+armor_heal*0.1
|
||||||
|
armor_fire = armor_fire+armor_fire*0.1
|
||||||
|
elseif arm == "tutorial:protection_schluessel2" then
|
||||||
|
armor_level = armor_level+armor_level*0.2
|
||||||
|
armor_heal = armor_heal+armor_heal*0.2
|
||||||
|
armor_fire = armor_fire+armor_fire*0.2
|
||||||
|
elseif arm == "tutorial:protection_schluessel3" then
|
||||||
|
armor_level = armor_level+armor_level*0.3
|
||||||
|
armor_heal = armor_heal+armor_heal*0.3
|
||||||
|
armor_fire = armor_fire+armor_fire*0.3
|
||||||
|
end
|
||||||
|
|
||||||
|
if #textures > 0 then
|
||||||
|
armor_texture = table.concat(textures, "^")
|
||||||
|
end
|
||||||
|
local armor_groups = {fleshy=100}
|
||||||
|
if armor_level > 0 then
|
||||||
|
armor_groups.level = math.floor(armor_level / 100)
|
||||||
|
armor_groups.fleshy = 100 - armor_level
|
||||||
|
end
|
||||||
|
player:set_armor_groups(armor_groups)
|
||||||
|
player:set_physics_override(physics_o)
|
||||||
|
self.textures[name].armor = armor_texture
|
||||||
|
self.textures[name].preview = preview
|
||||||
|
self.def[name].state = state
|
||||||
|
self.def[name].count = items
|
||||||
|
self.def[name].level = armor_level
|
||||||
|
self.def[name].heal = armor_heal
|
||||||
|
self.def[name].jump = physics_o.jump
|
||||||
|
self.def[name].speed = physics_o.speed
|
||||||
|
self.def[name].gravity = physics_o.gravity
|
||||||
|
self.def[name].fire = armor_fire
|
||||||
|
self:update_player_visuals(player)
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.update_armor = function(self, player, dtime)
|
||||||
|
local name, player_inv, armor_inv, pos = armor:get_valid_player(player, "[update_armor]")
|
||||||
|
if not name then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local hp = player:get_hp() or 0
|
||||||
|
if ARMOR_FIRE_PROTECT == true then
|
||||||
|
pos.y = pos.y + 1.4 -- head level
|
||||||
|
local node_head = minetest.get_node(pos).name
|
||||||
|
pos.y = pos.y - 1.2 -- feet level
|
||||||
|
local node_feet = minetest.get_node(pos).name
|
||||||
|
-- is player inside a hot node?
|
||||||
|
for _, row in ipairs(ARMOR_FIRE_NODES) do
|
||||||
|
-- check for fire protection, if not enough then get hurt
|
||||||
|
if row[1] == node_head or row[1] == node_feet then
|
||||||
|
if hp > 0 and armor.def[name].fire < row[2] then
|
||||||
|
player:set_hp(hp - row[3] * dtime)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if hp == 0 or hp == self.player_hp[name] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if self.player_hp[name] > hp then
|
||||||
|
local heal_max = 0
|
||||||
|
local state = 0
|
||||||
|
local items = 0
|
||||||
|
for i=1, 5 do
|
||||||
|
local stack = player_inv:get_stack("armor", i)
|
||||||
|
if stack:get_count() > 0 then
|
||||||
|
local use = stack:get_definition().groups["armor_use"] or 0
|
||||||
|
local heal = stack:get_definition().groups["armor_heal"] or 0
|
||||||
|
local item = stack:get_name()
|
||||||
|
stack:add_wear(use)
|
||||||
|
armor_inv:set_stack("armor", i, stack)
|
||||||
|
player_inv:set_stack("armor", i, stack)
|
||||||
|
state = state + stack:get_wear()
|
||||||
|
items = items + 1
|
||||||
|
if stack:get_count() == 0 then
|
||||||
|
local desc = minetest.registered_items[item].description
|
||||||
|
if desc then
|
||||||
|
minetest.chat_send_player(name, "Your "..desc.." got destroyed!")
|
||||||
|
end
|
||||||
|
self:set_player_armor(player)
|
||||||
|
armor:update_inventory(player)
|
||||||
|
end
|
||||||
|
heal_max = heal_max + heal
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local player_inv = player:get_inventory()
|
||||||
|
local arm = player_inv:get_stack("arm2", 1):get_name()
|
||||||
|
if arm == "tutorial:protection_schluessel1" then
|
||||||
|
heal_max = heal_max+heal_max*0.1
|
||||||
|
elseif arm == "tutorial:protection_schluessel2" then
|
||||||
|
heal_max = heal_max+heal_max*0.2
|
||||||
|
elseif arm == "tutorial:protection_schluessel3" then
|
||||||
|
heal_max = heal_max+heal_max*0.3
|
||||||
|
end
|
||||||
|
self.def[name].state = state
|
||||||
|
self.def[name].count = items
|
||||||
|
heal_max = heal_max * ARMOR_HEAL_MULTIPLIER
|
||||||
|
if heal_max == nil or heal_max == 0 then
|
||||||
|
heal_max = 1
|
||||||
|
end
|
||||||
|
if heal_max > math.random(heal_max + math.floor(heal_max*0.1)) then
|
||||||
|
player:set_hp(self.player_hp[name])
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.player_hp[name] = hp
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.get_player_skin = function(self, name)
|
||||||
|
local skin = nil
|
||||||
|
if skin_mod == "skins" or skin_mod == "simple_skins" then
|
||||||
|
skin = skins.skins[name]
|
||||||
|
elseif skin_mod == "u_skins" then
|
||||||
|
skin = u_skins.u_skins[name]
|
||||||
|
elseif skin_mod == "wardrobe" then
|
||||||
|
skin = string.gsub(wardrobe.playerSkins[name], "%.png$","")
|
||||||
|
end
|
||||||
|
return skin or armor.default_skin
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.get_preview = function(self, name)
|
||||||
|
if skin_mod == "skins" then
|
||||||
|
return armor:get_player_skin(name).."_preview.png"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.get_armor_formspec = function(self, name)
|
||||||
|
if not armor.textures[name] then
|
||||||
|
minetest.log("error", "3d_armor: Player texture["..name.."] is nil [get_armor_formspec]")
|
||||||
|
return ""
|
||||||
|
end
|
||||||
|
if not armor.def[name] then
|
||||||
|
minetest.log("error", "3d_armor: Armor def["..name.."] is nil [get_armor_formspec]")
|
||||||
|
return ""
|
||||||
|
end
|
||||||
|
local player = minetest.get_player_by_name(name)
|
||||||
|
local player_inv = player:get_inventory()
|
||||||
|
local am = player_inv:get_stack("am", 1):get_count()
|
||||||
|
local formspec = armor.formspec:gsub("player_name", name)
|
||||||
|
formspec = formspec:gsub("armor_preview", armor.textures[name].preview)
|
||||||
|
formspec = formspec:gsub("armor_level", armor.def[name].level)
|
||||||
|
formspec = formspec:gsub("armor_heal", armor.def[name].heal)
|
||||||
|
formspec = formspec:gsub("armor_fire", armor.def[name].fire)
|
||||||
|
formspec = formspec:gsub("armor_jump", (armor.def[name].jump-1)*4)
|
||||||
|
formspec = formspec:gsub("armor_speed", (armor.def[name].speed-1)*4)
|
||||||
|
if am == 1 then
|
||||||
|
formspec = formspec .."button[7.5,3.7;2,0.5;armon;armor on]"
|
||||||
|
else
|
||||||
|
formspec = formspec .."button[7.5,3.7;2,0.5;armoff;armor off]"
|
||||||
|
|
||||||
|
end
|
||||||
|
return formspec
|
||||||
|
end
|
||||||
|
armor.update_inventory = function(self, player)
|
||||||
|
local name = armor:get_valid_player(player, "[set_player_armor]")
|
||||||
|
if not name or inv_mod == "inventory_enhanced" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if inv_mod == "unified_inventory" then
|
||||||
|
if unified_inventory.current_page[name] == "armor" then
|
||||||
|
unified_inventory.set_inventory_formspec(player, "armor")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
local formspec = armor:get_armor_formspec(name)
|
||||||
|
if inv_mod == "inventory_plus" then
|
||||||
|
local page = player:get_inventory_formspec()
|
||||||
|
if page:find("detached:"..name.."_armor") then
|
||||||
|
inventory_plus.set_inventory_formspec(player, formspec)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
player:set_inventory_formspec(formspec)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.get_valid_player = function(self, player, msg)
|
||||||
|
msg = msg or ""
|
||||||
|
if not player then
|
||||||
|
minetest.log("error", "3d_armor: Player reference is nil "..msg)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if not name then
|
||||||
|
minetest.log("error", "3d_armor: Player name is nil "..msg)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local pos = player:getpos()
|
||||||
|
local player_inv = player:get_inventory()
|
||||||
|
local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"})
|
||||||
|
if not pos then
|
||||||
|
minetest.log("error", "3d_armor: Player position is nil "..msg)
|
||||||
|
return
|
||||||
|
elseif not player_inv then
|
||||||
|
minetest.log("error", "3d_armor: Player inventory is nil "..msg)
|
||||||
|
return
|
||||||
|
elseif not armor_inv then
|
||||||
|
minetest.log("error", "3d_armor: Detached armor inventory is nil "..msg)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
return name, player_inv, armor_inv, pos
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Register Player Model
|
||||||
|
|
||||||
|
default.player_register_model("3d_armor_character.b3d", {
|
||||||
|
animation_speed = 30,
|
||||||
|
textures = {
|
||||||
|
armor.default_skin..".png",
|
||||||
|
"3d_armor_trans.png",
|
||||||
|
"3d_armor_trans.png",
|
||||||
|
},
|
||||||
|
animations = {
|
||||||
|
stand = {x=0, y=79},
|
||||||
|
lay = {x=162, y=166},
|
||||||
|
walk = {x=168, y=187},
|
||||||
|
mine = {x=189, y=198},
|
||||||
|
walk_mine = {x=200, y=219},
|
||||||
|
sit = {x=81, y=160},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Register Callbacks
|
||||||
|
|
||||||
|
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
|
local name = armor:get_valid_player(player, "[on_player_receive_fields]")
|
||||||
|
if fields.armor then
|
||||||
|
local formspec = armor:get_armor_formspec(name)
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
armor:update_inventory(player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
local formspec = armor:get_armor_formspec(name)
|
||||||
|
if inv_mod == "inventory_plus" then
|
||||||
|
local page = player:get_inventory_formspec()
|
||||||
|
if page:find("detached:"..name.."_armor") then
|
||||||
|
inventory_plus.set_inventory_formspec(player, formspec)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inventory_plus.set_inventory_formspec(player, formspec)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
for field, _ in pairs(fields) do
|
||||||
|
if string.find(field, "skins_set") then
|
||||||
|
minetest.after(0, function(player)
|
||||||
|
local skin = armor:get_player_skin(name)
|
||||||
|
armor.textures[name].skin = skin..".png"
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
end, player)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
default.player_set_model(player, "3d_armor_character.b3d")
|
||||||
|
local name = player:get_player_name()
|
||||||
|
local player_inv = player:get_inventory()
|
||||||
|
local armor_inv = minetest.create_detached_inventory(name.."_armor", {
|
||||||
|
on_put = function(inv, listname, index, stack, player)
|
||||||
|
player:get_inventory():set_stack(listname, index, stack)
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
armor:update_inventory(player)
|
||||||
|
end,
|
||||||
|
on_take = function(inv, listname, index, stack, player)
|
||||||
|
player:get_inventory():set_stack(listname, index, nil)
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
armor:update_inventory(player)
|
||||||
|
end,
|
||||||
|
on_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
||||||
|
local plaver_inv = player:get_inventory()
|
||||||
|
local stack = inv:get_stack(to_list, to_index)
|
||||||
|
player_inv:set_stack(to_list, to_index, stack)
|
||||||
|
player_inv:set_stack(from_list, from_index, nil)
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
armor:update_inventory(player)
|
||||||
|
end,
|
||||||
|
allow_put = function(inv, listname, index, stack, player)
|
||||||
|
if listname == "armor" then
|
||||||
|
if index == 1 and stack:get_definition().groups.armor_head then
|
||||||
|
return 1
|
||||||
|
elseif index == 2 and stack:get_definition().groups.armor_torso then
|
||||||
|
return 1
|
||||||
|
elseif index == 3 and stack:get_definition().groups.armor_legs then
|
||||||
|
return 1
|
||||||
|
elseif index == 4 and stack:get_definition().groups.armor_feet then
|
||||||
|
return 1
|
||||||
|
elseif index == 5 and stack:get_definition().groups.armor_shield then
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
end,
|
||||||
|
allow_take = function(inv, listname, index, stack, player)
|
||||||
|
return stack:get_count()
|
||||||
|
end,
|
||||||
|
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
||||||
|
if listname == "armor" then
|
||||||
|
if index == 1 and stack:get_definition().groups.armor_head then
|
||||||
|
return 1
|
||||||
|
elseif index == 2 and stack:get_definition().groups.armor_torso then
|
||||||
|
return 1
|
||||||
|
elseif index == 3 and stack:get_definition().groups.armor_legs then
|
||||||
|
return 1
|
||||||
|
elseif index == 4 and stack:get_definition().groups.armor_feet then
|
||||||
|
return 1
|
||||||
|
elseif index == 5 and stack:get_definition().groups.armor_shield then
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
armor_inv:set_size("armor", 5)
|
||||||
|
armor_inv:set_size("arm2", 1)
|
||||||
|
player_inv:set_size("arm", 1)
|
||||||
|
player_inv:set_size("arm2", 1)
|
||||||
|
player_inv:set_size("armor", 5)
|
||||||
|
|
||||||
|
local stack = player_inv:get_stack("arm2", 1)
|
||||||
|
armor_inv:set_stack("arm2", 1, stack)
|
||||||
|
for i=1, 5 do
|
||||||
|
local stack = player_inv:get_stack("armor", i)
|
||||||
|
armor_inv:set_stack("armor", i, stack)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Legacy support, import player's armor from old inventory format
|
||||||
|
for _,v in pairs(armor.elements) do
|
||||||
|
local list = "armor_"..v
|
||||||
|
armor_inv:add_item("armor", player_inv:get_stack(list, 1))
|
||||||
|
player_inv:set_stack(list, 1, nil)
|
||||||
|
end
|
||||||
|
-- TODO Remove this on the next version upate
|
||||||
|
|
||||||
|
armor.player_hp[name] = 0
|
||||||
|
armor.def[name] = {
|
||||||
|
state = 0,
|
||||||
|
count = 0,
|
||||||
|
level = 0,
|
||||||
|
heal = 0,
|
||||||
|
jump = 1,
|
||||||
|
speed = 1,
|
||||||
|
gravity = 1,
|
||||||
|
fire = 0,
|
||||||
|
}
|
||||||
|
armor.textures[name] = {
|
||||||
|
skin = armor.default_skin..".png",
|
||||||
|
armor = "3d_armor_trans.png",
|
||||||
|
wielditem = "3d_armor_trans.png",
|
||||||
|
preview = armor.default_skin.."_preview.png",
|
||||||
|
}
|
||||||
|
if skin_mod == "skins" then
|
||||||
|
local skin = skins.skins[name]
|
||||||
|
if skin and skins.get_type(skin) == skins.type.MODEL then
|
||||||
|
armor.textures[name].skin = skin..".png"
|
||||||
|
end
|
||||||
|
elseif skin_mod == "simple_skins" then
|
||||||
|
local skin = skins.skins[name]
|
||||||
|
if skin then
|
||||||
|
armor.textures[name].skin = skin..".png"
|
||||||
|
end
|
||||||
|
elseif skin_mod == "u_skins" then
|
||||||
|
local skin = u_skins.u_skins[name]
|
||||||
|
if skin and u_skins.get_type(skin) == u_skins.type.MODEL then
|
||||||
|
armor.textures[name].skin = skin..".png"
|
||||||
|
end
|
||||||
|
elseif skin_mod == "wardrobe" then
|
||||||
|
local skin = wardrobe.playerSkins[name]
|
||||||
|
if skin then
|
||||||
|
armor.textures[name].skin = skin
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if minetest.get_modpath("player_textures") then
|
||||||
|
local filename = minetest.get_modpath("player_textures").."/textures/player_"..name
|
||||||
|
local f = io.open(filename..".png")
|
||||||
|
if f then
|
||||||
|
f:close()
|
||||||
|
armor.textures[name].skin = "player_"..name..".png"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for i=1, ARMOR_INIT_TIMES do
|
||||||
|
minetest.after(ARMOR_INIT_DELAY * i, function(player)
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
if not inv_mod then
|
||||||
|
armor:update_inventory(player)
|
||||||
|
end
|
||||||
|
end, player)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
if ARMOR_DROP == true or ARMOR_DESTROY == true then
|
||||||
|
armor.drop_armor = function(pos, stack)
|
||||||
|
local obj = minetest.add_item(pos, stack)
|
||||||
|
if obj then
|
||||||
|
local x = math.random(1, 5)
|
||||||
|
if math.random(1,2) == 1 then
|
||||||
|
x = -x
|
||||||
|
end
|
||||||
|
local z = math.random(1, 5)
|
||||||
|
if math.random(1,2) == 1 then
|
||||||
|
z = -z
|
||||||
|
end
|
||||||
|
obj:setvelocity({x=1/x, y=obj:getvelocity().y, z=1/z})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
minetest.register_on_dieplayer(function(player)
|
||||||
|
local name, player_inv, armor_inv, pos = armor:get_valid_player(player, "[on_dieplayer]")
|
||||||
|
if not name then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local drop = {}
|
||||||
|
for i=1, player_inv:get_size("armor") do
|
||||||
|
local stack = armor_inv:get_stack("armor", i)
|
||||||
|
if stack:get_count() > 0 then
|
||||||
|
table.insert(drop, stack)
|
||||||
|
armor_inv:set_stack("armor", i, nil)
|
||||||
|
player_inv:set_stack("armor", i, nil)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
if inv_mod == "unified_inventory" then
|
||||||
|
unified_inventory.set_inventory_formspec(player, "craft")
|
||||||
|
elseif inv_mod == "inventory_plus" then
|
||||||
|
local formspec = inventory_plus.get_formspec(player,"main")
|
||||||
|
inventory_plus.set_inventory_formspec(player, formspec)
|
||||||
|
else
|
||||||
|
armor:update_inventory(player)
|
||||||
|
end
|
||||||
|
if ARMOR_DESTROY == false then
|
||||||
|
minetest.after(ARMOR_BONES_DELAY, function()
|
||||||
|
pos = vector.round(pos)
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
if node then
|
||||||
|
if node.name == "bones:bones" then
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local owner = meta:get_string("owner")
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
for _,stack in ipairs(drop) do
|
||||||
|
if name == owner and inv:room_for_item("main", stack) then
|
||||||
|
inv:add_item("main", stack)
|
||||||
|
else
|
||||||
|
armor.drop_armor(pos, stack)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
for _,stack in ipairs(drop) do
|
||||||
|
armor.drop_armor(pos, stack)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_globalstep(function(dtime)
|
||||||
|
time = time + dtime
|
||||||
|
if time > ARMOR_UPDATE_TIME then
|
||||||
|
for _,player in ipairs(minetest.get_connected_players()) do
|
||||||
|
armor:update_armor(player, time)
|
||||||
|
end
|
||||||
|
time = 0
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
3d_armor -- Crafting Guide
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
Helmets:
|
||||||
|
|
||||||
|
+---+---+---+
|
||||||
|
| X | X | X |
|
||||||
|
+---+---+---+
|
||||||
|
| X | | X |
|
||||||
|
+---+---+---+
|
||||||
|
| | | |
|
||||||
|
+---+---+---+
|
||||||
|
|
||||||
|
[3d_armor:helmet_wood] X = [default:wood]
|
||||||
|
[3d_armor:helmet_cactus] X = [default:cactus]
|
||||||
|
[3d_armor:helmet_steel] X = [default:steel_ingot]
|
||||||
|
[3d_armor:helmet_bronze] X = [default:bronze_ingot]
|
||||||
|
[3d_armor:helmet_diamond] X = [default:diamond]
|
||||||
|
[3d_armor:helmet_gold] X = [default:gold_ingot]
|
||||||
|
[3d_armor:helmet_mithril] X = [moreores:mithril_ingot] *
|
||||||
|
[3d_armor:helmet_crystal] X = [ethereal:crystal_ingot] **
|
||||||
|
|
||||||
|
Chestplates:
|
||||||
|
|
||||||
|
+---+---+---+
|
||||||
|
| X | | X |
|
||||||
|
+---+---+---+
|
||||||
|
| X | X | X |
|
||||||
|
+---+---+---+
|
||||||
|
| X | X | X |
|
||||||
|
+---+---+---+
|
||||||
|
|
||||||
|
[3d_armor:chestplate_wood] X = [default:wood]
|
||||||
|
[3d_armor:chestplate_cactus] X = [default:cactus]
|
||||||
|
[3d_armor:chestplate_steel] X = [default:steel_ingot]
|
||||||
|
[3d_armor:chestplate_bronze] X = [default:bronze_ingot]
|
||||||
|
[3d_armor:chestplate_diamond] X = [default:diamond]
|
||||||
|
[3d_armor:chestplate_gold] X = [default:gold_ingot]
|
||||||
|
[3d_armor:chestplate_mithril] X = [moreores:mithril_ingot] *
|
||||||
|
[3d_armor:chestplate_crystal] X = [ethereal:crystal_ingot] **
|
||||||
|
|
||||||
|
Leggings:
|
||||||
|
|
||||||
|
+---+---+---+
|
||||||
|
| X | X | X |
|
||||||
|
+---+---+---+
|
||||||
|
| X | | X |
|
||||||
|
+---+---+---+
|
||||||
|
| X | | X |
|
||||||
|
+---+---+---+
|
||||||
|
|
||||||
|
[3d_armor:leggings_wood] X = [default:wood]
|
||||||
|
[3d_armor:leggings_cactus] X = [default:cactus]
|
||||||
|
[3d_armor:leggings_steel] X = [default:steel_ingot]
|
||||||
|
[3d_armor:leggings_bronze] X = [default:bronze_ingot]
|
||||||
|
[3d_armor:leggings_diamond] X = [default:diamond]
|
||||||
|
[3d_armor:leggings_gold] X = [default:gold_ingot]
|
||||||
|
[3d_armor:leggings_mithril] X = [moreores:mithril_ingot] *
|
||||||
|
[3d_armor:leggings_crystal] X = [ethereal:crystal_ingot] **
|
||||||
|
|
||||||
|
Boots:
|
||||||
|
|
||||||
|
+---+---+---+
|
||||||
|
| X | | X |
|
||||||
|
+---+---+---+
|
||||||
|
| X | | X |
|
||||||
|
+---+---+---+
|
||||||
|
|
||||||
|
[3d_armor:boots_wood] X = [default:wood]
|
||||||
|
[3d_armor:boots_cactus] X = [default:cactus]
|
||||||
|
[3d_armor:boots_steel] X = [default:steel_ingot]
|
||||||
|
[3d_armor:boots_bronze] X = [default:bronze_ingot
|
||||||
|
[3d_armor:boots_diamond] X = [default:diamond]
|
||||||
|
[3d_armor:boots_gold] X = [default:gold_ingot]
|
||||||
|
[3d_armor:boots_mithril] X = [moreores:mithril_ingot] *
|
||||||
|
[3d_armor:boots_crystal] X = [ethereal:crystal_ingot] **
|
||||||
|
|
||||||
|
* Requires moreores mod by Calinou - https://forum.minetest.net/viewtopic.php?id=549
|
||||||
|
** Requires ethereal mod by Chinchow & TenPlus1 - https://github.com/tenplus1/ethereal
|
|
@ -0,0 +1,4 @@
|
||||||
|
default
|
||||||
|
inventory_plus?
|
||||||
|
unified_inventory?
|
||||||
|
|
|
@ -0,0 +1,219 @@
|
||||||
|
ARMOR_MOD_NAME = minetest.get_current_modname()
|
||||||
|
dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/armor.lua")
|
||||||
|
dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/admin.lua")
|
||||||
|
dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/tutorial.lua")
|
||||||
|
dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/tutorial_craft.lua")
|
||||||
|
if ARMOR_MATERIALS.wood then
|
||||||
|
minetest.register_tool("3d_armor:helmet_wood", {
|
||||||
|
description = "Wood Helmet",
|
||||||
|
inventory_image = "3d_armor_inv_helmet_wood.png",
|
||||||
|
groups = {armor_head=5, armor_heal=0, armor_use=2000},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:chestplate_wood", {
|
||||||
|
description = "Wood Chestplate",
|
||||||
|
inventory_image = "3d_armor_inv_chestplate_wood.png",
|
||||||
|
groups = {armor_torso=10, armor_heal=0, armor_use=2000},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:leggings_wood", {
|
||||||
|
description = "Wood Leggings",
|
||||||
|
inventory_image = "3d_armor_inv_leggings_wood.png",
|
||||||
|
groups = {armor_legs=5, armor_heal=0, armor_use=2000},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:boots_wood", {
|
||||||
|
description = "Wood Boots",
|
||||||
|
inventory_image = "3d_armor_inv_boots_wood.png",
|
||||||
|
groups = {armor_feet=5, armor_heal=0, armor_use=2000},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if ARMOR_MATERIALS.cactus then
|
||||||
|
minetest.register_tool("3d_armor:helmet_cactus", {
|
||||||
|
description = "Cactuc Helmet",
|
||||||
|
inventory_image = "3d_armor_inv_helmet_cactus.png",
|
||||||
|
groups = {armor_head=7, armor_heal=1, armor_use=200},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:chestplate_cactus", {
|
||||||
|
description = "Cactus Chestplate",
|
||||||
|
inventory_image = "3d_armor_inv_chestplate_cactus.png",
|
||||||
|
groups = {armor_torso=15, armor_heal=2, armor_use=200},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:leggings_cactus", {
|
||||||
|
description = "Cactus Leggings",
|
||||||
|
inventory_image = "3d_armor_inv_leggings_cactus.png",
|
||||||
|
groups = {armor_legs=7, armor_heal=1, armor_use=200},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:boots_cactus", {
|
||||||
|
description = "Cactus Boots",
|
||||||
|
inventory_image = "3d_armor_inv_boots_cactus.png",
|
||||||
|
groups = {armor_feet=7, armor_heal=1, armor_use=200},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if ARMOR_MATERIALS.steel then
|
||||||
|
minetest.register_tool("3d_armor:helmet_steel", {
|
||||||
|
description = "Steel Helmet",
|
||||||
|
inventory_image = "3d_armor_inv_helmet_steel.png",
|
||||||
|
groups = {armor_head=10, armor_heal=2, armor_use=100},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:chestplate_steel", {
|
||||||
|
description = "Steel Chestplate",
|
||||||
|
inventory_image = "3d_armor_inv_chestplate_steel.png",
|
||||||
|
groups = {armor_torso=20, armor_heal=4, armor_use=100},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:leggings_steel", {
|
||||||
|
description = "Steel Leggings",
|
||||||
|
inventory_image = "3d_armor_inv_leggings_steel.png",
|
||||||
|
groups = {armor_legs=10, armor_heal=2, armor_use=100},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:boots_steel", {
|
||||||
|
description = "Steel Boots",
|
||||||
|
inventory_image = "3d_armor_inv_boots_steel.png",
|
||||||
|
groups = {armor_feet=10, armor_heal=2, armor_use=100},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if ARMOR_MATERIALS.bronze then
|
||||||
|
minetest.register_tool("3d_armor:helmet_bronze", {
|
||||||
|
description = "Bronze Helmet",
|
||||||
|
inventory_image = "3d_armor_inv_helmet_bronze.png",
|
||||||
|
groups = {armor_head=20, armor_heal=4, armor_use=75},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:chestplate_bronze", {
|
||||||
|
description = "Bronze Chestplate",
|
||||||
|
inventory_image = "3d_armor_inv_chestplate_bronze.png",
|
||||||
|
groups = {armor_torso=40, armor_heal=8, armor_use=75},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:leggings_bronze", {
|
||||||
|
description = "Bronze Leggings",
|
||||||
|
inventory_image = "3d_armor_inv_leggings_bronze.png",
|
||||||
|
groups = {armor_legs=20, armor_heal=4, armor_use=75},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:boots_bronze", {
|
||||||
|
description = "Bronze Boots",
|
||||||
|
inventory_image = "3d_armor_inv_boots_bronze.png",
|
||||||
|
groups = {armor_feet=20, armor_heal=4, armor_use=75},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if ARMOR_MATERIALS.diamond then
|
||||||
|
minetest.register_tool("3d_armor:helmet_diamond", {
|
||||||
|
description = "Diamond Helmet",
|
||||||
|
inventory_image = "3d_armor_inv_helmet_diamond.png",
|
||||||
|
groups = {armor_head=15, armor_heal=1, armor_use=200},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:chestplate_diamond", {
|
||||||
|
description = "Diamond Chestplate",
|
||||||
|
inventory_image = "3d_armor_inv_chestplate_diamond.png",
|
||||||
|
groups = {armor_torso=30, armor_heal=2, armor_use=200},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:leggings_diamond", {
|
||||||
|
description = "Diamond Leggings",
|
||||||
|
inventory_image = "3d_armor_inv_leggings_diamond.png",
|
||||||
|
groups = {armor_legs=15, armor_heal=1, armor_use=200},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:boots_diamond", {
|
||||||
|
description = "Diamond Boots",
|
||||||
|
inventory_image = "3d_armor_inv_boots_diamond.png",
|
||||||
|
groups = {armor_feet=15, armor_heal=1, armor_use=200},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if ARMOR_MATERIALS.gold then
|
||||||
|
minetest.register_tool("3d_armor:helmet_gold", {
|
||||||
|
description = "Gold Helmet",
|
||||||
|
inventory_image = "3d_armor_inv_helmet_gold.png",
|
||||||
|
groups = {armor_head=20, armor_heal=4, armor_use=50},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:chestplate_gold", {
|
||||||
|
description = "Gold Chestplate",
|
||||||
|
inventory_image = "3d_armor_inv_chestplate_gold.png",
|
||||||
|
groups = {armor_torso=40, armor_heal=8, armor_use=50},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:leggings_gold", {
|
||||||
|
description = "Gold Leggings",
|
||||||
|
inventory_image = "3d_armor_inv_leggings_gold.png",
|
||||||
|
groups = {armor_legs=20, armor_heal=4, armor_use=50},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:boots_gold", {
|
||||||
|
description = "Gold Boots",
|
||||||
|
inventory_image = "3d_armor_inv_boots_gold.png",
|
||||||
|
groups = {armor_feet=20, armor_heal=4, armor_use=50},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if ARMOR_MATERIALS.mithril then
|
||||||
|
minetest.register_tool("3d_armor:helmet_mithril", {
|
||||||
|
description = "Mithril Helmet",
|
||||||
|
inventory_image = "3d_armor_inv_helmet_mithril.png",
|
||||||
|
groups = {armor_head=40, armor_heal=8, armor_use=25},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:chestplate_mithril", {
|
||||||
|
description = "Mithril Chestplate",
|
||||||
|
inventory_image = "3d_armor_inv_chestplate_mithril.png",
|
||||||
|
groups = {armor_torso=80, armor_heal=16, armor_use=25},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:leggings_mithril", {
|
||||||
|
description = "Mithril Leggings",
|
||||||
|
inventory_image = "3d_armor_inv_leggings_mithril.png",
|
||||||
|
groups = {armor_legs=40, armor_heal=8, armor_use=25},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:boots_mithril", {
|
||||||
|
description = "Mithril Boots",
|
||||||
|
inventory_image = "3d_armor_inv_boots_mithril.png",
|
||||||
|
groups = {armor_feet=40, armor_heal=8, armor_use=25},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_tool("3d_armor:helmet_crystal", {
|
||||||
|
description = "Crystal Helmet",
|
||||||
|
inventory_image = "3d_armor_inv_helmet_crystal.png",
|
||||||
|
groups = {armor_head=100, armor_heal=50, armor_use=0, armor_fire=10},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:chestplate_crystal", {
|
||||||
|
description = "Crystal Chestplate",
|
||||||
|
inventory_image = "3d_armor_inv_chestplate_crystal.png",
|
||||||
|
groups = {armor_torso=200, armor_heal=100, armor_use=0, armor_fire=10},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:leggings_crystal", {
|
||||||
|
description = "Crystal Leggings",
|
||||||
|
inventory_image = "3d_armor_inv_leggings_crystal.png",
|
||||||
|
groups = {armor_legs=100, armor_heal=50, armor_use=0, armor_fire=10},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("3d_armor:boots_crystal", {
|
||||||
|
description = "Crystal Boots",
|
||||||
|
inventory_image = "3d_armor_inv_boots_crystal.png",
|
||||||
|
groups = {armor_feet=100, armor_heal=50, armor_use=0, physics_speed=1,armor_fire=10,physics_jump=0.5},
|
||||||
|
wear = 0,
|
||||||
|
})
|
After Width: | Height: | Size: 374 B |
After Width: | Height: | Size: 699 B |
After Width: | Height: | Size: 379 B |
After Width: | Height: | Size: 714 B |
After Width: | Height: | Size: 246 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 192 B |
After Width: | Height: | Size: 447 B |
After Width: | Height: | Size: 554 B |
After Width: | Height: | Size: 889 B |
After Width: | Height: | Size: 539 B |
After Width: | Height: | Size: 863 B |
After Width: | Height: | Size: 444 B |
After Width: | Height: | Size: 780 B |
After Width: | Height: | Size: 335 B |
After Width: | Height: | Size: 666 B |
After Width: | Height: | Size: 447 B |
After Width: | Height: | Size: 866 B |
After Width: | Height: | Size: 446 B |
After Width: | Height: | Size: 836 B |
After Width: | Height: | Size: 431 B |
After Width: | Height: | Size: 776 B |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 614 B |
After Width: | Height: | Size: 379 B |
After Width: | Height: | Size: 850 B |
After Width: | Height: | Size: 401 B |
After Width: | Height: | Size: 789 B |
After Width: | Height: | Size: 308 B |
After Width: | Height: | Size: 681 B |
After Width: | Height: | Size: 237 B |
After Width: | Height: | Size: 532 B |
After Width: | Height: | Size: 187 B |
After Width: | Height: | Size: 291 B |
After Width: | Height: | Size: 291 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 291 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 291 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 321 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 308 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 494 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 295 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 287 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 209 B |
After Width: | Height: | Size: 217 B |
After Width: | Height: | Size: 432 B |
After Width: | Height: | Size: 222 B |
After Width: | Height: | Size: 435 B |
After Width: | Height: | Size: 210 B |
After Width: | Height: | Size: 426 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 424 B |
After Width: | Height: | Size: 224 B |
After Width: | Height: | Size: 435 B |
After Width: | Height: | Size: 231 B |
After Width: | Height: | Size: 447 B |
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 440 B |
After Width: | Height: | Size: 215 B |
After Width: | Height: | Size: 448 B |
After Width: | Height: | Size: 210 B |
After Width: | Height: | Size: 432 B |
After Width: | Height: | Size: 191 B |
After Width: | Height: | Size: 406 B |
After Width: | Height: | Size: 424 B |
After Width: | Height: | Size: 216 B |
After Width: | Height: | Size: 210 B |
After Width: | Height: | Size: 431 B |
After Width: | Height: | Size: 435 B |
After Width: | Height: | Size: 226 B |
After Width: | Height: | Size: 443 B |
After Width: | Height: | Size: 218 B |
After Width: | Height: | Size: 444 B |
After Width: | Height: | Size: 222 B |
After Width: | Height: | Size: 440 B |
After Width: | Height: | Size: 210 B |