diff --git a/3d_armor/.github/workflows/integration-test.yml b/3d_armor/.github/workflows/integration-test.yml new file mode 100644 index 0000000..1eeaa6a --- /dev/null +++ b/3d_armor/.github/workflows/integration-test.yml @@ -0,0 +1,14 @@ +name: integration-test + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: integration-test + run: ./integration-test.sh diff --git a/3d_armor/.github/workflows/luacheck.yml b/3d_armor/.github/workflows/luacheck.yml new file mode 100644 index 0000000..a03fe92 --- /dev/null +++ b/3d_armor/.github/workflows/luacheck.yml @@ -0,0 +1,17 @@ +name: luacheck + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: apt + run: sudo apt-get install -y luarocks + - name: luacheck install + run: luarocks install --local luacheck + - name: luacheck run + run: $HOME/.luarocks/bin/luacheck ./ diff --git a/3d_armor/.luacheckrc b/3d_armor/.luacheckrc new file mode 100644 index 0000000..b01ed8e --- /dev/null +++ b/3d_armor/.luacheckrc @@ -0,0 +1,34 @@ + +unused_args = false + +globals = { + "wieldview", + "armor", + "armor_i18n", + "inventory_plus" +} + +read_globals = { + -- Stdlib + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Minetest + "vector", "ItemStack", + "dump", "VoxelArea", + + -- deps + "default", + "minetest", + "unified_inventory", + "intllib", + "wardrobe", + "player_monoids", + "armor_monoid", + "sfinv", + "ARMOR_MATERIALS", + "ARMOR_FIRE_NODES", + "pova", + "skins", + "u_skins" +} diff --git a/3d_armor/3d_armor/LICENSE.txt b/3d_armor/3d_armor/LICENSE.txt new file mode 100644 index 0000000..f253f29 --- /dev/null +++ b/3d_armor/3d_armor/LICENSE.txt @@ -0,0 +1,26 @@ +[mod] 3d Armor [3d_armor] +========================= + +License Source Code +------------------- + +Copyright (C) 2012-2019 stujones11, Stuart Jones + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +License Textures +---------------- + +Copyright (C) 2017-2019 davidthecreator - CC-BY-SA 3.0 diff --git a/3d_armor/3d_armor/README.txt b/3d_armor/3d_armor/README.txt new file mode 100644 index 0000000..7dbe82d --- /dev/null +++ b/3d_armor/3d_armor/README.txt @@ -0,0 +1,191 @@ +[mod] Visible Player Armor [3d_armor] +===================================== + +Depends: default + +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 +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. + +Armor Configuration +------------------- + +Override the following default settings by adding them to your minetest.conf file. + +-- 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 = 2 + +-- Number of initialization attempts. +-- Use in conjunction with armor_init_delay if initialization problems persist. +armor_init_times = 10 + +-- 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 = + preview = + armor_groups = + damage_groups =
+ reciprocate_damage = + on_equip = + on_unequip = + on_destroy = + on_damage = + on_punched = + +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:get_pos() + 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) + diff --git a/3d_armor/3d_armor/api.lua b/3d_armor/3d_armor/api.lua new file mode 100644 index 0000000..6aae7d2 --- /dev/null +++ b/3d_armor/3d_armor/api.lua @@ -0,0 +1,542 @@ +-- support for i18n +local S = armor_i18n.gettext + +local skin_previews = {} +local use_player_monoids = minetest.global_exists("player_monoids") +local use_armor_monoid = minetest.global_exists("armor_monoid") +local use_pova_mod = minetest.get_modpath("pova") +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", + 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.13", +} + +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) + 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 + 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 = armor:get_preview(name) + local texture = "3d_armor_trans.png" + local physics = {} + local attributes = {} + local levels = {} + local groups = {} + local change = {} + 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 + local mult = attr == "heal" and self.config.heal_multiplier or 1 + self.def[name][attr] = attributes[attr] * mult + 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 + -- Preserve immortal group (damage disabled for player) + local immortal = player:get_armor_groups().immortal + if immortal and immortal ~= 0 then + groups.immortal = 1 + end + 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") + elseif use_pova_mod then + -- only add the changes, not the default 1.0 for each physics setting + pova.add_override(name, "3d_armor", { + speed = physics.speed - 1, + jump = physics.jump - 1, + gravity = physics.gravity - 1, + }) + pova.do_override(player) + else + -- Check access conflicts with other mods + if player:get_meta():get_int("player_physics_locked") == 0 then + player:set_physics_override(physics) + end + 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 set_state + local set_count + 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 itemname = stack:get_name() + local use = minetest.get_item_group(itemname, "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(itemname, "flammable") > 0 + end + if damage == true then + self:damage(player, i, stack, use) + set_state = self.def[name].state + set_count = self.def[name].count + end + state = state + stack:get_wear() + count = count + 1 + end + end + if set_count and set_count ~= count then + state = set_state or state + count = set_count or count + 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_player_skin = function(self, name) + if (self.skin_mod == "skins" or self.skin_mod == "simple_skins") and skins.skins[name] then + return skins.skins[name]..".png" + elseif self.skin_mod == "u_skins" and u_skins.u_skins[name] then + return u_skins.u_skins[name]..".png" + elseif self.skin_mod == "wardrobe" and wardrobe.playerSkins and wardrobe.playerSkins[name] then + return wardrobe.playerSkins[name] + end + return armor.default_skin..".png" +end + +armor.add_preview = function(self, preview) + skin_previews[preview] = true +end + +armor.get_preview = function(self, name) + local preview = string.gsub(armor:get_player_skin(name), ".png", "_preview.png") + if skin_previews[preview] then + return preview + end + return "character_preview.png" +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.get_element = function(self, item_name) + for _, element in pairs(armor.elements) do + if minetest.get_item_group(item_name, "armor_"..element) > 0 then + return element + end + end +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 _, inv = self:get_valid_player(player, "[load_armor_inventory]") + if inv then + local meta = player:get_meta() + local armor_list_string = meta:get_string("3d_armor_inventory") + if armor_list_string then + inv:set_list("armor", + self:deserialize_inventory_list(armor_list_string)) + return true + end + end +end + +armor.save_armor_inventory = function(self, player) + local _, inv = self:get_valid_player(player, "[save_armor_inventory]") + if inv then + local meta = player:get_meta() + meta:set_string("3d_armor_inventory", + self:serialize_inventory_list(inv:get_list("armor"))) + end +end + +armor.update_inventory = function(self, player) + -- DEPRECATED: Legacy inventory support +end + +armor.set_inventory_stack = function(self, player, i, stack) + local _, inv = self:get_valid_player(player, "[set_inventory_stack]") + if inv then + inv:set_stack("armor", i, stack) + self:save_armor_inventory(player) + end +end + +armor.get_valid_player = function(self, player, msg) + msg = msg or "" + if not player then + minetest.log("warning", S("3d_armor: Player reference is nil @1", msg)) + return + end + 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 inv = minetest.get_inventory({type="detached", name=name.."_armor"}) + if not inv then + minetest.log("warning", S("3d_armor: Detached armor inventory is nil @1", 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:set_velocity({x=math.random(-1, 1), y=5, z=math.random(-1, 1)}) + end + end +end diff --git a/3d_armor/3d_armor/armor.conf.example b/3d_armor/3d_armor/armor.conf.example new file mode 100644 index 0000000..9ce34b4 --- /dev/null +++ b/3d_armor/3d_armor/armor.conf.example @@ -0,0 +1,65 @@ +-- DEPRECATED, will not be supported in future versions + +-- See README.txt for new configuration options. + +-- 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}, + {"fire:permanent_flame", 3, 4}, + {"ethereal:crystal_spike", 2, 1}, + {"ethereal:fire_flower", 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 + +-- You can use this to increase or decrease overall armor radiation protection, +-- eg: ARMOR_RADIATION_MULTIPLIER = 0 will completely disable radiation protection. +-- Note: patched technic mod is required +ARMOR_RADIATION_MULTIPLIER = 1 diff --git a/3d_armor/3d_armor/armor.lua b/3d_armor/3d_armor/armor.lua new file mode 100644 index 0000000..171ce03 --- /dev/null +++ b/3d_armor/3d_armor/armor.lua @@ -0,0 +1,372 @@ +-- support for i18n +local S = armor_i18n.gettext + +armor:register_armor("3d_armor:helmet_admin", { + description = S("Admin Helmet"), + inventory_image = "3d_armor_inv_helmet_admin.png", + armor_groups = {fleshy=100}, + groups = {armor_head=1, armor_heal=100, armor_use=0, armor_water=1, + not_in_creative_inventory=1}, + on_drop = function(itemstack, dropper, pos) + return + end, +}) + +armor:register_armor("3d_armor:chestplate_admin", { + description = S("Admin Chestplate"), + inventory_image = "3d_armor_inv_chestplate_admin.png", + armor_groups = {fleshy=100}, + groups = {armor_torso=1, armor_heal=100, armor_use=0, + not_in_creative_inventory=1}, + on_drop = function(itemstack, dropper, pos) + return + end, +}) + +armor:register_armor("3d_armor:leggings_admin", { + description = S("Admin Leggings"), + inventory_image = "3d_armor_inv_leggings_admin.png", + armor_groups = {fleshy=100}, + groups = {armor_legs=1, armor_heal=100, armor_use=0, + not_in_creative_inventory=1}, + on_drop = function(itemstack, dropper, pos) + return + end, +}) + +armor:register_armor("3d_armor:boots_admin", { + description = S("Admin Boots"), + inventory_image = "3d_armor_inv_boots_admin.png", + armor_groups = {fleshy=100}, + groups = {armor_feet=1, armor_heal=100, armor_use=0, + not_in_creative_inventory=1}, + on_drop = function(itemstack, dropper, pos) + return + end, +}) + +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") + +if armor.materials.wood then + armor:register_armor("3d_armor:helmet_wood", { + description = S("Wood Helmet"), + inventory_image = "3d_armor_inv_helmet_wood.png", + groups = {armor_head=1, armor_heal=0, armor_use=2000, flammable=1}, + armor_groups = {fleshy=5}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, + }) + armor:register_armor("3d_armor:chestplate_wood", { + description = S("Wood Chestplate"), + inventory_image = "3d_armor_inv_chestplate_wood.png", + groups = {armor_torso=1, armor_heal=0, armor_use=2000, flammable=1}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, + }) + armor:register_armor("3d_armor:leggings_wood", { + description = S("Wood Leggings"), + inventory_image = "3d_armor_inv_leggings_wood.png", + groups = {armor_legs=1, armor_heal=0, armor_use=2000, flammable=1}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, + }) + armor:register_armor("3d_armor:boots_wood", { + description = S("Wood Boots"), + inventory_image = "3d_armor_inv_boots_wood.png", + armor_groups = {fleshy=5}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, + groups = {armor_feet=1, armor_heal=0, armor_use=2000, flammable=1}, + }) + local wood_armor_fuel = { + helmet = 6, + chestplate = 8, + leggings = 7, + boots = 5 + } + for armor, burn in pairs(wood_armor_fuel) do + minetest.register_craft({ + type = "fuel", + recipe = "3d_armor:" .. armor .. "_wood", + burntime = burn, + }) + end +end + +if armor.materials.cactus then + armor:register_armor("3d_armor:helmet_cactus", { + description = S("Cactus Helmet"), + inventory_image = "3d_armor_inv_helmet_cactus.png", + groups = {armor_head=1, armor_heal=0, armor_use=1000}, + armor_groups = {fleshy=5}, + damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1}, + }) + armor:register_armor("3d_armor:chestplate_cactus", { + description = S("Cactus Chestplate"), + inventory_image = "3d_armor_inv_chestplate_cactus.png", + groups = {armor_torso=1, armor_heal=0, armor_use=1000}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1}, + }) + armor:register_armor("3d_armor:leggings_cactus", { + description = S("Cactus Leggings"), + inventory_image = "3d_armor_inv_leggings_cactus.png", + groups = {armor_legs=1, armor_heal=0, armor_use=1000}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1}, + }) + armor:register_armor("3d_armor:boots_cactus", { + description = S("Cactus Boots"), + inventory_image = "3d_armor_inv_boots_cactus.png", + groups = {armor_feet=1, armor_heal=0, armor_use=1000}, + armor_groups = {fleshy=5}, + damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1}, + }) + local cactus_armor_fuel = { + helmet = 14, + chestplate = 16, + leggings = 15, + boots = 13 + } + for armor, burn in pairs(cactus_armor_fuel) do + minetest.register_craft({ + type = "fuel", + recipe = "3d_armor:" .. armor .. "_cactus", + burntime = burn, + }) + end +end + +if armor.materials.steel then + armor:register_armor("3d_armor:helmet_steel", { + description = S("Steel Helmet"), + inventory_image = "3d_armor_inv_helmet_steel.png", + groups = {armor_head=1, armor_heal=0, armor_use=800, + physics_speed=-0.01, physics_gravity=0.01}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, + }) + armor:register_armor("3d_armor:chestplate_steel", { + description = S("Steel Chestplate"), + inventory_image = "3d_armor_inv_chestplate_steel.png", + groups = {armor_torso=1, armor_heal=0, armor_use=800, + physics_speed=-0.04, physics_gravity=0.04}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, + }) + armor:register_armor("3d_armor:leggings_steel", { + description = S("Steel Leggings"), + inventory_image = "3d_armor_inv_leggings_steel.png", + groups = {armor_legs=1, armor_heal=0, armor_use=800, + physics_speed=-0.03, physics_gravity=0.03}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, + }) + armor:register_armor("3d_armor:boots_steel", { + description = S("Steel Boots"), + inventory_image = "3d_armor_inv_boots_steel.png", + groups = {armor_feet=1, armor_heal=0, armor_use=800, + physics_speed=-0.01, physics_gravity=0.01}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, + }) +end + +if armor.materials.bronze then + armor:register_armor("3d_armor:helmet_bronze", { + description = S("Bronze Helmet"), + inventory_image = "3d_armor_inv_helmet_bronze.png", + groups = {armor_head=1, armor_heal=6, armor_use=400, + physics_speed=-0.01, physics_gravity=0.01}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2}, + }) + armor:register_armor("3d_armor:chestplate_bronze", { + description = S("Bronze Chestplate"), + inventory_image = "3d_armor_inv_chestplate_bronze.png", + groups = {armor_torso=1, armor_heal=6, armor_use=400, + physics_speed=-0.04, physics_gravity=0.04}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2}, + }) + armor:register_armor("3d_armor:leggings_bronze", { + description = S("Bronze Leggings"), + inventory_image = "3d_armor_inv_leggings_bronze.png", + groups = {armor_legs=1, armor_heal=6, armor_use=400, + physics_speed=-0.03, physics_gravity=0.03}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2}, + }) + armor:register_armor("3d_armor:boots_bronze", { + description = S("Bronze Boots"), + inventory_image = "3d_armor_inv_boots_bronze.png", + groups = {armor_feet=1, armor_heal=6, armor_use=400, + physics_speed=-0.01, physics_gravity=0.01}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2}, + }) +end + +if armor.materials.diamond then + armor:register_armor("3d_armor:helmet_diamond", { + description = S("Diamond Helmet"), + inventory_image = "3d_armor_inv_helmet_diamond.png", + groups = {armor_head=1, armor_heal=12, armor_use=200}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, choppy=1, level=3}, + }) + armor:register_armor("3d_armor:chestplate_diamond", { + description = S("Diamond Chestplate"), + inventory_image = "3d_armor_inv_chestplate_diamond.png", + groups = {armor_torso=1, armor_heal=12, armor_use=200}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, choppy=1, level=3}, + }) + armor:register_armor("3d_armor:leggings_diamond", { + description = S("Diamond Leggings"), + inventory_image = "3d_armor_inv_leggings_diamond.png", + groups = {armor_legs=1, armor_heal=12, armor_use=200}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, choppy=1, level=3}, + }) + armor:register_armor("3d_armor:boots_diamond", { + description = S("Diamond Boots"), + inventory_image = "3d_armor_inv_boots_diamond.png", + groups = {armor_feet=1, armor_heal=12, armor_use=200}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, choppy=1, level=3}, + }) +end + +if armor.materials.gold then + armor:register_armor("3d_armor:helmet_gold", { + description = S("Gold Helmet"), + inventory_image = "3d_armor_inv_helmet_gold.png", + groups = {armor_head=1, armor_heal=6, armor_use=300, + physics_speed=-0.02, physics_gravity=0.02}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2}, + }) + armor:register_armor("3d_armor:chestplate_gold", { + description = S("Gold Chestplate"), + inventory_image = "3d_armor_inv_chestplate_gold.png", + groups = {armor_torso=1, armor_heal=6, armor_use=300, + physics_speed=-0.05, physics_gravity=0.05}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2}, + }) + armor:register_armor("3d_armor:leggings_gold", { + description = S("Gold Leggings"), + inventory_image = "3d_armor_inv_leggings_gold.png", + groups = {armor_legs=1, armor_heal=6, armor_use=300, + physics_speed=-0.04, physics_gravity=0.04}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2}, + }) + armor:register_armor("3d_armor:boots_gold", { + description = S("Gold Boots"), + inventory_image = "3d_armor_inv_boots_gold.png", + groups = {armor_feet=1, armor_heal=6, armor_use=300, + physics_speed=-0.02, physics_gravity=0.02}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2}, + }) +end + +if armor.materials.mithril then + armor:register_armor("3d_armor:helmet_mithril", { + description = S("Mithril Helmet"), + inventory_image = "3d_armor_inv_helmet_mithril.png", + groups = {armor_head=1, armor_heal=12, armor_use=100}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) + armor:register_armor("3d_armor:chestplate_mithril", { + description = S("Mithril Chestplate"), + inventory_image = "3d_armor_inv_chestplate_mithril.png", + groups = {armor_torso=1, armor_heal=12, armor_use=100}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) + armor:register_armor("3d_armor:leggings_mithril", { + description = S("Mithril Leggings"), + inventory_image = "3d_armor_inv_leggings_mithril.png", + groups = {armor_legs=1, armor_heal=12, armor_use=100}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) + armor:register_armor("3d_armor:boots_mithril", { + description = S("Mithril Boots"), + inventory_image = "3d_armor_inv_boots_mithril.png", + groups = {armor_feet=1, armor_heal=12, armor_use=100}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) +end + +if armor.materials.crystal then + armor:register_armor("3d_armor:helmet_crystal", { + description = S("Crystal Helmet"), + inventory_image = "3d_armor_inv_helmet_crystal.png", + groups = {armor_head=1, armor_heal=12, armor_use=100, armor_fire=1}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) + armor:register_armor("3d_armor:chestplate_crystal", { + description = S("Crystal Chestplate"), + inventory_image = "3d_armor_inv_chestplate_crystal.png", + groups = {armor_torso=1, armor_heal=12, armor_use=100, armor_fire=1}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) + armor:register_armor("3d_armor:leggings_crystal", { + description = S("Crystal Leggings"), + inventory_image = "3d_armor_inv_leggings_crystal.png", + groups = {armor_legs=1, armor_heal=12, armor_use=100, armor_fire=1}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) + armor:register_armor("3d_armor:boots_crystal", { + description = S("Crystal Boots"), + inventory_image = "3d_armor_inv_boots_crystal.png", + groups = {armor_feet=1, armor_heal=12, armor_use=100, physics_speed=1, + physics_jump=0.5, armor_fire=1}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) +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 diff --git a/3d_armor/3d_armor/crafting_guide.txt b/3d_armor/3d_armor/crafting_guide.txt new file mode 100644 index 0000000..abd1519 --- /dev/null +++ b/3d_armor/3d_armor/crafting_guide.txt @@ -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 diff --git a/3d_armor/3d_armor/depends.txt b/3d_armor/3d_armor/depends.txt new file mode 100644 index 0000000..a33755d --- /dev/null +++ b/3d_armor/3d_armor/depends.txt @@ -0,0 +1,8 @@ +default +player_monoids? +armor_monoid? +pova? +fire? +ethereal? +bakedclay? +intllib? diff --git a/3d_armor/3d_armor/description.txt b/3d_armor/3d_armor/description.txt new file mode 100644 index 0000000..b0a9b0a --- /dev/null +++ b/3d_armor/3d_armor/description.txt @@ -0,0 +1 @@ +Adds craftable armor that is visible to other players. diff --git a/3d_armor/3d_armor/init.lua b/3d_armor/3d_armor/init.lua new file mode 100644 index 0000000..e83bc10 --- /dev/null +++ b/3d_armor/3d_armor/init.lua @@ -0,0 +1,493 @@ +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 + +-- support for i18n +armor_i18n = { } +armor_i18n.gettext, armor_i18n.ngettext = dofile(modpath.."/intllib.lua") + +-- local functions +local S = armor_i18n.gettext +local F = minetest.formspec_escape + +dofile(modpath.."/api.lua") + +-- integration test +if minetest.settings:get_bool("enable_3d_armor_integration_test") then + dofile(modpath.."/integration_test.lua") +end + + +-- Legacy Config Support + +local input = io.open(modpath.."/armor.conf", "r") +if input then + dofile(modpath.."/armor.conf") + input:close() +end +input = io.open(worldpath.."/armor.conf", "r") +if input then + dofile(worldpath.."/armor.conf") + input:close() +end +for name, _ in pairs(armor.config) do + local global = "ARMOR_"..name:upper() + if minetest.global_exists(global) then + armor.config[name] = _G[global] + end +end +if minetest.global_exists("ARMOR_MATERIALS") then + armor.materials = table.copy(ARMOR_MATERIALS) +end +if minetest.global_exists("ARMOR_FIRE_NODES") then + armor.fire_nodes = table.copy(ARMOR_FIRE_NODES) +end + +-- Load Configuration + +for name, config in pairs(armor.config) do + local setting = minetest.settings:get("armor_"..name) + if type(config) == "number" then + setting = tonumber(setting) + elseif type(config) == "boolean" then + setting = minetest.settings:get_bool("armor_"..name) + end + if setting ~= nil then + armor.config[name] = setting + end +end +for material, _ in pairs(armor.materials) do + local key = "material_"..material + if armor.config[key] == false then + armor.materials[material] = nil + end +end + +-- Mod Compatibility + +if minetest.get_modpath("technic") then + armor.formspec = armor.formspec.. + "label[5,2.5;"..F(S("Radiation"))..": armor_group_radiation]" + armor:register_armor_group("radiation") +end +local skin_mods = {"skins", "u_skins", "simple_skins", "wardrobe"} +for _, mod in pairs(skin_mods) do + local path = minetest.get_modpath(mod) + if path then + local dir_list = minetest.get_dir_list(path.."/textures") + for _, fn in pairs(dir_list) do + if fn:find("_preview.png$") then + armor:add_preview(fn) + end + end + armor.skin_mod = mod + end +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 + +dofile(modpath.."/armor.lua") + +-- Armor Initialization + +armor.formspec = armor.formspec.. + "label[5,1;"..F(S("Level"))..": armor_level]".. + "label[5,1.5;"..F(S("Heal"))..": armor_attr_heal]" +if armor.config.fire_protect then + armor.formspec = armor.formspec.."label[5,2;"..F(S("Fire"))..": armor_attr_fire]" +end +armor:register_on_damage(function(player, index, stack) + local name = player:get_player_name() + local def = stack:get_definition() + if name and def and def.description and stack:get_wear() > 60100 then + minetest.chat_send_player(name, S("Your @1 is almost broken!", def.description)) + minetest.sound_play("default_tool_breaks", {to_player = name, gain = 2.0}) + end +end) +armor:register_on_destroy(function(player, index, stack) + local name = player:get_player_name() + local def = stack:get_definition() + if name and def and def.description then + minetest.chat_send_player(name, S("Your @1 got destroyed!", def.description)) + minetest.sound_play("default_tool_breaks", {to_player = name, gain = 2.0}) + end +end) + +local function validate_armor_inventory(player) + -- Workaround for detached inventory swap exploit + local _, inv = armor:get_valid_player(player, "[validate_armor_inventory]") + local pos = player:get_pos() + if not inv then + return + end + local armor_prev = {} + local attribute_meta = player:get_meta() -- I know, the function's name is weird but let it be like that. ;) + local armor_list_string = attribute_meta:get_string("3d_armor_inventory") + if armor_list_string then + local armor_list = armor:deserialize_inventory_list(armor_list_string) + for i, stack in ipairs(armor_list) do + if stack:get_count() > 0 then + armor_prev[stack:get_name()] = i + end + end + end + local elements = {} + local player_inv = player:get_inventory() + for i = 1, 6 do + local stack = inv:get_stack("armor", i) + if stack:get_count() > 0 then + local item = stack:get_name() + local element = armor:get_element(item) + if element and not elements[element] then + if armor_prev[item] then + armor_prev[item] = nil + else + -- Item was not in previous inventory + armor:run_callbacks("on_equip", player, i, stack) + end + elements[element] = true; + else + inv:remove_item("armor", stack) + minetest.item_drop(stack, player, pos) + -- The following code returns invalid items to the player's main + -- inventory but could open up the possibity for a hacked client + -- to receive items back they never really had. I am not certain + -- so remove the is_singleplayer check at your own risk :] + if minetest.is_singleplayer() and player_inv and + player_inv:room_for_item("main", stack) then + player_inv:add_item("main", stack) + end + end + end + end + for item, i in pairs(armor_prev) do + local stack = ItemStack(item) + -- Previous item is not in current inventory + armor:run_callbacks("on_unequip", player, i, stack) + end +end + +local function init_player_armor(initplayer) + local name = initplayer:get_player_name() + local pos = initplayer:get_pos() + if not name or not pos then + return false + end + local armor_inv = minetest.create_detached_inventory(name.."_armor", { + on_put = function(inv, listname, index, stack, player) + validate_armor_inventory(player) + armor:save_armor_inventory(player) + armor:set_player_armor(player) + end, + on_take = function(inv, listname, index, stack, player) + validate_armor_inventory(player) + armor:save_armor_inventory(player) + armor:set_player_armor(player) + end, + on_move = function(inv, from_list, from_index, to_list, to_index, count, player) + validate_armor_inventory(player) + armor:save_armor_inventory(player) + armor:set_player_armor(player) + end, + allow_put = function(inv, listname, index, put_stack, player) + local element = armor:get_element(put_stack:get_name()) + if not element then + return 0 + end + for i = 1, 6 do + local stack = inv:get_stack("armor", i) + local def = stack:get_definition() or {} + if def.groups and def.groups["armor_"..element] + and i ~= index then + return 0 + end + end + return 1 + 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(initplayer) and armor.migrate_old_inventory then + local player_inv = initplayer: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(initplayer) + player_inv:set_size("armor", 0) + end + for i=1, 6 do + local stack = armor_inv:get_stack("armor", i) + if stack:get_count() > 0 then + armor:run_callbacks("on_equip", initplayer, i, stack) + end + 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 + local skin = armor:get_player_skin(name) + armor.textures[name] = { + skin = skin, + armor = "3d_armor_trans.png", + wielditem = "3d_armor_trans.png", + preview = armor.default_skin.."_preview.png", + } + local texture_path = minetest.get_modpath("player_textures") + if texture_path then + local dir_list = minetest.get_dir_list(texture_path.."/textures") + for _, fn in pairs(dir_list) do + if fn == "player_"..name..".png" then + armor.textures[name].skin = fn + break + end + end + end + armor:set_player_armor(initplayer) + return true +end + +-- Armor 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}, + }, +}) + +minetest.register_on_player_receive_fields(function(player, formname, fields) + local name = armor:get_valid_player(player, "[on_player_receive_fields]") + if not name then + return + end + local player_name = player:get_player_name() + for field, _ in pairs(fields) do + if string.find(field, "skins_set") then + minetest.after(0, function() + local pplayer = minetest.get_player_by_name(player_name) + if player then + local skin = armor:get_player_skin(name) + armor.textures[name].skin = skin + armor:set_player_armor(pplayer) + end + end) + end + end +end) + +minetest.register_on_joinplayer(function(player) + default.player_set_model(player, "3d_armor_character.b3d") + local player_name = player:get_player_name() + + minetest.after(0, function() + local pplayer = minetest.get_player_by_name(player_name) + if pplayer and init_player_armor(pplayer) == false then + pending_players[pplayer] = 0 + end + end) +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:run_callbacks("on_unequip", player, i, stack) + armor_inv:set_stack("armor", i, nil) + end + end + armor:save_armor_inventory(player) + armor:set_player_armor(player) + local pos = player:get_pos() + if pos and armor.config.destroy == false then + minetest.after(armor.config.bones_delay, function() + local meta = nil + local maxp = vector.add(pos, 16) + local minp = vector.subtract(pos, 16) + 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 + +if armor.config.punch_damage == true then + minetest.register_on_punchplayer(function(player, hitter, + time_from_last_punch, tool_capabilities) + local name = player:get_player_name() + if name then + armor:punch(player, hitter, time_from_last_punch, tool_capabilities) + last_punch_time[name] = minetest.get_gametime() + end + end) +end + +minetest.register_on_player_hpchange(function(player, hp_change, reason) + if player and reason.type ~= "drown" and reason.hunger == nil + and hp_change < 0 then + local name = player:get_player_name() + if name then + local heal = armor.def[name].heal + if heal >= math.random(100) then + hp_change = 0 + end + -- check if armor damage was handled by fire or on_punchplayer + local time = last_punch_time[name] or 0 + if time == 0 or time + 1 < minetest.get_gametime() then + armor:punch(player) + end + end + end + return hp_change +end, true) + +minetest.register_globalstep(function(dtime) + timer = timer + dtime + if timer > armor.config.init_delay then + for player, count in pairs(pending_players) do + 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", S("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 breathing, 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 (S("[3d_armor] Fire Nodes disabled")) +end + +if armor.config.water_protect == true or armor.config.fire_protect == true then + minetest.register_globalstep(function(dtime) + armor.timer = armor.timer + dtime + if armor.timer < armor.config.update_time then + return + end + for _,player in pairs(minetest.get_connected_players()) do + local name = player:get_player_name() + local pos = player:get_pos() + local hp = player:get_hp() + if not name or not pos or not hp then + return + end + -- water breathing + if armor.config.water_protect == true then + if armor.def[name].water > 0 and + player:get_breath() < 10 then + player:set_breath(10) + end + end + -- fire protection + if armor.config.fire_protect == true then + local fire_damage = true + 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 diff --git a/3d_armor/3d_armor/integration_test.lua b/3d_armor/3d_armor/integration_test.lua new file mode 100644 index 0000000..65e9dfd --- /dev/null +++ b/3d_armor/3d_armor/integration_test.lua @@ -0,0 +1,25 @@ + +minetest.log("warning", "[TEST] integration-test enabled!") + +minetest.register_on_mods_loaded(function() + minetest.after(1, function() + + local data = minetest.write_json({ success = true }, true); + local file = io.open(minetest.get_worldpath().."/integration_test.json", "w" ); + if file then + file:write(data) + file:close() + end + + file = io.open(minetest.get_worldpath().."/registered_nodes.txt", "w" ); + if file then + for name in pairs(minetest.registered_nodes) do + file:write(name .. '\n') + end + file:close() + end + + minetest.log("warning", "[TEST] integration tests done!") + minetest.request_shutdown("success") + end) +end) diff --git a/3d_armor/3d_armor/intllib.lua b/3d_armor/3d_armor/intllib.lua new file mode 100644 index 0000000..6669d72 --- /dev/null +++ b/3d_armor/3d_armor/intllib.lua @@ -0,0 +1,45 @@ + +-- Fallback functions for when `intllib` is not installed. +-- Code released under Unlicense . + +-- Get the latest version of this file at: +-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua + +local function format(str, ...) + local args = { ... } + local function repl(escape, open, num, close) + if escape == "" then + local replacement = tostring(args[tonumber(num)]) + if open == "" then + replacement = replacement..close + end + return replacement + else + return "@"..open..num..close + end + end + return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) +end + +local gettext, ngettext +if minetest.get_modpath("intllib") then + if intllib.make_gettext_pair then + -- New method using gettext. + gettext, ngettext = intllib.make_gettext_pair() + else + -- Old method using text files. + gettext = intllib.Getter() + end +end + +-- Fill in missing functions. + +gettext = gettext or function(msgid, ...) + return format(msgid, ...) +end + +ngettext = ngettext or function(msgid, msgid_plural, n, ...) + return format(n==1 and msgid or msgid_plural, ...) +end + +return gettext, ngettext diff --git a/3d_armor/3d_armor/locale/es.po b/3d_armor/3d_armor/locale/es.po new file mode 100644 index 0000000..8eeaf6e --- /dev/null +++ b/3d_armor/3d_armor/locale/es.po @@ -0,0 +1,384 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-08-06 18:20+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player name is nil @1" +msgstr "3d_armor: El nombre del jugador es nulo @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player inventory is nil @1" +msgstr "3d_armor: El inventario del jugador es nulo @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Detached armor inventory is nil @1" +msgstr "3d_armor: La armadura desconectada es nula @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player reference is nil @1" +msgstr "3d_armor: La referencia del jugador es nula @1" + +#: ../3d_armor/armor.lua +msgid "Admin Helmet" +msgstr "Casco de admin" + +#: ../3d_armor/armor.lua +msgid "Admin Chestplate" +msgstr "Peto de admin" + +#: ../3d_armor/armor.lua +msgid "Admin Leggings" +msgstr "Polainas de admin" + +#: ../3d_armor/armor.lua +msgid "Admin Boots" +msgstr "Botas de admin" + +#: ../3d_armor/armor.lua +msgid "Wood Helmet" +msgstr "Casco de madera" + +#: ../3d_armor/armor.lua +msgid "Wood Chestplate" +msgstr "Peto de madera" + +#: ../3d_armor/armor.lua +msgid "Wood Leggings" +msgstr "Polainas de madera" + +#: ../3d_armor/armor.lua +msgid "Wood Boots" +msgstr "Botas de madera" + +#: ../3d_armor/armor.lua +msgid "Cactus Helmet" +msgstr "Casco de cactus" + +#: ../3d_armor/armor.lua +msgid "Cactus Chestplate" +msgstr "Peto de cactus" + +#: ../3d_armor/armor.lua +msgid "Cactus Leggings" +msgstr "Polainas de cactus" + +#: ../3d_armor/armor.lua +msgid "Cactus Boots" +msgstr "Botas de cactus" + +#: ../3d_armor/armor.lua +msgid "Steel Helmet" +msgstr "Casco de acero" + +#: ../3d_armor/armor.lua +msgid "Steel Chestplate" +msgstr "Peto de acero" + +#: ../3d_armor/armor.lua +msgid "Steel Leggings" +msgstr "Polainas de acero" + +#: ../3d_armor/armor.lua +msgid "Steel Boots" +msgstr "Botas de acero" + +#: ../3d_armor/armor.lua +msgid "Bronze Helmet" +msgstr "Casco de bronce" + +#: ../3d_armor/armor.lua +msgid "Bronze Chestplate" +msgstr "Peto de bronce" + +#: ../3d_armor/armor.lua +msgid "Bronze Leggings" +msgstr "Polainas de bronce" + +#: ../3d_armor/armor.lua +msgid "Bronze Boots" +msgstr "Botas de bronce" + +#: ../3d_armor/armor.lua +msgid "Diamond Helmet" +msgstr "Casco de diamante" + +#: ../3d_armor/armor.lua +msgid "Diamond Chestplate" +msgstr "Peto de diamante" + +#: ../3d_armor/armor.lua +msgid "Diamond Leggings" +msgstr "Polainas de diamante" + +#: ../3d_armor/armor.lua +msgid "Diamond Boots" +msgstr "Botas de diamante" + +#: ../3d_armor/armor.lua +msgid "Gold Helmet" +msgstr "Casco de oro" + +#: ../3d_armor/armor.lua +msgid "Gold Chestplate" +msgstr "Peto de oro" + +#: ../3d_armor/armor.lua +msgid "Gold Leggings" +msgstr "Polainas de oro" + +#: ../3d_armor/armor.lua +msgid "Gold Boots" +msgstr "Botas de oro" + +#: ../3d_armor/armor.lua +msgid "Mithril Helmet" +msgstr "Casco de mitrilo" + +#: ../3d_armor/armor.lua +msgid "Mithril Chestplate" +msgstr "Peto de mitrilo" + +#: ../3d_armor/armor.lua +msgid "Mithril Leggings" +msgstr "Polainas de mitrilo" + +#: ../3d_armor/armor.lua +msgid "Mithril Boots" +msgstr "Botas de mitrilo" + +#: ../3d_armor/armor.lua +msgid "Crystal Helmet" +msgstr "Casco de cristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Chestplate" +msgstr "Peto de cristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Leggings" +msgstr "Polainas de cristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Boots" +msgstr "Botas de cristal" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Radiation" +msgstr "Radiación" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Level" +msgstr "Nivel" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Heal" +msgstr "Salud" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Fire" +msgstr "Fuego" + +#: ../3d_armor/init.lua +msgid "Your @1 got destroyed!" +msgstr "¡Tu @1 fue destruído!" + +#: ../3d_armor/init.lua +msgid "3d_armor: Failed to initialize player" +msgstr "3d_armor: Fallo en la inicialización del jugador" + +#: ../3d_armor/init.lua +msgid "[3d_armor] Fire Nodes disabled" +msgstr "[3d_armor] Nodos de fuego desabilitados" + +#: ../3d_armor_ip/init.lua +msgid "3d_armor_ip: Mod loaded but unused." +msgstr "3d_armor_ip: Mod cargado, pero sin ser usado." + +#: ../3d_armor_ip/init.lua +msgid "Back" +msgstr "Volver" + +#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua +msgid "Armor" +msgstr "Armadura" + +#: ../3d_armor_sfinv/init.lua +msgid "3d_armor_sfinv: Mod loaded but unused." +msgstr "3d_armor_sfinv: Mod cargado, pero sin ser usado." + +#: ../3d_armor_stand/init.lua +msgid "Armor stand top" +msgstr "Parte arriba maniquí armadura" + +#: ../3d_armor_stand/init.lua +msgid "Armor stand" +msgstr "Maniquí para armadura" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand" +msgstr "Maniquí para armadura" + +#: ../3d_armor_stand/init.lua +msgid "Locked Armor stand" +msgstr "Maniquí para armadura (bloqueado)" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand (owned by @1)" +msgstr "Maniquí para armadura (propiedad de @1)" + +#: ../3d_armor_ui/init.lua +msgid "3d_armor_ui: Mod loaded but unused." +msgstr "3d_armor_ui: Mod cargado, pero sin ser usado." + +#: ../3d_armor_ui/init.lua +msgid "3d Armor" +msgstr "Armadura 3d" + +#: ../3d_armor_ui/init.lua +msgid "Armor not initialized!" +msgstr "¡Armadura no inicializada!" + +#: ../hazmat_suit/init.lua +msgid "hazmat_suit: Mod loaded but unused." +msgstr "hazmat_suit: Mod cargado, pero sin ser usado." + +#: ../hazmat_suit/init.lua +msgid "Hazmat Helmet" +msgstr "Casco de hazmat" + +#: ../hazmat_suit/init.lua +msgid "Hazmat Chestplate" +msgstr "Peto de hazmat" + +#: ../hazmat_suit/init.lua +msgid "Hazmat Sleeve" +msgstr "Manga de hazmat" + +#: ../hazmat_suit/init.lua +msgid "Hazmat Leggins" +msgstr "Polainas de hazmat" + +#: ../hazmat_suit/init.lua +msgid "Hazmat Boots" +msgstr "Botas de hazmat" + +#: ../hazmat_suit/init.lua +msgid "Hazmat Suit" +msgstr "Traje de hazmat" + +#: ../shields/init.lua +msgid "Admin Shield" +msgstr "Escudo de admin" + +#: ../shields/init.lua +msgid "Wooden Shield" +msgstr "Escudo de madera" + +#: ../shields/init.lua +msgid "Enhanced Wood Shield" +msgstr "Escudo de madera mejorado" + +#: ../shields/init.lua +msgid "Cactus Shield" +msgstr "Escudo de cactus" + +#: ../shields/init.lua +msgid "Enhanced Cactus Shield" +msgstr "Escudo de cactus mejorado" + +#: ../shields/init.lua +msgid "Steel Shield" +msgstr "Escudo de acero" + +#: ../shields/init.lua +msgid "Bronze Shield" +msgstr "Escudo de bronce" + +#: ../shields/init.lua +msgid "Diamond Shield" +msgstr "Escudo de diamante" + +#: ../shields/init.lua +msgid "Gold Shield" +msgstr "Escudo de oro" + +#: ../shields/init.lua +msgid "Mithril Shield" +msgstr "Escudo de mitrilo" + +#: ../shields/init.lua +msgid "Crystal Shield" +msgstr "Escudo de cristal" + +#: ../technic_armor/init.lua +msgid "technic_armor: Mod loaded but unused." +msgstr "technic_armor: Mod cargado, pero no usado." + +#: ../technic_armor/init.lua +msgid "Lead" +msgstr "Plomo" + +#: ../technic_armor/init.lua +msgid "Brass" +msgstr "Latón" + +#: ../technic_armor/init.lua +msgid "Cast Iron" +msgstr "Hierro fundido" + +#: ../technic_armor/init.lua +msgid "Carbon Steel" +msgstr "Acero carbono" + +#: ../technic_armor/init.lua +msgid "Stainless Steel" +msgstr "Acero inoxidable" + +#: ../technic_armor/init.lua +msgid "Tin" +msgstr "Estaño" + +#: ../technic_armor/init.lua +msgid "Silver" +msgstr "Plata" + +#: ../technic_armor/init.lua +msgid "Helmet" +msgstr "Casco" + +#: ../technic_armor/init.lua +msgid "Chestplate" +msgstr "Peto" + +#: ../technic_armor/init.lua +msgid "Leggins" +msgstr "Polainas" + +#: ../technic_armor/init.lua +msgid "Boots" +msgstr "Botas" + +#: ../technic_armor/init.lua +msgid "Shield" +msgstr "Escudo" + +#. Translators: @1 stands for material and @2 for part of the armor, so that you could use a conjunction if in your language part name comes first then material (e.g. in french 'Silver Boots' is translated in 'Bottes en argent' by using '@2 en @1' as translated string) +#: ../technic_armor/init.lua +msgid "@1 @2" +msgstr "@2 de @1" diff --git a/3d_armor/3d_armor/locale/fr.po b/3d_armor/3d_armor/locale/fr.po new file mode 100644 index 0000000..f2d258f --- /dev/null +++ b/3d_armor/3d_armor/locale/fr.po @@ -0,0 +1,295 @@ +# French translation for 3D ARMOR MOD +# Copyright (C) 2018 by Stuart Jones +# This file is distributed under the same license as the 3D ARMOR MOD package. +# fat115 , 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-07-23 21:24+0200\n" +"PO-Revision-Date: 2018-07-23 21:30+0200\n" +"Last-Translator: fat115 \n" +"Language-Team: \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.12\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player reference is nil @1" +msgstr "3d_armor : Référence au joueur non trouvée @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player name is nil @1" +msgstr "3d_armor : Nom du joueur non trouvé @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Detached armor inventory is nil @1" +msgstr "3d_armor : Inventaire détaché pour l'armure non trouvé @1" + +#: ../3d_armor/armor.lua +msgid "Admin Helmet" +msgstr "Casque d'admin" + +#: ../3d_armor/armor.lua +msgid "Admin Chestplate" +msgstr "Cuirasse d'admin" + +#: ../3d_armor/armor.lua +msgid "Admin Leggings" +msgstr "Jambières d'admin" + +#: ../3d_armor/armor.lua +msgid "Admin Boots" +msgstr "Bottes d'admin" + +#: ../3d_armor/armor.lua +msgid "Wood Helmet" +msgstr "Casque en bois" + +#: ../3d_armor/armor.lua +msgid "Wood Chestplate" +msgstr "Cuirasse en bois" + +#: ../3d_armor/armor.lua +msgid "Wood Leggings" +msgstr "Jambières en bois" + +#: ../3d_armor/armor.lua +msgid "Wood Boots" +msgstr "Bottes en bois" + +#: ../3d_armor/armor.lua +msgid "Cactus Helmet" +msgstr "Casque en cactus" + +#: ../3d_armor/armor.lua +msgid "Cactus Chestplate" +msgstr "Cuirasse en cactus" + +#: ../3d_armor/armor.lua +msgid "Cactus Leggings" +msgstr "Jambières en cactus" + +#: ../3d_armor/armor.lua +msgid "Cactus Boots" +msgstr "Bottes en cactus" + +#: ../3d_armor/armor.lua +msgid "Steel Helmet" +msgstr "Casque en acier" + +#: ../3d_armor/armor.lua +msgid "Steel Chestplate" +msgstr " = Cuirasse en acier" + +#: ../3d_armor/armor.lua +msgid "Steel Leggings" +msgstr "Jambières en acier" + +#: ../3d_armor/armor.lua +msgid "Steel Boots" +msgstr "Bottes en acier" + +#: ../3d_armor/armor.lua +msgid "Bronze Helmet" +msgstr "Casque en bronze" + +#: ../3d_armor/armor.lua +msgid "Bronze Chestplate" +msgstr "Cuirasse en bronze" + +#: ../3d_armor/armor.lua +msgid "Bronze Leggings" +msgstr "Jambières en bronze" + +#: ../3d_armor/armor.lua +msgid "Bronze Boots" +msgstr "Bottes en bronze" + +#: ../3d_armor/armor.lua +msgid "Diamond Helmet" +msgstr "Casque en diamant" + +#: ../3d_armor/armor.lua +msgid "Diamond Chestplate" +msgstr "Cuirasse en diamant" + +#: ../3d_armor/armor.lua +msgid "Diamond Leggings" +msgstr "Jambières en diamant" + +#: ../3d_armor/armor.lua +msgid "Diamond Boots" +msgstr "Bottes en diamant" + +#: ../3d_armor/armor.lua +msgid "Gold Helmet" +msgstr "Casque en or" + +#: ../3d_armor/armor.lua +msgid "Gold Chestplate" +msgstr "Cuirasse en or" + +#: ../3d_armor/armor.lua +msgid "Gold Leggings" +msgstr "Jambières en or" + +#: ../3d_armor/armor.lua +msgid "Gold Boots" +msgstr "Bottes en or" + +#: ../3d_armor/armor.lua +msgid "Mithril Helmet" +msgstr "Casque en mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Chestplate" +msgstr "Cuirasse en mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Leggings" +msgstr "Jambières en mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Boots" +msgstr "Bottes en mithril" + +#: ../3d_armor/armor.lua +msgid "Crystal Helmet" +msgstr "Casque en cristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Chestplate" +msgstr "Cuirasse en cristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Leggings" +msgstr "Jambières en cristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Boots" +msgstr "Bottes en cristal" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Radiation" +msgstr "Radiation" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Level" +msgstr "Niveau" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Heal" +msgstr "Soins" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Fire" +msgstr "Fire" + +#: ../3d_armor/init.lua +msgid "Your @1 got destroyed!" +msgstr "Une partie de votre armure a été détruite : @1 !" + +#: ../3d_armor/init.lua +msgid "3d_armor: Failed to initialize player" +msgstr "3d_armor : Impossible d'initialiser le joueur" + +#: ../3d_armor/init.lua +msgid "[3d_armor] Fire Nodes disabled" +msgstr "[3d_armor] Noeuds de type feu désactivés" + +#: ../3d_armor_ip/init.lua +msgid "3d_armor_ip: Mod loaded but unused." +msgstr "3d_armor_ip : Mod chargé mais inutilisé." + +#: ../3d_armor_ip/init.lua +msgid "Back" +msgstr "Retour" + +#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua +msgid "Armor" +msgstr "Armure" + +#: ../3d_armor_sfinv/init.lua +msgid "3d_armor_sfinv: Mod loaded but unused." +msgstr "3d_armor_sfinv : Mod chargé mais inutilisé." + +#: ../3d_armor_stand/init.lua +msgid "Armor stand top" +msgstr "Haut de support d'armure" + +#: ../3d_armor_stand/init.lua +msgid "Armor stand" +msgstr "Support d'armure" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand" +msgstr "Support d'armure" + +#: ../3d_armor_stand/init.lua +msgid "Locked Armor stand" +msgstr "Support d'armure verrouillé" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand (owned by @1)" +msgstr "Support d'armure (propriété de @1)" + +#: ../3d_armor_ui/init.lua +msgid "3d_armor_ui: Mod loaded but unused." +msgstr "3d_armor_ui : Mod chargé mais inutilisé." + +#: ../3d_armor_ui/init.lua +msgid "3d Armor" +msgstr "Armure 3d" + +#: ../3d_armor_ui/init.lua +msgid "Armor not initialized!" +msgstr "Armure non initialisée !" + +#: ../shields/init.lua +msgid "Admin Shield" +msgstr "Bouclier d'admin" + +#: ../shields/init.lua +msgid "Wooden Shield" +msgstr "Bouclier en bois" + +#: ../shields/init.lua +msgid "Enhanced Wood Shield" +msgstr "Bouclier en bois amélioré" + +#: ../shields/init.lua +msgid "Cactus Shield" +msgstr "Bouclier en cactus" + +#: ../shields/init.lua +msgid "Enhanced Cactus Shield" +msgstr "Bouclier en cactus amélioré" + +#: ../shields/init.lua +msgid "Steel Shield" +msgstr "Bouclier en acier" + +#: ../shields/init.lua +msgid "Bronze Shield" +msgstr "Bouclier en bronze" + +#: ../shields/init.lua +msgid "Diamond Shield" +msgstr "Bouclier en diamant" + +#: ../shields/init.lua +msgid "Gold Shield" +msgstr "Bouclier en or" + +#: ../shields/init.lua +msgid "Mithril Shield" +msgstr "Bouclier en mithril" + +#: ../shields/init.lua +msgid "Crystal Shield" +msgstr "Bouclier en cristal" diff --git a/3d_armor/3d_armor/locale/it.po b/3d_armor/3d_armor/locale/it.po new file mode 100644 index 0000000..5d6f46b --- /dev/null +++ b/3d_armor/3d_armor/locale/it.po @@ -0,0 +1,295 @@ +# Italian translation for 3D ARMOR MOD +# Copyright (C) 2018 by Stuart Jones +# This file is distributed under the same license as the 3D ARMOR MOD package. +# Hamlet , 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: Italian localization file for the 3D Armor module\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-07-23 21:24+0200\n" +"PO-Revision-Date: 2018-07-23 21:30+0200\n" +"Last-Translator: H4mlet \n" +"Language-Team: ITALIANO\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.6.10\n" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player reference is nil @1" +msgstr "3d_armor: Il riferimento alla/al giocatrice/tore è nullo @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player name is nil @1" +msgstr "3d_armor: Il nome della/del gicatrice/tore è nullo @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Detached armor inventory is nil @1" +msgstr "3d_armor: L'inventario staccato dell'armatura è nullo @1" + +#: ../3d_armor/armor.lua +msgid "Admin Helmet" +msgstr "Elmo dell'amministratrice/tore" + +#: ../3d_armor/armor.lua +msgid "Admin Chestplate" +msgstr "Corazza dell'amministratrice/tore" + +#: ../3d_armor/armor.lua +msgid "Admin Leggings" +msgstr "Gambali dell'amministratrice/tore" + +#: ../3d_armor/armor.lua +msgid "Admin Boots" +msgstr "Stivali dell'amministratrice/tore" + +#: ../3d_armor/armor.lua +msgid "Wood Helmet" +msgstr "Elmo di legno" + +#: ../3d_armor/armor.lua +msgid "Wood Chestplate" +msgstr "Corazza di legno" + +#: ../3d_armor/armor.lua +msgid "Wood Leggings" +msgstr "Gambali di legno" + +#: ../3d_armor/armor.lua +msgid "Wood Boots" +msgstr "Stivali di legno" + +#: ../3d_armor/armor.lua +msgid "Cactus Helmet" +msgstr "Elmo di cactus" + +#: ../3d_armor/armor.lua +msgid "Cactus Chestplate" +msgstr "Corazza di cactus" + +#: ../3d_armor/armor.lua +msgid "Cactus Leggings" +msgstr "Gambali di cactus" + +#: ../3d_armor/armor.lua +msgid "Cactus Boots" +msgstr "Stivali di cactus" + +#: ../3d_armor/armor.lua +msgid "Steel Helmet" +msgstr "Elmo di acciaio" + +#: ../3d_armor/armor.lua +msgid "Steel Chestplate" +msgstr "Corazza di acciaio" + +#: ../3d_armor/armor.lua +msgid "Steel Leggings" +msgstr "Gambali di acciaio" + +#: ../3d_armor/armor.lua +msgid "Steel Boots" +msgstr "Stivali di acciaio" + +#: ../3d_armor/armor.lua +msgid "Bronze Helmet" +msgstr "Elmo di bronzo" + +#: ../3d_armor/armor.lua +msgid "Bronze Chestplate" +msgstr "Corazza di bronzo" + +#: ../3d_armor/armor.lua +msgid "Bronze Leggings" +msgstr "Gambali di bronzo" + +#: ../3d_armor/armor.lua +msgid "Bronze Boots" +msgstr "Stivali di bronzo" + +#: ../3d_armor/armor.lua +msgid "Diamond Helmet" +msgstr "Elmo di diamante" + +#: ../3d_armor/armor.lua +msgid "Diamond Chestplate" +msgstr "Corazza di diamante" + +#: ../3d_armor/armor.lua +msgid "Diamond Leggings" +msgstr "Gambali di diamante" + +#: ../3d_armor/armor.lua +msgid "Diamond Boots" +msgstr "Stivali di diamante" + +#: ../3d_armor/armor.lua +msgid "Gold Helmet" +msgstr "Elmo d'oro" + +#: ../3d_armor/armor.lua +msgid "Gold Chestplate" +msgstr "Corazza d'oro" + +#: ../3d_armor/armor.lua +msgid "Gold Leggings" +msgstr "Gambali d'oro" + +#: ../3d_armor/armor.lua +msgid "Gold Boots" +msgstr "Stivali d'oro" + +#: ../3d_armor/armor.lua +msgid "Mithril Helmet" +msgstr "Elmo di mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Chestplate" +msgstr "Corazza di mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Leggings" +msgstr "Gambali di mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Boots" +msgstr "Stivali di mithril" + +#: ../3d_armor/armor.lua +msgid "Crystal Helmet" +msgstr "Elmo di cristallo" + +#: ../3d_armor/armor.lua +msgid "Crystal Chestplate" +msgstr "Corazza di cristallo" + +#: ../3d_armor/armor.lua +msgid "Crystal Leggings" +msgstr "Gambali di cristallo" + +#: ../3d_armor/armor.lua +msgid "Crystal Boots" +msgstr "Stivali di cristallo" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Radiation" +msgstr "Radiazione" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Level" +msgstr "Livello" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Heal" +msgstr "Guarigione" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Fire" +msgstr "Fuoco" + +#: ../3d_armor/init.lua +msgid "Your @1 got destroyed!" +msgstr "Il/i vostro/i @1 è/sono stato/i distrutto/i!" + +#: ../3d_armor/init.lua +msgid "3d_armor: Failed to initialize player" +msgstr "3d_armor: Inizializzazione della/del giocatrice/tore fallita" + +#: ../3d_armor/init.lua +msgid "[3d_armor] Fire Nodes disabled" +msgstr "[3d_armor] Nodi fuoco disabilitati" + +#: ../3d_armor_ip/init.lua +msgid "3d_armor_ip: Mod loaded but unused." +msgstr "3d_armor_ip: Mod caricato ma inutilizzato." + +#: ../3d_armor_ip/init.lua +msgid "Back" +msgstr "Indietro" + +#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua +msgid "Armor" +msgstr "Armatura" + +#: ../3d_armor_sfinv/init.lua +msgid "3d_armor_sfinv: Mod loaded but unused." +msgstr "3d_armor_sfinv: Mod caricato ma inutilizzato." + +#: ../3d_armor_stand/init.lua +msgid "Armor stand top" +msgstr "Parte superiore del supporto per armatura" + +#: ../3d_armor_stand/init.lua +msgid "Armor stand" +msgstr "Supporto per armatura" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand" +msgstr "Supporto per armatura" + +#: ../3d_armor_stand/init.lua +msgid "Locked Armor stand" +msgstr "Supporto per armatura chiuso a chiave" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand (owned by @1)" +msgstr "Supporto per armatura (di proprietà di @1)" + +#: ../3d_armor_ui/init.lua +msgid "3d_armor_ui: Mod loaded but unused." +msgstr "3d_armor_ui: Mod caricato ma inutilizzato." + +#: ../3d_armor_ui/init.lua +msgid "3d Armor" +msgstr "Armatura 3D" + +#: ../3d_armor_ui/init.lua +msgid "Armor not initialized!" +msgstr "Armatura non inizializzata!" + +#: ../shields/init.lua +msgid "Admin Shield" +msgstr "Scudo dell'amministratrice/tore" + +#: ../shields/init.lua +msgid "Wooden Shield" +msgstr "Scudo di legno" + +#: ../shields/init.lua +msgid "Enhanced Wood Shield" +msgstr "Scudo di legno migliorato" + +#: ../shields/init.lua +msgid "Cactus Shield" +msgstr "Scudo di cactus" + +#: ../shields/init.lua +msgid "Enhanced Cactus Shield" +msgstr "Scudo di cactus migliorato" + +#: ../shields/init.lua +msgid "Steel Shield" +msgstr "Scudo di acciaio" + +#: ../shields/init.lua +msgid "Bronze Shield" +msgstr "Scudo di bronzo" + +#: ../shields/init.lua +msgid "Diamond Shield" +msgstr "Scudo di diamante" + +#: ../shields/init.lua +msgid "Gold Shield" +msgstr "Scudo d'oro" + +#: ../shields/init.lua +msgid "Mithril Shield" +msgstr "Scudo di mithril" + +#: ../shields/init.lua +msgid "Crystal Shield" +msgstr "Scudo di cristallo" diff --git a/3d_armor/3d_armor/locale/ms.po b/3d_armor/3d_armor/locale/ms.po new file mode 100644 index 0000000..518e438 --- /dev/null +++ b/3d_armor/3d_armor/locale/ms.po @@ -0,0 +1,296 @@ +# Malay translation for 3D ARMOR MOD +# Copyright (C) 2018 by Stuart Jones +# This file is distributed under the same license as the 3D ARMOR MOD package. +# MuhdNurHidayat (MNH48) , 2018. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-07-23 21:21+0200\n" +"PO-Revision-Date: 2018-07-23 21:30+0200\n" +"Last-Translator: MuhdNurHidayat (MNH48) \n" +"Language-Team: \n" +"Language: ms\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.6\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player reference is nil @1" +msgstr "3d_armor: Rujukan pemain tiada nilai @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player name is nil @1" +msgstr "3d_armor: Nama pemain tiada nilai @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Detached armor inventory is nil @1" +msgstr "3d_armor: Inventori perisai terpisah tiada nilai @1" + +#: ../3d_armor/armor.lua +msgid "Admin Helmet" +msgstr "Helmet Pentadbir" + +#: ../3d_armor/armor.lua +msgid "Admin Chestplate" +msgstr "Perisai Dada Pentadbir" + +#: ../3d_armor/armor.lua +msgid "Admin Leggings" +msgstr "Perisai Kaki Pentadbir" + +#: ../3d_armor/armor.lua +msgid "Admin Boots" +msgstr "But Pentadbir" + +#: ../3d_armor/armor.lua +msgid "Wood Helmet" +msgstr "Helmet Kayu" + +#: ../3d_armor/armor.lua +msgid "Wood Chestplate" +msgstr "Perisai Dada Kayu" + +#: ../3d_armor/armor.lua +msgid "Wood Leggings" +msgstr "Perisai Kaki Kayu" + +#: ../3d_armor/armor.lua +msgid "Wood Boots" +msgstr "But Kayu" + +#: ../3d_armor/armor.lua +msgid "Cactus Helmet" +msgstr "Helmet Kaktus" + +#: ../3d_armor/armor.lua +msgid "Cactus Chestplate" +msgstr "Perisai Dada Kaktus" + +#: ../3d_armor/armor.lua +msgid "Cactus Leggings" +msgstr "Perisai Kaki Kaktus" + +#: ../3d_armor/armor.lua +msgid "Cactus Boots" +msgstr "But Kaktus" + +#: ../3d_armor/armor.lua +msgid "Steel Helmet" +msgstr "Helmet Keluli" + +#: ../3d_armor/armor.lua +msgid "Steel Chestplate" +msgstr "Perisai Dada Keluli" + +#: ../3d_armor/armor.lua +msgid "Steel Leggings" +msgstr "Perisai Kaki Keluli" + +#: ../3d_armor/armor.lua +msgid "Steel Boots" +msgstr "But Keluli" + +#: ../3d_armor/armor.lua +msgid "Bronze Helmet" +msgstr "Helmet Gangsa" + +#: ../3d_armor/armor.lua +msgid "Bronze Chestplate" +msgstr "Perisai Dada Gangsa" + +#: ../3d_armor/armor.lua +msgid "Bronze Leggings" +msgstr "Perisai Kaki Gangsa" + +#: ../3d_armor/armor.lua +msgid "Bronze Boots" +msgstr "But Gangsa" + +# 'Diamond' should be translated as 'intan' because the more common word 'berlian' is only specifically used for the gemstone diamond. +#: ../3d_armor/armor.lua +msgid "Diamond Helmet" +msgstr "Helmet Intan" + +#: ../3d_armor/armor.lua +msgid "Diamond Chestplate" +msgstr "Perisai Dada Intan" + +#: ../3d_armor/armor.lua +msgid "Diamond Leggings" +msgstr "Perisai Kaki Intan" + +#: ../3d_armor/armor.lua +msgid "Diamond Boots" +msgstr "But Intan" + +#: ../3d_armor/armor.lua +msgid "Gold Helmet" +msgstr "Helmet Emas" + +#: ../3d_armor/armor.lua +msgid "Gold Chestplate" +msgstr "Perisai Dada Emas" + +#: ../3d_armor/armor.lua +msgid "Gold Leggings" +msgstr "Perisai Kaki Emas" + +#: ../3d_armor/armor.lua +msgid "Gold Boots" +msgstr "But Emas" + +#: ../3d_armor/armor.lua +msgid "Mithril Helmet" +msgstr "Helmet Mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Chestplate" +msgstr "Perisai Dada Mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Leggings" +msgstr "Perisai Kaki Mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Boots" +msgstr "But Mithril" + +#: ../3d_armor/armor.lua +msgid "Crystal Helmet" +msgstr "Helmet Kristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Chestplate" +msgstr "Perisai Dada Kristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Leggings" +msgstr "Perisai Kaki Kristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Boots" +msgstr "But Kristal" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Radiation" +msgstr "Radiasi" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Level" +msgstr "Tahap" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Heal" +msgstr "Pulih" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Fire" +msgstr "Api" + +#: ../3d_armor/init.lua +msgid "Your @1 got destroyed!" +msgstr "@1 anda telah musnah!" + +#: ../3d_armor/init.lua +msgid "3d_armor: Failed to initialize player" +msgstr "3d_armor: Gagal mengasalkan pemain" + +#: ../3d_armor/init.lua +msgid "[3d_armor] Fire Nodes disabled" +msgstr "[3d_armor] Nod-nod Api dilumpuhkan" + +#: ../3d_armor_ip/init.lua +msgid "3d_armor_ip: Mod loaded but unused." +msgstr "3d_armor_ip: Mods dimuatkan tetapi tidak digunakan." + +#: ../3d_armor_ip/init.lua +msgid "Back" +msgstr "Kembali" + +#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua +msgid "Armor" +msgstr "Perisai" + +#: ../3d_armor_sfinv/init.lua +msgid "3d_armor_sfinv: Mod loaded but unused." +msgstr "3d_armor_sfinv: Mods dimuatkan tetapi tidak digunakan." + +#: ../3d_armor_stand/init.lua +msgid "Armor stand top" +msgstr "Bhg atas dirian perisai" + +#: ../3d_armor_stand/init.lua +msgid "Armor stand" +msgstr "Dirian perisai" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand" +msgstr "Dirian Perisai" + +#: ../3d_armor_stand/init.lua +msgid "Locked Armor stand" +msgstr "Dirian perisai Berkunci" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand (owned by @1)" +msgstr "Dirian Perisai (milik @1)" + +#: ../3d_armor_ui/init.lua +msgid "3d_armor_ui: Mod loaded but unused." +msgstr "3d_armor_ui: Mods dimuatkan tetapi tidak digunakan." + +#: ../3d_armor_ui/init.lua +msgid "3d Armor" +msgstr "Perisai 3d" + +#: ../3d_armor_ui/init.lua +msgid "Armor not initialized!" +msgstr "Perisai tidak diasalkan!" + +#: ../shields/init.lua +msgid "Admin Shield" +msgstr "Perisai Pegang Pentadbir" + +#: ../shields/init.lua +msgid "Wooden Shield" +msgstr "Perisai Pegang Kayu" + +#: ../shields/init.lua +msgid "Enhanced Wood Shield" +msgstr "Perisai Pegang Kayu Kukuh" + +#: ../shields/init.lua +msgid "Cactus Shield" +msgstr "Perisai Pegang Kaktus" + +#: ../shields/init.lua +msgid "Enhanced Cactus Shield" +msgstr "Perisai Pegang Kaktus Kukuh" + +#: ../shields/init.lua +msgid "Steel Shield" +msgstr "Perisai Pegang Keluli" + +#: ../shields/init.lua +msgid "Bronze Shield" +msgstr "Perisai Pegang Gangsa" + +#: ../shields/init.lua +msgid "Diamond Shield" +msgstr "Perisai Pegang Intan" + +#: ../shields/init.lua +msgid "Gold Shield" +msgstr "Perisai Pegang Emas" + +#: ../shields/init.lua +msgid "Mithril Shield" +msgstr "Perisai Pegang Mithril" + +#: ../shields/init.lua +msgid "Crystal Shield" +msgstr "Perisai Pegang Kristal" diff --git a/3d_armor/3d_armor/locale/pt.po b/3d_armor/3d_armor/locale/pt.po new file mode 100644 index 0000000..0166637 --- /dev/null +++ b/3d_armor/3d_armor/locale/pt.po @@ -0,0 +1,295 @@ +# LANGUAGE translation for 3D ARMOR MOD +# Copyright (C) 2018 by Stuart Jones +# This file is distributed under the same license as the 3D ARMOR MOD package. +# BrunoMine , 2018. +# +msgid "" +msgstr "" +"Project-Id-Version: 3d_armor\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-07-23 21:24+0200\n" +"PO-Revision-Date: 2018-11-08 13:12-0200\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.6\n" +"Last-Translator: BrunoMine \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: pt\n" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player reference is nil @1" +msgstr "3d_armor: Referência Jogador é nula @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player name is nil @1" +msgstr "3d_armor: Nome de jogador é nulo @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Detached armor inventory is nil @1" +msgstr "3d_armor: Inventario avulso de armadura é nulo @1" + +#: ../3d_armor/armor.lua +msgid "Admin Helmet" +msgstr "Capacete de Administrador" + +#: ../3d_armor/armor.lua +msgid "Admin Chestplate" +msgstr "Peitoral de Administrador" + +#: ../3d_armor/armor.lua +msgid "Admin Leggings" +msgstr "Calças de Administrador" + +#: ../3d_armor/armor.lua +msgid "Admin Boots" +msgstr "Botas de Administrador" + +#: ../3d_armor/armor.lua +msgid "Wood Helmet" +msgstr "Capacete de Madeira" + +#: ../3d_armor/armor.lua +msgid "Wood Chestplate" +msgstr "Peitoral de Madeira" + +#: ../3d_armor/armor.lua +msgid "Wood Leggings" +msgstr "Calças de Madeira" + +#: ../3d_armor/armor.lua +msgid "Wood Boots" +msgstr "Botas de Madeira" + +#: ../3d_armor/armor.lua +msgid "Cactus Helmet" +msgstr "Capacete de Cacto" + +#: ../3d_armor/armor.lua +msgid "Cactus Chestplate" +msgstr "Peitoral de Cacto" + +#: ../3d_armor/armor.lua +msgid "Cactus Leggings" +msgstr "Calças de Cacto" + +#: ../3d_armor/armor.lua +msgid "Cactus Boots" +msgstr "Botas de Madeira" + +#: ../3d_armor/armor.lua +msgid "Steel Helmet" +msgstr "Capacete de Aço" + +#: ../3d_armor/armor.lua +msgid "Steel Chestplate" +msgstr "Peitoral de Aço" + +#: ../3d_armor/armor.lua +msgid "Steel Leggings" +msgstr "Calças de Aço" + +#: ../3d_armor/armor.lua +msgid "Steel Boots" +msgstr "Botas de Aço" + +#: ../3d_armor/armor.lua +msgid "Bronze Helmet" +msgstr "Capacete de Bronze" + +#: ../3d_armor/armor.lua +msgid "Bronze Chestplate" +msgstr "Peitoral de Bronze" + +#: ../3d_armor/armor.lua +msgid "Bronze Leggings" +msgstr "Calças de Bronze" + +#: ../3d_armor/armor.lua +msgid "Bronze Boots" +msgstr "Botas de Bronze" + +#: ../3d_armor/armor.lua +msgid "Diamond Helmet" +msgstr "Capacete de Diamante" + +#: ../3d_armor/armor.lua +msgid "Diamond Chestplate" +msgstr "Peitoral de Diamante" + +#: ../3d_armor/armor.lua +msgid "Diamond Leggings" +msgstr "Calças de Diamante" + +#: ../3d_armor/armor.lua +msgid "Diamond Boots" +msgstr "Botas de Diamante" + +#: ../3d_armor/armor.lua +msgid "Gold Helmet" +msgstr "Capacete de Ouro" + +#: ../3d_armor/armor.lua +msgid "Gold Chestplate" +msgstr "Peitoral de Ouro" + +#: ../3d_armor/armor.lua +msgid "Gold Leggings" +msgstr "Calças de Ouro" + +#: ../3d_armor/armor.lua +msgid "Gold Boots" +msgstr "Botas de Ouro" + +#: ../3d_armor/armor.lua +msgid "Mithril Helmet" +msgstr "Capacete de Mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Chestplate" +msgstr "Peitoral de Mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Leggings" +msgstr "Calças de Mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Boots" +msgstr "Botas de Mithril" + +#: ../3d_armor/armor.lua +msgid "Crystal Helmet" +msgstr "Capacete de Cristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Chestplate" +msgstr "Peitoral de Cristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Leggings" +msgstr "Calças de Cristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Boots" +msgstr "Botas de Cristal" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Radiation" +msgstr "Radiação" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Level" +msgstr "Nível" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Heal" +msgstr "Saúde" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Fire" +msgstr "Fogo" + +#: ../3d_armor/init.lua +msgid "Your @1 got destroyed!" +msgstr "@1 foi destruído(a)!" + +#: ../3d_armor/init.lua +msgid "3d_armor: Failed to initialize player" +msgstr "3d_armor: Falha ao inicializar jogador" + +#: ../3d_armor/init.lua +msgid "[3d_armor] Fire Nodes disabled" +msgstr "[3d_armor] Nodes de gofo desabilitados" + +#: ../3d_armor_ip/init.lua +msgid "3d_armor_ip: Mod loaded but unused." +msgstr "3d_armor_ip: Mod carregado mas inoperante." + +#: ../3d_armor_ip/init.lua +msgid "Back" +msgstr "Voltar" + +#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua +msgid "Armor" +msgstr "Armadura" + +#: ../3d_armor_sfinv/init.lua +msgid "3d_armor_sfinv: Mod loaded but unused." +msgstr "3d_armor_sfinv: Mod carregado mas inoperante." + +#: ../3d_armor_stand/init.lua +msgid "Armor stand top" +msgstr "Topo de estande de armadura" + +#: ../3d_armor_stand/init.lua +msgid "Armor stand" +msgstr "Estande de armadura" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand" +msgstr "Estande de Armadura" + +#: ../3d_armor_stand/init.lua +msgid "Locked Armor stand" +msgstr "Estande de Armadura Trancada" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand (owned by @1)" +msgstr "Estande de Armadura (pertente a @1)" + +#: ../3d_armor_ui/init.lua +msgid "3d_armor_ui: Mod loaded but unused." +msgstr "3d_armor_ui: Mod carregado mas inoperante." + +#: ../3d_armor_ui/init.lua +msgid "3d Armor" +msgstr "3d Armor" + +#: ../3d_armor_ui/init.lua +msgid "Armor not initialized!" +msgstr "Armadura não inicializada!" + +#: ../shields/init.lua +msgid "Admin Shield" +msgstr "Escudo de Administrador" + +#: ../shields/init.lua +msgid "Wooden Shield" +msgstr "Escudo de Madeira" + +#: ../shields/init.lua +msgid "Enhanced Wood Shield" +msgstr "Escudo de Madeira Melhorado" + +#: ../shields/init.lua +msgid "Cactus Shield" +msgstr "Escudo de Cacto" + +#: ../shields/init.lua +msgid "Enhanced Cactus Shield" +msgstr "Escudo de Cacto Melhorado" + +#: ../shields/init.lua +msgid "Steel Shield" +msgstr "Escudo de Aço" + +#: ../shields/init.lua +msgid "Bronze Shield" +msgstr "Escudo de Bronze" + +#: ../shields/init.lua +msgid "Diamond Shield" +msgstr "Escudo de Diamante" + +#: ../shields/init.lua +msgid "Gold Shield" +msgstr "Escudo de Ouro" + +#: ../shields/init.lua +msgid "Mithril Shield" +msgstr "Escudo de Mithril" + +#: ../shields/init.lua +msgid "Crystal Shield" +msgstr "Escudo de Cristal" diff --git a/3d_armor/3d_armor/locale/pt_BR.po b/3d_armor/3d_armor/locale/pt_BR.po new file mode 100644 index 0000000..b429d11 --- /dev/null +++ b/3d_armor/3d_armor/locale/pt_BR.po @@ -0,0 +1,295 @@ +# LANGUAGE translation for 3D ARMOR MOD +# Copyright (C) 2018 by Stuart Jones +# This file is distributed under the same license as the 3D ARMOR MOD package. +# BrunoMine , 2018. +# +msgid "" +msgstr "" +"Project-Id-Version: 3d_armor\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-07-23 21:24+0200\n" +"PO-Revision-Date: 2018-11-08 13:12-0200\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.6\n" +"Last-Translator: BrunoMine \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: pt_BR\n" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player reference is nil @1" +msgstr "3d_armor: Referência Jogador é nula @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player name is nil @1" +msgstr "3d_armor: Nome de jogador é nulo @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Detached armor inventory is nil @1" +msgstr "3d_armor: Inventario avulso de armadura é nulo @1" + +#: ../3d_armor/armor.lua +msgid "Admin Helmet" +msgstr "Capacete de Administrador" + +#: ../3d_armor/armor.lua +msgid "Admin Chestplate" +msgstr "Peitoral de Administrador" + +#: ../3d_armor/armor.lua +msgid "Admin Leggings" +msgstr "Calças de Administrador" + +#: ../3d_armor/armor.lua +msgid "Admin Boots" +msgstr "Botas de Administrador" + +#: ../3d_armor/armor.lua +msgid "Wood Helmet" +msgstr "Capacete de Madeira" + +#: ../3d_armor/armor.lua +msgid "Wood Chestplate" +msgstr "Peitoral de Madeira" + +#: ../3d_armor/armor.lua +msgid "Wood Leggings" +msgstr "Calças de Madeira" + +#: ../3d_armor/armor.lua +msgid "Wood Boots" +msgstr "Botas de Madeira" + +#: ../3d_armor/armor.lua +msgid "Cactus Helmet" +msgstr "Capacete de Cacto" + +#: ../3d_armor/armor.lua +msgid "Cactus Chestplate" +msgstr "Peitoral de Cacto" + +#: ../3d_armor/armor.lua +msgid "Cactus Leggings" +msgstr "Calças de Cacto" + +#: ../3d_armor/armor.lua +msgid "Cactus Boots" +msgstr "Botas de Madeira" + +#: ../3d_armor/armor.lua +msgid "Steel Helmet" +msgstr "Capacete de Aço" + +#: ../3d_armor/armor.lua +msgid "Steel Chestplate" +msgstr "Peitoral de Aço" + +#: ../3d_armor/armor.lua +msgid "Steel Leggings" +msgstr "Calças de Aço" + +#: ../3d_armor/armor.lua +msgid "Steel Boots" +msgstr "Botas de Aço" + +#: ../3d_armor/armor.lua +msgid "Bronze Helmet" +msgstr "Capacete de Bronze" + +#: ../3d_armor/armor.lua +msgid "Bronze Chestplate" +msgstr "Peitoral de Bronze" + +#: ../3d_armor/armor.lua +msgid "Bronze Leggings" +msgstr "Calças de Bronze" + +#: ../3d_armor/armor.lua +msgid "Bronze Boots" +msgstr "Botas de Bronze" + +#: ../3d_armor/armor.lua +msgid "Diamond Helmet" +msgstr "Capacete de Diamante" + +#: ../3d_armor/armor.lua +msgid "Diamond Chestplate" +msgstr "Peitoral de Diamante" + +#: ../3d_armor/armor.lua +msgid "Diamond Leggings" +msgstr "Calças de Diamante" + +#: ../3d_armor/armor.lua +msgid "Diamond Boots" +msgstr "Botas de Diamante" + +#: ../3d_armor/armor.lua +msgid "Gold Helmet" +msgstr "Capacete de Ouro" + +#: ../3d_armor/armor.lua +msgid "Gold Chestplate" +msgstr "Peitoral de Ouro" + +#: ../3d_armor/armor.lua +msgid "Gold Leggings" +msgstr "Calças de Ouro" + +#: ../3d_armor/armor.lua +msgid "Gold Boots" +msgstr "Botas de Ouro" + +#: ../3d_armor/armor.lua +msgid "Mithril Helmet" +msgstr "Capacete de Mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Chestplate" +msgstr "Peitoral de Mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Leggings" +msgstr "Calças de Mithril" + +#: ../3d_armor/armor.lua +msgid "Mithril Boots" +msgstr "Botas de Mithril" + +#: ../3d_armor/armor.lua +msgid "Crystal Helmet" +msgstr "Capacete de Cristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Chestplate" +msgstr "Peitoral de Cristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Leggings" +msgstr "Calças de Cristal" + +#: ../3d_armor/armor.lua +msgid "Crystal Boots" +msgstr "Botas de Cristal" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Radiation" +msgstr "Radiação" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Level" +msgstr "Nível" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Heal" +msgstr "Saúde" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Fire" +msgstr "Fogo" + +#: ../3d_armor/init.lua +msgid "Your @1 got destroyed!" +msgstr "@1 foi destruído(a)!" + +#: ../3d_armor/init.lua +msgid "3d_armor: Failed to initialize player" +msgstr "3d_armor: Falha ao inicializar jogador" + +#: ../3d_armor/init.lua +msgid "[3d_armor] Fire Nodes disabled" +msgstr "[3d_armor] Nodes de gofo desabilitados" + +#: ../3d_armor_ip/init.lua +msgid "3d_armor_ip: Mod loaded but unused." +msgstr "3d_armor_ip: Mod carregado mas inoperante." + +#: ../3d_armor_ip/init.lua +msgid "Back" +msgstr "Voltar" + +#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua +msgid "Armor" +msgstr "Armadura" + +#: ../3d_armor_sfinv/init.lua +msgid "3d_armor_sfinv: Mod loaded but unused." +msgstr "3d_armor_sfinv: Mod carregado mas inoperante." + +#: ../3d_armor_stand/init.lua +msgid "Armor stand top" +msgstr "Topo de estande de armadura" + +#: ../3d_armor_stand/init.lua +msgid "Armor stand" +msgstr "Estande de armadura" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand" +msgstr "Estande de Armadura" + +#: ../3d_armor_stand/init.lua +msgid "Locked Armor stand" +msgstr "Estande de Armadura Trancada" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand (owned by @1)" +msgstr "Estande de Armadura (pertente a @1)" + +#: ../3d_armor_ui/init.lua +msgid "3d_armor_ui: Mod loaded but unused." +msgstr "3d_armor_ui: Mod carregado mas inoperante." + +#: ../3d_armor_ui/init.lua +msgid "3d Armor" +msgstr "3d Armor" + +#: ../3d_armor_ui/init.lua +msgid "Armor not initialized!" +msgstr "Armadura não inicializada!" + +#: ../shields/init.lua +msgid "Admin Shield" +msgstr "Escudo de Administrador" + +#: ../shields/init.lua +msgid "Wooden Shield" +msgstr "Escudo de Madeira" + +#: ../shields/init.lua +msgid "Enhanced Wood Shield" +msgstr "Escudo de Madeira Melhorado" + +#: ../shields/init.lua +msgid "Cactus Shield" +msgstr "Escudo de Cacto" + +#: ../shields/init.lua +msgid "Enhanced Cactus Shield" +msgstr "Escudo de Cacto Melhorado" + +#: ../shields/init.lua +msgid "Steel Shield" +msgstr "Escudo de Aço" + +#: ../shields/init.lua +msgid "Bronze Shield" +msgstr "Escudo de Bronze" + +#: ../shields/init.lua +msgid "Diamond Shield" +msgstr "Escudo de Diamante" + +#: ../shields/init.lua +msgid "Gold Shield" +msgstr "Escudo de Ouro" + +#: ../shields/init.lua +msgid "Mithril Shield" +msgstr "Escudo de Mithril" + +#: ../shields/init.lua +msgid "Crystal Shield" +msgstr "Escudo de Cristal" diff --git a/3d_armor/3d_armor/locale/ru.po b/3d_armor/3d_armor/locale/ru.po new file mode 100644 index 0000000..4beee8a --- /dev/null +++ b/3d_armor/3d_armor/locale/ru.po @@ -0,0 +1,294 @@ +# Russian translation for 3D ARMOR MOD +# Copyright (C) 2018 by Stuart Jones +# This file is distributed under the same license as the 3D ARMOR MOD package. +# CodeXP , 2018. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 3d_armor\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-07-23 21:21+0200\n" +"PO-Revision-Date: 2018-07-23 21:30+0200\n" +"Last-Translator: CodeXP \n" +"Language-Team: \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player reference is nil @1" +msgstr "3d_armor: Ссылка игрока является nil @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player name is nil @1" +msgstr "3d_armor: Имя игрока является nil @1" + +#: ../3d_armor/api.lua +msgid "3d_armor: Detached armor inventory is nil @1" +msgstr "3d_armor: Отдельный инвентарь брони является nil @1" + +#: ../3d_armor/armor.lua +msgid "Admin Helmet" +msgstr "шлем админа" + +#: ../3d_armor/armor.lua +msgid "Admin Chestplate" +msgstr "бронежилет админа" + +#: ../3d_armor/armor.lua +msgid "Admin Leggings" +msgstr "гамаши админа" + +#: ../3d_armor/armor.lua +msgid "Admin Boots" +msgstr "ботинки админа" + +#: ../3d_armor/armor.lua +msgid "Wood Helmet" +msgstr "деревянный шлем" + +#: ../3d_armor/armor.lua +msgid "Wood Chestplate" +msgstr "деревянный бронежилет" + +#: ../3d_armor/armor.lua +msgid "Wood Leggings" +msgstr "деревянные гамаши" + +#: ../3d_armor/armor.lua +msgid "Wood Boots" +msgstr "деревянные ботинки" + +#: ../3d_armor/armor.lua +msgid "Cactus Helmet" +msgstr "кактусовый шлем" + +#: ../3d_armor/armor.lua +msgid "Cactus Chestplate" +msgstr "кактусовый бронежилет" + +#: ../3d_armor/armor.lua +msgid "Cactus Leggings" +msgstr "кактусовые гамаши" + +#: ../3d_armor/armor.lua +msgid "Cactus Boots" +msgstr "кактусовые ботинки" + +#: ../3d_armor/armor.lua +msgid "Steel Helmet" +msgstr "стальной шлем" + +#: ../3d_armor/armor.lua +msgid "Steel Chestplate" +msgstr "стальной бронежилет" + +#: ../3d_armor/armor.lua +msgid "Steel Leggings" +msgstr "стальные гамаши" + +#: ../3d_armor/armor.lua +msgid "Steel Boots" +msgstr "стальные ботинки" + +#: ../3d_armor/armor.lua +msgid "Bronze Helmet" +msgstr "бронзовый шлем" + +#: ../3d_armor/armor.lua +msgid "Bronze Chestplate" +msgstr "бронзовый бронежилет" + +#: ../3d_armor/armor.lua +msgid "Bronze Leggings" +msgstr "бронзовые гамаши" + +#: ../3d_armor/armor.lua +msgid "Bronze Boots" +msgstr "бронзовые ботинки" + +#: ../3d_armor/armor.lua +msgid "Diamond Helmet" +msgstr "алмазный шлем" + +#: ../3d_armor/armor.lua +msgid "Diamond Chestplate" +msgstr "алмазный бронежилет" + +#: ../3d_armor/armor.lua +msgid "Diamond Leggings" +msgstr "алмазные гамаши" + +#: ../3d_armor/armor.lua +msgid "Diamond Boots" +msgstr "алмазные ботинки" + +#: ../3d_armor/armor.lua +msgid "Gold Helmet" +msgstr "золотой шлем" + +#: ../3d_armor/armor.lua +msgid "Gold Chestplate" +msgstr "золотой бронежилет" + +#: ../3d_armor/armor.lua +msgid "Gold Leggings" +msgstr "золотые гамаши" + +#: ../3d_armor/armor.lua +msgid "Gold Boots" +msgstr "золотые ботинки" + +#: ../3d_armor/armor.lua +msgid "Mithril Helmet" +msgstr "мифриловый шлем" + +#: ../3d_armor/armor.lua +msgid "Mithril Chestplate" +msgstr "мифриловый бронежилет" + +#: ../3d_armor/armor.lua +msgid "Mithril Leggings" +msgstr "мифриловые гамаши" + +#: ../3d_armor/armor.lua +msgid "Mithril Boots" +msgstr "мифриловые ботинки" + +#: ../3d_armor/armor.lua +msgid "Crystal Helmet" +msgstr "кристалловый шлем" + +#: ../3d_armor/armor.lua +msgid "Crystal Chestplate" +msgstr "кристалловый бронежилет" + +#: ../3d_armor/armor.lua +msgid "Crystal Leggings" +msgstr "кристалловые гамаши" + +#: ../3d_armor/armor.lua +msgid "Crystal Boots" +msgstr "кристалловые ботинки" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Radiation" +msgstr "излучение" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Level" +msgstr "уровень" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Heal" +msgstr "исцеление" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Fire" +msgstr "огонь" + +#: ../3d_armor/init.lua +msgid "Your @1 got destroyed!" +msgstr "твой(и) @1 был(и) разрушен(ы)!" + +#: ../3d_armor/init.lua +msgid "3d_armor: Failed to initialize player" +msgstr "3d_armor: не смог подготовить игрока" + +#: ../3d_armor/init.lua +msgid "[3d_armor] Fire Nodes disabled" +msgstr "[3d_armor] блоки огня отключены" + +#: ../3d_armor_ip/init.lua +msgid "3d_armor_ip: Mod loaded but unused." +msgstr "3d_armor_ip: мод загружен но не используется." + +#: ../3d_armor_ip/init.lua +msgid "Back" +msgstr "назад" + +#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua +msgid "Armor" +msgstr "бронь" + +#: ../3d_armor_sfinv/init.lua +msgid "3d_armor_sfinv: Mod loaded but unused." +msgstr "3d_armor_sfinv: мод загружен но не используется." + +#: ../3d_armor_stand/init.lua +msgid "Armor stand top" +msgstr "стойка для брони (верх)" + +#: ../3d_armor_stand/init.lua +msgid "Armor stand" +msgstr "стойка для брони" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand" +msgstr "стойка для брони" + +#: ../3d_armor_stand/init.lua +msgid "Locked Armor stand" +msgstr "защищенная стойка для брони" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand (owned by @1)" +msgstr "стойка для брони (принадлежит @1)" + +#: ../3d_armor_ui/init.lua +msgid "3d_armor_ui: Mod loaded but unused." +msgstr "3d_armor_ui: мод загружен но не используется." + +#: ../3d_armor_ui/init.lua +msgid "3d Armor" +msgstr "3D бронь" + +#: ../3d_armor_ui/init.lua +msgid "Armor not initialized!" +msgstr "бронь не подготовлена!" + +#: ../shields/init.lua +msgid "Admin Shield" +msgstr "щит админа" + +#: ../shields/init.lua +msgid "Wooden Shield" +msgstr "деревянный щит" + +#: ../shields/init.lua +msgid "Enhanced Wood Shield" +msgstr "улучшенный деревянный щит" + +#: ../shields/init.lua +msgid "Cactus Shield" +msgstr "кактусный щит" + +#: ../shields/init.lua +msgid "Enhanced Cactus Shield" +msgstr "улучшенный кактусный щит" + +#: ../shields/init.lua +msgid "Steel Shield" +msgstr "стальной щит" + +#: ../shields/init.lua +msgid "Bronze Shield" +msgstr "бронзовый щит" + +#: ../shields/init.lua +msgid "Diamond Shield" +msgstr "алмазный щит" + +#: ../shields/init.lua +msgid "Gold Shield" +msgstr "золотой щит" + +#: ../shields/init.lua +msgid "Mithril Shield" +msgstr "мифриловый щит" + +#: ../shields/init.lua +msgid "Crystal Shield" +msgstr "кристалловый щит" diff --git a/3d_armor/3d_armor/locale/template.pot b/3d_armor/3d_armor/locale/template.pot new file mode 100644 index 0000000..0b0222c --- /dev/null +++ b/3d_armor/3d_armor/locale/template.pot @@ -0,0 +1,294 @@ +# LANGUAGE translation for 3D ARMOR MOD +# Copyright (C) 2018 by Stuart Jones +# This file is distributed under the same license as the 3D ARMOR MOD package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-07-23 21:24+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player reference is nil @1" +msgstr "" + +#: ../3d_armor/api.lua +msgid "3d_armor: Player name is nil @1" +msgstr "" + +#: ../3d_armor/api.lua +msgid "3d_armor: Detached armor inventory is nil @1" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Admin Helmet" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Admin Chestplate" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Admin Leggings" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Admin Boots" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Wood Helmet" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Wood Chestplate" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Wood Leggings" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Wood Boots" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Cactus Helmet" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Cactus Chestplate" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Cactus Leggings" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Cactus Boots" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Steel Helmet" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Steel Chestplate" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Steel Leggings" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Steel Boots" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Bronze Helmet" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Bronze Chestplate" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Bronze Leggings" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Bronze Boots" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Diamond Helmet" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Diamond Chestplate" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Diamond Leggings" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Diamond Boots" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Gold Helmet" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Gold Chestplate" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Gold Leggings" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Gold Boots" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Mithril Helmet" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Mithril Chestplate" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Mithril Leggings" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Mithril Boots" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Crystal Helmet" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Crystal Chestplate" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Crystal Leggings" +msgstr "" + +#: ../3d_armor/armor.lua +msgid "Crystal Boots" +msgstr "" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Radiation" +msgstr "" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Level" +msgstr "" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Heal" +msgstr "" + +#: ../3d_armor/init.lua ../3d_armor_ui/init.lua +msgid "Fire" +msgstr "" + +#: ../3d_armor/init.lua +msgid "Your @1 got destroyed!" +msgstr "" + +#: ../3d_armor/init.lua +msgid "3d_armor: Failed to initialize player" +msgstr "" + +#: ../3d_armor/init.lua +msgid "[3d_armor] Fire Nodes disabled" +msgstr "" + +#: ../3d_armor_ip/init.lua +msgid "3d_armor_ip: Mod loaded but unused." +msgstr "" + +#: ../3d_armor_ip/init.lua +msgid "Back" +msgstr "" + +#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua +msgid "Armor" +msgstr "" + +#: ../3d_armor_sfinv/init.lua +msgid "3d_armor_sfinv: Mod loaded but unused." +msgstr "" + +#: ../3d_armor_stand/init.lua +msgid "Armor stand top" +msgstr "" + +#: ../3d_armor_stand/init.lua +msgid "Armor stand" +msgstr "" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand" +msgstr "" + +#: ../3d_armor_stand/init.lua +msgid "Locked Armor stand" +msgstr "" + +#: ../3d_armor_stand/init.lua +msgid "Armor Stand (owned by @1)" +msgstr "" + +#: ../3d_armor_ui/init.lua +msgid "3d_armor_ui: Mod loaded but unused." +msgstr "" + +#: ../3d_armor_ui/init.lua +msgid "3d Armor" +msgstr "" + +#: ../3d_armor_ui/init.lua +msgid "Armor not initialized!" +msgstr "" + +#: ../shields/init.lua +msgid "Admin Shield" +msgstr "" + +#: ../shields/init.lua +msgid "Wooden Shield" +msgstr "" + +#: ../shields/init.lua +msgid "Enhanced Wood Shield" +msgstr "" + +#: ../shields/init.lua +msgid "Cactus Shield" +msgstr "" + +#: ../shields/init.lua +msgid "Enhanced Cactus Shield" +msgstr "" + +#: ../shields/init.lua +msgid "Steel Shield" +msgstr "" + +#: ../shields/init.lua +msgid "Bronze Shield" +msgstr "" + +#: ../shields/init.lua +msgid "Diamond Shield" +msgstr "" + +#: ../shields/init.lua +msgid "Gold Shield" +msgstr "" + +#: ../shields/init.lua +msgid "Mithril Shield" +msgstr "" + +#: ../shields/init.lua +msgid "Crystal Shield" +msgstr "" diff --git a/3d_armor/3d_armor/mod.conf b/3d_armor/3d_armor/mod.conf new file mode 100644 index 0000000..56f7973 --- /dev/null +++ b/3d_armor/3d_armor/mod.conf @@ -0,0 +1,4 @@ +name = 3d_armor +depends = default +optional_depends = player_monoids, armor_monoid, pova, fire, ethereal, bakedclay, intllib +description = Adds craftable armor that is visible to other players. diff --git a/3d_armor/3d_armor/models/3d_armor_character.b3d b/3d_armor/3d_armor/models/3d_armor_character.b3d new file mode 100644 index 0000000..c4d45b5 Binary files /dev/null and b/3d_armor/3d_armor/models/3d_armor_character.b3d differ diff --git a/3d_armor/3d_armor/models/3d_armor_character.blend b/3d_armor/3d_armor/models/3d_armor_character.blend new file mode 100644 index 0000000..44f7e27 Binary files /dev/null and b/3d_armor/3d_armor/models/3d_armor_character.blend differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_admin.png b/3d_armor/3d_armor/textures/3d_armor_boots_admin.png new file mode 100644 index 0000000..833f6b7 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_admin_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_admin_preview.png new file mode 100644 index 0000000..2487a7e Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_admin_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_bronze.png b/3d_armor/3d_armor/textures/3d_armor_boots_bronze.png new file mode 100644 index 0000000..2b187e5 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_bronze_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_bronze_preview.png new file mode 100644 index 0000000..78badbb Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_bronze_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_cactus.png b/3d_armor/3d_armor/textures/3d_armor_boots_cactus.png new file mode 100644 index 0000000..350b065 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_cactus_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_cactus_preview.png new file mode 100644 index 0000000..08e76c6 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_cactus_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_crystal.png b/3d_armor/3d_armor/textures/3d_armor_boots_crystal.png new file mode 100644 index 0000000..31c06b5 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_crystal_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_crystal_preview.png new file mode 100644 index 0000000..01a6bfa Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_crystal_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_diamond.png b/3d_armor/3d_armor/textures/3d_armor_boots_diamond.png new file mode 100644 index 0000000..1870359 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_diamond_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_diamond_preview.png new file mode 100644 index 0000000..2e4f5d3 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_diamond_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_gold.png b/3d_armor/3d_armor/textures/3d_armor_boots_gold.png new file mode 100644 index 0000000..cd339b6 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_gold_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_gold_preview.png new file mode 100644 index 0000000..f70f30f Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_gold_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_mithril.png b/3d_armor/3d_armor/textures/3d_armor_boots_mithril.png new file mode 100644 index 0000000..af7b943 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_mithril_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_mithril_preview.png new file mode 100644 index 0000000..1ebf92a Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_mithril_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_steel.png b/3d_armor/3d_armor/textures/3d_armor_boots_steel.png new file mode 100644 index 0000000..ff8e8f8 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_steel_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_steel_preview.png new file mode 100644 index 0000000..968ffc5 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_steel_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_wood.png b/3d_armor/3d_armor/textures/3d_armor_boots_wood.png new file mode 100644 index 0000000..e62bdc5 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_wood_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_wood_preview.png new file mode 100644 index 0000000..de841b0 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_boots_wood_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_admin.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_admin.png new file mode 100644 index 0000000..d8df83d Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_admin_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_admin_preview.png new file mode 100644 index 0000000..1bb10fd Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_admin_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze.png new file mode 100644 index 0000000..b8e6d85 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze_preview.png new file mode 100644 index 0000000..8c78716 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus.png new file mode 100644 index 0000000..afcd557 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus_preview.png new file mode 100644 index 0000000..b166c7c Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal.png new file mode 100644 index 0000000..4a268f4 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal_preview.png new file mode 100644 index 0000000..63304f6 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond.png new file mode 100644 index 0000000..f61e28f Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond_preview.png new file mode 100644 index 0000000..9ec9971 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_gold.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_gold.png new file mode 100644 index 0000000..4c67491 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_gold_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_gold_preview.png new file mode 100644 index 0000000..01d8d5c Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_gold_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril.png new file mode 100644 index 0000000..aa06d18 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril_preview.png new file mode 100644 index 0000000..2754290 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_steel.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_steel.png new file mode 100644 index 0000000..cc6d570 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_steel_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_steel_preview.png new file mode 100644 index 0000000..162ce4b Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_steel_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_wood.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_wood.png new file mode 100644 index 0000000..2db95ce Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_wood_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_wood_preview.png new file mode 100644 index 0000000..a1431e3 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_chestplate_wood_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_admin.png b/3d_armor/3d_armor/textures/3d_armor_helmet_admin.png new file mode 100644 index 0000000..862956a Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_admin_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_admin_preview.png new file mode 100644 index 0000000..0f344d0 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_admin_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_bronze.png b/3d_armor/3d_armor/textures/3d_armor_helmet_bronze.png new file mode 100644 index 0000000..17b87c9 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_bronze_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_bronze_preview.png new file mode 100644 index 0000000..c711745 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_bronze_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_cactus.png b/3d_armor/3d_armor/textures/3d_armor_helmet_cactus.png new file mode 100644 index 0000000..f616e1e Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_cactus_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_cactus_preview.png new file mode 100644 index 0000000..7e750cc Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_cactus_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_crystal.png b/3d_armor/3d_armor/textures/3d_armor_helmet_crystal.png new file mode 100644 index 0000000..1405a42 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_crystal_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_crystal_preview.png new file mode 100644 index 0000000..7bb01ff Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_crystal_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_diamond.png b/3d_armor/3d_armor/textures/3d_armor_helmet_diamond.png new file mode 100644 index 0000000..9196681 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_diamond_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_diamond_preview.png new file mode 100644 index 0000000..936fa66 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_diamond_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_gold.png b/3d_armor/3d_armor/textures/3d_armor_helmet_gold.png new file mode 100644 index 0000000..3a51908 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_gold_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_gold_preview.png new file mode 100644 index 0000000..fb3ba0e Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_gold_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_mithril.png b/3d_armor/3d_armor/textures/3d_armor_helmet_mithril.png new file mode 100644 index 0000000..2e9caef Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_mithril_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_mithril_preview.png new file mode 100644 index 0000000..91e7c18 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_mithril_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_steel.png b/3d_armor/3d_armor/textures/3d_armor_helmet_steel.png new file mode 100644 index 0000000..f3c4a39 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_steel_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_steel_preview.png new file mode 100644 index 0000000..fb939c4 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_steel_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_wood.png b/3d_armor/3d_armor/textures/3d_armor_helmet_wood.png new file mode 100644 index 0000000..8bda21c Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_wood_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_wood_preview.png new file mode 100644 index 0000000..903a018 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_helmet_wood_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_admin.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_admin.png new file mode 100644 index 0000000..71fd410 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_bronze.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_bronze.png new file mode 100644 index 0000000..e704d50 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_cactus.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_cactus.png new file mode 100644 index 0000000..1b01395 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_crystal.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_crystal.png new file mode 100644 index 0000000..f663470 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_diamond.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_diamond.png new file mode 100644 index 0000000..e4394b8 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_gold.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_gold.png new file mode 100644 index 0000000..1102ea0 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_mithril.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_mithril.png new file mode 100644 index 0000000..43e6b14 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_steel.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_steel.png new file mode 100644 index 0000000..170f0d9 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_wood.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_wood.png new file mode 100644 index 0000000..a5e7863 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_admin.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_admin.png new file mode 100644 index 0000000..c65c606 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_bronze.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_bronze.png new file mode 100644 index 0000000..f0753ee Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_cactus.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_cactus.png new file mode 100644 index 0000000..ca315df Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_crystal.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_crystal.png new file mode 100644 index 0000000..46742a1 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_diamond.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_diamond.png new file mode 100644 index 0000000..1fd75ae Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_gold.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_gold.png new file mode 100644 index 0000000..bdbea82 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_mithril.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_mithril.png new file mode 100644 index 0000000..d2b1bd0 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_steel.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_steel.png new file mode 100644 index 0000000..434f1bc Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_wood.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_wood.png new file mode 100644 index 0000000..fa1b24e Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_admin.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_admin.png new file mode 100644 index 0000000..abb43a7 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_bronze.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_bronze.png new file mode 100644 index 0000000..4297d9b Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_cactus.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_cactus.png new file mode 100644 index 0000000..7f44463 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_crystal.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_crystal.png new file mode 100644 index 0000000..baf6bdf Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_diamond.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_diamond.png new file mode 100644 index 0000000..424e970 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_gold.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_gold.png new file mode 100644 index 0000000..f5f2fa6 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_mithril.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_mithril.png new file mode 100644 index 0000000..850991c Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_steel.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_steel.png new file mode 100644 index 0000000..5414f9a Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_wood.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_wood.png new file mode 100644 index 0000000..8fbe6a8 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_admin.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_admin.png new file mode 100644 index 0000000..1247304 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_bronze.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_bronze.png new file mode 100644 index 0000000..7252662 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_cactus.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_cactus.png new file mode 100644 index 0000000..3f05b16 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_crystal.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_crystal.png new file mode 100644 index 0000000..8197b01 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_diamond.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_diamond.png new file mode 100644 index 0000000..9dac33b Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_gold.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_gold.png new file mode 100644 index 0000000..5aeccb5 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_mithril.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_mithril.png new file mode 100644 index 0000000..3825a23 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_steel.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_steel.png new file mode 100644 index 0000000..b4d083e Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_wood.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_wood.png new file mode 100644 index 0000000..c46cdd9 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_admin.png b/3d_armor/3d_armor/textures/3d_armor_leggings_admin.png new file mode 100644 index 0000000..1f7207d Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_admin_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_admin_preview.png new file mode 100644 index 0000000..95c973a Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_admin_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_bronze.png b/3d_armor/3d_armor/textures/3d_armor_leggings_bronze.png new file mode 100644 index 0000000..26d05f0 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_bronze_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_bronze_preview.png new file mode 100644 index 0000000..12952ff Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_bronze_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_cactus.png b/3d_armor/3d_armor/textures/3d_armor_leggings_cactus.png new file mode 100644 index 0000000..537adcb Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_cactus_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_cactus_preview.png new file mode 100644 index 0000000..09f848e Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_cactus_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_crystal.png b/3d_armor/3d_armor/textures/3d_armor_leggings_crystal.png new file mode 100644 index 0000000..6bf702f Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_crystal_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_crystal_preview.png new file mode 100644 index 0000000..96a11bf Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_crystal_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_diamond.png b/3d_armor/3d_armor/textures/3d_armor_leggings_diamond.png new file mode 100644 index 0000000..df3cf16 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_diamond_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_diamond_preview.png new file mode 100644 index 0000000..1bb3295 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_diamond_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_gold.png b/3d_armor/3d_armor/textures/3d_armor_leggings_gold.png new file mode 100644 index 0000000..8ee0bc4 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_gold_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_gold_preview.png new file mode 100644 index 0000000..a7cf310 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_gold_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_mithril.png b/3d_armor/3d_armor/textures/3d_armor_leggings_mithril.png new file mode 100644 index 0000000..9fc78fb Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_mithril_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_mithril_preview.png new file mode 100644 index 0000000..dde7b3d Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_mithril_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_steel.png b/3d_armor/3d_armor/textures/3d_armor_leggings_steel.png new file mode 100644 index 0000000..974cb5d Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_steel_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_steel_preview.png new file mode 100644 index 0000000..99034ca Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_steel_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_wood.png b/3d_armor/3d_armor/textures/3d_armor_leggings_wood.png new file mode 100644 index 0000000..9608144 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_wood_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_wood_preview.png new file mode 100644 index 0000000..7e43ea5 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_leggings_wood_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_trans.png b/3d_armor/3d_armor/textures/3d_armor_trans.png new file mode 100644 index 0000000..4a31242 Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_trans.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_ui_form.png b/3d_armor/3d_armor/textures/3d_armor_ui_form.png new file mode 100644 index 0000000..993809f Binary files /dev/null and b/3d_armor/3d_armor/textures/3d_armor_ui_form.png differ diff --git a/3d_armor/3d_armor/textures/character_preview.png b/3d_armor/3d_armor/textures/character_preview.png new file mode 100644 index 0000000..82a0ae4 Binary files /dev/null and b/3d_armor/3d_armor/textures/character_preview.png differ diff --git a/3d_armor/3d_armor/textures/inventory_plus_armor.png b/3d_armor/3d_armor/textures/inventory_plus_armor.png new file mode 100644 index 0000000..7f7d63e Binary files /dev/null and b/3d_armor/3d_armor/textures/inventory_plus_armor.png differ diff --git a/3d_armor/3d_armor/textures/preview_index.txt b/3d_armor/3d_armor/textures/preview_index.txt new file mode 100644 index 0000000..9e2fe9d --- /dev/null +++ b/3d_armor/3d_armor/textures/preview_index.txt @@ -0,0 +1,44 @@ +3d_armor/textures/3d_armor_helmet_wood.png:head +3d_armor/textures/3d_armor_chestplate_wood.png:torso +3d_armor/textures/3d_armor_leggings_wood.png:legs +3d_armor/textures/3d_armor_boots_wood.png:feet + +3d_armor/textures/3d_armor_helmet_cactus.png:head +3d_armor/textures/3d_armor_chestplate_cactus.png:torso +3d_armor/textures/3d_armor_leggings_cactus.png:legs +3d_armor/textures/3d_armor_boots_cactus.png:feet + +3d_armor/textures/3d_armor_helmet_steel.png:head +3d_armor/textures/3d_armor_chestplate_steel.png:torso +3d_armor/textures/3d_armor_leggings_steel.png:legs +3d_armor/textures/3d_armor_boots_steel.png:feet + +3d_armor/textures/3d_armor_helmet_bronze.png:head +3d_armor/textures/3d_armor_chestplate_bronze.png:torso +3d_armor/textures/3d_armor_leggings_bronze.png:legs +3d_armor/textures/3d_armor_boots_bronze.png:feet + +3d_armor/textures/3d_armor_helmet_gold.png:head +3d_armor/textures/3d_armor_chestplate_gold.png:torso +3d_armor/textures/3d_armor_leggings_gold.png:legs +3d_armor/textures/3d_armor_boots_gold.png:feet + +3d_armor/textures/3d_armor_helmet_diamond.png:head +3d_armor/textures/3d_armor_chestplate_diamond.png:torso +3d_armor/textures/3d_armor_leggings_diamond.png:legs +3d_armor/textures/3d_armor_boots_diamond.png:feet + +3d_armor/textures/3d_armor_helmet_mithril.png:head +3d_armor/textures/3d_armor_chestplate_mithril.png:torso +3d_armor/textures/3d_armor_leggings_mithril.png:legs +3d_armor/textures/3d_armor_boots_mithril.png:feet + +3d_armor/textures/3d_armor_helmet_crystal.png:head +3d_armor/textures/3d_armor_chestplate_crystal.png:torso +3d_armor/textures/3d_armor_leggings_crystal.png:legs +3d_armor/textures/3d_armor_boots_crystal.png:feet + +3d_armor/textures/3d_armor_helmet_admin.png:head +3d_armor/textures/3d_armor_chestplate_admin.png:torso +3d_armor/textures/3d_armor_leggings_admin.png:legs +3d_armor/textures/3d_armor_boots_admin.png:feet diff --git a/3d_armor/3d_armor/tools/README.md b/3d_armor/3d_armor/tools/README.md new file mode 100644 index 0000000..6aa7ffe --- /dev/null +++ b/3d_armor/3d_armor/tools/README.md @@ -0,0 +1,7 @@ +# Intllib tool + +please consider using the intllib tool to update locale files: + +```../../intllib/tools/xgettext.sh ../**/*.lua``` + +make sure you are in `3d_armor` derectory before running this command diff --git a/3d_armor/3d_armor/tools/updatepo.sh b/3d_armor/3d_armor/tools/updatepo.sh new file mode 100755 index 0000000..52de990 --- /dev/null +++ b/3d_armor/3d_armor/tools/updatepo.sh @@ -0,0 +1,24 @@ +#! /bin/bash + +# To create a new translation: +# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot + +cd "$(dirname "${BASH_SOURCE[0]}")/.."; + +# Extract translatable strings. +xgettext --from-code=UTF-8 \ + --language=Lua \ + --sort-by-file \ + --keyword=S \ + --keyword=NS:1,2 \ + --keyword=N_ \ + --add-comments='Translators:' \ + --add-location=file \ + -o locale/template.pot \ + $(find .. -name '*.lua') + +# Update translations. +find locale -name '*.po' | while read -r file; do + echo $file + msgmerge --update $file locale/template.pot; +done diff --git a/3d_armor/3d_armor_ip/LICENSE.txt b/3d_armor/3d_armor_ip/LICENSE.txt new file mode 100644 index 0000000..b924ac0 --- /dev/null +++ b/3d_armor/3d_armor_ip/LICENSE.txt @@ -0,0 +1,18 @@ +[mod] 3d Armor integration to inventory plus [3d_armor_ip] +========================================================== + +Copyright (C) 2012-2019 stujones11, Stuart Jones + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/3d_armor/3d_armor_ip/depends.txt b/3d_armor/3d_armor_ip/depends.txt new file mode 100644 index 0000000..e96293b --- /dev/null +++ b/3d_armor/3d_armor_ip/depends.txt @@ -0,0 +1,2 @@ +3d_armor +inventory_plus? diff --git a/3d_armor/3d_armor_ip/description.txt b/3d_armor/3d_armor_ip/description.txt new file mode 100644 index 0000000..58b700e --- /dev/null +++ b/3d_armor/3d_armor_ip/description.txt @@ -0,0 +1 @@ +Adds 3d_armor page to the inventory plus. diff --git a/3d_armor/3d_armor_ip/init.lua b/3d_armor/3d_armor_ip/init.lua new file mode 100644 index 0000000..7701a70 --- /dev/null +++ b/3d_armor/3d_armor_ip/init.lua @@ -0,0 +1,38 @@ +-- support for i18n +local S = armor_i18n.gettext +local F = minetest.formspec_escape + +if not minetest.global_exists("inventory_plus") then + minetest.log("warning", S("3d_armor_ip: Mod loaded but unused.")) + return +end + +armor.formspec = "size[8,8.5]button[6,0;2,0.5;main;"..F(S("Back")).."]"..armor.formspec +armor:register_on_update(function(player) + local name = player:get_player_name() + local formspec = armor:get_armor_formspec(name, true) + local page = player:get_inventory_formspec() + if page:find("detached:"..name.."_armor") then + inventory_plus.set_inventory_formspec(player, formspec) + end +end) + +if minetest.get_modpath("crafting") then + inventory_plus.get_formspec = function(player, page) + end +end + +minetest.register_on_joinplayer(function(player) + inventory_plus.register_button(player,"armor", S("Armor")) +end) + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if fields.armor then + local name = armor:get_valid_player(player, "[on_player_receive_fields]") + if not name then + return + end + local formspec = armor:get_armor_formspec(name, true) + inventory_plus.set_inventory_formspec(player, formspec) + end +end) diff --git a/3d_armor/3d_armor_ip/mod.conf b/3d_armor/3d_armor_ip/mod.conf new file mode 100644 index 0000000..0fe7f4e --- /dev/null +++ b/3d_armor/3d_armor_ip/mod.conf @@ -0,0 +1,4 @@ +name = 3d_armor_ip +depends = 3d_armor +optional_depends = inventory_plus +description = Adds 3d_armor page to the inventory plus. diff --git a/3d_armor/3d_armor_sfinv/LICENSE.txt b/3d_armor/3d_armor_sfinv/LICENSE.txt new file mode 100644 index 0000000..2b2a9f6 --- /dev/null +++ b/3d_armor/3d_armor_sfinv/LICENSE.txt @@ -0,0 +1,18 @@ +[mod] 3d Armor sfinv integration [3d_armor_sfinv] +================================================= + +Copyright (C) 2012-2019 stujones11, Stuart Jones + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/3d_armor/3d_armor_sfinv/depends.txt b/3d_armor/3d_armor_sfinv/depends.txt new file mode 100644 index 0000000..c7beeda --- /dev/null +++ b/3d_armor/3d_armor_sfinv/depends.txt @@ -0,0 +1,2 @@ +3d_armor +sfinv? diff --git a/3d_armor/3d_armor_sfinv/description.txt b/3d_armor/3d_armor_sfinv/description.txt new file mode 100644 index 0000000..15f4e96 --- /dev/null +++ b/3d_armor/3d_armor_sfinv/description.txt @@ -0,0 +1 @@ +Adds 3d_armor page to the sfinv inventory. diff --git a/3d_armor/3d_armor_sfinv/init.lua b/3d_armor/3d_armor_sfinv/init.lua new file mode 100644 index 0000000..a937127 --- /dev/null +++ b/3d_armor/3d_armor_sfinv/init.lua @@ -0,0 +1,21 @@ +-- support for i18n +local S = armor_i18n.gettext + +if not minetest.global_exists("sfinv") then + minetest.log("warning", S("3d_armor_sfinv: Mod loaded but unused.")) + return +end + +sfinv.register_page("3d_armor:armor", { + title = S("Armor"), + get = function(self, player, context) + local name = player:get_player_name() + local formspec = armor:get_armor_formspec(name, true) + return sfinv.make_formspec(player, context, formspec, false) + end +}) +armor:register_on_update(function(player) + if sfinv.enabled then + sfinv.set_player_inventory_formspec(player) + end +end) diff --git a/3d_armor/3d_armor_sfinv/mod.conf b/3d_armor/3d_armor_sfinv/mod.conf new file mode 100644 index 0000000..bc0eb89 --- /dev/null +++ b/3d_armor/3d_armor_sfinv/mod.conf @@ -0,0 +1,4 @@ +name = 3d_armor_sfinv +depends = 3d_armor +optional_depends = sfinv +description = Adds 3d_armor page to the sfinv inventory. diff --git a/3d_armor/3d_armor_stand/LICENSE.txt b/3d_armor/3d_armor_stand/LICENSE.txt new file mode 100644 index 0000000..e3cb55d --- /dev/null +++ b/3d_armor/3d_armor_stand/LICENSE.txt @@ -0,0 +1,43 @@ +[mod] 3d Armor Stand [3d_armor_stand] +===================================== + +License Source Code +------------------- + +Copyright (C) 2012-2019 stujones11, Stuart Jones + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Lecense Models +-------------- + +Copyright (C) 2016-2019 Stuart Jones - CC BY-SA 3.0 + +UV model mapping by tobyplowy(aka toby109tt) + +License Textures +---------------- + +3d_armor_stand.png +3d_armor_stand_locked.png + +Copyright (C) 2017-2019 tobyplowy - CC BY-SA 3.0 + +3d_armor_stand_feet.png +3d_armor_stand_head.png +3d_armor_stand_legs.png +3d_armor_stand_torso.png + +Copyright (C) 2016-2019 Stuart Jones - CC BY-SA 3.0 diff --git a/3d_armor/3d_armor_stand/README.txt b/3d_armor/3d_armor_stand/README.txt new file mode 100644 index 0000000..6a98ab9 --- /dev/null +++ b/3d_armor/3d_armor_stand/README.txt @@ -0,0 +1,21 @@ +[mod] 3d Armor Stand [3d_armor_stand] +===================================== + +Depends: 3d_armor + +Adds a chest-like armor stand for armor storage and display. + +Crafting +-------- + +F = Wooden Fence [default:fence_wood] +S = Steel Ingot [default:steel_ingot] + ++---+---+---+ +| | F | | ++---+---+---+ +| | F | | ++---+---+---+ +| S | S | S | ++---+---+---+ + diff --git a/3d_armor/3d_armor_stand/depends.txt b/3d_armor/3d_armor_stand/depends.txt new file mode 100644 index 0000000..fdbb290 --- /dev/null +++ b/3d_armor/3d_armor_stand/depends.txt @@ -0,0 +1,2 @@ +3d_armor + diff --git a/3d_armor/3d_armor_stand/init.lua b/3d_armor/3d_armor_stand/init.lua new file mode 100644 index 0000000..ab4549b --- /dev/null +++ b/3d_armor/3d_armor_stand/init.lua @@ -0,0 +1,353 @@ +-- support for i18n +local S = armor_i18n.gettext + +local armor_stand_formspec = "size[8,7]" .. + default.gui_bg .. + default.gui_bg_img .. + default.gui_slots .. + default.get_hotbar_bg(0,3) .. + "list[current_name;armor_head;3,0.5;1,1;]" .. + "list[current_name;armor_torso;4,0.5;1,1;]" .. + "list[current_name;armor_legs;3,1.5;1,1;]" .. + "list[current_name;armor_feet;4,1.5;1,1;]" .. + "image[3,0.5;1,1;3d_armor_stand_head.png]" .. + "image[4,0.5;1,1;3d_armor_stand_torso.png]" .. + "image[3,1.5;1,1;3d_armor_stand_legs.png]" .. + "image[4,1.5;1,1;3d_armor_stand_feet.png]" .. + "list[current_player;main;0,3;8,1;]" .. + "list[current_player;main;0,4.25;8,3;8]" + +local elements = {"head", "torso", "legs", "feet"} + +local function drop_armor(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + for _, element in pairs(elements) do + local stack = inv:get_stack("armor_"..element, 1) + if stack and stack:get_count() > 0 then + armor.drop_armor(pos, stack) + inv:set_stack("armor_"..element, 1, nil) + end + end +end + +local function get_stand_object(pos) + local object = nil + local objects = minetest.get_objects_inside_radius(pos, 0.5) or {} + for _, obj in pairs(objects) do + local ent = obj:get_luaentity() + if ent then + if ent.name == "3d_armor_stand:armor_entity" then + -- Remove duplicates + if object then + obj:remove() + else + object = obj + end + end + end + end + return object +end + +local function update_entity(pos) + local node = minetest.get_node(pos) + local object = get_stand_object(pos) + if object then + if not string.find(node.name, "3d_armor_stand:") then + object:remove() + return + end + else + object = minetest.add_entity(pos, "3d_armor_stand:armor_entity") + end + if object then + local texture = "3d_armor_trans.png" + local textures = {} + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local yaw = 0 + if inv then + for _, element in pairs(elements) do + local stack = inv:get_stack("armor_"..element, 1) + if stack:get_count() == 1 then + local item = stack:get_name() or "" + local def = stack:get_definition() or {} + local groups = def.groups or {} + if groups["armor_"..element] then + if def.texture then + table.insert(textures, def.texture) + else + table.insert(textures, item:gsub("%:", "_")..".png") + end + end + end + end + end + if #textures > 0 then + texture = table.concat(textures, "^") + end + if node.param2 then + local rot = node.param2 % 4 + if rot == 1 then + yaw = 3 * math.pi / 2 + elseif rot == 2 then + yaw = math.pi + elseif rot == 3 then + yaw = math.pi / 2 + end + end + object:set_yaw(yaw) + object:set_properties({textures={texture}}) + end +end + +local function has_locked_armor_stand_privilege(meta, player) + local name = "" + if player then + if minetest.check_player_privs(player, "protection_bypass") then + return true + end + name = player:get_player_name() + end + if name ~= meta:get_string("owner") then + return false + end + return true +end + +local function add_hidden_node(pos, player) + local p = {x=pos.x, y=pos.y + 1, z=pos.z} + local name = player:get_player_name() + local node = minetest.get_node(p) + if node.name == "air" and not minetest.is_protected(pos, name) then + minetest.set_node(p, {name="3d_armor_stand:top"}) + end +end + +local function remove_hidden_node(pos) + local p = {x=pos.x, y=pos.y + 1, z=pos.z} + local node = minetest.get_node(p) + if node.name == "3d_armor_stand:top" then + minetest.remove_node(p) + end +end + +minetest.register_node("3d_armor_stand:top", { + description = S("Armor stand top"), + paramtype = "light", + drawtype = "plantlike", + sunlight_propagates = true, + walkable = true, + pointable = false, + diggable = false, + buildable_to = false, + drop = "", + groups = {not_in_creative_inventory = 1}, + on_blast = function() end, + tiles = {"3d_armor_trans.png"}, +}) + +minetest.register_node("3d_armor_stand:armor_stand", { + description = S("Armor stand"), + drawtype = "mesh", + mesh = "3d_armor_stand.obj", + tiles = {"3d_armor_stand.png"}, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + selection_box = { + type = "fixed", + fixed = { + {-0.25, -0.4375, -0.25, 0.25, 1.4, 0.25}, + {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, + }, + }, + groups = {choppy=2, oddly_breakable_by_hand=2}, + sounds = default.node_sound_wood_defaults(), + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", armor_stand_formspec) + meta:set_string("infotext", S("Armor Stand")) + local inv = meta:get_inventory() + for _, element in pairs(elements) do + inv:set_size("armor_"..element, 1) + end + end, + can_dig = function(pos, player) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + for _, element in pairs(elements) do + if not inv:is_empty("armor_"..element) then + return false + end + end + return true + end, + after_place_node = function(pos, placer) + minetest.add_entity(pos, "3d_armor_stand:armor_entity") + add_hidden_node(pos, placer) + end, + allow_metadata_inventory_put = function(pos, listname, index, stack) + local def = stack:get_definition() or {} + local groups = def.groups or {} + if groups[listname] then + return 1 + end + return 0 + end, + allow_metadata_inventory_move = function(pos) + return 0 + end, + on_metadata_inventory_put = function(pos) + update_entity(pos) + end, + on_metadata_inventory_take = function(pos) + update_entity(pos) + end, + after_destruct = function(pos) + update_entity(pos) + remove_hidden_node(pos) + end, + on_blast = function(pos) + drop_armor(pos) + armor.drop_armor(pos, "3d_armor_stand:armor_stand") + minetest.remove_node(pos) + end, +}) + +minetest.register_node("3d_armor_stand:locked_armor_stand", { + description = S("Locked Armor stand"), + drawtype = "mesh", + mesh = "3d_armor_stand.obj", + tiles = {"3d_armor_stand_locked.png"}, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + selection_box = { + type = "fixed", + fixed = { + {-0.25, -0.4375, -0.25, 0.25, 1.4, 0.25}, + {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, + }, + }, + groups = {choppy=2, oddly_breakable_by_hand=2}, + sounds = default.node_sound_wood_defaults(), + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", armor_stand_formspec) + meta:set_string("infotext", S("Armor Stand")) + meta:set_string("owner", "") + local inv = meta:get_inventory() + for _, element in pairs(elements) do + inv:set_size("armor_"..element, 1) + end + end, + can_dig = function(pos, player) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + for _, element in pairs(elements) do + if not inv:is_empty("armor_"..element) then + return false + end + end + return true + end, + after_place_node = function(pos, placer) + minetest.add_entity(pos, "3d_armor_stand:armor_entity") + local meta = minetest.get_meta(pos) + meta:set_string("owner", placer:get_player_name() or "") + meta:set_string("infotext", S("Armor Stand (owned by @1)", meta:get_string("owner"))) + add_hidden_node(pos, placer) + end, + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + local meta = minetest.get_meta(pos) + if not has_locked_armor_stand_privilege(meta, player) then + return 0 + end + local def = stack:get_definition() or {} + local groups = def.groups or {} + if groups[listname] then + return 1 + end + return 0 + end, + allow_metadata_inventory_take = function(pos, listname, index, stack, player) + local meta = minetest.get_meta(pos) + if not has_locked_armor_stand_privilege(meta, player) then + return 0 + end + return stack:get_count() + end, + allow_metadata_inventory_move = function(pos) + return 0 + end, + on_metadata_inventory_put = function(pos) + update_entity(pos) + end, + on_metadata_inventory_take = function(pos) + update_entity(pos) + end, + after_destruct = function(pos) + update_entity(pos) + remove_hidden_node(pos) + end, + on_blast = function(pos) + -- Not affected by TNT + end, +}) + +minetest.register_entity("3d_armor_stand:armor_entity", { + physical = true, + visual = "mesh", + mesh = "3d_armor_entity.obj", + visual_size = {x=1, y=1}, + collisionbox = {0,0,0,0,0,0}, + textures = {"3d_armor_trans.png"}, + pos = nil, + timer = 0, + on_activate = function(self) + local pos = self.object:get_pos() + if pos then + self.pos = vector.round(pos) + update_entity(pos) + end + end, + on_blast = function(self, damage) + local drops = {} + local node = minetest.get_node(self.pos) + if node.name == "3d_armor_stand:armor_stand" then + drop_armor(self.pos) + self.object:remove() + end + return false, false, drops + end, +}) + +minetest.register_abm({ + nodenames = {"3d_armor_stand:locked_armor_stand", "3d_armor_stand:armor_stand"}, + interval = 15, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local num + num = #minetest.get_objects_inside_radius(pos, 0.5) + if num > 0 then return end + update_entity(pos) + end +}) + +minetest.register_craft({ + output = "3d_armor_stand:armor_stand", + recipe = { + {"", "group:fence", ""}, + {"", "group:fence", ""}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + } +}) + +minetest.register_craft({ + output = "3d_armor_stand:locked_armor_stand", + recipe = { + {"3d_armor_stand:armor_stand", "default:steel_ingot"}, + } +}) diff --git a/3d_armor/3d_armor_stand/mod.conf b/3d_armor/3d_armor_stand/mod.conf new file mode 100644 index 0000000..d1f1a4e --- /dev/null +++ b/3d_armor/3d_armor_stand/mod.conf @@ -0,0 +1,2 @@ +name = 3d_armor_stand +depends = 3d_armor diff --git a/3d_armor/3d_armor_stand/models/3d_armor_entity.obj b/3d_armor/3d_armor_stand/models/3d_armor_entity.obj new file mode 100644 index 0000000..052f692 --- /dev/null +++ b/3d_armor/3d_armor_stand/models/3d_armor_entity.obj @@ -0,0 +1,193 @@ +# Blender v2.73 (sub 0) OBJ File: '3d_armor_entity_3.blend' +# www.blender.org +mtllib 3d_armor_entity.mtl +o Player_Cube +v 2.200000 9.763893 1.200000 +v 2.200000 9.763893 -1.200000 +v 2.200000 2.663871 1.200000 +v 2.200000 2.663871 -1.200000 +v -2.200000 9.763893 -1.200000 +v -2.200000 9.763893 1.200000 +v -2.200000 2.663871 -1.200000 +v -2.200000 2.663871 1.200000 +v 2.300000 13.863962 2.300000 +v 2.300000 13.863962 -2.300000 +v 2.300000 9.263885 2.300000 +v 2.300000 9.263885 -2.300000 +v -2.300000 13.863962 -2.300000 +v -2.300000 13.863962 2.300000 +v -2.300000 9.263885 -2.300000 +v -2.300000 9.263885 2.300000 +v -2.322686 2.473175 -1.300000 +v -2.322686 2.473175 1.300000 +v -4.713554 2.682348 1.300000 +v -4.713554 2.682348 -1.300000 +v -1.686446 9.745432 -1.300000 +v -1.686446 9.745432 1.300000 +v -4.077313 9.954605 1.300000 +v -4.077313 9.954605 -1.300000 +v 4.077313 9.954605 -1.300000 +v 4.077313 9.954605 1.300000 +v 1.686446 9.745432 1.300000 +v 1.686446 9.745432 -1.300000 +v 4.713554 2.682348 -1.300000 +v 4.713554 2.682348 1.300000 +v 2.322686 2.473175 1.300000 +v 2.322686 2.473175 -1.300000 +v 0.139099 2.938947 -1.200000 +v 0.139099 2.938947 1.200000 +v 0.261266 -4.059988 1.200000 +v 0.261266 -4.059988 -1.200000 +v 2.660901 -4.018101 1.190000 +v 2.660901 -4.018101 -1.210000 +v 2.538733 2.980834 1.190000 +v 2.538733 2.980834 -1.210000 +v -0.139099 2.938947 -1.200000 +v -0.139099 2.938947 1.200000 +v -0.261266 -4.059988 1.200000 +v -0.261266 -4.059988 -1.200000 +v -2.538734 2.980834 -1.210000 +v -2.538734 2.980834 1.190000 +v -2.660901 -4.018101 -1.210000 +v -2.660901 -4.018101 1.190000 +v -2.799999 -4.387500 1.390000 +v -2.799999 -4.387500 -1.410000 +v -2.800000 -0.812499 1.390000 +v -2.800000 -0.812499 -1.410000 +v -0.000000 -4.387500 -1.400000 +v -0.000000 -4.387500 1.400000 +v -0.000000 -0.812499 1.400000 +v -0.000000 -0.812499 -1.400000 +v 2.800000 -0.812499 -1.410000 +v 2.800000 -0.812499 1.390000 +v 2.799999 -4.387500 -1.410000 +v 2.799999 -4.387500 1.390000 +v 0.000000 -4.387500 -1.400000 +v 0.000000 -4.387500 1.400000 +v 0.000000 -0.812499 1.400000 +v 0.000000 -0.812499 -1.400000 +v 2.267006 13.830965 2.267006 +v 2.267006 13.830965 -2.267006 +v 2.267006 9.296881 2.267006 +v 2.267006 9.296881 -2.267006 +v -2.267006 13.830965 -2.267006 +v -2.267006 13.830965 2.267006 +v -2.267006 9.296881 -2.267006 +v -2.267006 9.296881 2.267006 +vt 0.250000 0.375000 +vt 0.250000 0.000000 +vt 0.312500 0.000000 +vt 0.312500 0.375000 +vt 0.437500 0.375000 +vt 0.437500 0.500000 +vt 0.312500 0.500000 +vt 0.562500 0.375000 +vt 0.562500 0.500000 +vt 0.437500 0.000000 +vt 0.500000 0.000000 +vt 0.500000 0.375000 +vt 0.625000 0.000000 +vt 0.625000 0.375000 +vt 0.500000 0.750000 +vt 0.500000 0.500000 +vt 0.625000 0.500000 +vt 0.625000 0.750000 +vt 0.750000 0.750000 +vt 0.750000 1.000000 +vt 0.625000 1.000000 +vt 0.875000 0.750000 +vt 0.875000 1.000000 +vt 0.750000 0.500000 +vt 0.875000 0.500000 +vt 1.000000 0.750000 +vt 1.000000 0.500000 +vt 0.750000 0.375000 +vt 0.812500 0.500000 +vt 0.812500 0.375000 +vt 0.687500 0.375000 +vt 0.687500 0.500000 +vt 0.687500 0.000000 +vt 0.750000 0.000000 +vt 0.812500 0.000000 +vt 0.875000 0.375000 +vt 0.875000 0.000000 +vt 0.125000 0.375000 +vt 0.062500 0.375000 +vt 0.062500 0.500000 +vt 0.125000 0.500000 +vt 0.187500 0.375000 +vt 0.187500 0.500000 +vt 0.000000 0.375000 +vt 0.000000 0.000000 +vt 0.062500 0.000000 +vt 0.187500 0.000000 +vt 0.125000 0.000000 +vt 0.437500 0.875000 +vt 0.437500 1.000000 +vt 0.375000 1.000000 +vt 0.375000 0.875000 +vt 0.250000 0.875000 +vt 0.312500 0.875000 +vt 0.312500 0.656250 +vt 0.250000 0.656250 +vt 0.500000 0.875000 +vt 0.437500 0.656250 +vt 0.500000 0.656250 +vt 0.375000 0.656250 +vt 0.312500 1.000000 +usemtl Armor +s off +f 1/1 3/2 4/3 2/4 +f 5/5 6/6 1/7 2/4 +f 8/6 7/5 4/8 3/9 +f 5/5 2/4 4/3 7/10 +f 7/10 8/11 6/12 5/5 +f 8/11 3/13 1/14 6/12 +f 9/15 11/16 12/17 10/18 +f 13/19 14/20 9/21 10/18 +f 12/22 11/23 16/20 15/19 +f 13/19 10/18 12/17 15/24 +f 14/22 13/19 15/24 16/25 +f 9/26 14/22 16/25 11/27 +f 17/28 18/24 19/29 20/30 +f 24/31 23/32 22/24 21/28 +f 23/31 24/14 20/13 19/33 +f 24/31 21/28 17/34 20/33 +f 21/28 22/30 18/35 17/34 +f 22/30 23/36 19/37 18/35 +f 27/30 31/35 30/37 26/36 +f 28/28 32/34 31/35 27/30 +f 25/31 29/33 32/34 28/28 +f 26/31 30/33 29/13 25/14 +f 25/31 28/28 27/24 26/32 +f 32/28 29/30 30/29 31/24 +f 40/38 33/39 34/40 39/41 +f 36/42 38/38 37/41 35/43 +f 39/44 37/45 38/46 40/39 +f 34/1 35/2 37/47 39/42 +f 40/38 38/48 36/46 33/39 +f 33/42 36/47 35/48 34/38 +f 45/38 46/41 42/40 41/39 +f 41/42 42/38 43/48 44/47 +f 45/38 41/39 44/46 47/48 +f 42/1 46/42 48/47 43/2 +f 46/44 45/39 47/46 48/45 +f 44/42 43/43 48/41 47/38 +f 53/49 54/50 49/51 50/52 +f 51/53 52/54 50/55 49/56 +f 55/57 51/49 49/58 54/59 +f 52/52 56/54 53/55 50/60 +f 56/49 55/52 54/60 53/58 +f 52/52 51/51 55/61 56/54 +f 64/49 61/58 62/60 63/52 +f 57/52 59/60 61/55 64/54 +f 63/57 62/59 60/58 58/49 +f 58/53 60/56 59/55 57/54 +f 61/49 59/52 60/51 62/50 +f 57/52 64/54 63/61 58/51 +f 65/15 66/18 68/17 67/16 +f 69/19 66/18 65/21 70/20 +f 68/22 71/19 72/20 67/23 +f 69/19 71/24 68/17 66/18 +f 70/22 72/25 71/24 69/19 +f 65/26 67/27 72/25 70/22 diff --git a/3d_armor/3d_armor_stand/models/3d_armor_stand.obj b/3d_armor/3d_armor_stand/models/3d_armor_stand.obj new file mode 100644 index 0000000..0df6dc7 --- /dev/null +++ b/3d_armor/3d_armor_stand/models/3d_armor_stand.obj @@ -0,0 +1,280 @@ +# Blender v2.72 (sub 0) OBJ File: '' +# www.blender.org +mtllib 3d_armor_stand.mtl +o Armor_Stand_Player_Cube_Stand +v 0.062500 0.125002 -0.062500 +v 0.062500 -0.437500 -0.062500 +v 0.062500 -0.437500 0.062500 +v 0.062500 0.125002 0.062500 +v -0.187500 0.250004 0.062500 +v -0.187500 0.250004 -0.062500 +v -0.250000 0.250004 -0.062500 +v -0.250000 0.250004 0.062500 +v -0.062500 -0.437500 -0.062500 +v -0.062500 -0.437500 0.062500 +v -0.187500 -0.437500 0.062500 +v -0.187500 -0.437500 -0.062500 +v -0.187500 0.125002 0.062500 +v -0.187500 0.125002 -0.062500 +v -0.187500 0.937504 0.062500 +v -0.187500 0.937504 -0.062500 +v -0.375000 0.937504 -0.062500 +v -0.375000 0.937504 0.062500 +v -0.062500 0.125002 0.062500 +v 0.187500 0.125002 -0.062500 +v 0.187500 -0.437500 -0.062500 +v -0.062500 0.125002 -0.062500 +v -0.250000 0.125007 -0.062500 +v -0.250000 0.125007 0.062500 +v 0.187500 -0.437500 0.062500 +v 0.187500 0.125002 0.062500 +v -0.062500 0.937504 0.062500 +v -0.187500 0.812504 0.062500 +v -0.062500 0.812504 0.062500 +v -0.062500 0.937504 -0.062500 +v 0.187500 0.250004 -0.062500 +v 0.187500 0.250004 0.062500 +v 0.250000 0.250004 0.062500 +v 0.250000 0.250004 -0.062500 +v 0.250000 0.125007 0.062500 +v 0.250000 0.125007 -0.062500 +v 0.187500 0.812504 0.062500 +v 0.187500 0.812504 -0.062500 +v 0.375000 0.812504 -0.062500 +v 0.375000 0.812504 0.062500 +v 0.187500 0.937504 -0.062500 +v 0.187500 0.937504 0.062500 +v 0.375000 0.937504 0.062500 +v 0.375000 0.937504 -0.062500 +v 0.062500 0.937504 -0.062500 +v 0.062500 0.937504 0.062500 +v -0.062500 0.812504 -0.062500 +v -0.187500 0.812504 -0.062500 +v 0.062500 0.812504 -0.062500 +v 0.062500 0.812504 0.062500 +v -0.375000 0.812504 -0.062500 +v -0.375000 0.812504 0.062500 +v -0.062500 0.250004 0.062500 +v 0.062500 0.250004 0.062500 +v 0.062500 0.250004 -0.062500 +v -0.062500 0.250004 -0.062500 +v -0.062500 1.312504 -0.062500 +v 0.062500 1.312504 -0.062500 +v -0.062500 1.312504 0.062500 +v 0.062500 1.312504 0.062500 +v -0.500000 -0.437500 -0.500000 +v -0.500000 -0.437500 0.500000 +v 0.500000 -0.437500 0.500000 +v 0.500000 -0.437500 -0.500000 +v -0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 -0.500000 0.500000 +vt 0.062500 0.140625 +vt 0.062500 0.000000 +vt 0.093750 0.000000 +vt 0.093750 0.140625 +vt 0.140625 0.234375 +vt 0.140625 0.203125 +vt 0.156250 0.203125 +vt 0.156250 0.234375 +vt 0.093750 0.171875 +vt 0.062500 0.171875 +vt 0.218750 0.140625 +vt 0.187500 0.140625 +vt 0.187500 0.000000 +vt 0.218750 0.000000 +vt 0.078125 0.437500 +vt 0.078125 0.468750 +vt 0.031250 0.468750 +vt 0.031250 0.437500 +vt 0.250000 0.140625 +vt 0.250000 0.000000 +vt 0.031250 0.140625 +vt 0.031250 0.000000 +vt 0.156250 0.140625 +vt 0.156250 0.000000 +vt 0.187500 0.203125 +vt 0.156250 0.171875 +vt 0.187500 0.171875 +vt 0.125000 0.000000 +vt 0.125000 0.140625 +vt 0.000000 0.140625 +vt 0.000000 0.000000 +vt 0.328125 0.437500 +vt 0.296875 0.437500 +vt 0.296875 0.406250 +vt 0.328125 0.406250 +vt 0.109375 0.437500 +vt 0.109375 0.468750 +vt 0.046875 0.203125 +vt 0.046875 0.234375 +vt 0.031250 0.234375 +vt 0.031250 0.203125 +vt 0.000000 0.203125 +vt 0.000000 0.171875 +vt 0.031250 0.171875 +vt 0.265625 0.468750 +vt 0.265625 0.437500 +vt 0.218750 0.437500 +vt 0.218750 0.468750 +vt 0.218750 0.171875 +vt 0.171875 0.468750 +vt 0.171875 0.437500 +vt 0.078125 0.406250 +vt 0.031250 0.406250 +vt 0.140625 0.468750 +vt 0.140625 0.437500 +vt 0.140625 0.406250 +vt 0.171875 0.406250 +vt 0.109375 0.406250 +vt 0.359375 0.437500 +vt 0.359375 0.406250 +vt 0.390625 0.406250 +vt 0.390625 0.437500 +vt 0.437500 0.406250 +vt 0.437500 0.437500 +vt 0.000000 0.437500 +vt 0.000000 0.406250 +vt 0.250000 0.437500 +vt 0.218750 0.406250 +vt 0.250000 0.406250 +vt 0.359375 0.468750 +vt 0.406250 0.468750 +vt 0.406250 0.437500 +vt 0.109375 0.234375 +vt 0.078125 0.234375 +vt 0.078125 0.203125 +vt 0.109375 0.203125 +vt 0.062500 0.468750 +vt 0.062500 0.562500 +vt 0.031250 0.562500 +vt 0.328125 0.468750 +vt 0.296875 0.468750 +vt 0.062500 0.593750 +vt 0.031250 0.593750 +vt 0.093750 0.468750 +vt 0.093750 0.562500 +vt 0.125000 0.468750 +vt 0.125000 0.562500 +vt 0.000000 0.562500 +vt 0.000000 0.468750 +vt 0.078125 0.171875 +vt 0.046875 0.171875 +vt 0.265625 0.203125 +vt 0.265625 0.171875 +vt 0.296875 0.171875 +vt 0.296875 0.203125 +vt 0.265625 0.234375 +vt 0.281250 0.234375 +vt 0.281250 0.203125 +vt 0.312500 0.171875 +vt 0.312500 0.203125 +vt 0.140625 0.171875 +vt 0.171875 0.234375 +vt 0.171875 0.203125 +vt 0.109375 0.171875 +vt 0.234375 0.203125 +vt 0.203125 0.203125 +vt 0.203125 0.171875 +vt 0.234375 0.171875 +vt 0.234375 0.234375 +vt 0.203125 0.234375 +vt 0.062500 0.375000 +vt 0.062500 0.234375 +vt 0.093750 0.234375 +vt 0.093750 0.375000 +vt 0.031250 0.375000 +vt 0.125000 0.234375 +vt 0.125000 0.375000 +vt 0.000000 0.375000 +vt 0.000000 0.234375 +vt 0.218750 0.375000 +vt 0.187500 0.375000 +vt 0.187500 0.234375 +vt 0.218750 0.234375 +vt 0.250000 0.375000 +vt 0.250000 0.234375 +vt 0.156250 0.375000 +vt 0.250000 1.000000 +vt 0.250000 0.750000 +vt 0.500000 0.750000 +vt 0.500000 1.000000 +vt 0.750000 0.750000 +vt 0.750000 1.000000 +vt 0.750000 0.734375 +vt 1.000000 0.734375 +vt 1.000000 0.750000 +vt 0.000000 0.750000 +vt 0.000000 0.734375 +vt 0.250000 0.734375 +vt 0.500000 0.734375 +usemtl Stand +s off +f 1/1 2/2 3/3 4/4 +f 5/5 6/6 7/7 8/8 +f 9/1 10/4 11/9 12/10 +f 13/11 14/12 12/13 11/14 +f 15/15 16/16 17/17 18/18 +f 19/19 13/11 11/14 10/20 +f 2/2 1/1 20/21 21/22 +f 14/12 22/23 9/24 12/13 +f 8/25 7/7 23/26 24/27 +f 4/4 3/3 25/28 26/29 +f 22/23 19/29 10/28 9/24 +f 26/30 25/31 21/22 20/21 +f 27/32 15/33 28/34 29/35 +f 16/16 15/15 27/36 30/37 +f 31/38 32/39 33/40 34/41 +f 33/42 35/43 36/44 34/41 +f 37/45 38/46 39/47 40/48 +f 2/49 21/27 25/12 3/11 +f 41/50 42/51 43/47 44/48 +f 38/52 41/15 44/18 39/53 +f 41/50 45/54 46/55 42/51 +f 16/51 30/55 47/56 48/57 +f 41/15 38/52 49/58 45/36 +f 46/59 50/60 37/61 42/62 +f 42/62 37/61 40/63 43/64 +f 43/65 40/66 39/53 44/18 +f 18/67 17/47 51/68 52/69 +f 28/34 15/33 18/67 52/69 +f 16/51 48/57 51/68 17/47 +f 48/59 28/70 52/71 51/72 +f 53/73 54/74 55/75 56/76 +f 30/77 57/78 58/79 45/17 +f 50/60 46/59 27/32 29/35 +f 29/80 47/32 49/33 50/81 +f 47/56 30/55 45/36 49/58 +f 57/78 59/82 60/83 58/79 +f 27/84 59/85 57/78 30/77 +f 46/86 60/87 59/85 27/84 +f 45/17 58/79 60/88 46/89 +f 1/90 55/75 31/38 20/91 +f 54/92 4/93 26/94 32/95 +f 26/92 20/96 36/97 35/98 +f 20/91 31/38 34/41 36/44 +f 32/95 26/94 35/99 33/100 +f 6/6 14/101 23/26 7/7 +f 14/102 13/103 24/7 23/8 +f 6/6 56/76 22/104 14/101 +f 53/105 5/106 13/107 19/108 +f 13/107 5/106 8/25 24/27 +f 1/90 22/104 56/76 55/75 +f 53/105 19/108 4/93 54/92 +f 1/109 4/105 19/106 22/110 +f 49/111 55/112 54/113 50/114 +f 38/115 31/40 55/112 49/111 +f 50/114 54/113 32/116 37/117 +f 37/118 32/119 31/40 38/115 +f 28/120 48/121 6/122 5/123 +f 29/124 28/120 5/123 53/125 +f 48/121 47/126 56/8 6/122 +f 47/126 29/117 53/116 56/8 +usemtl Base +f 61/127 62/128 63/129 64/130 +f 65/129 66/131 67/132 68/130 +f 62/131 68/133 67/134 63/135 +f 63/136 67/137 66/138 64/128 +f 61/129 64/128 66/138 65/139 +f 62/131 61/129 65/139 68/133 diff --git a/3d_armor/3d_armor_stand/models/3d_armor_stand.png b/3d_armor/3d_armor_stand/models/3d_armor_stand.png new file mode 100644 index 0000000..aeb26de Binary files /dev/null and b/3d_armor/3d_armor_stand/models/3d_armor_stand.png differ diff --git a/3d_armor/3d_armor_stand/models/3d_armor_stand_locked.png b/3d_armor/3d_armor_stand/models/3d_armor_stand_locked.png new file mode 100644 index 0000000..3ee08b4 Binary files /dev/null and b/3d_armor/3d_armor_stand/models/3d_armor_stand_locked.png differ diff --git a/3d_armor/3d_armor_stand/textures/3d_armor_stand_feet.png b/3d_armor/3d_armor_stand/textures/3d_armor_stand_feet.png new file mode 100644 index 0000000..6b34d66 Binary files /dev/null and b/3d_armor/3d_armor_stand/textures/3d_armor_stand_feet.png differ diff --git a/3d_armor/3d_armor_stand/textures/3d_armor_stand_head.png b/3d_armor/3d_armor_stand/textures/3d_armor_stand_head.png new file mode 100644 index 0000000..864bf5c Binary files /dev/null and b/3d_armor/3d_armor_stand/textures/3d_armor_stand_head.png differ diff --git a/3d_armor/3d_armor_stand/textures/3d_armor_stand_legs.png b/3d_armor/3d_armor_stand/textures/3d_armor_stand_legs.png new file mode 100644 index 0000000..5441f0c Binary files /dev/null and b/3d_armor/3d_armor_stand/textures/3d_armor_stand_legs.png differ diff --git a/3d_armor/3d_armor_stand/textures/3d_armor_stand_shield.png b/3d_armor/3d_armor_stand/textures/3d_armor_stand_shield.png new file mode 100644 index 0000000..51b490f Binary files /dev/null and b/3d_armor/3d_armor_stand/textures/3d_armor_stand_shield.png differ diff --git a/3d_armor/3d_armor_stand/textures/3d_armor_stand_torso.png b/3d_armor/3d_armor_stand/textures/3d_armor_stand_torso.png new file mode 100644 index 0000000..1856bae Binary files /dev/null and b/3d_armor/3d_armor_stand/textures/3d_armor_stand_torso.png differ diff --git a/3d_armor/3d_armor_ui/LICENSE.txt b/3d_armor/3d_armor_ui/LICENSE.txt new file mode 100644 index 0000000..6ae23a6 --- /dev/null +++ b/3d_armor/3d_armor_ui/LICENSE.txt @@ -0,0 +1,18 @@ +[mod] 3d Armor integration to unified inventory [3d_armor_ui] +============================================================= + +Copyright (C) 2012-2019 stujones11, Stuart Jones + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/3d_armor/3d_armor_ui/depends.txt b/3d_armor/3d_armor_ui/depends.txt new file mode 100644 index 0000000..cf4ccf9 --- /dev/null +++ b/3d_armor/3d_armor_ui/depends.txt @@ -0,0 +1,2 @@ +3d_armor +unified_inventory? diff --git a/3d_armor/3d_armor_ui/description.txt b/3d_armor/3d_armor_ui/description.txt new file mode 100644 index 0000000..e6bf11c --- /dev/null +++ b/3d_armor/3d_armor_ui/description.txt @@ -0,0 +1 @@ +Adds 3d_armor page to the unified inventory. diff --git a/3d_armor/3d_armor_ui/init.lua b/3d_armor/3d_armor_ui/init.lua new file mode 100644 index 0000000..41eec7b --- /dev/null +++ b/3d_armor/3d_armor_ui/init.lua @@ -0,0 +1,53 @@ +-- support for i18n +local S = armor_i18n.gettext +local F = minetest.formspec_escape +local has_technic = minetest.get_modpath("technic") ~= nil + +if not minetest.global_exists("unified_inventory") then + minetest.log("warning", S("3d_armor_ui: Mod loaded but unused.")) + return +end + +if unified_inventory.sfinv_compat_layer then + return +end + +armor:register_on_update(function(player) + local name = player:get_player_name() + if unified_inventory.current_page[name] == "armor" then + unified_inventory.set_inventory_formspec(player, "armor") + end +end) + +unified_inventory.register_button("armor", { + type = "image", + image = "inventory_plus_armor.png", + tooltip = S("3d Armor") +}) + +unified_inventory.register_page("armor", { + get_formspec = function(player, perplayer_formspec) + local fy = perplayer_formspec.formspec_y + local name = player:get_player_name() + if armor.def[name].init_time == 0 then + return {formspec="label[0,0;"..F(S("Armor not initialized!")).."]"} + end + local formspec = "background[0.06,"..fy..";7.92,7.52;3d_armor_ui_form.png]".. + "label[0,0;"..F(S("Armor")).."]".. + "list[detached:"..name.."_armor;armor;0,"..fy..";2,3;]".. + "image[2.5,"..(fy - 0.25)..";2,4;"..armor.textures[name].preview.."]".. + "label[5.0,"..(fy + 0.0)..";"..F(S("Level"))..": "..armor.def[name].level.."]".. + "label[5.0,"..(fy + 0.5)..";"..F(S("Heal"))..": "..armor.def[name].heal.."]".. + "listring[current_player;main]".. + "listring[detached:"..name.."_armor;armor]" + if armor.config.fire_protect then + formspec = formspec.."label[5.0,"..(fy + 1.0)..";".. + F(S("Fire"))..": "..armor.def[name].fire.."]" + end + if has_technic then + formspec = formspec.."label[5.0,"..(fy + 1.5)..";".. + F(S("Radiation"))..": "..armor.def[name].groups["radiation"].."]" + end + return {formspec=formspec} + end, +}) diff --git a/3d_armor/3d_armor_ui/mod.conf b/3d_armor/3d_armor_ui/mod.conf new file mode 100644 index 0000000..68eff85 --- /dev/null +++ b/3d_armor/3d_armor_ui/mod.conf @@ -0,0 +1,4 @@ +name = 3d_armor_ui +depends = 3d_armor +optional_depends = unified_inventory +description = Adds 3d_armor page to the unified inventory. diff --git a/3d_armor/LICENSE.md b/3d_armor/LICENSE.md new file mode 100644 index 0000000..f7793ff --- /dev/null +++ b/3d_armor/LICENSE.md @@ -0,0 +1,10 @@ +3D Armor - Visible Player Armor +=============================== + +License Source Code: Copyright (C) 2013-2018 Stuart Jones - LGPL v2.1 + +Armor Textures: Copyright (C) 2017-2018 davidthecreator - CC-BY-SA 3.0 + +Special credit to Jordach and MirceaKitsune for providing the default 3d character model. + +New armor/shield textures CC-BY-SA 3.0 / davidthecreator / https://forum.minetest.net/viewtopic.php?f=11&t=4654&start=800#p356448 diff --git a/3d_armor/README.md b/3d_armor/README.md new file mode 100644 index 0000000..7bfefc0 --- /dev/null +++ b/3d_armor/README.md @@ -0,0 +1,72 @@ +Modpack - 3d Armor [0.4.13] +=========================== + +![](https://github.com/minetest-mods/3d_armor/workflows/luacheck/badge.svg) +![](https://github.com/minetest-mods/3d_armor/workflows/integration-test/badge.svg) + +### Table of Contents + + + + +- [[mod] Visible Player Armor [3d_armor]](#mod-visible-player-armor-3d_armor) +- [[mod] Visible Wielded Items [wieldview]](#mod-visible-wielded-items-wieldview) +- [[mod] Shields [shields]](#mod-shields-shields) +- [[mod] 3d Armor Stand [3d_armor_stand]](#mod-3d-armor-stand-3d_armor_stand) + + + + +[mod] Visible Player Armor [3d_armor] +------------------------------------- + +Minetest Version: 5.0.0 + +Game: minetest_game and many derivatives + +Depends: default + +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 attack. + +Armor takes damage when a player is hurt, however, many armor items offer a 'stackable' +percentage chance of restoring the lost health points. Overall armor level is boosted by 10% +when wearing a full matching set (helmet, chestplate, leggings and boots of the same material) + +Fire protection has been added by TenPlus1 and in use when ethereal mod is found and crystal +armor has been enabled. each piece of armor offers 1 fire protection, level 1 protects +against torches, level 2 against crystal spikes, 3 for fire and 5 protects when in lava. + +Compatible with sfinv, inventory plus or unified inventory by enabling the appropriate +inventory module, [3d_armor_sfinv], [3d_armor_ip] and [3d_armor_ui] respectively. +Also compatible with [smart_inventory] without the need for additional modules. + +built in support player skins [skins] by Zeg9 and Player Textures [player_textures] by PilzAdam +and [simple_skins] by TenPlus1. + +Armor can be configured by adding a file called armor.conf in 3d_armor mod or world directory. +see armor.conf.example for all available options. + +For mod installation instructions, please visit: http://wiki.minetest.com/wiki/Installing_Mods + +[mod] Visible Wielded Items [wieldview] +--------------------------------------- + +Depends: 3d_armor + +Makes hand wielded items visible to other players. + +[mod] Shields [shields] +----------------------- + +Depends: 3d_armor + +Originally a part of 3d_armor, shields have been re-included as an optional extra. +If you do not want shields then simply remove the shields folder from the modpack. + +[mod] 3d Armor Stand [3d_armor_stand] +------------------------------------- + +Depends: 3d_armor + +Adds a chest-like armor stand for armor storage and display. diff --git a/3d_armor/description.txt b/3d_armor/description.txt new file mode 100644 index 0000000..2da5ba4 --- /dev/null +++ b/3d_armor/description.txt @@ -0,0 +1 @@ +Visible player armor & wielded items. diff --git a/3d_armor/integration-test.sh b/3d_armor/integration-test.sh new file mode 100755 index 0000000..9169144 --- /dev/null +++ b/3d_armor/integration-test.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# simple integration test + +CFG=/tmp/minetest.conf +MTDIR=/tmp/mt +WORLDDIR=${MTDIR}/worlds/world + +cat < ${CFG} + enable_3d_armor_integration_test = true +EOF + +mkdir -p ${WORLDDIR} +chmod 777 ${MTDIR} -R +docker run --rm -i \ + -v ${CFG}:/etc/minetest/minetest.conf:ro \ + -v ${MTDIR}:/var/lib/minetest/.minetest \ + -v $(pwd):/var/lib/minetest/.minetest/worlds/world/worldmods/3d_armor \ + registry.gitlab.com/minetest/minetest/server:5.2.0 + +test -f ${WORLDDIR}/integration_test.json && exit 0 || exit 1 diff --git a/3d_armor/modpack.conf b/3d_armor/modpack.conf new file mode 100644 index 0000000..7ba907c --- /dev/null +++ b/3d_armor/modpack.conf @@ -0,0 +1,5 @@ +name = minetest-3d_armor +description = Visible player armor & wielded items. +release = 4043 +title = 3D Armor +author = stu diff --git a/3d_armor/preview_gen.py b/3d_armor/preview_gen.py new file mode 100755 index 0000000..a18954d --- /dev/null +++ b/3d_armor/preview_gen.py @@ -0,0 +1,81 @@ +#!/usr/bin/python + +import os +import sys +import Image + +try : + arg = sys.argv[1] +except IndexError : + print "Usage: preview_gen.py " + sys.exit(1) + +try : + index = open(arg, "r") +except IOError : + print "Failed to open index file%s" %s (arg) + sys.exit(1) + +preview = [] + +for line in index.readlines() : + if ":" in line : + line = line.rstrip('\n') + preview.append(line.split(':')) + +print "Generating preview images..." +for fn, place in preview : + try : + imi = Image.open(fn) + except IOError : + print "Failed to open %s" % (fn) + sys.exit(1) + + w, h = imi.size + if h != w / 2: + print "Incompatible texture size %s" % (fn) + sys.exit(1) + + s = w / 64 + imo = Image.new("RGBA", (16 * s, 32 * s)) + + if place == "all" or place == "head" : + face = (40 * s, 8 * s, 48 * s, 16 * s) + side_l = (56 * s, 8 * s, 57 * s, 16 * s) + side_r = (63 * s, 8 * s, 64 * s, 16 * s) + imo.paste(imi.crop(side_l), (4 * s, 0, 5 * s, 8 * s)) + imo.paste(imi.crop(side_r), (11 * s, 0, 12 * s, 8 * s)) + imo.paste(imi.crop(face), (4 * s, 0, 12 * s, 8 * s)) + + if place == "all" or place == "torso" : + arm = (44 * s, 20 * s, 48 * s, 32 * s) + body = (20 * s, 20 * s, 28 * s, 32 * s) + imo.paste(imi.crop(arm), (0 * s, 8 * s, 4 * s, 20 * s)) + imo.paste(imi.crop(arm).transpose(Image.FLIP_LEFT_RIGHT), + (12 * s, 8 * s, 16 * s, 20 * s)) + imo.paste(imi.crop(body), (4 * s, 8 * s, 12 * s, 20 * s)) + + if place == "all" or place == "legs" : + leg = (4 * s, 20 * s, 8 * s, 32 * s) + imo.paste(imi.crop(leg), (4 * s, 20 * s, 8 * s, 32 * s)) + imo.paste(imi.crop(leg).transpose(Image.FLIP_LEFT_RIGHT), + (8 * s, 20 * s, 12 * s, 32 * s)) + + if place == "all" or place == "feet" : + boot = (20 * s, 4 * s, 24 * s, 11 * s) + imo.paste(imi.crop(boot), (4 * s, 25 * s, 8 * s, 32 * s)) + imo.paste(imi.crop(boot).transpose(Image.FLIP_LEFT_RIGHT), + (8 * s, 25 * s, 12 * s, 32 * s)) + + size = (32 * s, 64 * s) + imo = imo.resize(size) + + if place == "shield" : + shield = (0, 0, 16 * s, 16 * s) + imo.paste(imi.crop(shield), (16 * s, 32 * s, 32 * s, 48 * s)) + + outfile = fn.replace(".png", "_preview.png") + imo.save(outfile) + print outfile + + diff --git a/3d_armor/screenshot.png b/3d_armor/screenshot.png new file mode 100644 index 0000000..c1f9e58 Binary files /dev/null and b/3d_armor/screenshot.png differ diff --git a/3d_armor/settingtypes.txt b/3d_armor/settingtypes.txt new file mode 100644 index 0000000..c6c90de --- /dev/null +++ b/3d_armor/settingtypes.txt @@ -0,0 +1,65 @@ + +[3d_armor] + +armor_material_wood (Enable wood armor) bool true +armor_material_cactus (Enable cactus armor) bool true +armor_material_steel (Enable steel armor) bool true +armor_material_bronze (Enable bronze armor) bool true +armor_material_diamond (Enable diamond armor) bool true +armor_material_gold (Enable gold armor) bool true +armor_material_mithril (Enable mithril armor) bool true +armor_material_crystal (Enable crystal armor) bool true + +# Increase this if you get initialization glitches when a player first joins. +armor_init_delay (Initialization delay) int 2 + +# Number of initialization attempts. +# Use in conjunction with armor_init_delay if initialization problems persist. +armor_init_times (Initialization attempts) int 10 + +# Increase this if armor is not getting into bones due to server lag. +armor_bones_delay (Delay for bones) int 1 + +# How often player armor items are updated. +armor_update_time (Armor refresh rate [seconds]) int 1 + +# Drop armor when a player dies. +# Uses bones mod if present, otherwise items are dropped around the player. +armor_drop (Drop armor on death) bool true + +# Pulverize armor when a player dies, overrides armor_drop. +armor_destroy (Pulverize armor on death) bool 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 (Armor effectiveness multiplier) float 1 + +# You can use this to increase or decrease overall armor healing, +# eg: armor_heal_multiplier = 0 will disable healing altogether. +armor_heal_multiplier (Armor healing multiplier) float 1 + +# Enable water protection (periodically restores breath when activated). +armor_water_protect (Enable water protection) bool true + +# Enable fire protection (defaults true if using ethereal mod). +armor_fire_protect (Enable fire protection) bool false + +# Enable punch damage effects. +armor_punch_damage (Enable damage effects) bool true + +# Enable migration of old armor inventories. +armor_migrate_old_inventory (Migrate old armor inventories) bool true + + +[shields] + +shields_disable_sounds (Disable shield sounds) bool false + + +[wieldview] + +# Set number of seconds between visible wielded item updates. +wieldview_update_time (Wieldview refresh rate [seconds]) int 2 + +# Show nodes as tiles, disabled by default. +wieldview_node_tiles (Show nodes as tiles) bool false diff --git a/3d_armor/shields/LICENSE.txt b/3d_armor/shields/LICENSE.txt new file mode 100644 index 0000000..1f84859 --- /dev/null +++ b/3d_armor/shields/LICENSE.txt @@ -0,0 +1,26 @@ +[mod] Shields [shields] +======================= + +License Source Code +------------------- + +Copyright (C) 2012-2019 stujones11, Stuart Jones + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +License Textures +---------------- + +Copyright (C) 2017-2019 davidthecreator - CC-BY-SA 3.0 diff --git a/3d_armor/shields/README.txt b/3d_armor/shields/README.txt new file mode 100644 index 0000000..5a72097 --- /dev/null +++ b/3d_armor/shields/README.txt @@ -0,0 +1,16 @@ +[mod] Shields [shields] +======================= + +Adds shields to 3d_armor + +Depends: 3d_armor + +Originally a part of 3d_armor, shields have been re-included as an optional extra. +If you do not what shields then simply remove the shields folder from the modpack. + +Shields Configuration +--------------------- + +Override the following default settings by adding them to your minetest.conf file. + +shields_disable_sounds = false diff --git a/3d_armor/shields/crafting_guide.txt b/3d_armor/shields/crafting_guide.txt new file mode 100644 index 0000000..9b61dde --- /dev/null +++ b/3d_armor/shields/crafting_guide.txt @@ -0,0 +1,36 @@ +Shields -- Crafting Guide +-------------------------- + ++---+---+---+ +| X | X | X | ++---+---+---+ +| X | X | X | ++---+---+---+ +| | X | | ++---+---+---+ + +[shields:shield_wood] X = [default:wood] +[shields:shield_cactus] X = [default:cactus] +[shields:shield_steel] X = [default:steel_ingot] +[shields:shield_bronze] X = [default:bronze_ingot] +[shields:shield_diamond] X = [default:diamond] +[shields:shield_gold] X = [default:gold_ingot] +[shields:shield_mithril] X = [moreores:mithril_ingot] +[shields:shield_crystal] X = [ethereal:crystal_ingot] + +Enhanced Shields +---------------- + ++---+ +| S | ++---+ +| X | ++---+ +| S | ++---+ + +[shields:shield_enhanced_wood] X = [shields:shield_wood] +[shields:shield_enhanced_cactus] X = [shields:shield_cactus] + +S = [default:steel_ingot] + diff --git a/3d_armor/shields/depends.txt b/3d_armor/shields/depends.txt new file mode 100644 index 0000000..585cc7a --- /dev/null +++ b/3d_armor/shields/depends.txt @@ -0,0 +1,2 @@ +default +3d_armor diff --git a/3d_armor/shields/description.txt b/3d_armor/shields/description.txt new file mode 100644 index 0000000..cb378bb --- /dev/null +++ b/3d_armor/shields/description.txt @@ -0,0 +1 @@ +Adds visible shields to 3d armor. diff --git a/3d_armor/shields/init.lua b/3d_armor/shields/init.lua new file mode 100644 index 0000000..754b093 --- /dev/null +++ b/3d_armor/shields/init.lua @@ -0,0 +1,236 @@ +-- support for i18n +local S = armor_i18n.gettext + +local disable_sounds = minetest.settings:get_bool("shields_disable_sounds") +local function play_sound_effect(player, name) + if not disable_sounds and player then + local pos = player:get_pos() + if pos then + minetest.sound_play(name, { + pos = pos, + max_hear_distance = 10, + gain = 0.5, + }) + end + end +end + +if minetest.global_exists("armor") and armor.elements then + table.insert(armor.elements, "shield") + local mult = armor.config.level_multiplier or 1 + armor.config.level_multiplier = mult * 0.9 +end + +-- Regisiter Shields + +armor:register_armor("shields:shield_admin", { + description = S("Admin Shield"), + inventory_image = "shields_inv_shield_admin.png", + groups = {armor_shield=1000, armor_heal=100, armor_use=0, not_in_creative_inventory=1}, +}) + +minetest.register_alias("adminshield", "shields:shield_admin") + +if armor.materials.wood then + armor:register_armor("shields:shield_wood", { + description = S("Wooden Shield"), + inventory_image = "shields_inv_shield_wood.png", + groups = {armor_shield=1, armor_heal=0, armor_use=2000, flammable=1}, + armor_groups = {fleshy=5}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_wood_footstep") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_wood_footstep") + end, + }) + armor:register_armor("shields:shield_enhanced_wood", { + description = S("Enhanced Wood Shield"), + inventory_image = "shields_inv_shield_enhanced_wood.png", + groups = {armor_shield=1, armor_heal=0, armor_use=2000}, + armor_groups = {fleshy=8}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=2}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_dig_metal") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_dug_metal") + end, + }) + minetest.register_craft({ + output = "shields:shield_enhanced_wood", + recipe = { + {"default:steel_ingot"}, + {"shields:shield_wood"}, + {"default:steel_ingot"}, + }, + }) + minetest.register_craft({ + type = "fuel", + recipe = "shields:shield_wood", + burntime = 8, + }) +end + +if armor.materials.cactus then + armor:register_armor("shields:shield_cactus", { + description = S("Cactus Shield"), + inventory_image = "shields_inv_shield_cactus.png", + groups = {armor_shield=1, armor_heal=0, armor_use=1000}, + armor_groups = {fleshy=5}, + damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_wood_footstep") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_wood_footstep") + end, + }) + armor:register_armor("shields:shield_enhanced_cactus", { + description = S("Enhanced Cactus Shield"), + inventory_image = "shields_inv_shield_enhanced_cactus.png", + groups = {armor_shield=1, armor_heal=0, armor_use=1000}, + armor_groups = {fleshy=8}, + damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=2}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_dig_metal") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_dug_metal") + end, + }) + minetest.register_craft({ + output = "shields:shield_enhanced_cactus", + recipe = { + {"default:steel_ingot"}, + {"shields:shield_cactus"}, + {"default:steel_ingot"}, + }, + }) + minetest.register_craft({ + type = "fuel", + recipe = "shields:shield_cactus", + burntime = 16, + }) +end + +if armor.materials.steel then + armor:register_armor("shields:shield_steel", { + description = S("Steel Shield"), + inventory_image = "shields_inv_shield_steel.png", + groups = {armor_shield=1, armor_heal=0, armor_use=800, + physics_speed=-0.03, physics_gravity=0.03}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_dig_metal") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_dug_metal") + end, + }) +end + +if armor.materials.bronze then + armor:register_armor("shields:shield_bronze", { + description = S("Bronze Shield"), + inventory_image = "shields_inv_shield_bronze.png", + groups = {armor_shield=1, armor_heal=6, armor_use=400, + physics_speed=-0.03, physics_gravity=0.03}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_dig_metal") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_dug_metal") + end, + }) +end + +if armor.materials.diamond then + armor:register_armor("shields:shield_diamond", { + description = S("Diamond Shield"), + inventory_image = "shields_inv_shield_diamond.png", + groups = {armor_shield=1, armor_heal=12, armor_use=200}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, choppy=1, level=3}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_glass_footstep") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_break_glass") + end, + }) +end + +if armor.materials.gold then + armor:register_armor("shields:shield_gold", { + description = S("Gold Shield"), + inventory_image = "shields_inv_shield_gold.png", + groups = {armor_shield=1, armor_heal=6, armor_use=300, + physics_speed=-0.04, physics_gravity=0.04}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_dig_metal") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_dug_metal") + end, + }) +end + +if armor.materials.mithril then + armor:register_armor("shields:shield_mithril", { + description = S("Mithril Shield"), + inventory_image = "shields_inv_shield_mithril.png", + groups = {armor_shield=1, armor_heal=12, armor_use=100}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, level=3}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_glass_footstep") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_break_glass") + end, + }) +end + +if armor.materials.crystal then + armor:register_armor("shields:shield_crystal", { + description = S("Crystal Shield"), + inventory_image = "shields_inv_shield_crystal.png", + groups = {armor_shield=1, armor_heal=12, armor_use=100, armor_fire=1}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, level=3}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_glass_footstep") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_break_glass") + end, + }) +end + +for k, v in pairs(armor.materials) do + minetest.register_craft({ + output = "shields:shield_"..k, + recipe = { + {v, v, v}, + {v, v, v}, + {"", v, ""}, + }, + }) +end diff --git a/3d_armor/shields/mod.conf b/3d_armor/shields/mod.conf new file mode 100644 index 0000000..9a95629 --- /dev/null +++ b/3d_armor/shields/mod.conf @@ -0,0 +1,3 @@ +name = shields +depends = default, 3d_armor +description = Adds visible shields to 3d armor. diff --git a/3d_armor/shields/textures/preview_index.txt b/3d_armor/shields/textures/preview_index.txt new file mode 100644 index 0000000..4408c61 --- /dev/null +++ b/3d_armor/shields/textures/preview_index.txt @@ -0,0 +1,11 @@ +shields/textures/shields_shield_wood.png:shield +shields/textures/shields_shield_enhanced_wood.png:shield +shields/textures/shields_shield_cactus.png:shield +shields/textures/shields_shield_enhanced_cactus.png:shield +shields/textures/shields_shield_steel.png:shield +shields/textures/shields_shield_bronze.png:shield +shields/textures/shields_shield_gold.png:shield +shields/textures/shields_shield_diamond.png:shield +shields/textures/shields_shield_mithril.png:shield +shields/textures/shields_shield_crystal.png:shield +shields/textures/shields_shield_admin.png:shield diff --git a/3d_armor/shields/textures/shields_inv_shield_admin.png b/3d_armor/shields/textures/shields_inv_shield_admin.png new file mode 100644 index 0000000..7ec86c4 Binary files /dev/null and b/3d_armor/shields/textures/shields_inv_shield_admin.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_bronze.png b/3d_armor/shields/textures/shields_inv_shield_bronze.png new file mode 100644 index 0000000..0e5c072 Binary files /dev/null and b/3d_armor/shields/textures/shields_inv_shield_bronze.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_cactus.png b/3d_armor/shields/textures/shields_inv_shield_cactus.png new file mode 100644 index 0000000..4fd5cf2 Binary files /dev/null and b/3d_armor/shields/textures/shields_inv_shield_cactus.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_crystal.png b/3d_armor/shields/textures/shields_inv_shield_crystal.png new file mode 100644 index 0000000..18e90f5 Binary files /dev/null and b/3d_armor/shields/textures/shields_inv_shield_crystal.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_diamond.png b/3d_armor/shields/textures/shields_inv_shield_diamond.png new file mode 100644 index 0000000..e172397 Binary files /dev/null and b/3d_armor/shields/textures/shields_inv_shield_diamond.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_enhanced_cactus.png b/3d_armor/shields/textures/shields_inv_shield_enhanced_cactus.png new file mode 100644 index 0000000..45cf71f Binary files /dev/null and b/3d_armor/shields/textures/shields_inv_shield_enhanced_cactus.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_enhanced_wood.png b/3d_armor/shields/textures/shields_inv_shield_enhanced_wood.png new file mode 100644 index 0000000..945f84f Binary files /dev/null and b/3d_armor/shields/textures/shields_inv_shield_enhanced_wood.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_gold.png b/3d_armor/shields/textures/shields_inv_shield_gold.png new file mode 100644 index 0000000..d8e9d6b Binary files /dev/null and b/3d_armor/shields/textures/shields_inv_shield_gold.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_mithril.png b/3d_armor/shields/textures/shields_inv_shield_mithril.png new file mode 100644 index 0000000..a9dfa06 Binary files /dev/null and b/3d_armor/shields/textures/shields_inv_shield_mithril.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_steel.png b/3d_armor/shields/textures/shields_inv_shield_steel.png new file mode 100644 index 0000000..76e0035 Binary files /dev/null and b/3d_armor/shields/textures/shields_inv_shield_steel.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_wood.png b/3d_armor/shields/textures/shields_inv_shield_wood.png new file mode 100644 index 0000000..2365086 Binary files /dev/null and b/3d_armor/shields/textures/shields_inv_shield_wood.png differ diff --git a/3d_armor/shields/textures/shields_shield_admin.png b/3d_armor/shields/textures/shields_shield_admin.png new file mode 100644 index 0000000..1259272 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_admin.png differ diff --git a/3d_armor/shields/textures/shields_shield_admin_preview.png b/3d_armor/shields/textures/shields_shield_admin_preview.png new file mode 100644 index 0000000..f37efd5 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_admin_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_bronze.png b/3d_armor/shields/textures/shields_shield_bronze.png new file mode 100644 index 0000000..e3a7ad4 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_bronze.png differ diff --git a/3d_armor/shields/textures/shields_shield_bronze_preview.png b/3d_armor/shields/textures/shields_shield_bronze_preview.png new file mode 100644 index 0000000..8450130 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_bronze_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_cactus.png b/3d_armor/shields/textures/shields_shield_cactus.png new file mode 100644 index 0000000..8c69d76 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_cactus.png differ diff --git a/3d_armor/shields/textures/shields_shield_cactus_preview.png b/3d_armor/shields/textures/shields_shield_cactus_preview.png new file mode 100644 index 0000000..ab2a531 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_cactus_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_crystal.png b/3d_armor/shields/textures/shields_shield_crystal.png new file mode 100644 index 0000000..1ee039d Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_crystal.png differ diff --git a/3d_armor/shields/textures/shields_shield_crystal_preview.png b/3d_armor/shields/textures/shields_shield_crystal_preview.png new file mode 100644 index 0000000..8a32c8b Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_crystal_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_diamond.png b/3d_armor/shields/textures/shields_shield_diamond.png new file mode 100644 index 0000000..5bbb4fc Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_diamond.png differ diff --git a/3d_armor/shields/textures/shields_shield_diamond_preview.png b/3d_armor/shields/textures/shields_shield_diamond_preview.png new file mode 100644 index 0000000..78e69e6 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_diamond_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_enhanced_cactus.png b/3d_armor/shields/textures/shields_shield_enhanced_cactus.png new file mode 100644 index 0000000..980c4f1 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_enhanced_cactus.png differ diff --git a/3d_armor/shields/textures/shields_shield_enhanced_cactus_preview.png b/3d_armor/shields/textures/shields_shield_enhanced_cactus_preview.png new file mode 100644 index 0000000..4b85f48 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_enhanced_cactus_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_enhanced_wood.png b/3d_armor/shields/textures/shields_shield_enhanced_wood.png new file mode 100644 index 0000000..f87cf65 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_enhanced_wood.png differ diff --git a/3d_armor/shields/textures/shields_shield_enhanced_wood_preview.png b/3d_armor/shields/textures/shields_shield_enhanced_wood_preview.png new file mode 100644 index 0000000..52ba7eb Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_enhanced_wood_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_gold.png b/3d_armor/shields/textures/shields_shield_gold.png new file mode 100644 index 0000000..09fa339 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_gold.png differ diff --git a/3d_armor/shields/textures/shields_shield_gold_preview.png b/3d_armor/shields/textures/shields_shield_gold_preview.png new file mode 100644 index 0000000..4337544 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_gold_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_mithril.png b/3d_armor/shields/textures/shields_shield_mithril.png new file mode 100644 index 0000000..38558c4 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_mithril.png differ diff --git a/3d_armor/shields/textures/shields_shield_mithril_preview.png b/3d_armor/shields/textures/shields_shield_mithril_preview.png new file mode 100644 index 0000000..e5ca987 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_mithril_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_steel.png b/3d_armor/shields/textures/shields_shield_steel.png new file mode 100644 index 0000000..108dffe Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_steel.png differ diff --git a/3d_armor/shields/textures/shields_shield_steel_preview.png b/3d_armor/shields/textures/shields_shield_steel_preview.png new file mode 100644 index 0000000..301a149 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_steel_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_wood.png b/3d_armor/shields/textures/shields_shield_wood.png new file mode 100644 index 0000000..8cc5b85 Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_wood.png differ diff --git a/3d_armor/shields/textures/shields_shield_wood_preview.png b/3d_armor/shields/textures/shields_shield_wood_preview.png new file mode 100644 index 0000000..c22465e Binary files /dev/null and b/3d_armor/shields/textures/shields_shield_wood_preview.png differ diff --git a/3d_armor/wieldview/LICENSE.txt b/3d_armor/wieldview/LICENSE.txt new file mode 100644 index 0000000..e1552c0 --- /dev/null +++ b/3d_armor/wieldview/LICENSE.txt @@ -0,0 +1,18 @@ +[mod] visible wielded items [wieldview] +======================================= + +Copyright (C) 2012-2019 stujones11, Stuart Jones + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/3d_armor/wieldview/README.txt b/3d_armor/wieldview/README.txt new file mode 100644 index 0000000..ffa5ef0 --- /dev/null +++ b/3d_armor/wieldview/README.txt @@ -0,0 +1,23 @@ +[mod] visible wielded items [wieldview] +======================================= + +Depends on: 3d_armor + +Makes hand wielded items visible to other players. + +default settings: [minetest.conf] + +# Set number of seconds between visible wielded item updates. +wieldview_update_time = 2 + +# Show nodes as tiles, disabled by default +wieldview_node_tiles = false + + +Info for modders +################ + +Wield image transformation: To apply a simple transformation to the item in +hand, add the group “wieldview_transform” to the item definition. The group +rating equals one of the numbers used for the [transform texture modifier +of the Lua API. diff --git a/3d_armor/wieldview/depends.txt b/3d_armor/wieldview/depends.txt new file mode 100644 index 0000000..b6cac21 --- /dev/null +++ b/3d_armor/wieldview/depends.txt @@ -0,0 +1 @@ +3d_armor diff --git a/3d_armor/wieldview/description.txt b/3d_armor/wieldview/description.txt new file mode 100644 index 0000000..0d51ad9 --- /dev/null +++ b/3d_armor/wieldview/description.txt @@ -0,0 +1 @@ +Makes hand wielded items visible to other players. diff --git a/3d_armor/wieldview/init.lua b/3d_armor/wieldview/init.lua new file mode 100644 index 0000000..7f68732 --- /dev/null +++ b/3d_armor/wieldview/init.lua @@ -0,0 +1,85 @@ +local time = 0 +local update_time = tonumber(minetest.settings:get("wieldview_update_time")) +if not update_time then + update_time = 2 + minetest.settings:set("wieldview_update_time", tostring(update_time)) +end +local node_tiles = minetest.settings:get_bool("wieldview_node_tiles") +if not node_tiles then + node_tiles = false + minetest.settings:set("wieldview_node_tiles", "false") +end + +wieldview = { + wielded_item = {}, + transform = {}, +} + +dofile(minetest.get_modpath(minetest.get_current_modname()).."/transform.lua") + +wieldview.get_item_texture = function(self, item) + local texture = "3d_armor_trans.png" + if item ~= "" then + if minetest.registered_items[item] then + if minetest.registered_items[item].inventory_image ~= "" then + texture = minetest.registered_items[item].inventory_image + elseif node_tiles == true and minetest.registered_items[item].tiles + and type(minetest.registered_items[item].tiles[1]) == "string" + and minetest.registered_items[item].tiles[1] ~= "" then + texture = minetest.inventorycube(minetest.registered_items[item].tiles[1]) + end + end + -- Get item image transformation, first from group, then from transform.lua + local transform = minetest.get_item_group(item, "wieldview_transform") + if transform == 0 then + transform = wieldview.transform[item] + end + if transform then + -- This actually works with groups ratings because transform1, transform2, etc. + -- have meaning and transform0 is used for identidy, so it can be ignored + texture = texture.."^[transform"..tostring(transform) + end + end + return texture +end + +wieldview.update_wielded_item = function(self, player) + if not player then + return + end + local name = player:get_player_name() + local stack = player:get_wielded_item() + local item = stack:get_name() + if not item then + return + end + if self.wielded_item[name] then + if self.wielded_item[name] == item then + return + end + armor.textures[name].wielditem = self:get_item_texture(item) + armor:update_player_visuals(player) + end + self.wielded_item[name] = item +end + +minetest.register_on_joinplayer(function(player) + local name = player:get_player_name() + wieldview.wielded_item[name] = "" + minetest.after(0, function() + local pplayer = minetest.get_player_by_name(name) + if player then + wieldview:update_wielded_item(pplayer) + end + end) +end) + +minetest.register_globalstep(function(dtime) + time = time + dtime + if time > update_time then + for _,player in ipairs(minetest.get_connected_players()) do + wieldview:update_wielded_item(player) + end + time = 0 + end +end) diff --git a/3d_armor/wieldview/mod.conf b/3d_armor/wieldview/mod.conf new file mode 100644 index 0000000..c5f4812 --- /dev/null +++ b/3d_armor/wieldview/mod.conf @@ -0,0 +1,3 @@ +name = wieldview +depends = 3d_armor +description = Makes hand wielded items visible to other players. diff --git a/3d_armor/wieldview/transform.lua b/3d_armor/wieldview/transform.lua new file mode 100644 index 0000000..4d5133e --- /dev/null +++ b/3d_armor/wieldview/transform.lua @@ -0,0 +1,24 @@ +-- Wielded Item Transformations - http://dev.minetest.net/texture + +wieldview.transform = { + ["default:torch"]="R270", + ["default:sapling"]="R270", + ["flowers:dandelion_white"]="R270", + ["flowers:dandelion_yellow"]="R270", + ["flowers:geranium"]="R270", + ["flowers:rose"]="R270", + ["flowers:tulip"]="R270", + ["flowers:viola"]="R270", + ["bucket:bucket_empty"]="R270", + ["bucket:bucket_water"]="R270", + ["bucket:bucket_lava"]="R270", + ["screwdriver:screwdriver"]="R270", + ["screwdriver:screwdriver1"]="R270", + ["screwdriver:screwdriver2"]="R270", + ["screwdriver:screwdriver3"]="R270", + ["screwdriver:screwdriver4"]="R270", + ["vessels:glass_bottle"]="R270", + ["vessels:drinking_glass"]="R270", + ["vessels:steel_bottle"]="R270", +} + diff --git a/README.md b/README.md index 6982a3e..15ebf29 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ All mods have the own README.txt. For further information please consult these f This modpack includes: - techage: The main mod +- ta4_jetpack: A Jetpack for techage with hydrogen as fuel and TA4 recipe - autobahn: Street blocks and slopes with stripes for faster traveling (the only need of bitumen from techage) - compost: The garden soil is needed for the TA4 LED Grow Light based flower bed - signs_bot: For many automation tasks in TA3/TA4 like farming, mining, and item transportation @@ -14,6 +15,7 @@ This modpack includes: - towercrane: Simplifies the building of large techage plants - basic_materials: Needed items for many recipes - stamina: The "hunger" mod from "minetest-mods" +- 3d_armor: Visible player armor & wielded items for minetest (needed for ta4_jetpack) - doc: Ingame documentation mod, used for minecart and signs_bot - unified_inventory: Player's inventory with crafting guide, bags, and more. - tubelib2: Necessary library @@ -41,13 +43,17 @@ Required: Minetest Game ### History -#### 2020-06-23 +#### 2020-06-29 Updates (see local readme files): -- mod stamina added -- autobahn, towercrane and stamina now use a commen player physics lockout mechanism -- signs_bot v1.03 with bugfixes -- techage manual expanded +- autobahn, towercrane, ta4_jetpack, 3d_armor, and stamina now use a commen player physics lockout mechanism +- the new mod ta4_jetpack added +- mod stamina added (adapted to the player physics lockout mechanism) +- mod 3d_armor added (needed for ta4_jetpack, adapted to the player physics lockout mechanism) +- minecart v1.07 with many improvements +- techage v0.14 with many improvements +- hyperloop v2.06 update +- autobahn update #### 2020-06-21 diff --git a/autobahn/init.lua b/autobahn/init.lua index e7efdba..3dfa3a6 100644 --- a/autobahn/init.lua +++ b/autobahn/init.lua @@ -284,7 +284,7 @@ minetest.register_craftitem("autobahn:stripes", { if minetest.global_exists("techage") then minetest.register_craft({ - output = "autobahn:node1 9", + output = "autobahn:node1 12", recipe = { {"techage:sieved_basalt_gravel", "techage:sieved_basalt_gravel", "techage:sieved_basalt_gravel"}, {"techage:sieved_basalt_gravel", "techage:ta3_barrel_bitumen", "techage:sieved_basalt_gravel"}, @@ -293,7 +293,7 @@ if minetest.global_exists("techage") then replacements = {{"techage:ta3_barrel_bitumen", "techage:ta3_barrel_empty"}}, }) minetest.register_craft({ - output = "autobahn:node1 9", + output = "autobahn:node1 12", recipe = { {"techage:sieved_gravel", "techage:sieved_gravel", "techage:sieved_gravel"}, {"techage:sieved_gravel", "techage:ta3_barrel_bitumen", "techage:sieved_gravel"}, @@ -301,7 +301,8 @@ if minetest.global_exists("techage") then }, replacements = {{"techage:ta3_barrel_bitumen", "techage:ta3_barrel_empty"}}, }) -elseif minetest.global_exists("moreblocks") then +end +if minetest.global_exists("moreblocks") then minetest.register_craft({ output = "autobahn:node1 4", recipe = { @@ -309,6 +310,26 @@ elseif minetest.global_exists("moreblocks") then {"default:cobble", "default:cobble"}, }, }) +else + minetest.register_craft({ + output = "autobahn:node1 4", + recipe = { + {"autobahn:tar", "autobahn:tar"}, + {"default:cobble", "default:cobble"}, + }, + }) + minetest.register_craft({ + type = "cooking", + output = "autobahn:tar", + recipe = "default:pine_tree", + }) + minetest.register_node("autobahn:tar", { + description = "Tar", + tiles = {"autobahn1.png^[colorize:#000000:80"}, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_stone_defaults(), + }) end minetest.register_craft({ diff --git a/hyperloop/recipes.lua b/hyperloop/recipes.lua index a1afb80..b0b1ebf 100644 --- a/hyperloop/recipes.lua +++ b/hyperloop/recipes.lua @@ -26,7 +26,7 @@ if minetest.global_exists("techage") then minetest.register_craft({ output = "hyperloop:hypersteel_ingot 4", recipe = { - {"techage:aluminum", "default:tin_ingot"}, + {"default:steel_ingot", "default:tin_ingot"}, {"techage:aluminum", "dye:cyan"}, }, }) diff --git a/minecart/README.md b/minecart/README.md index 0606cf5..50e6ffe 100644 --- a/minecart/README.md +++ b/minecart/README.md @@ -114,4 +114,5 @@ History 2020-03-28 v1.04 cart unloading bugfix 2020-05-14 v1.05 API changed to be able to register carts 2020-06-14 v1.06 API changed and chat command added +2020-06-27 v1.07 Route storage and cart command bugfixes diff --git a/minecart/init.lua b/minecart/init.lua index a158230..37e3a9d 100644 --- a/minecart/init.lua +++ b/minecart/init.lua @@ -13,7 +13,7 @@ minecart = {} -- Version for compatibility checks, see readme.md/history -minecart.version = 1.06 +minecart.version = 1.07 minecart.hopper_enabled = minetest.settings:get_bool("minecart_hopper_enabled") ~= false diff --git a/minecart/monitoring.lua b/minecart/monitoring.lua index c433da0..34fb726 100644 --- a/minecart/monitoring.lua +++ b/minecart/monitoring.lua @@ -14,7 +14,7 @@ -- 1) Entity IDs are volatile. For each server restart all carts get new IDs. -- 2) Monitoring is performed for entities only. Stopped carts in form of -- real nodes need no monitoring. --- 3) But nodes at startions have to call 'node_at_station' to be "visible" +-- 3) But nodes at stations have to call 'node_at_station' to be "visible" -- for the chat commands @@ -81,6 +81,7 @@ end function minecart.remove_from_monitoring(myID) if myID then CartsOnRail[myID] = nil + minecart.store_carts() end end @@ -95,12 +96,14 @@ function minecart.start_cart(pos, myID) if item and item.stopped then item.stopped = false item.start_pos = pos + item.start_time = nil -- cart started from a buffer? local start_key = lib.get_route_key(pos) if start_key then item.start_time = minetest.get_gametime() item.start_key = start_key item.junctions = minecart.get_route(start_key).junctions + minecart.store_carts() return true end end @@ -115,6 +118,7 @@ function minecart.stop_cart(pos, myID) item.start_pos = nil item.junctions = nil item.stopped = true + minecart.store_carts() return true end return false @@ -124,7 +128,7 @@ local function monitoring() local to_be_added = {} for key, item in pairs(CartsOnRail) do local entity = minetest.luaentities[key] - --print("Cart:", key, item.owner, item.myID, item.userID, item.stopped) + --print("Cart:", key, item.owner, item.userID, item.stopped) if entity then -- cart entity running local pos = entity.object:get_pos() local vel = entity.object:get_velocity() @@ -147,13 +151,20 @@ local function monitoring() end item.last_pos, item.last_vel = pos, vel else + -- should never happen + minetest.log("error", "[minecart] Cart of owner "..(item.owner or "nil").." got lost") CartsOnRail[key] = nil end end end -- table maintenance + local is_changed = false for key,val in pairs(to_be_added) do CartsOnRail[key] = val + is_changed = true + end + if is_changed then + minecart.store_carts() end minetest.after(1, monitoring) end @@ -208,7 +219,7 @@ minetest.register_chatcommand("mycart", { end -- Check all running carts local state, cart_pos = get_cart_state(name, userID) - if state then + if state and cart_pos then local pos = get_cart_pos(query_pos, cart_pos) if type(pos) == "string" then return true, "Cart #"..userID.." stopped at "..pos.." " diff --git a/minecart/recording.lua b/minecart/recording.lua index 4034ff9..a5d5996 100644 --- a/minecart/recording.lua +++ b/minecart/recording.lua @@ -51,7 +51,7 @@ end function minecart.stop_recording(self, pos, vel, puncher) local dest_pos = lib.get_route_key(pos, self.driver) if dest_pos then - if self.start_key ~= dest_pos then + if self.start_key and self.start_key ~= dest_pos then local route = { waypoints = self.waypoints, dest_pos = dest_pos, diff --git a/minecart/storage.lua b/minecart/storage.lua index dc2016a..34d3f02 100644 --- a/minecart/storage.lua +++ b/minecart/storage.lua @@ -16,39 +16,31 @@ local P2S = function(pos) if pos then return minetest.pos_to_string(pos) end end local S2P = minetest.string_to_pos local S = minecart.S -local DAYS_VALID = (30 * 72) -- 30 real days - local storage = minetest.get_mod_storage() -local function data_maintenance() - minetest.log("info", "[MOD] minecart maintenance") - local day_count = minetest.get_day_count() - local tbl = storage:to_table() - for key,s in pairs(tbl.fields) do - local route = minetest.deserialize(s) - if not route.waypoints or not route.best_before or route.best_before < day_count then - storage:set_string(key, "") - else - minetest.log("info", "[minecart] Route: start="..key.." length="..#(route.waypoints)) - end - end -end -minetest.after(1, data_maintenance) - - +------------------------------------------------------------------------------- -- Store data of running carts +------------------------------------------------------------------------------- minecart.CartsOnRail = {} -for key,val in pairs(minetest.deserialize(storage:get_string("CartsOnRail")) or {}) do - -- use invalid keys to force the cart spawning - minecart.CartsOnRail[-key] = val -end +minetest.register_on_mods_loaded(function() + for key,val in pairs(minetest.deserialize(storage:get_string("CartsOnRail")) or {}) do + -- use invalid keys to force the cart spawning + minecart.CartsOnRail[-key] = val + end +end) minetest.register_on_shutdown(function() - data_maintenance() storage:set_string("CartsOnRail", minetest.serialize(minecart.CartsOnRail)) end) +function minecart.store_carts() + storage:set_string("CartsOnRail", minetest.serialize(minecart.CartsOnRail)) +end + +------------------------------------------------------------------------------- +-- Store routes +------------------------------------------------------------------------------- -- All positions as "pos_to_string" string --Routes = { -- start_pos = { @@ -58,7 +50,6 @@ end) -- {spos = num}, -- {spos = num}, -- }, --- best_before = num -- }, -- start_pos = {...}, --} @@ -66,20 +57,51 @@ local Routes = {} local NEW_ROUTE = {waypoints = {}, junctions = {}} function minecart.store_route(key, route) - Routes[key] = table.copy(route) - Routes[key].best_before = minetest.get_day_count() + DAYS_VALID - storage:set_string(key, minetest.serialize(Routes[key])) + if key and route then + Routes[key] = route + local meta = M(S2P(key)) + if meta then + meta:set_string("route", minetest.serialize(route)) + return true + end + end + return false end function minecart.get_route(key) - Routes[key] = Routes[key] or minetest.deserialize(storage:get_string(key)) or NEW_ROUTE - Routes[key].best_before = minetest.get_day_count() + DAYS_VALID + if not Routes[key] then + local s = M(S2P(key)):get_string("route") + if s ~= "" then + Routes[key] = minetest.deserialize(s) or NEW_ROUTE + else + Routes[key] = NEW_ROUTE + end + end return Routes[key] end function minecart.del_route(key) Routes[key] = nil -- remove from memory - storage:set_string(key, "") -- and from storage + M(S2P(key)):set_string("route", "") -- and as metadata end +------------------------------------------------------------------------------- +-- Convert data to v2 +------------------------------------------------------------------------------- +minetest.after(5, function() + local tbl = storage:to_table() + for key,s in pairs(tbl.fields) do + if key ~= "CartsOnRail" then + local route = minetest.deserialize(s) + if route.waypoints and route.junctions then + if minecart.store_route(key, route) then + storage:set_string(key, "") + end + else + storage:set_string(key, "") + end + end + end +end) + diff --git a/ta4_jetpack/LICENSE.txt b/ta4_jetpack/LICENSE.txt new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/ta4_jetpack/LICENSE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/ta4_jetpack/README.md b/ta4_jetpack/README.md new file mode 100644 index 0000000..ecfc630 --- /dev/null +++ b/ta4_jetpack/README.md @@ -0,0 +1,46 @@ +# TA4 Jetpack [ta4_jetpack] + +**A Jetpack for techage with hydrogen as fuel and TA4 recipe** + + +![screenshot](https://github.com/joe7575/ta4_jetpack/blob/master/screenshot.png) + +The Jetpack is inspired by the jetpack from spirit689 (https://github.com/spirit689/jetpack) +and by the historical game Lunar Lander. + +Instructions: +- Craft TA4 Jetpack, Jetpack Controller and Training Mat +- Use the armor extension (3d_armor) of the player menu to strap the Jetpack on your back +- You can refuel the jetpack by left-clicking with the controller on a hydrogen tank +- Turn the controller on by right-click and check the fuel tank level (the small colored bar below the controller icon) +- Use the space bar to activate the Jetpack and the WASD keys to control the direction +- Before your first flight you should do some training starts and landings on the Training Mat + (The Jetpack is a bit stubborn, it takes some practice to keep the JetPack in the air) + +Important to know: +- 12 units of hydrogen are sufficient for a flight of 6 minutes +- Maximum 5 items stacks in your inventory are allowed including the controller. + Otherwise you would be too heavy :-) +- The Jetpack also wears out and can be used for approximately 10 flights +- Always hold the controller tight during the flight, otherwise it will switch off :) + + +### License +Copyright (C)2020 Joachim Stolberg + +Code: Licensed under the GNU GPL version 3 or later. See LICENSE.txt + +Textures: CC BY-SA 3.0 + +Sounds: +- "ta4_jetpack_on.ogg" Copyright by lextrack CC0 1.0 (https://freesound.org/s/346323/) +- "ta4_jetpack_alarm.ogg" Copyright by Tim_Verberne CC0 1.0 (https://freesound.org/s/514079/) + + +### Dependencies +Required: techage, default, 3d_armor + + +### History +- 2019-06-23 V0.01 * First version + diff --git a/ta4_jetpack/i18n.py b/ta4_jetpack/i18n.py new file mode 100755 index 0000000..e747193 --- /dev/null +++ b/ta4_jetpack/i18n.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Script to generate the template file and update the translation files. +# +# Copyright (C) 2019 Joachim Stolberg +# LGPLv2.1+ +# +# Copy the script into the mod root folder and adapt the last code lines to you needs. + +from __future__ import print_function +import os, fnmatch, re, shutil + +pattern_lua = re.compile(r'[ \.=^\t]S\("(.+?)"\)', re.DOTALL) +pattern_tr = re.compile(r'(.+?[^@])=(.+)') + +def gen_template(templ_file, lkeyStrings): + lOut = [] + lkeyStrings.sort() + for s in lkeyStrings: + lOut.append("%s=" % s) + open(templ_file, "wt").write("\n".join(lOut)) + +def read_lua_file_strings(lua_file): + lOut = [] + text = open(lua_file).read() + for s in pattern_lua.findall(text): + s = re.sub(r'"\.\.\s+"', "", s) + s = re.sub("@[^@=n]", "@@", s) + s = s.replace("\n", "@n") + s = s.replace("\\n", "@n") + s = s.replace("=", "@=") + lOut.append(s) + return lOut + +def inport_tr_file(tr_file): + dOut = {} + if os.path.exists(tr_file): + for line in open(tr_file, "r").readlines(): + s = line.strip() + if s == "" or s[0] == "#": + continue + match = pattern_tr.match(s) + if match: + dOut[match.group(1)] = match.group(2) + return dOut + +def generate_template(templ_file): + lOut = [] + for root, dirs, files in os.walk('./'): + for name in files: + if fnmatch.fnmatch(name, "*.lua"): + fname = os.path.join(root, name) + found = read_lua_file_strings(fname) + print(fname, len(found)) + lOut.extend(found) + lOut = list(set(lOut)) + lOut.sort() + gen_template(templ_file, lOut) + return lOut + +def update_tr_file(lNew, mod_name, tr_file): + lOut = ["# textdomain: %s\n" % mod_name] + if os.path.exists(tr_file): + shutil.copyfile(tr_file, tr_file+".old") + dOld = inport_tr_file(tr_file) + for key in lNew: + val = dOld.get(key, "") + lOut.append("%s=%s" % (key, val)) + lOut.append("##### not used anymore #####") + for key in dOld: + if key not in lNew: + lOut.append("%s=%s" % (key, dOld[key])) + open(tr_file, "w").write("\n".join(lOut)) + +data = generate_template("./locale/template.txt") +update_tr_file(data, "ta4_jetpack", "./locale/ta4_jetpack.de.tr") +print("Done.\n") + + diff --git a/ta4_jetpack/init.lua b/ta4_jetpack/init.lua new file mode 100644 index 0000000..dd81807 --- /dev/null +++ b/ta4_jetpack/init.lua @@ -0,0 +1,527 @@ +--[[ + + TA4_Jetpack + =========== + + Copyright (C) 2020 Joachim Stolberg + + GPL v3 + See LICENSE.txt for more information + +]]-- + +-- Load support for I18n. +local S = minetest.get_translator("ta4_jetpack") + +local Players = {} +local Jetpacks = {} + +local MAX_HEIGHT = tonumber(minetest.settings:get("ta4_jetpack_max_height")) or 500 +local MAX_VSPEED = tonumber(minetest.settings:get("ta4_jetpack_max_vertical_speed")) or 20 +local MAX_HSPEED = (tonumber(minetest.settings:get("ta4_jetpack_max_horizontal_speed")) or 12) / 4 +local MAX_NUM_INV_ITEMS = tonumber(minetest.settings:get("ta4_jetpack_max_num_inv_items")) or 5 + +-- Flight time maximum 6 min or 360 s or 3600 steps. +-- 12 units hydrogen for 3600 steps means 0.0033 units hydrogen / step. +local MAX_FUEL = 12 -- hydrogen units +local RESERVE_LVL = 2 -- fuel reserve +local FUEL_UNIT = 2 -- tank units per click +local WEAR_CYCLE = 10 -- check wear every 10 sec +local STEPS_TO_FUEL = 0.0033 + +local WEAR_VALUE = 180 -- roughly 10 flys, 6 min each + +local function store_player_physics(player) + local meta = player:get_meta() + -- Check access conflicts with other mods + if meta:get_int("player_physics_locked") == 0 then + local physics = player:get_physics_override() + meta:set_int("player_physics_locked", 1) + meta:set_int("ta4_jetpack_normal_player_speed", physics.speed) + meta:set_int("ta4_jetpack_normal_player_gravity", physics.gravity) + return true + end + return false +end + +local function restore_player_physics(player) + local meta = player:get_meta() + local physics = player:get_physics_override() + physics.speed = meta:get_int("ta4_jetpack_normal_player_speed") + physics.gravity = meta:get_int("ta4_jetpack_normal_player_gravity") + meta:set_int("player_physics_locked", 0) + player:set_physics_override(physics) +end + +local function turn_jetpack_off(player) + local name = player:get_player_name() + restore_player_physics(player) + if Players[name] and Players[name].snd_hdl then + minetest.sound_stop(Players[name].snd_hdl) + end + if Players[name] and Players[name].alarm_snd_hdl then + minetest.sound_stop(Players[name].alarm_snd_hdl) + end + --Jetpacks[name] = nil + Players[name] = nil +end + +local function get_inv_controller_index(player) + local inv = player:get_inventory() + for idx, item in ipairs(inv:get_list("main")) do + if item:get_name() == "ta4_jetpack:controller_on" then + return idx + end + end +end + +local function turn_inv_controller_off(player) + local idx = get_inv_controller_index(player) + if idx then + local inv = player:get_inventory() + inv:set_stack("main", idx, ItemStack("ta4_jetpack:controller_off")) + end +end + +-- Fuel is stored as metadata (0..100) in the jetpack item located at the armor inventory +local function get_fuel_value(name) + if Jetpacks[name] and Jetpacks[name].index then + local index = Jetpacks[name].index + local inv = minetest.get_inventory({type = "detached", name = name.."_armor"}) + local stack = inv:get_stack("armor", index) + local meta = stack:get_meta() + return meta:get_float("fuel") + end + return 0 +end + +local function set_fuel_value(name, value) + if Jetpacks[name] and Jetpacks[name].index then + local index = Jetpacks[name].index + local inv = minetest.get_inventory({type = "detached", name = name.."_armor"}) + local stack = inv:get_stack("armor", index) + local meta = stack:get_meta() + meta:set_float("fuel", value) + inv:set_stack("armor", index, stack) + end +end + +local function subtract_fuel_value(name, value) + if Jetpacks[name] and Jetpacks[name].index then + local index = Jetpacks[name].index + local inv = minetest.get_inventory({type = "detached", name = name.."_armor"}) + local stack = inv:get_stack("armor", index) + local meta = stack:get_meta() + local amount = meta:get_float("fuel") + if amount >= value then + meta:set_float("fuel", amount - value) + inv:set_stack("armor", index, stack) + return amount - value + end + end + return 0 +end + +local function fuel_value_to_wearout(value) + return math.floor(65533 - (value / MAX_FUEL * 65530)) +end + +local function update_controller_fuel_gauge(player, index, value) + local inv = player:get_inventory() + if inv and index then + local stack = inv:get_stack("main", index) + if stack:get_name() == "ta4_jetpack:controller_on" then + stack:set_wear(fuel_value_to_wearout(value)) + inv:set_stack("main", index, stack) + end + end +end + +local function check_player_load(player) + local inv = player:get_inventory() + local meta = player:get_meta() + local bags_meta = meta:get_string("unified_inventory:bags") + if bags_meta then + if next(minetest.deserialize(bags_meta) or {}) then + return S("check your bags!") + end + end + for _, stack in ipairs(inv:get_list("craft") or {}) do + if not stack:is_empty() then + return S("check your carfting menu!") + end + end + local count = 0 + for _, stack in ipairs(inv:get_list("main") or {}) do + count = count + (stack:is_empty() and 0 or 1) + if count > MAX_NUM_INV_ITEMS then + return S("check your inventory!") + end + end +end + +local cycle_time = 0 +minetest.register_globalstep(function(dtime) + cycle_time = cycle_time + dtime + if cycle_time < 0.1 then return end + cycle_time = cycle_time - 0.1 + + for name, def in pairs(Players) do + local player = minetest.get_player_by_name(name) + local fire = player:get_player_control().jump + local ctrl = player:get_player_control_bits() + local pos = player:getpos() + local vel = player:get_player_velocity() + local item = player:get_wielded_item() + + -- The controller as wielded item prevents the player from using other blocks + if item:get_name() ~= "ta4_jetpack:controller_on" then + -- You shouldn't have done that :) + turn_jetpack_off(player) + turn_inv_controller_off(player) + else + -- handle fire button + if fire ~= def.old_fire then + def.old_fire = fire + if fire then + def.gravity = -0.5 + def.speed = MAX_HSPEED + def.correction = true + else + def.gravity = 0.7 + def.speed = MAX_HSPEED + def.correction = true + end + end + + -- handle drive sound + if ctrl ~= def.old_ctrl then + def.old_ctrl = ctrl + if ctrl > 0 and ctrl ~= 256 then + if not def.snd_hdl then + def.snd_hdl = minetest.sound_play("ta4_jetpack", { + max_hear_distance = 16, + gain = 1, + object = player, + loop = true + }) + end + else + if def.snd_hdl then + minetest.sound_stop(def.snd_hdl) + def.snd_hdl = nil + end + end + end + + -- handle smoke and use + if ctrl > 0 then + minetest.add_particle({ + pos = pos, + vel = {x = vel.x, y = vel.y - 10, z = vel.z}, + expirationtime = 1, + size = 5, + vertical = false, + texture = "ta4_jetpack_smoke.png", + }) + def.used = (def.used or 0) + 1 + end + + -- control max height + if pos.y > MAX_HEIGHT then + pos.y = MAX_HEIGHT - MAX_HEIGHT/10 + player:setpos(pos) + end + + -- control max speed + if vel.y > MAX_VSPEED then + player:set_physics_override({gravity = 1, speed = def.speed}) + def.correction = true + elseif vel.y < (-2 * MAX_VSPEED) then + player:set_physics_override({gravity = -1, speed = def.speed}) + def.correction = true + elseif def.correction then + player:set_physics_override({gravity = def.gravity, speed = def.speed}) + def.correction = false + end + end + end +end) + +local function debug_out(name) + local index = Jetpacks[name].index + local inv = minetest.get_inventory({type = "detached", name = name.."_armor"}) + local stack = inv:get_stack("armor", index) + print("used = "..(def.used or 0)..", value = "..get_fuel_value(name)..", wear = "..stack:get_wear()) +end + +-- Called cyclic to maintain wear out and fuel gauge +local function jetpack_wearout() + for name, def in pairs(Players) do + local player = minetest.get_player_by_name(name) + if player and Jetpacks[name] then + -- debug_out(name) + if def.used then + local value = subtract_fuel_value(name, def.used * STEPS_TO_FUEL) + def.used = 0 + def.controller_index = def.controller_index or get_inv_controller_index(player) + update_controller_fuel_gauge(player, def.controller_index, value) + if value == 0 then + ---- Fly is finished :) + turn_jetpack_off(player) + turn_inv_controller_off(player) + elseif value < RESERVE_LVL then + def.alarm_snd_hdl = minetest.sound_play("ta4_jetpack_alarm", { + max_hear_distance = 16, + gain = 1, + object = player, + }) + end + -- Handle the jetpack wear out + local index = Jetpacks[name] and Jetpacks[name].index or 1 + local inv = minetest.get_inventory({type = "detached", name = name.."_armor"}) + local stack = inv:get_stack("armor", index) + armor:damage(player, index, stack, WEAR_VALUE) + if stack:get_wear() > (65535 - WEAR_VALUE * 4) then + def.alarm_snd_hdl = minetest.sound_play("ta4_jetpack_alarm", { + max_hear_distance = 16, + gain = 1, + object = player, + }) + end + else + local value = get_fuel_value(name) + if value < 4 then + def.alarm_snd_hdl = minetest.sound_play("ta4_jetpack_alarm", { + max_hear_distance = 16, + gain = 1, + object = player, + }) + end + end + end + end + minetest.after(WEAR_CYCLE, jetpack_wearout) +end + +minetest.after(WEAR_CYCLE, jetpack_wearout) + +local function load_fuel(itemstack, user, pointed_thing) + local pos = pointed_thing.under + if pos then + local name = user:get_player_name() + -- check jetpack + if not Jetpacks[name] then + minetest.chat_send_player(name, S("[Jetpack] You don't have your jetpack on your back!")) + return itemstack + end + if techage.liquid.srv_peek(pos, 5) == "techage:hydrogen" then + local value = get_fuel_value(name) + local newvalue + + if user:get_player_control().sneak then -- back to tank? + local amount = math.min(value, FUEL_UNIT) + local rest = techage.liquid.srv_put(pos, 5, "techage:hydrogen", amount) + newvalue = value - amount + rest + else + local amount = math.min(FUEL_UNIT, MAX_FUEL - value) + local taken = techage.liquid.srv_take(pos, 5, "techage:hydrogen", amount) + newvalue = value + taken + end + set_fuel_value(name, newvalue) + end + end + return itemstack +end + + +local function turn_controller_on_off(itemstack, user) + local name = user:get_player_name() + if Players[name] then -- turn off + turn_jetpack_off(user) + itemstack = ItemStack("ta4_jetpack:controller_off 1 0") + else + -- check jetpack + if not Jetpacks[name] then + minetest.chat_send_player(name, S("[Jetpack] You don't have your jetpack on your back!")) + return itemstack + end + -- check inventory load + local res = check_player_load(user) + if res then + minetest.chat_send_player(name, S("[Jetpack] You are too heavy: ")..res) + return itemstack + end + -- check fuel + local value = get_fuel_value(name) + if value == 0 then + minetest.chat_send_player(name, S("[Jetpack] Your tank is empty!")) + minetest.chat_send_player(name, S("Use the controller (left click) to fill the tank with hydrogen")) + return itemstack + end + -- start the jetpack + if store_player_physics(user) then + Players[name] = {gravity = 1, speed = 1} + minetest.sound_play("ta4_jetpack_on", { + max_hear_distance = 16, + gain = 1, + object = user, + }) + -- update fuel gauge + itemstack = ItemStack("ta4_jetpack:controller_on") + itemstack:set_wear(fuel_value_to_wearout(value)) + end + end + return itemstack +end + +minetest.register_tool("ta4_jetpack:controller_on", { + description = S("TA4 Jetpack Controller On"), + inventory_image = "ta4_jetpack_controller_inv.png", + wield_image = "ta4_jetpack_controller_inv.png", + groups = {cracky = 1, wieldview_transform = 1, not_in_creative_inventory = 1}, + on_use = load_fuel, + on_secondary_use = turn_controller_on_off, + on_place = turn_controller_on_off, + -- Prevent dropping a running controller + on_drop = function(itemstack) return itemstack end, + node_placement_prediction = "", + stack_max = 1, +}) + +minetest.register_tool("ta4_jetpack:controller_off", { + description = S("TA4 Jetpack Controller Off"), + inventory_image = "ta4_jetpack_controller_off_inv.png", + wield_image = "ta4_jetpack_controller_off_inv.png", + groups = {cracky = 1, wieldview_transform = 1}, + on_use = load_fuel, + on_secondary_use = turn_controller_on_off, + on_place = turn_controller_on_off, + node_placement_prediction = "", + stack_max = 1, +}) + +armor:register_armor("ta4_jetpack:jetpack", { + description = S("TA4 Jetpack"), + texture = "ta4_jetpack_jetpack.png", + inventory_image = "ta4_jetpack_jetpack_inv.png", + groups = {armor_torso=1, armor_heal=0, armor_use=100}, + on_equip = function(player, index, stack) + local name = player:get_player_name() + Jetpacks[name] = {index = index} + Players[name] = nil + end, + on_unequip = function(player, index, stack) + turn_jetpack_off(player) + turn_inv_controller_off(player) + local name = player:get_player_name() + Jetpacks[name] = nil + end, + on_destroy = function(player, index, stack) + turn_jetpack_off(player) + turn_inv_controller_off(player) + local name = player:get_player_name() + Jetpacks[name] = nil + end +}) + +-- For some reason, prevent to move/put/take a running controller +minetest.register_allow_player_inventory_action(function(player, action, inventory, inventory_info) + if inventory_info.stack and inventory_info.stack:get_name() == "ta4_jetpack:controller_on" then + return 0 + end +end) + +local function reset_player(player) + local name = player:get_player_name() + + if Players[name] then + -- Turn Jetpack off + Players[name] = nil + Jetpacks[name] = nil + turn_inv_controller_off(player) + + restore_player_physics(player) + + -- Determine the ground below the player for the next respawn + local pos = vector.round(player:get_pos()) + local res, pos1 = minetest.line_of_sight(pos, {x = pos.x, y = pos.y - MAX_HEIGHT, z = pos.z}) + if not res then + local meta = player:get_meta() + meta:set_string("ta4_jetpack_startpos", + minetest.pos_to_string({x = pos1.x, y = pos1.y + 2, z = pos1.z})) + end + end +end + +minetest.register_on_leaveplayer(function(player) + reset_player(player) +end) + +minetest.register_on_shutdown(function() + for name, def in pairs(Players) do + local player = minetest.get_player_by_name(name) + reset_player(player) + end +end) + +minetest.register_on_joinplayer(function(player) + -- teleport player to the ground position + local meta = player:get_meta() + local s = meta:get_string("ta4_jetpack_startpos") + + if s ~= "" then + meta:set_string("ta4_jetpack_startpos", "") + local pos = minetest.string_to_pos(s) + player:set_pos(pos) + end + meta:set_int("player_physics_under_control", 0) +end) + +minetest.register_node("ta4_jetpack:trainingmat", { + description = S("Jetpack Training Mat"), + tiles = { + "ta4_jetpack_mat_top.png", + "ta4_jetpack_mat_top.png", + "ta4_jetpack_mat_side.png" + }, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-8/16, -8/16, -8/16, 8/16, -2/16, 8/16}, + }, + }, + walkable = true, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + groups = {cracky = 3, oddly_breakable_by_hand = 1, fall_damage_add_percent = -80, bouncy = 40}, +}) + +minetest.register_craft({ + output = "ta4_jetpack:jetpack", + recipe = { + {"techage:ta4_carbon_fiber", "", "techage:ta4_carbon_fiber"}, + {"techage:aluminum", "techage:ta3_cylinder_large", "techage:aluminum"}, + {"basic_materials:motor", "basic_materials:steel_bar", "basic_materials:motor"} + }, +}) + +minetest.register_craft({ + output = "ta4_jetpack:controller_off", + recipe = { + {"basic_materials:plastic_sheet", "techage:basalt_glass_thin", "basic_materials:plastic_sheet"}, + {"techage:ta4_wlanchip", "techage:ta4_battery", "techage:ta4_ramchip"}, + {"", "", ""} + }, +}) + +minetest.register_craft({ + output = "ta4_jetpack:trainingmat", + recipe = { + {"dye:green", "dye:green", "dye:green"}, + {"techage:ta4_carbon_fiber", "techage:ta4_carbon_fiber", "techage:ta4_carbon_fiber"}, + {"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet"} + }, +}) diff --git a/ta4_jetpack/locale/ta4_jetpack.de.tr b/ta4_jetpack/locale/ta4_jetpack.de.tr new file mode 100644 index 0000000..7a5b4f3 --- /dev/null +++ b/ta4_jetpack/locale/ta4_jetpack.de.tr @@ -0,0 +1,14 @@ +# textdomain: ta4_jetpack + +Jetpack Training Mat=Jetpack Trainingsmatte +TA4 Jetpack=TA4 Jetpac +TA4 Jetpack Controller Off=TA4 Jetpack Controller Aus +TA4 Jetpack Controller On=TA4 Jetpack Controller An +Use the controller (left click) to fill the tank with hydrogen=Benutze den Controller (linksklick) um den Tank mit Wasserstoff zu füllen +[Jetpack] You are too heavy: =[Jetpack] Du bist zu schwer: +[Jetpack] You don't have your jetpack on your back!=[Jetpack] Du hast dein Jetpack nicht auf dem Rücken! +[Jetpack] Your tank is empty!=[Jetpack] Dein Tank ist leer! +check your bags!=Prüfe deine Rucksäcke! +check your carfting menu!=Prüfe dein Crafting Menü! +check your inventory!=Prüfe dein Inventar! +##### not used anymore ##### \ No newline at end of file diff --git a/ta4_jetpack/locale/template.txt b/ta4_jetpack/locale/template.txt new file mode 100644 index 0000000..7e34064 --- /dev/null +++ b/ta4_jetpack/locale/template.txt @@ -0,0 +1,11 @@ +Jetpack Training Mat= +TA4 Jetpack= +TA4 Jetpack Controller Off= +TA4 Jetpack Controller On= +Use the controller (left click) to fill the tank with hydrogen= +[Jetpack] You are too heavy: = +[Jetpack] You don't have your jetpack on your back!= +[Jetpack] Your tank is empty!= +check your bags!= +check your carfting menu!= +check your inventory!= \ No newline at end of file diff --git a/ta4_jetpack/mod.conf b/ta4_jetpack/mod.conf new file mode 100644 index 0000000..dac921b --- /dev/null +++ b/ta4_jetpack/mod.conf @@ -0,0 +1,3 @@ +name = ta4_jetpack +depends = techage,default,3d_armor +description = JetPack for Techage diff --git a/ta4_jetpack/screenshot.png b/ta4_jetpack/screenshot.png new file mode 100644 index 0000000..7a88e4a Binary files /dev/null and b/ta4_jetpack/screenshot.png differ diff --git a/ta4_jetpack/settingtypes.txt b/ta4_jetpack/settingtypes.txt new file mode 100644 index 0000000..c1e8f15 --- /dev/null +++ b/ta4_jetpack/settingtypes.txt @@ -0,0 +1,14 @@ +# Maximum altitude a player can reach with the Jetpack +ta4_jetpack_max_height (maximum altitude) int 500 + +# Maximum vertical speed a player can reach with the Jetpack +ta4_jetpack_max_vertical_speed (maximum vertical speed) int 20 + +# Maximum horizontal speed a player can reach with the Jetpack +ta4_jetpack_max_horizontal_speed (maximum horizontal speed) int 12 + +# Maximum number of inventory items a player can take +ta4_jetpack_max_num_inv_items (maximum number of inventory items) int 5 + + + diff --git a/ta4_jetpack/sounds/ta4_jetpack.ogg b/ta4_jetpack/sounds/ta4_jetpack.ogg new file mode 100644 index 0000000..ae511b4 Binary files /dev/null and b/ta4_jetpack/sounds/ta4_jetpack.ogg differ diff --git a/ta4_jetpack/sounds/ta4_jetpack_alarm.ogg b/ta4_jetpack/sounds/ta4_jetpack_alarm.ogg new file mode 100644 index 0000000..406451a Binary files /dev/null and b/ta4_jetpack/sounds/ta4_jetpack_alarm.ogg differ diff --git a/ta4_jetpack/sounds/ta4_jetpack_on.ogg b/ta4_jetpack/sounds/ta4_jetpack_on.ogg new file mode 100644 index 0000000..f17fc19 Binary files /dev/null and b/ta4_jetpack/sounds/ta4_jetpack_on.ogg differ diff --git a/ta4_jetpack/textures/ta4_jetpack_controller_inv.png b/ta4_jetpack/textures/ta4_jetpack_controller_inv.png new file mode 100644 index 0000000..4ca21f6 Binary files /dev/null and b/ta4_jetpack/textures/ta4_jetpack_controller_inv.png differ diff --git a/ta4_jetpack/textures/ta4_jetpack_controller_off_inv.png b/ta4_jetpack/textures/ta4_jetpack_controller_off_inv.png new file mode 100644 index 0000000..719d995 Binary files /dev/null and b/ta4_jetpack/textures/ta4_jetpack_controller_off_inv.png differ diff --git a/ta4_jetpack/textures/ta4_jetpack_jetpack.png b/ta4_jetpack/textures/ta4_jetpack_jetpack.png new file mode 100644 index 0000000..284c67b Binary files /dev/null and b/ta4_jetpack/textures/ta4_jetpack_jetpack.png differ diff --git a/ta4_jetpack/textures/ta4_jetpack_jetpack_inv.png b/ta4_jetpack/textures/ta4_jetpack_jetpack_inv.png new file mode 100644 index 0000000..aa6715a Binary files /dev/null and b/ta4_jetpack/textures/ta4_jetpack_jetpack_inv.png differ diff --git a/ta4_jetpack/textures/ta4_jetpack_jetpack_preview.png b/ta4_jetpack/textures/ta4_jetpack_jetpack_preview.png new file mode 100644 index 0000000..9511997 Binary files /dev/null and b/ta4_jetpack/textures/ta4_jetpack_jetpack_preview.png differ diff --git a/ta4_jetpack/textures/ta4_jetpack_mat_side.png b/ta4_jetpack/textures/ta4_jetpack_mat_side.png new file mode 100644 index 0000000..56c4704 Binary files /dev/null and b/ta4_jetpack/textures/ta4_jetpack_mat_side.png differ diff --git a/ta4_jetpack/textures/ta4_jetpack_mat_top.png b/ta4_jetpack/textures/ta4_jetpack_mat_top.png new file mode 100644 index 0000000..d9360c8 Binary files /dev/null and b/ta4_jetpack/textures/ta4_jetpack_mat_top.png differ diff --git a/ta4_jetpack/textures/ta4_jetpack_smoke.png b/ta4_jetpack/textures/ta4_jetpack_smoke.png new file mode 100644 index 0000000..503b341 Binary files /dev/null and b/ta4_jetpack/textures/ta4_jetpack_smoke.png differ diff --git a/techage/README.md b/techage/README.md index 425d757..1b1416b 100644 --- a/techage/README.md +++ b/techage/README.md @@ -79,16 +79,58 @@ to 'lsqlite3' and 'lua-marshal', but there is no way back, so: ### History -- 2019-06-16 V0.01 * First upload -- 2019-09-28 V0.02 * TA3 finished -- 2020-02-29 V0.04 * TA4 ICTA controller added -- 2020-03-14 V0.05 * TA4 Lua controller added -- 2020-04-24 V0.06 * TA4 injector added -- 2020-04-26 V0.07 * English translation added -- 2020-05-22 V0.08 * Support for 'lua-marshal' and 'lsqlite3' added -- 2020-05-31 V0.09 * TA4 tubes upgraded, manuals updated -- 2020-06-04 V0.10 * minor changes and bugfixes -- 2020-06-14 V0.11 * cart commands added for both controllers, support for moreores added -- 2020-06-17 V0.12 * Ethereal support added, manual correction, tin ingot recipe bugfix -- 2020-06-19 V0.13 * Mesecons Converter added + +**2020-06-29 V0.14** +- quarry sound bugfix +- grinder bugfix +- ore probability calculation changed +- lua-marshal deactivated (due to weird server crashes) +- alternative cement recipe added +- aluminum output increased +- reboiler cycle time increased to 16 s (from 6) +- many manual improvements + +**2020-06-19 V0.13** +- Mesecons Converter added + +**2020-06-17 V0.12** +- Ethereal support added +- manual correction +- tin ingot recipe bugfix + +**2020-06-14 V0.11** +- cart commands added for both controllers +- support for moreores added + +**2020-06-04 V0.10** +- minor changes and bugfixes + +**2020-05-31 V0.09** +- TA4 tubes upgraded, manuals updated + +**2020-05-22 V0.08** +- Support for 'lua-marshal' and 'lsqlite3' added + +**2020-04-26 V0.07** +- English translation added + +**2020-04-24 V0.06** +- TA4 injector added + +**2020-03-14 V0.05** +- TA4 Lua controller added + +**2020-02-29 V0.04** +- TA4 ICTA controller added + +**2019-09-28 V0.02** +- TA3 finished + +**2019-06-16 V0.01** +- First upload + +- +- +- +- diff --git a/techage/basic_machines/quarry.lua b/techage/basic_machines/quarry.lua index 73743ee..9250f4e 100644 --- a/techage/basic_machines/quarry.lua +++ b/techage/basic_machines/quarry.lua @@ -234,6 +234,9 @@ local function keep_running(pos, elapsed) if techage.is_activeformspec(pos) then M(pos):set_string("formspec", formspec(crd.State, pos, nvm)) end + if nvm.techage_state ~= techage.RUNNING then + stop_sound(pos) + end end local function on_rightclick(pos, node, clicker) diff --git a/techage/basis/gravel_lib.lua b/techage/basis/gravel_lib.lua index 2cd64b7..8ecacf6 100644 --- a/techage/basis/gravel_lib.lua +++ b/techage/basis/gravel_lib.lua @@ -20,8 +20,8 @@ local ore_probability = { } local ProbabilityCorrections = { - ["default:tin_lump"] = 0.5, -- extensively used - ["default:coal_lump"] = 0.3, -- extensively used + ["default:tin_lump"] = 0.3, -- extensively used + ["default:coal_lump"] = 0.2, -- extensively used ["default:iron_lump"] = 0.5, -- extensively used ["techage:baborium_lump"] = 99999, -- mining required } @@ -39,15 +39,14 @@ local function add_ores() and item.clust_scarcity ~= nil and item.clust_scarcity > 0 and item.clust_num_ores ~= nil and item.clust_num_ores > 0 and item.y_max ~= nil and item.y_min ~= nil then - local probability = (techage.ore_rarity / PROBABILITY_FACTOR) * item.clust_scarcity / - (item.clust_num_ores * ((item.y_max - item.y_min) / 65535)) - if ore_probability[drop] == nil then - ore_probability[drop] = probability - else - -- harmonic sum - ore_probability[drop] = 1.0 / ((1.0 / ore_probability[drop]) + - (1.0 / probability)) + local factor = 0.5 + if item.y_max < -250 then + factor = -250 / item.y_max end + local probability = (techage.ore_rarity / PROBABILITY_FACTOR) * item.clust_scarcity / + (item.clust_num_ores * factor) + -- lower value means higher probability + ore_probability[drop] = math.min(ore_probability[drop] or 100000, probability) end end end @@ -55,6 +54,8 @@ local function add_ores() for key, correction in pairs(ProbabilityCorrections) do if ore_probability[key] then ore_probability[key] = ore_probability[key] * correction + -- consider upper and lower level + ore_probability[key] = techage.in_range(ore_probability[key], 10, 100000) end end local overall_probability = 0.0 diff --git a/techage/basis/nodedata_sqlite.lua b/techage/basis/nodedata_sqlite.lua index c7078c6..7c0a33a 100644 --- a/techage/basis/nodedata_sqlite.lua +++ b/techage/basis/nodedata_sqlite.lua @@ -72,14 +72,20 @@ end local api = {} function api.store_mapblock_data(key, mapblock_data) - local s = marshal.encode(mapblock_data) + -- deactivated due to weird server crashes without error logs + --local s = marshal.encode(mapblock_data) + local s = minetest.serialize(mapblock_data) return set_block(key, s) end function api.get_mapblock_data(key) local s = get_block(key) if s then - return marshal.decode(s) + if s:byte(1) == MAR_MAGIC then + return marshal.decode(s) + else + return minetest.deserialize(s) + end end api.store_mapblock_data(key, {}) return {} diff --git a/techage/doc/items.lua b/techage/doc/items.lua index 4261273..488eac6 100644 --- a/techage/doc/items.lua +++ b/techage/doc/items.lua @@ -23,6 +23,7 @@ techage.Items = { baborium = "techage:stone_with_baborium", bauxite = "techage:bauxite_stone", usmium = "techage:usmium_nuggets", + basalt = "techage:basalt_stone", oil = "techage:oil_source", ta1_hopper = "techage:hopper_ta1", wlanchip = "techage:ta4_wlanchip", diff --git a/techage/doc/manual_DE.lua b/techage/doc/manual_DE.lua index 24000cf..36c0d11 100644 --- a/techage/doc/manual_DE.lua +++ b/techage/doc/manual_DE.lua @@ -9,6 +9,7 @@ techage.manual_DE.aTitel = { "3,Baborium", "3,Erdöl", "3,Bauxit", + "3,Basalt", "2,History", "1,TA1: Eisenzeitalter", "2,Köhler / Coal Pile", @@ -225,6 +226,7 @@ techage.manual_DE.aText = { " - Baborium - ein Metall\\, welches für Rezepte in TA3 benötigt wird\n".. " - Erdöl - wird in TA3 benötigt\n".. " - Bauxit - ein Aluminiumerz\\, was in TA4 zur Herstellung von Aluminium benötigt wird\n".. + " - Basalt - entsteht\\, wenn sich Wasser und Lave berühren\n".. "\n", "Meridium ist eine Legierung aus Stahl und Mesekristallen. Meridium Ingots können mit dem Kohlebrenner aus Stahl und Mesesplitter hergestellt werden. Meridium leuchtet im Dunkeln. Auch Werkzeuge aus Meridium leuchten und sind daher im Untertagebau sehr hilfreich.\n".. "\n".. @@ -248,6 +250,13 @@ techage.manual_DE.aText = { "\n".. "\n".. "\n", + "Basalt entsteht nur\\, wenn Lava und Wasser zusammenkommen.\n".. + "Dazu sollte man am besten eine Anlage aufbauen\\, bei der eine Lava- und eine Wasserquelle zusammenfließen.\n".. + "Dort wo sich beide Flüssigkeiten treffen\\, entsteht Lava.\n".. + "Einen automatisierten Basalt Generator kann man mit dem Sign Bot aufbauen.\n".. + "\n".. + "\n".. + "\n", " - 28.09.2019: Um Solaranlage erweitert\n".. " - 05.10.2019: Daten zur Solaranlage und Beschreibung zum Wechselrichter und zum Power-Terminal geändert\n".. " - 18.11.2019: Kapitel für Erze\\, Reaktor\\, Aluminium\\, Silo\\, Bauxit\\, Ofenheizung\\, Kieswaschanlage hinzugefügt\n".. @@ -796,7 +805,7 @@ techage.manual_DE.aText = { "Der Destillationsturm muss wie im Plan rechts oben aufgebaut werden. \n".. "Über den Basisblock wird das Bitumen abgelassen. Der Ausgang ist auf der Rückseite des Basisblocks (Pfeilrichtung beachten).\n".. "Auf diesen Basisblock kommen die \"Destillationsturm\" Blöcke mit den Nummern: 1\\, 2\\, 3\\, 2\\, 3\\, 2\\, 3\\, 4\n".. - "An den Öffnungen von unten nach oben werden Schweröl\\, Naphtha und Benzin abgeleitet. Ganz oben wird das Gas abgefangen.\n".. + "An den Öffnungen von unten nach oben werden Schweröl\\, Naphtha und Benzin abgeleitet. Ganz oben wird das Propangas abgefangen.\n".. "Es müssen alle Öffnungen am Turm mit Tanks verbunden werden.\n".. "Der Aufkocher (reboiler) muss mit dem Block \"Destillationsturm 1\" verbunden werden.\n".. "\n".. @@ -806,7 +815,7 @@ techage.manual_DE.aText = { "\n", "Der Aufkocher erhitzt das Erdöl auf ca. 400°C. Dabei verdampft es weitgehend und wird in den Destillationsturm zur Abkühlung geleitet.\n".. "\n".. - "Der Aufkocher benötigt 12 Einheiten Strom und produziert alle 6 s jeweils eine Einheit Bitumen\\, Schweröl\\, Naphtha\\, Benzin und Gas.\n".. + "Der Aufkocher benötigt 14 Einheiten Strom und produziert alle 16 s jeweils eine Einheit Bitumen\\, Schweröl\\, Naphtha\\, Benzin und Propangas.\n".. "Dazu muss der Aufkocher über einen Pumpe mit Erdöl versorgt werden.\n".. "\n".. "\n".. @@ -920,7 +929,7 @@ techage.manual_DE.aText = { "\n".. "\n", "Die Signallampe kann mit 'on'/'off' Kommando ein- bzw. ausgeschaltet werden. Diese Lampe braucht keinen Strom und\n".. - "kann mit der Spritzpistole farbig gemacht werden.\n".. + "kann mit der Spritzpistole aus der Mod \"Unified Dyes\" farbig gemacht werden.\n".. "\n".. "\n".. "\n", @@ -1484,6 +1493,7 @@ techage.manual_DE.aItemName = { "baborium", "oil", "bauxite", + "basalt", "", "techage_ta1", "", @@ -1671,6 +1681,7 @@ techage.manual_DE.aPlanTable = { "", "", "", + "", "coalpile", "coalburner", "", diff --git a/techage/doc/manual_EN.lua b/techage/doc/manual_EN.lua index 147d730..8ed08f0 100644 --- a/techage/doc/manual_EN.lua +++ b/techage/doc/manual_EN.lua @@ -9,6 +9,7 @@ techage.manual_EN.aTitel = { "3,Baborium", "3,Petroleum", "3,Bauxite", + "3,Basalt", "2,History", "1,TA1: Iron Age", "2,Charcoal Pile (charcoal burner)", @@ -225,6 +226,7 @@ techage.manual_EN.aText = { " - Baborium - a metal that is needed for recipes in TA3\n".. " - Petroleum - is needed in TA3\n".. " - Bauxite - an aluminum ore that is needed in TA4 to produce aluminum\n".. + " - Basalt - arises when water and lave touch\n".. "\n", "Meridium is an alloy of steel and mesecons crystals. Meridium ingots can be made with the coal burner from steel and mesecons crystals. Meridium glows in the dark. Tools made of Meridium also light up and are therefore very helpful in underground mining.\n".. "\n".. @@ -248,6 +250,13 @@ techage.manual_EN.aText = { "\n".. "\n".. "\n", + "Basalt is only created when lava and water come together.\n".. + "The best thing to do is to set up a system where a lava and a water source flow together.\n".. + "Lava is formed where both liquids meet.\n".. + "You can build an automated basalt generator with the Sign Bot.\n".. + "\n".. + "\n".. + "\n", " - 28.09.2019: Solar system added\n".. " - 05.10.2019: Data on the solar system and description of the inverter and the power terminal changed\n".. " - 18.11.2019: Chapter for ores\\, reactor\\, aluminum\\, silo\\, bauxite\\, furnace heating\\, gravel washing system added\n".. @@ -526,7 +535,7 @@ techage.manual_EN.aText = { "\n", "Part of the power plant.\n".. "\n".. - "The oil burner can be filled with petroleum\\, heavy oil\\, naphtha or petrol. The burning time depends on the power that is requested by the power plant. Under full load\\, petroleum burns 15 s\\, heavy oil 20 s\\, naphtha 22 s and gasoline 25 s.\n".. + "The oil burner can be filled with crude oil\\, fuel oil\\, naphtha or gasoline. The burning time depends on the power that is requested by the power plant. Under full load\\, crude oil burns 15 s\\, fuel oil 20 s\\, naphtha 22 s and gasoline 25 s.\n".. "\n".. "Correspondingly longer under partial load (50% load = double time).\n".. "\n".. @@ -645,7 +654,7 @@ techage.manual_EN.aText = { "\n", "Is part of the TA3 industrial furnace.\n".. "\n".. - "The oil burner can be operated with heavy oil\\, naphtha or gasoline. The burning time is 80 s for heavy oil\\, 90 s for naphtha and 100 s for gasoline.\n".. + "The oil burner can be operated with fuel oil\\, naphtha or gasoline. The burning time is 80 s for fuel oil\\, 90 s for naphtha and 100 s for gasoline.\n".. "\n".. "The oil burner can only hold 50 units of fuel. An additional tank and a pump are therefore advisable.\n".. "\n".. @@ -786,7 +795,7 @@ techage.manual_EN.aText = { "\n".. "\n".. "\n", - "Oil is a mixture of substances and consists of many components. The oil can be broken down into its main components such as bitumen\\, heavy oil\\, naphtha\\, gasoline and gas via a distillation tower.\n".. + "Oil is a mixture of substances and consists of many components. The oil can be broken down into its main components such as bitumen\\, fuel oil\\, naphtha\\, gasoline and propane gas via a distillation tower.\n".. "Further processing to end products takes place in the chemical reactor.\n".. "\n".. "\n".. @@ -794,7 +803,7 @@ techage.manual_EN.aText = { "The distillation tower must be set up as in the plan at the top right.\n".. "The bitumen is drained off via the base block. The exit is on the back of the base block (note the direction of the arrow).\n".. "The \"distillation tower\" blocks with the numbers: 1\\, 2\\, 3\\, 2\\, 3\\, 2\\, 3\\, 4 are placed on this basic block\n".. - "Heavy oil\\, naphtha and gasoline are drained from the openings from bottom to top. The gas is caught at the top.\n".. + "Fuel oil\\, naphtha and gasoline are drained from the openings from bottom to top. The propane gas is caught at the top.\n".. "All openings on the tower must be connected to tanks.\n".. "The reboiler must be connected to the \"distillation tower 1\" block.\n".. "\n".. @@ -804,7 +813,7 @@ techage.manual_EN.aText = { "\n", "The reboiler heats the oil to approx. 400 ° C. It largely evaporates and is fed into the distillation tower for cooling.\n".. "\n".. - "The reboiler requires 12 units of electricity and produces one unit of bitumen\\, heavy oil\\, naphtha\\, gasoline and gas every 6 s.\n".. + "The reboiler requires 14 units of electricity and produces one unit of bitumen\\, fuel oil\\, naphtha\\, gasoline and propane every 16 s.\n".. "To do this\\, the reboiler must be supplied with oil via a pump.\n".. "\n".. "\n".. @@ -918,7 +927,7 @@ techage.manual_EN.aText = { "\n".. "\n", "The signal lamp can be switched on or off with the 'on' / 'off' command. This lamp does not need electricity and\n".. - "can be colored with the spray gun.\n".. + "can be colored with the airbrush tool of the mod Unified Dyes.\n".. "\n".. "\n".. "\n", @@ -1474,6 +1483,7 @@ techage.manual_EN.aItemName = { "baborium", "oil", "bauxite", + "basalt", "", "techage_ta1", "", @@ -1661,6 +1671,7 @@ techage.manual_EN.aPlanTable = { "", "", "", + "", "coalpile", "coalburner", "", diff --git a/techage/init.lua b/techage/init.lua index 22fac07..4b08c3b 100644 --- a/techage/init.lua +++ b/techage/init.lua @@ -13,7 +13,7 @@ techage = {} -- Version for compatibility checks, see readme.md/history -techage.version = 0.13 +techage.version = 0.14 if minetest.global_exists("tubelib") then minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!") @@ -298,6 +298,7 @@ dofile(MP.."/items/plastic.lua") dofile(MP.."/items/hydrogen.lua") dofile(MP.."/items/electronic.lua") dofile(MP.."/items/redstone.lua") +dofile(MP.."/items/cement.lua") if techage.basalt_stone_enabled then dofile(MP.."/items/basalt.lua") diff --git a/techage/items/aluminium.lua b/techage/items/aluminium.lua index 60a6613..a837e12 100644 --- a/techage/items/aluminium.lua +++ b/techage/items/aluminium.lua @@ -55,7 +55,7 @@ techage.recipes.add("ta4_doser", { }) techage.furnace.register_recipe({ - output = "techage:aluminum", + output = "techage:aluminum 2", recipe = {"techage:gibbsite_powder", "techage:gibbsite_powder", "techage:gibbsite_powder", "techage:gibbsite_powder"}, time = 16, diff --git a/techage/items/cement.lua b/techage/items/cement.lua new file mode 100644 index 0000000..92a7d97 --- /dev/null +++ b/techage/items/cement.lua @@ -0,0 +1,52 @@ +--[[ + + TechAge + ======= + + Copyright (C) 2020 Joachim Stolberg + + GPL v3 + See LICENSE.txt for more information + + Cement as ingredient and alternative recipe for basic_materials:wet_cement + Cement is cooked and grinded clay + +]]-- + +local S = techage.S + + +if not minetest.global_exists("bakedclay") then + minetest.register_node("techage:cement_block", { + description = S("Cement Block"), + tiles = {"default_clay.png^[colorize:#FFFFFF:160"}, + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), + }) + + minetest.register_craft({ + type = "cooking", + output = "techage:cement_block", + recipe = "default:clay", + }) + + techage.add_grinder_recipe({input="techage:cement_block", output="techage:cement_powder"}) +else + techage.add_grinder_recipe({input="bakedclay:white", output="techage:cement_powder"}) +end + +minetest.register_craftitem("techage:cement_powder", { + description = S("Cement Powder"), + inventory_image = "techage_powder_inv.png^[colorize:#FFFFFF:240", + groups = {powder = 1}, +}) + +minetest.register_craft({ + output = "basic_materials:wet_cement 3", + recipe = { + {"bucket:bucket_water", "techage:cement_powder"}, + {"group:sand", "default:gravel"}, + } +}) + diff --git a/techage/manuals/manual_DE.md b/techage/manuals/manual_DE.md index cd50c95..c6bd734 100644 --- a/techage/manuals/manual_DE.md +++ b/techage/manuals/manual_DE.md @@ -46,7 +46,7 @@ Techage fügt dem Spiel einige neue Items hinzu: - Baborium - ein Metall, welches für Rezepte in TA3 benötigt wird - Erdöl - wird in TA3 benötigt - Bauxit - ein Aluminiumerz, was in TA4 zur Herstellung von Aluminium benötigt wird - +- Basalt - entsteht, wenn sich Wasser und Lave berühren ### Meridium @@ -85,6 +85,15 @@ Es wird zur Herstellung von Aluminium benötigt, was vor allem in TA4 Verwendung [bauxite|image] +### Basalt + +Basalt entsteht nur, wenn Lava und Wasser zusammenkommen. +Dazu sollte man am besten eine Anlage aufbauen, bei der eine Lava- und eine Wasserquelle zusammenfließen. +Dort wo sich beide Flüssigkeiten treffen, entsteht Lava. +Einen automatisierten Basalt Generator kann man mit dem Sign Bot aufbauen. + +[basalt|image] + ## History diff --git a/techage/manuals/manual_EN.md b/techage/manuals/manual_EN.md index f7848e3..c10363e 100644 --- a/techage/manuals/manual_EN.md +++ b/techage/manuals/manual_EN.md @@ -46,6 +46,7 @@ Techage adds some new items to the game: - Baborium - a metal that is needed for recipes in TA3 - Petroleum - is needed in TA3 - Bauxite - an aluminum ore that is needed in TA4 to produce aluminum +- Basalt - arises when water and lave touch ### Meridium @@ -86,6 +87,14 @@ It is required for the production of aluminum, which is mainly used in TA4. [bauxite|image] +### Basalt + +Basalt is only created when lava and water come together. +The best thing to do is to set up a system where a lava and a water source flow together. +Lava is formed where both liquids meet. +You can build an automated basalt generator with the Sign Bot. + +[basalt|image] ## History diff --git a/techage/manuals/manual_ta3_DE.md b/techage/manuals/manual_ta3_DE.md index 87f98bf..1c65dac 100644 --- a/techage/manuals/manual_ta3_DE.md +++ b/techage/manuals/manual_ta3_DE.md @@ -422,7 +422,7 @@ Die weitere Verarbeitung zu Endprodukten erfolgt im Chemischen Reaktor. Der Destillationsturm muss wie im Plan rechts oben aufgebaut werden. Über den Basisblock wird das Bitumen abgelassen. Der Ausgang ist auf der Rückseite des Basisblocks (Pfeilrichtung beachten). Auf diesen Basisblock kommen die "Destillationsturm" Blöcke mit den Nummern: 1, 2, 3, 2, 3, 2, 3, 4 -An den Öffnungen von unten nach oben werden Schweröl, Naphtha und Benzin abgeleitet. Ganz oben wird das Gas abgefangen. +An den Öffnungen von unten nach oben werden Schweröl, Naphtha und Benzin abgeleitet. Ganz oben wird das Propangas abgefangen. Es müssen alle Öffnungen am Turm mit Tanks verbunden werden. Der Aufkocher (reboiler) muss mit dem Block "Destillationsturm 1" verbunden werden. @@ -435,7 +435,7 @@ Der Aufkocher benötigt Strom (nicht im Plan zu sehen)! Der Aufkocher erhitzt das Erdöl auf ca. 400°C. Dabei verdampft es weitgehend und wird in den Destillationsturm zur Abkühlung geleitet. -Der Aufkocher benötigt 12 Einheiten Strom und produziert alle 6 s jeweils eine Einheit Bitumen, Schweröl, Naphtha, Benzin und Gas. +Der Aufkocher benötigt 14 Einheiten Strom und produziert alle 16 s jeweils eine Einheit Bitumen, Schweröl, Naphtha, Benzin und Propangas. Dazu muss der Aufkocher über einen Pumpe mit Erdöl versorgt werden. [reboiler|image] @@ -570,7 +570,7 @@ Im privaten Modul kann nur der Besitzer selbst Kommandos eingeben oder Tasten nu ### TechAge Signallampe / Signal Lamp Die Signallampe kann mit `on`/`off` Kommando ein- bzw. ausgeschaltet werden. Diese Lampe braucht keinen Strom und -kann mit der Spritzpistole farbig gemacht werden. +kann mit der Spritzpistole aus der Mod "Unified Dyes" farbig gemacht werden. [ta3_signallamp|image] @@ -763,4 +763,4 @@ Die Kelle dient zum Verputzen von Stromkabel. Siehe dazu "TA Stromkabel". Mit diesem Werkzeug lassen sich die Bohrgestängezange Blöcke wieder entfernen, wenn dort bspw. ein Tunnel durch soll. -[ta3_drill_pipe_wrench|image] \ No newline at end of file +[ta3_drill_pipe_wrench|image] diff --git a/techage/manuals/manual_ta3_EN.md b/techage/manuals/manual_ta3_EN.md index e3610e3..6dbfa20 100644 --- a/techage/manuals/manual_ta3_EN.md +++ b/techage/manuals/manual_ta3_EN.md @@ -37,7 +37,7 @@ The fire box must be filled with coal or charcoal. The burning time depends on t Part of the power plant. -The oil burner can be filled with petroleum, heavy oil, naphtha or petrol. The burning time depends on the power that is requested by the power plant. Under full load, petroleum burns 15 s, heavy oil 20 s, naphtha 22 s and gasoline 25 s. +The oil burner can be filled with crude oil, fuel oil, naphtha or gasoline. The burning time depends on the power that is requested by the power plant. Under full load, crude oil burns 15 s, fuel oil 20 s, naphtha 22 s and gasoline 25 s. Correspondingly longer under partial load (50% load = double time). @@ -214,7 +214,7 @@ See also TA4 heater. Is part of the TA3 industrial furnace. -The oil burner can be operated with heavy oil, naphtha or gasoline. The burning time is 80 s for heavy oil, 90 s for naphtha and 100 s for gasoline. +The oil burner can be operated with fuel oil, naphtha or gasoline. The burning time is 80 s for fuel oil, 90 s for naphtha and 100 s for gasoline. The oil burner can only hold 50 units of fuel. An additional tank and a pump are therefore advisable. @@ -409,7 +409,7 @@ The chest cart is used to transport items. Like chests, it can be filled or empt ## Oil Processing -Oil is a mixture of substances and consists of many components. The oil can be broken down into its main components such as bitumen, heavy oil, naphtha, gasoline and gas via a distillation tower. +Oil is a mixture of substances and consists of many components. The oil can be broken down into its main components such as bitumen, fuel oil, naphtha, gasoline and propane gas via a distillation tower. Further processing to end products takes place in the chemical reactor. [techage_ta31|image] @@ -420,7 +420,7 @@ Further processing to end products takes place in the chemical reactor. The distillation tower must be set up as in the plan at the top right. The bitumen is drained off via the base block. The exit is on the back of the base block (note the direction of the arrow). The "distillation tower" blocks with the numbers: 1, 2, 3, 2, 3, 2, 3, 4 are placed on this basic block -Heavy oil, naphtha and gasoline are drained from the openings from bottom to top. The gas is caught at the top. +Fuel oil, naphtha and gasoline are drained from the openings from bottom to top. The propane gas is caught at the top. All openings on the tower must be connected to tanks. The reboiler must be connected to the "distillation tower 1" block. @@ -433,7 +433,7 @@ The reboiler needs electricity (not shown in the plan)! The reboiler heats the oil to approx. 400 ° C. It largely evaporates and is fed into the distillation tower for cooling. -The reboiler requires 12 units of electricity and produces one unit of bitumen, heavy oil, naphtha, gasoline and gas every 6 s. +The reboiler requires 14 units of electricity and produces one unit of bitumen, fuel oil, naphtha, gasoline and propane every 16 s. To do this, the reboiler must be supplied with oil via a pump. [reboiler|image] @@ -567,7 +567,7 @@ In the private mode, only the owner can enter commands himself or use keys. ### TechAge Signal Lamp The signal lamp can be switched on or off with the `on` / `off` command. This lamp does not need electricity and -can be colored with the spray gun. +can be colored with the airbrush tool of the mod Unified Dyes. [ta3_signallamp|image] diff --git a/techage/manuals/toc_DE.md b/techage/manuals/toc_DE.md index f348fd5..a78fa08 100644 --- a/techage/manuals/toc_DE.md +++ b/techage/manuals/toc_DE.md @@ -8,6 +8,7 @@ - [Baborium](./manual_DE.md#baborium) - [Erdöl](./manual_DE.md#erdöl) - [Bauxit](./manual_DE.md#bauxit) + - [Basalt](./manual_DE.md#basalt) - [History](./manual_DE.md#history) - [TA1: Eisenzeitalter](./manual_ta1_DE.md#ta1:-eisenzeitalter) - [Köhler / Coal Pile](./manual_ta1_DE.md#köhler--coal-pile) diff --git a/techage/manuals/toc_EN.md b/techage/manuals/toc_EN.md index 03c2002..e708383 100644 --- a/techage/manuals/toc_EN.md +++ b/techage/manuals/toc_EN.md @@ -8,6 +8,7 @@ - [Baborium](./manual_EN.md#baborium) - [Petroleum](./manual_EN.md#petroleum) - [Bauxite](./manual_EN.md#bauxite) + - [Basalt](./manual_EN.md#basalt) - [History](./manual_EN.md#history) - [TA1: Iron Age](./manual_ta1_EN.md#ta1:-iron-age) - [Charcoal Pile (charcoal burner)](./manual_ta1_EN.md#charcoal-pile-(charcoal-burner)) diff --git a/techage/oil/reboiler.lua b/techage/oil/reboiler.lua index 81f4d24..29dc4bf 100644 --- a/techage/oil/reboiler.lua +++ b/techage/oil/reboiler.lua @@ -23,7 +23,7 @@ local Flip = techage.networks.Flip local Cable = techage.ElectricCable local power = techage.power -local CYCLE_TIME = 6 +local CYCLE_TIME = 16 local CAPA = 12 local PWR_NEEDED = 14