write something there
12
.gitattributes
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
*.xcf export-ignore
|
||||
*.blend export-ignore
|
||||
*.py export-ignore
|
||||
*.sh export-ignore
|
||||
mods/**/screenshot.png export-ignore
|
||||
biome_graph.ggb export-ignore
|
||||
.github/** export-ignore
|
||||
.github export-ignore
|
||||
mods/**/.github/** export-ignore
|
||||
mods/**/.github export-ignore
|
||||
mods/signs_lib/util/**
|
||||
mods/signs_lib/util
|
22
.gitignore
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
## Files related to minetest development cycle
|
||||
/*.patch
|
||||
# GNU Patch reject file
|
||||
*.rej
|
||||
|
||||
## Editors and Development environments
|
||||
*~
|
||||
*.swp
|
||||
*.bak*
|
||||
*.orig
|
||||
# Vim
|
||||
*.vim
|
||||
# Kate
|
||||
.*.kate-swp
|
||||
.swp.*
|
||||
# Eclipse (LDT)
|
||||
.project
|
||||
.settings/
|
||||
.buildpath
|
||||
.metadata
|
||||
# Idea IDE
|
||||
.idea/*
|
192
.gitmodules
vendored
Normal file
|
@ -0,0 +1,192 @@
|
|||
[submodule "abdecor"]
|
||||
path = mods/abdecor
|
||||
url = https://github.com/asuna-mt/abdecor
|
||||
branch = asuna
|
||||
[submodule "animalia"]
|
||||
path = mods/animalia
|
||||
url = https://github.com/asuna-mt/animalia
|
||||
branch = asuna
|
||||
[submodule "asuna_game_mods"]
|
||||
path = mods/asuna
|
||||
url = https://github.com/asuna-mt/asuna_game_mods
|
||||
branch = asuna
|
||||
[submodule "awards"]
|
||||
path = mods/awards
|
||||
url = https://github.com/asuna-mt/awards
|
||||
branch = asuna
|
||||
[submodule "bakedclay"]
|
||||
path = mods/bakedclay
|
||||
url = https://github.com/asuna-mt/bakedclay
|
||||
branch = asuna
|
||||
[submodule "beautiflowers"]
|
||||
path = mods/beautiflowers
|
||||
url = https://github.com/asuna-mt/beautiflowers
|
||||
branch = asuna
|
||||
[submodule "biomes"]
|
||||
path = mods/biomes
|
||||
url = https://github.com/asuna-mt/biomes
|
||||
branch = asuna
|
||||
[submodule "bonemeal"]
|
||||
path = mods/bonemeal
|
||||
url = https://github.com/asuna-mt/bonemeal
|
||||
branch = asuna
|
||||
[submodule "bottles"]
|
||||
path = mods/bottles
|
||||
url = https://github.com/asuna-mt/bottles
|
||||
branch = asuna
|
||||
[submodule "builtin_item"]
|
||||
path = mods/builtin_item
|
||||
url = https://github.com/asuna-mt/builtin_item
|
||||
branch = asuna
|
||||
[submodule "caverealms"]
|
||||
path = mods/caverealms
|
||||
url = https://github.com/asuna-mt/caverealms_lite
|
||||
branch = asuna
|
||||
[submodule "colorful_beds"]
|
||||
path = mods/colorful_beds
|
||||
url = https://github.com/asuna-mt/colorful_beds
|
||||
branch = asuna
|
||||
[submodule "creatura"]
|
||||
path = mods/creatura
|
||||
url = https://github.com/asuna-mt/creatura
|
||||
branch = asuna
|
||||
[submodule "ethereal"]
|
||||
path = mods/ethereal
|
||||
url = https://github.com/asuna-mt/ethereal
|
||||
branch = asuna
|
||||
[submodule "everness"]
|
||||
path = mods/everness
|
||||
url = https://github.com/asuna-mt/everness
|
||||
branch = asuna
|
||||
[submodule "farming"]
|
||||
path = mods/farming
|
||||
url = https://github.com/asuna-mt/farming
|
||||
branch = asuna
|
||||
[submodule "flowerpot"]
|
||||
path = mods/flowerpot
|
||||
url = https://github.com/asuna-mt/flowerpot
|
||||
branch = asuna
|
||||
[submodule "geodes"]
|
||||
path = mods/geodes
|
||||
url = https://github.com/asuna-mt/geodes
|
||||
branch = asuna
|
||||
[submodule "herbs"]
|
||||
path = mods/herbs
|
||||
url = https://github.com/asuna-mt/herbs
|
||||
branch = asuna
|
||||
[submodule "item_drop"]
|
||||
path = mods/item_drop
|
||||
url = https://github.com/asuna-mt/item_drop
|
||||
branch = asuna
|
||||
[submodule "leafstride"]
|
||||
path = mods/leafstride
|
||||
url = https://github.com/asuna-mt/leafstride
|
||||
branch = asuna
|
||||
[submodule "livingjungle"]
|
||||
path = mods/livingjungle
|
||||
url = https://github.com/asuna-mt/livingjungle
|
||||
branch = asuna
|
||||
[submodule "livingslimes"]
|
||||
path = mods/livingslimes
|
||||
url = https://github.com/asuna-mt/livingslimes
|
||||
branch = asuna
|
||||
[submodule "lootchests_modpack"]
|
||||
path = mods/lootchests_modpack
|
||||
url = https://github.com/asuna-mt/lootchests_modpack
|
||||
branch = asuna
|
||||
[submodule "marinara"]
|
||||
path = mods/marinara
|
||||
url = https://github.com/asuna-mt/marinara
|
||||
branch = asuna
|
||||
[submodule "minetest_game"]
|
||||
path = mods/minetest_game
|
||||
url = https://github.com/asuna-mt/minetest_game
|
||||
branch = asuna
|
||||
[submodule "sfinv_buttons"]
|
||||
path = mods/sfinv_buttons
|
||||
url = https://github.com/asuna-mt/minetest_sfinv_buttons
|
||||
branch = asuna
|
||||
[submodule "show_wielded_item"]
|
||||
path = mods/show_wielded_item
|
||||
url = https://github.com/asuna-mt/minetest_show_wielded_item
|
||||
branch = asuna
|
||||
[submodule "soup"]
|
||||
path = mods/soup
|
||||
url = https://github.com/asuna-mt/minetest-soup
|
||||
branch = asuna
|
||||
[submodule "tt"]
|
||||
path = mods/tt
|
||||
url = https://github.com/asuna-mt/minetest_tt
|
||||
branch = asuna
|
||||
[submodule "tt_base"]
|
||||
path = mods/tt_base
|
||||
url = https://github.com/asuna-mt/minetest_tt_base
|
||||
branch = asuna
|
||||
[submodule "music_modpack"]
|
||||
path = mods/music_modpack
|
||||
url = https://github.com/asuna-mt/music_modpack
|
||||
branch = asuna
|
||||
[submodule "naturalbiomes"]
|
||||
path = mods/naturalbiomes
|
||||
url = https://github.com/asuna-mt/naturalbiomes
|
||||
branch = asuna
|
||||
[submodule "plantlife_modpack"]
|
||||
path = mods/plantlife_modpack
|
||||
url = https://github.com/asuna-mt/plantlife_modpack
|
||||
branch = asuna
|
||||
[submodule "player_monoids"]
|
||||
path = mods/player_monoids
|
||||
url = https://github.com/asuna-mt/player_monoids
|
||||
branch = asuna
|
||||
[submodule "signs_lib"]
|
||||
path = mods/signs_lib
|
||||
url = https://github.com/asuna-mt/signs_lib
|
||||
branch = asuna
|
||||
[submodule "skinsdb"]
|
||||
path = mods/skinsdb
|
||||
url = https://github.com/asuna-mt/skinsdb
|
||||
branch = asuna
|
||||
[submodule "stamina"]
|
||||
path = mods/stamina
|
||||
url = https://github.com/asuna-mt/stamina
|
||||
branch = asuna
|
||||
[submodule "telemosaic"]
|
||||
path = mods/telemosaic
|
||||
url = https://github.com/asuna-mt/telemosaic
|
||||
branch = asuna
|
||||
[submodule "too_many_stones"]
|
||||
path = mods/too_many_stones
|
||||
url = https://github.com/asuna-mt/too_many_stones
|
||||
branch = asuna
|
||||
[submodule "wielded_light"]
|
||||
path = mods/wielded_light
|
||||
url = https://github.com/asuna-mt/wielded_light
|
||||
branch = asuna
|
||||
[submodule "worldgate"]
|
||||
path = mods/worldgate
|
||||
url = https://github.com/asuna-mt/worldgate
|
||||
branch = asuna
|
||||
[submodule "x_farming"]
|
||||
path = mods/x_farming
|
||||
url = https://github.com/asuna-mt/x_farming
|
||||
branch = asuna
|
||||
[submodule "3d_armor"]
|
||||
path = mods/3d_armor
|
||||
url = https://github.com/asuna-mt/3d_armor
|
||||
branch = asuna
|
||||
[submodule "researcher"]
|
||||
path = mods/researcher
|
||||
url = https://github.com/asuna-mt/researcher
|
||||
branch = asuna
|
||||
[submodule "findbiome"]
|
||||
path = mods/findbiome
|
||||
url = https://github.com/asuna-mt/minetest_findbiome
|
||||
branch = asuna
|
||||
[submodule "effervescence"]
|
||||
path = mods/effervescence
|
||||
url = https://github.com/asuna-mt/effervescence
|
||||
branch = asuna
|
||||
[submodule "carpets"]
|
||||
path = mods/carpets
|
||||
url = https://github.com/asuna-mt/carpets
|
||||
branch = asuna
|
232
.luacheckrc
Normal file
|
@ -0,0 +1,232 @@
|
|||
-- Global configuration
|
||||
-----------------------
|
||||
|
||||
std = "luajit+minetest+supported_mods"
|
||||
|
||||
max_line_length = false
|
||||
|
||||
-- Ignore warnings that are not necessarily problematic,
|
||||
-- as fixing those will only make it diffifult to update from upstream.
|
||||
-- Ideally this should be fixed upstream and the warnings enabled again.
|
||||
ignore = {
|
||||
"211", -- unused variable
|
||||
"212", -- unused argument
|
||||
"213", -- unused loop variable
|
||||
-- whitespace
|
||||
"611", -- line contains only whitespace
|
||||
"612", -- trailing whitespace
|
||||
"614", -- trailing whitespace in comment
|
||||
"621", -- inconsistent indentation
|
||||
}
|
||||
|
||||
stds.minetest = {
|
||||
read_globals = {
|
||||
-- tables
|
||||
"minetest",
|
||||
"vector",
|
||||
-- utility functions
|
||||
"dump",
|
||||
"dump2",
|
||||
math = { fields = { "hypot", "sign", "factorial", "round" } },
|
||||
string = { fields = { "split", "trim" } },
|
||||
table = { fields = { "copy", "indexof" } },
|
||||
-- constructors
|
||||
"ItemStack",
|
||||
"PcgRandom",
|
||||
"PseudoRandom",
|
||||
"VoxelArea",
|
||||
"VoxelManip",
|
||||
-- legacy
|
||||
"core", -- alias of minetest
|
||||
"nodeupdate",
|
||||
},
|
||||
}
|
||||
|
||||
-- Mods that are potentially supported but not included in Asuna.
|
||||
-- The relevant code must be gated by `if minetest.get_modpath("...")` or similar.
|
||||
-- Could be extracted from optional_depends, but in practice not all mods declare it.
|
||||
-- Could also be extracted from ifs like the one above.
|
||||
-- In practice only a few of these are not covered by other rules, and often mod
|
||||
-- names differ from global names they define, so this list was filled manually.
|
||||
stds.supported_mods = {
|
||||
read_globals = {
|
||||
"abstract_dryplants", -- from dryplants
|
||||
"armor", -- From 3d_armor
|
||||
"df_primordial_items",
|
||||
"df_trees",
|
||||
"geodes_lib",
|
||||
"hb", -- From hudbars
|
||||
"hunger_ng",
|
||||
"lucky_block",
|
||||
"mapgen_helper", -- From dfcaverns
|
||||
"mcl_player",
|
||||
"mcl_sounds",
|
||||
"mobs",
|
||||
"moretrees",
|
||||
"signs_bot",
|
||||
"stairsplus",
|
||||
"techage",
|
||||
"technic",
|
||||
"technic_cnc",
|
||||
"toolranks",
|
||||
},
|
||||
}
|
||||
|
||||
-- Mods included in Asuna.
|
||||
-- List generated with:
|
||||
-- git grep --recurse-submodules -ho "^name =.*" | awk '{ sub("\r",""); print " \"" $3 "\"," }' | sort
|
||||
local mod_names = {
|
||||
"abdecor",
|
||||
"animalia",
|
||||
"asuna_awards",
|
||||
"asuna_core",
|
||||
"asuna_textures",
|
||||
"awards",
|
||||
"badland",
|
||||
"bakedclay",
|
||||
"beautiflowers",
|
||||
"beds",
|
||||
"binoculars",
|
||||
"biomes",
|
||||
"biomes_leafdecay",
|
||||
"boats",
|
||||
"bonemeal",
|
||||
"bones",
|
||||
"bottles",
|
||||
"bucket",
|
||||
"builtin_item",
|
||||
"butterflies",
|
||||
"carts",
|
||||
"caverealms",
|
||||
"colorful_beds",
|
||||
"creative",
|
||||
"creatura",
|
||||
"default",
|
||||
"doors",
|
||||
"dorwinion",
|
||||
"dungeon_loot",
|
||||
"dye",
|
||||
"env_sounds",
|
||||
"ethereal",
|
||||
"everness",
|
||||
"farming",
|
||||
"farming",
|
||||
"ferns",
|
||||
"fire",
|
||||
"fireflies",
|
||||
"flowerpot",
|
||||
"flowers",
|
||||
"frost_land",
|
||||
"game_commands",
|
||||
"geodes",
|
||||
"give_initial_stuff",
|
||||
"herbs",
|
||||
"item_drop",
|
||||
"japaneseforest",
|
||||
"keys",
|
||||
"leafstride",
|
||||
"livingjungle",
|
||||
"livingslimes",
|
||||
"lootchests",
|
||||
"lootchests_default",
|
||||
"map",
|
||||
"marinara",
|
||||
"mtg_craftguide",
|
||||
"music_api",
|
||||
"naturalbiomes",
|
||||
"nightshade",
|
||||
"player_api",
|
||||
"player_monoids",
|
||||
"pl_seaweed",
|
||||
"prairie",
|
||||
"screwdriver",
|
||||
"sethome",
|
||||
"sfinv",
|
||||
"sfinv_buttons",
|
||||
"show_wielded_item",
|
||||
"signs_lib",
|
||||
"skinsdb",
|
||||
"soup",
|
||||
"spawn",
|
||||
"stairs",
|
||||
"stamina",
|
||||
"telemosaic",
|
||||
"tnt",
|
||||
"too_many_stones",
|
||||
"tt",
|
||||
"tt_base",
|
||||
"vessels",
|
||||
"walls",
|
||||
"weather",
|
||||
"wielded_light",
|
||||
"wool",
|
||||
"worldgate",
|
||||
"x_farming",
|
||||
"xpanes",
|
||||
}
|
||||
|
||||
-- Globals defined by Asuna.
|
||||
-- Ideally this should be equal to mod_names + "asuna", but some mods define
|
||||
-- additional globals, so we add them here.
|
||||
globals = {
|
||||
"asuna",
|
||||
"abstract_bushes", -- from bushes
|
||||
"abstract_ferns", -- from ferns
|
||||
"abstract_youngtrees", -- from youngtrees
|
||||
"music", -- from music_api
|
||||
"skins", -- from skinsdb
|
||||
table.unpack(mod_names)
|
||||
}
|
||||
|
||||
exclude_files = {
|
||||
-- Assets
|
||||
"mods/livingjungle/schematics",
|
||||
-- Legacy stuff
|
||||
"mods/animalia/api/legacy_convert.lua",
|
||||
"mods/minetest_game/default/legacy.lua",
|
||||
}
|
||||
|
||||
-- Mod-specific configuration
|
||||
-----------------------------
|
||||
|
||||
-- Import existing .luacheckrc files
|
||||
-- List generated with:
|
||||
-- find mods -name .luacheckrc -exec dirname {} \; | xargs -L1 basename | awk '{ sub("\r",""); print " \"" $1 "\"," }' | sort
|
||||
local mods_with_luacheckrc = {
|
||||
"animalia",
|
||||
"awards",
|
||||
"creatura",
|
||||
"everness",
|
||||
"flowerpot",
|
||||
"item_drop",
|
||||
"plantlife_modpack",
|
||||
"player_monoids",
|
||||
"signs_lib",
|
||||
"skinsdb",
|
||||
"stamina",
|
||||
"telemosaic",
|
||||
"x_farming",
|
||||
}
|
||||
for _,modname in ipairs(mods_with_luacheckrc) do
|
||||
local modpath = "mods/" .. modname
|
||||
files[modpath] = {}
|
||||
-- store globals defined in the mod's .luacheckrc in the corresponding files table
|
||||
assert(pcall(assert(loadfile(modpath.."/.luacheckrc", nil, files[modpath]))))
|
||||
if files[modpath].exclude_files then
|
||||
for i,path in ipairs(files[modpath].exclude_files) do
|
||||
-- exclude_files only works in the global scope, not in files[]
|
||||
table.insert(exclude_files, modpath.."/"..path)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Used variable "_foo" with unused hint.
|
||||
-- Creatura and animalia use a _ prefix to avoid shadowing self/this/min/max.
|
||||
files["mods/animalia"] = { ignore = { "214" } }
|
||||
files["mods/creatura"] = { ignore = { "214" } }
|
||||
|
||||
-- We tightly control mods that can override the engine.
|
||||
files["mods/asuna/asuna_core"] = { globals = { minetest = { fields = { "register_biome", "register_decoration" } } } }
|
||||
files["mods/minetest_game/creative"] = { globals = { minetest = { fields = { "creative" } } } }
|
||||
files["mods/minetest_game/player_api"] = { globals = { minetest = { fields = { "calculate_knockback" } } } }
|
||||
files["mods/ethereal/crystal.lua"] = { globals = { minetest = { fields = { "handle_node_drops" } } } }
|
65
CHANGELOG.md
Normal file
|
@ -0,0 +1,65 @@
|
|||
# Asuna Changelog
|
||||
|
||||
This file documents the major changes made in each version of Asuna.
|
||||
|
||||
## v1.0.7
|
||||
|
||||
- Effervescence: Use `blend = "clip"` for particles only if it's supported
|
||||
|
||||
## v1.0.6
|
||||
|
||||
- Disable torch damage
|
||||
- Remove log message that appears when using a bug net
|
||||
|
||||
## v1.0.5
|
||||
|
||||
- Fix a crash caused by the Net Worth award
|
||||
- Researcher: Fix broken research table particle graphics
|
||||
- Effervescence: Set `blend = "clip"` for most particle effects
|
||||
- Add `time_speed = 72` to Asuna's minetest.conf file for proper day/night cycles in case the default value changes
|
||||
|
||||
## v1.0.4
|
||||
|
||||
- Add missing Dorwinion and Nightshade tree saplings
|
||||
- Make saplings from Biomes modpack more compatible with bonemeal
|
||||
- Adjust Show Wielded Item text to be bold and to not overlap with the food saturation bar
|
||||
- Enable raspberries from Farming Redo and add raspberries to mapgen
|
||||
- Adjust low-yield wild crops to be more mature and thus more likely to drop crops/seeds
|
||||
|
||||
## v1.0.3
|
||||
|
||||
- Use alternate texture for wool instead of overriding X Farming wool alias tiles
|
||||
- Add [Carpets](https://content.luanti.org/packages/bell07/carpets/) mod
|
||||
|
||||
## v1.0.2
|
||||
|
||||
- Removed hemp -> cotton recipe
|
||||
- X Farming water bottle aliased to Filled Bottles water bottle
|
||||
- X Farming soup bowl aliased to Farming Redo wooden bowl
|
||||
- Everness basic farming soils aliased to Farming Redo soils
|
||||
- Added depth_riverbed to registered biomes which ensures proper riverbeds
|
||||
- Grass/litter nodes based on nodes other than dirt now decay into the proper node
|
||||
- Expanded Heath biome to the shoreline
|
||||
- Generate schematics before ground cover in Natural Biomes mapgen
|
||||
|
||||
## v1.0.1
|
||||
|
||||
- Added a mod override warning that warns players if they have mods enabled that are already bundled with Asuna
|
||||
- Removed directional placement of Ethereal planks
|
||||
- Removed marram grass from sandstone desert shores
|
||||
- Updated Minetest Game from upstream
|
||||
|
||||
## v1.0.0
|
||||
|
||||
- Asuna is no longer a work-in-progress! Asuna will continue to see updates; this simply means that Asuna is no longer considered to be in a new/experimental state
|
||||
- New built-in mods: Researcher, 3D Armor, Find Biome, Effervescence; if you have any of these mods enabled for your existing Asuna worlds, it is recommended to disable them in favor of Asuna's built-in mods
|
||||
- Gameplay updates are now structured as *content packs* which are configurable via settings -- **CHECK YOUR GAME SETTINGS** to reconfigure any previous changes that you might have made
|
||||
- Revamped Jumble biome: now features more distinct trees and biome features + fixed missing cave definition to give it proper fungal/mushroom caves
|
||||
- Set height limit to max for biomes that were unnecessarily limited to lower elevations (Grassland, Plains, Prairie, Birch Forest, Sakura, Jumble, Mushroom, Grove)
|
||||
- Eight new ambient music tracks by [Sascha Ende](https://filmmusic.io/) (and removed two less fitting nighttime tracks)
|
||||
- Updated textures based on newer versions of [Baunilha](https://content.luanti.org/packages/Mirtilo/baunilha/) plus some custom textures for crosshairs, giant mushrooms, and select other nodes/items
|
||||
- New awards
|
||||
- Upstream updates to all bundled mods that had available updates
|
||||
- Globally-aligned textures for Minetest Game stairs and slabs
|
||||
- New overall goal tracker for Awards UI and more consistent award listing
|
||||
- Lots of bug fixes: possible crash and behavior issues with slimes, beds previously not passing the night, mapgen quirks, missing groups for certain flowers, and so much more!
|
824
LICENSE
Normal file
|
@ -0,0 +1,824 @@
|
|||
ASUNA LICENSES
|
||||
==============
|
||||
|
||||
In accordance with GPL requirements of works included in this project, this
|
||||
game as a whole is released under GPLv3. Additionally, specific works within
|
||||
the game are provided under various other licenses. These works and their
|
||||
licenses are listed below. The text of the GPLv3 license that covers this whole
|
||||
work follows the other listed works.
|
||||
|
||||
In accordance with GPL requirements to indicate changes to works, all changes
|
||||
made to the below listed works are officially made on or after 25 January 2023.
|
||||
|
||||
- Main menu graphics
|
||||
- Locations: ./menu/ ./screenshot.xcf ./screenshot.png
|
||||
- License file: ./menu/LICENSE
|
||||
- 3D Armor
|
||||
- Location: ./mods/3d_armor/
|
||||
- License file: ./mods/3d_armor/LICENSE.md
|
||||
- Advanced Biome Decoration API
|
||||
- Location: ./mods/abdecor/
|
||||
- License file: ./mods/abdecor/LICENSE
|
||||
- Animalia
|
||||
- Location: ./mods/animalia/
|
||||
- License file: ./mods/animalia/LICENSE
|
||||
- Changes were made to this work
|
||||
- Asuna Awards
|
||||
- Location: ./mods/asuna/asuna_awards/
|
||||
- License file: ./mods/asuna/asuna_awards/LICENSE
|
||||
- Asuna Core
|
||||
- Location: ./mods/asuna/asuna_core
|
||||
- License file: ./mods/asuna/asuna_core/LICENSE
|
||||
- Additional credits: ./mods/asuna/asuna_core/sounds/music/CREDITS.md
|
||||
- Asuna Textures
|
||||
- Location: ./mods/asuna/asuna_textures/
|
||||
- License file: ./mods/asuna/asuna_textures/textures/baunilha/LICENSE.txt
|
||||
- License file: ./mods/asuna/asuna_textures/textures/butterflies/LICENSE
|
||||
- License file: ./mods/asuna/asuna_textures/textures/ethereal/LICENSE
|
||||
- License file: ./mods/asuna/asuna_textures/textures/x_farming/LICENSE
|
||||
- Additional credits: ./mods/asuna/asuna_textures/CREDITS.md
|
||||
- Additional credits: ./mods/asuna/asuna_textures/textures/custom/CREDITS.md
|
||||
- Awards
|
||||
- Location: ./mods/awards/
|
||||
- License file: ./mods/awards/LICENSE.txt
|
||||
- Changes were made to this work
|
||||
- Baked Clay
|
||||
- Location: ./mods/bakedclay/
|
||||
- License file: ./mods/bakedclay/license.txt
|
||||
- Changes were made to this work
|
||||
- Beautiful Flowers
|
||||
- Location: ./mods/beautiflowers
|
||||
- License file: ./mods/beautiflowers/LICENSE
|
||||
- Changes were made to this work
|
||||
- Biomes
|
||||
- Location: ./mods/biomes/
|
||||
- License file: ./mods/biomes/license.txt
|
||||
- Additional credits: ./mods/biomes/CREDITS.md
|
||||
- Changes were made to this work
|
||||
- Carpets
|
||||
- Location: ./mods/carpets/
|
||||
- License file: ./mods/carpets/LICENSE
|
||||
- Filled Bottles
|
||||
- Location: ./mods/bottles/
|
||||
- License file: ./mods/bottles/LICENSE
|
||||
- Additional credits: ./mods/bottles/CREDITS.md
|
||||
- Builtin Item
|
||||
- Location: ./mods/builtin_item/
|
||||
- License file: ./mods/builtin_item/license.txt
|
||||
- Changes were made to this work
|
||||
- Caverealms Lite
|
||||
- Location: ./mods/caverealms/
|
||||
- License file: ./mods/caverealms/LICENSE.txt
|
||||
- Changes were made to this work
|
||||
- Colorful Beds
|
||||
- Location: ./mods/colorful_beds/
|
||||
- License file: ./mods/colorful_beds/license.txt
|
||||
- Changes were made to this work
|
||||
- Creatura
|
||||
- Location: ./mods/creatura/
|
||||
- License file: ./mods/creatura/LICENSE
|
||||
- Effervescence
|
||||
- Location: ./mods/effervescence/
|
||||
- License file: ./mods/effervescence/LICENSE
|
||||
- Changes were made to this work
|
||||
- Ethereal
|
||||
- Location: ./mods/ethereal/
|
||||
- License file: ./mods/ethereal/license.txt
|
||||
- License file: ./mods/ethereal/textures/alt/license.txt
|
||||
- Changes were made to this work
|
||||
- Everness
|
||||
- Location: ./mods/everness/
|
||||
- License file: ./mods/everness/LICENSE.txt
|
||||
- Changes were made to this work
|
||||
- Farming Redo
|
||||
- Location: ./mods/farming/
|
||||
- License file: ./mods/farming/license.txt
|
||||
- Changes were made to this work
|
||||
- Find Biome
|
||||
- Location: ./mods/findbiome/
|
||||
- License file: ./mods/findbiome/license.txt
|
||||
- Flowerpot
|
||||
- Location: ./mods/flowerpot/
|
||||
- License file: ./mods/flowerpot/LICENSE
|
||||
- Geodes
|
||||
- Location: ./mods/geodes/
|
||||
- License file: ./mods/geodes/LICENSE.txt
|
||||
- Changes were made to this work
|
||||
- Herbs
|
||||
- Location: ./mods/herbs/
|
||||
- License file: ./mods/herbs/LICENSE
|
||||
- Changes were made to this work
|
||||
- Item Drop
|
||||
- Location: ./mods/item_drop/
|
||||
- License file: ./mods/item_drop/LICENSE
|
||||
- Leafstride
|
||||
- Location: ./mods/leafstride/
|
||||
- License file: ./mods/leafstride/LICENSE
|
||||
- Wilhelmines Living Jungle
|
||||
- Location: ./mods/livingjungle/
|
||||
- License file: ./mods/livingjungle/LICENSE
|
||||
- Changes were made to this work
|
||||
- Living Slimes
|
||||
- Location: ./mods/livingslimes/
|
||||
- License file: ./mods/livingslimes/LICENSE.txt
|
||||
- Additional credits: ./mods/livingslimes/sounds/CREDITS.md
|
||||
- Changes were made to this work
|
||||
- LootChests
|
||||
- Location: ./mods/lootchests/
|
||||
- License file: ./mods/lootchests/README.md
|
||||
- Wilhelmines Marinara
|
||||
- Location: ./mods/marinara/
|
||||
- License file: ./mods/marinara/LICENSE
|
||||
- Changes were made to this work
|
||||
- Minetest Game
|
||||
- Location: ./mods/minetest_game/
|
||||
- License files: ./mods/minetest_game/**/license.txt
|
||||
- Changes were made to this work
|
||||
- Music Modpack
|
||||
- Location: ./mods/music_modpack/
|
||||
- License file: ./mods/music_modpack/README.md
|
||||
- Changes were made to this work
|
||||
- Wilhelmines Natural Biomes
|
||||
- Location: ./mods/naturalbiomes/
|
||||
- License file: ./mods/naturalbiomes/LICENSE
|
||||
- Changes were made to this work
|
||||
- Plantlife
|
||||
- Location: ./mods/plantlife_modpack/
|
||||
- License file: ./mods/plantlife_modpack/LICENSE
|
||||
- Changes were made to this work
|
||||
- Player Monoids
|
||||
- Location: ./mods/player_monoids/
|
||||
- License file: ./mods/player_monoids/COPYING
|
||||
- Researcher
|
||||
- Location: ./mods/researcher/
|
||||
- License file: ./mods/researcher/LICENSE
|
||||
- Additional credits: ./mods/researcher/CREDITS.md
|
||||
- Changes were made to this work
|
||||
- Simple Fast Inventory Buttons
|
||||
- Location: ./mods/sfinv_buttons/
|
||||
- License file: ./mods/sfinv_buttons/README.md
|
||||
- Show Wielded Item
|
||||
- Location: ./mods/show_wielded_item/
|
||||
- License file: ./mods/show_wielded_item/README.md
|
||||
- Changes were made to this work
|
||||
- SkinsDB
|
||||
- Location: ./mods/skinsdb/
|
||||
- License file: ./mods/skinsdb/README.md
|
||||
- Additional credits: ./mods/skinsdb/CREDITS.md
|
||||
- Changes were made to this work
|
||||
- Soup
|
||||
- Location: ./mods/soup/
|
||||
- License file: ./mods/soup/LICENSE.md
|
||||
- Changes were made to this work
|
||||
- Stamina
|
||||
- Location: ./mods/stamina/
|
||||
- License file: ./mods/stamina/README.txt
|
||||
- Changes were made to this work
|
||||
- Telemosaic
|
||||
- Location: ./mods/telemosaic/
|
||||
- License file: ./mods/telemosaic/LICENSE
|
||||
- Changes were made to this work
|
||||
- Too Many Stones
|
||||
- Location: ./mods/too_many_stones/
|
||||
- License file: ./mods/too_many_stones/LICENSE.txt
|
||||
- Changes were made to this work
|
||||
- Extended Tooltips
|
||||
- Location: ./mods/tt/
|
||||
- License file: ./mods/tt/LICENSE.txt
|
||||
- Extended Tooltips: Base
|
||||
- Location: ./mods/tt_base/
|
||||
- License file: ./mods/tt_base/LICENSE.txt
|
||||
- Wielded Light
|
||||
- Location: ./mods/wielded_light/
|
||||
- License file: ./mods/wielded_light/LICENSE
|
||||
- Changes were made to this work
|
||||
- Worldgate
|
||||
- Location: ./mods/worldgate/
|
||||
- License file: ./mods/worldgate/LICENSE
|
||||
- Changes were made to this work
|
||||
- X Farming
|
||||
- Location: ./mods/x_farming
|
||||
- License file: ./mods/x_farming/LICENSE.txt
|
||||
- Changes were made to this work
|
||||
|
||||
---
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
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.
|
91
README.md
Normal file
|
@ -0,0 +1,91 @@
|
|||
Asuna
|
||||
=====
|
||||
|
||||
Welcome to the vast and vibrant world of Asuna! Journey through a potpourri of natural wonders as you traverse beautiful and breathtaking landscapes. Forests, meadows, jungles, tundras, deserts, swamps, and more await you at every horizon.
|
||||
|
||||
This passion project brings together some of the very best biome and world decoration mods that the Minetest community has published to date. Much of Asuna's beauty is owed to the mod authors who have openly shared the fruits of their hard work and imagination. Asuna stands to honor these authors and their works.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
Asuna provides a wealth of biomes, flora, fauna, and a few other extras. Primary features are highlighted below with the mods they are primarily derived from:
|
||||
|
||||
- 60+ biomes to explore ([Everness](https://content.minetest.net/packages/SaKeL/everness/), [Biomes](https://content.minetest.net/packages/Atlante/biomes/), [Ethereal](https://content.minetest.net/packages/TenPlus1/ethereal/), [Wilhelmines Natural Biomes](https://content.minetest.net/packages/Liil/naturalbiomes/), [Wilhelmines Living Jungle](https://content.minetest.net/packages/Liil/livingjungle/), [Wilhelmines Marinara](https://content.minetest.net/packages/Liil/marinara/), [Caverealms Lite](https://content.minetest.net/packages/Shara/caverealms/))
|
||||
- 100+ flowers, plants, and mushrooms to discover ([Beautiful Flowers](https://content.minetest.net/packages/1faco/beautiflowers/), [Herbs](https://content.minetest.net/packages/Clyde/herbs/), [Plantlife](https://content.minetest.net/packages/mt-mods/plantlife_modpack/), [Baked Clay](https://content.minetest.net/packages/TenPlus1/bakedclay/), [Minetest Game](https://content.minetest.net/packages/Minetest/minetest_game/), and more from the biome mods)
|
||||
- 30+ farming crops to grow and harvest ([X Farming](https://content.minetest.net/packages/SaKeL/x_farming/), [Farming Redo](https://content.minetest.net/packages/TenPlus1/farming/))
|
||||
- 27 different animals and creatures to be found in their natural habitats ([Animalia](https://content.minetest.net/packages/ElCeejo/animalia/), [Living Slimes](https://content.luanti.org/packages/EmptyStar/livingslimes/))
|
||||
- 80+ decorative stones to unearth ([Too Many Stones](https://content.minetest.net/packages/JoeEnderman/too_many_stones/), [Baked Clay](https://content.minetest.net/packages/TenPlus1/bakedclay/), plus more from biome mods)
|
||||
- 47 unique achievements to unlock ([Awards](https://content.minetest.net/packages/rubenwardy/awards/), [Asuna Awards](https://github.com/asuna-mt/asuna_game_mods/tree/asuna/asuna_awards))
|
||||
- 31 atmospheric background music tracks (curated specifically for Asuna in [asuna_core](https://github.com/asuna-mt/asuna_game_mods/tree/asuna/asuna_core) and played via [Music Modpack](https://content.minetest.net/packages/mt-mods/music_modpack/))
|
||||
|
||||
Content
|
||||
-------
|
||||
|
||||
Asuna's features provide a beautiful setting for your own adventures and creations and a colorful palette with which to create. It's largely up to you to write your own story, to build your own marvels, and to find your own purpose.
|
||||
|
||||
That said, Asuna provides a number of built-in gameplay features which are split up into *content packs*. Each content pack represents a certain category of gameplay features that can be enabled, disabled, and configured individually. This allows you to greatly customize your gameplay experience!
|
||||
|
||||
All content packs are optional and configurable via `Settings > All Settings > Content: Games > Asuna`.
|
||||
|
||||
### Nutrition
|
||||
|
||||
Nutrition grants benefits to players who stay well fed. A derivative of the "hunger" concept, Asuna revamps this familiar gameplay mechanic to be strictly beneficial to players in a way that aids in exploration and survival. Players will enjoy the following effects when they have eaten:
|
||||
|
||||
- Increased movement speed (up to +25% when full)
|
||||
- The ability to sprint (+100% movement speed while holding the `aux1` key)
|
||||
- Health regeneration (chance to recover health every five seconds)
|
||||
- Resistance to poisonous foods (chance to lose nutrition instead of health)
|
||||
|
||||
These effects are most pronounced when a player is fully satiated and will diminish gradually as a player becomes hungry. Hunger will only diminish these effects and cannot hurt players unless starvation is explicitly enabled via game settings (disabled by default).
|
||||
|
||||
This functionality is implemented using a modified version of the popular [Stamina](https://content.minetest.net/packages/sofar/stamina/) mod.
|
||||
|
||||
### Wayfarer
|
||||
|
||||
From hidden treasures to teleportation gates, Wayfarer adds a number of features to Asuna that make exploration more interesting and worthwhile.
|
||||
|
||||
#### Awards
|
||||
|
||||
Awards are a set of accomplishments to strive for as you traverse the world. From simple tasks to feats of exemplary dedication, awards give you more to do in your world. Awards can also help guide you to features of Asuna that might not otherwise be obvious or intuitive.
|
||||
|
||||
Awards are implemented using a modified version of the popular [Awards](https://content.luanti.org/packages/rubenwardy/awards/) mod by Rubenwardy.
|
||||
|
||||
#### Loot Chests
|
||||
|
||||
You can find caches of useful items hidden throughout the caves and landscapes of Asuna. Loot chests, their contents, and their distribution are dependent on the environment in which they are found.
|
||||
|
||||
- **Baskets**: Found next to hills, trees, bushes, and in shallow caves, baskets contain items such as food, grasses, wood, seeds, flowers, and leaves.
|
||||
- **Urns**: These stone vessels are found at a limited depth in caves and can contain tools, rope, stones, gems, crystals, ores, and some limited food items.
|
||||
- **Ancient Chests**: These old stone chests are found rarely in caves and contain high quality tools, rare gems, mese crystals, and many exotic items that are otherwise rare in the world.
|
||||
- **Ocean Chests**: These chests are found in deep ocean amidst dense kelp and near shipwrecks, and they contain a variety of useful items in addition to aquatic decorations.
|
||||
|
||||
These chests are implemented by a modified version of [LootChests modpack](https://content.minetest.net/packages/mt-mods/lootchest_modpack/).
|
||||
|
||||
#### Worldgates
|
||||
|
||||
Discover the Worldgates, an ancient teleportation network that can carry you to distant lands in an instant. Despite their long abandonment, the Worldgates are still highly functional. They can be found throughout the world, some more intact than others, and each adorned in stone by the elder hands that wrought them.
|
||||
|
||||
True to its name, this native teleportation network is implemented via the [Worldgate](https://content.luanti.org/packages/EmptyStar/worldgate/) mod.
|
||||
|
||||
### Menagerie
|
||||
|
||||
Nothing makes a world feel more alive than the creatures that inhabit it. Menagerie adds a variety of animals and creatures to Asuna.
|
||||
|
||||
#### Animals
|
||||
|
||||
Asuna is home to a number of wild animals which can be found roaming about their natural habitats. These animals are highly interactive and can be fed, bred, tamed, and hunted. These animals are implemented via the [Animalia](https://content.minetest.net/packages/ElCeejo/animalia/) mod which describes the animals in greater detail.
|
||||
|
||||
#### Slimes
|
||||
|
||||
Many species of living slimes are native to Asuna. Some of these slimes are docile foragers while others are more territorial. These slimes can be found in many places under the sun, deep underground, and even in oceans and waterways. See the [Living Slimes](https://content.minetest.net/packages/EmptyStar/livingslimes/) mod for information about the various slimes and their behaviors.
|
||||
|
||||
### Research
|
||||
|
||||
The Research content pack adds an *earned creative* mode to Asuna. Research allows you to unlock infinite duplication of the items in your world, but you must discover and/or create the items necessary for research. This is a more interesting alternative to Asuna's true creative mode and it's most useful when applied to survival worlds.
|
||||
|
||||
This feature is implemented via the [Researcher](https://content.luanti.org/packages/EmptyStar/researcher/) mod which thoroughly describes the research process.
|
||||
|
||||
Mods
|
||||
----
|
||||
|
||||
For even more gameplay options, check out [ContentDB](https://content.minetest.net/) to find mods that can fulfill all of your wildest dreams. Asuna aims to maintain compatibility with mods that are compatible with Minetest Game.
|
6
game.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
title = Asuna2
|
||||
author = EmptyStar
|
||||
description = A vibrant world of natural wonders
|
||||
disallowed_mapgens = v6
|
||||
|
||||
release = 30050
|
17
menu/LICENSE
Normal file
|
@ -0,0 +1,17 @@
|
|||
Creative Commons Attribution 4.0 International (CC-BY 4.0)
|
||||
|
||||
© EmptyStar <https://github.com/EmptyStar> 2023
|
||||
|
||||
You are free to:
|
||||
|
||||
Share — copy and redistribute the material in any medium or format
|
||||
Adapt — remix, transform, and build upon the material
|
||||
for any purpose, even commercially.
|
||||
|
||||
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||
|
||||
Under the following terms:
|
||||
|
||||
Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
|
||||
|
||||
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
|
BIN
menu/background.1.png
Normal file
After Width: | Height: | Size: 2.5 MiB |
BIN
menu/background.10.png
Normal file
After Width: | Height: | Size: 1.8 MiB |
BIN
menu/background.2.png
Normal file
After Width: | Height: | Size: 604 KiB |
BIN
menu/background.3.png
Normal file
After Width: | Height: | Size: 3.3 MiB |
BIN
menu/background.4.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
menu/background.5.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
menu/background.6.png
Normal file
After Width: | Height: | Size: 3 MiB |
BIN
menu/background.7.png
Normal file
After Width: | Height: | Size: 1.9 MiB |
BIN
menu/background.8.png
Normal file
After Width: | Height: | Size: 2.5 MiB |
BIN
menu/background.9.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
menu/background.png
Normal file
After Width: | Height: | Size: 2.4 MiB |
BIN
menu/header.png
Normal file
After Width: | Height: | Size: 90 KiB |
BIN
menu/icon.png
Normal file
After Width: | Height: | Size: 252 KiB |
1
minetest.conf
Normal file
|
@ -0,0 +1 @@
|
|||
time_speed = 72
|
525
mods/3d_armor/3d_armor/README.md
Normal file
|
@ -0,0 +1,525 @@
|
|||
# [mod] Visible Player Armor [3d_armor]
|
||||
|
||||
| | | | |
|
||||
|--|--|--|--|
|
||||
|-[Overview](#overview) |||-[API](#api)
|
||||
|-[Armor Configuration](#armor-configuration) |||- - [3d_Armor Item Storage](#3d_armor-item-storage)
|
||||
|- - [disable_specific_materials](#to-disable-individual-armor-materials) |||- - [Armor Registration](#armor-registration)
|
||||
|- - [armor_init_delay](#initialization-glitches-when-a-player-first-joins) |||- - [Registering Armor Groups](#registering-armor-groups)
|
||||
|- - [wieldview_update_time](#how-often-player-wield-items-are-updated) |||- - [Groups used by 3d_Armor](#groups-used-by-3d_armor)
|
||||
|- - [armor_bones_delay](#armor-not-in-bones-due-to-server-lag) |||- - - [Elements](#elements)
|
||||
|- - [armor_update_time](#how-often-player-armor-items-are-updated) |||- - - [Attributes](#attributes)
|
||||
|- - [armor_drop](#drop-armor-when-a-player-dies) |||- - - [Physics](#physics)
|
||||
|- - [armor_destroy](#destroy-armor-when-a-player-dies) |||- - - [Durability](#durability)
|
||||
|- - [armor_level_multiplier](#armor-level-multiplyer) |||- - - [Armor Material](#armor-material)
|
||||
|- - [armor_heal_multiplier](#armor-healing-multiplyer) |||- - [Armour Functions](#armor-functions)
|
||||
|- - [armor_set_elements](#allows-the-customisation-of-armor-set) |||- - - [armor:set_player_armor](#armor-set_player_armor)
|
||||
|- - [armor_set_bonus](#armor-set-bonus-multiplier) |||- - - [armor:punch](#armor-punch)
|
||||
|- - [armor_water_protect](#enable-water-protection) |||- - - [armor:damage](#armor-damage)
|
||||
|- - [armor_fire_protect](#enable-fire-protection) |||- - - [armor:remove_all](#armor-remove_all)
|
||||
|- - [armor_punch_damage](#enable-punch-damage-effects) |||- - - [armor:equip](#armor-equip)
|
||||
|- - [armor_migrate_old_inventory](#migration-of-old-armor-inventories) |||- - - [armor:unequip](#armor-unequip)
|
||||
| |||- - - [armor:update_skin](#armor-update_skin)
|
||||
|-[Credits](#credits) |||- - [Callbacks](#Callbacks)
|
||||
| |||- - - [Item callbacks](#item-callbacks)
|
||||
| |||- - - [Global callbacks](#global-callbacks)
|
||||
|
||||
# Overview
|
||||
|
||||
**Depends:** default
|
||||
|
||||
**Recommends:** sfinv, unified_inventory or smart_inventory (use only one to avoid conflicts)
|
||||
|
||||
**Supports:** player_monoids, armor_monoid and POVA
|
||||
|
||||
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.
|
||||
|
||||
# Armor Configuration
|
||||
|
||||
Change the following default settings by going to Main Menu>>Settings(Tab)>>All Settings(Button)>>Mods>>minetest-3d_Armor>>3d_Armor
|
||||
|
||||
### To disable individual armor materials
|
||||
**set the below to false**
|
||||
|
||||
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
|
||||
armor_material_nether = true
|
||||
|
||||
### Initialization glitches when a player first joins
|
||||
**Increase to prevent glitches**
|
||||
|
||||
armor_init_delay = 2
|
||||
|
||||
### Armor not in bones due to server lag
|
||||
**Increase to help resolve**
|
||||
|
||||
armor_bones_delay = 1
|
||||
|
||||
### How often player armor items are updated
|
||||
**Number represents how often per second update is performed, higher value means less performance hit for servers but armor items maybe delayed in updating when switching.Fractional seconds also supported eg 0.1**
|
||||
|
||||
armor_update_time = 1
|
||||
|
||||
### Drop armor when a player dies
|
||||
**Uses bones mod if present, otherwise items are dropped around the player when false.**
|
||||
|
||||
armor_drop = true
|
||||
|
||||
### Destroy armor when a player dies
|
||||
**overrides armor_drop.**
|
||||
|
||||
armor_destroy = false
|
||||
|
||||
### Armor level multiplyer
|
||||
**Increase to make armor more effective and decrease to make armor less effective**
|
||||
**eg: level_multiplier = 0.5 will reduce armor level by half.**
|
||||
|
||||
armor_level_multiplier = 1
|
||||
|
||||
### Armor healing multiplyer
|
||||
**Increase to make armor healing more effective and decrease to make healing less effective**
|
||||
**eg: armor_heal_multiplier = 0 will disable healing altogether.**
|
||||
|
||||
armor_heal_multiplier = 1
|
||||
|
||||
### Allows the customisation of armor set
|
||||
**Shields already configured as need to be worn to complete an armor set**
|
||||
**These names come from [Element names](#groups-used-by-3d_armor), the second half of the element name only is used eg armor_head is head**
|
||||
|
||||
armor_set_elements = head torso legs feet shield
|
||||
|
||||
### Armor set bonus multiplier
|
||||
**Set to 1 to disable set bonus**
|
||||
|
||||
armor_set_multiplier = 1.1
|
||||
|
||||
### Enable water protection
|
||||
**periodically restores breath when activated**
|
||||
|
||||
armor_water_protect = true
|
||||
|
||||
### Enable fire protection
|
||||
**defaults to true if using ethereal mod**
|
||||
|
||||
armor_fire_protect = false
|
||||
|
||||
### Fire protection enabled, disable torch fire damage
|
||||
**when fire protection is enabled allows you to disable fire damage from torches**
|
||||
**defaults to true if using ethereal mod**
|
||||
|
||||
armor_fire_protect_torch = false
|
||||
|
||||
### Enable punch damage effects
|
||||
|
||||
armor_punch_damage = true
|
||||
|
||||
### Migration of old armor inventories
|
||||
|
||||
armor_migrate_old_inventory = true
|
||||
|
||||
### How often player wield items are updated
|
||||
**Number represents how often per second update is performed, higher value means less performance hit for servers but wield items maybe delayed in updating when switching. Fractional seconds also supported eg 0.1**
|
||||
***Note this is MT engine functionality but included for completness***
|
||||
|
||||
wieldview_update_time = 1
|
||||
|
||||
# API
|
||||
|
||||
## 3d_Armor item storage
|
||||
3d_Armor stores each armor piece a player currently has equiped in a ***detached*** inventory. The easiest way to access this inventory if needed is using this line of code
|
||||
|
||||
local _, armor_inv = armor:get_valid_player(player, "3d_armor")
|
||||
|
||||
**Example**
|
||||
|
||||
armor:register_on_equip(function(player, index, stack)
|
||||
local _, armor_inv = armor:get_valid_player(player, "3d_armor")
|
||||
for i = 1, 6 do
|
||||
local stack = armor_inv:get_stack("armor", i)
|
||||
if stack:get_name() == "3d_armor:chestplate_gold" then
|
||||
minetest.chat_send_player(player:get_player_name(),"Got to love the Bling!!!")
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
## Armor Registration
|
||||
|
||||
armor:register_armor(name, def)
|
||||
|
||||
Wrapper function for `minetest.register_tool`, which enables the easy registration of new armor items. While registering armor as a tool item is still supported, this may be deprecated in future so all armor items should be registered using *armor:register_armor(name,def)*.
|
||||
|
||||
### Additional fields supported by 3d_armor
|
||||
|
||||
texture = <filename>
|
||||
preview = <filename>
|
||||
armor_groups = <table>
|
||||
damage_groups = <table>
|
||||
reciprocate_damage = <bool>
|
||||
on_equip = <function>
|
||||
on_unequip = <function>
|
||||
on_destroy = <function>
|
||||
on_damage = <function>
|
||||
on_punched = <function>
|
||||
|
||||
***Reciprocal tool*** damage will apply damage back onto the attacking tool/weapon, however this will only be done by the first armor inventory item with `reciprocate_damage = true`, damage does not stack.
|
||||
|
||||
**Example Simple:**
|
||||
|
||||
armor:register_armor("mod_name:chestplate_leather", {
|
||||
description = "Leather Chestplate",
|
||||
inventory_image = "mod_name_inv_chestplate_leather.png",
|
||||
texture = "mod_name_leather_chestplate.png",
|
||||
preview = "mod_name_leather_chestplate_preview.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}
|
||||
})
|
||||
*See ***armor.lua*** under **3d_armor>>3d_armor** for further examples*
|
||||
|
||||
**Extended functionality**
|
||||
The values for ***texture*** and ***preview*** do not need to be included when registering armor if they follow the naming convention in the textures mod folder of:
|
||||
***texture:*** *mod_name_leather_chestplate.png*
|
||||
***preview:*** *mod_name_leather_chestplate_preview.png*
|
||||
|
||||
## Registering Armor Groups
|
||||
3d armor has a built in armor group which is ***fleshy*** all players base vulnerability to being fleshy is ***100***.
|
||||
3d armour allows for the easy registration/addition of new armor groups::
|
||||
|
||||
armor:register_armor_group(group, base)
|
||||
|
||||
***group:*** Is the name of the new armor group
|
||||
***base*** Is the starting vulnerability that all players have to that new group. This dosent need to be 100.
|
||||
|
||||
**Example**
|
||||
|
||||
armor:register_armor_group("radiation", 100)
|
||||
|
||||
New armor group is registered called *radiation* and all players start off with a base vulnerability of *100* to radiation.
|
||||
|
||||
**Example** *Showing armor reg, new group usage and custom function*
|
||||
|
||||
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,
|
||||
})
|
||||
|
||||
### Tools/weapons and new armor groups
|
||||
The above allows armor to block/prevent new damage types but you also need to assign the new damage group to a tool/weapon or even a node (see technic mod) to make wearing the armor item meaningful. Simply add the ***armor_groups*** name to the tool items ***damage_groups***.
|
||||
|
||||
**Example**
|
||||
|
||||
minetest.register_tool("mod_name:glowing_sword", {
|
||||
description = "Glowing Sword",
|
||||
inventory_image = "mod_name_tool_glowingsword.png",
|
||||
tool_capabilities = {full_punch_interval = 1.2,max_drop_level=0,
|
||||
groupcaps={
|
||||
cracky = {times={[3]=1.60}, uses=10, maxlevel=1},},
|
||||
damage_groups = {fleshy=10,radiation=20},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
groups = {pickaxe = 1, flammable = 2}
|
||||
})
|
||||
|
||||
## Groups used by 3d_Armor
|
||||
3d_armor has many default groups already registered, these are categorized under 4 main headings
|
||||
- **Elements:** armor_head, armor_torso, armor_legs, armor_feet
|
||||
- **Attributes:** armor_heal, armor_fire, armor_water, armor_feather
|
||||
- **Physics:** physics_jump, physics_speed, physics_gravity
|
||||
- **Durability:** armor_use, flammable
|
||||
|
||||
***Note: for calculation purposes "Attributes" and "Physics" values stack***
|
||||
|
||||
### Elements
|
||||
Additional armor elements can be added by dependant mods, for example shields adds the group armor_shield which has by default a limit that only 1 shield can be worn at a time.
|
||||
|
||||
Adding Elements is more complex but the below code can be used to add new elements;
|
||||
|
||||
if minetest.global_exists("armor") and armor.elements then
|
||||
table.insert(armor.elements, "hands")
|
||||
end
|
||||
**1st line** not strictly needed but checks that the global table "armor" and subtable "elements" exists
|
||||
**2nd line** adds a new value to the armor.elements table called "hands"
|
||||
|
||||
See ***init.lua*** under **3d_armor>>shields** for a further example
|
||||
|
||||
The new armor item can now be registered using the new element
|
||||
**Example**
|
||||
|
||||
armor:register_armor("mod_name:gloves_wood", {
|
||||
description = "Wood Gauntlets",
|
||||
inventory_image = "mod_name_inv_gloves_wood.png",
|
||||
texture = "mod_name_gloves_wood.png",
|
||||
preview = "mod_name_gloves_wood_preview.png",
|
||||
groups = {armor_hands=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},
|
||||
})
|
||||
|
||||
### Attributes
|
||||
Three attributes are avaliable in 3d_armor these are armor_heal, armor_fire and armor_water. Although possible to add additional attributes they would do nothing as code needs to be provide to specifiy the behaviour this could be done in a dependant mod
|
||||
|
||||
#### Armor_heal
|
||||
This isn't how much the armor will heal but relates to the chance the armor will completely block the damage. For each point of ***armor_heal*** there is a 1% chance that damage will be completely blocked, this value will stack between all armor pieces
|
||||
|
||||
**Example**
|
||||
The below Diamond chestplate has a 12% chance to completely block all damage (armor_heal=12), however so do boots, helmet and trousers so if the player was wearing all 4 pieces they would have a 48% chance of blocking all damage each attack.
|
||||
|
||||
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_fire
|
||||
***"Armor_fire"*** provides 5 levels of fire protection
|
||||
- level 1 protects against torches
|
||||
- level 2 protects against crystal spike (Ethereal mod)
|
||||
- level 3 protects against fire
|
||||
- level 4 unused
|
||||
- level 5 protects against lava
|
||||
|
||||
**Example**
|
||||
|
||||
armor:register_armor("mod_name:fire_proof_jacket", {
|
||||
description = "Fire Proof Jacket",
|
||||
inventory_image = "mod_name_inv_fire_proof_jacket.png",
|
||||
groups = {armor_torso=1, armor_fire=3, armor_use=1000},
|
||||
armor_groups = {fleshy=10},
|
||||
damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
|
||||
})
|
||||
|
||||
#### Armor_water
|
||||
***"Armor_water"*** will periodically restore a players breath when underwater. This only has one level or state, which is armor_water=1
|
||||
|
||||
**Example**
|
||||
|
||||
armor:register_armor("mod_name:helmet_underwater_breath", {
|
||||
description = "Helmet of Underwater Breathing",
|
||||
inventory_image = "mod_name_inv_helmet_underwater_breath.png",
|
||||
groups = {armor_head=1, armor_water=1, armor_use=1000},
|
||||
armor_groups = {fleshy=5},
|
||||
damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
|
||||
})
|
||||
|
||||
#### Armor_feather
|
||||
***"Armor_feather"*** will slow a player when falling. This only has one level or state, which is armor_feather=1
|
||||
|
||||
### Physics
|
||||
The physics attributes supported by 3d_armor are ***physics_jump, physics_speed and physics_gravity***. Although 3d_armor supports the use of this with no other mods it is recommended that the mod [player_monoids](https://forum.minetest.net/viewtopic.php?t=14895) is used to help with intermod compatability.
|
||||
|
||||
***physics_jump*** - Will increase/decrease the jump strength of the player so they can jump more/less. The base number is "1" and any value is added or subtracted, supports fractional so "physics_jump=1" will increase jump strength by 100%. "physics_jump= -0.5" will decrease jump by 50%.
|
||||
|
||||
***physics_speed*** - Will increase/decrease the walk speed of the player so they walk faster/slower. The base number is "1" and any value is added or subtracted, supports fractional so "physics_speed=1.5" will increase speed by 150%, "physics_speed= -0.5" will decrease speed by 50%.
|
||||
|
||||
***physics_gravity*** - Will increase/decrease gravity the player experiences so it's higher/lower. The base number is "1" and any value is added or subtracted, supports fractional so "physics_gravity=2" will increase gravity by 200%, "physics_gravity= -1" will decrease gravity by 100%.
|
||||
|
||||
*Note: The player physics modifications won't be applied via `set_physics_override` if `player_physics_locked` is set to 1 in the respective player's meta.*
|
||||
|
||||
### Durability
|
||||
Durability is determined by the value assigned to the group ***armor_use***. The higher the ***armor_use*** value the faster/more quickly it is damaged/degrades. This is calculated using the formula:
|
||||
|
||||
Total uses = approx(65535/armor_use)
|
||||
|
||||
**Example**
|
||||
All wood armor items have an ***armor_use=2000***;
|
||||
|
||||
65535/2000 = 32.76 (32)
|
||||
After 32 uses(hits) the armor item will break.
|
||||
|
||||
All diamond armor items have an ***armor_use=200***;
|
||||
|
||||
65535/2000 = 327.6 (327)
|
||||
After 327 uses(hits) the armor item will break.
|
||||
|
||||
### Armor Material
|
||||
The material the armor is made from is defined by adding the material to the end of registered armor item name. It is very important the material is the last item in the registered item name and it is preceeded by an "_" eg "_materialname".
|
||||
The material name is what 3d_armor uses to determine if a player is wearing a set of armor. To recieve the set bonus all items worn must be made of the same material.
|
||||
So to get a set bonus under the default set settings the players armor items listed below must be made of the same material:
|
||||
* head - Helmet
|
||||
* torso - Chestplate
|
||||
* legs - Leggings
|
||||
* feet - Boots
|
||||
* shield - Shields
|
||||
|
||||
If all of the above were made of material "wood" the player would recieve an ***armor_set_bonus*** of armor_level * 1.1, essentially +10%
|
||||
|
||||
**Example One**
|
||||
|
||||
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},
|
||||
})
|
||||
|
||||
**Example Two**
|
||||
|
||||
armor:register_armor("new_mod:helmet_spartan_bronze", {
|
||||
description = S("Spartan Helmet"),
|
||||
inventory_image = "new_mod_inv_helmet_spartan_bronze.png",
|
||||
groups = {armor_head=1, armor_heal=6, armor_use=350, physics_speed=-0.01, physics_gravity=0.01},
|
||||
armor_groups = {fleshy=12},
|
||||
damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2},
|
||||
})
|
||||
|
||||
***Note: At the moment an armor item can only be made of one material***
|
||||
|
||||
## Armor Functions
|
||||
|
||||
See also: [API Reference](https://minetest-mods.github.io/3d_armor/reference/)
|
||||
|
||||
### armor set_player_armor
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
|
||||
### armor remove_all
|
||||
|
||||
armor:remove_all(player)
|
||||
|
||||
Removes all armors from the player's inventory without triggering any callback.
|
||||
|
||||
### armor equip
|
||||
|
||||
armor:equip(player, armor_name)
|
||||
|
||||
Equip the armor, removing the itemstack from the main inventory if there's one.
|
||||
|
||||
### armor unequip
|
||||
|
||||
armor:unequip(player, armor_name)
|
||||
|
||||
Unequip the armor, adding the itemstack to the main inventory.
|
||||
|
||||
### armor update_skin
|
||||
|
||||
armor:update_skin(player_name)
|
||||
|
||||
Triggers a skin update with the same action as if a field with `skins_set` was submitted.
|
||||
|
||||
## Callbacks
|
||||
|
||||
### Item Callbacks
|
||||
|
||||
In all of the below when armor is destroyed `stack` will contain a copy of the previous stack.
|
||||
|
||||
*unsure what this note means may apply to all item callbacks or just on_punched*
|
||||
Return `false` to override armor damage effects.
|
||||
|
||||
#### on_equip
|
||||
|
||||
on_equip = func(player, index, stack)
|
||||
|
||||
#### on_unequip
|
||||
|
||||
on_unequip = func(player, index, stack)
|
||||
|
||||
#### on_destroy
|
||||
|
||||
on_destroy = func(player, index, stack)
|
||||
|
||||
#### on_damage
|
||||
|
||||
on_damage = func(player, index, stack)
|
||||
|
||||
#### on_punched
|
||||
|
||||
on_punched = func(player, hitter, time_from_last_punch, tool_capabilities)
|
||||
|
||||
`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.
|
||||
When fire protection is enabled, hitter == "fire" in the event of fire damage.
|
||||
|
||||
|
||||
### Global Callbacks
|
||||
|
||||
#### armor register_on_update
|
||||
|
||||
armor:register_on_update(function(player))
|
||||
|
||||
#### armor register_on_equip
|
||||
|
||||
armor:register_on_equip(function(player, index, stack))
|
||||
|
||||
#### armor register_on_unequip
|
||||
|
||||
armor:register_on_unequip(function(player, index, stack))
|
||||
|
||||
#### armor register_on_destroy
|
||||
armor:register_on_destroy(function(player, index, stack))
|
||||
|
||||
**Example**
|
||||
|
||||
armor:register_on_update(function(player)
|
||||
print(player:get_player_name().." armor updated!")
|
||||
end)
|
||||
|
||||
|
||||
# Credits
|
||||
|
||||
### The below have added too, tested or in other ways contributed to the development and ongoing support of 3d_Armor
|
||||
|
||||
|Stu |Stujones11 |Stu |Github Ghosts |
|
||||
|:---------------:|:---------------:|:---------------:|:---------------:|
|
||||
|Pavel_S |BlockMen |Tenplus1 |donat-b |
|
||||
|JPRuehmann |BrandonReese |Megaf |Zeg9 |
|
||||
|poet.nohit |Echoes91 |Adimgar |Khonkhortisan |
|
||||
|VanessaE |CraigyDavi |proller |Thomasrudin |
|
||||
|Byakuren |kilbith (jp) |afflatus |G1ov4 |
|
||||
|Thomas-S |Dragonop |Napiophelios |Emojigit |
|
||||
|rubenwardy |daviddoesminetest|bell07 |OgelGames |
|
||||
|tobyplowy |crazyginger72 |fireglow |bhree |
|
||||
|Lone_Wolf(HT) |Wuzzy(2) |numberZero |Monte48 |
|
||||
|AntumDeluge |Terumoc |runsy |Dacmot |
|
||||
|codexp |davidthecreator |SmallJoker |orbea |
|
||||
|BuckarooBanzay |daret |Exeterdad |Calinou |
|
||||
|Pilcrow182 |indriApollo |HybridDog |CraigyDavi |
|
||||
|Paly-2 |Diogogomes | | |
|
||||
|
||||
*Note: Names gathered from 3d_armor forum thread and github, I may have missed some people, apologises if I have - S01*
|
982
mods/3d_armor/3d_armor/api.lua
Normal file
|
@ -0,0 +1,982 @@
|
|||
|
||||
--- 3D Armor API
|
||||
--
|
||||
-- @topic api
|
||||
|
||||
|
||||
local transparent_armor = minetest.settings:get_bool("armor_transparent", false)
|
||||
|
||||
|
||||
--- Tables
|
||||
--
|
||||
-- @section tables
|
||||
|
||||
--- Armor definition table used for registering armor.
|
||||
--
|
||||
-- @table ArmorDef
|
||||
-- @tfield string description Human-readable name/description.
|
||||
-- @tfield string inventory_image Image filename used for icon.
|
||||
-- @tfield table groups See: `ArmorDef.groups`
|
||||
-- @tfield table armor_groups See: `ArmorDef.armor_groups`
|
||||
-- @tfield table damage_groups See: `ArmorDef.damage_groups`
|
||||
-- @see ItemDef
|
||||
-- @usage local def = {
|
||||
-- description = "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},
|
||||
-- }
|
||||
|
||||
--- Groups table.
|
||||
--
|
||||
-- General groups defining item behavior.
|
||||
--
|
||||
-- Some commonly used groups: ***armor\_<type>***, ***armor\_heal***, ***armor\_use***
|
||||
--
|
||||
-- @table ArmorDef.groups
|
||||
-- @tfield int armor_type The armor type. "head", "torso", "hands", "shield", etc.
|
||||
-- (**Note:** replace "type" with actual type).
|
||||
-- @tfield int armor_heal Healing value of armor when equipped.
|
||||
-- @tfield int armor_use Amount of uses/damage before armor "breaks".
|
||||
-- @see groups
|
||||
-- @usage groups = {
|
||||
-- armor_head = 1,
|
||||
-- armor_heal = 5,
|
||||
-- armor_use = 2000,
|
||||
-- flammable = 1,
|
||||
-- }
|
||||
|
||||
--- Armor groups table.
|
||||
--
|
||||
-- Groups that this item is effective against when taking damage.
|
||||
--
|
||||
-- Some commonly used groups: ***fleshy***
|
||||
--
|
||||
-- @table ArmorDef.armor_groups
|
||||
-- @usage armor_groups = {
|
||||
-- fleshy = 5,
|
||||
-- }
|
||||
|
||||
--- Damage groups table.
|
||||
--
|
||||
-- Groups that this item is effective on when used as a weapon/tool.
|
||||
--
|
||||
-- Some commonly used groups: ***cracky***, ***snappy***, ***choppy***, ***crumbly***, ***level***
|
||||
--
|
||||
-- @table ArmorDef.damage_groups
|
||||
-- @see entity_damage_mechanism
|
||||
-- @usage damage_groups = {
|
||||
-- cracky = 3,
|
||||
-- snappy = 2,
|
||||
-- choppy = 3,
|
||||
-- crumbly = 2,
|
||||
-- level = 1,
|
||||
-- }
|
||||
|
||||
--- @section end
|
||||
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
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", "feather"},
|
||||
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",
|
||||
nether = "nether:nether_ingot",
|
||||
},
|
||||
fire_nodes = {
|
||||
{"nether:lava_source", 5, 8},
|
||||
{"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},
|
||||
{"nether:lava_crust", 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",
|
||||
get_translator = S
|
||||
}
|
||||
|
||||
armor.config = {
|
||||
init_delay = 2,
|
||||
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,
|
||||
material_nether = true,
|
||||
set_elements = "head torso legs feet shield",
|
||||
set_multiplier = 1.1,
|
||||
water_protect = true,
|
||||
fire_protect = true,
|
||||
fire_protect_torch = false,
|
||||
feather_fall = true,
|
||||
punch_damage = true,
|
||||
}
|
||||
|
||||
|
||||
--- Methods
|
||||
--
|
||||
-- @section methods
|
||||
|
||||
--- Registers a new armor item.
|
||||
--
|
||||
-- @function armor:register_armor
|
||||
-- @tparam string name Armor item technical name (ex: "3d\_armor:helmet\_gold").
|
||||
-- @tparam ArmorDef def Armor definition table.
|
||||
-- @usage armor:register_armor("3d_armor:helmet_wood", {
|
||||
-- description = "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 = function(self, name, def)
|
||||
def.on_secondary_use = function(itemstack, player)
|
||||
return armor:equip(player, itemstack)
|
||||
end
|
||||
def.on_place = function(itemstack, player, pointed_thing)
|
||||
if pointed_thing.type == "node" and player and not player:get_player_control().sneak then
|
||||
local node = minetest.get_node(pointed_thing.under)
|
||||
local ndef = minetest.registered_nodes[node.name]
|
||||
if ndef and ndef.on_rightclick then
|
||||
return ndef.on_rightclick(pointed_thing.under, node, player, itemstack, pointed_thing)
|
||||
end
|
||||
end
|
||||
return armor:equip(player, itemstack)
|
||||
end
|
||||
-- The below is a very basic check to try and see if a material name exists as part
|
||||
-- of the item name. However this check is very simple and just checks theres "_something"
|
||||
-- at the end of the item name and logging an error to debug if not.
|
||||
local check_mat_exists = string.match(name, "%:.+_(.+)$")
|
||||
if check_mat_exists == nil then
|
||||
minetest.log("warning:[3d_armor] Registered armor "..name..
|
||||
" does not have \"_material\" specified at the end of the item registration name")
|
||||
end
|
||||
minetest.register_tool(name, def)
|
||||
end
|
||||
|
||||
--- Registers a new armor group.
|
||||
--
|
||||
-- @function armor:register_armor_group
|
||||
-- @tparam string group Group ID.
|
||||
-- @tparam int base Base armor value.
|
||||
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 Registration
|
||||
--
|
||||
-- @section callbacks
|
||||
|
||||
--- Registers a callback for when player visuals are update.
|
||||
--
|
||||
-- @function armor:register_on_update
|
||||
-- @tparam function func Function to be executed.
|
||||
-- @see armor:update_player_visuals
|
||||
-- @usage armor:register_on_update(function(player, index, stack)
|
||||
-- -- code to execute
|
||||
-- end)
|
||||
armor.register_on_update = function(self, func)
|
||||
if type(func) == "function" then
|
||||
table.insert(self.registered_callbacks.on_update, func)
|
||||
end
|
||||
end
|
||||
|
||||
--- Registers a callback for when armor is equipped.
|
||||
--
|
||||
-- @function armor:register_on_equip
|
||||
-- @tparam function func Function to be executed.
|
||||
-- @usage armor:register_on_equip(function(player, index, stack)
|
||||
-- -- code to execute
|
||||
-- end)
|
||||
armor.register_on_equip = function(self, func)
|
||||
if type(func) == "function" then
|
||||
table.insert(self.registered_callbacks.on_equip, func)
|
||||
end
|
||||
end
|
||||
|
||||
--- Registers a callback for when armor is unequipped.
|
||||
--
|
||||
-- @function armor:register_on_unequip
|
||||
-- @tparam function func Function to be executed.
|
||||
-- @usage armor:register_on_unequip(function(player, index, stack)
|
||||
-- -- code to execute
|
||||
-- end)
|
||||
armor.register_on_unequip = function(self, func)
|
||||
if type(func) == "function" then
|
||||
table.insert(self.registered_callbacks.on_unequip, func)
|
||||
end
|
||||
end
|
||||
|
||||
--- Registers a callback for when armor is damaged.
|
||||
--
|
||||
-- @function armor:register_on_damage
|
||||
-- @tparam function func Function to be executed.
|
||||
-- @see armor:damage
|
||||
-- @usage armor:register_on_damage(function(player, index, stack)
|
||||
-- -- code to execute
|
||||
-- end)
|
||||
armor.register_on_damage = function(self, func)
|
||||
if type(func) == "function" then
|
||||
table.insert(self.registered_callbacks.on_damage, func)
|
||||
end
|
||||
end
|
||||
|
||||
--- Registers a callback for when armor is destroyed.
|
||||
--
|
||||
-- @function armor:register_on_destroy
|
||||
-- @tparam function func Function to be executed.
|
||||
-- @see armor:damage
|
||||
-- @usage armor:register_on_destroy(function(player, index, stack)
|
||||
-- -- code to execute
|
||||
-- end)
|
||||
armor.register_on_destroy = function(self, func)
|
||||
if type(func) == "function" then
|
||||
table.insert(self.registered_callbacks.on_destroy, func)
|
||||
end
|
||||
end
|
||||
|
||||
--- @section end
|
||||
|
||||
|
||||
--- Methods
|
||||
--
|
||||
-- @section methods
|
||||
|
||||
--- Runs callbacks.
|
||||
--
|
||||
-- @function armor:run_callbacks
|
||||
-- @tparam function callback Function to execute.
|
||||
-- @tparam ObjectRef player First parameter passed to callback.
|
||||
-- @tparam int index Second parameter passed to callback.
|
||||
-- @tparam ItemStack stack Callback owner.
|
||||
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
|
||||
|
||||
--- Updates visuals.
|
||||
--
|
||||
-- @function armor:update_player_visuals
|
||||
-- @tparam ObjectRef player
|
||||
armor.update_player_visuals = function(self, player)
|
||||
if not player then
|
||||
return
|
||||
end
|
||||
local name = player:get_player_name()
|
||||
if self.textures[name] then
|
||||
player_api.set_textures(player, {
|
||||
self.textures[name].skin,
|
||||
self.textures[name].armor,
|
||||
self.textures[name].wielditem,
|
||||
})
|
||||
end
|
||||
self:run_callbacks("on_update", player)
|
||||
end
|
||||
|
||||
--- Sets player's armor attributes.
|
||||
--
|
||||
-- @function armor:set_player_armor
|
||||
-- @tparam ObjectRef player
|
||||
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 preview = armor:get_preview(name)
|
||||
local texture = "blank.png"
|
||||
local physics = {}
|
||||
local attributes = {}
|
||||
local levels = {}
|
||||
local groups = {}
|
||||
local change = {}
|
||||
local set_worn = {}
|
||||
local armor_multi = 0
|
||||
local worn_armor = armor:get_weared_armor_elements(player)
|
||||
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"] = 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$", "")
|
||||
if not transparent_armor then
|
||||
texture = texture.."^"..tex..".png"
|
||||
end
|
||||
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
|
||||
end
|
||||
end
|
||||
-- The following code compares player worn armor items against requirements
|
||||
-- of which armor pieces are needed to be worn to meet set bonus requirements
|
||||
for loc,item in pairs(worn_armor) do
|
||||
local item_mat = string.match(item, "%:.+_(.+)$")
|
||||
local worn_key = item_mat or "unknown"
|
||||
|
||||
-- Perform location checks to ensure the armor is worn correctly
|
||||
for k,set_loc in pairs(armor.config.set_elements)do
|
||||
if set_loc == loc then
|
||||
if set_worn[worn_key] == nil then
|
||||
set_worn[worn_key] = 0
|
||||
set_worn[worn_key] = set_worn[worn_key] + 1
|
||||
else
|
||||
set_worn[worn_key] = set_worn[worn_key] + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Apply the armor multiplier only if the player is wearing a full set of armor
|
||||
for mat_name,arm_piece_num in pairs(set_worn) do
|
||||
if arm_piece_num == #armor.config.set_elements then
|
||||
armor_multi = armor.config.set_multiplier
|
||||
end
|
||||
end
|
||||
for group, level in pairs(levels) do
|
||||
if level > 0 then
|
||||
level = level * armor.config.level_multiplier
|
||||
if armor_multi ~= 0 then
|
||||
level = level * armor.config.set_multiplier
|
||||
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 player_groups = player:get_armor_groups()
|
||||
local immortal = player_groups.immortal
|
||||
if immortal and immortal ~= 0 then
|
||||
groups.immortal = 1
|
||||
end
|
||||
-- Preserve fall_damage_add_percent group (fall damage modifier)
|
||||
groups.fall_damage_add_percent = player_groups.fall_damage_add_percent
|
||||
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
|
||||
local player_physics_locked = player:get_meta():get_int("player_physics_locked")
|
||||
if player_physics_locked == nil or 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
|
||||
|
||||
--- Action when armor is punched.
|
||||
--
|
||||
-- @function armor:punch
|
||||
-- @tparam ObjectRef player Player wearing the armor.
|
||||
-- @tparam ObjectRef hitter Entity attacking player.
|
||||
-- @tparam[opt] int time_from_last_punch Time in seconds since last punch action.
|
||||
-- @tparam[opt] table tool_capabilities See `entity_damage_mechanism`.
|
||||
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
|
||||
if next(groupcaps) == nil then
|
||||
damage = true
|
||||
end
|
||||
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
|
||||
|
||||
--- Action when armor is damaged.
|
||||
--
|
||||
-- @function armor:damage
|
||||
-- @tparam ObjectRef player
|
||||
-- @tparam int index Inventory index where armor is equipped.
|
||||
-- @tparam ItemStack stack Armor item receiving damaged.
|
||||
-- @tparam int use Amount of wear to add to armor item.
|
||||
armor.damage = function(self, player, index, stack, use)
|
||||
local old_stack = ItemStack(stack)
|
||||
local worn_armor = armor:get_weared_armor_elements(player)
|
||||
if not worn_armor then
|
||||
return
|
||||
end
|
||||
local armor_worn_cnt = 0
|
||||
for k,v in pairs(worn_armor) do
|
||||
armor_worn_cnt = armor_worn_cnt + 1
|
||||
end
|
||||
use = math.ceil(use/armor_worn_cnt)
|
||||
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
|
||||
|
||||
--- Get elements of equipped armor.
|
||||
--
|
||||
-- @function armor:get_weared_armor_elements
|
||||
-- @tparam ObjectRef player
|
||||
-- @treturn table List of equipped armors.
|
||||
armor.get_weared_armor_elements = function(self, player)
|
||||
local name, inv = self:get_valid_player(player, "[get_weared_armor]")
|
||||
local weared_armor = {}
|
||||
if not name then
|
||||
return
|
||||
end
|
||||
for i=1, inv:get_size("armor") do
|
||||
local item_name = inv:get_stack("armor", i):get_name()
|
||||
local element = self:get_element(item_name)
|
||||
if element ~= nil then
|
||||
weared_armor[element] = item_name
|
||||
end
|
||||
end
|
||||
return weared_armor
|
||||
end
|
||||
|
||||
--- Equips a piece of armor to a player.
|
||||
--
|
||||
-- @function armor:equip
|
||||
-- @tparam ObjectRef player Player to whom item is equipped.
|
||||
-- @tparam ItemStack itemstack Armor item to be equipped.
|
||||
-- @treturn ItemStack Leftover item stack.
|
||||
armor.equip = function(self, player, itemstack)
|
||||
local name, armor_inv = self:get_valid_player(player, "[equip]")
|
||||
local armor_element = self:get_element(itemstack:get_name())
|
||||
if name and armor_element then
|
||||
local index
|
||||
for i=1, armor_inv:get_size("armor") do
|
||||
local stack = armor_inv:get_stack("armor", i)
|
||||
if self:get_element(stack:get_name()) == armor_element then
|
||||
--prevents equiping an armor that would unequip a cursed armor.
|
||||
if minetest.get_item_group(stack:get_name(), "cursed") ~= 0 then
|
||||
return itemstack
|
||||
end
|
||||
index = i
|
||||
self:unequip(player, armor_element)
|
||||
break
|
||||
elseif not index and stack:is_empty() then
|
||||
index = i
|
||||
end
|
||||
end
|
||||
local stack = itemstack:take_item()
|
||||
armor_inv:set_stack("armor", index, stack)
|
||||
self:run_callbacks("on_equip", player, index, stack)
|
||||
self:set_player_armor(player)
|
||||
self:save_armor_inventory(player)
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
|
||||
--- Unequips a piece of armor from a player.
|
||||
--
|
||||
-- @function armor:unequip
|
||||
-- @tparam ObjectRef player Player from whom item is removed.
|
||||
-- @tparam string armor_element Armor type identifier associated with the item
|
||||
-- to be removed ("head", "torso", "hands", "shield", "legs", "feet", etc.).
|
||||
armor.unequip = function(self, player, armor_element)
|
||||
local name, armor_inv = self:get_valid_player(player, "[unequip]")
|
||||
if not name then
|
||||
return
|
||||
end
|
||||
for i=1, armor_inv:get_size("armor") do
|
||||
local stack = armor_inv:get_stack("armor", i)
|
||||
if self:get_element(stack:get_name()) == armor_element then
|
||||
armor_inv:set_stack("armor", i, "")
|
||||
minetest.after(0, function()
|
||||
local pplayer = minetest.get_player_by_name(name)
|
||||
if pplayer then -- player is still online
|
||||
local inv = pplayer:get_inventory()
|
||||
if inv:room_for_item("main", stack) then
|
||||
inv:add_item("main", stack)
|
||||
else
|
||||
minetest.add_item(pplayer:get_pos(), stack)
|
||||
end
|
||||
end
|
||||
end)
|
||||
self:run_callbacks("on_unequip", player, i, stack)
|
||||
self:set_player_armor(player)
|
||||
self:save_armor_inventory(player)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- Removes all armor worn by player.
|
||||
--
|
||||
-- @function armor:remove_all
|
||||
-- @tparam ObjectRef player
|
||||
armor.remove_all = function(self, player)
|
||||
local name, inv = self:get_valid_player(player, "[remove_all]")
|
||||
if not name then
|
||||
return
|
||||
end
|
||||
inv:set_list("armor", {})
|
||||
self:set_player_armor(player)
|
||||
self:save_armor_inventory(player)
|
||||
end
|
||||
|
||||
local skin_mod
|
||||
|
||||
--- Retrieves player's current skin.
|
||||
--
|
||||
-- @function armor:get_player_skin
|
||||
-- @tparam string name Player name.
|
||||
-- @treturn string Skin filename.
|
||||
armor.get_player_skin = function(self, name)
|
||||
if (skin_mod == "skins" or skin_mod == "simple_skins") and skins.skins[name] then
|
||||
return skins.skins[name]..".png"
|
||||
elseif skin_mod == "u_skins" and u_skins.u_skins[name] then
|
||||
return u_skins.u_skins[name]..".png"
|
||||
elseif skin_mod == "wardrobe" and wardrobe.playerSkins and wardrobe.playerSkins[name] then
|
||||
return wardrobe.playerSkins[name]
|
||||
end
|
||||
return armor.default_skin..".png"
|
||||
end
|
||||
|
||||
--- Updates skin.
|
||||
--
|
||||
-- @function armor:update_skin
|
||||
-- @tparam string name Player name.
|
||||
armor.update_skin = function(self, name)
|
||||
minetest.after(0, function()
|
||||
local pplayer = minetest.get_player_by_name(name)
|
||||
if pplayer then
|
||||
self.textures[name].skin = self:get_player_skin(name)
|
||||
self:set_player_armor(pplayer)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
--- Adds preview for armor inventory.
|
||||
--
|
||||
-- @function armor:add_preview
|
||||
-- @tparam string preview Preview image filename.
|
||||
armor.add_preview = function(self, preview)
|
||||
skin_previews[preview] = true
|
||||
end
|
||||
|
||||
--- Retrieves preview for armor inventory.
|
||||
--
|
||||
-- @function armor:get_preview
|
||||
-- @tparam string name Player name.
|
||||
-- @treturn string Preview image filename.
|
||||
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
|
||||
|
||||
--- Retrieves armor formspec.
|
||||
--
|
||||
-- @function armor:get_armor_formspec
|
||||
-- @tparam string name Player name.
|
||||
-- @tparam[opt] bool listring Use `listring` formspec element (default: `false`).
|
||||
-- @treturn string Formspec formatted string.
|
||||
armor.get_armor_formspec = function(self, name, listring)
|
||||
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
|
||||
|
||||
--- Retrieves element.
|
||||
--
|
||||
-- @function armor:get_element
|
||||
-- @tparam string item_name
|
||||
-- @return Armor element.
|
||||
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
|
||||
|
||||
--- Serializes armor inventory.
|
||||
--
|
||||
-- @function armor:serialize_inventory_list
|
||||
-- @tparam table list Inventory contents.
|
||||
-- @treturn string
|
||||
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
|
||||
|
||||
--- Deserializes armor inventory.
|
||||
--
|
||||
-- @function armor:deserialize_inventory_list
|
||||
-- @tparam string list_string Serialized inventory contents.
|
||||
-- @treturn table
|
||||
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
|
||||
|
||||
--- Loads armor inventory.
|
||||
--
|
||||
-- @function armor:load_armor_inventory
|
||||
-- @tparam ObjectRef player
|
||||
-- @treturn bool
|
||||
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
|
||||
|
||||
--- Saves armor inventory.
|
||||
--
|
||||
-- Inventory is stored in `PlayerMetaRef` string "3d\_armor\_inventory".
|
||||
--
|
||||
-- @function armor:save_armor_inventory
|
||||
-- @tparam ObjectRef player
|
||||
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
|
||||
|
||||
--- Updates inventory.
|
||||
--
|
||||
-- DEPRECATED: Legacy inventory support.
|
||||
--
|
||||
-- @function armor:update_inventory
|
||||
-- @param player
|
||||
armor.update_inventory = function(self, player)
|
||||
-- DEPRECATED: Legacy inventory support
|
||||
end
|
||||
|
||||
--- Sets inventory stack.
|
||||
--
|
||||
-- @function armor:set_inventory_stack
|
||||
-- @tparam ObjectRef player
|
||||
-- @tparam int i Armor inventory index.
|
||||
-- @tparam ItemStack stack Armor item.
|
||||
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
|
||||
|
||||
--- Checks for a player that can use armor.
|
||||
--
|
||||
-- @function armor:get_valid_player
|
||||
-- @tparam ObjectRef player
|
||||
-- @tparam string msg Additional info for log messages.
|
||||
-- @treturn list Player name & armor inventory.
|
||||
-- @usage local name, inv = armor:get_valid_player(player, "[equip]")
|
||||
armor.get_valid_player = function(self, player, msg)
|
||||
msg = msg or ""
|
||||
if not player then
|
||||
minetest.log("warning", ("3d_armor%s: Player reference is nil"):format(msg))
|
||||
return
|
||||
end
|
||||
if type(player) ~= "userdata" then
|
||||
-- Fake player, fail silently
|
||||
return
|
||||
end
|
||||
local name = player:get_player_name()
|
||||
if not name then
|
||||
minetest.log("warning", ("3d_armor%s: Player name is nil"):format(msg))
|
||||
return
|
||||
end
|
||||
local inv = minetest.get_inventory({type="detached", name=name.."_armor"})
|
||||
if not inv then
|
||||
-- This check may fail when called inside `on_joinplayer`
|
||||
-- in that case, the armor will be initialized/updated later on
|
||||
minetest.log("warning", ("3d_armor%s: Detached armor inventory is nil"):format(msg))
|
||||
return
|
||||
end
|
||||
return name, inv
|
||||
end
|
||||
|
||||
--- Drops armor item at given position.
|
||||
--
|
||||
-- @tparam vector pos
|
||||
-- @tparam ItemStack stack Armor item to be dropped.
|
||||
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
|
||||
|
||||
--- Allows skin mod to be set manually.
|
||||
--
|
||||
-- Useful for skin mod forks that do not use the same name.
|
||||
--
|
||||
-- @tparam string mod Name of skin mod. Recognized names are "simple\_skins", "u\_skins", & "wardrobe".
|
||||
armor.set_skin_mod = function(mod)
|
||||
skin_mod = mod
|
||||
end
|
62
mods/3d_armor/3d_armor/armor.conf.example
Normal file
|
@ -0,0 +1,62 @@
|
|||
-- 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",
|
||||
nether = "nether:nether_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
|
||||
|
||||
-- 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
|
84
mods/3d_armor/3d_armor/crafting_guide.txt
Normal file
|
@ -0,0 +1,84 @@
|
|||
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] **
|
||||
[3d_armor:helmet_nether] X = [ethereal:nether_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] **
|
||||
[3d_armor:chestplate_nether] X = [ethereal:nether_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] **
|
||||
[3d_armor:leggings_nether] X = [ethereal:nether_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] **
|
||||
[3d_armor:boots_nether] X = [ethereal:nether_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
|
||||
** Requires nether mod - https://github.com/minetest-mods/nether.git
|
502
mods/3d_armor/3d_armor/init.lua
Normal file
|
@ -0,0 +1,502 @@
|
|||
local modname = minetest.get_current_modname()
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local worldpath = minetest.get_worldpath()
|
||||
local last_punch_time = {}
|
||||
local timer = 0
|
||||
|
||||
dofile(modpath.."/api.lua")
|
||||
|
||||
-- local functions
|
||||
local F = minetest.formspec_escape
|
||||
local S = armor.get_translator
|
||||
|
||||
-- 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) == "string" then
|
||||
setting = tostring(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
|
||||
|
||||
-- Convert set_elements to a Lua table splitting on blank spaces
|
||||
local t_set_elements = armor.config.set_elements
|
||||
armor.config.set_elements = string.split(t_set_elements, " ")
|
||||
|
||||
-- Remove torch damage if fire_protect_torch == false
|
||||
if armor.config.fire_protect_torch == false and armor.config.fire_protect == true then
|
||||
for k,v in pairs(armor.fire_nodes) do
|
||||
for k2,v2 in pairs(v) do
|
||||
if string.find (v2,"torch") then
|
||||
armor.fire_nodes[k] = nil
|
||||
end
|
||||
end
|
||||
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.set_skin_mod(mod)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- 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 = assert(initplayer:get_player_name())
|
||||
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)
|
||||
if player:get_player_name() ~= name then
|
||||
return 0
|
||||
end
|
||||
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)
|
||||
if player:get_player_name() ~= name then
|
||||
return 0
|
||||
end
|
||||
--cursed items cannot be unequiped by the player
|
||||
local is_cursed = minetest.get_item_group(stack:get_name(), "cursed") ~= 0
|
||||
if not minetest.is_creative_enabled(player) and is_cursed then
|
||||
return 0
|
||||
end
|
||||
return stack:get_count()
|
||||
end,
|
||||
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
||||
if player:get_player_name() ~= name then
|
||||
return 0
|
||||
end
|
||||
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] = {
|
||||
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 = "blank.png",
|
||||
wielditem = "blank.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)
|
||||
end
|
||||
|
||||
-- Armor Player Model
|
||||
|
||||
player_api.register_model("3d_armor_character.b3d", {
|
||||
animation_speed = 30,
|
||||
textures = {
|
||||
armor.default_skin..".png",
|
||||
"blank.png",
|
||||
"blank.png",
|
||||
},
|
||||
animations = {
|
||||
stand = {x=0, y=79},
|
||||
lay = {x=162, y=166, eye_height = 0.3, override_local = true,
|
||||
collisionbox = {-0.6, 0.0, -0.6, 0.6, 0.3, 0.6}},
|
||||
walk = {x=168, y=187},
|
||||
mine = {x=189, y=198},
|
||||
walk_mine = {x=200, y=219},
|
||||
sit = {x=81, y=160, eye_height = 0.8, override_local = true,
|
||||
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.0, 0.3}},
|
||||
-- compatibility w/ the emote mod
|
||||
wave = {x = 192, y = 196, override_local = true},
|
||||
point = {x = 196, y = 196, override_local = true},
|
||||
freeze = {x = 205, y = 205, override_local = true},
|
||||
},
|
||||
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
|
||||
-- stepheight: use default
|
||||
eye_height = 1.47,
|
||||
})
|
||||
|
||||
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
|
||||
armor:update_skin(player_name)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
player_api.set_model(player, "3d_armor_character.b3d")
|
||||
init_player_armor(player)
|
||||
end)
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
local name = player:get_player_name()
|
||||
if name then
|
||||
armor.def[name] = nil
|
||||
armor.textures[name] = nil
|
||||
end
|
||||
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
|
||||
--soulbound armors remain equipped after death
|
||||
if minetest.get_item_group(stack:get_name(), "soulbound") == 0 then
|
||||
table.insert(drop, stack)
|
||||
armor:run_callbacks("on_unequip", player, i, stack)
|
||||
armor_inv:set_stack("armor", i, nil)
|
||||
end
|
||||
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)
|
||||
minetest.register_on_respawnplayer(function(player)
|
||||
-- reset un-dropped armor and it's effects
|
||||
armor:set_player_armor(player)
|
||||
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 hitter then
|
||||
local hit_ip = hitter:is_player()
|
||||
if name and hit_ip and minetest.is_protected(player:get_pos(), "") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
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 not minetest.is_player(player) then
|
||||
return hp_change
|
||||
end
|
||||
|
||||
if reason.type == "drown" or reason.hunger or hp_change >= 0 then
|
||||
return hp_change
|
||||
end
|
||||
|
||||
local name = player:get_player_name()
|
||||
local properties = player:get_properties()
|
||||
local hp = player:get_hp()
|
||||
if hp + hp_change < properties.hp_max 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
|
||||
|
||||
return hp_change
|
||||
end, true)
|
||||
|
||||
minetest.register_globalstep(function(dtime)
|
||||
timer = timer + dtime
|
||||
|
||||
if armor.config.feather_fall == true then
|
||||
for _,player in pairs(minetest.get_connected_players()) do
|
||||
local name = player:get_player_name()
|
||||
if armor.def[name].feather > 0 then
|
||||
local vel_y = player:get_velocity().y
|
||||
if vel_y < -0.5 then
|
||||
vel_y = -(vel_y * 0.05)
|
||||
player:add_velocity({x = 0, y = vel_y, z = 0})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if timer <= armor.config.init_delay then
|
||||
return
|
||||
end
|
||||
timer = 0
|
||||
|
||||
-- water breathing protection, added by TenPlus1
|
||||
if armor.config.water_protect == true then
|
||||
for _,player in pairs(minetest.get_connected_players()) do
|
||||
local name = player:get_player_name()
|
||||
if armor.def[name].water > 0 and
|
||||
player:get_breath() < 10 then
|
||||
player:set_breath(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
if armor.config.fire_protect == true then
|
||||
|
||||
-- don't make torches hurt :D
|
||||
--minetest.override_item("default:torch", {damage_per_second = 1})
|
||||
--minetest.override_item("default:torch_wall", {damage_per_second = 1})
|
||||
--minetest.override_item("default:torch_ceiling", {damage_per_second = 1})
|
||||
|
||||
-- check player damage for any hot nodes we may be protected against
|
||||
minetest.register_on_player_hpchange(function(player, hp_change, reason)
|
||||
|
||||
if reason.type == "node_damage" and reason.node then
|
||||
-- fire protection
|
||||
if armor.config.fire_protect == true and hp_change < 0 then
|
||||
local name = player:get_player_name()
|
||||
for _,igniter in pairs(armor.fire_nodes) do
|
||||
if reason.node == igniter[1] then
|
||||
if armor.def[name].fire >= igniter[2] then
|
||||
hp_change = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return hp_change
|
||||
end, true)
|
||||
end
|
25
mods/3d_armor/3d_armor/integration_test.lua
Normal file
|
@ -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)
|
7
mods/3d_armor/3d_armor/locale/3d_armor.de.tr
Normal file
|
@ -0,0 +1,7 @@
|
|||
# textdomain: 3d_armor
|
||||
Radiation=Strahlung
|
||||
Level=Stufe
|
||||
Heal=Heilung
|
||||
Fire=Feuer
|
||||
Your @1 is almost broken!=@1 ist fast kaputt!
|
||||
Your @1 got destroyed!=@1 wurde zerstört!
|
7
mods/3d_armor/3d_armor/locale/3d_armor.eo.tr
Normal file
|
@ -0,0 +1,7 @@
|
|||
# textdomain: 3d_armor
|
||||
Radiation=Radiado
|
||||
Level=Nivelo
|
||||
Heal=Blokŝanco
|
||||
Fire=Fajro
|
||||
Your @1 is almost broken!=Via @1 estas preskaŭ rompita!
|
||||
Your @1 got destroyed!=Via @1 detruiĝis!
|
7
mods/3d_armor/3d_armor/locale/3d_armor.es.tr
Normal file
|
@ -0,0 +1,7 @@
|
|||
# textdomain: 3d_armor
|
||||
Radiation=Radiación
|
||||
Level=Nivel
|
||||
Heal=Salud
|
||||
Fire=Fuego
|
||||
Your @1 is almost broken!=¡Tu @1 esta a punto de romperse!
|
||||
Your @1 got destroyed!=¡Tu @1 fue destruído!
|
7
mods/3d_armor/3d_armor/locale/3d_armor.fr.tr
Normal file
|
@ -0,0 +1,7 @@
|
|||
# textdomain: 3d_armor
|
||||
Radiation=Radiation
|
||||
Level=Niveau
|
||||
Heal=Soins
|
||||
Fire=Fire
|
||||
Your @1 is almost broken!=Une partie de votre armure est presque détruite : @1 !
|
||||
Your @1 got destroyed!=Une partie de votre armure a été détruite : @1 !
|
7
mods/3d_armor/3d_armor/locale/3d_armor.it.tr
Normal file
|
@ -0,0 +1,7 @@
|
|||
# textdomain: 3d_armor
|
||||
Radiation=Radiazione
|
||||
Level=Livello
|
||||
Heal=Guarigione
|
||||
Fire=Fuoco
|
||||
Your @1 is almost broken!=@1 quasi in frantumi!
|
||||
Your @1 got destroyed!=@1 in frantumi!
|
7
mods/3d_armor/3d_armor/locale/3d_armor.ms.tr
Normal file
|
@ -0,0 +1,7 @@
|
|||
# textdomain: 3d_armor
|
||||
Radiation=Radiasi
|
||||
Level=Tahap
|
||||
Heal=Pulih
|
||||
Fire=Api
|
||||
Your @1 is almost broken!=
|
||||
Your @1 got destroyed!=@1 anda telah musnah!
|
7
mods/3d_armor/3d_armor/locale/3d_armor.pl.tr
Normal file
|
@ -0,0 +1,7 @@
|
|||
# textdomain: 3d_armor
|
||||
Radiation=Promieniowanie
|
||||
Level=Poziom
|
||||
Heal=Uzdrawianie
|
||||
Fire=Ogień
|
||||
Your @1 is almost broken!=Twój @1 jest prawie zepsuty!
|
||||
Your @1 got destroyed!=Twój @1 został zniszczony!
|
7
mods/3d_armor/3d_armor/locale/3d_armor.pt.tr
Normal file
|
@ -0,0 +1,7 @@
|
|||
# textdomain: 3d_armor
|
||||
Radiation=Radiação
|
||||
Level=Nível
|
||||
Heal=Saúde
|
||||
Fire=Fogo
|
||||
Your @1 is almost broken!=
|
||||
Your @1 got destroyed!=@1 foi destruído(a)!
|
7
mods/3d_armor/3d_armor/locale/3d_armor.pt_BR.tr
Normal file
|
@ -0,0 +1,7 @@
|
|||
# textdomain: 3d_armor
|
||||
Radiation=Radiação
|
||||
Level=Nível
|
||||
Heal=Saúde
|
||||
Fire=Fogo
|
||||
Your @1 is almost broken!=
|
||||
Your @1 got destroyed!=@1 foi destruído(a)!
|
7
mods/3d_armor/3d_armor/locale/3d_armor.ru.tr
Normal file
|
@ -0,0 +1,7 @@
|
|||
# textdomain: 3d_armor
|
||||
Radiation=излучение
|
||||
Level=уровень
|
||||
Heal=исцеление
|
||||
Fire=огонь
|
||||
Your @1 is almost broken!=
|
||||
Your @1 got destroyed!=твой(и) @1 был(и) разрушен(ы)!
|
7
mods/3d_armor/3d_armor/locale/3d_armor.sv.tr
Normal file
|
@ -0,0 +1,7 @@
|
|||
# textdomain: 3d_armor
|
||||
Radiation=Strålning
|
||||
Level=Nivå
|
||||
Heal=Läkning
|
||||
Fire=Eld
|
||||
Your @1 is almost broken!=Din @1 är nästan förstörd!
|
||||
Your @1 got destroyed!=Din @1 blev förstörd!
|
7
mods/3d_armor/3d_armor/locale/template.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
# textdomain: 3d_armor
|
||||
Radiation=
|
||||
Level=
|
||||
Heal=
|
||||
Fire=
|
||||
Your @1 is almost broken!=
|
||||
Your @1 got destroyed!=
|
5
mods/3d_armor/3d_armor/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = 3d_armor
|
||||
depends = default, player_api
|
||||
optional_depends = player_monoids, armor_monoid, pova, moreores
|
||||
description = Adds craftable armor that is visible to other players.
|
||||
min_minetest_version = 5.0
|
BIN
mods/3d_armor/3d_armor/models/3d_armor_character.b3d
Normal file
BIN
mods/3d_armor/3d_armor/textures/character_preview.png
Normal file
After Width: | Height: | Size: 349 B |
BIN
mods/3d_armor/3d_armor/textures/inventory_plus_armor.png
Normal file
After Width: | Height: | Size: 571 B |
7
mods/3d_armor/3d_armor/tools/README.md
Normal file
|
@ -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
|
38
mods/3d_armor/3d_armor_ip/init.lua
Normal file
|
@ -0,0 +1,38 @@
|
|||
-- support for i18n
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
local F = minetest.formspec_escape
|
||||
|
||||
if not minetest.global_exists("inventory_plus") then
|
||||
minetest.log("warning", "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)
|
3
mods/3d_armor/3d_armor_ip/locale/3d_armor_ip.de.tr
Normal file
|
@ -0,0 +1,3 @@
|
|||
# textdomain: 3d_armor_ip
|
||||
Back=Zurück
|
||||
Armor=Rüstung
|
3
mods/3d_armor/3d_armor_ip/locale/3d_armor_ip.eo.tr
Normal file
|
@ -0,0 +1,3 @@
|
|||
# textdomain: 3d_armor_ip
|
||||
Back=Dorso
|
||||
Armor=Armaĵo
|
3
mods/3d_armor/3d_armor_ip/locale/3d_armor_ip.fr.tr
Normal file
|
@ -0,0 +1,3 @@
|
|||
# textdomain: 3d_armor_ip
|
||||
Back=Retour
|
||||
Armor=Armure
|
3
mods/3d_armor/3d_armor_ip/locale/3d_armor_ip.pt_BR.tr
Normal file
|
@ -0,0 +1,3 @@
|
|||
# textdomain: 3d_armor_ip
|
||||
Back=Voltar
|
||||
Armor=Armadura
|
3
mods/3d_armor/3d_armor_ip/locale/3d_armor_ip.sv.tr
Normal file
|
@ -0,0 +1,3 @@
|
|||
# textdomain: 3d_armor_ip
|
||||
Back=Tillbaka
|
||||
Armor=Rustning
|
3
mods/3d_armor/3d_armor_ip/locale/template.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
# textdomain: 3d_armor_ip
|
||||
Back=
|
||||
Armor=
|
4
mods/3d_armor/3d_armor_ip/mod.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
name = 3d_armor_ip
|
||||
depends = 3d_armor
|
||||
optional_depends = inventory_plus
|
||||
description = Adds 3d_armor page to the inventory plus.
|
21
mods/3d_armor/3d_armor_sfinv/init.lua
Normal file
|
@ -0,0 +1,21 @@
|
|||
-- support for i18n
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
if not minetest.global_exists("sfinv") then
|
||||
minetest.log("warning", "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)
|
2
mods/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.de.tr
Normal file
|
@ -0,0 +1,2 @@
|
|||
# textdomain: 3d_armor_sfinv
|
||||
Armor=Rüstung
|
2
mods/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.eo.tr
Normal file
|
@ -0,0 +1,2 @@
|
|||
# textdomain: 3d_armor_sfinv
|
||||
Armor=Armaĵoj
|
2
mods/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.es.tr
Normal file
|
@ -0,0 +1,2 @@
|
|||
# textdomain: 3d_armor_sfinv
|
||||
Armor=Armadura
|
2
mods/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.fr.tr
Normal file
|
@ -0,0 +1,2 @@
|
|||
# textdomain: 3d_armor_sfinv
|
||||
Armor=Armure
|
|
@ -0,0 +1,2 @@
|
|||
# textdomain: 3d_armor_sfinv
|
||||
Armor=Armadura
|
2
mods/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.sv.tr
Normal file
|
@ -0,0 +1,2 @@
|
|||
# textdomain: 3d_armor_sfinv
|
||||
Armor=Rustning
|
2
mods/3d_armor/3d_armor_sfinv/locale/template.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
# textdomain: 3d_armor_sfinv
|
||||
Armor=
|
4
mods/3d_armor/3d_armor_sfinv/mod.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
name = 3d_armor_sfinv
|
||||
depends = 3d_armor
|
||||
optional_depends = sfinv
|
||||
description = Adds 3d_armor page to the sfinv inventory.
|
21
mods/3d_armor/3d_armor_stand/README.txt
Normal file
|
@ -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 |
|
||||
+---+---+---+
|
||||
|
445
mods/3d_armor/3d_armor_stand/init.lua
Normal file
|
@ -0,0 +1,445 @@
|
|||
-- support for i18n
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
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 = "blank.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},
|
||||
is_ground_content = false,
|
||||
on_blast = function() end,
|
||||
tiles = {"blank.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"},
|
||||
use_texture_alpha = "clip",
|
||||
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},
|
||||
is_ground_content = false,
|
||||
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"},
|
||||
use_texture_alpha = "clip",
|
||||
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},
|
||||
is_ground_content = false,
|
||||
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_node("3d_armor_stand:shared_armor_stand", {
|
||||
description = S("Shared Armor Stand"),
|
||||
drawtype = "mesh",
|
||||
mesh = "3d_armor_stand.obj",
|
||||
tiles = {"3d_armor_stand_shared.png"},
|
||||
use_texture_alpha = "clip",
|
||||
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},
|
||||
is_ground_content = false,
|
||||
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("Shared 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")
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("infotext", S("Shared Armor Stand"))
|
||||
add_hidden_node(pos, placer)
|
||||
end,
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
if not minetest.is_player(player) or minetest.is_protected(pos, player:get_player_name()) 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)
|
||||
if not minetest.is_player(player) or minetest.is_protected(pos, player:get_player_name()) 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", {
|
||||
initial_properties = {
|
||||
physical = true,
|
||||
visual = "mesh",
|
||||
mesh = "3d_armor_entity.obj",
|
||||
visual_size = {x=1, y=1},
|
||||
collisionbox = {0,0,0,0,0,0},
|
||||
textures = {"blank.png"},
|
||||
},
|
||||
_pos = nil,
|
||||
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:shared_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"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "3d_armor_stand:shared_armor_stand",
|
||||
recipe = {
|
||||
{"3d_armor_stand:armor_stand", "default:copper_ingot"},
|
||||
}
|
||||
})
|
5
mods/3d_armor/3d_armor_stand/locale/3d_armor_stand.de.tr
Normal file
|
@ -0,0 +1,5 @@
|
|||
# textdomain: 3d_armor_stand
|
||||
Armor Stand Top=Rüstungsständeroberseite
|
||||
Armor Stand=Rüstungsständer
|
||||
Locked Armor Stand=Abgeschlossener Rüstungsständer
|
||||
Armor Stand (owned by @1)=Rüstungsständer (Eigentum von @1)
|
5
mods/3d_armor/3d_armor_stand/locale/3d_armor_stand.eo.tr
Normal file
|
@ -0,0 +1,5 @@
|
|||
# textdomain: 3d_armor_stand
|
||||
Armor Stand Top=Armaĵtenila Supro
|
||||
Armor Stand=Armaĵtenilo
|
||||
Locked Armor Stand=Ŝlosita Armaĵtenilo
|
||||
Armor Stand (owned by @1)=Ŝlosita Armaĵtenilo (posedata de @1)
|
6
mods/3d_armor/3d_armor_stand/locale/3d_armor_stand.es.tr
Normal file
|
@ -0,0 +1,6 @@
|
|||
# textdomain: 3d_armor_stand
|
||||
Armor Stand Top=
|
||||
Armor Stand=Soporte de armadura
|
||||
Locked Armor Stand=Soporte de armadura privado
|
||||
Shared Armor Stand=Soporte de armadura compartido
|
||||
Armor Stand (owned by @1)=Soporte de armadura (de @1)
|
5
mods/3d_armor/3d_armor_stand/locale/3d_armor_stand.fr.tr
Normal file
|
@ -0,0 +1,5 @@
|
|||
# textdomain: 3d_armor_stand
|
||||
Armor Stand Top=Haut de support d'armure
|
||||
Armor Stand=Support d'armure
|
||||
Locked Armor Stand=Support d'armure verrouillé
|
||||
Armor Stand (owned by @1)=Support d'armure (propriété de @1)
|
|
@ -0,0 +1,5 @@
|
|||
# textdomain: 3d_armor_stand
|
||||
Armor Stand Top=Topo do suporte de armadura
|
||||
Armor Stand=Suporte de Armadura
|
||||
Locked Armor Stand=Suporte de armadura trancado
|
||||
Armor Stand (owned by @1)=Suporte de Armadura (dono: @1)
|
5
mods/3d_armor/3d_armor_stand/locale/3d_armor_stand.ru.tr
Normal file
|
@ -0,0 +1,5 @@
|
|||
# textdomain: 3d_armor_stand
|
||||
Armor Stand Top=верх стойки для брони
|
||||
Armor Stand=стойка для брони
|
||||
Locked Armor Stand=стойка для брони с замком
|
||||
Armor Stand (owned by @1)=стойка для бони (владелец @1)
|
5
mods/3d_armor/3d_armor_stand/locale/3d_armor_stand.sv.tr
Normal file
|
@ -0,0 +1,5 @@
|
|||
# textdomain: 3d_armor_stand
|
||||
Armor Stand Top=Rustningställstopp
|
||||
Armor Stand=Rustningställ
|
||||
Locked Armor Stand=Låst rustningställ
|
||||
Armor Stand (owned by @1)=Rustningställ (ägd av @1)
|
6
mods/3d_armor/3d_armor_stand/locale/template.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
# textdomain: 3d_armor_stand
|
||||
Armor Stand Top=
|
||||
Armor Stand=
|
||||
Locked Armor Stand=
|
||||
Shared Armor Stand=
|
||||
Armor Stand (owned by @1)=
|
2
mods/3d_armor/3d_armor_stand/mod.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
name = 3d_armor_stand
|
||||
depends = 3d_armor
|
193
mods/3d_armor/3d_armor_stand/models/3d_armor_entity.obj
Normal file
|
@ -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
|
280
mods/3d_armor/3d_armor_stand/models/3d_armor_stand.obj
Normal file
|
@ -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
|
BIN
mods/3d_armor/3d_armor_stand/models/3d_armor_stand.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
mods/3d_armor/3d_armor_stand/models/3d_armor_stand_locked.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
mods/3d_armor/3d_armor_stand/models/3d_armor_stand_shared.png
Normal file
After Width: | Height: | Size: 1,011 B |
BIN
mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_feet.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_head.png
Normal file
After Width: | Height: | Size: 164 B |
BIN
mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_legs.png
Normal file
After Width: | Height: | Size: 159 B |
BIN
mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_shield.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_torso.png
Normal file
After Width: | Height: | Size: 191 B |
58
mods/3d_armor/3d_armor_ui/init.lua
Normal file
|
@ -0,0 +1,58 @@
|
|||
-- support for i18n
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
local F = minetest.formspec_escape
|
||||
local has_technic = minetest.get_modpath("technic") ~= nil
|
||||
|
||||
if not minetest.global_exists("unified_inventory") then
|
||||
minetest.log("warning", "3d_armor_ui: Mod loaded but unused.")
|
||||
return
|
||||
end
|
||||
|
||||
local ui = unified_inventory
|
||||
if ui.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.form_header_y + 0.5
|
||||
local gridx = perplayer_formspec.std_inv_x
|
||||
local gridy = 0.6
|
||||
|
||||
local name = player:get_player_name()
|
||||
local formspec = perplayer_formspec.standard_inv_bg..
|
||||
perplayer_formspec.standard_inv..
|
||||
ui.make_inv_img_grid(gridx, gridy, 2, 3)..
|
||||
string.format("label[%f,%f;%s]",
|
||||
perplayer_formspec.form_header_x, perplayer_formspec.form_header_y, F(S("Armor")))..
|
||||
string.format("list[detached:%s_armor;armor;%f,%f;2,3;]",
|
||||
name, gridx + ui.list_img_offset, gridy + ui.list_img_offset) ..
|
||||
"image[3.5,"..(fy - 0.25)..";2,4;"..armor.textures[name].preview.."]"..
|
||||
"label[6.0,"..(fy + 0.0)..";"..F(S("Level"))..": "..armor.def[name].level.."]"..
|
||||
"label[6.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[6.0,"..(fy + 1.0)..";"..
|
||||
F(S("Fire"))..": "..armor.def[name].fire.."]"
|
||||
end
|
||||
if has_technic then
|
||||
formspec = formspec.."label[6.0,"..(fy + 1.5)..";"..
|
||||
F(S("Radiation"))..": "..armor.def[name].groups["radiation"].."]"
|
||||
end
|
||||
return {formspec=formspec}
|
||||
end,
|
||||
})
|
8
mods/3d_armor/3d_armor_ui/locale/3d_armor_ui.de.tr
Normal file
|
@ -0,0 +1,8 @@
|
|||
# textdomain: 3d_armor_ui
|
||||
3D Armor=3D-Rüstung
|
||||
Armor not initialized!=Rüstung ist nicht initialisiert!
|
||||
Armor=Rüstung
|
||||
Level=Stufe
|
||||
Heal=Heilung
|
||||
Fire=Feuer
|
||||
Radiation=Strahlung
|
8
mods/3d_armor/3d_armor_ui/locale/3d_armor_ui.eo.tr
Normal file
|
@ -0,0 +1,8 @@
|
|||
# textdomain: 3d_armor_ui
|
||||
3D Armor=3D Armaĵoj
|
||||
Armor not initialized!=Armaĵoj ne pretigitaj!
|
||||
Armor=Armaĵo
|
||||
Level=Nivelo
|
||||
Heal=Sanigi
|
||||
Fire=Fajro
|
||||
Radiation=Radiado
|
8
mods/3d_armor/3d_armor_ui/locale/3d_armor_ui.fr.tr
Normal file
|
@ -0,0 +1,8 @@
|
|||
# textdomain: 3d_armor_ui
|
||||
3D Armor=Armure 3D
|
||||
Armor not initialized!=Armure non initialisée !
|
||||
Armor=Armure
|
||||
Level=Niveau
|
||||
Heal=Soins
|
||||
Fire=Feu
|
||||
Radiation=Radiation
|
8
mods/3d_armor/3d_armor_ui/locale/3d_armor_ui.pt_BR.tr
Normal file
|
@ -0,0 +1,8 @@
|
|||
# textdomain: 3d_armor_ui
|
||||
3D Armor=3D Armor
|
||||
Armor not initialized!=Armadura não inicializada!
|
||||
Armor=Armadura
|
||||
Level=Nível
|
||||
Heal=Vida
|
||||
Fire=Fogo
|
||||
Radiation=Radiação
|
8
mods/3d_armor/3d_armor_ui/locale/3d_armor_ui.sv.tr
Normal file
|
@ -0,0 +1,8 @@
|
|||
# textdomain: 3d_armor_ui
|
||||
3D Armor=
|
||||
Armor not initialized!=Rustning har inte initialiserats
|
||||
Armor=Rustning
|
||||
Level=Nivå
|
||||
Heal=Läkning
|
||||
Fire=Eld
|
||||
Radiation=Strålning
|
8
mods/3d_armor/3d_armor_ui/locale/template.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
# textdomain: 3d_armor_ui
|
||||
3D Armor=
|
||||
Armor not initialized!=
|
||||
Armor=
|
||||
Level=
|
||||
Heal=
|
||||
Fire=
|
||||
Radiation=
|
5
mods/3d_armor/3d_armor_ui/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = 3d_armor_ui
|
||||
depends = 3d_armor
|
||||
optional_depends = unified_inventory
|
||||
description = Adds 3d_armor page to the unified inventory.
|
||||
min_minetest_version = 5.4.0
|
10
mods/3d_armor/LICENSE.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
3D Armor - Visible Player Armor
|
||||
===============================
|
||||
|
||||
License Source Code: Copyright (C) 2013-2023 Stuart Jones - LGPL v2.1
|
||||
|
||||
Armor Textures: Copyright (C) 2017-2023 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
|
93
mods/3d_armor/README.md
Normal file
|
@ -0,0 +1,93 @@
|
|||
Modpack - 3d Armor
|
||||
==================
|
||||

|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
### Table of Contents
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
- [[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)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
|
||||
[mod] Visible Player Armor [3d_armor]
|
||||
-------------------------------------
|
||||
|
||||
Minetest Version: 5.0.0 and newer
|
||||
|
||||
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
|
||||
|
||||
The specific "armors as modpack" refactorization allows anyone to enable/disable any armors they want as mods rather than obscure settings of the past. (See [#78](https://github.com/minetest-mods/3d_armor/commit/9444afd7222a71fc17d40c9793506812d715dcc3) for further explanation.)
|
||||
|
||||
Currently, the modpack includes:
|
||||
|
||||
- armor_admin
|
||||
- armor_bronze
|
||||
- armor_cactus
|
||||
- armor_crystal
|
||||
- armor_diamond
|
||||
- armor_gold
|
||||
- armor_mithril
|
||||
- armor_nether
|
||||
- armor_steel
|
||||
- armor_wood
|
||||
|
||||
as separate armor mods intentionally. All these mods depend on 3d_armor.
|
||||
|
||||
[API Reference](https://minetest-mods.github.io/3d_armor/reference/)
|
||||
|
||||
[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.
|
94
mods/3d_armor/armor_admin/init.lua
Normal file
|
@ -0,0 +1,94 @@
|
|||
|
||||
--- Registered armors.
|
||||
--
|
||||
-- @topic armor
|
||||
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
--- Admin Helmet
|
||||
--
|
||||
-- @helmet 3d_armor:helmet_admin
|
||||
-- @img 3d_armor_inv_helmet_admin.png
|
||||
-- @grp armor_head 1
|
||||
-- @grp armor_heal 100
|
||||
-- @grp armor_use 0
|
||||
-- @grp armor_water 1
|
||||
-- @grp not_in_creative_inventory 1
|
||||
-- @armorgrp fleshy 100
|
||||
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,
|
||||
})
|
||||
|
||||
--- Admin Chestplate
|
||||
--
|
||||
-- @chestplate 3d_armor:chestplate_admin
|
||||
-- @img 3d_armor_inv_chestplate_admin.png
|
||||
-- @grp armor_torso 1
|
||||
-- @grp armor_heal 100
|
||||
-- @grp armor_use 0
|
||||
-- @grp not_in_creative_inventory 1
|
||||
-- @armorgrp fleshy 100
|
||||
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, armor_water=1,
|
||||
not_in_creative_inventory=1},
|
||||
on_drop = function(itemstack, dropper, pos)
|
||||
return
|
||||
end,
|
||||
})
|
||||
|
||||
--- Admin Leggings
|
||||
--
|
||||
-- @leggings 3d_armor:leggings_admin
|
||||
-- @img 3d_armor_inv_leggings_admin.png
|
||||
-- @grp armor_legs 1
|
||||
-- @grp armor_heal 100
|
||||
-- @grp armor_use 0
|
||||
-- @grp not_in_creative_inventory 1
|
||||
-- @armorgrp fleshy 100
|
||||
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, armor_water=1,
|
||||
not_in_creative_inventory=1},
|
||||
on_drop = function(itemstack, dropper, pos)
|
||||
return
|
||||
end,
|
||||
})
|
||||
|
||||
--- Admin Boots
|
||||
--
|
||||
-- @boots 3d_armor:boots_admin
|
||||
-- @img 3d_armor_inv_boots_admin.png
|
||||
-- @grp armor_feet 1
|
||||
-- @grp armor_heal 100
|
||||
-- @grp armor_use 0
|
||||
-- @grp not_in_creative_inventory 1
|
||||
-- @armorgrp fleshy 100
|
||||
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, physics_speed=1,
|
||||
armor_water=1, 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")
|
5
mods/3d_armor/armor_admin/locale/armor_admin.de.tr
Normal file
|
@ -0,0 +1,5 @@
|
|||
# textdomain: armor_admin
|
||||
Admin Helmet=Adminhelm
|
||||
Admin Chestplate=Adminbrustplatte
|
||||
Admin Leggings=Adminhose
|
||||
Admin Boots=Adminstiefel
|
5
mods/3d_armor/armor_admin/locale/armor_admin.eo.tr
Normal file
|
@ -0,0 +1,5 @@
|
|||
# textdomain: armor_admin
|
||||
Admin Helmet=Administra Kasko
|
||||
Admin Chestplate=Administra Kiraso
|
||||
Admin Leggings=Administra Pantalono
|
||||
Admin Boots=Administraj Botoj
|
5
mods/3d_armor/armor_admin/locale/armor_admin.es.tr
Normal file
|
@ -0,0 +1,5 @@
|
|||
# textdomain: armor_admin
|
||||
Admin Helmet=Casco de admin
|
||||
Admin Chestplate=Peto de admin
|
||||
Admin Leggings=Grebas de admin
|
||||
Admin Boots=Botas de admin
|
5
mods/3d_armor/armor_admin/locale/armor_admin.fr.tr
Normal file
|
@ -0,0 +1,5 @@
|
|||
# textdomain: armor_admin
|
||||
Admin Helmet=Casque d'admin
|
||||
Admin Chestplate=Cuirasse d'admin
|
||||
Admin Leggings=Jambières d'admin
|
||||
Admin Boots=Bottes d'admin
|
5
mods/3d_armor/armor_admin/locale/armor_admin.it.tr
Normal file
|
@ -0,0 +1,5 @@
|
|||
# textdomain: armor_admin
|
||||
Admin Helmet=Elmo dell'amministratrice/tore
|
||||
Admin Chestplate=Corazza dell'amministratrice/tore
|
||||
Admin Leggings=Gambali dell'amministratrice/tore
|
||||
Admin Boots=Stivali dell'amministratrice/tore
|