Compare commits
83 Commits
version-0.
...
multiskin
Author | SHA1 | Date | |
---|---|---|---|
9f49060ae6 | |||
8e8c79aca2 | |||
601fee1079 | |||
c36b1e5fc4 | |||
b1f9e9f1fd | |||
f150e4c988 | |||
503f44ac70 | |||
eb7a52daff | |||
753be543f1 | |||
35db060560 | |||
fd77253816 | |||
f6502ba32b | |||
aa9984b789 | |||
afce9f1140 | |||
ea29ec6f6f | |||
793c74856f | |||
47734969e2 | |||
1af0bb60f8 | |||
a11b3302e1 | |||
664d9fbfef | |||
4dd7e41749 | |||
df429ee487 | |||
7566ecccee | |||
99bc8cf2d3 | |||
a2ec13e28d | |||
065815eec1 | |||
16b0ee2d9e | |||
64f8b3cd58 | |||
74ef6c5759 | |||
b741b7426b | |||
db312b3245 | |||
de2c47f334 | |||
b4283f6e60 | |||
888fbacb49 | |||
50453aa5a6 | |||
b45fbd0f2a | |||
9ffcc19fd7 | |||
6359b0a0ed | |||
4dbe76312b | |||
20edce6c55 | |||
6e58d1280b | |||
20d4728829 | |||
7cfd744ff3 | |||
a76a35f177 | |||
e5e926a02e | |||
3951c833da | |||
e9a2c57826 | |||
5508a26dbf | |||
0ec7858937 | |||
1e059f2557 | |||
5dab1ca887 | |||
1fdff7adaa | |||
23e4d5114f | |||
7fde7c050d | |||
45099ae25a | |||
edebf13c1f | |||
4083782246 | |||
5911447048 | |||
3aac5c98f4 | |||
fe9664589a | |||
11ce84873b | |||
86fd6b0d7d | |||
27a3823eed | |||
348dad3d4d | |||
ea86aa35f5 | |||
f0edb9a710 | |||
75191490c2 | |||
f91af02c45 | |||
3843578a33 | |||
1570efb7ac | |||
5517be8ff2 | |||
709535dff0 | |||
a1d904c517 | |||
3c2cb16351 | |||
6bf28dc2c5 | |||
75a7181e0f | |||
2b840fbe38 | |||
701215c22f | |||
e46ff3488b | |||
f74a52df62 | |||
3c4500a9bf | |||
e69b59e2af | |||
d43d96bb28 |
3
.gitignore
vendored
@ -6,3 +6,6 @@ tags
|
|||||||
*.vim
|
*.vim
|
||||||
armor.conf
|
armor.conf
|
||||||
|
|
||||||
|
## Eclipse project files & directories
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
|
|
||||||
Depends: default
|
Depends: default
|
||||||
|
|
||||||
Recommends: sfinv, inventory_plus or unified_inventory (use only one to avoid conflicts)
|
Recommends: sfinv, unified_inventory or smart_inventory (use only one to avoid conflicts)
|
||||||
|
|
||||||
|
Supports: player_monoids and armor_monoid
|
||||||
|
|
||||||
Adds craftable armor that is visible to other players. Each armor item worn contributes to
|
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.
|
a player's armor group level making them less vulnerable to weapons.
|
||||||
@ -14,10 +16,176 @@ 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
|
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.
|
protects against torches, level 2 for crystal spike, level 3 for fire, level 5 for lava.
|
||||||
|
|
||||||
Configuration
|
Armor Configuration
|
||||||
-------------
|
-------------------
|
||||||
|
|
||||||
Armor can be configured by adding a file called armor.conf in 3d_armor mod and/or world directory.
|
Override the following default settings by adding them to your minetest.conf file.
|
||||||
see armor.conf.example for all available options.
|
|
||||||
|
-- Set false to disable individual armor materials.
|
||||||
|
armor_material_wood = true
|
||||||
|
armor_material_cactus = true
|
||||||
|
armor_material_steel = true
|
||||||
|
armor_material_bronze = true
|
||||||
|
armor_material_diamond = true
|
||||||
|
armor_material_gold = true
|
||||||
|
armor_material_mithril = true
|
||||||
|
armor_material_crystal = true
|
||||||
|
|
||||||
|
-- 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 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: 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
|
||||||
|
|
||||||
|
-- Enable water protection (periodically restores breath when activated)
|
||||||
|
armor_water_protect = true
|
||||||
|
|
||||||
|
-- Enable fire protection (defaults true if using ethereal mod)
|
||||||
|
armor_fire_protect = false
|
||||||
|
|
||||||
|
-- Enable punch damage effects.
|
||||||
|
armor_punch_damage = true
|
||||||
|
|
||||||
|
-- Enable migration of old armor inventories
|
||||||
|
armor_migrate_old_inventory = true
|
||||||
|
|
||||||
|
API
|
||||||
|
---
|
||||||
|
|
||||||
|
Armor Registration:
|
||||||
|
|
||||||
|
armor:register_armor(name, def)
|
||||||
|
|
||||||
|
Wrapper function for `minetest.register_tool`, while registering armor as
|
||||||
|
a tool item is still supported, this may be deprecated in future so new code
|
||||||
|
should use this method.
|
||||||
|
|
||||||
|
Additional fields supported by 3d_armor:
|
||||||
|
|
||||||
|
texture = <filename>
|
||||||
|
preview = <filename>
|
||||||
|
armor_groups = <table>
|
||||||
|
damage_groups = <table>
|
||||||
|
reciprocate_damage = <bool>
|
||||||
|
on_equip = <function>
|
||||||
|
on_unequip = <function>
|
||||||
|
on_destroy = <function>
|
||||||
|
on_damage = <function>
|
||||||
|
on_punched = <function>
|
||||||
|
|
||||||
|
armor:register_armor_group(group, base)
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
armor:register_armor_group("radiation", 100)
|
||||||
|
|
||||||
|
armor:register_armor("mod_name:speed_boots", {
|
||||||
|
description = "Speed Boots",
|
||||||
|
inventory_image = "mod_name_speed_boots_inv.png",
|
||||||
|
texture = "mod_name_speed_boots.png",
|
||||||
|
preview = "mod_name_speed_boots_preview.png",
|
||||||
|
groups = {armor_feet=1, armor_use=500, physics_speed=1.2, flammable=1},
|
||||||
|
armor_groups = {fleshy=10, radiation=10},
|
||||||
|
damage_groups = {cracky=3, snappy=3, choppy=3, crumbly=3, level=1},
|
||||||
|
reciprocate_damage = true,
|
||||||
|
on_destroy = function(player, index, stack)
|
||||||
|
local pos = player:getpos()
|
||||||
|
if pos then
|
||||||
|
minetest.sound_play({
|
||||||
|
name = "mod_name_break_sound",
|
||||||
|
pos = pos,
|
||||||
|
gain = 0.5,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
See armor.lua, technic_armor and shields mods for more examples.
|
||||||
|
|
||||||
|
Default groups:
|
||||||
|
|
||||||
|
Elements: armor_head, armor_torso, armor_legs, armor_feet
|
||||||
|
Attributes: armor_heal, armor_fire, armor_water
|
||||||
|
Physics: physics_jump, physics_speed, physics_gravity
|
||||||
|
Durability: armor_use, flammable
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
|
||||||
|
Elements may be modified by dependent mods, eg shields adds armor_shield.
|
||||||
|
Attributes and physics values are 'stackable', durability is determined
|
||||||
|
by the level of armor_use, total uses == approx (65535/armor_use), non-fleshy
|
||||||
|
damage groups need to be defined in the tool/weapon used against the player.
|
||||||
|
|
||||||
|
Reciprocal tool damage will be done only by the first armor inventory item
|
||||||
|
with `reciprocate_damage = true`
|
||||||
|
|
||||||
|
Armor Functions:
|
||||||
|
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
|
||||||
|
Primarily an internal function but can be called externally to apply any
|
||||||
|
changes that might not otherwise get handled.
|
||||||
|
|
||||||
|
armor:punch(player, hitter, time_from_last_punch, tool_capabilities)
|
||||||
|
|
||||||
|
Used to apply damage to all equipped armor based on the damage groups of
|
||||||
|
each individual item.`hitter`, `time_from_last_punch` and `tool_capabilities`
|
||||||
|
are optional but should be valid if included.
|
||||||
|
|
||||||
|
armor:damage(player, index, stack, use)
|
||||||
|
|
||||||
|
Adds wear to a single armor itemstack, triggers `on_damage` callbacks and
|
||||||
|
updates the necessary inventories. Also handles item destruction callbacks
|
||||||
|
and so should NOT be called from `on_unequip` to avoid an infinite loop.
|
||||||
|
|
||||||
|
Item Callbacks:
|
||||||
|
|
||||||
|
on_equip = func(player, index, stack)
|
||||||
|
on_unequip = func(player, index, stack)
|
||||||
|
on_destroy = func(player, index, stack)
|
||||||
|
on_damage = func(player, index, stack)
|
||||||
|
on_punched = func(player, hitter, time_from_last_punch, tool_capabilities)
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
|
||||||
|
`on_punched` is called every time a player is punched or takes damage, `hitter`,
|
||||||
|
`time_from_last_punch` and `tool_capabilities` can be `nil` and will be in the
|
||||||
|
case of fall damage, etc. When fire protection is enabled, hitter == "fire"
|
||||||
|
in the event of fire damage. Return `false` to override armor damage effects.
|
||||||
|
When armor is destroyed `stack` will contain a copy of the previous stack.
|
||||||
|
|
||||||
|
Global Callbacks:
|
||||||
|
|
||||||
|
armor:register_on_update(func(player))
|
||||||
|
armor:register_on_equip(func(player, index, stack))
|
||||||
|
armor:register_on_unequip(func(player, index, stack))
|
||||||
|
armor:register_on_destroy(func(player, index, stack))
|
||||||
|
|
||||||
|
Global Callback Example:
|
||||||
|
|
||||||
|
armor:register_on_update(function(player)
|
||||||
|
print(player:get_player_name().." armor updated!")
|
||||||
|
end)
|
||||||
|
|
||||||
Note: worldpath config settings override any settings made in the mod's directory.
|
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
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("adminleggings","3d_armor:leggings_admin")
|
|
||||||
|
|
||||||
minetest.register_tool("3d_armor:helmet_admin", {
|
|
||||||
description = "Admin Helmet",
|
|
||||||
inventory_image = "3d_armor_inv_helmet_admin.png",
|
|
||||||
groups = {armor_head=1000, armor_heal=1000, armor_use=0, armor_water=1, not_in_creative_inventory=1},
|
|
||||||
wear = 0,
|
|
||||||
on_drop = function(itemstack, dropper, pos)
|
|
||||||
return
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_tool("3d_armor:chestplate_admin", {
|
|
||||||
description = "Admin Chestplate",
|
|
||||||
inventory_image = "3d_armor_inv_chestplate_admin.png",
|
|
||||||
groups = {armor_torso=1000, armor_heal=1000, armor_use=0, not_in_creative_inventory=1},
|
|
||||||
wear = 0,
|
|
||||||
on_drop = function(itemstack, dropper, pos)
|
|
||||||
return
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_tool("3d_armor:leggings_admin", {
|
|
||||||
description = "Admin Leggings",
|
|
||||||
inventory_image = "3d_armor_inv_leggings_admin.png",
|
|
||||||
groups = {armor_legs=1000, armor_heal=1000, armor_use=0, not_in_creative_inventory=1},
|
|
||||||
wear = 0,
|
|
||||||
on_drop = function(itemstack, dropper, pos)
|
|
||||||
return
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_tool("3d_armor:boots_admin", {
|
|
||||||
description = "Admin Boots",
|
|
||||||
inventory_image = "3d_armor_inv_boots_admin.png",
|
|
||||||
groups = {armor_feet=1000, armor_heal=1000, armor_use=0, not_in_creative_inventory=1},
|
|
||||||
wear = 0,
|
|
||||||
on_drop = function(itemstack, dropper, pos)
|
|
||||||
return
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
512
3d_armor/api.lua
Normal file
@ -0,0 +1,512 @@
|
|||||||
|
local use_multiskin = minetest.global_exists("multiskin")
|
||||||
|
local use_player_monoids = minetest.global_exists("player_monoids")
|
||||||
|
local use_armor_monoid = minetest.global_exists("armor_monoid")
|
||||||
|
local armor_def = setmetatable({}, {
|
||||||
|
__index = function()
|
||||||
|
return setmetatable({
|
||||||
|
groups = setmetatable({}, {
|
||||||
|
__index = function()
|
||||||
|
return 0
|
||||||
|
end})
|
||||||
|
}, {
|
||||||
|
__index = function()
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
local armor_textures = setmetatable({}, {
|
||||||
|
__index = function()
|
||||||
|
return setmetatable({}, {
|
||||||
|
__index = function()
|
||||||
|
return "blank.png"
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
armor = {
|
||||||
|
timer = 0,
|
||||||
|
elements = {"head", "torso", "legs", "feet"},
|
||||||
|
physics = {"jump", "speed", "gravity"},
|
||||||
|
attributes = {"heal", "fire", "water"},
|
||||||
|
formspec = "image[2.5,0;2,4;armor_preview]"..
|
||||||
|
default.gui_bg..
|
||||||
|
default.gui_bg_img..
|
||||||
|
default.gui_slots..
|
||||||
|
default.get_hotbar_bg(0, 4.7)..
|
||||||
|
"list[current_player;main;0,4.7;8,1;]"..
|
||||||
|
"list[current_player;main;0,5.85;8,3;8]",
|
||||||
|
def = armor_def,
|
||||||
|
textures = armor_textures,
|
||||||
|
default_skin = "character.png",
|
||||||
|
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",
|
||||||
|
},
|
||||||
|
fire_nodes = {
|
||||||
|
{"default:lava_source", 5, 8},
|
||||||
|
{"default:lava_flowing", 5, 8},
|
||||||
|
{"fire:basic_flame", 3, 4},
|
||||||
|
{"fire:permanent_flame", 3, 4},
|
||||||
|
{"ethereal:crystal_spike", 2, 1},
|
||||||
|
{"ethereal:fire_flower", 2, 1},
|
||||||
|
{"default:torch", 1, 1},
|
||||||
|
{"default:torch_ceiling", 1, 1},
|
||||||
|
{"default:torch_wall", 1, 1},
|
||||||
|
},
|
||||||
|
registered_groups = {["fleshy"]=100},
|
||||||
|
registered_callbacks = {
|
||||||
|
on_update = {},
|
||||||
|
on_equip = {},
|
||||||
|
on_unequip = {},
|
||||||
|
on_damage = {},
|
||||||
|
on_destroy = {},
|
||||||
|
},
|
||||||
|
migrate_old_inventory = true,
|
||||||
|
version = "0.4.9",
|
||||||
|
}
|
||||||
|
|
||||||
|
armor.config = {
|
||||||
|
init_delay = 2,
|
||||||
|
init_times = 10,
|
||||||
|
bones_delay = 1,
|
||||||
|
update_time = 1,
|
||||||
|
drop = minetest.get_modpath("bones") ~= nil,
|
||||||
|
destroy = false,
|
||||||
|
level_multiplier = 1,
|
||||||
|
heal_multiplier = 1,
|
||||||
|
material_wood = true,
|
||||||
|
material_cactus = true,
|
||||||
|
material_steel = true,
|
||||||
|
material_bronze = true,
|
||||||
|
material_diamond = true,
|
||||||
|
material_gold = true,
|
||||||
|
material_mithril = true,
|
||||||
|
material_crystal = true,
|
||||||
|
water_protect = true,
|
||||||
|
fire_protect = minetest.get_modpath("ethereal") ~= nil,
|
||||||
|
punch_damage = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Armor Registration
|
||||||
|
|
||||||
|
armor.register_armor = function(self, name, def)
|
||||||
|
minetest.register_tool(name, def)
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.register_armor_group = function(self, group, base)
|
||||||
|
base = base or 100
|
||||||
|
self.registered_groups[group] = base
|
||||||
|
if use_armor_monoid then
|
||||||
|
armor_monoid.register_armor_group(group, base)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Armor callbacks
|
||||||
|
|
||||||
|
armor.register_on_update = function(self, func)
|
||||||
|
if type(func) == "function" then
|
||||||
|
table.insert(self.registered_callbacks.on_update, func)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.register_on_equip = function(self, func)
|
||||||
|
if type(func) == "function" then
|
||||||
|
table.insert(self.registered_callbacks.on_equip, func)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.register_on_unequip = function(self, func)
|
||||||
|
if type(func) == "function" then
|
||||||
|
table.insert(self.registered_callbacks.on_unequip, func)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.register_on_damage = function(self, func)
|
||||||
|
if type(func) == "function" then
|
||||||
|
table.insert(self.registered_callbacks.on_damage, func)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.register_on_destroy = function(self, func)
|
||||||
|
if type(func) == "function" then
|
||||||
|
table.insert(self.registered_callbacks.on_destroy, func)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.run_callbacks = function(self, callback, player, index, stack)
|
||||||
|
if stack then
|
||||||
|
local def = stack:get_definition() or {}
|
||||||
|
if type(def[callback]) == "function" then
|
||||||
|
def[callback](player, index, stack)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local callbacks = self.registered_callbacks[callback]
|
||||||
|
if callbacks then
|
||||||
|
for _, func in pairs(callbacks) do
|
||||||
|
func(player, index, stack)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.update_player_visuals = function(self, player)
|
||||||
|
local name = self:get_valid_player(player, "[update_player_visuals]")
|
||||||
|
if not name then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local textures = {
|
||||||
|
"blank.png",
|
||||||
|
"blank.png",
|
||||||
|
self.textures[name].armor,
|
||||||
|
self.textures[name].wielditem,
|
||||||
|
}
|
||||||
|
if use_multiskin then
|
||||||
|
multiskin.textures[name] = textures
|
||||||
|
multiskin.update_player_visuals(player)
|
||||||
|
else
|
||||||
|
textures[1] = armor.default_skin
|
||||||
|
default.player_set_textures(player, textures)
|
||||||
|
end
|
||||||
|
self:run_callbacks("on_update", player)
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.set_player_armor = function(self, player)
|
||||||
|
local name, armor_inv = self:get_valid_player(player, "[set_player_armor]")
|
||||||
|
if not name then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local state = 0
|
||||||
|
local count = 0
|
||||||
|
local material = {count=1}
|
||||||
|
local preview = "3d_armor_preview.png"
|
||||||
|
local texture = "blank.png"
|
||||||
|
local textures = {}
|
||||||
|
local physics = {}
|
||||||
|
local attributes = {}
|
||||||
|
local levels = {}
|
||||||
|
local groups = {}
|
||||||
|
local change = {}
|
||||||
|
if use_multiskin then
|
||||||
|
preview = multiskin.get_preview(player) or preview
|
||||||
|
end
|
||||||
|
for _, phys in pairs(self.physics) do
|
||||||
|
physics[phys] = 1
|
||||||
|
end
|
||||||
|
for _, attr in pairs(self.attributes) do
|
||||||
|
attributes[attr] = 0
|
||||||
|
end
|
||||||
|
for group, _ in pairs(self.registered_groups) do
|
||||||
|
change[group] = 1
|
||||||
|
levels[group] = 0
|
||||||
|
end
|
||||||
|
local list = armor_inv:get_list("armor")
|
||||||
|
if type(list) ~= "table" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
for i, stack in pairs(list) do
|
||||||
|
if stack:get_count() == 1 then
|
||||||
|
local def = stack:get_definition()
|
||||||
|
for _, element in pairs(self.elements) do
|
||||||
|
if def.groups["armor_"..element] then
|
||||||
|
if def.armor_groups then
|
||||||
|
for group, level in pairs(def.armor_groups) do
|
||||||
|
if levels[group] then
|
||||||
|
levels[group] = levels[group] + level
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
local level = def.groups["armor_"..element]
|
||||||
|
levels["fleshy"] = levels["fleshy"] + level
|
||||||
|
end
|
||||||
|
break
|
||||||
|
end
|
||||||
|
-- DEPRECATED, use armor_groups instead
|
||||||
|
if def.groups["armor_radiation"] and levels["radiation"] then
|
||||||
|
levels["radiation"] = def.groups["armor_radiation"]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local item = stack:get_name()
|
||||||
|
local tex = def.texture or item:gsub("%:", "_")
|
||||||
|
tex = tex:gsub(".png$", "")
|
||||||
|
local prev = def.preview or tex.."_preview"
|
||||||
|
prev = prev:gsub(".png$", "")
|
||||||
|
texture = texture.."^"..tex..".png"
|
||||||
|
preview = preview.."^"..prev..".png"
|
||||||
|
state = state + stack:get_wear()
|
||||||
|
count = count + 1
|
||||||
|
for _, phys in pairs(self.physics) do
|
||||||
|
local value = def.groups["physics_"..phys] or 0
|
||||||
|
physics[phys] = physics[phys] + value
|
||||||
|
end
|
||||||
|
for _, attr in pairs(self.attributes) do
|
||||||
|
local value = def.groups["armor_"..attr] or 0
|
||||||
|
attributes[attr] = attributes[attr] + value
|
||||||
|
end
|
||||||
|
local mat = string.match(item, "%:.+_(.+)$")
|
||||||
|
if material.name then
|
||||||
|
if material.name == mat then
|
||||||
|
material.count = material.count + 1
|
||||||
|
end
|
||||||
|
else
|
||||||
|
material.name = mat
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for group, level in pairs(levels) do
|
||||||
|
if level > 0 then
|
||||||
|
level = level * armor.config.level_multiplier
|
||||||
|
if material.name and material.count == #self.elements then
|
||||||
|
level = level * 1.1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local base = self.registered_groups[group]
|
||||||
|
self.def[name].groups[group] = level
|
||||||
|
if level > base then
|
||||||
|
level = base
|
||||||
|
end
|
||||||
|
groups[group] = base - level
|
||||||
|
change[group] = groups[group] / base
|
||||||
|
end
|
||||||
|
for _, attr in pairs(self.attributes) do
|
||||||
|
self.def[name][attr] = attributes[attr]
|
||||||
|
end
|
||||||
|
for _, phys in pairs(self.physics) do
|
||||||
|
self.def[name][phys] = physics[phys]
|
||||||
|
end
|
||||||
|
if use_armor_monoid then
|
||||||
|
armor_monoid.monoid:add_change(player, change, "3d_armor:armor")
|
||||||
|
else
|
||||||
|
player:set_armor_groups(groups)
|
||||||
|
end
|
||||||
|
if use_player_monoids then
|
||||||
|
player_monoids.speed:add_change(player, physics.speed,
|
||||||
|
"3d_armor:physics")
|
||||||
|
player_monoids.jump:add_change(player, physics.jump,
|
||||||
|
"3d_armor:physics")
|
||||||
|
player_monoids.gravity:add_change(player, physics.gravity,
|
||||||
|
"3d_armor:physics")
|
||||||
|
else
|
||||||
|
player:set_physics_override(physics)
|
||||||
|
end
|
||||||
|
self.textures[name].armor = texture
|
||||||
|
self.textures[name].preview = preview
|
||||||
|
self.def[name].level = self.def[name].groups.fleshy or 0
|
||||||
|
self.def[name].state = state
|
||||||
|
self.def[name].count = count
|
||||||
|
self:update_player_visuals(player)
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.punch = function(self, player, hitter, time_from_last_punch, tool_capabilities)
|
||||||
|
local name, armor_inv = self:get_valid_player(player, "[punch]")
|
||||||
|
if not name then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local state = 0
|
||||||
|
local count = 0
|
||||||
|
local recip = true
|
||||||
|
local default_groups = {cracky=3, snappy=3, choppy=3, crumbly=3, level=1}
|
||||||
|
local list = armor_inv:get_list("armor")
|
||||||
|
for i, stack in pairs(list) do
|
||||||
|
if stack:get_count() == 1 then
|
||||||
|
local name = stack:get_name()
|
||||||
|
local use = minetest.get_item_group(name, "armor_use") or 0
|
||||||
|
local damage = use > 0
|
||||||
|
local def = stack:get_definition() or {}
|
||||||
|
if type(def.on_punched) == "function" then
|
||||||
|
damage = def.on_punched(player, hitter, time_from_last_punch,
|
||||||
|
tool_capabilities) ~= false and damage == true
|
||||||
|
end
|
||||||
|
if damage == true and tool_capabilities then
|
||||||
|
local damage_groups = def.damage_groups or default_groups
|
||||||
|
local level = damage_groups.level or 0
|
||||||
|
local groupcaps = tool_capabilities.groupcaps or {}
|
||||||
|
local uses = 0
|
||||||
|
damage = false
|
||||||
|
for group, caps in pairs(groupcaps) do
|
||||||
|
local maxlevel = caps.maxlevel or 0
|
||||||
|
local diff = maxlevel - level
|
||||||
|
if diff == 0 then
|
||||||
|
diff = 1
|
||||||
|
end
|
||||||
|
if diff > 0 and caps.times then
|
||||||
|
local group_level = damage_groups[group]
|
||||||
|
if group_level then
|
||||||
|
local time = caps.times[group_level]
|
||||||
|
if time then
|
||||||
|
local dt = time_from_last_punch or 0
|
||||||
|
if dt > time / diff then
|
||||||
|
if caps.uses then
|
||||||
|
uses = caps.uses * math.pow(3, diff)
|
||||||
|
end
|
||||||
|
damage = true
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if damage == true and recip == true and hitter and
|
||||||
|
def.reciprocate_damage == true and uses > 0 then
|
||||||
|
local item = hitter:get_wielded_item()
|
||||||
|
if item and item:get_name() ~= "" then
|
||||||
|
item:add_wear(65535 / uses)
|
||||||
|
hitter:set_wielded_item(item)
|
||||||
|
end
|
||||||
|
-- reciprocate tool damage only once
|
||||||
|
recip = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if damage == true and hitter == "fire" then
|
||||||
|
damage = minetest.get_item_group(name, "flammable") > 0
|
||||||
|
end
|
||||||
|
if damage == true then
|
||||||
|
self:damage(player, i, stack, use)
|
||||||
|
end
|
||||||
|
state = state + stack:get_wear()
|
||||||
|
count = count + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.def[name].state = state
|
||||||
|
self.def[name].count = count
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.damage = function(self, player, index, stack, use)
|
||||||
|
local old_stack = ItemStack(stack)
|
||||||
|
stack:add_wear(use)
|
||||||
|
self:run_callbacks("on_damage", player, index, stack)
|
||||||
|
self:set_inventory_stack(player, index, stack)
|
||||||
|
if stack:get_count() == 0 then
|
||||||
|
self:run_callbacks("on_unequip", player, index, old_stack)
|
||||||
|
self:run_callbacks("on_destroy", player, index, old_stack)
|
||||||
|
self:set_player_armor(player)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.get_armor_formspec = function(self, name, listring)
|
||||||
|
if armor.def[name].init_time == 0 then
|
||||||
|
return "label[0,0;Armor not initialized!]"
|
||||||
|
end
|
||||||
|
local formspec = armor.formspec..
|
||||||
|
"list[detached:"..name.."_armor;armor;0,0.5;2,3;]"
|
||||||
|
if listring == true then
|
||||||
|
formspec = formspec.."listring[current_player;main]"..
|
||||||
|
"listring[detached:"..name.."_armor;armor]"
|
||||||
|
end
|
||||||
|
formspec = formspec:gsub("armor_preview", armor.textures[name].preview)
|
||||||
|
formspec = formspec:gsub("armor_level", armor.def[name].level)
|
||||||
|
for _, attr in pairs(self.attributes) do
|
||||||
|
formspec = formspec:gsub("armor_attr_"..attr, armor.def[name][attr])
|
||||||
|
end
|
||||||
|
for group, _ in pairs(self.registered_groups) do
|
||||||
|
formspec = formspec:gsub("armor_group_"..group,
|
||||||
|
armor.def[name].groups[group])
|
||||||
|
end
|
||||||
|
return formspec
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.serialize_inventory_list = function(self, list)
|
||||||
|
local list_table = {}
|
||||||
|
for _, stack in ipairs(list) do
|
||||||
|
table.insert(list_table, stack:to_string())
|
||||||
|
end
|
||||||
|
return minetest.serialize(list_table)
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.deserialize_inventory_list = function(self, list_string)
|
||||||
|
local list_table = minetest.deserialize(list_string)
|
||||||
|
local list = {}
|
||||||
|
for _, stack in ipairs(list_table or {}) do
|
||||||
|
table.insert(list, ItemStack(stack))
|
||||||
|
end
|
||||||
|
return list
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.load_armor_inventory = function(self, player)
|
||||||
|
local msg = "[load_armor_inventory]"
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if not name then
|
||||||
|
minetest.log("warning", S("3d_armor: Player name is nil @1", msg))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"})
|
||||||
|
if not armor_inv then
|
||||||
|
minetest.log("warning", S("3d_armor: Detached armor inventory is nil @1", msg))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local armor_list_string = player:get_attribute("3d_armor_inventory")
|
||||||
|
if armor_list_string then
|
||||||
|
armor_inv:set_list("armor", self:deserialize_inventory_list(armor_list_string))
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.save_armor_inventory = function(self, player)
|
||||||
|
local msg = "[save_armor_inventory]"
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if not name then
|
||||||
|
minetest.log("warning", S("3d_armor: Player name is nil @1", msg))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"})
|
||||||
|
if not armor_inv then
|
||||||
|
minetest.log("warning", S("3d_armor: Detached armor inventory is nil @1", msg))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
player:set_attribute("3d_armor_inventory", self:serialize_inventory_list(armor_inv:get_list("armor")))
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.update_inventory = function(self, player)
|
||||||
|
-- DEPRECATED: Legacy inventory support
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.set_inventory_stack = function(self, player, i, stack)
|
||||||
|
local msg = "[set_inventory_stack]"
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if not name then
|
||||||
|
minetest.log("warning", "3d_armor: Player name is nil "..msg)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"})
|
||||||
|
if not armor_inv then
|
||||||
|
minetest.log("warning", S("3d_armor: Detached armor inventory is nil @1", msg))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
armor_inv:set_stack("armor", i, stack)
|
||||||
|
self:save_armor_inventory(player)
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.get_valid_player = function(self, player, msg)
|
||||||
|
msg = msg or ""
|
||||||
|
if not player then
|
||||||
|
minetest.log("warning", "3d_armor: Player reference is nil "..msg)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if not name then
|
||||||
|
minetest.log("warning", "3d_armor: Player name is nil "..msg)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local inv = minetest.get_inventory({type="detached", name=name.."_armor"})
|
||||||
|
if not inv then
|
||||||
|
minetest.log("warning", "3d_armor: Player inventory is nil "..msg)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
return name, inv
|
||||||
|
end
|
||||||
|
|
||||||
|
armor.drop_armor = function(pos, stack)
|
||||||
|
local node = minetest.get_node_or_nil(pos)
|
||||||
|
if node then
|
||||||
|
local obj = minetest.add_item(pos, stack)
|
||||||
|
if obj then
|
||||||
|
obj:setvelocity({x=math.random(-1, 1), y=5, z=math.random(-1, 1)})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -1,3 +1,7 @@
|
|||||||
|
-- DEPRECATED, will not be supported in future versions
|
||||||
|
|
||||||
|
-- See README.txt for new configuration options.
|
||||||
|
|
||||||
-- Armor Configuration (defaults)
|
-- Armor Configuration (defaults)
|
||||||
|
|
||||||
-- You can remove any unwanted armor materials from this table.
|
-- You can remove any unwanted armor materials from this table.
|
||||||
|
1051
3d_armor/armor.lua
@ -1,9 +1,8 @@
|
|||||||
default
|
default
|
||||||
player_monoids?
|
player_monoids?
|
||||||
armor_monoid?
|
armor_monoid?
|
||||||
inventory_plus?
|
|
||||||
unified_inventory?
|
|
||||||
sfinv?
|
|
||||||
fire?
|
fire?
|
||||||
ethereal?
|
ethereal?
|
||||||
bakedclay?
|
bakedclay?
|
||||||
|
intllib?
|
||||||
|
multiskin?
|
||||||
|
@ -1,254 +1,382 @@
|
|||||||
ARMOR_MOD_NAME = minetest.get_current_modname()
|
local S = function(s) return s end
|
||||||
dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/armor.lua")
|
if minetest.global_exists("intllib") then
|
||||||
dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/admin.lua")
|
if intllib.make_gettext_pair then
|
||||||
|
-- New method using gettext.
|
||||||
|
S = intllib.make_gettext_pair()
|
||||||
|
else
|
||||||
|
-- Old method using text files.
|
||||||
|
S = intllib.Getter()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local modname = minetest.get_current_modname()
|
||||||
|
local modpath = minetest.get_modpath(modname)
|
||||||
|
local worldpath = minetest.get_worldpath()
|
||||||
|
local last_punch_time = {}
|
||||||
|
local pending_players = {}
|
||||||
|
local timer = 0
|
||||||
|
|
||||||
if ARMOR_MATERIALS.wood then
|
dofile(modpath.."/api.lua")
|
||||||
minetest.register_tool("3d_armor:helmet_wood", {
|
|
||||||
description = "Wood Helmet",
|
-- Legacy Config Support
|
||||||
inventory_image = "3d_armor_inv_helmet_wood.png",
|
|
||||||
groups = {armor_head=5, armor_heal=0, armor_use=2000},
|
local input = io.open(modpath.."/armor.conf", "r")
|
||||||
wear = 0,
|
if input then
|
||||||
})
|
dofile(modpath.."/armor.conf")
|
||||||
minetest.register_tool("3d_armor:chestplate_wood", {
|
input:close()
|
||||||
description = "Wood Chestplate",
|
input = nil
|
||||||
inventory_image = "3d_armor_inv_chestplate_wood.png",
|
end
|
||||||
groups = {armor_torso=10, armor_heal=0, armor_use=2000},
|
input = io.open(worldpath.."/armor.conf", "r")
|
||||||
wear = 0,
|
if input then
|
||||||
})
|
dofile(worldpath.."/armor.conf")
|
||||||
minetest.register_tool("3d_armor:leggings_wood", {
|
input:close()
|
||||||
description = "Wood Leggings",
|
input = nil
|
||||||
inventory_image = "3d_armor_inv_leggings_wood.png",
|
end
|
||||||
groups = {armor_legs=5, armor_heal=0, armor_use=2000},
|
for name, _ in pairs(armor.config) do
|
||||||
wear = 0,
|
local global = "ARMOR_"..name:upper()
|
||||||
})
|
if minetest.global_exists(global) then
|
||||||
minetest.register_tool("3d_armor:boots_wood", {
|
armor.config[name] = _G[global]
|
||||||
description = "Wood Boots",
|
end
|
||||||
inventory_image = "3d_armor_inv_boots_wood.png",
|
end
|
||||||
groups = {armor_feet=5, armor_heal=0, armor_use=2000},
|
if minetest.global_exists("ARMOR_MATERIALS") then
|
||||||
wear = 0,
|
armor.materials = table.copy(ARMOR_MATERIALS)
|
||||||
})
|
end
|
||||||
|
if minetest.global_exists("ARMOR_FIRE_NODES") then
|
||||||
|
armor.fire_nodes = table.copy(ARMOR_FIRE_NODES)
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARMOR_MATERIALS.cactus then
|
-- Load Configuration
|
||||||
minetest.register_tool("3d_armor:helmet_cactus", {
|
|
||||||
description = "Cactuc Helmet",
|
for name, config in pairs(armor.config) do
|
||||||
inventory_image = "3d_armor_inv_helmet_cactus.png",
|
local setting = minetest.settings:get("armor_"..name)
|
||||||
groups = {armor_head=5, armor_heal=0, armor_use=1000},
|
if type(config) == "number" then
|
||||||
wear = 0,
|
setting = tonumber(setting)
|
||||||
})
|
elseif type(config) == "boolean" then
|
||||||
minetest.register_tool("3d_armor:chestplate_cactus", {
|
setting = minetest.settings:get_bool("armor_"..name)
|
||||||
description = "Cactus Chestplate",
|
end
|
||||||
inventory_image = "3d_armor_inv_chestplate_cactus.png",
|
if setting ~= nil then
|
||||||
groups = {armor_torso=10, armor_heal=0, armor_use=1000},
|
armor.config[name] = setting
|
||||||
wear = 0,
|
end
|
||||||
})
|
end
|
||||||
minetest.register_tool("3d_armor:leggings_cactus", {
|
for material, _ in pairs(armor.materials) do
|
||||||
description = "Cactus Leggings",
|
local key = "material_"..material
|
||||||
inventory_image = "3d_armor_inv_leggings_cactus.png",
|
if armor.config[key] == false then
|
||||||
groups = {armor_legs=5, armor_heal=0, armor_use=1000},
|
armor.materials[material] = nil
|
||||||
wear = 0,
|
end
|
||||||
})
|
|
||||||
minetest.register_tool("3d_armor:boots_cactus", {
|
|
||||||
description = "Cactus Boots",
|
|
||||||
inventory_image = "3d_armor_inv_boots_cactus.png",
|
|
||||||
groups = {armor_feet=5, armor_heal=0, armor_use=1000},
|
|
||||||
wear = 0,
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARMOR_MATERIALS.steel then
|
-- Mod Compatibility
|
||||||
minetest.register_tool("3d_armor:helmet_steel", {
|
if minetest.get_modpath("multiskin") then
|
||||||
description = "Steel Helmet",
|
multiskin.model = "3d_armor_character.b3d"
|
||||||
inventory_image = "3d_armor_inv_helmet_steel.png",
|
end
|
||||||
groups = {armor_head=10, armor_heal=0, armor_use=500},
|
if minetest.get_modpath("technic") then
|
||||||
wear = 0,
|
armor.formspec = armor.formspec..
|
||||||
})
|
"label[5,2.5;"..S("Radiation")..": armor_group_radiation]"
|
||||||
minetest.register_tool("3d_armor:chestplate_steel", {
|
armor:register_armor_group("radiation")
|
||||||
description = "Steel Chestplate",
|
end
|
||||||
inventory_image = "3d_armor_inv_chestplate_steel.png",
|
if not minetest.get_modpath("moreores") then
|
||||||
groups = {armor_torso=15, armor_heal=0, armor_use=500},
|
armor.materials.mithril = nil
|
||||||
wear = 0,
|
end
|
||||||
})
|
if not minetest.get_modpath("ethereal") then
|
||||||
minetest.register_tool("3d_armor:leggings_steel", {
|
armor.materials.crystal = nil
|
||||||
description = "Steel Leggings",
|
|
||||||
inventory_image = "3d_armor_inv_leggings_steel.png",
|
|
||||||
groups = {armor_legs=15, armor_heal=0, armor_use=500},
|
|
||||||
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=0, armor_use=500},
|
|
||||||
wear = 0,
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARMOR_MATERIALS.bronze then
|
dofile(modpath.."/armor.lua")
|
||||||
minetest.register_tool("3d_armor:helmet_bronze", {
|
|
||||||
description = "Bronze Helmet",
|
-- Armor Initialization
|
||||||
inventory_image = "3d_armor_inv_helmet_bronze.png",
|
|
||||||
groups = {armor_head=10, armor_heal=6, armor_use=250},
|
armor.formspec = armor.formspec..
|
||||||
wear = 0,
|
"label[5,1;"..S("Level")..": armor_level]"..
|
||||||
})
|
"label[5,1.5;"..S("Heal")..": armor_attr_heal]"
|
||||||
minetest.register_tool("3d_armor:chestplate_bronze", {
|
if armor.config.fire_protect then
|
||||||
description = "Bronze Chestplate",
|
armor.formspec = armor.formspec.."label[5,2;"..S("Fire")..": armor_fire]"
|
||||||
inventory_image = "3d_armor_inv_chestplate_bronze.png",
|
end
|
||||||
groups = {armor_torso=15, armor_heal=6, armor_use=250},
|
armor:register_on_destroy(function(player, index, stack)
|
||||||
wear = 0,
|
local name = player:get_player_name()
|
||||||
})
|
local def = stack:get_definition()
|
||||||
minetest.register_tool("3d_armor:leggings_bronze", {
|
if name and def and def.description then
|
||||||
description = "Bronze Leggings",
|
minetest.chat_send_player(name, S("Your").." "..def.description.." "..
|
||||||
inventory_image = "3d_armor_inv_leggings_bronze.png",
|
S("got destroyed").."!")
|
||||||
groups = {armor_legs=15, armor_heal=6, armor_use=250},
|
end
|
||||||
wear = 0,
|
end)
|
||||||
})
|
|
||||||
minetest.register_tool("3d_armor:boots_bronze", {
|
local function init_player_armor(player)
|
||||||
description = "Bronze Boots",
|
local name = player:get_player_name()
|
||||||
inventory_image = "3d_armor_inv_boots_bronze.png",
|
local pos = player:getpos()
|
||||||
groups = {armor_feet=10, armor_heal=6, armor_use=250},
|
if not name or not pos then
|
||||||
wear = 0,
|
return false
|
||||||
})
|
end
|
||||||
|
local armor_inv = minetest.create_detached_inventory(name.."_armor", {
|
||||||
|
on_put = function(inv, listname, index, stack, player)
|
||||||
|
armor:save_armor_inventory(player)
|
||||||
|
armor:run_callbacks("on_equip", player, index, stack)
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
end,
|
||||||
|
on_take = function(inv, listname, index, stack, player)
|
||||||
|
armor:save_armor_inventory(player)
|
||||||
|
armor:run_callbacks("on_unequip", player, index, stack)
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
end,
|
||||||
|
on_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
||||||
|
armor:save_armor_inventory(player)
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
end,
|
||||||
|
allow_put = function(inv, listname, index, stack, player)
|
||||||
|
local def = stack:get_definition() or {}
|
||||||
|
local allowed = 0
|
||||||
|
for _, element in pairs(armor.elements) do
|
||||||
|
if def.groups["armor_"..element] then
|
||||||
|
allowed = 1
|
||||||
|
for i = 1, 6 do
|
||||||
|
local item = inv:get_stack("armor", i):get_name()
|
||||||
|
if minetest.get_item_group(item, "armor_"..element) > 0 then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return allowed
|
||||||
|
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)
|
||||||
|
return count
|
||||||
|
end,
|
||||||
|
}, name)
|
||||||
|
armor_inv:set_size("armor", 6)
|
||||||
|
if not armor:load_armor_inventory(player) and armor.migrate_old_inventory then
|
||||||
|
local player_inv = player:get_inventory()
|
||||||
|
player_inv:set_size("armor", 6)
|
||||||
|
for i=1, 6 do
|
||||||
|
local stack = player_inv:get_stack("armor", i)
|
||||||
|
armor_inv:set_stack("armor", i, stack)
|
||||||
|
end
|
||||||
|
armor:save_armor_inventory(player)
|
||||||
|
player_inv:set_size("armor", 0)
|
||||||
|
end
|
||||||
|
for i=1, 6 do
|
||||||
|
local stack = armor_inv:get_stack("armor", i)
|
||||||
|
armor:run_callbacks("on_equip", player, i, stack)
|
||||||
|
end
|
||||||
|
armor.def[name] = {
|
||||||
|
init_time = minetest.get_gametime(),
|
||||||
|
level = 0,
|
||||||
|
state = 0,
|
||||||
|
count = 0,
|
||||||
|
groups = {},
|
||||||
|
}
|
||||||
|
for _, phys in pairs(armor.physics) do
|
||||||
|
armor.def[name][phys] = 1
|
||||||
|
end
|
||||||
|
for _, attr in pairs(armor.attributes) do
|
||||||
|
armor.def[name][attr] = 0
|
||||||
|
end
|
||||||
|
for group, _ in pairs(armor.registered_groups) do
|
||||||
|
armor.def[name].groups[group] = 0
|
||||||
|
end
|
||||||
|
armor.textures[name] = {
|
||||||
|
armor = "blank.png",
|
||||||
|
wielditem = "blank.png",
|
||||||
|
}
|
||||||
|
minetest.after(0, function(player)
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
end, player)
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARMOR_MATERIALS.diamond then
|
-- Armor Player Model
|
||||||
minetest.register_tool("3d_armor:helmet_diamond", {
|
|
||||||
description = "Diamond Helmet",
|
default.player_register_model("3d_armor_character.b3d", {
|
||||||
inventory_image = "3d_armor_inv_helmet_diamond.png",
|
animation_speed = 30,
|
||||||
groups = {armor_head=15, armor_heal=12, armor_use=100},
|
textures = {
|
||||||
wear = 0,
|
armor.default_skin,
|
||||||
})
|
"blank.png",
|
||||||
minetest.register_tool("3d_armor:chestplate_diamond", {
|
"blank.png",
|
||||||
description = "Diamond Chestplate",
|
"blank.png",
|
||||||
inventory_image = "3d_armor_inv_chestplate_diamond.png",
|
},
|
||||||
groups = {armor_torso=20, armor_heal=12, armor_use=100},
|
animations = {
|
||||||
wear = 0,
|
stand = {x=0, y=79},
|
||||||
})
|
lay = {x=162, y=166},
|
||||||
minetest.register_tool("3d_armor:leggings_diamond", {
|
walk = {x=168, y=187},
|
||||||
description = "Diamond Leggings",
|
mine = {x=189, y=198},
|
||||||
inventory_image = "3d_armor_inv_leggings_diamond.png",
|
walk_mine = {x=200, y=219},
|
||||||
groups = {armor_legs=20, armor_heal=12, armor_use=100},
|
sit = {x=81, y=160},
|
||||||
wear = 0,
|
},
|
||||||
})
|
})
|
||||||
minetest.register_tool("3d_armor:boots_diamond", {
|
|
||||||
description = "Diamond Boots",
|
minetest.register_on_joinplayer(function(player)
|
||||||
inventory_image = "3d_armor_inv_boots_diamond.png",
|
default.player_set_model(player, "3d_armor_character.b3d")
|
||||||
groups = {armor_feet=15, armor_heal=12, armor_use=100},
|
minetest.after(0, function(player)
|
||||||
wear = 0,
|
if init_player_armor(player) == false then
|
||||||
})
|
pending_players[player] = 0
|
||||||
|
end
|
||||||
|
end, player)
|
||||||
|
end)
|
||||||
|
|
||||||
|
minetest.register_on_leaveplayer(function(player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if name then
|
||||||
|
armor.def[name] = nil
|
||||||
|
armor.textures[name] = nil
|
||||||
|
end
|
||||||
|
pending_players[player] = nil
|
||||||
|
end)
|
||||||
|
|
||||||
|
if armor.config.drop == true or armor.config.destroy == true then
|
||||||
|
minetest.register_on_dieplayer(function(player)
|
||||||
|
local name, armor_inv = armor:get_valid_player(player, "[on_dieplayer]")
|
||||||
|
if not name then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local drop = {}
|
||||||
|
for i=1, armor_inv:get_size("armor") do
|
||||||
|
local stack = armor_inv:get_stack("armor", i)
|
||||||
|
if stack:get_count() > 0 then
|
||||||
|
table.insert(drop, stack)
|
||||||
|
armor:set_inventory_stack(player, i, nil)
|
||||||
|
armor:run_callbacks("on_unequip", player, i, stack)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
local pos = player:getpos()
|
||||||
|
if pos and armor.config.destroy == false then
|
||||||
|
minetest.after(armor.config.bones_delay, function()
|
||||||
|
local meta = nil
|
||||||
|
local maxp = vector.add(pos, 8)
|
||||||
|
local minp = vector.subtract(pos, 8)
|
||||||
|
local bones = minetest.find_nodes_in_area(minp, maxp, {"bones:bones"})
|
||||||
|
for _, p in pairs(bones) do
|
||||||
|
local m = minetest.get_meta(p)
|
||||||
|
if m:get_string("owner") == name then
|
||||||
|
meta = m
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if meta then
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
for _,stack in ipairs(drop) do
|
||||||
|
if inv:room_for_item("main", stack) then
|
||||||
|
inv:add_item("main", stack)
|
||||||
|
else
|
||||||
|
armor.drop_armor(pos, stack)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
for _,stack in ipairs(drop) do
|
||||||
|
armor.drop_armor(pos, stack)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARMOR_MATERIALS.gold then
|
if armor.config.punch_damage == true then
|
||||||
minetest.register_tool("3d_armor:helmet_gold", {
|
minetest.register_on_punchplayer(function(player, hitter,
|
||||||
description = "Gold Helmet",
|
time_from_last_punch, tool_capabilities)
|
||||||
inventory_image = "3d_armor_inv_helmet_gold.png",
|
local name = player:get_player_name()
|
||||||
groups = {armor_head=10, armor_heal=6, armor_use=250},
|
if name then
|
||||||
wear = 0,
|
armor:punch(player, hitter, time_from_last_punch, tool_capabilities)
|
||||||
})
|
last_punch_time[name] = minetest.get_gametime()
|
||||||
minetest.register_tool("3d_armor:chestplate_gold", {
|
end
|
||||||
description = "Gold Chestplate",
|
end)
|
||||||
inventory_image = "3d_armor_inv_chestplate_gold.png",
|
|
||||||
groups = {armor_torso=15, armor_heal=6, armor_use=250},
|
|
||||||
wear = 0,
|
|
||||||
})
|
|
||||||
minetest.register_tool("3d_armor:leggings_gold", {
|
|
||||||
description = "Gold Leggings",
|
|
||||||
inventory_image = "3d_armor_inv_leggings_gold.png",
|
|
||||||
groups = {armor_legs=15, armor_heal=6, armor_use=250},
|
|
||||||
wear = 0,
|
|
||||||
})
|
|
||||||
minetest.register_tool("3d_armor:boots_gold", {
|
|
||||||
description = "Gold Boots",
|
|
||||||
inventory_image = "3d_armor_inv_boots_gold.png",
|
|
||||||
groups = {armor_feet=10, armor_heal=6, armor_use=250},
|
|
||||||
wear = 0,
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARMOR_MATERIALS.mithril then
|
minetest.register_on_player_hpchange(function(player, hp_change)
|
||||||
minetest.register_tool("3d_armor:helmet_mithril", {
|
if player and hp_change < 0 then
|
||||||
description = "Mithril Helmet",
|
local name = player:get_player_name()
|
||||||
inventory_image = "3d_armor_inv_helmet_mithril.png",
|
if name then
|
||||||
groups = {armor_head=15, armor_heal=12, armor_use=50},
|
local heal = armor.def[name].heal
|
||||||
wear = 0,
|
heal = heal * armor.config.heal_multiplier
|
||||||
})
|
if heal >= math.random(100) then
|
||||||
minetest.register_tool("3d_armor:chestplate_mithril", {
|
hp_change = 0
|
||||||
description = "Mithril Chestplate",
|
end
|
||||||
inventory_image = "3d_armor_inv_chestplate_mithril.png",
|
-- check if armor damage was handled by fire or on_punchplayer
|
||||||
groups = {armor_torso=20, armor_heal=12, armor_use=50},
|
local time = last_punch_time[name] or 0
|
||||||
wear = 0,
|
if time == 0 or time + 1 < minetest.get_gametime() then
|
||||||
})
|
armor:punch(player)
|
||||||
minetest.register_tool("3d_armor:leggings_mithril", {
|
end
|
||||||
description = "Mithril Leggings",
|
end
|
||||||
inventory_image = "3d_armor_inv_leggings_mithril.png",
|
end
|
||||||
groups = {armor_legs=20, armor_heal=12, armor_use=50},
|
return hp_change
|
||||||
wear = 0,
|
end, true)
|
||||||
})
|
|
||||||
minetest.register_tool("3d_armor:boots_mithril", {
|
minetest.register_globalstep(function(dtime)
|
||||||
description = "Mithril Boots",
|
timer = timer + dtime
|
||||||
inventory_image = "3d_armor_inv_boots_mithril.png",
|
if timer > armor.config.init_delay then
|
||||||
groups = {armor_feet=15, armor_heal=12, armor_use=50},
|
for player, count in pairs(pending_players) do
|
||||||
wear = 0,
|
local remove = init_player_armor(player) == true
|
||||||
})
|
pending_players[player] = count + 1
|
||||||
|
if remove == false and count > armor.config.init_times then
|
||||||
|
minetest.log("warning", "3d_armor: Failed to initialize player")
|
||||||
|
remove = true
|
||||||
|
end
|
||||||
|
if remove == true then
|
||||||
|
pending_players[player] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
timer = 0
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Fire Protection and water breating, added by TenPlus1
|
||||||
|
|
||||||
|
if armor.config.fire_protect == true then
|
||||||
|
-- override hot nodes so they do not hurt player anywhere but mod
|
||||||
|
for _, row in pairs(armor.fire_nodes) do
|
||||||
|
if minetest.registered_nodes[row[1]] then
|
||||||
|
minetest.override_item(row[1], {damage_per_second = 0})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
print ("[3d_armor] Fire Nodes disabled")
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARMOR_MATERIALS.crystal then
|
if armor.config.water_protect == true or armor.config.fire_protect == true then
|
||||||
minetest.register_tool("3d_armor:helmet_crystal", {
|
minetest.register_globalstep(function(dtime)
|
||||||
description = "Crystal Helmet",
|
armor.timer = armor.timer + dtime
|
||||||
inventory_image = "3d_armor_inv_helmet_crystal.png",
|
if armor.timer < armor.config.update_time then
|
||||||
groups = {armor_head=15, armor_heal=12, armor_use=50, armor_fire=1},
|
return
|
||||||
wear = 0,
|
end
|
||||||
})
|
for _,player in pairs(minetest.get_connected_players()) do
|
||||||
minetest.register_tool("3d_armor:chestplate_crystal", {
|
local name = player:get_player_name()
|
||||||
description = "Crystal Chestplate",
|
local pos = player:getpos()
|
||||||
inventory_image = "3d_armor_inv_chestplate_crystal.png",
|
local hp = player:get_hp()
|
||||||
groups = {armor_torso=20, armor_heal=12, armor_use=50, armor_fire=1},
|
if not name or not pos or not hp then
|
||||||
wear = 0,
|
return
|
||||||
})
|
end
|
||||||
minetest.register_tool("3d_armor:leggings_crystal", {
|
-- water breathing
|
||||||
description = "Crystal Leggings",
|
if armor.config.water_protect == true then
|
||||||
inventory_image = "3d_armor_inv_leggings_crystal.png",
|
if armor.def[name].water > 0 and
|
||||||
groups = {armor_legs=20, armor_heal=12, armor_use=50, armor_fire=1},
|
player:get_breath() < 10 then
|
||||||
wear = 0,
|
player:set_breath(10)
|
||||||
})
|
end
|
||||||
minetest.register_tool("3d_armor:boots_crystal", {
|
end
|
||||||
description = "Crystal Boots",
|
-- fire protection
|
||||||
inventory_image = "3d_armor_inv_boots_crystal.png",
|
if armor.config.fire_protect == true then
|
||||||
groups = {armor_feet=15, armor_heal=12, armor_use=50, physics_speed=1, physics_jump=0.5, armor_fire=1},
|
local fire_damage = true
|
||||||
wear = 0,
|
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 pairs(armor.fire_nodes) do
|
||||||
|
-- check fire protection, if not enough then get hurt
|
||||||
|
if row[1] == node_head or row[1] == node_feet then
|
||||||
|
if fire_damage == true then
|
||||||
|
armor:punch(player, "fire")
|
||||||
|
last_punch_time[name] = minetest.get_gametime()
|
||||||
|
fire_damage = false
|
||||||
|
end
|
||||||
|
if hp > 0 and armor.def[name].fire < row[2] then
|
||||||
|
hp = hp - row[3] * armor.config.update_time
|
||||||
|
player:set_hp(hp)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
armor.timer = 0
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
for k, v in pairs(ARMOR_MATERIALS) do
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "3d_armor:helmet_"..k,
|
|
||||||
recipe = {
|
|
||||||
{v, v, v},
|
|
||||||
{v, "", v},
|
|
||||||
{"", "", ""},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "3d_armor:chestplate_"..k,
|
|
||||||
recipe = {
|
|
||||||
{v, "", v},
|
|
||||||
{v, v, v},
|
|
||||||
{v, v, v},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "3d_armor:leggings_"..k,
|
|
||||||
recipe = {
|
|
||||||
{v, v, v},
|
|
||||||
{v, "", v},
|
|
||||||
{v, "", v},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "3d_armor:boots_"..k,
|
|
||||||
recipe = {
|
|
||||||
{v, "", v},
|
|
||||||
{v, "", v},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 356 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 208 B After Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 405 B |
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 356 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 356 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 391 B |
Before Width: | Height: | Size: 196 B After Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 361 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 508 B |
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 431 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 520 B |
Before Width: | Height: | Size: 456 B After Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 508 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 431 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 508 B |
Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 431 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 276 B After Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 284 B After Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 493 B |
Before Width: | Height: | Size: 281 B After Width: | Height: | Size: 399 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 474 B |
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 431 B |
Before Width: | Height: | Size: 192 B After Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 426 B |
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 469 B |
Before Width: | Height: | Size: 253 B After Width: | Height: | Size: 352 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 431 B |
Before Width: | Height: | Size: 184 B After Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 431 B |
Before Width: | Height: | Size: 185 B After Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 426 B |
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 426 B |
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 478 B |
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 350 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 473 B |
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 337 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 398 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 402 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 430 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 398 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 398 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 402 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 402 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 412 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 420 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 365 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 381 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 365 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 365 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 359 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 364 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 413 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 378 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 414 B |